pycif.plugins.domains.chimere — API reference

pycif.plugins.domains.chimere — API reference#

Configuration reference: chimere plugin

pycif.plugins.domains.chimere.create_domain.create_domain(domain, **kwargs)[source]#

Generate and write CHIMERE coordinate files from YAML configuration.

Creates the {workdir}/domain/ directory tree and calls:

  • make_hcoord() — generates horizontal coordinate files (COORD_{domid} and COORDcorner_{domid}).

  • make_vcoord() — generates the vertical sigma-level file (VCOORD_{nlev}_{p1}_{pmax}).

  • make_landuse() — copies or generates the land-use file.

  • make_domainlist() — appends the new domain entry to domainlist.nml.

Parameters:
  • domain – CHIMERE domain plugin instance with workdir, type, and all grid-geometry parameters set.

  • **kwargs – unused.

pycif.plugins.domains.chimere.read_domain.read_grid(domain, **kwargs)[source]#

Read the CHIMERE horizontal and vertical grid from pre-computed coordinate files.

Reads domainlist.nml to determine grid dimensions (nzo × nme), then loads cell centres from HCOORD/COORD_{domid} and corners from HCOORD/COORDcorner_{domid}. Vertical sigma levels are read from VCOORD/VCOORD_{nlev}_{p1}_{pmax} and stored as sigma_a / sigma_b (in hPa).

Sets on domain: nlon, nlat, nlev, zlon, zlat, zlonc, zlatc, corners, sigma_a, sigma_b.

Parameters:
  • domain – CHIMERE domain plugin instance with repgrid, domid, nlev, p1, and pmax set.

  • **kwargs – unused.

Raises:

AttributeError – if domain.domid is not found in domainlist.nml.