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.
zdf_oce.F90 in branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/OPA_SRC/ZDF – NEMO

source: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdf_oce.F90 @ 7990

Last change on this file since 7990 was 7990, checked in by gm, 7 years ago

#1880 (HPC-09): OPA remove avmu, avmv from zdf modules + move CALL tke(gls)_rst & gls_rst in zdftke(gls) + rename zdftmx and zdfqiao

  • Property svn:keywords set to Id
File size: 4.9 KB
Line 
1MODULE zdf_oce
2   !!======================================================================
3   !!              ***  MODULE  zdf_oce  ***
4   !! Ocean physics : define vertical mixing variables
5   !!=====================================================================
6   !! history :  1.0  !  2002-06  (G. Madec) Original code
7   !!            3.2  !  2009-07  (G.Madec) addition of avm
8   !!----------------------------------------------------------------------
9   USE par_oce        ! ocean parameters
10   USE in_out_manager ! I/O manager
11   USE lib_mpp        ! MPP library
12
13   IMPLICIT NONE
14   PRIVATE
15
16   PUBLIC  zdf_oce_alloc    ! Called in nemogcm.F90
17
18   !                            !!* namelist namzdf: vertical physics *
19   !                             ! vertical closure scheme flags
20   LOGICAL , PUBLIC ::   ln_zdfcst   !: constant coefficients
21   LOGICAL , PUBLIC ::   ln_zdfric   !: Richardson depend coefficients
22   LOGICAL , PUBLIC ::   ln_zdftke   !: Turbulent Kinetic Energy closure
23   LOGICAL , PUBLIC ::   ln_zdfgls   !: Generic Length Sclare closure
24   !                             ! convection
25   LOGICAL , PUBLIC ::   ln_zdfevd   !: convection: enhanced vertical diffusion flag
26   INTEGER , PUBLIC ::      nn_evdm     !: =0/1 flag to apply enhanced avm or not
27   REAL(wp), PUBLIC ::      rn_evd      !: vertical eddy coeff. for enhanced vert. diff. (m2/s)
28   LOGICAL , PUBLIC ::   ln_zdfnpc   !: convection: non-penetrative convection flag
29   INTEGER , PUBLIC ::      nn_npc      !: non penetrative convective scheme call  frequency
30   INTEGER , PUBLIC ::      nn_npcp     !: non penetrative convective scheme print frequency
31   !                             ! double diffusion
32   LOGICAL , PUBLIC ::   ln_zdfddm   !: double diffusive mixing flag
33   REAL(wp), PUBLIC ::      rn_avts     !: maximum value of avs for salt fingering
34   REAL(wp), PUBLIC ::      rn_hsbfr    !: heat/salt buoyancy flux ratio
35   !                             ! gravity wave-induced vertical mixing
36   LOGICAL , PUBLIC ::   ln_zdfswm   !: surface  wave-induced mixing flag
37   LOGICAL , PUBLIC ::   ln_zdfiwm   !: internal wave-induced mixing flag
38   !                             ! time-stepping
39   LOGICAL , PUBLIC ::   ln_zdfexp   !: explicit vertical diffusion scheme flag
40   INTEGER , PUBLIC ::      nn_zdfexp   !: number of sub-time step (explicit time stepping)
41   !                             ! coefficients
42   REAL(wp), PUBLIC ::   rn_avm0     !: vertical eddy viscosity (m2/s)
43   REAL(wp), PUBLIC ::   rn_avt0     !: vertical eddy diffusivity (m2/s)
44   INTEGER , PUBLIC ::   nn_avb      !: constant or profile background on avt (=0/1)
45   INTEGER , PUBLIC ::   nn_havtb    !: horizontal shape or not for avtb (=0/1)   !                             ! convection
46
47
48   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   avt  , avs     !: vertical T & S  diffusivity coef at w-pt [m2/s]
49   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   avm            !: vertical momentum viscosity coef at w-pt [m2/s]
50   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   avmu , avmv    !: vertical viscosity coef at uw- & vw-pts  [m2/s]
51   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   avt_k , avm_k  !: avt, avs computed by turbulent closure alone
52   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   en             !: now turbulent kinetic energy   [m2/s2]
53   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:)     ::   avmb , avtb    !: background profile of avm and avt
54   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   avtb_2d        !: horizontal shape of background Kz profile
55   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   bfrua, bfrva   !: bottom friction coefficients
56   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   tfrua, tfrva   !: top    friction coefficients
57
58   !!----------------------------------------------------------------------
59   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
60   !! $Id$
61   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
62   !!----------------------------------------------------------------------
63CONTAINS
64
65   INTEGER FUNCTION zdf_oce_alloc()
66      !!----------------------------------------------------------------------
67      !!            *** FUNCTION zdf_oce_alloc ***
68      !!----------------------------------------------------------------------
69      !
70      ALLOCATE( avm  (jpi,jpj,jpk) , avt  (jpi,jpj,jpk) , avs(jpi,jpj,jpk) ,        &
71         &      avm_k(jpi,jpj,jpk) , avt_k(jpi,jpj,jpk) , en (jpi,jpj,jpk) ,        & 
72         &      avmb(jpk) , bfrua(jpi,jpj) , tfrua(jpi, jpj) ,                      &
73         &      avtb(jpk) , bfrva(jpi,jpj) , tfrva(jpi, jpj) , avtb_2d(jpi,jpj) ,   &
74         &      avmu(jpi,jpj,jpk), avmv(jpi,jpj,jpk) ,  STAT = zdf_oce_alloc )
75         !
76      IF( zdf_oce_alloc /= 0 )   CALL ctl_warn('zdf_oce_alloc: failed to allocate arrays')
77      !
78   END FUNCTION zdf_oce_alloc
79
80   !!======================================================================
81END MODULE zdf_oce
Note: See TracBrowser for help on using the repository browser.