Compilation#
LMDZ-SACS is always compiled with a fixed grid (type and dimensions). To use different grids type/resolution LMDZ-SACS need to compiled once per grid type/resolution.
How to compile#
LMDZ-SACS can be compiled by running the makfile in its sources directory model_sources/dispersion/
.
Here are some example commands to compile LMDZ-SACS for use on GPU with NVIDIA’s compiler nvfortran
.
Regular lat-lon grid:
make -j FC=nvfortran TARGET=gpu GRID=regular NLON=96 NLAT=96 NLEV=39 clean
make -j FC=nvfortran TARGET=gpu GRID=regular NLON=96 NLAT=96 NLEV=39
Icosahedral grid dimensions:
make -j FC=nvfortran TARGET=gpu GRID=dynamico NBP=80 NLEV=79 clean
make -j FC=nvfortran TARGET=gpu GRID=dynamico NBP=80 NLEV=79
Two identical executable files are produced by the makefile:
dispersion.e
: a file with simple name to use immediatly or never.dispersion_[FC]_[TARGET]_[DIMS].e
: a file with complete name to use whenever.
Note
While LMDZ-SACS can be compiled manually, it is recommended to les CIF compile it for you. By doing that you will be sure the LMDZ-SACS executable used by CIF is compiled with appropriate grid, dimensions and more importantly with appropriate platform specific options.
All the arguments for make
command#
Compiler options#
FC
fortran compiler, “gfortran” or “nvfortran”. By default “nvfortran”.MODE
compilation mode, “PROD” (production) or “DEBUG” (debugging). By default “PROD”.TARGET
OpenACC target device, “gpu” or “multicore”. By default “multicore”.CC
Device compute capability option fornvfortran
compiler. By default “cc70,cc80”.NETCDF_LIB
directory containing the NetCDF library.NETCDF_INC
directory containing the NetCDF include.
Grid options#
GRID
grid type, “regular” (Regular lat-lon) or “dynamico” (icosahedral). By default “regular”.NLEV
vertical dimension. By default 79.Regular lat-lon grid dimensions:
NLON
longitude dimension. By default 144.NLAT
longitude dimension. By default 143.
Icosahedral grid dimensions:
NBP
nbp number. By default 80.