runtraj.models.MetConfig.open#

MetConfig.open(files, bounds=None)[source]#

Return files, the met files a run read, as runtraj.sampling reads them: as ARL file paths here.

A met whose files are not ARL files returns them as one xarray.Dataset in arlmet.open_dataset()’s layout, such as an arlmet converter’s output, cropped to bounds (a runtraj.Bounds, or None for the whole grid). Either can be passed to runtraj.sampling.sample_met() and runtraj.sampling.calc_pbl_height(). The files are a run’s met_files (ModelRun, or runtraj.particles.particles_metadata()).

Examples

>>> meta = runtraj.particles.particles_metadata(
...     sim.particles_path
... )
>>> met = variant.met_config.open(meta.met_files)
>>> runtraj.sampling.sample_met(sim.particles, met)
Return type:

list[Path] | Dataset

Parameters: