New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
trdmld_trc_oce.F90 in trunk/NEMO/TOP_SRC/TRP – NEMO

source: trunk/NEMO/TOP_SRC/TRP/trdmld_trc_oce.F90 @ 1175

Last change on this file since 1175 was 1175, checked in by cetlod, 16 years ago

update transport modules to take into account new trends organization, see ticket:248

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