Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Full documentation on ODB functionality in Metview is here.

Setup

Navigate into the 4_odb/main folder within Metview.

Retrieving ODB data from MARS

...

We will visualise the 500 hPa temperature values from our ODB using the 'vis_temp' ODB Visualiser icon. The ODB/SQL query we need to perform is as follows:

...

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:

  • used odb_visualiser() to generate the plot
  • called called  odb_filter() (see ODB Filter) to extract additional data for the title
  • used the values() function to access a given ODB column as a numpy array.
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:

  1. the ODB query is performed and the resulting data is converted into Geopoints
  2. the matching GRIB field is read and interpolated to the observation points
  3. the difference is computed between forecast and observation
to_pandas.py
This script shows how to convert an ODB into a Pandas dataframe with the to_dataframe() function.
plot_wind.py
This script shows how to plot wind data from ODB.

...

There are some other examples provided in the '4_odb_intro_2019' folder (it is one level up from folder 'main').

...