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

ensrf_restart_file : str, optional

Use in EnSRF mode to point at relevant restart file

ensrf_datei : str, optional

New start date to use in EnSRF

ensrf_same_restart : bool, optional

Use in EnSRF mode to check if same restart

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_chemical_sink : bool, optional, default False

Write tracers chemical and tracers lifetime sink in NetCDF files.

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-acc

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  ensrf_restart_file: XXXXX  # str
13  ensrf_datei: XXXXX  # str
14  ensrf_same_restart: XXXXX  # bool
15  run_command: XXXXX  # str
16  dir_sources: XXXXX  # str
17  modules: XXXXX  # list
18  periods: XXXXX  # str
19  flx_tresol: XXXXX  # str
20  physic: XXXXX  # bool
21  compressed_phystoke: XXXXX  # bool
22  no_trajq: XXXXX  # bool
23  dump_chemical_sink: XXXXX  # bool
24  dump: XXXXX  # bool
25  do_chemistry: XXXXX  # bool
26  approx_operator:
27    time_step: XXXXX  # str
28    condition: XXXXX  # and|or
29    species_threshold:
30      any_key:
31        threshold: XXXXX  # float
32  compiler: XXXXX  # gfortran|mpif90|nvfortran
33  auto-recompile: XXXXX  # bool
34  force-recompile: XXXXX  # bool
35  force-compile-stderr: XXXXX  # bool
36  compile-clean: XXXXX  # bool
37  compile-mode: XXXXX  # PROD|DEBUG
38  compile-acc-target: XXXXX  # multicore|gpu|none
39  nproc: XXXXX  # int
40  dont_perturb_species: XXXXX  # list
41  copy_inputs: XXXXX  # any subset of ['meteo', 'prescrconcs', 'prodloss3d', 'kinetic']