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 trunk/NEMOGCM/NEMO/OPA_SRC/ZDF – NEMO

source: trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdf_oce.F90 @ 5021

Last change on this file since 5021 was 4990, checked in by timgraham, 9 years ago

Merged branches/2014/dev_MERGE_2014 back onto the trunk as follows:

In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
1 conflict in LIM_SRC_3/limdiahsb.F90
Resolved by keeping the version from dev_MERGE_2014 branch
and commited at r4989

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2014/dev_MERGE_2014
to merge the branch into the trunk - no conflicts at this stage.

  • Property svn:keywords set to Id
File size: 3.8 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#if defined key_zdfcst   ||   defined key_esopa
19   LOGICAL, PARAMETER, PUBLIC ::   lk_zdfcst        = .TRUE.         !: constant vertical mixing flag
20#else
21   LOGICAL, PARAMETER, PUBLIC ::   lk_zdfcst        = .FALSE.        !: constant vertical mixing flag
22#endif
23
24   !                                 !!* namelist namzdf: vertical diffusion *
25   REAL(wp), PUBLIC ::   rn_avm0     !: vertical eddy viscosity (m2/s)
26   REAL(wp), PUBLIC ::   rn_avt0     !: vertical eddy diffusivity (m2/s)
27   INTEGER , PUBLIC ::   nn_avb      !: constant or profile background on avt (=0/1)
28   INTEGER , PUBLIC ::   nn_havtb    !: horizontal shape or not for avtb (=0/1)
29   LOGICAL , PUBLIC ::   ln_zdfexp   !: explicit vertical diffusion scheme flag
30   INTEGER , PUBLIC ::   nn_zdfexp   !: number of sub-time step (explicit time stepping)
31   LOGICAL , PUBLIC ::   ln_zdfevd   !: convection: enhanced vertical diffusion flag
32   INTEGER , PUBLIC ::   nn_evdm     !: =0/1 flag to apply enhanced avm or not
33   REAL(wp), PUBLIC ::   rn_avevd    !: vertical eddy coeff. for enhanced vert. diff. (m2/s)
34   LOGICAL , PUBLIC ::   ln_zdfnpc   !: convection: non-penetrative convection flag
35   INTEGER , PUBLIC ::   nn_npc      !: non penetrative convective scheme call  frequency
36   INTEGER , PUBLIC ::   nn_npcp     !: non penetrative convective scheme print frequency
37
38
39   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:)     ::   avmb , avtb    !: background profile of avm and avt
40   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   avtb_2d        !: horizontal shape of background Kz profile
41   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   bfrua, bfrva   !: Bottom friction coefficients set in zdfbfr
42   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   tfrua, tfrva   !: top friction coefficients set in zdfbfr
43   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   avmu , avmv    !: vertical viscosity coef at uw- & vw-pts       [m2/s]
44   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   avm  , avt     !: vertical viscosity & diffusivity coef at w-pt [m2/s]
45 
46   !!----------------------------------------------------------------------
47   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
48   !! $Id$
49   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
50   !!----------------------------------------------------------------------
51CONTAINS
52
53   INTEGER FUNCTION zdf_oce_alloc()
54      !!----------------------------------------------------------------------
55      !!            *** FUNCTION zdf_oce_alloc ***
56      !!----------------------------------------------------------------------
57      !
58      ALLOCATE(avmb(jpk) , bfrua(jpi,jpj) ,                         &
59         &     avtb(jpk) , bfrva(jpi,jpj) , avtb_2d(jpi,jpj) ,      &
60         &     tfrua(jpi, jpj), tfrva(jpi, jpj)              ,      &
61         &     avmu(jpi,jpj,jpk), avm(jpi,jpj,jpk)           ,      &
62         &     avmv(jpi,jpj,jpk), avt(jpi,jpj,jpk)           , STAT = zdf_oce_alloc )
63         !
64      IF( zdf_oce_alloc /= 0 )   CALL ctl_warn('zdf_oce_alloc: failed to allocate arrays')
65      !
66   END FUNCTION zdf_oce_alloc
67
68   !!======================================================================
69END MODULE zdf_oce
Note: See TracBrowser for help on using the repository browser.