You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 38 Next »


This page describes the required steps to use OpenIFS/AC "v2ac-rc" on the ECMWF HPCF.

OpenIFS/AC compared to the standard OpenIFS model

OpenIFS/AC consists of the standard OpenIFS model and the additional composition software package. Both components together are referred to as OpenIFS/AC (with AC standing for "atmospheric composition"). 

The standard OpenIFS model is described in detail in the OpenIFS User Guide. The user guide introduces the model's components and supported model grids. It informs about additional required software packages and how to build the OpenIFS model. It further describes how to carry out an acceptance test after a successful model build in order to verify the model's functionality.

Users who are new to OpenIFS should first read the OpenIFS User Guide's sections 1 to 5 before proceeding with OpenIFS/AC, as the steps described therein are required for building OpenIFS/AC. The instructions in the user guide will not be repeated here.

Additional model sources

In the standard OpenIFS model the source code for atmospheric composition (atmospheric chemistry and aerosol code) has been replaced by dummy routines. The additional model sources for OpenIFS/AC replace these dummy routines and substitute the full composition source code. It is therefore necessary to rebuild the model executable after adding the additional model source code. This process is described further below.

Additional data packages

In order to run OpenIFS with atmospheric composition a substantial number of additional input data files are required. These provide initial conditions for the chemical and aerosol fields as well as additional boundary conditions for the model, mostly in the form of emission fluxes for a number of chemical tracers. These emissions are released mostly at the model surface, however they can also be associated with emission heights (e.g. for engine emissions from global air traffic). Further information is required for the physical removal of tracers through either wet scavenging or dry deposition, the latter of which is related to the surface vegetation type as used by the land surface scheme. 

The additional data packages required for atmospheric composition modelling need to be prepared for the model at the desired grid resolution. While the standard OpenIFS model can be used with a wide range of model grids, the prepared chemical input data is only available for few selected grid resolutions and for specific time periods. If the model is to be used for other time periods or at different horizontal or vertical grid resolutions then the additional data packages need first to be generated for this purpose. 

Note that the additional data packages required for OpenIFS/AC are only made available for specific time periods and grid resolutions.

Obtaining and compiling the code

Working with the ftp server

In order to convert the standard OpenIFS model to OpenIFS/AC the additional software package for composition needs to be installed into an existing OpenIFS installation.

If both standard (meteorological) model and the atmospheric composition model are to be used at the same time, it is recommended to create a new OIFS_HOME directory for OpenIFS/AC and to first unpack the standard OpenIFS model sources into this directory (for instance, if the standard OpenIFS model is installed into directory 'oifs43r3', the new destination for the model sources could be extracted into directory 'openifs-ac').

Once the standard OpenIFS model code is unpacked, unpack package <package-name> into $OIFS_HOME, overwriting any pre-existing files from the standard model installation.

TO DO:  we need a separate code package for the OpenIFS/AC code that can be unpacked into the existing OpenIFS 43r3v2 source code distribution

Working with the git repository

OpenIFS/AC is maintained in Philippe Le Sager's ECMWF git repository: https://git.ecmwf.int/users/nm6

git clone ssh://git@git.ecmwf.int/~nm6/oifs43r3.git
mv oifs43r3 openifs-ac
cd openifs-ac
git checkout v2ac-rc

Environment settings

In order to build OpenIFS/AC the standard environment settings for oifs43r3v2 can be used with the application of two changes:

  • change OIFS_HOME to point to the installation of openifs-ac (and not to the standard oifs43r3 installation)
  • change OIFS_DATA_DIR to a bespoke path as the additional data packages will be added to the climate data files; we describe below what date needs to be moved to this directory
  • before compiling the model sources edit $OIFS_HOME/make/oifs.fcm to enable chemistry (which is by default disabled)

It is recommend for the first two changes to use a custom configuration script to set the environment variables.

Alternatively the settings can be enabled when running the prep scripts that come with OpenIFS/AC:  For the t21 acceptance tests, the environment variables and paths are set within the oifs-config.<my_name>.sh which needs to be edited in the platform subdirectory. This is described below.

Obtaining additional data packages

  • Create a new directory (here we name this directory /data/openifs-ac) which will contain additional data that is required for atmospheric composition modelling and it will also contain the new OIFS_DATA_DIR.  
  • Download the four additional data tgz archives that are required for OpenIFS chemistry experiments into /data/openifs-ac :
    ${datapath}=/nm6/oifs/

    cd /data/openifs-ac
    module load ecfs
    ecp ec:${datapath}/oifs-ac-43r3-chem.tgz .  
    ecp ec:${datapath}/oifs-ac-43r3-xtra.tgz .
    ecp ec:${datapath}/oifs-ac-43r3-initcond.tgz .
    ecp ec:${datapath}/ICMCL-2010.tgz .
  • Unpack oifs-ac-43r3-chem.tgz and oifs-ac-43r3-xtra.tgz into /data/openifs-ac. This will result in the following directory structure inside /data/openifs-ac : 
