pycif.plugins.transforms.basic.exp — API reference#
Configuration reference: exp plugin
- pycif.plugins.transforms.basic.exp.adjoint.adjoint(transform, inout_datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, onlyinit=False, **kwargs)[source]#
Propagate sensitivities through the exponential (adjoint).
Reloads the forward input from
chain/product/and applies: \(s_{in} = s_{out} \cdot e^{x_{fwd}}\).- Parameters:
transform (Plugin) – exp instance (carries
model.adj_refdirandorig_name).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) – if
True, return immediately.**kwargs – unused.
- pycif.plugins.transforms.basic.exp.forward.forward(transform, inout_datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, onlyinit=False, **kwargs)[source]#
Compute the element-wise exponential of a tracer field.
Forward: \(y = e^x\). TL: \(\delta y = e^x \cdot \delta x\) (NaN increments set to 0).
The input field is saved to
chain/product/for use by the adjoint.- Parameters:
transform (Plugin) – exp instance (carries
component,parameter, andorig_name).inout_datastore (dict) – mutable datastore.
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) – sub-simulation run directory (used to locate the
chain/directory).workdir (str) – unused.
onlyinit (bool) – unused.
**kwargs – unused.