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 @ 8143

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

#1880 (HPC-09) - step-7: top/bottom drag computed at T-points, zdfbfr.F90 replaced by zdfdrg.F90 + changes in namelist

  • Property svn:keywords set to Id
File size: 4.6 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   !!            4.0  !  2017-05  (G. Madec)  drag coef. defined at t-point (zdfdrg.F90)
9   !!----------------------------------------------------------------------
10   USE par_oce        ! ocean parameters
11   USE in_out_manager ! I/O manager
12   USE lib_mpp        ! MPP library
13
14   IMPLICIT NONE
15   PRIVATE
16
17   PUBLIC  zdf_oce_alloc    ! Called in nemogcm.F90
18
19   !                            !!* namelist namzdf: vertical physics *
20   !                             ! vertical closure scheme flags
21   LOGICAL , PUBLIC ::   ln_zdfcst   !: constant coefficients
22   LOGICAL , PUBLIC ::   ln_zdfric   !: Richardson depend coefficients
23   LOGICAL , PUBLIC ::   ln_zdftke   !: Turbulent Kinetic Energy closure
24   LOGICAL , PUBLIC ::   ln_zdfgls   !: Generic Length Sclare closure
25   !                             ! convection
26   LOGICAL , PUBLIC ::   ln_zdfevd   !: convection: enhanced vertical diffusion flag
27   INTEGER , PUBLIC ::      nn_evdm     !: =0/1 flag to apply enhanced avm or not
28   REAL(wp), PUBLIC ::      rn_evd      !: vertical eddy coeff. for enhanced vert. diff. (m2/s)
29   LOGICAL , PUBLIC ::   ln_zdfnpc   !: convection: non-penetrative convection flag
30   INTEGER , PUBLIC ::      nn_npc      !: non penetrative convective scheme call  frequency
31   INTEGER , PUBLIC ::      nn_npcp     !: non penetrative convective scheme print frequency
32   !                             ! double diffusion
33   LOGICAL , PUBLIC ::   ln_zdfddm   !: double diffusive mixing flag
34   REAL(wp), PUBLIC ::      rn_avts     !: maximum value of avs for salt fingering
35   REAL(wp), PUBLIC ::      rn_hsbfr    !: heat/salt buoyancy flux ratio
36   !                             ! gravity wave-induced vertical mixing
37   LOGICAL , PUBLIC ::   ln_zdfswm   !: surface  wave-induced mixing flag
38   LOGICAL , PUBLIC ::   ln_zdfiwm   !: internal wave-induced mixing flag
39   !                             ! time-stepping
40   LOGICAL , PUBLIC ::   ln_zdfexp   !: explicit vertical diffusion scheme flag
41   INTEGER , PUBLIC ::      nn_zdfexp   !: number of sub-time step (explicit time stepping)
42   !                             ! coefficients
43   REAL(wp), PUBLIC ::   rn_avm0     !: vertical eddy viscosity (m2/s)
44   REAL(wp), PUBLIC ::   rn_avt0     !: vertical eddy diffusivity (m2/s)
45   INTEGER , PUBLIC ::   nn_avb      !: constant or profile background on avt (=0/1)
46   INTEGER , PUBLIC ::   nn_havtb    !: horizontal shape or not for avtb (=0/1)   !                             ! convection
47
48
49   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   avm, avt, avs  !: vertical mixing coefficient (w-point) [m2/s]
50!!gm
51   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   avmu , avmv    !: vertical viscosity coef at uw- & vw-pts  [m2/s]
52!!gm
53   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   avm_k, avt_k   !: avm, avt computed by turbulent closure alone
54   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   en             !: now turbulent kinetic energy   [m2/s2]
55   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   avtb_2d        !: horizontal shape of background Kz profile
56   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:)     ::   avmb , avtb    !: background profile of avm and avt
57
58   !!----------------------------------------------------------------------
59   !! NEMO/OPA 4.0 , NEMO Consortium (2017)
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) , avtb(jpk) ,  avtb_2d(jpi,jpj) ,                    &
73         &      avmu(jpi,jpj,jpk), avmv(jpi,jpj,jpk)    , STAT = zdf_oce_alloc )
74         !
75      IF( zdf_oce_alloc /= 0 )   CALL ctl_warn('zdf_oce_alloc: failed to allocate arrays')
76      !
77   END FUNCTION zdf_oce_alloc
78
79   !!======================================================================
80END MODULE zdf_oce
Note: See TracBrowser for help on using the repository browser.