43r3/chemistry

AC specific

43r3/xdataAC specific
43r3/rtablesStandard dataset for OIFS-43r3
43r3/climate.v015Standard dataset for OIFS-43r3 + AC specifics
43r3/ifsdataStandard dataset for OIFS-43r3
43r3/wamStandard dataset for OIFS-43r3, needs to be added explicitly   
  • set the new environment variable for your OpenIFS/AC installation:   export OIFS_DATA_DIR=/data/openifs-ac/43r3

The following two tgz archives can be unpacked to any location, however in this example the files we will also extract them into /data/openifs-ac:

  • Unpack oifs-ac-43r3-initcond.tgz into /data/openifs-ac which results in a directory /data/openifs-ac/INITIAL-CONDITIONS. The files therein are initial data files for the first day of month for all 12 months of 2010.
  • Unpack ICMCL-2010.tgz into /data/openifs-ac which results in a directory /data/openifs-ac/ICMCL. This directory contains monthly files with surface boundary conditions (e.g. SSTs, soil temps, albedos, LAI etc).
  • From you conventional OpenIFS installation's OIFS_DATA_DIR copy the directories ifsdata and rtables to /data/openifs-ac/43r3 as they are also needed here.
  • Further, create a directory /data/openifs-ac/43r3/wam which needs to contain wave model initial data for 2010-01-01.  (presently files are copied over from cca:/lus/snx11062/scratch/ms/nl/nm6/ECE-DATA/OPENIFS/43r3)

Building the model

On both the ECMWF Cray and the ECMWF Atos Sequana HPCs it is possible to compile the model using a login node. However, in order to complete the acceptance testing with chemistry an interactive node should be requested.

How to start interactive session on the ECMWF Cray XC40
% qsub -I -q dp -l EC_total_tasks=12 -l EC_job_tmpdir=10G -l EC_memory_per_task=3G
How to start interactive session on the ECMWF Atos Sequana XH2000
% ecinteractive -c 12 -m 32GB -t 06:00:00

If you have a configuration script that sets the appropriate environment for OpenIFS you should run this first before building the model executables. 

In your command line you should type   export OIFS_CHEM=enable   to overwrite the default setting in oifs.fcm (or alternatively you can edit the variable in file oifs.fcm)

Further you should make a choice whether you want to build with XIOS server support, in that case set appropriate environment variables. Otherwise set   export OIFS_XIOS=disable   to disable XIOS. 

Then compile the model using fcm (here with verbose output and with 12 parallel child processes):

cd $OIFS_HOME/make
fcm make -v -j 12 -f oifs.fcm

Only proceed further after the code has compiled and all the executables were built without errors.

Run the acceptance tests

The model package offers various tests to check the basic functionality of the model and to verify that all paths to the data directories are correct and accessible.

These tests are run on a T21 full Gaussian grid and are designed to require a minimum of computational resources. Several different tests are being offered which activate different pathways in the model source code. It is highly recommended to carry out these brief tests prior to using the model.

Overview

To check the model is working normally carry out the various acceptance tests in $OIFS_HOME/t21test and t21test_xios_t255ac.

This requires editing the wrapper scripts job.sh and setup-exp.sh by setting the path to the appropriate master.exe and by changing RUNCMD to to something appropriate for the platform.

ECMWF Cray HPC

When running on the ECMWF Cray XC40 the following changes need to be made:

  • In $OIFS_HOME/t21test/job.sh and t21test_xios_t255ac/setup-exp.sh include the line:  export OIFS_RUNCMD="aprun -n $NPROC -d $NTHREADS -ss $MASTER".  This variable has to be modified again when you want to use XIOS, I suggest to set it up outside the script, either at the command line during an interactive session or in a submit script (see t21test_xios_t255ac/platform/ecmwf-cca.job.tmpl and t21test_xios_t255ac/platform/ecmwf-cca.job+xios.tmpl).
    See also here: Running with MPI on the Cray - aprun command
  • In $OIFS_HOME/t21test_xios_t255ac/platform/ copy file oifs-config.ecmwf-cca.sh to oifs-config.me.sh, open the latter file in an editor and change the variable settings and paths according to your environment. In $OIFS_HOME/t21test_xois_t255ac/setup-exp.sh edit the line:  platform=me

t21test:  This directory contains the original acceptance test which is provided with OpenIFS.  It should work in the same way for OpenIFS/AC as described in the OpenIFS User Guide.

t21test_xios:  This directory contains an acceptance test which makes use of the XIOS server – we do not use this here.

