Robust and accurate passive-tracer restart mechanism for configurations with forward Euler time stepping of passive tracers
The passive-tracer restart mechanism of NEMO v4.2 restores the tracer fields at two time levels, even when the forward Euler time-stepping scheme, which only requires one such time level to be restored for an accurate model restart, is in use (ln_top_euler = .true.
in namelist namtrc_run
). Currently, with forward Euler time stepping, the passive-tracer restart fields for the Nbb
time level are output before being equalised with the updated tracer fields for the Nnn
time level at the end of the time step, which leads to the incorrect recreation of the initial passive-tracer state variables after a model restart and, unless explicitly adjusted by the passive-tracer application, to a restartability failure.
The PISCES
biogeochemistry model implementation, which is used to test the TOP
restart mechanism in configurations with forward Euler time stepping by SETTE (the restartability tests of the ORCA2_ICE_PISCES
and ORCA2_OFF_PISCES
configurations), internally rectifies incorrectly restarted tracer fields in the case of forward Euler time stepping before the passive-tracer transport is computed (p4zsms.F90), and as a result the inaccurate passive-tracer restart is not identified by the standard SETTE tests. However, for alternative passive-tracer applications, model restarts can lead to incorrect results (for example with the C14
option, as evidenced by setting ln_c14 = .true.
in namelist namtrc_run
in the ORCA2_ICE_PISCES
SETTE configuration).
In order to ensure the restartability of the forward Euler time stepping of passive tracers irrespective of the selected passive-tracer application, the restart output of passive-tracer fields could be slightly postponed until after the equalisation of the fields at the two time levels at the end of the passive-tracer time step in subroutine trc_stp
of module trcstp
:
--- a/src/TOP/trcstp.F90
+++ b/src/TOP/trcstp.F90
@@ -115,7 +115,6 @@ CONTAINS
IF(lrxios) CALL iom_context_finalize( cr_toprst_cxt )
IF(lwm) CALL FLUSH( numont ) ! flush namelist output
ENDIF
- IF( lrst_trc ) CALL trc_rst_wri ( kt, Kmm, Kaa, Kbb ) ! write tracer restart file
IF( lk_trdmxl_trc ) CALL trd_mxl_trc ( kt, Kaa ) ! trends: Mixed-layer
!
IF( ln_top_euler ) THEN
@@ -125,6 +124,8 @@ CONTAINS
tr(:,:,:,:,Kmm) = tr(:,:,:,:,Kaa)
ENDIF
!
+ IF( lrst_trc ) CALL trc_rst_wri ( kt, Kmm, Kaa, Kbb ) ! write tracer restart file
+ !
IF (ll_trcstat) THEN
ztrai = 0._wp ! content of all tracers
DO jn = 1, jptra