AGRIF: land-sea mask inconsistency between parent and child when using `nn_bathy=3` in DOMAINcfg
Context
When creating an AGRIF zoom with nn_bathy=3
, the bathymetry of the parent domain is linearly interpolated onto the child domain, ensuring volume conservation (two-way nesting). However, currently the code does not guarantee that the child and the parent domains share the same land-sea mask when refining the resolution in the zoom. This is a consequence of the fact that the “zeros of the land areas” are also included in the interpolation procedure, resulting in some strange results like the one depicted below:
- This is the land-sea mask of the parent domain in the proximity of the Gulf Stream separation area:
- This is the land-sea mask of a child zoom with double resolution (in both directions) covering the same area:
As we can see, since the linear interpolation includes the zeros of the land, many coastal features and islands of the parent domain are not represented/heavily modified in the zoom.
In addition, for some applications would be useful to have the possibility to have in the zoom exactly the same bathymetry of the parent while still refining the horizontal resolution of the grid.
Proposal
Introduce a logical namelist flag ln_lin_int
and modify the nn_bathy=3
case so that:
-
nn_bathy=3
&ln_lin_int = .false.
-> the parent and the child share exactly the same bathymetry (i.e.,AGRIF_constant
interpolation scheme, default case) -
nn_bathy=3
&ln_lin_int = .true.
-> the bathymetry of the child is computed linearly interpolating the bathymetry of the parent onto the zoom grid (i.e.,AGRIF_linear
interpolation scheme), but the land-sea mask of the parent is kept unchanged in the child domain.