[netcdfgroup] CDED (Canadian DEM) to GMT: PROBLEM WITH NETCDF

Apologies for my first posting to this group, if this isn't really the best 
place
to pose this question. I also posted this question in the 'GMT' (Generic Mapping Tools) newsgroup, since that is the primary tool that I am attempting to use (so far, no
responses).  However, the actual error message that I am getting (see below)is 
a 'NetCDF'
error.  Can anyone help?  Would the newest version (4.0+) help me?

...

Hello all!  I posted a similar question, apparently 4 years ago.  I have now
resumed my quest for using GMT to create topo maps using 0.75 arcsecond (or
is it 1 arcsecond?) Canadian CDED data.  I am doing this since the SRTM data
currently available for non-US locations is limited to 30 arcsecond (90
meter) accuracy.

This good page indirectly confirms that this *should* be possible, since
conversion to SRTM format (and therefore GMT maps) is implied for the CDED data:

http://www.cplus.org/rmw/dataen.html

After registering, I download a zip file containing relevant files:

# unzip -l 062G01.zip
Archive:  062G01.zip
 Length     Date   Time    Name
--------    ----   ----    ----
   13521  07-06-07 10:36   cded_062g01_2_0_fgdc_en.xml
   33703  07-06-07 10:36   cded_062g01_2_0_fgdc_en.html
   15169  07-06-07 10:36   cded_062g01_2_0_fgdc_fr.xml
   36134  07-06-07 10:36   cded_062g01_2_0_fgdc_fr.html
 9839616  07-06-07 10:36   062g01_0200_deme.dem
 9839616  07-06-07 10:36   062g01_0200_demw.dem
--------                   -------
19777759                   6 files

My tests involve using '062g01_0200_demw.dem'.

I convert this to GMT 'grd' data format using two different techniques:

1) Python program written by Norman Vine
(http://www.vso.cape.com/~nhv/files/python/gdal/gdal2grd.py):

python gdal2grd.py 062g01_0200_demw.dem

2) GDAL utility:

gdal_translate -of GMT 062g01_0200_demw.dem 062g01_0200_demw.gdal_translate.grd

Both appear to be successful, and generate apparently valid GMT 'grd' files:

# grdinfo 062g01_0200_demw.gdal2grd.grd
062g01_0200_demw.gdal2grd.grd: Title: no_title
062g01_0200_demw.gdal2grd.grd: Command: created by NumPy
062g01_0200_demw.gdal2grd.grd: Remark: 062g01_0200_demw.gdal2grd.grd: Gridline node registration used
062g01_0200_demw.gdal2grd.grd: Grid file format: cf (# 10)
062g01_0200_demw.gdal2grd.grd: x_min: -98.5001 x_max: -98.2499 x_inc:
0.000208333 name: degrees nx: 1201
062g01_0200_demw.gdal2grd.grd: y_min: 48.9999 y_max: 49.2501 y_inc:
0.000208333 name: degrees ny: 1201
062g01_0200_demw.gdal2grd.grd: z_min: -32767 z_max: 505 name: meters
062g01_0200_demw.gdal2grd.grd: scale_factor: 1 add_offset: 0

# grdinfo 062g01_0200_demw.gdal_translate.grd
062g01_0200_demw.gdal_translate.grd: Title: 062g01_0200_demw.gdal_translate.grd: Command: 062g01_0200_demw.gdal_translate.grd: Remark: 062g01_0200_demw.gdal_translate.grd: Gridline node registration used
062g01_0200_demw.gdal_translate.grd: Grid file format: cs (# 8)
062g01_0200_demw.gdal_translate.grd: x_min: -98.5001 x_max: -98.2499 x_inc:
0.000208333 name: meters nx: 1201
062g01_0200_demw.gdal_translate.grd: y_min: 48.9999 y_max: 49.2501 y_inc:
0.000208333 name: meters ny: 1201
062g01_0200_demw.gdal_translate.grd: z_min: 339 z_max: 505 name: meters
062g01_0200_demw.gdal_translate.grd: scale_factor: 1 add_offset: 0

However, when I attempt to actually draw GMT maps using these 'grd' files,
things break down quickly.  It chokes at one of the first steps i.e. using
'grdgradient':

# grdgradient 062g01_0200_demw.gdal2grd.grd -A0 -Ne0.6 -Gcded_i.grd -V
GMT_grd_is_global: no!
GMT_boundcond_param_prep determined edgeinfo: gn = 0, gs = 0, nxp = 0, nyp = 0
GMT_grd_is_global: no!
grdgradient: NetCDF: Index exceeds dimension bound
[062g01_0200_demw.gdal2grd.grd]

]# grdgradient 062g01_0200_demw.gdal_translate.grd -A0 -Ne0.6 -Gcded_i.grd -V
GMT_grd_is_global: no!
GMT_boundcond_param_prep determined edgeinfo: gn = 0, gs = 0, nxp = 0, nyp = 0
GMT_grd_is_global: no!
grdgradient: NetCDF: Index exceeds dimension bound
[062g01_0200_demw.gdal_translate.grd]

I am at my wit's end!  I am so close, but it just doesn't work.  Can anyone
help?

Thanks



  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: