pycif.plugins.transforms.system.run_model — API reference#
Configuration reference: run_model plugin
- pycif.plugins.transforms.system.run_model.adjoint.adjoint(transform, datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, do_simu=True, onlyinit=False, approx_transf=False, overlap=False, ref_fwd_dir='', **kwargs)[source]#
Execute the adjoint transport model for one sub-simulation period.
Mirrors
forward(): callsmodel.make_auxiliaryand thenmodel.runin adjoint mode. Skipped entirely whenonlyinitisTrue(dry-run initialisation pass).- Parameters:
transform (Plugin) – run_model instance.
datastore (dict) – mutable datastore passed to
model.run.controlvect – unused.
obsvect – unused.
mapper (dict) – transform mapper.
di (datetime) – sub-simulation start date.
df (datetime) – sub-simulation end date.
mode (str) –
'adj'.runsubdir (str) – sub-simulation run directory.
workdir (str) – root working directory.
do_simu (bool) – if
False, skip the model execution.onlyinit (bool) – if
True, return without doing anything.approx_transf (bool) – passed to
model.run.overlap (bool) – passed to
model.run.ref_fwd_dir (str) – passed to
model.run.**kwargs – forwarded to
model.make_auxiliaryandmodel.run.
- pycif.plugins.transforms.system.run_model.forward.forward(transform, datastore, controlvect, obsvect, mapper, di, df, mode, runsubdir, workdir, do_simu=True, onlyinit=False, approx_transf=False, overlap=False, ref_fwd_dir='', **kwargs)[source]#
Execute the transport model for one sub-simulation period.
Calls
model.make_auxiliaryto generate auxiliary input files (e.g. meteorology, boundary conditions) and thenmodel.runto execute the model executable.After a successful run,
transform.model.adj_refdiris updated to point to the run sub-directory so that subsequent adjoint runs can locate the corresponding forward outputs.- Parameters:
transform (Plugin) – run_model instance (carries the
modelsub-plugin).datastore (dict) – mutable datastore passed to
model.run.controlvect – unused.
obsvect – unused.
mapper (dict) – transform mapper (unused directly; passed to
model.make_auxiliary).di (datetime) – sub-simulation start date.
df (datetime) – sub-simulation end date.
mode (str) –
'fwd'or'tl'.runsubdir (str) – sub-simulation run directory.
workdir (str) – root working directory.
do_simu (bool) – if
False, skip the actual model execution (dry-run; auxiliary files are still prepared).onlyinit (bool) – if
True, prepare auxiliary files only and do not run the model.approx_transf (bool) – passed to
model.runfor the approximate operator (parallel mode).overlap (bool) – passed to
model.runfor overlap handling.ref_fwd_dir (str) – path to a reference forward run; passed to
model.run.**kwargs – forwarded to
model.make_auxiliaryandmodel.run.