...
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 the , once the source code is extracted and installed from 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.1/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 location and name of the executable for the SCM is are defined in the platform configuration file (oifs-config.edit_me.sh) as
$SCM_EXEC
...
Code Block | ||||
---|---|---|---|---|
| ||||
source /path/to/file/location/oifs-config.edit_me.sh
# using our installation example:
# source $HOME/openifs-48r1.1/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 | ||||
---|---|---|---|---|
| ||||
#---Single-column model environment variables #---Test case list, which can contain DYCOMS, BOMEX AND TWPICE export SCM_CASE_LIST="BOMEX TWPICE" #---SCM experiment name, please set to anything that is relevant #---to your test export SCM_EXPT_NAME="ref-oifs-scm-dp" #---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 download from https://sites.ecmwf.int/openifs/openifs-data/scm/48r1/scm_openifs_48r1.1.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
, and that wget
utility is available for convenient download:
Code Block | ||||
---|---|---|---|---|
| ||||
cd $OIFS_EXPT wget# download the scm_openifs_48r1.tar.gz from https://sites.ecmwf.int/openifs/openifs-data/scm/48r1/scm_openifs_48r1.1tar.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/.
...
Once the above has been completed, it is necessary to select which test-case you are ready to run . There is a choice of the following 3 testcasesthe 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 case can be 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
, using SCM_CASE_LIST
file to ${OIFS_HOME}/scripts/scm
.
callscm
includes default settings, which are the all 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
| |||||||||||||
SCM_CASE_LIST="BOMEX TWPICE DYCOMS" |
The above will run all the cases. If making this change in oifs-config.edit_me.sh
, remember to source the file once the change has been made.
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 followingOnce the cases are set, then do the following to run the SCM
Code Block | ||||
---|---|---|---|---|
| ||||
cd $OIFS_HOME $SCM_TEST/callscm -c BOMEX -t "1800 900" -x "bomex_test" |
This will run all the cases defined in SCM_CASE_LIST and write the output to $SCM_RUNDIR
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 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 type 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.