standard/std standard/std#

Description#

Standard pyCIF observation vector plugin.

The standard observation vector holds the flat numerical arrays that the inversion algorithms operate on:

  • yobs — observed values \(\mathbf{y}^o\), shape (dim,)

  • yobs_err — observation errors \(\boldsymbol{\sigma}_\varepsilon\), shape (dim,); the observation error covariance is assumed diagonal so that \(R_{ii} = \sigma_{\varepsilon,i}^2\).

  • ysim — simulated equivalents \(\mathcal{H}(\mathbf{x})\), shape (dim,); filled by the forward observation operator.

  • dy — increments \(\delta\mathbf{y}\) used for the TL and adjoint passes, shape (dim,)

  • obsvect_mask— boolean mask of length dim; True for observations that actively enter the cost function (some observations may be loaded for diagnostic purposes only).

  • dim — total number of observations across all components and tracers.

Data are organised by component (e.g. concs, satellites) and tracer (e.g. CH4, CO2) as declared in the datavect YAML block. Each component/tracer combination maps to a contiguous slice [ypointer : ypointer + dim] of the flat vectors above.

YAML arguments#

The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:

Optional arguments#

dir_obsvect : str, optional, default “”

Directory containing a pre-computed observation vector from a previous pyCIF run (monitor.nc files). When set, observations are reloaded from that directory instead of being re-read from the raw monitor files. Defaults to $workdir/obsvect/ when left empty.

dump_obs : bool, optional, default False

Write the populated observation vector (yobs, ysim, dy, yobs_err) to monitor.nc files under $workdir/obsvect/ after initialisation.

dump_index : bool, optional, default False

Include an orig_index column in the dumped monitor.nc files recording each observation’s position in the global yobs vector. Useful for cross-referencing observations after post-processing.

obsvect_only : bool, optional, default False

Discard observations whose is_obsvect flag is False during initialisation. When True, only observations that actively enter the cost function are kept, reducing memory usage for large datasets.

dump_type : “nc” or “csv”, optional, default “nc”

Type of file to dump to

  • “nc”: Dump into a NetCDF

  • “csv”: Dump into a csv file

transform_pipe : optional

List of transformations to build the main observation operator pipeline

Argument structure:
any_key : optional

Name of a given transformation to be included. The name has no impact on the way the observation operator is computed, although it is recommended to use explicit names to help debugging.

Argument structure:
**args : optional

Arguments to set-up the given transform

Requirements#

The current plugin requires the present plugins to run properly:

Requirement name

Requirement type

Explicit definition

Any valid

Default name

Default version

model

Model

True

True

None

None

datavect

DataVect

True

True

standard

std

YAML template#

Please find below a template for a YAML configuration:

 1obsvect:
 2  plugin:
 3    name: standard
 4    version: std
 5    type: obsvect
 6
 7  # Optional arguments
 8  dir_obsvect: XXXXX  # str
 9  dump_obs: XXXXX  # bool
10  dump_index: XXXXX  # bool
11  obsvect_only: XXXXX  # bool
12  dump_type: XXXXX  # nc|csv
13  transform_pipe:
14    any_key:
15      **args: XXXXX  # any