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.
zdfswm.F90 in NEMO/trunk/src/OCE/ZDF – NEMO

source: NEMO/trunk/src/OCE/ZDF/zdfswm.F90 @ 13286

Last change on this file since 13286 was 12377, checked in by acc, 4 years ago

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1MODULE zdfswm
2   !!======================================================================
3   !!                       ***  MODULE  zdfswm  ***
4   !! vertical physics :   surface wave-induced mixing
5   !!======================================================================
6   !! History :  3.6  !  2014-10  (E. Clementi)  Original code
7   !!            4.0  !  2017-04  (G. Madec)  debug + simplifications
8   !!----------------------------------------------------------------------
9
10   !!----------------------------------------------------------------------
11   !!   zdf_swm      : update Kz due to surface wave-induced mixing
12   !!   zdf_swm_init : initilisation
13   !!----------------------------------------------------------------------
14   USE dom_oce        ! ocean domain variable
15   USE zdf_oce        ! vertical physics: mixing coefficients
16   USE sbc_oce        ! Surface boundary condition: ocean fields
17   USE sbcwave        ! wave module
18   !
19   USE in_out_manager ! I/O manager
20   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
21   USE lib_mpp        ! distribued memory computing library
22   
23   IMPLICIT NONE
24   PRIVATE
25
26   PUBLIC zdf_swm         ! routine called in zdp_phy
27   PUBLIC zdf_swm_init    ! routine called in zdf_phy_init
28
29   !! * Substitutions
30#  include "do_loop_substitute.h90"
31   !!----------------------------------------------------------------------
32   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
33   !! $Id$
34   !! Software governed by the CeCILL license (see ./LICENSE)
35   !!----------------------------------------------------------------------
36CONTAINS
37
38   SUBROUTINE zdf_swm( kt, Kmm, p_avm, p_avt, p_avs )
39      !!---------------------------------------------------------------------
40      !!                     ***  ROUTINE zdf_swm ***
41      !!
42      !! ** Purpose :Compute the swm term (qbv) to be added to
43      !!             vertical viscosity and diffusivity coeffs. 
44      !!
45      !! ** Method  :   Compute the swm term Bv (zqb) and added it to
46      !!               vertical viscosity and diffusivity coefficients
47      !!                   zqb = alpha * A * Us(0) * exp (3 * k * z)
48      !!               where alpha is set here to 1
49      !!             
50      !! ** action  :    avt, avs, avm updated by the surface wave-induced mixing
51      !!                               (inner domain only)
52      !!               
53      !! reference : Qiao et al. GRL, 2004
54      !!---------------------------------------------------------------------
55      INTEGER                    , INTENT(in   ) ::   kt             ! ocean time step
56      INTEGER                    , INTENT(in   ) ::   Kmm            ! time level index
57      REAL(wp), DIMENSION(:,:,:) , INTENT(inout) ::   p_avm          ! momentum Kz (w-points)
58      REAL(wp), DIMENSION(:,:,:) , INTENT(inout) ::   p_avt, p_avs   ! tracer   Kz (w-points)
59      !
60      INTEGER ::   ji, jj, jk   ! dummy loop indices
61      REAL(wp)::   zcoef, zqb   ! local scalar
62      !!---------------------------------------------------------------------
63      !
64      zcoef = 1._wp * 0.353553_wp
65      DO_3D_00_00( 2, jpkm1 )
66         zqb = zcoef * hsw(ji,jj) * tsd2d(ji,jj) * EXP( -3. * wnum(ji,jj) * gdepw(ji,jj,jk,Kmm) ) * wmask(ji,jj,jk)
67         !
68         p_avt(ji,jj,jk) = p_avt(ji,jj,jk) + zqb
69         p_avs(ji,jj,jk) = p_avs(ji,jj,jk) + zqb
70         p_avm(ji,jj,jk) = p_avm(ji,jj,jk) + zqb
71      END_3D
72      !
73   END SUBROUTINE zdf_swm
74   
75   
76   SUBROUTINE zdf_swm_init
77      !!---------------------------------------------------------------------
78      !!                     ***  ROUTINE zdf_swm_init ***
79      !!
80      !! ** Purpose :   surface wave-induced mixing initialisation 
81      !!
82      !! ** Method  :   check the availability of surface wave fields
83      !!---------------------------------------------------------------------
84      !
85      IF(lwp) THEN                  ! Control print
86         WRITE(numout,*)
87         WRITE(numout,*) 'zdf_swm_init : surface wave-driven mixing'
88         WRITE(numout,*) '~~~~~~~~~~~~'
89      ENDIF
90      IF(  .NOT.ln_wave .OR.   &
91         & .NOT.ln_sdw    )   CALL ctl_stop ( 'zdf_swm_init: ln_zdfswm=T but ln_wave and ln_sdw /= T')
92      !
93   END SUBROUTINE zdf_swm_init
94
95   !!======================================================================
96END MODULE zdfswm
Note: See TracBrowser for help on using the repository browser.