Add passive tracers to abort file
Context
Please provide informations on how to set the modelling environment
-
Reference configuration/test case (to add, chosen or used as template) -
Modifications of versioned files: Fortran routines ( *.[Ffh]90
), namelists (namelist\_*cfg
), outputs settings (*.xml
), ... -
Additional dependencies -
New datasets -
Any other relevant information
Proposal
This is an easy addition to NEMO.
When failing, the model produces an abort file which only contains instantaneous outputs from the dynamical component only.
The idea is to add the passive tracers as well (which could be also causing the model failure.)
this add needs very little changes. just add a reference to trc_wri
in in dia_wri
and call a trc_wri_state module in 'dia_wri_state' if the key_top is defined.
trc_wri_state should look like the following (example from NEMO4.0.x - GOSI9 branch):
SUBROUTINE trc_wri_state( kid ) |
!!---------------------------------------------------------------------
!! *** ROUTINE trc_wri_state ***
!!
!! ** Purpose : create a NetCDF file named cdfile_name which contains
!! the instantaneous ice state and forcing fields for passive tracer model
!! Used to find errors in the initial state or save the last
!! ocean state in case of abnormal end of a simulation
!!
!!---------------------------------------------------------------------
INTEGER, INTENT( in ) :: kid
INTEGER :: jn
CHARACTER (len=20) :: cltra
CALL iom_rstput( 0, 0, kid, 'TMASK', tmask(:,:,:) )
DO jn = 1, jptra
cltra = trim(ctrcnm(jn))
CALL iom_rstput( 0, 0, kid, cltra, trn(:,:,:,jn) )
END DO
IF (ln_medusa) CALL trc_wri_medusa_state( kid ) !! MEDUSA specific output.abort
END SUBROUTINE trc_wri_state
One can also add BGC model specific outputs doing like is done in the example for medusa (it's GOSI9 - that's why MEDUSA is there).