New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Users/SetupNewConfiguration/AGRIF-nesting-tool – NEMO
wiki:Users/SetupNewConfiguration/AGRIF-nesting-tool

Version 6 (modified by cbricaud, 7 years ago) (diff)

--

AGRIF nesting tools

AGRIF 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. This page aims to explain the way to run an embedded model by using the NEMO/AGRIF framework in a pre-defined configuration. In this way we are going to describe here how to provide the grid coordinates, the surface forcing and the initial conditions required by each child model. In order to become familiar with NEMO/AGRIF, you should read it even if you are going to create your own configuration.

Downloads :

Nesting tools source code : Nesting_tools.tar 430.00 kB

documentation (pdf) : doc_nesting_tools.pdf 3.07 MB

NEMO User's meeting 2006 presentation (pdf ) : AGRIF_talk.pdf 2.14 MB

attached movie ITF (mpg): film_lev1.mpg 6.93 MB

1. Preparing the child model

One of the features of the AGRIF package is its ability to deal with the use of fixed fine grids in the domain. Here are presented the various basic knowledges every user should have in order to define his child grid domain.

=1.1 Refinement ratio=

In order to implement an embedded model user have to specify his space and time refinement ratio. Every integer number is allowed by AGRIF indeed even and odd refinement ratio in space as well as in time could be chosen. But user have to keep in mind that a too large value could imply numerical troubles, in this way a value between 2 and 5 seems to be an acceptable choice. Localization of fine grid points for odd and even refinement ratio are described in the figure below Concerning time refinement ratio, there is no specific criterion to determine its value but of course the selected value must prevent the model from blowing up.

=1.2 Child Grid Position=

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:

  • ibeg = imin+ptx-1 in x-direction
  • jbeg = jmin+pty-1 in y-direction

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 :

point type ptx pty
T 3 3
U 2 3
V 3 2
F 2 2

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:

Then 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.

Typically a line contains those information in this order : imin imax jmin jmax spacerefx spacerefy timeref Let'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 :

Attachments (8)