pycif.plugins.domains.dalecbethy — API reference#
Configuration reference: dalecbethy plugin
- pycif.plugins.domains.dalecbethy.create_domain.create_domain(*args, **kwargs)[source]#
D&B’s sample-point domain cannot be generated by pyCIF.
Unlike CHIMERE’s HCOORD/VCOORD grid, D&B’s domain (its
nggrid-cells/sites and their PFT-derivednspsample points) is not a regular grid pyCIF could build from a handful of geometry parameters: it is entirely defined by D&B’s own static forcing NetCDF file (input/staticforcing.nc), produced externally, upstream of any pyCIF run (seemodel_sources/dalecbethy/src/ncread_forcing.f90:: ncread_static_forcing). Useread_grid()instead.- Raises:
CifValueError – always.
- pycif.plugins.domains.dalecbethy.read_domain.read_grid(domain, **kwargs)[source]#
Read D&B’s sample-point domain from its static forcing NetCDF file.
Grid-cells are collapsed into a 1D list of
nsp“sample points”, skipping grid-cells wherecondition_simulate == 0.Sets on domain:
unstructured_domain,nlon(=``nsp``),nlat(=1),zlon,zlat(shape(1, nsp)), plus a single-level vertical coordinate. Also setsng(the full, unfiltered size of the static forcing file’s flat grid-cell dimension) andactive, the indices (into thatngdimension) of the retained sample points, in the same order aszlon/zlat; other D&B NetCDF files indexed along the samengdimension (e.g. D&B’s owndynforcing.nc, seepycif.plugins.datastreams.fluxes.dalecbethy) must be subset/scattered with these to line up with this domain.- Parameters:
domain – dalecbethy domain plugin instance with
dir/fileset.**kwargs – unused.
- Raises:
CifKeyError – if a mandatory dimension/variable is missing.
CifValueError – if no active sample point is found.