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.samplingreads 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 (itsopen_met,TransportModel); for any other model, HYSPLIT included, the files are ARL files and are returned as paths. Either can be passed toruntraj.sampling.sample_met()andruntraj.sampling.calc_pbl_height().- Parameters:
name (
str) – The transport model the run used (get_model()).met (
Any) – The run’s met, of the model’smet_config_class.files (
Iterable[str|PathLike[str]]) – The met files the run read (met_filesofModelRunor ofruntraj.particles.particles_metadata()).bounds (
Bounds|None) – Where the particles are. A model that opens its files reads only this part of the grid, plus a margin of its own.Nonereads the whole grid.
- Returns:
The files, or the Dataset the model opened.
- Return type:
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)