This plugin reads Meteorological data from GRIB files, specified by the WMO in their Manual of Codes 306 (have a look at this short introduction to GRIB).
In essence a Grib file contains an arbitrary number of messages. Each message is a self-explanatory record of some gridded data. Messages contain all the Metadata and other relevant information, to correctly identify and interpret the data. The GRIB format is binary, and is therefore not human readable. There exists a variety of software to read GRIB files, see Wiki entry. Here we use the ecCodes library from ECMWF to read GRIB files.
One big problem is, that the GRIB format is very flexible, and therefore the encoding of parameters... is specified in Tables provided by the data originating centers. ecCodes uses many common tables to decode the data. However, (very unlikely) it might happen, that there is no table available.
The ECMWF provides a parameter database where all the information about parameter codes can be found. This is why we decided to use their paramId as a key to identify the parameters. As there are many ways of specifing data, e.g. Air temperature at 2m as its own parameter 2mTempAir, the temperature read at 2m: Temp at 2m, or the Atmospheric temperature at 2m... This is why we use a parameter table, that can be adjusted to the users needs. It can be found under doc/resources/GRIB_param.tbl. It is a very basic text file, where empty lines, and lines starting wiht '#' are ignored. The default table is self explanatory, so read through the comments to see how to specify the desired parameters.
Additionally, to read vertically spaced parameters the typeOfLevel and level values need to be specified. If there is no level needed, such as for a surface level, just set the level to 0.
For now it is only possible to read parameters, that are predefined in MeteoIO (see MeteoGrids::Parameters, and MeteoData::Parameters).
The GRIB_TABLE template can be found at GRIB_param.tbl If these are the correct Ids there is nothing to do, if you need to change something, just copy the file, and let meteoio know where to find it.
As it is incredibly flexible, we narrowed down the structure of GRIB files that MeteoIO is able to read. Each file can contain one or multiple timepoints, but needs to contain all the parameters in one file. So having multiple files for the same timepoint is not supported.
If the default paramId is not the correct one for your GRIB file, you need to specify the correct ids in the parameer table. To find out, which parameter maps to which paramId, we recommend using either the ecCodes grib tools or the metview software. Both tools can be used to inspect the GRIB file and find the correct paramId. If you want to use the Grib Tools from ecCodes, you can use the following command:
This will print the paramId and the name of the parameter for each message in the file. If there are a lot of messages in the file, i.e. many timepoints, you will have a large output, which will be repeated a lot.
Metview is the easier option, as it is installable with conda via:
After installation, you can open the GRIB file in Metview, and inspect the parameters with:
This will open the Metview GUI, where you can inspect the File. You will get a list of all messages on the left, and on the right you can find information about the selected message. You will be able to easily see, which message contains which parameter. To find out the paramId, and typeOfLevel, select the Namespaces in the toolbar on the right, and choose "parameters" under which you can find the paramId and "vertical" for the typeOfLevel.
This plugin uses the following keywords: When reading Grid2d files:
When reading DEM files:
When reading virtual stations from the files: