Open oceanaguiar opened 10 months ago
I've added Tim Graham here (action after the last JMMP-GO meeting) for consultation on the time-step to adopt for NEMO, ensuring we use the same value for forced and coupled model runs.
These are a list of potential issues from the NEMO 5 beta release notes identified by Diego and myself.
New features
Missing functionalities: RK3 cannot yet handle the trends, explicit time stepping, wetting and drying, and assimilation. Additional options like Shuman averaging for internal wave damping (
ln_shuman=T
) and the automation of the temporal dissipation for barotropic equations (nn_bt_flt=3
) are available but not fully tested.
We should use the Modified Leap Frog scheme for the GOSI10 NEMO 5 release, but we can still test RK3
Reduction of the memory footprint. For instance, the type of vertical coordinates is controlled by cpp keys (
key_vco_1d
,key_vco_1d3d
,key_vco_3d
) to reduce memory access.
key_vco_1d
= flat bottom (only works for z-coordinates)key_vco_1d3d
= 1D scale factor at w-level and 3D scale factor at t-level (used in most configurations).key_vco_3d
= full 3D scale factors (required for s-coordinates)
For partial-step z-coordinates (zps) we should use key_vco_1d3d
, but for more generalised vertical coordinates (e.g. multi-envelope or vanishing quasi-sigma) we must use key_vco_3d
.
The Courant number dependent implicit vertical advection (
ln_zad_Aimp
) is implemented for vector form in addition to the flux form.
What approach was taken before if this is now supported? Requires testing/checking
Removed features
We should test the QCO vertical coordinate (key_qco
) at v4.2.2 before porting to NEMO 5, as VVL will no longer be available
Namelist changes
NEMO
nn_fct_imp
has been added- this determines the method used for the adaptive-implicit vertical advection calculation in the FCT scheme
In FCT, the implicit part can be approximated (
nn_fct_imp=1
) or fully accurate but costly (nn_fct_imp=2
). Implicit is not yet coded for UBS tracer advection (ln_traadv_ubs
).
The default (1
) is the new "optimised" method that is more computationally efficient. I think 2
corresponds to the old scheme. Should we worry about switching back to the old scheme for traceability, given that NEMO 5 will change results anyway?
ln_bt_av
has been removed
ln_bt_av
is removed (replaced by the choice ofnn_bt_flt
)
ln_bt_av=.true.
is equivalent to nn_bt_flt=1
- we already use this, so we just need to remove ln_bt_av
from the suite namelist
SI3
rn_sinew
has been added and needs checking
If using the old parameterization (
nn_icesal=2
), be careful to changern_sinew
as well.
General points
Do we need to ensure that all namelist parameters appear in the suite rose-app.conf?
nn_vvl_interp
changes in NEMO 4.2.2)Other code changes
Removal of unnecessary halo calculations
We should take care to check that the GOSI code is consistent with these new array sizes. This is easy to check with the appropriate compiler options.
Tiling is off by default (ln_tile=.false.
) and I suggest we keep it that way for now. The main reason for this is that we would also have to provide optimal tile sizes for each configuration and each machine that will be running GOSI10. Additionally, we wouldn't have to modify the GOSI code for the tiling.
@dcalve , @oceandie , thanks for this breakdown, it is really helpful! Regarding:
My personal preference would be to make use of the namelist_ref and namelist_cfg, with only changes relevant to a configuration in the namelist_cfg. There have been other 'gotchas' in the past where the default behaviour has changed (e.g. with the EOS back in v3.6, or the way ln_closea is handled in v4 > v4.2), so keeping conscious choices separate from unconscious choices can be helpful. That said, I don't work a lot with rose suites, and there are utilities around that can cleanly separate just the _cfg changes from a rose generated namelist.
See #22
key_qco
)When key_qco
is used, various arrays associated with the vertical coordinate system are substituted for arithmetic expressions via CPP macros defined in src/OCE/DOM/domzgr_substitute.h90. For example:
# define e3t(i,j,k,t) (e3t_0(i,j,k)*(1._wp+r3t(i,j,t)*tmask(i,j,k)))
# define e3u(i,j,k,t) (e3u_0(i,j,k)*(1._wp+r3u(i,j,t)*umask(i,j,k)))
# define e3v(i,j,k,t) (e3v_0(i,j,k)*(1._wp+r3v(i,j,t)*vmask(i,j,k)))
# define e3f(i,j,k) (e3f_0(i,j,k)*(1._wp+r3f(i,j)*fmask(i,j,k)))
# define e3w(i,j,k,t) (e3w_0(i,j,k)*(1._wp+r3t(i,j,t)))
# define e3uw(i,j,k,t) (e3uw_0(i,j,k)*(1._wp+r3u(i,j,t)))
# define e3vw(i,j,k,t) (e3vw_0(i,j,k)*(1._wp+r3v(i,j,t)))
These were introduced in NEMO 4.2 as a replacement for VVL and are now the only option in NEMO 5.0.
The macros are a bit more complicated in NEMO 5.0 due to the introduction of key_vco*
CPP keys. E.g. e3t
in the above example becomes:
# if defined key_vco_1d
# define e3t(i,j,k,t) (e3t_1d(k)*(1._wp+r3t(i,j,t)*tmask(i,j,k)))
# elif defined key_vco_1d3d || defined key_vco_3d
# define e3t(i,j,k,t) (e3t_3d(i,j,k)*(1._wp+r3t(i,j,t)*tmask(i,j,k)))
# endif
In summary, QCO causes several vertical coordinate arrays in the NEMO source code to be replaced by algebraic expressions during the preprocessing step of compilation. The main purpose of this is to reduce memory consumption- in the above examples, e3t
is no longer a 4D variable but instead comprised of 2D and 3D variables. A very small impact on results should be expected.
More information can be found in the migration section of the NEMO user guide and in this ticket.
These array changes should generally have little impact, but some use cases to bear in mind are:
e3t(:,:,:,:)
)
(e3t_1d(:)*(1._wp+r3t(:,:,:)*tmask(:,:,:)))
, which would cause a conformance error due to the different shapes of the arrayse3t
in diawri.F90) and use this as the argumentThese will generally cause compilation failures, and so should be easy to spot.
Thanks @dcalve, very clear! One thing - do you know by any chance if we have say on how to document / explain things/changes in the manual and/or official web pages? For example, I think the way the key_qco
is explained in relation to the type of vertical coordinates available in NEMO in migration section is not correct and misleading for the users ...
The manual and user guide have their own repositories:
We are definitely encouraged to contribute to these and any changes go through a review process like the NEMO code. New versions are generally published with each NEMO release, so any corrections or clarifications you would like to make for the NEMO 5 release would be very much appreciated!