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_oce.F90 in tags/nemo_v3_2/nemo_v3_2/NEMO/OPA_SRC/TRD – NEMO

source: tags/nemo_v3_2/nemo_v3_2/NEMO/OPA_SRC/TRD/trdmld_oce.F90 @ 1878

Last change on this file since 1878 was 1878, checked in by flavoni, 14 years ago

initial test for nemogcm

File size: 5.1 KB
Line 
1MODULE trdmld_oce
2   !!======================================================================
3   !!                   ***  MODULE trdmld_oce  ***
4   !! Ocean trends :   set tracer and momentum trend variables
5   !!======================================================================
6   !! History :  9.0  !  04-08  (C. Talandier)  New trends organization
7   !!----------------------------------------------------------------------
8   USE par_oce         ! ocean parameters
9
10   IMPLICIT NONE
11   PRIVATE
12
13#if defined key_trdmld
14   LOGICAL, PUBLIC, PARAMETER ::   lk_trdmld = .TRUE.    !: ML trend flag
15#else
16   LOGICAL, PUBLIC, PARAMETER ::   lk_trdmld = .FALSE.   !: ML trend flag
17#endif
18   !!* mixed layer trends indices
19   INTEGER, PARAMETER, PUBLIC ::   jpltrd = 11    !: number of mixed-layer trends arrays
20   INTEGER, PUBLIC   & 
21#if !defined key_agrif
22      , PARAMETER  &
23#endif
24::   jpktrd = jpk   !: max level for mixed-layer trends diag.
25   !
26   INTEGER, PUBLIC, PARAMETER ::   jpmld_xad =  1   !:  zonal     
27   INTEGER, PUBLIC, PARAMETER ::   jpmld_yad =  2   !:  meridonal   > advection
28   INTEGER, PUBLIC, PARAMETER ::   jpmld_zad =  3   !:  vertical   
29   INTEGER, PUBLIC, PARAMETER ::   jpmld_ldf =  4   !:  lateral diffusion (geopot. or iso-neutral)
30   INTEGER, PUBLIC, PARAMETER ::   jpmld_for =  5   !:  forcing
31   INTEGER, PUBLIC, PARAMETER ::   jpmld_zdf =  6   !:  vertical diffusion (TKE)
32   INTEGER, PUBLIC, PARAMETER ::   jpmld_bbc =  7   !:  geothermal flux
33   INTEGER, PUBLIC, PARAMETER ::   jpmld_bbl =  8   !:  bottom boundary layer (advective/diffusive)
34   INTEGER, PUBLIC, PARAMETER ::   jpmld_dmp =  9   !:  internal restoring trend
35   INTEGER, PUBLIC, PARAMETER ::   jpmld_npc = 10   !:  non penetrative convective adjustment
36!! INTEGER, PUBLIC, PARAMETER ::   jpmld_xxx = xx   !:  add here any additional trend (add change jpltrd)
37   INTEGER, PUBLIC, PARAMETER ::   jpmld_atf = 11   !:  asselin trend (**MUST BE THE LAST ONE**)
38
39#if   defined  key_trdmld   ||   defined key_esopa
40   !!----------------------------------------------------------------------
41   !!   'key_trdmld'                         mixed layer trends diagnostics
42   !!----------------------------------------------------------------------
43
44   !! Arrays used for diagnosing mixed-layer trends
45   !!---------------------------------------------------------------------
46   CHARACTER(LEN=80) , PUBLIC :: clname, ctrd(jpltrd+1,2)
47
48   INTEGER , PUBLIC, DIMENSION(jpi,jpj)     ::   nmld   !: mixed layer depth indexes
49   INTEGER , PUBLIC, DIMENSION(jpi,jpj)     ::   nbol   !: mixed-layer depth indexes when read from file
50
51   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   wkx    !:
52
53   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::  &
54      rmld   ,                      & !: mld depth (m) corresponding to nmld
55      tml    , sml  ,               & !: \ "now" mixed layer temperature/salinity
56      tmlb   , smlb ,               & !: /  and associated "before" fields
57      tmlbb  , smlbb,               & !: \  idem, but valid at the 1rst time step of the
58      tmlbn  , smlbn,               & !: /  current analysis window
59      tmltrdm, smltrdm,             & !: total cumulative trends over the analysis window
60      tml_sum,                      & !: mixed layer T, summed over the current analysis period
61      tml_sumb,                     & !: idem, but from the previous analysis period
62      tmltrd_atf_sumb,              & !: Asselin trends, summed over the previous analysis period
63      sml_sum,                      & !:
64      sml_sumb,                     & !:    ( idem for salinity )
65      smltrd_atf_sumb,              & !:
66      rmld_sum, rmldbn                !: needed to compute the leap-frog time mean of the ML depth
67
68   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::  &
69      tmlatfb, tmlatfn ,            & !: "before" Asselin contribution at begining of the averaging
70      smlatfb, smlatfn,             & !: period (i.e. last contrib. from previous such period) and
71                                      !: "now" Asselin contribution to the ML temp. & salinity trends
72      tmlatfm, smlatfm                !: accumulator for Asselin trends (needed for storage only)
73
74   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpltrd) ::  &
75      tmltrd,                       & !: \ physical contributions to the total trend (for T/S),
76      smltrd,                       & !: / cumulated over the current analysis window
77      tmltrd_sum,                   & !: sum of these trends over the analysis period
78      tmltrd_csum_ln,               & !: now cumulated sum of the trends over the "lower triangle"
79      tmltrd_csum_ub,               & !: before (prev. analysis period) cumulated sum over the upper triangle
80      smltrd_sum,                   & !:
81      smltrd_csum_ln,               & !:    ( idem for salinity )
82      smltrd_csum_ub                  !:
83#endif
84   !!----------------------------------------------------------------------
85   !!  OPA 9.0 , LOCEAN-IPSL (2005)
86   !! $Id: trdmld_oce.F90 1152 2008-06-26 14:11:13Z rblod $
87   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
88   !!======================================================================
89END MODULE trdmld_oce
Note: See TracBrowser for help on using the repository browser.