0

I recently installed QGIS 3.10 and have been unable to load a NetCDF file created by GMT. GMT *.grd and *.nc files are not listed the "Add Raster Layer" file type dropdown. The error I get when attempting to load the file is "Invalid Layer: GDAL cannot open GDAL dataset [filename.nc] not recognized as a supported file format.

I've tried both the data source manager and simply dragging the file into the layers pane. They all have the same issue.

Clearly I am missing something, a plugin or an library. To see an example of what I'm looking for see this YouTube video (https://www.youtube.com/watch?v=8JgE7vbv5JE).

  • Try just dragging the file into the QGIS window instead of going through the Data Source Manager dialogue. If the file type is compatible QGIS will usually figure it out by this method. Also try loading it through a different layer type (eg, NetCDF *.nc file type is available when trying to load a Mesh-type layer). – csk Dec 17 '19 at 18:29
  • I've tried both the data source manager and simply dragging the file into the layers pane. They all have the same issue. – Derrick Dec 18 '19 at 17:56
  • Maybe related: gis.stackexchange.com/questions/364367/… – AndreJ Jun 16 at 9:06
0

QGIS seems to have some issues with NetCDF derived from GDAL, mainly for the projections with rotated polar grids (you can check them opening the file with NASA's Panoply).

Other than that, from my recent experiences with QGIS I realized that .nc files must have one, and only one, variable (if your file has, for example, precipitation and temperature, it will not be open. Or it has only precipitation, or only temperature).

Also, the coordinate dimensions must be provided in that exact order: latitude, longitude, time. Change the order and it will just not open.

| improve this answer | |
0

GMT does not create multi-layered nc grids or grids with more than one variable. It does, however, create CF compliant grids. What does gdalinfo (or gdal_translate) say about that grid?

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.