The downloaded GRIB file contains hourly Surface pressure and Sea surface temperature for the 13th-17th of March 2023.
QGIS
GRIB files are supported by QGIS and could be easily added to the map. But not all the metadata from the file is displayed properly.
QGIS doesn't show sub-datasets names
The layer is georeferenced, but sub-dataset names are not read properly, and time in the metadata is read as a Unix time tag.
GRIB layer properties
Python + Xarray
Xarray is a Python library for working with multidimensional data. It provides the capability of reading almost every multidimensional data format along with its metadata, as well as subsetting, resampling, and saving the data. It is convenient to use Jupyter Notebook GUI to study and work with datasets.
The full notebook download is below. To run it, set up conda environment, save the notebook to your working directory, and run jupyter notebook from this directory. Data for the notebook is not provided.
It is very useful to study the dataset structure by printing it.
dataset printout by xarray
You can see, that dataset has 3 dimensions: time, latitude, and longitude. 2 data variables are listed: sst - sea surface temperature, and sp - surface pressure, they have the same dimensions: 120*721*1440. Every variable line could be expanded to view the details.
Plot data variable
As all the dimensions are labeled, it is enough to name the dimension and pass the value for data selection.
To view a separate 1-hour layer
Note, that longitude hase 0-360 values, not -180 +180
To view values for a specific point
Plot of surface pressure for point (-50, -40)
Clip data to AOI
As it was shown before, subsetting by coordinates is very simple, as all the dimensions are labeled with physical values. To subset to South Georgia's extent we will use vector file.
Resulting dataset has dimensions 120*21*45
To convert temperature to Celsius
Resample
Resulting dataset has dimensions 5*21*45, as it was resampled tio daily means
Save data
View in QGIS
The output file is georeferenced, has variable name and readable time.
Converting NetCDF to GeoTIFF will be covered in the next section.