TM5/std TM5/std#
Description#
Plugin for the TM5 global chemistry-transport model.
TM5 (Two-way nested Tracer Model 5) is an offline global atmospheric chemistry and transport model developed at KNMI and IMAU (Utrecht University). It uses pre-computed meteorological fields (typically ECMWF ERA5) to transport chemical species and supports a two-way nested zoom capability for high-resolution regional studies.
The plugin interfaces TM5 as the forward transport model for tracer inversions within CIF, supporting forward, tangent-linear, and adjoint operator evaluation.
Official resources#
Key references#
Krol et al. (2005) — TM5 model description: The two-way nested global chemistry-transport zoom model TM5: algorithm and applications, Atmos. Chem. Phys., 5, 417–432, doi:10.5194/acp-5-417-2005.
See also TM5 — Tracer Model, version 5.
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 executable and/or sources
- auto_recompile : bool, mandatory
Recompile sources
- make_clean : bool, mandatory
When compiling, do a ‘make clean’ first.
- fc : str, mandatory
Fortran compiler
- linker : str, mandatory
Linker
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
- tracer : str, optional, default “CH4”
The tracer to be used in the inverse modelling.
- nlay : int, optional, default 25
Number of layers in TM5 vertical grid.
- levs : str, optional, default “tropo25a”
Number of layers in TM5 vertical grid.
- eclevs : str, optional, default “ml137”
Number of layers in ECMWF vertical grid.
- projs : list, optional, default [‘base/src/’, ‘proj/levels/ml137/tropo25a/src/’, ‘proj/levels/ml137/src/’, ‘proj/tracer/CH4/src/’]
Copy these projects from the source dir before compilation. Note that the variable tm5_dir must be defined in the yaml config file.
- make_options : str, optional, default “-j4”
Options to pass to make, such as ‘-j n’ to have make run parallel threads.
- makedeps_dir : str, optional, default “”
The path to Makefile_makedeps, a makefile that automatically generates a list of dependencies.
- fflags_gfortran : str, optional, default “-fdefault-real-8 -fdefault-double-8 -ffree-line-length-0 -g1 -O3 -fbacktrace -fcheck=array-temps -fcheck=bounds -fcheck=do -fcheck=pointer -fcheck=recursion -fallow-argument-mismatch -I/usr/local/gfortran/include “
Compiler flags for gfortran. Note that openmp only works for ifort, but that ifort is not yet supported for compiling TM5 in CIF.
- ldflags_gfortran : str, optional, default “-Wl,-rpath=/usr/local/gfortran/lib -Wl,-rpath=/usr/local/gfortran/include -L/usr/local/gfortran/lib -l:libmfhdf.a -l:libdf.a -ljpeg -lz -lsz -L/usr/local/gfortran/lib -lhdf5_hl -lhdf5hl_fortran -lhdf5 -lhdf5_fortran -L/usr/local/gfortran/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5hl_fortran -lhdf5_fortran -lhdf5 -lz -lm -lsz -L/usr/local/gfortran/lib -llapack -lblas “
Linker flags for gfortran.
- fflags_ifort : str, optional, default “-traceback -warn errors -warn declarations -qopenmp -r8 -O3 -I/hpc/sw/netcdf-fortran-4.4.2-intel-seq/include -I/hpc/sw/hdf-4.2.9-intel-seq/include -I/hpc/sw/szip-2.1-intel/include -mkl=sequential “
Compiler flags for ifort. Note that compiling TM5 with ifort is not yet supported in CIF.
- ldflags_ifort : str, optional, default “-qopenmp -L/hpc/sw/netcdf-fortran-4.4.2-intel-seq/lib -lnetcdff -Wl,-rpath -Wl,/hpc/sw/netcdf-fortran-4.4.2-intel-seq/lib -L/hpc/sw/netcdf-4.3.1.1-intel-seq/lib -lnetcdf -Wl,-rpath -Wl,/hpc/sw/netcdf-4.3.1.1-intel-seq/lib -L/hpc/sw/hdf-4.2.9-intel-seq/lib -lmfhdf -ldf -L/hpc/sw/szip-2.1-intel/lib -lsz -ljpeg -lz -L/opt/intel/composer_xe_2015.0.090/mkl/lib/intel64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl -Wl,-rpath -Wl,/opt/intel/composer_xe_2015.0.090/mkl/lib/intel64 “
Linker flags for ifort.
- meteo_macros : list, optional, default [‘with_tmm_tm5’]
Meteo macro’s (my.tmm.define in tmvar-tm5-build.rc)
- model_macros : list, optional, default [‘slopes’, ‘with_budgets’, ‘without_wet_deposition’, ‘without_photolysis’, ‘without_dry_deposition’, ‘with_convdiff’, ‘with_lapack’]
Model macro’s. When compiling with ifort, use with_mkl, else with_lapack.
- mdf_macros : list, optional, default [‘with_hdf4’, ‘with_netcdf4’]
Datafile macro’s
- optim_emis_type : int, optional, default 3
Type of variable to be optimized for emissions
- TCCON_FTS_list : str, optional
path to a station list for TCCON sites; this may disappear in the future
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 |
dummy |
std |
|
chemistry |
False |
False |
TM5 |
SINK-TIPP |
|
flux |
True |
False |
TM5 |
std |
|
meteo |
True |
False |
TM5 |
std |
|
inicond |
True |
False |
TM5 |
ic |
YAML template#
Please find below a template for a YAML configuration:
1model:
2 plugin:
3 name: TM5
4 version: std
5 type: model
6
7 # Mandatory arguments
8 direxec: XXXXX # str
9 auto_recompile: XXXXX # bool
10 make_clean: XXXXX # bool
11 fc: XXXXX # str
12 linker: XXXXX # str
13
14 # Optional arguments
15 autoflush: XXXXX # bool
16 ensrf_restart_file: XXXXX # str
17 ensrf_datei: XXXXX # str
18 ensrf_same_restart: XXXXX # bool
19 tracer: XXXXX # str
20 nlay: XXXXX # int
21 levs: XXXXX # str
22 eclevs: XXXXX # str
23 projs: XXXXX # list
24 make_options: XXXXX # str
25 makedeps_dir: XXXXX # str
26 fflags_gfortran: XXXXX # str
27 ldflags_gfortran: XXXXX # str
28 fflags_ifort: XXXXX # str
29 ldflags_ifort: XXXXX # str
30 meteo_macros: XXXXX # list
31 model_macros: XXXXX # list
32 mdf_macros: XXXXX # list
33 optim_emis_type: XXXXX # int
34 TCCON_FTS_list: XXXXX # str
See also