runtraj.models.flexpart.FlexpartMetConfig#

class runtraj.models.flexpart.FlexpartMetConfig(*, label: str | None = None, directory: pathlib.Path, pattern: str = '*') → None[source]#

The meteorology FLEXPART reads: a directory of GRIB files.

FLEXPART reads each file as AVAILABLE lists it, by valid time; runtraj reads the valid time from each file’s first message, so the names do not matter. Which weather model the files come from is read from the first file too (source()): ERA5 as flex_extract writes it (EA* files on model levels) runs, and GFS is refused, because on current GFS pgrb2 files FLEXPART 11 derives the surface heat flux and stress near zero, so particles released near the ground stay near it (FLEXPART Integration).

A string in config.yaml is the directory: era5: /path/to/era5.

Parameters#

Parameter

Description

Default

label

A name that tells this met’s runs apart from those of another met of the same weather product, such as mynn and ysu for two WRF runs with different boundary-layer schemes, whose ARL files carry the same source id. A run records it only when it is set, so a met without one keeps its settings folders, and setting one moves its runs to a new folder. runtraj check and a run refuse two mets of one transport model that record the same settings and no label to tell them apart, since their variants would share one run.

None

directory

Directory of the GRIB files. A relative path starts from the project directory.

Required

pattern

Glob that picks the GRIB files in directory. A file that holds no GRIB message, such as an index cfgrib wrote, is left out.

'*'

Methods#

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

open(files[, bounds])

Return the GRIB files a run read as one Dataset in arlmet.open_dataset()'s layout.

settings()

Return what a run records of this met: its source and its grid.

source()

Return the weather model the files come from, era5, read from the first file once, and kept.

Inherited#

From MetConfig: check, downloads, fetch