[Gdal-dev] Proper way to load a NETCDF file in OpenEV

Frank Warmerdam warmerdam at pobox.com
Mon Aug 27 20:20:05 EDT 2007


Rich Signell wrote:
> GDAL folks,
> 
> I'm having trouble figuring out the proper way to load a NetCDF file
> made with GMT using OpenEV on a Windows machine.
> 
> I have a small NetCDF file "test36.grd" that I made with GMT:
> 
>        http://stellwagen.er.usgs.gov/rps/share/test36.grd
> 
> This is the "new" style GMT NetCDF file that writes a 2D
> array for the "z" values.
> 
> On Linux, I just do "openev -h test36.grd", using 1.3.6 and the grid
> just pops right up (sadly, upside down, but this is another issue that
> has been previously discussed on this list, see:
> http://tinyurl.com/2wl84j).
> 
> When I type in Open=>"c:\downloads\test36.grd" OpenEV on my PC, I get
> varying behavior depending on the OpenEV version:
> 
> Version 1.1.2:  prompts me for a "subdataset selection".   I click on
> "z" and the file loads and displays (although it displays upside
> down).
> 
> Version 1.3.6: says "Error: Unable to open c:\downloads\test36.grd"
> and I never get the prompt for the subdataset selection.
> 
> But I first use Version 1.1.2, then use Version 1.3.6, I see
> 
> NETCDF:"c:\downloads\test36.grd":z
> 
> listed under the File menu as previously opened.  And if I click on
> that, the file loads and displays.
> 
> I tried to type this into the file box, but that didn't work.
> 
> Can anyone explain this behavior and the proper way to open a NetCDF
> file on Windows?

Rich,

The problem was introduced in an effort to support 'direct access' without
the subdataset business when there is only one subdataset.  I have fixed
this now in SVN trunk and the next FWTools release should include the
fix.  In the meantime, from the FWTools command shell you can do:

openev NETCDF:"C:\downloads\test36.grd":z

The problem is that internally the driver was not adding the quotes
around the filename, and so the drive letter confused it's effort
to parse things into sections.

Alternatively, if you can avoid using drive letters you should be
fine too.

I filed a bug at:

   http://trac.osgeo.org/gdal/ticket/1767

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list