Changes between Version 11 and Version 12 of Users/Setup New Configuration/AGRIF-nesting-tool


Ignore:
Timestamp:
2017-03-30T01:30:55+02:00 (3 years ago)
Author:
nicolasmartin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Users/Setup New Configuration/AGRIF-nesting-tool

    v11 v12  
    22= AGRIF nesting tools 
    33 
     4Last edition: '''[[Wikinfo(changed_ts)]]''' by '''[[Wikinfo(changed_by)]]''' 
     5 
    46[[PageOutline(2, ,inline)]] 
    5  
    6 Last edition: '''[[Wikinfo(changed_ts)]]''' by '''[[Wikinfo(changed_by)]]''' 
    77 
    88AGRIF is a package for the integration of adaptive mesh refinement (AMR) features within a multidimensional model written in Fortran and discretized on a structured grid. This nesting capability that allows resolution to be focused over a region of interest by introducing an additional grid has been added to NEMO. In the current implementation only horizontal refinement is available. 
     
    1616documentation (pdf) : [[AttachmentNum(2, raw=true)]] 
    1717 
    18 NEMO User's meeting 2006 presentation (pdf ) : [[AttachmentNum(3, raw=true)]] 
     18NEMO User's meeting 2006 presentation (pdf) : [[AttachmentNum(3, raw=true)]] 
    1919 
    2020attached movie ITF (mpg): [[AttachmentNum(4)]] 
     
    3030=== Child Grid Position 
    3131 
    32 The nested grids are rectangular and are aligned with the parent (coarser) grid within they are nested. imin,imax,jmin and jmax refer to the positions of the child grid corners, in terms of its parent grid starting with the value 1 in each space direction. When the user chooses these positions, one has to take care that fine grid is contained in the parent grid. (imin,jmin) are the lower left corner position and (imax,jmax) are the upper right corner position. The indice of the first grid point inside the fine domain is given by the formulae: 
    33 * ibeg = imin+ptx-1 in x-direction 
    34 * jbeg = jmin+pty-1 in y-direction 
     32The nested grids are rectangular and are aligned with the parent (coarser) grid within they are nested. $i_{min}$, $i_{max}$, $j_{min}$ and $j_{max}$ refer to the positions of the child grid corners, in terms of its parent grid starting with the value 1 in each space direction. When the user chooses these positions, one has to take care that fine grid is contained in the parent grid. ($i_{min}$,$j_{min}$) are the lower left corner position and ($i_{max}$,$j_{max}$) are the upper right corner position. The indice of the first grid point inside the fine domain is given by the formulae: 
     33* $i_{beg} = i_{min} + pt_{x} - 1$ in $x$ direction 
     34* $j_{beg} = j_{min} + pt_{y} - 1$ in $y$ direction 
    3535 
    36 Where ptx and pty are indexes of the first fine grid point inside the domain, those values depend on the staggered variable. In the NEMO framework there is two ghost cells around fine grids so the ptx and pty values are the following :  
    37 ||point type||ptx       ||pty ||                  
    38 ||T         ||3         || 3  || 
    39 ||U         ||2         || 3  || 
    40 ||V         ||3         || 2  || 
    41 ||F         ||2         || 2  || 
     36Where $pt_{x}$ and $pt_{y}$ are indexes of the first fine grid point inside the domain, those values depend on the staggered variable. In the NEMO framework there is two ghost cells around fine grids so the ptx and pty values are the following :  
     37||point type||$pt_{x}$ ||$pt_{y}$ ||              
     38||T         ||3        || 3       || 
     39||U         ||2        || 3       || 
     40||V         ||3        || 2       || 
     41||F         ||2        || 2       || 
    4242 
    4343[[Image(AGRIF-Variable-Position.jpg)]] 
    4444 
    45 This is a quite important feature to know in order to properly choose integers imin,imax,jmin and jmax for your fine grid domain definition. Indeed the indice of the first coarse grid point inside child domain is (imin+2,jmin+2) and not (imin,jmin). To sum up, the configuration of a given AGRIF zoom on a coarse domain for a 1:3 refinement ratio is described here: 
     45This is a quite important feature to know in order to properly choose integers $i_{min}$, $i_{max}$, $j_{min}$ and $j_{max}$ for your fine grid domain definition. Indeed the indice of the first coarse grid point inside child domain is ($i_{min} + 2$,$j_{min} + 2$) and not ($i_{min}$,$j_{min}$). To sum up, the configuration of a given AGRIF zoom on a coarse domain for a 1:3 refinement ratio is described here: 
    4646 
    4747[[Image(AGRIF-Grid-Definition.jpg)]] 
     
    4949Then in order to prepare a simulation, user must declare the fine grids characteristics in a file called `AGRIF_FixedGrids.in` which has to be in the directory where the code runs. For each fine grid and each space direction, a line indicates its position on its parent grid as well as its space and time refinement factors. 
    5050 
    51 Typically a line contains those information in this order : `imin imax jmin jmax spacerefx spacerefy timeref` 
     51Typically a line contains those information in this order : $i_{min}$, $i_{max}$, $j_{min}$ $j_{max}$ spacerefx spacerefy timeref[[BR]] 
    5252Let's consider an example with a root coarse grid (G0) which has two child grids (G1) and (G2), and G1 has one child grid (G3). Space and time refinement factors are equal to 3, in this case the `AGRIF_FixedGrids.in` file syntax is the following one :  
    5353 
    54 ||imin  ||imax  ||jmin  ||jmax  ||spacerefx ||spacerefy ||timeref ||             
    55 ||2     ||      ||      ||      ||          ||          ||        ||(G0) has 2 child grids : (G1) and (G2)    || 
    56 ||40    ||70    ||2     ||30    ||3         ||3         ||3       ||positions and refinement factors for (G1) || 
    57 ||110   ||130   ||50    ||80    ||3         ||3         ||3       ||positions and refinement factors for (G2) || 
    58 ||1     ||      ||      ||      ||          ||          ||        ||(G1) has 1 child grid (G3)                || 
    59 ||20    ||40    ||8     ||30    ||3         ||3         ||3       ||positions and refinement factors for (G3) || 
    60 ||0     ||      ||      ||      ||          ||          ||        ||(G2) has no child grid                    || 
    61 ||0     ||      ||      ||      ||          ||          ||        ||(G3) has no child grid                    || 
     54||$i_{min}$ ||$i_{max}$ ||$j_{min}$ ||$j_{max}$ ||spacerefx ||spacerefy ||timeref ||             
     55||2         ||          ||          ||          ||          ||          ||        ||(G0) has 2 child grids : (G1) and (G2)    || 
     56||40        ||70        ||2         ||30        ||3         ||3         ||3       ||positions and refinement factors for (G1) || 
     57||110       ||130       ||50        ||80        ||3         ||3         ||3       ||positions and refinement factors for (G2) || 
     58||1         ||          ||          ||          ||          ||          ||        ||(G1) has 1 child grid (G3)                || 
     59||20        ||40        ||8         ||30        ||3         ||3         ||3       ||positions and refinement factors for (G3) || 
     60||0         ||          ||          ||          ||          ||          ||        ||(G2) has no child grid                    || 
     61||0         ||          ||          ||          ||          ||          ||        ||(G3) has no child grid                    || 
    6262 
    6363[[Image(AGRIF-Hierarchy_medium.jpg​)]]