Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
This page contains a guide to the building and running a Single-Column Model (SCM), which is derived from OpenIFS 48r1
...
Table of Contents |
---|
Installing and building the SCM
The SCM source code is extracted and installed alongside OpenIFS. Thus, if not done already, to install the SCM please follow the instructions detailed in Getting started to install OpenIFS.
In short, once the source code is extracted and installed from https://sites.ecmwf.int/openifs/openifs-data/src/48r1/openifs-48r1.tar.gz, then the code can be built using the following:
Code Block | ||||
---|---|---|---|---|
| ||||
# load the OpenIFS and SCM environment variables
source /path/to/file/location/oifs-config.edit_me.sh
# using our installation example:
# source $HOME/openifs-48r1 |
...
/oifs-config.edit_me.sh
# change to the home directory for OpenIFS and SCM
cd $OIFS_HOME
# Use the openifs-test.sh script to build and automatically test OpenIFS and the SCM
$OIFS_TEST/openifs-test.sh -cbt |
The above commands assume that the base prerequisites for OpenIFS and the SCM are installed on the system. This is the case on the ECMWF Atos Sequana XH2000 HPC facility (hpc2020) but on other systems, the prerequisites need to be installed. A description/recipe for the prerequisites can be found on the Getting started on docker page.
Once successful, the above commands will build double and single precision SCM executables (MASTER_scm.DP and MASTER_scm.SP, respectively), which are used to run the SCM derived from OpenIFS. The executables are located in $OIFS_HOME/build/bin
.
- The location and name of the executable for the SCM are defined in the platform configuration file (oifs-config.edit_me.sh) as
$SCM_EXEC
Note |
---|
Download and extraction of the OpenIFS 48r1 sources tarball is only required if a user has not previously done this for a general OpenIFS install. If a user has already downloaded the OpenIFS package to install the 3D model, there is no need to extract the package again, since the SCM is packaged with OpenIFS. |
Setting up the SCM for a test-case
Before the SCM can be run, it is necessary to
- load the SCM environment variables by source the
oifs-config.edit_me.sh
- obtain and extract the SCM test-case package
Load SCM environment variables
As with OpenIFS, the operation of the SCM depends on some environment variables being loaded. The recommended way to load is by sourcing the oifs-config.edit_me.sh
file, i.e.,
Code Block | ||||
---|---|---|---|---|
| ||||
source /path/to/file/location/oifs-config.edit_me.sh
# using our installation example:
# source $HOME/openifs-48r1 |
...
/oifs-config.edit_me.sh |
This will load all the OpenIFS and SCM environment variables. The OpenIFS variables are described in Getting started, so here we focus on the SCM variables, which are defined in oifs-config.edit_me.sh
, with comments, as shown below
Code Block | ||||
---|---|---|---|---|
| ||||
#---Path to the executable for the SCM. This is the
#---default path for the exe, produced by openifs-test.sh.
#---DP means double precision. To run single precision change
#---DP to SP
export SCM_EXEC="${OIFS_HOME}/build/bin/MASTER_scm.DP"
#---Default assumed paths, only change if you know what you are doing
export SCM_TEST="${OIFS_HOME}/scripts/scm"
export SCM_RUNDIR="${OIFS_EXPT}/scm_openifs/48r1/scm-projects/ref48r1"
export SCM_PROJDIR="${OIFS_EXPT}/scm_openifs/48r1/scm-projects"
export SCM_VERSIONDIR="${OIFS_EXPT}/scm_openifs/48r1"
export SCM_LOGFILE="${SCM_RUNDIR}/scm_run_log.txt" |
It is worth noting that the SCM environment variables depend on the OIFS_HOME
and OIFS_EXPT
, which are also defined by sourcing oifs-config.edit_me.sh
. In the above there is the assumption that the SCM executable exists in ${OIFS_HOME}/build/bin
and that the SCM test case package exists in $OIFS_EXPT
.
Extract SCM test-case package
In a similar fashion to the OpenIFS package and the experiment data, the SCM test-case package can be
...
...
.tar.gz. Please note that access to this web site is restricted to registered OpenIFS users, i.e. your personal ECMWF account must have been added to the OpenIFS user policy.
In the example below we assume that the SCM package shall be installed in the $OIFS_EXPT
directory, where the $OIFS_EXPT
is the OpenIFS experiment directory, which is defined oifs-config.edit_me.sh
...
:
Code Block | ||||
---|---|---|---|---|
|
...
# download the scm_openifs_48r1.tar.gz from https://sites.ecmwf.int/openifs/openifs-data/scm/48r1/scm_openifs_48r1. |
...
tar.gz model and copy the tarball to your $OIFS_EXPT directory: cp scm_openifs_48r1.tar.gz $OIFS_EXPT tar -xvzf scm_openifs |
...
-48r1 |
...
.tar.gz |
Note |
---|
The untarred SCM package is small, ~45 Mb and data produced by a standard individual SCM simulation is also low. However, if I user is planning to perform many simulations and store the data, which is often the case, the disk space usage can become large. If this is the plan, then a user may need to consider installing the SCM test-case package on a larger disk area than $ |
Once installed it is important to ensure that the $OIFS_EXPT
is set to the directory that scm_openifs has been installed in. For example, in the template oifs-config.edit_me.sh
, $OIFS_EXPT=${HOME}/openifs-expt
. In this scenario, the directory scm_openifs
needs to be in $OIFS_EXPT
or `${HOME}/openifs-expt/.
Run the SCM
Once the above has been completed, you are ready to run the SCM. The scm_openifs
contains 3 testcases, each representative of different cloudy regimes
- DYCOMS - marine stratocumulus case
- BOMEX - trade-wind cumulus case
- TWPICE - A multi-day deep convective case
The SCM is run using the callscm
script, which is a wrapper for the main run.scm
. Both scripts can found in $SCM_TEST
, which is set in the oifs-config.edit_me.sh
file to ${OIFS_HOME}/scripts/scm
.
callscm
includes default settings, which are the
...
three cases, with a 450 s timestep and an experiment name of ref-oifs-scm
. To run with these settings, enter the following
Code Block | ||||
---|---|---|---|---|
| ||||
cd $OIFS_HOME
$SCM_TEST/callscm |
Note | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
It is important to note that if running on the ECMWF ATOS the mpi environment needs to be loaded before running
If the appropriate modules are not loaded, the SCM fails to run and outputs an MPI error. |
callscm
(with defaults, i.e. no arguments) will run the DYCOMS case with the SCM and create an output directory in $SCM_RUNDIR/scmout_DYCOMS_ref-oifs-scm_450s
, which contains the diagnostic output from the SCM. In addition, the file scm_run_log.txt
will be created in $SCM_RUNDIR
. This file contains the print output from the SCM, which is useful for checking all the sources and paths for a simulation.
A user can change the defaults by using the available command-line options
Code Block | ||||
---|---|---|---|---|
| ||||
callscm -h -c <case_name or list of case_names> -t <timestep or list of timesteps>
-x <expt_name>
where :
-h is help which returns basic usage options and exits
-c case_name or list of case_names (space delimited) of the case study
used for namelist and output directory. Default list is
"DYCOMS BOMEX TWPICE"
-t timestep or list of timesteps in seconds. The default is 450s. An
example of a list is "1800 900 300"
-x expt_name shortname to identify experiment. Default is ref-oifs-scm |
For example, if a user wanted to run the BOMEX case with timesteps of 1800 s and 900 s and an experiment name of "bomex_test", they would enter the following
Code Block | ||||
---|---|---|---|---|
| ||||
$SCM_TEST/callscm -c BOMEX -t "1800 900" -x "bomex_test" |
This command results in the following output directories $SCM_RUNDIR/scmout_BOMEX_bomex_test_900s
and scmout_BOMEX_bomex_test_1800s
.
Example plotting script
Once the SCM has run successfully, it will produce output in $SCM_RUNDIR/scmout_<casename>_<expt_name>_<timestep>, which contains some netcdf files.
As part of the scm_openifs
download package we provide a python script $SCM_RUNDIR/plotscm.py
, which can be used to plot some profiles at a certain time, 2-d time height plots and some scalar timeseries. This script will work without any changes for the DYCOMS case and the default settings of callscm by
...
typing the following
Code Block | ||||
---|---|---|---|---|
| ||||
cd $SCM_RUNDIR
python3 plotscm.py |
For the defaults, the above will produce plot_DYCOMS
directory, which contains png plots
Note | |||||||
---|---|---|---|---|---|---|---|
On ECMWF ATOS, it is necessary to load python3 before attempting to run plotscm.py, i.e.,
|
To plot the other cases or experiments with different names and/or timesteps to the defaults, at present, the user will need to edit plotscm.py appropriately.
Panel | ||
---|---|---|
| ||
On this page ...
|
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
|