Changeset 11753


Ignore:
Timestamp:
2019-10-21T16:21:17+02:00 (11 months ago)
Author:
nicolasmartin
Message:

Review README for AGRIF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/cfgs/AGRIF_DEMO/README.rst

    r11734 r11753  
    1313======== 
    1414 
    15 AGRIF (Adaptive Grid Refinement In Fortran) is a library that allows the seamless space and time refinement over 
    16 rectangular regions in NEMO. 
     15AGRIF (Adaptive Grid Refinement In Fortran) is a library that 
     16allows the seamless space and time refinement over rectangular regions in NEMO. 
    1717Refinement factors can be odd or even (usually lower than 5 to maintain stability). 
    18 Interaction between grid is "two-ways" in the sense that the parent grid feeds the child grid open boundaries and 
    19 the child grid provides volume averages of prognostic variables once a given number of time step is completed. 
     18Interaction between grid is "two-ways" in the sense that 
     19the parent grid feeds the child grid open boundaries and 
     20the child grid provides volume averages of prognostic variables once 
     21a given number of time step is completed. 
    2022These pages provide guidelines how to use AGRIF in NEMO. 
    21 For a more technical description of the library itself, please refer to http://agrif.imag.fr. 
     23For a more technical description of the library itself, please refer to AGRIF_. 
    2224 
    2325Compilation 
     
    2830.. code-block:: sh 
    2931 
    30    ./makenemo add_key 'key_agrif' 
     32   ./makenemo [...] add_key 'key_agrif' 
    3133 
    32 Although this is transparent to users, the way the code is processed during compilation is different from 
    33 the standard case: 
    34 a preprocessing stage (the so called "conv" program) translates the actual code so that 
     34Although this is transparent to users, 
     35the way the code is processed during compilation is different from the standard case: 
     36a preprocessing stage (the so called ``conv`` program) translates the actual code so that 
    3537saved arrays may be switched in memory space from one domain to an other. 
    3638 
     
    3840================================ 
    3941 
    40 An additional text file ``AGRIF_FixedGrids.in`` is required at run time. 
     42An additional text file :file:`AGRIF_FixedGrids.in` is required at run time. 
    4143This is where the grid hierarchy is defined. 
    42 An example of such a file, here taken from the ``ICEDYN`` test case, is given below:: 
     44An example of such a file, here taken from the ``ICEDYN`` test case, is given below 
    4345 
    44    1 
    45    34 63 34 63 3 3 3 
    46    0 
     46.. literalinclude:: ../../../tests/ICE_AGRIF/EXPREF/AGRIF_FixedGrids.in 
    4747 
    4848The first line indicates the number of zooms (1). 
     
    5151The last line is the number of child grid nested in the refined region (0). 
    5252A more complex example with telescoping grids can be found below and 
    53 in the ``AGRIF_DEMO`` reference configuration directory. 
     53in the :file:`AGRIF_DEMO` reference configuration directory. 
    5454 
    55 [Add some plots here with grid staggering and positioning ?] 
     55.. todo:: 
    5656 
    57 When creating the nested domain, one must keep in mind that the child domain is shifted toward north-east and 
    58 depends on the number of ghost cells as illustrated by the (attempted) drawing below for nbghostcells=1 and 
    59 nbghostcells=3. 
    60 The grid refinement is 3 and nxfin is the number of child grid points in i-direction. 
     57   Add some plots here with grid staggering and positioning? 
     58 
     59When creating the nested domain, one must keep in mind that 
     60the child domain is shifted toward north-east and 
     61depends on the number of ghost cells as illustrated by 
     62the *attempted* drawing below for ``nbghostcells=1`` and ``nbghostcells=3``. 
     63The grid refinement is 3 and ``nxfin`` is the number of child grid points in i-direction. 
    6164 
    6265.. image:: _static/agrif_grid_position.jpg 
     
    7174============= 
    7275 
    73 Knowing the refinement factors and area, a ``NESTING`` pre-processing tool may help to create needed input files 
     76Knowing the refinement factors and area, 
     77a ``NESTING`` pre-processing tool may help to create needed input files 
    7478(mesh file, restart, climatological and forcing files). 
    7579The key is to ensure volume matching near the child grid interface, 
    76 a step done by invoking the ``Agrif_create_bathy.exe`` program. 
    77 You may use the namelists provided in the ``NESTING`` directory as a guide. 
     80a step done by invoking the :file:`Agrif_create_bathy.exe` program. 
     81You may use the namelists provided in the :file:`NESTING` directory as a guide. 
    7882These correspond to the namelists used to create ``AGRIF_DEMO`` inputs. 
    7983 
     
    8286 
    8387Each child grid expects to read its own namelist so that different numerical choices can be made 
    84 (these should be stored in the form ``1_namelist_cfg``, ``2_namelist_cfg``, etc... according to their rank in 
    85 the grid hierarchy). 
     88(these should be stored in the form :file:`1_namelist_cfg`, :file:`2_namelist_cfg`, etc... 
     89according to their rank in the grid hierarchy). 
    8690Consistent time steps and number of steps with the chosen time refinement have to be provided. 
    8791Specific to AGRIF is the following block: 
    8892 
    89 .. code-block:: fortran 
    90  
    91    !----------------------------------------------------------------------- 
    92    &namagrif      !  AGRIF zoom                                            ("key_agrif") 
    93    !----------------------------------------------------------------------- 
    94       ln_spc_dyn    = .true.  !  use 0 as special value for dynamics 
    95       rn_sponge_tra = 2880.   !  coefficient for tracer   sponge layer [m2/s] 
    96       rn_sponge_dyn = 2880.   !  coefficient for dynamics sponge layer [m2/s] 
    97       ln_chk_bathy  = .false. !  =T  check the parent bathymetry 
    98    / 
     93.. literalinclude:: ../../namelists/namagrif 
     94   :language: fortran 
    9995 
    10096where sponge layer coefficients have to be chosen according to the child grid mesh size. 
    10197The sponge area is hard coded in NEMO and applies on the following grid points: 
    102 2 x refinement factor (from i=1+nbghostcells+1 to i=1+nbghostcells+sponge_area) 
     982 x refinement factor (from ``i=1+nbghostcells+1`` to ``i=1+nbghostcells+sponge_area``) 
    10399 
    104100.. rubric:: References 
Note: See TracChangeset for help on using the changeset viewer.