Sommaire |
---|
General information
SPS 6.1.1 uses the same physics version as GEM 5.1.1.
I suggest you create yourself a directory under your home for your source code, scripts and config files, for example:
Volet |
---|
mkdir -p ~/SPS/v_6.1.1 |
Scripts
The name of the scripts directory:
~/SPS/v_6.1.1/Scripts
is mandatory!
In the above directory you need the following scripts:
Volet |
---|
SPS_launch r.run_in_parallel sps.sh |
Executable
a) Create directory for executable
To create an executable first create yourself a directory under your home for the source code; preferably under ~/SPS/v_6.1.1/Abs and change into it, for example:
Volet |
---|
mkdir -p ~/SPS/v_6.1.1/Abs/My_Abs cd ~/SPS/v_6.1.1/Abs/My_Abs |
b) Get the basename of abs-directory
Get the basename (last part of your directory path) of your abs-directory for later use:
Volet |
---|
base_dir=$( basename $PWD ) |
'base_dir' should now be set to 'My_Abs'. You can verify it with:
echo $base_dir
c) Clone the SPS Git repository you want to start from, for example:
Volet |
---|
git clone ~winger/SPS/v_6.1.1/Abs/SPS_UQAM_development/sps |
Then change into 'sps' directory that came with the clone:
Volet |
---|
cd sps |
d) Create working directories
So the object files, libraries and executables will not be under your home, create links for the directories 'build' and 'work'. Pick a place under which you want to keep the object files, libraries and executables under your data space, something like:
Volet |
---|
work_space=/your_data_space/SPS_WORK_DIR/Abs_6.1.1 |
Create the directories and the links (using ${base_dir} from above) :
Volet |
---|
mkdir -p ${work_space}/${base_dir}/build mkdir -p ${work_space}/${base_dir}/work ln -s ${work_space}/${base_dir}/build ln -s ${work_space}/${base_dir}/work |
e) Acquire a compiler
Only needed once per window/terminal. Same as for GEM 5.1.1.
Volet |
---|
module load compilers/intel/21.5-openmpi utils/cmake |
f) Set the variable 'abs_dir'
Set the variable 'abs_dir' to the name of your executable directory, including the 'sps' directory (needed under e))
Volet |
---|
abs_dir=$PWD |
g) Change into 'build' directory:
Volet |
---|
cd build |
h) Create make files and dependencies
Only need once at the beginning and whenever you add any new routines or add include files or module "use" lines to an existing routine.
Volet |
---|
cmake -DCOMPILER=intel -DCMAKE_VERBOSE_MAKEFILE=ON -DWORK_PREFIX=${abs_dir}/work ${abs_dir}/project |
i) Compile and create executable
Volet |
---|
make mainspsdm |
You can also use n cores in parallel by adding the '-jn', for example to use 4 cores:
make -j4 mainspsdm
Config files
You need the following config files:
Volet |
---|
configexp.cfg dyn_input_table rpnstd_units.dict |
outcfg.out
SPS does not have the possibility to write and continue from restart files. Therefore, at the end of each job all fields needed to start another simulation need to get outputted. The next job will then use the output of the previous job as initial conditions. To make the output of fields at the end of a job easier, steps=1 and steps=2 are now hard coded to:
Volet |
---|
steps=1 will automatically get set to the list of the last timestep of every month of the current job. steps=2 will automatically get set to the last timestep of the current job. |
ISBA
The following is a list of mandatory initial condition fields for ISBA:
Volet |
---|
sortie_p([SD,DN,I0,I1,I2,I3,I4,I5,I6,I7,I8,I9] ... |
SD : VD=snow depth
DN : VD=relative snow density
I0 : VD=surface and soil temperatures
I1 : VD=soil volumetric water contents
I2 : VD=soil volumetric ice contents
I3 : VD=water retained on the vegetation
I4 : VD=water in the snow pack
I5 : VD=snow mass
I6 : VD=albedo of snow I7 : VD=sea ice temperature
I8 : VD=sea ice thickness
I9 : VD=glacier temperature
FLake
The following is a list of mandatory initial condition fields for FLake:
Volet |
---|
sortie_p([LIFV,LWFV,LIFR,LITH,LITP,LTRN,LMLD,LSF,LBTP,LWTP,LMLT] ... |
CLASS
When running CLASS, in addition to the ISBA fields above one also needs to output the following fields:
Volet |
---|
sortie_p([CY,DR,SQAC,STAC,STSS,SK,TN,TE,R2,Q4,GR,M9] ... |
sps.cfg
Driving with fields on staggered lowest predictive model levels
1) Lvl_typ_S = 'HS' (HS= Hybride Staggered.. HU= Hybride Uniforme (toutes les variables sur le meme niveau)
2) Lvl_list = MOMENTUM LEVEL ONLY - SPS will deduce the thermo level by itself
3) ip1a=-1
ip1at=-1
For (3) , By using =-1, you let SPS figure out the ip1 using the standard encoding. (*Note that I don’t know what the “standard” is, I’m under the impression the ip1 encoding has changed with various GEM versions but perhaps it remained constant for HS levels).
If the ip1 encoding is not standard, you can override the ip1s using these 2 keys. In all cases, standard or not, you can choose to specify these.
The actual values for the lowest prognostic level + ip1s will depend on the forcing model configuration. It will vary from one GEM system to another.
Example:
Volet |
---|
@levels_cfgs Lvl_typ_S = 'HS' Lvl_ptop_8 = 1000.0 Lvl_list = 0.997502 Lvl_rcoef = 3., 15. @sps_cfgs ip1a = -1 |
Driving with fields on diagnostic levels
Example:
Volet |
---|
@levels_cfgs Lvl_typ_S ='HU' Lvl_ptop_8 =1000.0 Lvl_list =-1 @sps_cfgs zta = 2.0 zua =10.0 ip1a =93423264 |