Changes between Version 6 and Version 7 of Users/ModelInterfacing/AGRIF
- Timestamp:
- 2018-08-30T16:05:37+02:00 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Users/ModelInterfacing/AGRIF
v6 v7 11 11 == Overview 12 12 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. 13 AGRIF (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 }}} 17 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. 14 18 15 19 An 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: … … 19 23 0 20 24 }}} 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).25 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 below and in the AGRIF_DEMO reference configuration directory (NEMO 4.0 only). 22 26 23 27 Note 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. … … 25 29 Knowing 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. 26 30 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 32 AGRIF 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): 28 35 29 36 {{{#!td style="border: none;" 30 37 {{{#!table 31 38 {{{#!th 32 Component or option compatible with AGRIF39 33 40 }}} 34 41 {{{#!th … … 70 77 |- 71 78 {{{#!th 79 GLS vertical mixing 80 }}} 81 {{{#!th 82 no 83 }}} 84 {{{#!th 85 yes 86 }}} 87 |- 88 {{{#!th 72 89 z* 73 90 }}} … … 80 97 |- 81 98 {{{#!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 83 130 }}} 84 131 {{{#!th … … 111 158 }}} 112 159 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: 161 The 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 {{{ 163 1 164 21 40 21 40 3 3 3 165 0 166 }}} 121 167 122 168 == Available in the forthcoming 4.0 … … 128 174 [[Image(wiki:Users/ModelInterfacing/AGRIF:AGRIF_DEMO.jpg,width=600)]] 129 175 }}} 176 177 Corresponding AGRIF_FixedGrids.in file is given by: 178 {{{ 179 2 180 42 82 49 91 1 1 1 181 122 153 110 143 4 4 4 182 0 183 1 184 38 80 71 111 3 3 3 185 0 186 }}} 130 187 131 188 === New tests cases demonstrating some major features of AGRIF with NEMO: