LMDz with OpenACC annotations LMDZ/acc#

Description#

This is the plugin to run the model LMDZ. Please see further details on LMDZ itself here

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:

Mandatory arguments#

fileexec : str, mandatory

path to DISPERSION executable

Optional arguments#

autoflush : bool, optional, default True

Clean sub-directories of temporary files (mod.bin, etc.)

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 :bash:`./dispersion.e

dir_sources : str, optional, default “”

Path to DISPERSION sources. Overwrites fileexec if specified.

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 plugin.

periods : str, optional, default “1MS”

Frequency for sub-simulations

flx_tresol : str, optional, default “1D”

Expected time step between flux values in the executable

physic : bool, optional, default True

Use physics in LMDZ

compressed_phystoke : bool, optional, default True

Use compressed phystoke files

no_trajq : 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 as netCDF

do_chemistry : bool, optional, default True

Use the chemistry

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

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

Compiler to use

auto-recompile : bool, optional, default False

Auto-compile executables before running if executables not available

force-recompile : bool, optional, default False

Force compilation even if executables available

force-compile-stderr : bool, optional, default False

Force printing what happened during compiling

compile-clean : bool, optional, default False

Cleaning repositories before compiling; slows the compilation but prevent side-effects from re-compiling.Can be switched of for minor modifications in the code

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

Compilation mode

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

  • “DEBUG”: check-all and traceback are activated, hence slowing down the execution

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

copy_inputs : “any subset of [‘meteo’, ‘prescrconcs’, ‘prodloss3d’, ‘kinetic’]”, optional, default []

Copy (rather creating symbolic links) the input files

Requirements#

The current plugin requires the present plugins to run properly:

Requirement name

Requirement type

Explicit definition

Any valid

Default name

Default version

domain

Domain

False

False

LMDZ

std

flux

DataStream

True

False

LMDZ

sflx

chemistry

Chemistry

False

False

CHIMERE

gasJtab

emis_species

DataStream

True

False

LMDZ

bin

meteo

DataStream

True

False

LMDZ

mass-fluxes

inicond

DataStream

True

False

LMDZ

ic

prescrconcs

DataStream

True

False

LMDZ

prescrconcs

kinetic

DataStream

True

False

LMDZ

photochem

prodloss3d

DataStream

True

False

LMDZ

prodloss3d

YAML template#

Please find below a template for a YAML configuration:

 1model:
 2  plugin:
 3    name: LMDZ
 4    version: acc
 5    type: model
 6
 7  # Mandatory arguments
 8  fileexec: XXXXX  # str
 9
10  # Optional arguments
11  autoflush: XXXXX  # bool
12  run_command: XXXXX  # str
13  dir_sources: XXXXX  # str
14  modules: XXXXX  # list
15  periods: XXXXX  # str
16  flx_tresol: XXXXX  # str
17  physic: XXXXX  # bool
18  compressed_phystoke: XXXXX  # bool
19  no_trajq: XXXXX  # bool
20  dump: XXXXX  # bool
21  do_chemistry: XXXXX  # bool
22  approx_operator:
23    time_step: XXXXX  # str
24    condition: XXXXX  # and|or
25    species_threshold:
26      any_key:
27        threshold: XXXXX  # float
28  compiler: XXXXX  # gfortran|mpif90|nvfortran
29  auto-recompile: XXXXX  # bool
30  force-recompile: XXXXX  # bool
31  force-compile-stderr: XXXXX  # bool
32  compile-clean: XXXXX  # bool
33  compile-mode: XXXXX  # PROD|DEBUG
34  compile-acc-target: XXXXX  # multicore|gpu|none
35  nproc: XXXXX  # int
36  dont_perturb_species: XXXXX  # list
37  copy_inputs: XXXXX  # any subset of ['meteo', 'prescrconcs', 'prodloss3d', 'kinetic']