Compilation

  1. CPP Keys to use
  • -Dkey_agrif : Activate AGRIF two ways
  • -Dkey_agrif_1way : 1 way mode only
  • -DAGRIF_MPI : activate MPI for AGRIF
  • -Dkey_agrif_OMP : activate OPENMP for AGRIF
  • For MPI run only dont forget -Dkey_MPI_2D
  • For Hybrid MPI and OMP dont forget -Dkey_MPI_2D and -Dkey_MPIOMP
  1. Parameters.F90

For AGRIF,the rsh parameter should be set to 8.

If you let it to 4, don’t forget to remove -r8 option in the compilation options in the makefile

Preparation of mars inputs files for AGRIF

In this part will be presented the inputs files to create for each grid (Parentgrid and childgrids)

For each childgrid from 1 to n (same order as in Agrif_Fixed.in) :

  1. paracom.txt in comdir (paracom.txt)
  • name of rootgrid file : paracom.txt
  • names of childgrid files : paracom1.txt, paracom2.txt, ..., paracomn.txt
  • field to adjust :
    • meteo_file if the user want to adapt the meteo for each zoom (ex : Arome for high resolution grid)
  1. paraspec.txt in rundir (paraspec.txt)
  • name of rootgrid file : paraspec.txt
  • names of childgrid files : paraspec1.txt, paraspec2.txt, ..., paraspecn.txt
  • field to adjust :
    • date_startagrif : start of the agrif run
    • file_bathy : path and name of the bathy file
    • l_init_fromfile : True for rootgrid and False for childgrids
    • l_ogbc_ogcm : True only for the Mothergrid if an OGCM is used
    • l_obc_[north,south,east,west]: Activate open boundaries (to do for all grids)
    • l_obc_file_[north,south,east,west]: path and name of the obc file only for the Mothergrid
    • l_obc_r[UZ,TEMP,SAL,XE] : to activate only for the ParentGrid
    • iscreen : integer for each log file (must be different from ParentGrid to Chilgrids)
    • file_output : name of the file which manage output (one for each grid)
    • dtini/dtmin/dtmax : dt_child_grid=dt_root_grid/refinement_coef (see Agrif_Fixed.in)
  1. parasubs.txt in rundir in case of run with substances (parasubs.txt : namelist for substances)
  • name of rootgrid file : parasubs.txt
  • names of childgrid files : parasubs1.txt, parasubs2.txt, ..., parasubsn.txt
  • field to adjust :
    • name of the outflow file

The outflow file should not be necessary the same between the ParentGrid and the Chilgrids.

  1. output.dat in rundir (Data Files)
  • name of rootgrid file : output.dat
  • name of childgrid files : output1.dat, output2.dat, ..., outputn.dat
  • field to adjust :
    • name of the ouput file
  1. mpi.txt for mpi2D run
  • name of rootgrid file : mpi.txt
  • name of childgrid files : mpi1.txt, mpi2.txt, ..., mpin.txt
  • Generate a file for each grid with the decoupe tool (Setting up MARS environment)
./decoupe bathy.nc nb_procs
  • each file must have the same number of procs

Once theses files have been correctly filled, the user must copy or link the Agrif_Fixed.in file in the rundir. It’s now time to launch the run as usual.