qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.52k stars 2.99k forks source link

Cannot load multivariable netcdf files #29637

Closed qgib closed 5 years ago

qgib commented 5 years ago

Author Name: saverio vicario (saverio vicario) Original Redmine Issue: 21822 Affected QGIS version: 3.4.6 Redmine category:rasters


I upgraded QGis and I cannot load some netcdf anymore. All the file multivariable that I have cannot be read. The netcdf that I can load do not trigger the window were to choose the variable as before but directly load the single variable present in the files. When I try to load a multivariable netcdf Qgis report on the GUI that source is not valid and on terminal I am getting only warnings relative to the naming of dimensions " Warning 1: dimension #2 (x) is not a Longitude/X dimension. Warning 1: dimension #1 (y) is not a Latitude/Y dimension. Warning 1: dimension #0 (Year) is not a Time or Vertical dimension. " so no critical error. When I am using gdalinfo is all fine. when I am using gdal_translate to transform a single variable in geotiff is all fine and am getting a tiff file correctly read by qgis itself.



Related issue(s): #29598 (relates) Redmine related issue(s): 21783


qgib commented 5 years ago

Author Name: saverio vicario (saverio vicario)


An update: when from my python script were I generate the netcdf I select a single variable from my mutivariable dataset and produce a new netcdf files, this is loaded no problem inside qgis. So the problem is really that qgis 3.4.6 does not produce a pop up window were used can select the variable of interest to be loaded.

qgib commented 5 years ago

Author Name: Giovanni Manghi (@gioman)


Please attach sample data, thanks!


qgib commented 5 years ago

Author Name: Giovanni Manghi (@gioman)


Also possibly duplicate of #29598


qgib commented 5 years ago

Author Name: Jürgen Fischer (@jef-n)


qgib commented 5 years ago

Author Name: saverio vicario (saverio vicario)


I solved partially the problem. I changed the name of dimensions from x to X, from y to Y, and from Years to Time and Qgis recognize my multivariable netcdf as something to be read by MDAL. So I got my visualization,albeit always with an error message. So I would like to change the report to "feature request": the error message should more clear and state if some variable are not recognized or at least report the warning of gdalinfo that guided me to make the changes. I attach a smaller data set so that you can read the error message that stay even if now the data set is read ( probably some other metadata are asked)



qgib commented 5 years ago

Author Name: Giovanni Manghi (@gioman)


wonder-sk commented 5 years ago

I am not sure if I understand your problem. I have tried to load your file (Testy.nc) by drag-n-drop to QGIS without issues (it opens popup asking which dataset(s) to open) and also by using browser dock widget (either as raster layer or as mesh layer). Could you please provide exact steps what steps you do? Also please make sure to test with the latest nightly builds (or at least qgis 3.6)

milechin commented 5 years ago

I had encountered this issue as well with QGIS 3.4.2 installed on CentOS 7. If I delete everything in the QGIS configuration folder located in my home directory "~/.local/share/QGIS". Then I run QGIS and try to load the multivariant netCDF file and it will throw the "Invalid Layer" error.

Now if I go to the menu "Settings --> Options" and then just click "OK" for this window, by doing this action this adds a lot of more configuration settings to my "QGIS3.ini" file in my home directory: "~/.local/share/QGIS/QGIS3/profiles/default/QGIS". Once this is done, I am actually able to open the multivariant NetCDF file with no errors. This seems to suggest the default QGIS3.ini file may having some missing configuration settings that is prevent the netCDF file from loading properly.

saberraz commented 5 years ago

I am not able to reproduce that. Feel free to re-open if it repeats with a reproducible workflow.