runtraj.models.open_met#

runtraj.models.open_met(name, met, files, bounds=None)[source]#

Return the met files of a run of the transport model name as runtraj.sampling reads them.

A model whose met files are not ARL files opens them itself, with its met config met, as one Dataset in arlmet.open_dataset()’s layout (its open_met, TransportModel); for any other model, HYSPLIT included, the files are ARL files and are returned as paths. Either can be passed to runtraj.sampling.sample_met() and runtraj.sampling.calc_pbl_height().

Parameters:
Returns:

The files, or the Dataset the model opened.

Return type:

list[Path] | Dataset

Examples

>>> meta = runtraj.particles.particles_metadata(
...     sim.particles_path
... )
>>> met = runtraj.models.open_met(
...     "hysplit", variant.met_config, meta.met_files
... )
>>> runtraj.sampling.sample_met(sim.particles, met)