pycif.plugins.models.chimere_acc — API reference

pycif.plugins.models.chimere_acc — API reference#

Configuration reference: chimere_acc plugin

pycif.plugins.models.chimere_acc.compile.compile(self)[source]#

Compile or copy CHIMERE-ACC executables into the CIF work directory.

Two strategies (tried in order):

  1. Copy from pre-compiled cache — copies fwdchimere.e, tlchimere.e, and achimere.e from self.direxec into {self.workdir}/model/. Skipped if force-recompile is set.

  2. Full recompile — runs make inside the CHIMERE-ACC source tree (self.dirsrc).

Parameters:

self – CHIMERE-ACC model plugin instance with workdir, direxec, and dirsrc set.

pycif.plugins.models.chimere_acc.run.run(self, runsubdir, mode, workdir, ddi, nbproc=1, do_simu=True, approx_transf=False, ref_fwd_dir='', overlap=False, **kwargs)[source]#

Run the CHIMERE model in forward mode

Parameters:
  • self – the model Plugin

  • runsubdir (str) – working directory for the current run

  • mode (str) – forward or backward

  • workdir (str) – pyCIF working directory

  • do_simu (bool) – re-run or not existing simulation

pycif.plugins.models.chimere_acc.io.inputs.make_auxiliary.make_auxiliary(self, ddi, runsubdir, onlyinit=False, do_simu=True, mode='fwd', **kwargs)[source]#

Set up the CHIMERE-ACC (OpenACC GPU) executable and namelist for one sub-period.

Mirrors chimere/io/inputs/make_auxiliary.py: symlinks the correct CHIMERE-ACC binary and writes chimere.nml via make_nml(). Returns immediately when do_simu=False or onlyinit=True.

Parameters:
  • self – CHIMERE-ACC model plugin instance with workdir set.

  • ddi (datetime) – sub-simulation period start.

  • runsubdir (str) – path to the period run directory.

  • onlyinit (bool) – skip if True.

  • do_simu (bool) – skip if False.

  • mode (str) – 'fwd', 'tl', or 'adj'.

  • **kwargs – unused.

pycif.plugins.models.chimere_acc.io.inputs.params.make_nml(self, runsubdir, sdc, mode, ddi)[source]#

Write the Fortran namelist chimere.nml for one CHIMERE-ACC sub-period.

Identical in structure to the regular CHIMERE make_nml: generates the &args namelist controlling the CHIMERE-ACC GPU executable.

Parameters:
  • self – CHIMERE-ACC model plugin instance.

  • runsubdir (str) – path to the period run directory.

  • sdc (str) – period start date formatted as '%Y%m%d%H'.

  • mode (str) – 'fwd', 'tl', or 'adj'.

  • ddi (datetime) – period start datetime.