TransWikia.com

How to open NetCDF in QGIS

Geographic Information Systems Asked on February 19, 2021

Despite the topic Cannot open NetCDF File in QGIS, I cannot properly visualize my NetCDF file (nc4) in QGIS. It is quite strange because Panoply can do this (see image below). My NetCDF file visualize Standardized Precipitation Index (there are many results for the region of interest). It seems to me that I am able only to visualize it in some strange very narrow line if I loaded as raster.

This really doesn’t help:

 Layer > Add Layer > Add Mesh Layer.

Error message:

Invalid Data Source: C:UserslukatDownloadsIMERG_spi_gamma_03.nc is not a valid or recognized data source.

Panoply result

One Answer

I've solved my issue with the help of @Kazuhito.

Firstly, you need to install the NCO (netCDF Operator). The issue is that NetCDF has sometimes different order of variables and QGIS is not able to recognize and match right variables (so it is reading time as longitude).

The NCO command as follows should change variables to the right order for QGIS:

ncpdq -a time,lat,lon IMERG_spi_gamma_03.nc spi_gamma_03_mozambique.nc 

Correct answer by Lukáš Tůma on February 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP