runtraj.models.MetConfig.open#
- MetConfig.open(files, bounds=None)[source]#
Return files, the met files a run read, as
runtraj.samplingreads them: as ARL file paths here.A met whose files are not ARL files returns them as one
xarray.Datasetinarlmet.open_dataset()’s layout, such as an arlmet converter’s output, cropped to bounds (aruntraj.Bounds, orNonefor the whole grid). Either can be passed toruntraj.sampling.sample_met()andruntraj.sampling.calc_pbl_height(). The files are a run’smet_files(ModelRun, orruntraj.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)