pycif.plugins.transforms.basic.background — API reference#
Configuration reference: background plugin
- pycif.plugins.transforms.basic.background.adjoint.adjoint(transform, inout_datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, onlyinit=False, **kwargs)[source]#
Pass the output sensitivity directly to the concentration input.
The adjoint of addition is trivial: the sensitivity to the total
y = y_concs + y_backgroundis identical for both terms. The background field is not a control variable, so only theconcssensitivity is propagated.- Parameters:
transform (Plugin) – background instance (carries
spec).inout_datastore (dict) – mutable datastore.
controlvect – unused.
obsvect – unused.
mapper (dict) – transform mapper.
di (datetime) – sub-simulation start date.
df (datetime) – unused.
mode (str) –
'adj'.runsubdir (str) – unused.
workdir (str) – unused.
onlyinit (bool) – unused.
**kwargs – unused.
- pycif.plugins.transforms.basic.background.forward.forward(transform, inout_datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, onlyinit=False, save_debug=True, **kwargs)[source]#
Add background concentrations to regional model simulations.
For each observation station, reindexes the background field (forward-filled) to the same date/station index as the regional concentrations, then computes:
\[y_{out} = y_{concs} + y_{background}\]In TL mode the same addition is applied to the
incrfield. The output replaces the('concs', spec)entry in the datastore.- Parameters:
transform (Plugin) – background instance (carries
spec).inout_datastore (dict) – mutable datastore;
'inputs'must contain both('concs', spec)and('background', spec)entries.controlvect – unused.
obsvect – unused.
mapper (dict) – transform mapper.
di (datetime) – sub-simulation start date.
df (datetime) – sub-simulation end date.
mode (str) –
'fwd'or'tl'.runsubdir (str) – unused.
workdir (str) – unused.
onlyinit (bool) – unused.
save_debug (bool) – if
True, propagate extra diagnostic columns from inputs to the output datastore.**kwargs – unused.