crt1d.variables#

Variable metadata from the variables.yml file.

Module Contents#

Classes#

Vmd

Container for variable metadata of multiple variables.

VmdEntry

Variable metadata for one variable.

Attributes#

VMD

Vmd instance with all the variables from variables.yml.

class crt1d.variables.Vmd(vmdes)#

Container for variable metadata of multiple variables.

Parameters:

vmdes (list of VmdEntry) –

intent(intent='in')#

Return filtered set of variables that have the specified intent.

Parameters:

intent (str, {'in', 'out', 'none'}) –

Returns:

dictname: VmdEntry

class crt1d.variables.VmdEntry(name, params, param_defaults)#

Variable metadata for one variable.

Parameters:
  • name (str) – Code variable name associated with the variable. Used as the name for xarray.DataArrays.

  • params (dict) – Parameters for this variable.

  • param_defaults (dict) – Default parameters (to use if params is missing any of the needed).

da_attrs()#

Return dict of attributes to use when creating an xarray.DataArray for this variable.

details_sec(*, heading_level=3) str#

Construct details section for docs variables page.

dv_tuple(data)#

Construct an xarray.Dataset data_vars tuple.

list_table_entry(fields) str#

Construct a MyST list-table entry for the docs variable summary table.

Parameters:

fields (list of str) – Parameters to include (in desired order).

param_entry(optional=False) str#

Construct an un-indented NumPy docstring Parameters entry.

crt1d.variables.VMD#

Vmd instance with all the variables from variables.yml.