...
Run the following command from the command line:
Code Block | ||
---|---|---|
| ||
cp -Rf ~cgx/tutorials/odb_intro_2019 ~/metview/ |
This will copy all the ODB examples into your Metview home folder. Soon When you will see a folder called 'odb_intro_2019' appear in your main Metview desktop. Double double-click to enter it. You should see the following contents:
Retrieving
...
ODB data from MARS
The Use the 'ret_temp' MARS Retrieval icon is already prepared for you to fetch Land TEMP ODB data from MARS for a given date. Edit the icon (right-click & edit) to see what parameters are set. The most important ones are as follows:
Parameter | Value | Description |
---|---|---|
Type | MFB | Mondb feedback |
Obsgroup | 17 | Conventional |
Reportype | 16022 | Land TEMP |
Close the icon editor and perform the data retrieval by choosing execute from the icon's context menu. The icon name should turn orange whilst the retrieval takes place, then green to indicate success.
...
If the MARS retrieval was successful the data is now cached locally. To see what was retrieved, right-click examine the icon. This brings up Metview's ODB Examiner tool. Here you can see the metadata (Columns tab) and the actual data values themselves as well (Data tab). Close the ODB Examiner.
...
We will visualise the 500 hPa temperature values from our ODB using the 'vis_temp' ODB Visualiser icon. The query we need to perform is as follows:
Code Block | |
---|---|
|
...
| |
select lat@hdr, lon@hd, obsvalue@body where varno = 2 and vertco_reference_1=50000 |
Now edit the 'vis_temp' icon.
First, drop your ODB Database icon into the ODB Data field.
Next, specify the where WHERE statement of the query in the ODB Where parameter as:
Code Block |
---|
varno = 2 and vertco_reference_1=50000 |
Save these settings by clicking the Save button at the bottom-right of the icon editor (or click Ok to save and close the editor).
...
There are a few Python examples to study: open each script, run them and try to change some of control the parameters at the top.
plot_map.py | This is the Python code to generate the same plot as we did interactively above. The title and the symbol plotting value range are automatically computed from the actual data values. In the script we:
| |
plot_diff.py | This script computes the the difference between the forecast fields stored in 'fc.grib' and our ODB observations. This is achieved by using the following steps:
| |
to_pandas.py | This script shows how to convert an ODB into a Pandas dataframe with the to_dataframe() function. | |
plot_wind.py |
If you have extra time...
...