pycif.plugins.transforms.system.run_model — API reference

Contents

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(): calls model.make_auxiliary and then model.run in adjoint mode. Skipped entirely when onlyinit is True (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_auxiliary and model.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_auxiliary to generate auxiliary input files (e.g. meteorology, boundary conditions) and then model.run to execute the model executable.

After a successful run, transform.model.adj_refdir is 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 model sub-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.run for the approximate operator (parallel mode).

  • overlap (bool) – passed to model.run for overlap handling.

  • ref_fwd_dir (str) – path to a reference forward run; passed to model.run.

  • **kwargs – forwarded to model.make_auxiliary and model.run.