LMDZ with regular and dynamico grids LMDZ/reg-ico

LMDZ with regular and dynamico grids LMDZ/reg-ico#

Description#

LMDZ-SACS is an offline tracer transport model, with forward, tangent linear and adjoint codes, derived from the global circulation model (GCM) LMDZ for the regular grid version and from DYNAMICO , the new dynamical core for LMDZ for the unstructured icosahedral grid. The model is coupled with the SACS linear chemistry module.

LMDZ-SACS model documentation

YAML arguments#

The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:

Optional arguments#

autoflush : bool, optional, default True

Clean sub-directories of temporary files

grid : “regular” or “dynamico”, optional, default “regular”

Grid type

  • “regular”: Regular lat-lon grid

  • “dynamico”: Dynamico icosahedral grid

executable : str, optional

Path to Dispersion executable, used if compiling is not required

source_dir : str, optional

Path to Dispersion sources. Must be specified if executable is not provided, or if compiling is required. Defaults to ‘[CIF directory]/model_sources/dispersion’ (correct only if pycif is installed in editable mode).

run_command : str, optional, default “./dispersion.e”

Commnand used to run DISPERSION executable: run_command dispersion.e. By default, the DISPERSION executable will be run with ./dispersion.e This option should be set through a platform self.

modules : list, optional

Modules to be loaded for compiling and running LMDZ, if incompatible with the modules required to run PyCIF. This option should be set through a platform self.

flux_tresol : str, optional, default “1D”

Fluxes time resolution used in the model. Total fluxes will be interpolated to this frequency.

do_physics : bool, optional, default True

Use physics in the model.

do_chemistry : bool, optional, default True

Use SACS linear chemistry in the model.

no_trajectory_file : bool, optional, default False

Do not write ‘trajq_*.bin’ files. WARNING: ‘trajq_*.bin’ files are necessary for the adjoint mode

dump : bool, optional, default False

Dump ‘trajq’ trajectory files as NetCDF files

compiler : “gfortran” or “nvfortran” or “mpif90”, optional, default “nvfortran”

Compiler to use

auto-recompile : bool, optional, default False

Automatically compile LMDZ sources before running if the executable file is not present

force-recompile : bool, optional, default False

Force compilation even if the executable file is not present

compile-clean : bool, optional, default False

Cleaning before compiling by calling make [...] clean

compile-mode : “PROD” or “DEBUG”, optional, default “PROD”

Compilation mode

  • “PROD”: production mode; all optimizations are activated

  • “DEBUG”: debug mode; all optimizations are deactivated, tracebacks and various runtime checks are activated

compile-acc-target : “multicore” or “gpu” or “none”, optional, default “multicore”

Target for ACC annotations

nproc : int, optional

Force using a given number of processors. By default, LMDZ uses all available processors

dont_perturb_species : list, optional

List of species to not perturb in batch sampling

approx_operator : optional

Approximated operator arguments. The approximated operator is used in the “tangent-linear” mode when all the defined thresholds are reached or in “adjoint” mode when the the parallel observation operator is used. The approximated operator operator considers the atmosphere as well mixed (i.e. uniform) and only compute the chemical losses with a simple newton scheme.

Argument structure:
time_step : str, optional

time step for the newton scheme integration

condition : “and” or “or”, optional, default “and”

condition on which the approximated operator replaces the model, either ‘and’ (when all species threshold are met, default) or ‘or’ (when at least one species threshold is met)

species_threshold : optional

Argument structure:
any_key : optional

species name

Argument structure:
threshold : float, mandatory

concentration threshold in ppm

YAML template#

Please find below a template for a YAML configuration:

 1model:
 2  plugin:
 3    name: LMDZ
 4    version: reg-ico
 5    type: model
 6
 7  # Optional arguments
 8  autoflush: XXXXX  # bool
 9  grid: XXXXX  # regular|dynamico
10  executable: XXXXX  # str
11  source_dir: XXXXX  # str
12  run_command: XXXXX  # str
13  modules: XXXXX  # list
14  flux_tresol: XXXXX  # str
15  do_physics: XXXXX  # bool
16  do_chemistry: XXXXX  # bool
17  no_trajectory_file: XXXXX  # bool
18  dump: XXXXX  # bool
19  compiler: XXXXX  # gfortran|nvfortran|mpif90
20  auto-recompile: XXXXX  # bool
21  force-recompile: XXXXX  # bool
22  compile-clean: XXXXX  # bool
23  compile-mode: XXXXX  # PROD|DEBUG
24  compile-acc-target: XXXXX  # multicore|gpu|none
25  nproc: XXXXX  # int
26  dont_perturb_species: XXXXX  # list
27  approx_operator:
28    time_step: XXXXX  # str
29    condition: XXXXX  # and|or
30    species_threshold:
31      any_key:
32        threshold: XXXXX  # float