t21test_xios_t255ac:  The three acceptance tests in this directory make use of the additional compositon (AC) code and it is possible to run this test (a) without AC as in t21test, (b) with additional AC included, and (c) for both of the previous tests additionally XIOS server output can be selected.

Note:  If the XIOS server is to be used in these tests then a precompiled version of its libraries needs to be accessible and the appropriate paths need to be set in oifs-config.{platform}.sh. We do not describe here how XIOS is built, more information on XIOS can be found here.

Step-by-step

Now we can carry out the tests:

t21test:  

./job.sh -n 12 -t 2 -m ../make/gnu-opt-chem-fftw/oifs/bin/master.exe

If the oifs_run script (or the oiac_run script) is used without the --nomove option it produces an error at the end of the acceptance test, stating the ICMGGepc8+* files cannot be found. This refers to the copying of model output to output1 and the postprocessing and is therefore not relevant to the model functionality.

t21test_xios_t255ac:

First run the standard t21test for experiment epc8.  This test runs in directory $SCRATCH/43r3/epc8/ and hence the -x parameter needs to be given the absolute full path to the master.exe binary.
In setup-exp.sh change the value for RUN_NUMBER otherwise any pre-existing model output from this test will be overwritten. 

./setup-exp.sh -n 16 -t 2 -x /home/damk/oifs/model/openifs-ac/make/gnu-opt-chem-fftw/oifs/bin/master.exe

Now repeat the test with chemistry for experiment oiac. This test runs in directory $SCRATCH/43r3/oiac/

./setup-exp.sh -c -n 16 -t 2 -x /home/damk/oifs/model/openifs-ac/make/gnu-opt-chem-fftw/oifs/bin/master.exe

This test runs with a 30 min time step and due to the computational requirements for the added chemistry it will take much longer to complete.

Note:  If the XIOS server is to be used in the t21test experiments (option -i ) then the variables OIFS_XIOS and OIFS_XIOS_DIR need to be set appropriately in the configuration file in the platform directory. Also, the binary executable master.exe needs to have been built with XIOS support enabled.

Note:  only tm5 chemistry seems to work, model fails with b

Steps to carry out an experiment

Preparing an experiment

The experiment controls are in $OIFS_HOME/AC-experiments/

Here are the following scripts:

  • prep-ic-icmcl-compo.sh  script to generate initial conditions for chemical fields for the selected run time. Begin and end date need to be given as an argument.
  • config.h  settings for model installation, paths, and experiment configuration
  • oifs-run.sh  script controls the workflow for the experiment: reads experiment config, sets up run directories (in $SCRATCH), loads platform configuration, edits namelists, links to initial conditions and executes OIFS_RUNCMD
  • run-cca.job  wrapper script for oifs-run.sh, required settings for batch scheduler

In $OIFS_HOME/AC-experiments/platform:

  • it is necessary to create a machine config file:  oifs-config.damk.sh  (we can re-use the one used in t21test_xios_t255ac)

Create a wrapper script to submit the batch job; in the platform directory the following templates exist:

  • ecmwf-cca.job.tmpl    –    run oifs without XIOS   (try this first!)   this is virtually the same as $OIFS_HOME/AC-experiments/run-cca.job
  • ecmwf-cca+xios.job.tmpl    –    run oifs with XIOS     this is virtually the same as $OIFS_HOME/AC-experiments/run-cca+xios.job
  • ecmwf-cca-workflow.sh    –    workflow for a run with a series of restarts

Forecast without restarts

We begin with a batch job to run OpenIFS/AC without restarts and without XIOS.  For this purpose we modify run-cca.job:

  • in run-cca.job delete the accounting PBS header line:   #PBS -l EC_billing_account=nlchekli

Edit the following lines in file config.h:

  • PLATFORM='damk' or 'atos-intel'  (depending on Cray or Atos)
  • OIFS_DATA_DIR= (set to your oifs data dir)
  • ICMCLDIR= (set to where ICMCL directory has previously been extracted to
  • OIFS_INIDATA_DIR= path_to_.../INITIAL_CONDITIONS/T255L91-tm5-none
  • MET_IC_DIR= path_to_...ICMCL/aabg/2010010100

Prepare initial conditions for chemistry:

  • the following script requires the substring and the grib_get commands:  On the Cray load modules sms and eccodes   (not clear for Atos?)
  • run script prep-ic-icmcl-compo.sh 2010-01-01 2010-01-03  (if startdate and enddate are not given 2010-01-01 + 2 days fclength is used as default)
    (this command takes a few minutes to complete, check $PROGDIR as this presumes the location of timeint.exe)
  • during the above process an experiment directory is created:  $SCRATCH/43r3/experiments/{expid}/chem_ic/  with default expid=abcd  (contains about 1.7 GB data)

Following these steps:

  • submit job:  qsub ./run-cca.job

Forecast with restarts

unclear how to do that

  • No labels