Agrif and vertical remap

Hello all,
I use DOMAINcfg to define a parent grid mesh, and some children.
I define the vertical zps layers by specifying ppkt, ppacr, ppdzmin, pphmax in the &namdom namelist. Then, in &namcfg , I define jpkdta and jpkglo (59 in my case).
When I use 59 layers in all grids, everything runs fine. 2_ocean.output tells me that I can use less layers in the second child grid (28 layers), so I try to follow the procedure here https://sites.nemo-ocean.io/user-guide/zooms.html ; I change jpkglo to 28, and leave jpkdta=59 ; in &namagrif, I put ln_vert_remap to .true.
The expected effect is that in the child, I use just 28 layers corresponding to the 28 top layers out of the 59 levels in the parent grid.
However, in the child grid, I have 28 layers with larger depths, e.g. layer 1 has a depth of 4.0 meter instead of 1.0 meter, and so on. Layer 28 has a depth corresponding more or less to the depth of layer 59 in the parent grid.
What namelist option am I missing, so that DOMAINcfg creates the right 28 layers in the child ?
Thank you !
PS I’m using version 4.2.0

Hi again,
I went around the problem by running DOMAINcfg to create all domains with 59 levels, then I cut the children nav_lev dimension in the children domain_cfg files (keeping only the upper layers), and also edit the jpkglo variable in the same files.
In NEMO itself, I just put ln_vert_remap=.true. , and indeed this seems to work. The children output files have now only the required vertical levels.
However the computing time is actually worse than when keeping all levels (10% slower); I suppose using vertical remapping runs the vertical interpolation algorithm even though the levels are exactly the same ; and this takes as much time as not using vertical remapping and actually looping over all 59 levels ?
Thanks !

Hi,

In your vertical grid definition, do you have ppa0 = ppa1 = ppsur = 999999.0 (e.g. in your namelist_cfg) ? If yes, there may be an issue in the code indeed. I noticed that in that case some vertical grid parameters in domzgr.F90 (zgr_z routine, line 453, depend on jpkglo and not jpkdta.

Unless the vertical grids are different (I mean, the locations of vertical levels are different, not only the number of levels), you should not use ln_vert_remap=.true.. It’s obviously more expensive and useless. I feel your problem is just having less vertical levels on your child grids, right ?

Hi,
Yes, in the namelists used by DOMAINcfg tool, for all the parent and child domains, I use ppsur=ppa0=ppa1=999999.0 ; the vertical grid is constructed using ppkth, ppacr, ppdzmin, pphmax.
And indeed, I would like to use exactly the same vertical levels in all grids, except that the child uses less levels (e.g. 28) than the parent (59 levels), so no interpolation should be needed. I will try using less levels but setting ln_vert_remap=.false. (in the namelists in Nemo itself).
Thanks,
Luc

Yes, but with the DOMAINcfg code as it is, then you need to specify ppsur, ppa0, ppa1 to something different than a special value (999999.0). Otherwise you won’t retrieve the same vertical grids with different jpkglo values.