Project

General

Profile

Building the model

Quick recipe

ICON (and ICON-HAM) uses the GNU configure utility, so that in principle you can get a working model version simply by typing:

  cd [name of your working copy]
  cd icon
  ./configure --with-fortran=[some fortran compiler] --enable-jsbach --with-hammoz  

The latter flag --with-hammoz will enable the configuration and later compiling of the HAMMOZ code parts inside ICON.

Then, compile your code NOT as usual with make but by using the build utility:

./build_command 

This may however require a few more intermediate steps.

You may check if there is already a platform-specific page for your machine, this may spare you to try to find out by yourself. In case this page does not exists, you are very welcome to create it, to share your model build findings with the other users of your machine.

Dependencies

GRIP-API, NetCDF4, HDF5, SZIP, ZLIB, and XML2 are compulsory libraries. They must be installed on your system.

Programming environment and dependencies

Depending on your system, you may have to load a given module to get access to a relevant compiler for your platform and to the required libraries e.g.:

module load intel
module load netCDF
...

Please contact the system administrator of your machine for specific details.

Configuring

You may have to review the file config/mh-[architecture] corresponding to your platform architecture, and edit it in order to set the paths to:

  • compulsory:
    • the netcdf library (NETCDFROOT)
    • the HDF5 library (HDF5ROOT)
    • the SZIP library (SZIPROOT)
    • the ZLIBROOT (ZLIBROOT)
    • the Grib-API library (GRIBAPIROOT)
    • the XML2 library (XML2ROOT)
  • optional:
    • the MPI library (MPIROOT)

You might also have to fine-tune the compiling options relative to your compiler, but this should normally not be necessary.

Depending on your platform, you may have to run the configure command with explicit reference to one or more libraries:

./configure --enable-jsbach --with-hammoz --with-mpi=XXX --with-netcdf=XXX, etc..

If several compilers are available on your platform, you may select one with using option --with-fortran=XXX, e.g.:

./configure --enable-jsbach --with-hammoz --with-fortran=nag

Once you have successully configured the model, you will obtain a newly created Makefile.

Compiling the code

Important! Do not use a simple make command here.

./build_command

This creates an executable named icon in build/[name of target platform]/bin/.

Next step: Downloading the input files