Compilation#
LMDZ-SACS is always compiled with a fixed grid (type and dimensions). To use different grids type/resolution LMDZ-SACS need to be compiled once per grid type and resolution.
How to compile#
LMDZ-SACS can be compiled by running the makefile 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 a simple name to use immediatly or never.dispersion_[FC]_[TARGET]_[DIMS].e: a file with a complete name to use whenever.
Note
While LMDZ-SACS can be compiled manually, it is recommended to let CIF compile it for you. By doing that you will be sure the LMDZ-SACS executable used by CIF is compiled with the appropriate grid type, dimensions and more importantly with the appropriate platform specific options.
All the arguments for make command#
Compiler options#
FCfortran compiler, “gfortran” or “nvfortran”. By default “nvfortran”.MODEcompilation mode, “PROD” (production) or “DEBUG” (debugging). By default “PROD”.TARGETOpenACC target device, “gpu” or “multicore”. By default “multicore”.CCDevice compute capability option fornvfortrancompiler. By default “cc70,cc80”.NETCDF_LIBdirectory containing the NetCDF library files.NETCDF_INCdirectory containing the NetCDF include files.
Grid options#
GRIDgrid type, “regular” (regular lat-lon) or “dynamico” (icosahedral). By default “regular”.NLEVvertical dimension. By default 79.Regular lat-lon grid dimensions:
NLONlongitude dimension. By default 144.NLATlatitude dimension. By default 143.
Icosahedral grid dimensions:
NBPnbp number. By default 80.