flexpart_filter

flexpart_filter(**kwargs)

Extracts fields from the output GRIB files of the FLEXPART disperison model run within Metview.

Parameters
  • source (Fieldset) – the path to the FLEXPART output GRIB file

  • data – the Fieldset containing the FLEXPART output GRIB data. It takes precedence over source.

  • param (str) – the ecCodes shortName of the parameter to extract

  • levType ({"hl", "sfc"}, default "hl") – the type of level to extract

  • level (number) – the level to extract

  • step (str) – the forecast step to extract

  • release (number) – the release to extract. Release indexing starts at 1.

  • ageclass (number) – the ageclass to extract. Ageclass indexing starts at 1.

Return type

Fieldset

Example
import metview as mv

# to read parameter mdc (mass density concentration) for level 5000 m,
# for all the timesteps, releases and ageclasses
g = mv.flexpart_filter(
        source="my_flexpart_output.grib",
        param="mdc",
        level=5000)

Note

This function is obsolete. From metview-python version 1.8.0 use select() instead. The example above can be rewritten with select() as follows:

import metview as mv

# to read parameter mdc (mass density concentration) for level 5000 m,
# for all the timesteps, releases and ageclasses
f = mv.read("my_flexpart_output.grib")
g = f.select(shortName="mdc", level=5000, typeOfLevel="heightAboveGround")