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, 2019 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, 2019 at 17:56
  • 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?
    – J Luis
    Dec 18, 2019 at 23:09
  • Maybe related: gis.stackexchange.com/questions/364367/…
    – AndreJ
    Jun 16, 2020 at 9:06

1 Answer 1


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.

  • 1
    For reference, if someone is having a problem opening a NetCDF because it has multiple variables, you can extract the variable you want by getting NCO at: nco.sourceforge.net. Then in your terminal: ncdump -h yourfile.nc # to get the header info ncks -C -v yourvariable yourfile.nc yournewfile.nc #to extract the variable you want
    – Beardsley
    Jan 30, 2021 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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