1 | MODULE zdfsh2 |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE zdfsh2 *** |
---|
4 | !! Ocean physics: shear production term of TKE |
---|
5 | !!===================================================================== |
---|
6 | !! History : - ! 2014-10 (A. Barthelemy, G. Madec) original code |
---|
7 | !! NEMO 4.0 ! 2017-04 (G. Madec) remove u-,v-pts avm |
---|
8 | !!---------------------------------------------------------------------- |
---|
9 | |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | !! zdf_sh2 : compute mixing the shear production term of TKE |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | USE oce |
---|
14 | USE dom_oce ! domain: ocean |
---|
15 | ! |
---|
16 | USE in_out_manager ! I/O manager |
---|
17 | USE lib_mpp ! MPP library |
---|
18 | |
---|
19 | IMPLICIT NONE |
---|
20 | PRIVATE |
---|
21 | |
---|
22 | PUBLIC zdf_sh2 ! called by zdftke, zdfglf, and zdfric |
---|
23 | |
---|
24 | !! * Substitutions |
---|
25 | # include "do_loop_substitute.h90" |
---|
26 | # include "domzgr_substitute.h90" |
---|
27 | !!---------------------------------------------------------------------- |
---|
28 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
29 | !! $Id$ |
---|
30 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
31 | !!---------------------------------------------------------------------- |
---|
32 | CONTAINS |
---|
33 | |
---|
34 | SUBROUTINE zdf_sh2( Kbb, Kmm, p_avm, p_sh2 ) |
---|
35 | !!---------------------------------------------------------------------- |
---|
36 | !! *** ROUTINE zdf_sh2 *** |
---|
37 | !! |
---|
38 | !! ** Purpose : Compute the shear production term of a TKE equation |
---|
39 | !! |
---|
40 | !! ** Method : - a stable discretization of this term is linked to the |
---|
41 | !! time-space discretization of the vertical diffusion |
---|
42 | !! of the OGCM. NEMO uses C-grid, a leap-frog environment |
---|
43 | !! and an implicit computation of vertical mixing term, |
---|
44 | !! so the shear production at w-point is given by: |
---|
45 | !! sh2 = mi[ mi(avm) * dk[ub]/e3ub * dk[un]/e3un ] |
---|
46 | !! + mj[ mj(avm) * dk[vb]/e3vb * dk[vn]/e3vn ] |
---|
47 | !! NB: wet-point only horizontal averaging of shear |
---|
48 | !! |
---|
49 | !! ** Action : - p_sh2 shear prod. term at w-point (inner domain only) |
---|
50 | !! ***** |
---|
51 | !! References : Bruchard, OM 2002 |
---|
52 | !! --------------------------------------------------------------------- |
---|
53 | INTEGER , INTENT(in ) :: Kbb, Kmm ! ocean time level indices |
---|
54 | REAL(wp), DIMENSION(:,:,:) , INTENT(in ) :: p_avm ! vertical eddy viscosity (w-points) |
---|
55 | REAL(wp), DIMENSION(:,:,:) , INTENT( out) :: p_sh2 ! shear production of TKE (w-points) |
---|
56 | ! |
---|
57 | INTEGER :: ji, jj, jk ! dummy loop arguments |
---|
58 | REAL(wp), DIMENSION(jpi,jpj) :: zsh2u, zsh2v ! 2D workspace |
---|
59 | !!-------------------------------------------------------------------- |
---|
60 | ! |
---|
61 | DO jk = 2, jpkm1 |
---|
62 | DO_2D( 1, 0, 1, 0 ) !* 2 x shear production at uw- and vw-points (energy conserving form) |
---|
63 | zsh2u(ji,jj) = ( p_avm(ji+1,jj,jk) + p_avm(ji,jj,jk) ) & |
---|
64 | & * ( uu(ji,jj,jk-1,Kmm) - uu(ji,jj,jk,Kmm) ) & |
---|
65 | & * ( uu(ji,jj,jk-1,Kbb) - uu(ji,jj,jk,Kbb) ) & |
---|
66 | & / ( e3uw(ji,jj,jk ,Kmm) * e3uw(ji,jj,jk,Kbb) ) & |
---|
67 | & * wumask(ji,jj,jk) |
---|
68 | zsh2v(ji,jj) = ( p_avm(ji,jj+1,jk) + p_avm(ji,jj,jk) ) & |
---|
69 | & * ( vv(ji,jj,jk-1,Kmm) - vv(ji,jj,jk,Kmm) ) & |
---|
70 | & * ( vv(ji,jj,jk-1,Kbb) - vv(ji,jj,jk,Kbb) ) & |
---|
71 | & / ( e3vw(ji,jj,jk ,Kmm) * e3vw(ji,jj,jk,Kbb) ) & |
---|
72 | & * wvmask(ji,jj,jk) |
---|
73 | END_2D |
---|
74 | DO_2D( 0, 0, 0, 0 ) !* shear production at w-point ! coast mask: =2 at the coast ; =1 otherwise (NB: wmask useless as zsh2 are masked) |
---|
75 | p_sh2(ji,jj,jk) = 0.25 * ( ( zsh2u(ji-1,jj) + zsh2u(ji,jj) ) * ( 2. - umask(ji-1,jj,jk) * umask(ji,jj,jk) ) & |
---|
76 | & + ( zsh2v(ji,jj-1) + zsh2v(ji,jj) ) * ( 2. - vmask(ji,jj-1,jk) * vmask(ji,jj,jk) ) ) |
---|
77 | END_2D |
---|
78 | END DO |
---|
79 | ! |
---|
80 | END SUBROUTINE zdf_sh2 |
---|
81 | |
---|
82 | !!====================================================================== |
---|
83 | END MODULE zdfsh2 |
---|