[1174] | 1 | MODULE trdmld_trc_oce |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trdmld_trc_oce *** |
---|
| 4 | !! Ocean trends : set tracer and momentum trend variables |
---|
| 5 | !!====================================================================== |
---|
| 6 | !!---------------------------------------------------------------------- |
---|
| 7 | !! OPA 9.0 , LOCEAN-IPSL (2005) |
---|
| 8 | !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/TRD/trdmld_oce.F90,v 1.2 2005/03/27 18:35:23 opalod Exp $ |
---|
[2208] | 9 | !! Software governed by the CeCILL licence (NEMOGCM/License_CeCILL.txt) |
---|
[1174] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | #if defined key_top |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
| 13 | !! 'key_top' TOP models |
---|
| 14 | !!---------------------------------------------------------------------- |
---|
| 15 | |
---|
| 16 | USE par_oce ! ocean parameters |
---|
| 17 | USE par_trc ! passive tracers parameters |
---|
| 18 | |
---|
| 19 | IMPLICIT NONE |
---|
| 20 | PUBLIC |
---|
| 21 | |
---|
| 22 | !!* Namelist namtoptrd: diagnostics on passive tracers trends |
---|
| 23 | INTEGER :: ntrd_trc !: time step frequency dynamics and tracers trends |
---|
| 24 | INTEGER :: nctls_trc !: control surface type for trends vertical integration |
---|
| 25 | REAL(wp) :: ucf_trc !: unit conversion factor (for netCDF trends outputs) |
---|
| 26 | LOGICAL :: ln_trdmld_trc_instant !: flag to diagnose inst./mean ML trc trends |
---|
| 27 | LOGICAL :: ln_trdmld_trc_restart !: flag to restart mixed-layer trc diagnostics |
---|
[1284] | 28 | CHARACTER(len=50) :: cn_trdrst_trc_in !: suffix of pass. tracer restart name (input) |
---|
| 29 | CHARACTER(len=50) :: cn_trdrst_trc_out !: suffix of pass. tracer restart name (output) |
---|
[1174] | 30 | LOGICAL, DIMENSION (jptra) :: luttrd !: large trends diagnostic to write or not (namelist) |
---|
| 31 | |
---|
| 32 | !!* Passive tracers trends indexes |
---|
| 33 | INTEGER, PARAMETER :: jptrc_trd_xad = 1 !: x- horizontal advection |
---|
| 34 | INTEGER, PARAMETER :: jptrc_trd_yad = 2 !: y- horizontal advection |
---|
| 35 | INTEGER, PARAMETER :: jptrc_trd_zad = 3 !: z- vertical advection |
---|
| 36 | INTEGER, PARAMETER :: jptrc_trd_ldf = 4 !: lateral diffusion |
---|
| 37 | INTEGER, PARAMETER :: jptrc_trd_zdf = 5 !: vertical diffusion (Kz) |
---|
| 38 | INTEGER, PARAMETER :: jptrc_trd_xei = 6 !: x- horiz. EIV advection |
---|
| 39 | INTEGER, PARAMETER :: jptrc_trd_yei = 7 !: y- horiz. EIV advection |
---|
| 40 | INTEGER, PARAMETER :: jptrc_trd_zei = 8 !: z- vert. EIV advection |
---|
| 41 | INTEGER, PARAMETER :: jptrc_trd_bbc = 9 !: Bottom Boundary Condition (geoth. flux) |
---|
| 42 | INTEGER, PARAMETER :: jptrc_trd_bbl = 10 !: Bottom Boundary Layer (diffusive/convective) |
---|
| 43 | INTEGER, PARAMETER :: jptrc_trd_dmp = 11 !: damping |
---|
| 44 | INTEGER, PARAMETER :: jptrc_trd_sbc = 12 !: surface boundary condition |
---|
| 45 | INTEGER, PARAMETER :: jptrc_trd_sms = 13 !: sources m. sinks |
---|
| 46 | INTEGER, PARAMETER :: jptrc_trd_radn = 14 !: corr. trn<0 in trcrad |
---|
| 47 | INTEGER, PARAMETER :: jptrc_trd_radb = 15 !: corr. trb<0 in trcrad (like atf) |
---|
| 48 | INTEGER, PARAMETER :: jptrc_trd_atf = 16 !: Asselin correction |
---|
| 49 | |
---|
| 50 | #if defined key_trdmld_trc |
---|
| 51 | !!---------------------------------------------------------------------- |
---|
| 52 | !! 'key_trdmld_trc' mixed layer trends diagnostics |
---|
| 53 | !!---------------------------------------------------------------------- |
---|
| 54 | |
---|
| 55 | LOGICAL, PARAMETER :: lk_trdmld_trc = .TRUE. !: ML trend flag |
---|
| 56 | LOGICAL, PARAMETER :: l_trdtrc = .TRUE. !: passive tracers trend flag |
---|
| 57 | |
---|
| 58 | INTEGER, PARAMETER :: & !: mixed layer trends indices |
---|
| 59 | jpmld_trc_xad = 1, & !: zonal \ |
---|
| 60 | jpmld_trc_yad = 2, & !: meridonal > advection |
---|
| 61 | jpmld_trc_zad = 3, & !: vertical / |
---|
| 62 | jpmld_trc_ldf = 4, & !: lateral diffusion (geopot. or iso-neutral) |
---|
| 63 | jpmld_trc_zdf = 5, & !: vertical diffusion (TKE) |
---|
| 64 | jpmld_trc_xei = 6, & !: zonal \ |
---|
| 65 | jpmld_trc_yei = 7, & !: meridional > eddy induced advection |
---|
| 66 | jpmld_trc_zei = 8, & !: vertical / |
---|
| 67 | jpmld_trc_bbc = 9, & !: geothermal flux |
---|
| 68 | jpmld_trc_bbl = 10, & !: bottom boundary layer (advective/diffusive) |
---|
| 69 | jpmld_trc_dmp = 11, & !: internal restoring trend |
---|
| 70 | jpmld_trc_sbc = 12, & !: forcing |
---|
| 71 | jpmld_trc_sms = 13, & !: sources minus sinks trend |
---|
| 72 | ! jpmld_trc_xxx = xx, & !: add here any additional trend (** AND UPDATE JPLTRD_TRC BELOW **) |
---|
| 73 | jpmld_trc_radn = 14, & !: corr. trn<0 in trcrad |
---|
| 74 | jpmld_trc_radb = 15, & !: corr. trb<0 in trcrad (like atf) (** MUST BE BEFORE THE LAST ONE **) |
---|
| 75 | jpmld_trc_atf = 16 !: asselin trend (** MUST BE THE LAST ONE**) |
---|
| 76 | |
---|
| 77 | !! Trends diagnostics parameters |
---|
| 78 | !!--------------------------------------------------------------------- |
---|
| 79 | INTEGER, PARAMETER :: & |
---|
| 80 | jpltrd_trc = 16, & !: number of mixed-layer trends arrays |
---|
| 81 | jpktrd_trc = jpk !: max level for mixed-layer trends diag. |
---|
| 82 | |
---|
| 83 | !! Arrays used for diagnosing mixed-layer trends |
---|
| 84 | !!--------------------------------------------------------------------- |
---|
| 85 | CHARACTER(LEN=80) :: clname_trc, ctrd_trc(jpltrd_trc+1,2) |
---|
| 86 | |
---|
| 87 | INTEGER, DIMENSION(jpi,jpj) :: & |
---|
| 88 | nmld_trc , & !: mixed layer depth indexes |
---|
| 89 | nbol_trc !: mixed-layer depth indexes when read from file |
---|
| 90 | |
---|
| 91 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: wkx_trc !: |
---|
| 92 | |
---|
| 93 | REAL(wp), DIMENSION(jpi,jpj) :: rmld_trc !: ML depth (m) corresponding to nmld_trc |
---|
| 94 | REAL(wp), DIMENSION(jpi,jpj) :: rmld_sum_trc !: needed to compute the leap-frog time mean of ML depth |
---|
| 95 | REAL(wp), DIMENSION(jpi,jpj) :: rmldbn_trc !: idem |
---|
| 96 | |
---|
| 97 | REAL(wp), DIMENSION(jpi,jpj,jptra) :: & |
---|
| 98 | tml_trc , & !: \ "now" mixed layer temperature/salinity |
---|
| 99 | tmlb_trc , & !: / and associated "before" fields |
---|
| 100 | tmlbb_trc , & !: \ idem, but valid at the 1rst time step of the |
---|
| 101 | tmlbn_trc , & !: / current analysis window |
---|
| 102 | tml_sum_trc, & !: mixed layer T, summed over the current analysis period |
---|
| 103 | tml_sumb_trc, & !: idem, but from the previous analysis period |
---|
| 104 | tmltrd_atf_sumb_trc, & !: Asselin trends, summed over the previous analysis period |
---|
| 105 | tmltrd_rad_sumb_trc !: trends due to trb correction in trcrad.F90, summed over the |
---|
| 106 | !: previous analysis period |
---|
| 107 | |
---|
| 108 | REAL(wp), DIMENSION(jpi,jpj,jptra) :: & |
---|
| 109 | tmlatfb_trc, tmlatfn_trc , & !: "before" Asselin contrib. at beginning of the averaging |
---|
| 110 | !: period (i.e. last contrib. from previous such period) |
---|
| 111 | !: and "now" Asselin contrib. to the ML trc. trends |
---|
| 112 | tmlatfm_trc, & !: accumulator for Asselin trends (needed for storage only) |
---|
| 113 | tmlradb_trc, tmlradn_trc , & !: similar to Asselin above, but for the trend due to trb |
---|
| 114 | !: correction in trcrad.F90 |
---|
| 115 | tmlradm_trc !: accumulator for the previous trcrad trend |
---|
| 116 | |
---|
| 117 | REAL(wp), DIMENSION(jpi,jpj,jpltrd_trc,jptra) :: & |
---|
| 118 | tmltrd_trc, & !: \ physical contributions to the total trend (for T/S), |
---|
| 119 | !: / cumulated over the current analysis window |
---|
| 120 | tmltrd_sum_trc, & !: sum of these trends over the analysis period |
---|
| 121 | tmltrd_csum_ln_trc, & !: now cumulated sum of trends over the "lower triangle" |
---|
| 122 | tmltrd_csum_ub_trc !: before (prev. analysis period) cumulated sum over the |
---|
| 123 | !: upper triangle |
---|
| 124 | REAL(wp), DIMENSION(jpi,jpj,jptra) :: & |
---|
| 125 | tmltrdm_trc !: total cumulative trends over the analysis window |
---|
| 126 | |
---|
| 127 | #else |
---|
| 128 | LOGICAL, PARAMETER :: lk_trdmld_trc = .FALSE. !: ML trend flag |
---|
| 129 | LOGICAL, PARAMETER :: l_trdtrc = .FALSE. !: passive tracers trend flag |
---|
| 130 | #endif |
---|
| 131 | |
---|
[1175] | 132 | #if defined key_lobster |
---|
| 133 | CHARACTER(LEN=80) :: clname_bio, ctrd_bio(jpdiabio,2) |
---|
| 134 | REAL(wp), DIMENSION(jpi,jpj,jpdiabio) :: & |
---|
| 135 | tmltrd_bio, & !: \ biological contributions to the total trend , |
---|
| 136 | !: / cumulated over the current analysis window |
---|
| 137 | tmltrd_sum_bio, & !: sum of these trends over the analysis period |
---|
| 138 | tmltrd_csum_ln_bio, & !: now cumulated sum of trends over the "lower triangle" |
---|
| 139 | tmltrd_csum_ub_bio !: before (prev. analysis period) cumulated sum over the |
---|
| 140 | !: upper triangle |
---|
| 141 | #endif |
---|
[1174] | 142 | |
---|
| 143 | #else |
---|
| 144 | !!---------------------------------------------------------------------- |
---|
| 145 | !! Empty module : No passive tracer |
---|
| 146 | !!---------------------------------------------------------------------- |
---|
| 147 | #endif |
---|
| 148 | |
---|
| 149 | |
---|
| 150 | END MODULE trdmld_trc_oce |
---|