[gdal-dev] netcdf warnings

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] netcdf warnings

Joaquim Luis

Hi,

 

There are a couple of issues that show when I run this test case.

 

First is that ERROR 3

 

$ gdal_grid -ot Float32 -txe 0.000000 10.000000 -tye 0.000000 10.000000 -outsize 201 201 -a nearest lixo.vrt junk.nc

Warning 1: Several drivers matching nc extension. Using NETCDF

0...10...20...30...40...50...60...70...80...90...100 - done.

ERROR 3: An attempt to read an undefined ID from virtual variable collection was made

 

Repeating the command (that is, overwriting the grid) shows more warnings, namely the “dimension #1 (lon) is not a Longitude/X dimension"

 

$ gdal_grid -ot Float32 -txe 0.000000 10.000000 -tye 0.000000 10.000000 -outsize 201 201 -a nearest lixo.vrt junk.nc

Warning 1: Several drivers matching nc extension. Using NETCDF

Warning 1: The dataset has several variables that could be identified as vector fields, but not all share the same primary dimension. Consequently they will be ignored.

Warning 1: dimension #1 (lon) is not a Longitude/X dimension.

Warning 1: dimension #0 (lat) is not a Latitude/Y dimension.

0...10...20...30...40...50...60...70...80...90...ERROR 3: An attempt to read an undefined ID from virtual variable collection was made

 

Which also show in gdalinfo

 

$ gdalinfo junk.nc

Warning 1: dimension #1 (lon) is not a Longitude/X dimension.

Warning 1: dimension #0 (lat) is not a Latitude/Y dimension.

Driver: netCDF/Network Common Data Format

 

I see that the x,y coordinates are always named “lon,lat” but data is not in geographics those names are not true. In GMT we call them “x,y” what data represent cartesian units or “lon,lat” when they are geographic. As a consequence of this, gdalinfo report those “not a Longitude/X dimension" warnings for the former case when the nc grid has not an “spatial_ref” attribute.

 

The data used in this example is attached

 

 

Joaquim


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

lixo.vrt (382 bytes) Download Attachment
lixo.csv (264 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: netcdf warnings

Even Rouault-2
Joaquim,

> There are a couple of issues that show when I run this test case.

Thanks for reporting. This turned out to be a regression in master, in raster
Create() support, related to the addition of CF-1.8 Simple Geometries writing.
Now fixed

> I see that the x,y coordinates are always named "lon,lat" but data is not in
> geographics those names are not true.

GDAL defaults to geographic coordinates, if there's no explicit setting of the
CRS. As far as I can see in CF conventions, there's no way to define a
unspecified projected coordinate systems, and as the driver stick to CF
conventions, that's the likely reason for the current behaviour.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: netcdf warnings

Joaquim Luis

> Thanks for reporting. This turned out to be a regression in master, in raster
> Create() support, related to the addition of CF-1.8 Simple Geometries writing.
> Now fixed

Thanks, works silently now.

>> I see that the x,y coordinates are always named "lon,lat" but data is
>> not in geographics those names are not true.

> GDAL defaults to geographic coordinates, if there's no explicit setting of the CRS. As far as I can see in > CF conventions, there's no way to define a unspecified projected coordinate systems, and as the
> driver stick to CF conventions, that's the likely reason for the current behaviour.

OK.

Joaquim
 
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev