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.
ldftra.F90 in branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/LDF – NEMO

source: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/LDF/ldftra.F90 @ 2240

Last change on this file since 2240 was 2236, checked in by cetlod, 14 years ago

First guess of NEMO_v3.3

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.5 KB
RevLine 
[3]1MODULE ldftra
2   !!======================================================================
3   !!                       ***  MODULE  ldftra  ***
4   !! Ocean physics:  lateral diffusivity coefficient
5   !!=====================================================================
[1601]6   !! History :        ! 1997-07  (G. Madec)  from inimix.F split in 2 routines
7   !!   NEMO      1.0  ! 2002-09  (G. Madec)  F90: Free form and module
8   !!             2.0  ! 2005-11  (G. Madec) 
[3]9   !!----------------------------------------------------------------------
[1601]10
11   !!----------------------------------------------------------------------
[3]12   !!   ldf_tra_init : initialization, namelist read, and parameters control
13   !!   ldf_tra_c3d   : 3D eddy viscosity coefficient initialization
14   !!   ldf_tra_c2d   : 2D eddy viscosity coefficient initialization
15   !!   ldf_tra_c1d   : 1D eddy viscosity coefficient initialization
16   !!----------------------------------------------------------------------
17   USE oce             ! ocean dynamics and tracers
18   USE dom_oce         ! ocean space and time domain
19   USE phycst          ! physical constants
20   USE ldftra_oce      ! ocean tracer   lateral physics
21   USE ldfslp          ! ???
22   USE in_out_manager  ! I/O manager
[1601]23   USE ioipsl
[3]24   USE lib_mpp         ! distribued memory computing library
25   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
26
27   IMPLICIT NONE
28   PRIVATE
29
[1601]30   PUBLIC   ldf_tra_init   ! called by opa.F90
[3]31
32   !! * Substitutions
[148]33#  include "domzgr_substitute.h90"
[3]34#  include "vectopt_loop_substitute.h90"
[1601]35   !!----------------------------------------------------------------------
36   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)
[1152]37   !! $Id$
[2236]38   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
[1601]39   !!----------------------------------------------------------------------
[3]40
41CONTAINS
42
43   SUBROUTINE ldf_tra_init
44      !!----------------------------------------------------------------------
45      !!                  ***  ROUTINE ldf_tra_init  ***
46      !!
[461]47      !! ** Purpose :   initializations of the tracer lateral mixing coeff.
[3]48      !!
[461]49      !! ** Method  :   the Eddy diffusivity and eddy induced velocity ceoff.
50      !!      are defined as follows:
[3]51      !!         default option   : constant coef. aht0, aeiv0 (namelist)
52      !!        'key_traldf_c1d': depth dependent coef. defined in
53      !!                            in ldf_tra_c1d routine
54      !!        'key_traldf_c2d': latitude and longitude dependent coef.
55      !!                            defined in ldf_tra_c2d routine
56      !!        'key_traldf_c3d': latitude, longitude, depth dependent coef.
57      !!                            defined in ldf_tra_c3d routine
58      !!
59      !!      N.B. User defined include files.  By default, 3d and 2d coef.
60      !!      are set to a constant value given in the namelist and the 1d
61      !!      coefficients are initialized to a hyperbolic tangent vertical
62      !!      profile.
63      !!----------------------------------------------------------------------
[1601]64      INTEGER ::   ioptio               ! temporary integer
[3]65      LOGICAL ::   ll_print = .FALSE.   ! =T print eddy coef. in numout
[1601]66      !!
67      NAMELIST/namtra_ldf/ ln_traldf_lap  , ln_traldf_bilap,                  &
68         &                 ln_traldf_level, ln_traldf_hor  , ln_traldf_iso,   &
[2236]69         &                 ln_traldf_grif ,                                   &
70         &                 rn_aht_0       , rn_ahtb_0      , rn_aeiv_0,       &
71         &                 rn_slpmax
[3]72      !!----------------------------------------------------------------------
73
74      !  Define the lateral tracer physics parameters
75      ! =============================================
76   
[1601]77      REWIND( numnam )                  ! Read Namelist namtra_ldf : Lateral physics on tracers
78      READ  ( numnam, namtra_ldf )
[3]79
[1601]80      IF(lwp) THEN                      ! control print
[3]81         WRITE(numout,*)
[461]82         WRITE(numout,*) 'ldf_tra_init : lateral tracer physics'
83         WRITE(numout,*) '~~~~~~~~~~~~ '
[1601]84         WRITE(numout,*) '   Namelist namtra_ldf : lateral mixing coefficients'
85         WRITE(numout,*) '      laplacian operator            ln_traldf_lap   = ', ln_traldf_lap
86         WRITE(numout,*) '      bilaplacian operator          ln_traldf_bilap = ', ln_traldf_bilap
[2236]87         WRITE(numout,*) '      griffies    operator          ln_traldf_grif  = ', ln_traldf_grif 
[1601]88         WRITE(numout,*) '      lateral eddy diffusivity      rn_aht_0        = ', rn_aht_0
89         WRITE(numout,*) '      background hor. diffusivity   rn_ahtb_0       = ', rn_ahtb_0
90         WRITE(numout,*) '      eddy induced velocity coef.   rn_aeiv_0       = ', rn_aeiv_0
[3]91         WRITE(numout,*)
92      ENDIF
93
[2236]94      slpmax = rn_slpmax
[1601]95      !                                ! convert DOCTOR namelist names into OLD names
96      aht0  = rn_aht_0
97      ahtb0 = rn_ahtb_0
98      aeiv0 = rn_aeiv_0
[3]99
[1601]100      !                                ! Parameter control
101
[461]102      ! ... Check consistency for type and direction :
103      !           ==> will be done in traldf module
[3]104
105      ! ... Space variation of eddy coefficients
106      ioptio = 0
107#if defined key_traldf_c3d
108      IF(lwp) WRITE(numout,*) '          tracer mixing coef. = F( latitude, longitude, depth)'
109      ioptio = ioptio + 1
110#endif
111#if defined key_traldf_c2d
112      IF(lwp) WRITE(numout,*) '          tracer mixing coef. = F( latitude, longitude)'
113      ioptio = ioptio + 1
114#endif
115#if defined key_traldf_c1d
116      IF(lwp) WRITE(numout,*) '          tracer mixing coef. = F( depth )'
117      ioptio = ioptio + 1
[1601]118      IF( .NOT. ln_zco )   CALL ctl_stop( 'key_traldf_c1d can only be used in z-coordinate - full step' )
[3]119#endif
120      IF( ioptio == 0 ) THEN
121          IF(lwp) WRITE(numout,*) '          tracer mixing coef. = constant (default option)'
122        ELSEIF( ioptio > 1 ) THEN
[474]123           CALL ctl_stop('          use only one of the following keys:',   &
124             &           ' key_traldf_c3d, key_traldf_c2d, key_traldf_c1d' )
[3]125      ENDIF
126
[461]127      IF( ln_traldf_bilap ) THEN
[3]128         IF(lwp) WRITE(numout,*) '          biharmonic tracer diffusion'
[1601]129         IF( aht0 > 0 .AND. .NOT. lk_esopa )   CALL ctl_stop( 'The horizontal diffusivity coef. aht0 must be negative' )
[3]130      ELSE
131         IF(lwp) WRITE(numout,*) '          harmonic tracer diffusion (default)'
[1601]132         IF( aht0 < 0 .AND. .NOT. lk_esopa )   CALL ctl_stop('The horizontal diffusivity coef. aht0 must be positive' )
[3]133      ENDIF
134
135
136      !  Lateral eddy diffusivity and eddy induced velocity coefficients
137      ! ================================================================
138#if defined key_traldf_c3d
[461]139      CALL ldf_tra_c3d( ll_print )      ! aht = 3D coef. = F( longitude, latitude, depth )
[3]140#elif defined key_traldf_c2d
[461]141      CALL ldf_tra_c2d( ll_print )      ! aht = 2D coef. = F( longitude, latitude )
[3]142#elif defined key_traldf_c1d
[461]143      CALL ldf_tra_c1d( ll_print )      ! aht = 1D coef. = F( depth )
[3]144#else
[461]145                                        ! Constant coefficients
[3]146      IF(lwp)WRITE(numout,*)
[1601]147      IF(lwp)WRITE(numout,*) '      constant eddy diffusivity coef.   ahtu = ahtv = ahtw = aht0 = ', aht0
[3]148      IF( lk_traldf_eiv ) THEN
149         IF(lwp)WRITE(numout,*)
[1601]150         IF(lwp)WRITE(numout,*) '      constant eddy induced velocity coef.   aeiu = aeiv = aeiw = aeiv0 = ', aeiv0
[3]151      ENDIF
152#endif
[1601]153      !
[3]154   END SUBROUTINE ldf_tra_init
155
156#if defined key_traldf_c3d
157#   include "ldftra_c3d.h90"
158#elif defined key_traldf_c2d
159#   include "ldftra_c2d.h90"
160#elif defined key_traldf_c1d
161#   include "ldftra_c1d.h90"
162#endif
163
164   !!======================================================================
165END MODULE ldftra
Note: See TracBrowser for help on using the repository browser.