Opening a NetCDF file
The NetCDF data is a data format, which is designed to be used with array-oriented scientific data, and it is frequently used for climate or ocean data, among others. This recipe shows you how to open a NetCDF file in QGIS.
How to do it…
NetCDF files are raster files, and they can be opened using the Add raster layer menu. Select NGMT NetCDF Grid
for CDF as the file format in the file selection dialog that you will see, and select the rx5dayETCCDI_yr_MIROC5_rcp45_r2i1p1_2006-2100.nc
file from the example dataset. Click on OK.
How it works…
The proposed NetCDF file contains a single variable, which is opened as a regular raster layer.
There's more…
A NetCDF file can contain contain multiple layers. In this case, QGIS will prompt you to select the one that you want to add from the ones contained in the specified file.
When only one layer is available, it is opened directly, as in the previously described example.
The NetCDF Browser plugin
Another way of opening NetCDF files is using the NetCDF Browser plugin. Select the Manage and install plugins... menu to open the plugin manager. Go to the Not installed section and type netcdf
in the search field to filter the list of available plugins. Select the NetCDF Browser plugin and click on Install plugin to install it. Close the plugin manager.
The plugin is now installed, and you can open it by selecting NetCDF Browser in the Plugins menu:
Select the NetCDF file in the upper field. The other fields will be updated with the content of the selected file. Select a layer from the available ones and click on Add to add the layer to your QGIS project.