[Qgis-user] Does QGIS require units "m" for the projection coordinate variables in a netCDF/CF file?

Thomas Lavergne thomas.lavergne at met.no
Fri Sep 15 05:33:50 PDT 2023

Dear QGIS community,

We recently released a number of sea-ice climate data records stored in
netCDF/CF files.
An example file is here

Our files use a polar equal area projection (EASE2) and the x / y axis
values are given with units "km" (kilometers):

double xc(xc) ;
    xc:axis = "X" ;
    xc:units = "km" ;
    xc:long_name = "x coordinate of projection (eastings)" ;
    xc:standard_name = "projection_x_coordinate" ;
double yc(yc) ;
    yc:axis = "Y" ;
    yc:units = "km" ;
    yc:long_name = "y coordinate of projection (northings)" ;
    yc:standard_name = "projection_y_coordinate"

When opening these in QGIS, they are placed correctly on the map, but the
message "Unkown CRS" appears in the lower-right corner.

By manipulating our files, we could get QGIS to recognize the correct CRS.

ncap2 -s 'xc=xc*1000f;yc=yc*1000f' infile.nc outfile.nc
ncatted -O -a units,xc,m,c,"m" outfile.nc
ncatted -O -a units,yc,m,c,"m" outfile.nc

The NCO commands above change the x / y axis variables to units "m"

The CF convention
not impose that x / y axis variables are given with unit meters, and shows
several examples using units "km". But this is apparently an issue for QGIS.

Can someone please confirm that QGIS requires "meters" for these variables,
and comment if this is a desired feature or if I should open a bug report
at github?

All the best,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230915/13fb7990/attachment.htm>

More information about the QGIS-User mailing list