Changes between Version 6 and Version 7 of Users/Model Interfacing/AGRIF


Ignore:
Timestamp:
2018-08-30T16:05:37+02:00 (2 years ago)
Author:
jchanut
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Users/Model Interfacing/AGRIF

    v6 v7  
    1111== Overview 
    1212 
    13 AGRIF (Adaptive Grid Refinement In Fortran) is a library that allows the seamless refinement of rectangular regions in NEMO. Activating AGRIF requires the cpp key "key_agrif" to be defined at compilation time. Although this is transparent to users, the way the code is processed during compilation is different from the standard case: a preprocessing stage (the so called "conv" program) translates the actual code so that saved arrays may be be switched in memory space from one domain to an other.  
     13AGRIF (Adaptive Grid Refinement In Fortran) is a library that allows the seamless refinement of rectangular regions in NEMO. Activating AGRIF requires to append the cpp key "key_agrif" at compilation time:  
     14{{{ 
     15./makenemo add_key "key_agrif" 
     16}}} 
     17Although this is transparent to users, the way the code is processed during compilation is different from the standard case: a preprocessing stage (the so called "conv" program) translates the actual code so that saved arrays may be be switched in memory space from one domain to an other.  
    1418 
    1519An additional text file "AGRIF_FixedGrids.in" is also required at run time. This is where the grid hierarchy is defined. An example of such a file, here taken from the VORTEX test case, is given below:  
     
    19230 
    2024}}} 
    21 The first line indicates the number of zooms (1). The second line contains the starting and ending indexes in both directions on the root grid (19 38 19 38) followed by the space and time refinement factors (3 3 3). The last line is the number of child grid nested in the refined region (0). A more complex example with telescoping grids can be found in the AGRIF_DEMO reference configuration directory (NEMO 4.0 only).  
     25The first line indicates the number of zooms (1). The second line contains the starting and ending indexes in both directions on the root grid (19 38 19 38) followed by the space and time refinement factors (3 3 3). The last line is the number of child grid nested in the refined region (0). A more complex example with telescoping grids can be found below and in the AGRIF_DEMO reference configuration directory (NEMO 4.0 only).  
    2226 
    2327Note that rectangular regions must be defined so that they are connected to a single parent grid. Hence, defining for instance overlapping grids with the same refinement ratio will not work properly, boundary data exchange and update being only performed between root and child grids. 
     
    2529Knowing the refinement factors and area, a pre-processing tool (NESTING directory in tools) may help to create needed input files (mesh file, restart, climatological and forcing files). The key here to maintain robustness is to ensure volume matching near the child grid interface, a step done by invoking the Agrif_create_bathy.exe program. You may use the namelists provided in the NESTING directory as a guide. These correspond to the namelists used to create AGRIF_DEMO inputs.  
    2630 
    27 AGRIF is continuously maintained so that it can be activated with all NEMO components (OPA, sea-ice, TOP). Depending on NEMO version, it is nevertheless not the case so that some options may not be compatible with the use of online grid refinement. Check out the table below to know the status according to the NEMO release you may use. 
     31== AGRIF Compatibility from NEMO 3.6 to NEMO 4.0  
     32AGRIF is continuously maintained so that it could be activated with all NEMO components (OPA, sea-ice, TOP). Depending on NEMO version, it is nevertheless not the case so that some options may not be compatible with the use of online grid refinement. Check out the table below to know the status according to the NEMO release you may use. 
     33 
     34 * Status of available options with AGRIF (if not listed, option is compatible with AGRIF): 
    2835  
    2936  {{{#!td style="border: none;" 
    3037    {{{#!table 
    3138      {{{#!th 
    32         Component or option compatible with AGRIF 
     39         
    3340      }}} 
    3441      {{{#!th 
     
    7077      |- 
    7178      {{{#!th 
     79        GLS vertical mixing 
     80      }}} 
     81      {{{#!th 
     82        no 
     83      }}} 
     84      {{{#!th 
     85        yes 
     86      }}} 
     87      |- 
     88      {{{#!th 
    7289        z* 
    7390      }}} 
     
    8097      |- 
    8198      {{{#!th 
    82         Icebergs 
     99        z~ 
     100      }}} 
     101      {{{#!th 
     102        no 
     103      }}} 
     104      {{{#!th 
     105        no 
     106      }}} 
     107      |- 
     108      {{{#!th 
     109        Lagrangian icebergs 
     110      }}} 
     111      {{{#!th 
     112        no 
     113      }}} 
     114      {{{#!th 
     115        no 
     116      }}} 
     117      |- 
     118      {{{#!th 
     119        Online timing 
     120      }}} 
     121      {{{#!th 
     122        no 
     123      }}} 
     124      {{{#!th 
     125        no 
     126      }}} 
     127      |- 
     128      {{{#!th 
     129        Stochastic parameterization 
    83130      }}} 
    84131      {{{#!th 
     
    111158  }}} 
    112159 
    113 == Available in the 3_6 revision of NEMO  
    114  
    115 [[span(''To be completed'', style=background-color:lime)]] 
    116  
    117 === AGRIF demonstrator in reference configuration 
    118  
    119 * The [wiki:Users/ReferenceConfigurations/ORCA2_LIM3_PISCES global reference configuration includes a demonstrator for using AGRIF in NEMO]  
    120  
     160 * Number of ghost cells change: 
     161The default number of ghost cells (i.e. the number of cells that serve as open boundary data provision) has been increased from 1 to 3 in NEMO 4.0. This allows to properly handle boundary conditions for numerical scheme that have a discretization order greater than 2. On the user point of view this does not change anything except in the definition of level 1 grids in the AGRIF_FixedGrids.in file. In order to retrieve exactly the position of a nested grid in NEMO 4.0 one has to shift indices by 2 points to the south-west. Taking the VORTEX example above for NEMO 4.0, the "old" NEMO 3.6 corresponding file would contain: 
     162{{{ 
     1631 
     16421 40 21 40 3 3 3 
     1650 
     166}}} 
    121167 
    122168== Available in the forthcoming 4.0 
     
    128174    [[Image(wiki:Users/ModelInterfacing/AGRIF:AGRIF_DEMO.jpg,width=600)]] 
    129175  }}} 
     176 
     177Corresponding AGRIF_FixedGrids.in file is given by: 
     178{{{ 
     1792 
     18042 82 49 91 1 1 1 
     181122 153 110 143 4 4 4 
     1820 
     1831 
     18438 80 71 111 3 3 3 
     1850 
     186}}} 
    130187 
    131188=== New tests cases demonstrating some major features of AGRIF with NEMO: