pycif.plugins.domains.flexpart — API reference#
Configuration reference: flexpart plugin
- pycif.plugins.domains.flexpart.create_domain.create_domain(domain, **kwargs)[source]#
Build the FLEXPART unstructured domain from YAML parameters.
Constructs the inner (nested) and outer (global) rectangular grids, concatenates them into a single flat array of cell centres, and builds the corresponding 4-vertex corner representation.
Inner grid:
nlon×nlatcells covering [xmin,xmax] × [ymin,ymax].Outer grid (when
nested = True):nlon_glob×nlat_globcells at resolutiondx_glob×dy_glob, covering the full background domain. Index arrays (ix1,iy1,ix2,iy2) map the inner domain into the outer grid.Vertical levels are read from the FLEXPART header file
{dir_heights}/{outheight_header}, unlessignore_heights = True.Sets on domain:
zlon,zlat,zlonc,zlatc,zlon_in,zlat_in,zlonc_in,zlatc_in,ix1,ix2,iy1,iy2,raveled_indexes_glob,heights,nlev.- Parameters:
domain – FLEXPART domain plugin instance with all grid-geometry parameters set.
**kwargs – unused.
- Raises:
Exception – if
nested = Truebut the global domain parameters produce an empty grid.
- pycif.plugins.domains.flexpart.read_domain.read_grid(domain, **kwargs)[source]#
Read the FLEXPART domain from coordinate text files.
Note
This function is not currently used in practice:
read_gridalways raisesAttributeError(ficlon/ficlatare not defined ininput_arguments), socreate_domainis called as the fallback.Loads 1-D longitude and latitude arrays from
domain.ficlon/domain.ficlat, derives half-step corners, and builds 2-D meshgrids.Sets on domain:
nlon,nlat,zlon,zlat,zlonc,zlatc.- Parameters:
domain – FLEXPART domain plugin instance.
**kwargs – unused.