Versions Compared

Key

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


Info

Full documentation on GRIB functionality in Metview is here.

Setup

Navigate into the 2_grib folder within Metview. A copy of called t_fc.grib is there.

Customising the plot to bring out information

Right-click on the Metview desktop, Create new icon and select Contouring. Rename the newly created icon to 'shade' and edit it, setting these parameters:

...

Have a look at the supplied Python script plot_max_value_locations.py and execute it. It shows one way to plot the locations of the highest values, by masking off the lower values as invalid. Another way would be a customised Contouring icon that only plotted large values.

Examine the GRIB metadata

Right-click on the GRIB file icon and choose Examine. This brings up the GRIB examiner tool - have a look!

mv-grib-examiner.pngImage Added

Info

If you find this tool useful, you can invoke it directly from the command line:

Code Block
metview -e grib <path/to/grib/file>


If you have time...

Compute and plot a time series from a point

Look at the supplied script plot_time_series.py as an example. It takes a GRIB file containing temperature data on multiple vertical levels for multiple time steps. The script plots a time series for each level for a given grid point.


Convert a GRIB field into text format

Create a new Grib to Geopoints icon. Edit it and drop one of the GRIB files into the Data box as shown.

Image Added

Executing this icon will convert the first GRIB field into Geopoints format. The result can be directly visualised, examined or saved to disk.

Get a Python xarray from a GRIB file

The script grib_xarray.py shows how to get an xarray from a GRIB file. This Jupyter notebook gives a more detailed example using ensemble data.