Bug report #20980

NETCDF file format could not be read by QGIS

Added by Amirhossein Nikfal over 4 years ago. Updated over 4 years ago.

Category:Data Provider/MDAL
Affected QGIS version:3.4.4 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28799


Dear all,

In the newest versions of QGIS (3.4.1, 3.4.2, ...), adding NETCDF files as raster layers seems to be crashed. After trying to add such file formats, the below message encounters:
Invalid Layer: Raster layer Provider is not valid (provider: gdal, URI: $path-to-netcdf-file)

Any comments would be appreciated.

thanks in advance

Sapmple-file-for-QGIS.nc (76 KB) Amirhossein Nikfal, 2019-01-12 10:39 AM

load mesh nc.gif (2.32 MB) Saber Razmjooei, 2019-01-12 01:27 PM

Related issues

Related to QGIS Application - Bug report #20921: Cannot load netcdf files into QGIS 3.4.3 Closed 2019-01-04


#1 Updated by Saber Razmjooei over 4 years ago

  • Category changed from GDAL Tools to Data Provider
  • Status changed from Open to Feedback
  • Assignee deleted (Amirhossein Nikfal)
  • Priority changed from High to Normal

Hi, would it be possible to upload an example file? Could be related to #20921

#2 Updated by Saber Razmjooei over 4 years ago

#3 Updated by Amirhossein Nikfal over 4 years ago

It looks weird. For the attached file as an another NetCDF, it can be loaded without any problem. The file which cannot be loaded is larger than 5 MB and cannot be attached.

#4 Updated by Saber Razmjooei over 4 years ago

This one works fine. I can manage to open it as Mesh layer and browse through the time. You can use google drive or dropbox or other services to upload files larger than 5 mb.

#5 Updated by Amirhossein Nikfal over 4 years ago

Dear QGIS users, especially dear Saber,

Sorry for the long silence,

Would you please take a look at the NETCDF file below, which seems not to be opened by QGIS?

Many thanks for your previous comments.

My regards,

#6 Updated by Giovanni Manghi over 4 years ago

  • Status changed from Feedback to Open

#7 Updated by Saber Razmjooei over 4 years ago

  • Status changed from Open to Closed

I can indeed open the netcdf as a mesh layer in QGIS.

Could you try QGIS master (latest weekly if you are a windows user):

I close this, but feel free to open if you still have problems. And here is the animation of the meshlayer exported using Crayfish plugin:

#8 Updated by Amirhossein Nikfal over 4 years ago

I am mainly a Linux user and I carry out most of my data analyses by NCAR Command Language (NCL), but this is a Windows issue for me.
I don't have any problem with the NetCDF file format in QGIS 2.18.27. But for the newer versions, it shows some errors relevant to gdal, and cannot open the NETCDF file.

#9 Updated by Saber Razmjooei over 4 years ago

  • Affected QGIS version changed from 3.4.3 to 3.4.4
  • Category changed from Data Provider to Data Provider/MDAL
  • Status changed from Closed to Open

Hi Amirhossein,

Unfortunately, mesh is under active development and if you want the latest version (with faster rendering and lots of performance enhancement), best to upgrade to QGIS master.

You can have 2 versions of QGIS side-by-side in Linux. See https://qgis.org/en/site/forusers/download.html

Also available in: Atom PDF