TransWikia.com

problem reading netcdf

Geographic Information Systems Asked on May 22, 2021

I am using qgis 2.2 (I have also tried this in qgis 2.0 and arcgis 10 with the same result) (I have some basic understanding of netcdf, but I am probably missing a lot of details…)

I have manged to read in some netcdf-files and have them displayed correctly. Some other fails miserably, as the coordinate infomation is ignored and the file is displayed south- and eastwards from 0,0 … Is this a known problem? I have been looking at the files with ncdump, but have not been able to spot any differences that should make one of them work and the other to fail. When looking at the metadata in qgis or arcgis, it is clear that a lot is missing for those files that do not display correctly.

Edit:
When converting the files from netcdf4 to netcdf3 they worked fine. is this a known issue in arcgis / qgis? (using arcgis 10, it seems to use gdal, but I cannot find which version, qgis 2.2 from osgeo4w using gdal 1.10)

Edit2:
The original files were so large it was a bit difficult to share them. Now I have made an example file that behaves the same way: http://sickel.net/div/test.nc – it is created from http://sickel.net/div/test.cdl – it should, as far as I do understand, cover an area from -160 to -15 E, 20 – 60 N ie most of US main land and neary to UK in the atlantic ocean, but it ends up from 0,0 and south and eastwards in qgis, in arcmap 10.0, it ends up as a point on -160,20 …

2 Answers

There are bugs in NetCDF in GDAL - see the list at the bottom of http://trac.osgeo.org/gdal/wiki/NetCDF for those known/identified.

It is a bit difficult to say which of those bugs is affecting your particular situation since you didn't describe the data, but perhaps the "rotated pole" support problem at http://trac.osgeo.org/gdal/ticket/4285 is the particular "known problem" you were looking for.

Correct answer by BradHards on May 22, 2021

Same problem with very simple netcdf files created by me. The dimensions/variables lat and lon are not interpreted correctly when in netcdf4 format. After converting with to NetCDF3 with ncks tool it works fine:

ncks -3 original.nc new_nc3.nc

Running qgis 2.12.3-Lyon on Windows with gdal 1.11.2

Dimensions are lat and lon in degrees. In CDL the file header looks like this:

netcdf 201506_classicf {
dimensions:
        time = 1 ;
        lat = 2401 ;
        lon = 1667 ;
variables:
        float SMMean(time, lat, lon) ;
                SMMean:_FillValue = 9.96921e+36f ;
                SMMean:long_name = "non-living suspended matters mean" ;
                SMMean:standard_name = "" ;
                SMMean:units = "1e-3 kg m-3" ;
        float lat(lat) ;
        float lon(lon) ;
        int time(time) ;

// global attributes:
                :history = "Wed Mar  2 15:06:07 2016: ncap2 -s SMMean=float(SMMean) 201506_classic.nc 201506_classicf.ncn",
                :NCO = "4.4.8" ;
                :nco_openmp_thread_number = 1 ;
data:

 SMMean =
(...)

Answered by tiagoams on May 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP