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#

  • 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 for nvfortran compiler. By default “cc70,cc80”.

  • NETCDF_LIB directory containing the NetCDF library files.

  • NETCDF_INC directory containing the NetCDF include files.

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 latitude dimension. By default 143.

  • Icosahedral grid dimensions:

    • NBP nbp number. By default 80.