MODULE trdmld_trc_oce !!====================================================================== !! *** MODULE trdmld_trc_oce *** !! Ocean trends : set tracer and momentum trend variables !!====================================================================== !!---------------------------------------------------------------------- !! OPA 9.0 , LOCEAN-IPSL (2005) !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/TRD/trdmld_oce.F90,v 1.2 2005/03/27 18:35:23 opalod Exp $ !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- #if defined key_top !!---------------------------------------------------------------------- !! 'key_top' TOP models !!---------------------------------------------------------------------- USE par_oce ! ocean parameters USE par_trc ! passive tracers parameters IMPLICIT NONE PUBLIC !!* Namelist namtoptrd: diagnostics on passive tracers trends INTEGER :: ntrd_trc !: time step frequency dynamics and tracers trends INTEGER :: nctls_trc !: control surface type for trends vertical integration REAL(wp) :: ucf_trc !: unit conversion factor (for netCDF trends outputs) LOGICAL :: ln_trdmld_trc_instant !: flag to diagnose inst./mean ML trc trends LOGICAL :: ln_trdmld_trc_restart !: flag to restart mixed-layer trc diagnostics CHARACTER(len=50) :: cn_trdrst_trc_in !: suffix of pass. tracer restart name (input) CHARACTER(len=50) :: cn_trdrst_trc_out !: suffix of pass. tracer restart name (output) LOGICAL, DIMENSION (jptra) :: luttrd !: large trends diagnostic to write or not (namelist) !!* Passive tracers trends indexes INTEGER, PARAMETER :: jptrc_trd_xad = 1 !: x- horizontal advection INTEGER, PARAMETER :: jptrc_trd_yad = 2 !: y- horizontal advection INTEGER, PARAMETER :: jptrc_trd_zad = 3 !: z- vertical advection INTEGER, PARAMETER :: jptrc_trd_ldf = 4 !: lateral diffusion INTEGER, PARAMETER :: jptrc_trd_zdf = 5 !: vertical diffusion (Kz) INTEGER, PARAMETER :: jptrc_trd_xei = 6 !: x- horiz. EIV advection INTEGER, PARAMETER :: jptrc_trd_yei = 7 !: y- horiz. EIV advection INTEGER, PARAMETER :: jptrc_trd_zei = 8 !: z- vert. EIV advection INTEGER, PARAMETER :: jptrc_trd_bbc = 9 !: Bottom Boundary Condition (geoth. flux) INTEGER, PARAMETER :: jptrc_trd_bbl = 10 !: Bottom Boundary Layer (diffusive/convective) INTEGER, PARAMETER :: jptrc_trd_dmp = 11 !: damping INTEGER, PARAMETER :: jptrc_trd_sbc = 12 !: surface boundary condition INTEGER, PARAMETER :: jptrc_trd_sms = 13 !: sources m. sinks INTEGER, PARAMETER :: jptrc_trd_radn = 14 !: corr. trn<0 in trcrad INTEGER, PARAMETER :: jptrc_trd_radb = 15 !: corr. trb<0 in trcrad (like atf) INTEGER, PARAMETER :: jptrc_trd_atf = 16 !: Asselin correction #if defined key_trdmld_trc !!---------------------------------------------------------------------- !! 'key_trdmld_trc' mixed layer trends diagnostics !!---------------------------------------------------------------------- LOGICAL, PARAMETER :: lk_trdmld_trc = .TRUE. !: ML trend flag LOGICAL, PARAMETER :: l_trdtrc = .TRUE. !: passive tracers trend flag INTEGER, PARAMETER :: & !: mixed layer trends indices jpmld_trc_xad = 1, & !: zonal \ jpmld_trc_yad = 2, & !: meridonal > advection jpmld_trc_zad = 3, & !: vertical / jpmld_trc_ldf = 4, & !: lateral diffusion (geopot. or iso-neutral) jpmld_trc_zdf = 5, & !: vertical diffusion (TKE) jpmld_trc_xei = 6, & !: zonal \ jpmld_trc_yei = 7, & !: meridional > eddy induced advection jpmld_trc_zei = 8, & !: vertical / jpmld_trc_bbc = 9, & !: geothermal flux jpmld_trc_bbl = 10, & !: bottom boundary layer (advective/diffusive) jpmld_trc_dmp = 11, & !: internal restoring trend jpmld_trc_sbc = 12, & !: forcing jpmld_trc_sms = 13, & !: sources minus sinks trend ! jpmld_trc_xxx = xx, & !: add here any additional trend (** AND UPDATE JPLTRD_TRC BELOW **) jpmld_trc_radn = 14, & !: corr. trn<0 in trcrad jpmld_trc_radb = 15, & !: corr. trb<0 in trcrad (like atf) (** MUST BE BEFORE THE LAST ONE **) jpmld_trc_atf = 16 !: asselin trend (** MUST BE THE LAST ONE**) !! Trends diagnostics parameters !!--------------------------------------------------------------------- INTEGER, PARAMETER :: & jpltrd_trc = 16, & !: number of mixed-layer trends arrays jpktrd_trc = jpk !: max level for mixed-layer trends diag. !! Arrays used for diagnosing mixed-layer trends !!--------------------------------------------------------------------- CHARACTER(LEN=80) :: clname_trc, ctrd_trc(jpltrd_trc+1,2) INTEGER, DIMENSION(jpi,jpj) :: & nmld_trc , & !: mixed layer depth indexes nbol_trc !: mixed-layer depth indexes when read from file REAL(wp), DIMENSION(jpi,jpj,jpk) :: wkx_trc !: REAL(wp), DIMENSION(jpi,jpj) :: rmld_trc !: ML depth (m) corresponding to nmld_trc REAL(wp), DIMENSION(jpi,jpj) :: rmld_sum_trc !: needed to compute the leap-frog time mean of ML depth REAL(wp), DIMENSION(jpi,jpj) :: rmldbn_trc !: idem REAL(wp), DIMENSION(jpi,jpj,jptra) :: & tml_trc , & !: \ "now" mixed layer temperature/salinity tmlb_trc , & !: / and associated "before" fields tmlbb_trc , & !: \ idem, but valid at the 1rst time step of the tmlbn_trc , & !: / current analysis window tml_sum_trc, & !: mixed layer T, summed over the current analysis period tml_sumb_trc, & !: idem, but from the previous analysis period tmltrd_atf_sumb_trc, & !: Asselin trends, summed over the previous analysis period tmltrd_rad_sumb_trc !: trends due to trb correction in trcrad.F90, summed over the !: previous analysis period REAL(wp), DIMENSION(jpi,jpj,jptra) :: & tmlatfb_trc, tmlatfn_trc , & !: "before" Asselin contrib. at beginning of the averaging !: period (i.e. last contrib. from previous such period) !: and "now" Asselin contrib. to the ML trc. trends tmlatfm_trc, & !: accumulator for Asselin trends (needed for storage only) tmlradb_trc, tmlradn_trc , & !: similar to Asselin above, but for the trend due to trb !: correction in trcrad.F90 tmlradm_trc !: accumulator for the previous trcrad trend REAL(wp), DIMENSION(jpi,jpj,jpltrd_trc,jptra) :: & tmltrd_trc, & !: \ physical contributions to the total trend (for T/S), !: / cumulated over the current analysis window tmltrd_sum_trc, & !: sum of these trends over the analysis period tmltrd_csum_ln_trc, & !: now cumulated sum of trends over the "lower triangle" tmltrd_csum_ub_trc !: before (prev. analysis period) cumulated sum over the !: upper triangle REAL(wp), DIMENSION(jpi,jpj,jptra) :: & tmltrdm_trc !: total cumulative trends over the analysis window #else LOGICAL, PARAMETER :: lk_trdmld_trc = .FALSE. !: ML trend flag LOGICAL, PARAMETER :: l_trdtrc = .FALSE. !: passive tracers trend flag #endif #if defined key_lobster CHARACTER(LEN=80) :: clname_bio, ctrd_bio(jpdiabio,2) REAL(wp), DIMENSION(jpi,jpj,jpdiabio) :: & tmltrd_bio, & !: \ biological contributions to the total trend , !: / cumulated over the current analysis window tmltrd_sum_bio, & !: sum of these trends over the analysis period tmltrd_csum_ln_bio, & !: now cumulated sum of trends over the "lower triangle" tmltrd_csum_ub_bio !: before (prev. analysis period) cumulated sum over the !: upper triangle #endif #else !!---------------------------------------------------------------------- !! Empty module : No passive tracer !!---------------------------------------------------------------------- #endif END MODULE trdmld_trc_oce