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.
zdfddm.F90 in trunk/NEMO/OFF_SRC/ZDF – NEMO

source: trunk/NEMO/OFF_SRC/ZDF/zdfddm.F90 @ 719

Last change on this file since 719 was 719, checked in by ctlod, 17 years ago

get back to the nemo_v2_3 version for trunk

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 KB
Line 
1MODULE zdfddm
2   !!======================================================================
3   !!                       ***  MODULE  zdfddm  ***
4   !! Ocean physics : double diffusion mixing parameterization
5   !!======================================================================
6#if defined key_zdfddm   ||   defined key_esopa
7   !!----------------------------------------------------------------------
8   !!   'key_zdfddm' :                                     double diffusion
9   !!----------------------------------------------------------------------
10   !!   zdf_ddm       : compute the Ks for salinity
11   !!   zdf_ddm_init  : read namelist and control the parameters
12   !!----------------------------------------------------------------------
13   !!   OPA 9.0 , LOCEAN-IPSL  (2005)
14   !!   $Header$
15   !!   This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
16   !!----------------------------------------------------------------------
17   !! * Modules used
18   USE oce             ! ocean dynamics and tracers variables
19   USE dom_oce         ! ocean space and time domain variables
20   USE zdf_oce         ! ocean vertical physics variables
21   USE in_out_manager  ! I/O manager
22   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
23
24   IMPLICIT NONE
25   PRIVATE
26
27   !! * Routine accessibility
28   PUBLIC zdf_ddm     ! called by step.F90
29
30   !! * Shared module variables
31   LOGICAL, PUBLIC, PARAMETER ::   lk_zdfddm = .TRUE.    !: double diffusive mixing flag
32   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &   !:
33      avs ,               &  !: salinity vertical diffusivity coeff. at w-point
34      rrau                   !: heat/salt buoyancy flux ratio
35
36   !! * Module variables
37   REAL(wp) ::            & !!! * double diffusive mixing namelist *
38      avts  = 1.e-4_wp      ! maximum value of avs for salt fingering
39
40   !! * Substitutions
41#  include "vectopt_loop_substitute.h90"
42
43CONTAINS
44
45   SUBROUTINE zdf_ddm( kt )
46      !!----------------------------------------------------------------------
47      !!                  ***  ROUTINE zdf_ddm  ***
48      !!                   
49      !! ** Purpose :   Add to the vertical eddy diffusivity coefficient the
50      !!      effect of salt fingering and diffusive convection.
51      !!
52      !! ** Method  :   Diapycnal mixing is increased in case of double
53      !!      diffusive mixing (i.e. salt fingering and diffusive layering)
54      !!      following Merryfield et al. (1999). The rate of double diffusive
55      !!      mixing depend on the buoyancy ratio: Rrau=alpha/beta dk[T]/dk[S]
56      !!      which is computed in rn2.F
57      !!         * salt fingering (Schmitt 1981):
58      !!      for Rrau > 1 and rn2 > 0 : zavfs = avts / ( 1 + (Rrau/hsbfr)^6 )
59      !!      for Rrau > 1 and rn2 > 0 : zavfs = O
60      !!      otherwise                : zavft = 0.7 zavs / Rrau
61      !!         * diffusive layering (Federov 1988):
62      !!      for 0< Rrau < 1 and rn2 > 0 : zavdt = 1.3635e-6 
63      !!                                 * exp( 4.6 exp(-0.54 (1/Rrau-1) ) )
64      !!      otherwise                   : zavdt = 0
65      !!      for .5 < Rrau < 1 and rn2 > 0 : zavds = zavdt (1.885 Rrau -0.85)
66      !!      for  0 < Rrau <.5 and rn2 > 0 : zavds = zavdt 0.15 Rrau     
67      !!      otherwise                     : zavds = 0
68      !!         * update the eddy diffusivity:
69      !!      avt = avt + zavft + zavdt
70      !!      avs = avs + zavfs + zavds
71      !!      avmu, avmv are required to remain at least above avt and avs.
72      !!     
73      !! ** Action  :   avt, avs : update vertical eddy diffusivity coef.
74      !!                           for temperature and salinity
75      !!
76      !! References :
77      !!      Merryfield et al., JPO, 29, 1124-1142, 1999.
78      !! History :
79      !!        !  00-08  (G. Madec)  double diffusive mixing
80      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
81      !!----------------------------------------------------------------------
82      !! * Arguments
83      INTEGER, INTENT( in ) ::   kt         ! ocean time-step indexocean time step
84
85      !!----------------------------------------------------------------------
86
87
88      IF ( kt == nit000 )   CALL zdf_ddm_init          ! Initialization (first time-step only)
89
90
91   END SUBROUTINE zdf_ddm
92   
93   
94   SUBROUTINE zdf_ddm_init
95      !!----------------------------------------------------------------------
96      !!                  ***  ROUTINE zdf_ddm_init  ***
97      !!
98      !! ** Purpose :   Initialization of double diffusion mixing scheme
99      !!
100      !! ** Method  :   Read the nam_ddm namelist and check the parameter values
101      !!      called by zdf_ddm at the first timestep (nit000)
102      !!
103      !! History :
104      !!   8.5  !  02-08  (G. Madec)  Original code
105      !!----------------------------------------------------------------------
106      NAMELIST/nam_ddm/ avts
107      !!----------------------------------------------------------------------
108
109      ! Read Namelist nam_ddm : double diffusion mixing scheme
110      ! --------------------
111      REWIND ( numnam )
112      READ   ( numnam, nam_ddm )
113
114
115      ! Parameter control and print
116      ! ---------------------------
117      IF(lwp) THEN
118         WRITE(numout,*)
119         WRITE(numout,*) 'zdf_ddm : double diffusive mixing'
120         WRITE(numout,*) '~~~~~~~'
121         WRITE(numout,*) '          Namelist nam_ddm : set dd mixing parameter'
122         WRITE(numout,*) '             maximum avs for dd mixing      avts   = ', avts
123         WRITE(numout,*)
124      ENDIF
125
126   END SUBROUTINE zdf_ddm_init
127
128#else
129   !!----------------------------------------------------------------------
130   !!   Default option :          Dummy module          No double diffusion
131   !!----------------------------------------------------------------------
132   LOGICAL, PUBLIC, PARAMETER ::   lk_zdfddm = .FALSE.   !: double diffusion flag
133CONTAINS
134   SUBROUTINE zdf_ddm( kt )           ! Dummy routine
135      WRITE(*,*) 'zdf_ddm: You should not have seen this print! error?', kt
136   END SUBROUTINE zdf_ddm
137#endif
138
139   !!======================================================================
140END MODULE zdfddm
Note: See TracBrowser for help on using the repository browser.