pycif.plugins.domains.flexpart — API reference

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 × nlat cells covering [xmin, xmax] × [ymin, ymax].

Outer grid (when nested = True): nlon_glob × nlat_glob cells at resolution dx_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}, unless ignore_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 = True but 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_grid always raises AttributeError (ficlon/ficlat are not defined in input_arguments), so create_domain is 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.