MARS procedure (Step by Step)

How to set up a new configuration

See first Setting up MARS environment and MARS environnement : Build a new configuration

  • The grid size is defined in parameters.F90[_rank*] with imin=0, jmin=0,imax=***,jmax=***,kmax=***,
  • The rank is noted in parameters.F90[_rank*] with no=*
  • And the “nrac” of the configuration (4 letters) is defined parameters.F90[_rank*] (same as configuration name usually)

Compilation with ranks

Each rank is compiled by modifying makefile :

cd $UDIR/CONF/CONF-CASE
vi makefile, RANK = 0
gmake clean ; gmake
vi makefile, RANK = 1
gmake clean ; gmake

Choice of parametrization

    1. cd $RDIR/CONF/CONF-CASE
    • Choice parameters and options in namelists files (namelist files)
      • paramain.txt and paracom.txt are the same whatever the rank
      • paraspec.txt changes for each rank
        • date_startshift (if negative, date_startshift decreases as the number of the rank increases)
        • l_tide_harmcompo=.true. Only for rank 0
        • l_bathy_meanlev=.true. Except for the rank 0 (because taken into account in the bathymetry file)
      • open boundary management in paraspec.txt;
        • Look at your domain, and specify where are the open boundaries
          . l_obc_east=.true./.false. (if open/closed boundary) . l_obc_west=….
        • Specify the file containing the obc fields issued from an ogcm and extract executable
          . file_obc_n=’../../inputs/obc_north.nc‘ . file_obc_e=…
        • Which ogcm variables do you want to read and use at open boundaries ? Specify :
          . l_obc_ogcm_rssh=.false. ! Read the sea surface height . l_obc_ogcm_rs=.false. ! Read the salinity . l_obc_ogcm_rt=.false. ! Read the temperature . l_obc_ogcm_ruv=.false. ! Read the barotropic velocities . l_obc_ogcm_ruvz=.false. ! Read the 3d velocities
        • To relax the salinity and temperature towards the ogcm values over a bandwidth specified by obc_width
          . l_obc_ogcm_relax=.true. . obc_coef_relax=0.7e-06 (time relaxation in s-1)
        • others
          . dtmax=1000.d0 . l_tide_harmcompo=.true.
        • What kind of physics do you want to introduce through the open boundaries ?
          . l_obc_ogcm=.true. ! If nested with an ogcm . l_obc_tide=.true. ! If tide and nested with a previous rank
        • Which operator do you want to use ? Choose one of the following items
          . l_obc_diri=.false. ! Dirichlet . l_obc_mars ! Zero gradient of velocities
    • Choice of options and parameters definig outputs files in output.dat (Set up output files : output.dat)
    • Build a file mpi.txt (for MPI purpose if you want to divide the domain along X AND Y) (MPI job : domain decomposition)

Choice of inputs data

    1. cd $RDIR/CONF/inputs
    • modify head.CONF (keep the same format !!!) (head.CONF)
    • add the input files (like bathymetry, initial condition, open boundary conditions, meteo …)
    • modify all default .dat files read by the simulation before any use and add the good path in namelists (ex river.dat, trajec2d*.dat, outflow.dat, variables.dat)

Starting the run

    1. cd $RDIR/CONF/CONF-CASE
    • Run directly if small et rapid tests with mars_exe
    • or with batch_seq, batch_omp, runmpi_connect (which uses batch_mpi and batch_connect(bydate) ),
    • or runmpt_connect… depending of your choice (How to run a job)