pycif.plugins.domains.dummy — API reference

pycif.plugins.domains.dummy — API reference#

Configuration reference: dummy plugin

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

Build a uniform Cartesian dummy domain from YAML parameters.

Generates equally-spaced corner (lonc, latc) and centre (lon, lat) coordinate arrays over the rectangle [xmin, xmax] × [ymin, ymax] with nlon × nlat cells, builds 2-D meshgrids, and writes the 1-D arrays to text files under {workdir}/domain/.

Sets on domain: zlon, zlat, zlonc, zlatc.

Parameters:
  • domain – dummy domain plugin instance with nlon, nlat, xmin, xmax, ymin, ymax, and workdir set.

  • **kwargs – unused.

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

Read the dummy Cartesian domain from text files or fall back to create_domain.

Loads 1-D coordinate arrays from domain.filelon and domain.filelat, derives half-step corners, and builds 2-D meshgrids. Cell areas are computed as the Cartesian product of zonal and meridional cell sizes.

If the files cannot be read (IOError) or the attributes are absent (AttributeError), delegates to domain.create_domain() to build the grid from YAML parameters.

Sets on domain: nlon, nlat, zlon, zlat, zlonc, zlatc, areas, projection.

Parameters:
  • domain – dummy domain plugin instance.

  • **kwargs – unused.