[Gdal-dev] Re: NetCDF.. the world turned upside-down

Joaquim Luis jluis at ualg.pt
Mon Aug 28 12:48:28 EDT 2006


Rich Signell wrote:
> GDAL-gurus,
>
> I just ran into the upside-down NetCDF issue myself- on a perfectly 
> valid CF-compliant file, OpenEV (FWTOOLS 1.0.5) displays it upside down.
>
> For GMT users, this is particularly annoying:  if they are using the 
> old non CF-compliant NetCDF grid format, OpenEV will display their 
> grids correctly, while if they use the new CF-compliant NetCDF grid 
> form, OpenEV will display them upside down.
>
> I think the GDAL driver should be made more flexible so it reads the 
> lat/lon data from the coordinate variables and determines which way is 
> "up".  The CF convention does not specify positive up or positive down 
> -- it just associates the values found in the coordinate variables 
> with the dependent variable and clients are expected to do this.  
> Clients like "ncview" and IDV display these data correctly.
>
> An example CF-compliant file that displays correctly in NCVIEW and 
> IDV, but is upside down in OpenEV is at:
>
> http://stellwagen.er.usgs.gov/rps/share/vs_new.nc

Hi,
I have already reported this misbehavior  of the netCDF driver,  but 
I'll repeated again.
All datasets are reported to have a 512 x 512 size.

Joaquim Luis

C:\temp>gdalinfo vs_new.nc
Driver: netCDF/Network Common Data Format
Size is 512, 512
Coordinate System is `'
Metadata:
  NC_GLOBAL#Conventions=CF-1.0
Subdatasets:
  SUBDATASET_1_NAME=NETCDF:"vs_new.nc":z
  SUBDATASET_1_DESC=[1681x1801] z (32-bit floating-point)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)

C:\temp>grdinfo vs_new.nc
vs_new.nc: Title:
vs_new.nc: Command:
vs_new.nc: Remark:
vs_new.nc: Normal node registration used
vs_new.nc: grdfile format: nf (# 18)
vs_new.nc: x_min: 0 x_max: 1800 x_inc: 1 name: x nx: 1801
vs_new.nc: y_min: 0 y_max: 1680 y_inc: 1 name: y ny: 1681
vs_new.nc: z_min: -275.729 at x = 1704 y = 1671 z_max: 182.007 at x = 
104 y = 14
56
vs_new.nc: scale_factor: 1 add_offset: 0



More information about the Gdal-dev mailing list