4

I have been trying to impot netcdf files following this guide online http://www.ggiuliani.ch/download/netcdf_qgis_GG.pdf into qgis 2.10 with no success. ALthough the file is imported, the dimensions are wrong and I am not sure how to assign lat/lon information to the selected var layer (eg temperature). I have tried plotting the grid in python using matplotlib and everything is fine with the file.

  • 1
    I do not know much about netcdf files. But If you say that dimensions are wrong, it probably have something to do with the Coordinate System used. Are you sure that the coordinate system choosen is the correct one? Right-click the layer and use set layer CRS. – Alexandre Neto Oct 22 '15 at 15:54
  • yes. I set the same CRS as the file -- WGS84. It seems as if the problem is something to do with the fact the lat and lon info are not taken into account. The image plotted as top right corner coordinate 0,0 and its lenght width is determined by the number of columns and row inside the netcdf file (ie in my case the extent in the x direction is equal to the square root of the number of data points i have. Total of 100, so the extent is from 0 to 10 in the long dir and from 0,10 in the lat) – Jon Oct 22 '15 at 16:07
  • 1
    yes. I set the same CRS as the file -- WGS84. It seems as if the problem is something to do with the fact the lat and lon fields are not taken into account when plotting the image. The image is plotted at the top right corner coordinate 0,0 and its lenght and width is determined by the number of columns and row inside the netcdf file and not by the values in the XLAT and XLON fileds in the netcdf file (ie in my case the extent in the x direction is equal to the square root of the number of data points i have. Total of 100, so the extent is from 0 to 10 in the long dir and from 0,10 in the lat) – Jon Oct 22 '15 at 16:12
  • is that a temperature-derived satellite image? if so, you'd need an extra file where long/lat information is stored, then you'd need to edit your header file in order to assign the long/lat information. – Gery Oct 22 '15 at 18:51
  • @Gery no its a simulation. But Ive tried with observational data as well and got the same result. its not file dependent it seems I have tried with in ArcGIS I can select the lat and long as extent wehn importing the file but I cannot see how in Qgis. Also if I try using the netCDF4 and matplotlib lib in python no problems but cannot see how to import them in qgis. I include an ncdump -h below – Jon Oct 22 '15 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.