Run a SURFEX-Crocus experiment without vortex¶
Actions of the s2m command :
- Extract the necessary resources in a working directory
- Pre-process these resources if necessary (domain extraction, dates management, modification of initial conditions)
- Run SURFEX
- Save outputs
Note that this documentation is not valid for simulations on Meteo-France HPC systems (belenos, taranis).
In that case, please refer to https://opensource.umr-cnrm.fr/projects/snowtools_git/wiki/Run_a_SURFEX-Crocus_experiment_with_vortex
USAGE s2m -b begin_date -e end_date -f forcing [-o path_output] [-w workdir] [-n namelist] [-g] [-G] [-x date_end_spinup] [-a threshold_1aout] [-r region] [-l list_slopes] [-c nb_classes_aspects] [-L Lower-altitude] [-U Upper-altitude] [-s surfex_exe_directory] [--extractforcing] [--grid] [--applymask]
-b begin_date (format: YYYYMMJJ). Start at 06 UTC
-e end_date (format: YYYYMMJJ). Finish at 06 UTC
-f FORCING.nc or -f directory or -f FORCING_area1.nc,FORCING_area2.nc,... :
Meteorogical forcing file required to run SURFEX.
If the argument is a file name, it must cover at least all the simulation period but it can be longer.
If the argument is a directory containing several yearly or monthly forcing files,
--> For the beginning of the simulation, the file can start either at the simulation starting date, or at 1st August before the starting date for yearly files, or at the 1st of the month for monthly files.
--> For the end of the simulation, the file can finish either at the simulation end date, or at 1st August after the end date for yearly files, or at the 1st of the next month for monthly files.
If the argument is a list of file names or a list of directories separated by comas, spatial aggregation of all forcing files. The forcing provided must cover exactly the same time periods.
-o path_output. Path to save the output files. Default: output
The directory is created if it does not exist. It is organized in 3 subdirectories:
meteo : forcing files
prep : init and restart files
pro : SURFEX prognostic and diagnostic variables ("PRO" files)
Note that if a PGD.nc file of physiography and a PREP file of initial conditions are provided in the prep directory (PREP_YYYYMMDD.nc), they will be used to restart the simulation. Otherwise, they will be generated using the informations provided in the namelist and in the init_TG.nc file (see options -g/-G)
[-w workdir]. Working directory. It is recommended to work on a local directory. Default: directory provided with the -o options .
[-n namelist] SURFEX namelist.
Default : $SNOWTOOLS_CEN/snowtools/DATA/OPTIONS_V8.1_NEW_OUTPUTS_NC.nam ( https://opensource.umr-cnrm.fr/projects/snowtools_git/repository/revisions/master/entry/snowtools/DATA/OPTIONS_V8.1_NEW_OUTPUTS_NC.nam )
If you need to define your own SURFEX namelist, we recommand to create a namelist from this default namelist and to modify it step by step.
You can define many SURFEX settings using a different namelist (output variables and timestep, physical options, soil and vegetation parameters, etc.)
Define a namelist for gridded configurations
[--grid] (Default: False) Option required if you are running on a regular grid. In this case, the grid must be specified in the namelist and the s2m command will not modify the spatial configuration.
[-g] Generate a ground initialization file by computing a climatological average of air temperature on the provided period. If this option is not provided and if the initial conditions are not known (PREP file not available for the starting date), then an init_TG.nc file is expected to be found in the prep directory. It must contain a TG variable with dimension (Number_of_points).
[-G] Same as -g but do not run SURFEX afterwards. Save init_TG.nc file in the prep directory.
[-x date_end_spinup] If a spinup simulation has been run, it is possible to force the model to start using the model state conditions at the end of this spinup even if it differs from the real starting date. If you use this options, it means that a PREP_YYYYMMDD.nc file is expected in the prep directory at the date provided in this option.
Limit the snow water equivalent each 1st August to the provided value in kg/m2
[-r region]. Extract a limited number of massifs in FORCING files or interpolate forcing files in a given geometry.
If region is a single massif number or a list of massif numbers separated by comas or a generic name for a group of massifs, extract the corresponding massifs.
If region is a netcdf file describing the target geometry, interpolate SAFRAN fields on this geometry. The netcdf file describing the geometry must contain the massif_number and ZS variables. It can be 1d (Number_of_points) or 2d (y, x) in Lambert93 or 2d (latitude, longitude). 1d files can optionnally provide aspect and slope. These variables will be computed by the software for 2d files. Note that you need to compile the fortran interpolator to use this option.
[-l list_slopes] Extract a reduced number of slope angles in FORCING files, or generate a larger number of slope angles for a flat FORCING file
Example: -l 0,20,40
[-c nb_expo] Specify the number of aspect classes to extract or generate. Default:8
-c 8 : N, NE, E, SE, S, SW, W, NW
-c 4 : N, E, S, W
-c 2 : N, S
-c 135 : specify only 1 aspect in ° if multiple of 45°
[-L Lower-altitude] Eliminate elevations lower than this level in FORCING files (in meters)
[-U Upper-altitude] Eliminate elevations upper than this level in FORCING files (in meters)
Ex : -L 1200 –U 2100 (select elevations from 1200 to 2100 m)
Default: keep all levels.
[--addmask] (Default: False)
With this option, if a "station(Number_of_points)" variable is defined in the FORCING file and if the corresponding stations are included in the $SNOWTOOLS_CEN/DATA/METADATA.xml file with known shadowing masks, infinite flat direct solar radiation input is corrected accordingly.
With this option, if slope and aspect are correctly defined in the FORCING file, infinite flat direct solar radiation input is corrected and projected accordingly.
This option must not be used with measured solar radiation.
[-s surfex_exe_directory] Specify the directory where to find SURFEX binaries (PGD, PREP, OFFLINE)
If undefined, look for the content of the environment variable $EXESURFEX .
Note that s2m automatically detects whether you have compiled SURFEX with or without MPI support. The default behaviour is to run SURFEX using 4 cores. You can change this behaviour by defining the environment variable NOFFLINE to another value if your computer has a sufficient capacity. Note that it is not possible to use more CPU than the size of your domain.
[--extractforcing] With this option, only preprocess and save the forcing files without running SURFEX (domain extraction and/or duplication of slopes)