Difference between revisions of "The makelmdz fcm GCM Compilation Script"
Line 43: | Line 43: | ||
exec : executable to build | exec : executable to build | ||
</pre> | </pre> | ||
− | Note that some options are meaningless for the Generic GCM. This is due to the fact that we try to coordinates tools like '''makelmdz_fcm''' between different physics packages | + | Note that some options are meaningless for the Generic GCM. This is due to the fact that we try to coordinates tools like '''makelmdz_fcm''' between different physics packages. |
The only mandatory argument are '''-arch''' and '''exec''', but in practice you'll need to specify many more (as defaults rarely suit all needs) | The only mandatory argument are '''-arch''' and '''exec''', but in practice you'll need to specify many more (as defaults rarely suit all needs) | ||
Line 52: | Line 52: | ||
If compiling one of the 1D models, then only the number of layers (llm) needs be specified, e.g. <code>-d 78</code>. | If compiling one of the 1D models, then only the number of layers (llm) needs be specified, e.g. <code>-d 78</code>. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<pre>-prod / -dev / -debug</pre> | <pre>-prod / -dev / -debug</pre> | ||
Line 81: | Line 72: | ||
<pre>-full</pre> | <pre>-full</pre> | ||
Impose a full cleanup (i.e. removing past object and library files) to ensure recompiling the model from scratch. | Impose a full cleanup (i.e. removing past object and library files) to ensure recompiling the model from scratch. | ||
+ | |||
+ | == Details of some specific makelmdz_fcm options == | ||
+ | One chooses which physics package will be used using the | ||
+ | <pre>-p arg</pre> | ||
+ | option, where <code>arg</code> implies that the corresponding code will be found in '''LMDZ.COMMON/libf/phyarg''' and optionally also in '''LMDZ.COMMON/libf/aeronoarg'''. In practice these are just links to the package '''LMDZ.ARG/libf/phyarg''' and '''LMDZ.ARG/libf/aeronoarg''' (see [[LMDZ.COMMON directory layout and contents]], [[LMDZ.GENERIC directory layout and contents]], etc.). | ||
+ | |||
+ | === Generic model specific options === | ||
+ | To compile with the Generic physics package, the adequate argument to <code>-p</code> is <code>std</code>, i.e. corresponding code will be found in '''LMDZ.COMMON/libf/phystd''' and '''LMDZ.COMMON/libf/aeronostd''', which are simply links to '''LMDZ.GENERIC/libf/phystd''' and '''LMDZ.GENERIC/libf/aeronostd''': | ||
+ | <pre>-p std</pre> | ||
+ | |||
+ | Additional options one must provide when compiling with the Generic physics include: | ||
+ | <pre>-b IRxVIS</pre> | ||
+ | Number of bands in the InfraRed and Visible for the radiative transfer. Note that this requires that the corresponding appropriate input files are available (at run time). | ||
+ | |||
+ | <pre>-s nscat</pre> | ||
+ | Number of radiatively active scatterers | ||
+ | |||
+ | === Mars model specific options === | ||
+ | To compile with the Mars physics package, the adequate argument to <code>-p</code> is <code>mars</code>, i.e. corresponding code will be found in '''LMDZ.COMMON/libf/phymars''' and '''LMDZ.COMMON/libf/aeronomars''', which are simply links to '''LMDZ.MARS/libf/phymars''' and '''LMDZ.MARS/libf/aeronomars''': | ||
+ | <pre>-p mars</pre> | ||
+ | |||
+ | === Venus model specific options === | ||
+ | To compile with the Venus physics package, the adequate argument to <code>-p</code> is <code>mars</code>, i.e. corresponding code will be found in '''LMDZ.COMMON/libf/phyvenus''', which is simply a link to '''LMDZ.VENUS/libf/phyvenus''': | ||
+ | <pre>-p venus</pre> | ||
+ | |||
[[Category:Generic-Model]] | [[Category:Generic-Model]] |
Revision as of 07:48, 17 April 2023
Contents
Overview
The makelmdz_fcm script is the (bash) script (located in LMDZ.COMMON directory) to use to compile the GCM. It is based on FCM and should be run, with various options (e.g which physics package to compile the model with, what grid resolution to use, etc.) to generate the sought executable.
makelmdz_fcm options
To list available options, run "makelmdz_fcm -h", which should return something like:
Usage : makelmdz_fcm [options] -arch arch_name exec [-h] : brief help [-d [[IMx]JMx]LM] : IM, JM, LM are the dimensions in x, y, z (default: 96x72x19) [-s nscat] : (Generic) Number of radiatively active scatterers [-b IRxVIS] : (Generic) Number of infrared (IR) and visible (VIS) bands for radiative transfer [-p PHYS] : set of physical parametrizations (in libf/phyPHYS), (default: lmd) [-prod / -dev / -debug] : compilation mode production (default) / developement / debug . [-c false/MPI1/OMCT] : (Earth) coupling with ocean model : MPI1/OMCT/false (default: false) [-v false/orchidee2.0/orchidee1.9/true] : (Earth) version of the vegetation model to include (default: false) false : no vegetation model orchidee2.0 : compile using ORCHIDEE 2.0 (or more recent version) orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6 true : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6 [-chimie INCA/false] : (Earth) with INCA chemistry model or without (default: false) [-cosp true/false] : (Earth) add the cosp model (default: false) [-sisvat true/false] : (Earth) compile with/without sisvat package (default: false) [-rrtm true/false] : (Earth) compile with/without rrtm package (default: false) [-dust true/false] : (Earth) compile with/without the dust package by Boucher and co (default: false) [-strataer true/false] : (Earth) compile with/without the strat aer package by Boucher and co (default: false) [-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp [-g GRI] : grid configuration in dyn3d/GRI_xy.h (default: reg, inclues a zoom) [-io ioipsl/mix/xios] : Input/Output library (default: ioipsl) [-include INCLUDES] : extra include path to add [-cpp CPP_KEY] : additional preprocessing definitions [-adjnt] : adjoint model, not operational ... [-mem] : reduced memory dynamics (if in parallel mode) [-filtre NOMFILTRE] : use filtre from libf/NOMFILTRE (default: filtrez) [-link LINKS] : additional links with other libraries [-j n] : active parallel compiling on ntask [-full] : full (re-)compilation (from scratch) [-libphy] : only compile physics package (no dynamics or main program) [-fcm_path path] : path to the fcm tool (default: tools/fcm/bin) [-ext_src path] : path to an additional set of routines to compile with the model [-arch_path path] : path to architecture files (default: arch) -arch arch : target architecture exec : executable to build
Note that some options are meaningless for the Generic GCM. This is due to the fact that we try to coordinates tools like makelmdz_fcm between different physics packages.
The only mandatory argument are -arch and exec, but in practice you'll need to specify many more (as defaults rarely suit all needs)
Details of main makelmdz_fcm options
-d IMxJMxLM
As the default is to run on a fixed longitude-latitude grid (set when compiling), option "-d" is necessary to specify the number of grid points iimxjjmxlllm (actually iim is the number of intervals along longitude, jjm is the number of intervals along latitude and llm the number of atmospheric layers).
If compiling one of the 1D models, then only the number of layers (llm) needs be specified, e.g. -d 78
.
-prod / -dev / -debug
Compilation mode. Default is -prod
, i.e. "production" mode, where compiler optimization are on (as defined in the arch files; see The_Target_Architecture_("arch")_Files for details). When checking/debugging you definitely want to set -debug
-j n
With this option one can speed up compilation by letting make
compile simultaneously (and if possible) up to n
routines in parallel (note that this "parallel compilation" has nothing to do with the code being compiled for serial or parallel use as specified via option -parallel ...
). In practice using -j 8
or -j 4
works well.
-parallel none/mpi/omp/mpi_omp
This option is to specify whether the model should be compiled in serial mode (default) or in parallel using MPI (mpi
) only, or using OpenMP (omp
) only, or both MPI and OpenMP (mpi_omp
).
In practice, one most often needs to run in parallel and using both MPI and OpenMP, so -parallel mpi_omp
is advised.
-io ioipsl/noioipsl/mix/xios
This option specifies which IO (Input/Output) library is going to be used by the model. Default is -io ioipsl
, which is becoming depreciated for the GCM but mandatory for the 1D model. Note that when compiling with XIOS: -io xios
on still needs to also use the IOIPSL library (which handles the reading of the run.def and companion files). It is also possible to compile without the IOISPL or XIOS libraries by specifying -io noioipsl
(using an internal version of the getin() function from reading the *.def files; not recommended, but might help if building IOIPSL is a problem).
-libphy
With this option, only the physics package is compiled (the longitude-latitude dynamics routines are excluded) as a library, and no main program is generated. Building this library is a mandatory step to run with other dynamical cores like DYNAMICO or WRF.
-full
Impose a full cleanup (i.e. removing past object and library files) to ensure recompiling the model from scratch.
Details of some specific makelmdz_fcm options
One chooses which physics package will be used using the
-p arg
option, where arg
implies that the corresponding code will be found in LMDZ.COMMON/libf/phyarg and optionally also in LMDZ.COMMON/libf/aeronoarg. In practice these are just links to the package LMDZ.ARG/libf/phyarg and LMDZ.ARG/libf/aeronoarg (see LMDZ.COMMON directory layout and contents, LMDZ.GENERIC directory layout and contents, etc.).
Generic model specific options
To compile with the Generic physics package, the adequate argument to -p
is std
, i.e. corresponding code will be found in LMDZ.COMMON/libf/phystd and LMDZ.COMMON/libf/aeronostd, which are simply links to LMDZ.GENERIC/libf/phystd and LMDZ.GENERIC/libf/aeronostd:
-p std
Additional options one must provide when compiling with the Generic physics include:
-b IRxVIS
Number of bands in the InfraRed and Visible for the radiative transfer. Note that this requires that the corresponding appropriate input files are available (at run time).
-s nscat
Number of radiatively active scatterers
Mars model specific options
To compile with the Mars physics package, the adequate argument to -p
is mars
, i.e. corresponding code will be found in LMDZ.COMMON/libf/phymars and LMDZ.COMMON/libf/aeronomars, which are simply links to LMDZ.MARS/libf/phymars and LMDZ.MARS/libf/aeronomars:
-p mars
Venus model specific options
To compile with the Venus physics package, the adequate argument to -p
is mars
, i.e. corresponding code will be found in LMDZ.COMMON/libf/phyvenus, which is simply a link to LMDZ.VENUS/libf/phyvenus:
-p venus