CHIMERE with OpenACC annotations CHIMERE/acc#
Description#
This is the plugin to run the CTM CHIMERE. Please see further details on the CTM 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#
- direxec : str, mandatory
Path to CHIMERE sources and/or executables. For executables,
fwdchimere.e,tlchimere.eandachimere.eshould be in${path}/src,${path}/src_tland${path}/src_adrespective sub-folders.
- nphour_ref : int, mandatory
Number of physical steps per hour. 6 is well tested for regional cases.
- ichemstep : int, mandatory
Number of chemical refined iterations, i.e., refined time steps relative to physical time steps. Down to 1/4 degree resolution, phys=6 and step=1 is fine; For finer grids (5-10 kms), take at least step=4; For grids of 2-5 kms, try step=6 or more.
- ideepconv : 0 or 1 or 2, mandatory
Computation of the deep convection.
0: No deep convection
1: Select deep convection automatically according to resolution, deep conv fluxes from Tiedtke
2: Select deep convection automatically according to resolution, deep conv fluxes from meteorological data
- nivout : int, mandatory
Number of vertical layers in output files.
- nlevemis : int, mandatory
Number of levels for emissions. Applies to AEMISSION files.
Optional arguments#
- autoflush : bool, optional, default False
Cleans big temporary files when the simulation is done. Triggers the function
flushrunof the model if available
- 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
- dir_sources : str, optional, default “”
Path to CHIMERE sources. Overwrites direxec if specified.
- periods : str, optional, default “1D”
Length of sub-simulations periods. Use Pandas frequency strings
- ihoursu : int, optional, default 0
Number of spin-up hours.
- useemisb : bool, optional, default False
Include biogenic emissions, i.e. the file BEMISSIONS.nc
- dumpnctype : “double” or “float”, optional, default “float”
Precision for the output NetCDF files. Do not impact the values in mod.txt
“double”: double precision: needed if precise post-processing of output files
“float”: float precision: save some disk space
- nc4type : bool, optional, default True
Use NetCDF4 or not (NetCDF3 classic)
- dumpncoutput : bool, optional, default True
Dump outputs into a NetCDF file.
- dumpncpar : bool, optional, default False
Dump parameters into a NetCDF file.
- usechemistry : 0 or 1, optional, default 0
Use chemistry.
- useemissions : 0 or 1, optional, default 1
Use emisions.
- usetransmix : 0 or 1, optional, default 1
Use transport and mixing.
- usewetdepos : 0 or 1, optional, default 0
Use wet deposition.
- usedepos : 0 or 1, optional, default 0
Use dry deposition.
- nsavedepos : int, optional, default 4
Save deposition in NetCDF file every … hours.
- nitgs : 1 or 2, optional, default 1
Number of Gauss-Seidel iterations in the TWOSTEP solver.
1: for model testing, and when using the adjoint
2: for better accuracy
- nitgssu : 1 or 2, optional, default 1
Same during spin-up
1: for model testing, and when using the adjoint
2: for better accuracy
- useabsclipconc : 0 or 1, optional, default 0
Clip small (in absolute value) concentrations when = 1; clip small (including all negative) concentrations when = 0. Warning: the clipping is done in twostep, not only when writing the output writing; thus, clipping must be used with care as it can alter the mass conservationsee CHIMERE doc for more information on the use of clipconc
- clipconc : float, optional, default 1
Clipping concentration (in molecule/cm3)
- ntyperate : int, optional, default 50
Max number of reaction types
- nvegtype : int, optional, default 16
Number of vegetation types
- nlduse : int, optional, default 9
Max number of landuse classes
- nparammax : int, optional, default 30
Max number of output parameters
- hpulse : int, optional, default 0
Hour of emission pulse. All emissions before this hour from the beginning of the simulations are ignored, and all transport/chemistry computations are skipped.To be used when computing response functions from a given hour
- 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
- optimization-mode : “PROD” or “DEBUG”, optional, default “PROD”
Optimization option
“PROD”: production mode; all optimizations are activated
“DEBUG”: check-all and traceback are activated, hence slowing down the execution
- compile-clean : bool, optional, default True
Cleaning repositories before compiling; slows the compilation but prevent side-effects from re-compiling.Can be switched of for minor modifications in the code
- monitor : bool, optional, default False
Sets NVCOMPILER_ACC_TIME=1, allowing GPU basic profiling
- gpu-mode : “gpu” or “multicore” or “seq”, optional, default “gpu”
Compiling option for NVIDIA
“gpu”: Full GPU optimization
“multicore”: NVIDIA ACC optimization for CPUs
“seq”: Disabling all parallelization
- compiler : “nvfortran” or “gfortran”, optional, default “nvfortran”
Compiler used for Fortran ACC
“nvfortran”: NVIDIA Fortran compiler
“gfortran”: gfortran compiler
- compile-only : list, optional, default [‘A’, ‘L’, ‘D’]
Compile only part of the available CHIMERE modes (tangent-linear, forward and adjoint)
- force-compile-stderr : bool, optional, default False
Force printing stderr from compiling (even when executable correctly generated after compiling)
- nlevemis_bio : int, optional, default 1
Number of vertical levels in biogenic emissions (BEMISSIONS.nc)
- nproc : int, optional
Force using a given number of processors. By default, CIMERE GPU uses all available processors
- ignore_input_dates : bool, optional, default False
Forces CHIMERE to by-pass the checks on the consistency of dates in AEMISSIONS, BEMISSIONS, BOUN_CONCS, INI_COCNS and METEO; useful to use input files from another periodwithout duplicating them only for the dates.
- useRAMonly : bool, optional, default False
Force relying on the RAM only, instead of TMP files, to save forward simulations necessary for the adjoint. This trades I/O burden with TMP files with RAM burden
Warning
This option can use a LOT of RAM. Please test the option on a simple case and compare with a case using TMP files. Depending on your cluster and your test case, choose the fastest one.
- force_clean_run : bool, optional, default False
Clean run subdirectory just after running to limit disk space usage
- stopORmore : list, optional, default []
To avoid running simulations for which the simulated concentrations are smaller than a given thresholdfor a set of species; please provide a list of tuples (species,threshold) (species is from ACTIVE_SPECIES and treshold in XXUNITXX
- pre-computed-meteo : bool, optional, default True
Simplified METEO mapper when the meteo is already computed. Set to False if using diagmet transform
- keep_log_stderr : bool, optional, default False
Redirect the standard error from chimere.e to prof.log (particularly useful for checking time in ACC)
Requirements#
The current plugin requires the present plugins to run properly:
Requirement name |
Requirement type |
Explicit definition |
Any valid |
Default name |
Default version |
|---|---|---|---|---|---|
domain |
False |
False |
CHIMERE |
std |
|
chemistry |
False |
False |
CHIMERE |
gasJtab |
|
flux |
True |
False |
CHIMERE |
AEMISSIONS |
|
bioflux |
True |
False |
CHIMERE |
AEMISSIONS |
|
meteo |
True |
False |
CHIMERE |
std |
|
latcond |
True |
False |
CHIMERE |
icbc |
|
topcond |
True |
False |
CHIMERE |
icbc |
|
inicond |
True |
False |
CHIMERE |
icbc |
YAML template#
Please find below a template for a YAML configuration:
1model:
2 plugin:
3 name: CHIMERE
4 version: acc
5 type: model
6
7 # Mandatory arguments
8 direxec: XXXXX # str
9 nphour_ref: XXXXX # int
10 ichemstep: XXXXX # int
11 ideepconv: XXXXX # 0|1|2
12 nivout: XXXXX # int
13 nlevemis: XXXXX # int
14
15 # Optional arguments
16 autoflush: XXXXX # bool
17 ensrf_restart_file: XXXXX # str
18 ensrf_datei: XXXXX # str
19 ensrf_same_restart: XXXXX # bool
20 dir_sources: XXXXX # str
21 periods: XXXXX # str
22 ihoursu: XXXXX # int
23 useemisb: XXXXX # bool
24 dumpnctype: XXXXX # double|float
25 nc4type: XXXXX # bool
26 dumpncoutput: XXXXX # bool
27 dumpncpar: XXXXX # bool
28 usechemistry: XXXXX # 0|1
29 useemissions: XXXXX # 0|1
30 usetransmix: XXXXX # 0|1
31 usewetdepos: XXXXX # 0|1
32 usedepos: XXXXX # 0|1
33 nsavedepos: XXXXX # int
34 nitgs: XXXXX # 1|2
35 nitgssu: XXXXX # 1|2
36 useabsclipconc: XXXXX # 0|1
37 clipconc: XXXXX # float
38 ntyperate: XXXXX # int
39 nvegtype: XXXXX # int
40 nlduse: XXXXX # int
41 nparammax: XXXXX # int
42 hpulse: XXXXX # int
43 auto-recompile: XXXXX # bool
44 force-recompile: XXXXX # bool
45 optimization-mode: XXXXX # PROD|DEBUG
46 compile-clean: XXXXX # bool
47 monitor: XXXXX # bool
48 gpu-mode: XXXXX # gpu|multicore|seq
49 compiler: XXXXX # nvfortran|gfortran
50 compile-only: XXXXX # list
51 force-compile-stderr: XXXXX # bool
52 nlevemis_bio: XXXXX # int
53 nproc: XXXXX # int
54 ignore_input_dates: XXXXX # bool
55 useRAMonly: XXXXX # bool
56 force_clean_run: XXXXX # bool
57 stopORmore: XXXXX # list
58 pre-computed-meteo: XXXXX # bool
59 keep_log_stderr: XXXXX # bool
See also