Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleLoad modules
% module load PrgEnv-cray
% module load fdb            #  may already be loaded
% module use   --append ~openifs/modules  # needed ifthis youcould wantbe toplaced runin OpenIFS with prepIFS and put model results into the archive.
% module use --append ~openifs/modulesyour .bashrc file
% module load openifs

This  module load command will provide the environment for the default version of OpenIFS, which may not be what you want.

...

Code Block
% module avail openifs       #  make sure the module use --append.. command is run first (see above)

--------------------------- /home/rd/openifs/modules ------------------------
openifs/40r1     openifs/43r3      openifs/43r3.fdb (default)

To load different module rather than the default:

...

  • correctly load required packages: perl, python, grib_api, fcm if required.
  • set OpenIFS environment variables: OIFS_CYCLE, OIFS_GRIB_DIR, OIFS_COMP, OIFS_BUILD, OIFS_DATA_DIR
  • optionally possibly set environment suitable for linking against the FDB library (see below) if the FDB module is loadedand load the FDB module (40r1 & 43r3.fdb only).

FDB: field database

The 40r1 and 43r3.fdb module will load the FDB module. This allows OpenIFS to write into MARS via the Field Database (FDB) library.  Once OpenIFS is compiled and linked with FDB, turn on FDB output by setting the LFDB=.true. and NOUTPUT=2 in the namelist file fort.4.

The openifs/43r3.fdb module loads the same modules as used for IFS 43r3 in prepIFS (it makes use of the ifs-support/43R3.7 module).

The openifs/43r3 module does not use the ifs-support module, nor load the FDB module. Instead it will load the modules required for OpenIFS depending on what compiler environment is set. This module is more useful for testing OpenIFS in different compilation environments.

Compiling OpenIFS on HPCF

...

The interactive session will normally last for 48hrs.

Compiling with the Cray compiler

The Cray compiler is recommended to build OpenIFS:

Code Block
languagebash
titleTo compile with the Cray compiler set:
export OIFS_COMP=cce

...


export OFIS_BUILD=opt

If you don't have a copy of the OpenIFS code, retrieve it from the ftp site in the usual way (see User Guide).

You can also download the model from the OpenIFS git repository (called 'StashBitBucket') at ECMWF if you have permission (this is not general access but intended for developers and contributors to OpenIFS).

Code Block
titleHow to retrieve OpenIFS from the git repository & compile on ECMWF Cray
git clone ssh://git@softwaregit@git.ecmwf.int:7999/oifs/oifs40r1.gitoifs43r3.git     # you must have permission to access the OpenIFS repository for this to work
cd oifs40r1oifs43r3v1
git checkout release/v2      v1         # Switches to the version 2 release of OpenIFS at cycle 40r143r3.

export OIFS_HOME=$(pwd)

module load fdb
module use --append ~openifs/modules
module load openifs

oenv          # print out OpenIFS environment variables (alias set by openifs module)
omake         # build model (alias set by openifs module)

To run OpenIFS in place of IFS in a prepIFS experiment

Currently the The instructions below describe how to replace the IFS executable with OpenIFS, though IFS is still compiled and used to prepare the initial data. Only the forecast part of the experiment will use OpenIFS (this will be improved).

To ensure OpenIFS results are archived (written to MARS), it's necessary to link the model against the parallel I/O Field Database 'FDB' library (see above). The module load openifs/43r3.fdb will load the FDB library and set the correct environment variables to disable the dummy FDB code in OpenIFS.

The required changes are simple and made if the FDB module is loaded before the openifs module is loaded (as in the example above). Two environment variables are set before compilation of OpenIFS.

Check the following environment variables are set:

...

...

#  On cca/b, 
#  make fcm ignore the dummy fdb code as we'll link to the real library
% export OIFS_SRC_EXCL=openifs/dummy/dummy_fdb.f90

#  link to FDB library
% export OIFS_EXTRA_LIB="-L/usr/local/apps/fdb/4.6.3/CRAY/82/lib -lifsio"

To turn on 'FDB' output rather than the normal ICM*+* files, set: LFDBOP 'On' in the prepIFS panel 'Main IFS control switches'. This will set LFDB=.true. and NOUTPUT=2 in the namelist NAMCT0.

...

  1. Create experiment as usual, using cycle 40r1 is recommended43r3. Add branch : nagc_CY40R1CY43R3_oifs_run_in_prepifs or merge with other branch first.
  2. Compile OpenIFS as usual manually - the compilation of OpenIFS is not available as a task in suites created by prepIFS.
  3. Create directory: $SCRATCH/oifs_prepifs/<expid>/bin and copy master.exe into it.
  4. Make sure that the directory $SCRATCH/oifs_prepifs and all the subdirectories have read and execute access for all users (mode 755) .e.g. find oifs_prepifs -type d -exec chmod a+rx {} \;
  5. Make sure that the master.exe file has read and execute permission for everyone. e.g. chmod a+rx master.exe.
    These steps are necessary because the job on the Cray runs under a different userid.

...