1 | MODULE zdfevd |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE zdfevd *** |
---|
4 | !! Ocean physics: parameterization of convection through an enhancement |
---|
5 | !! of vertical eddy mixing coefficient |
---|
6 | !!====================================================================== |
---|
7 | !! History : OPA ! 1997-06 (G. Madec, A. Lazar) Original code |
---|
8 | !! NEMO 1.0 ! 2002-06 (G. Madec) F90: Free form and module |
---|
9 | !! - ! 2005-06 (C. Ethe) KPP parameterization |
---|
10 | !! 3.2 ! 2009-03 (M. Leclair, G. Madec, R. Benshila) test on both before & after |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | !! zdf_evd : increase the momentum and tracer Kz at the location of |
---|
15 | !! statically unstable portion of the water column (ln_zdfevd=T) |
---|
16 | !!---------------------------------------------------------------------- |
---|
17 | USE oce ! ocean dynamics and tracers variables |
---|
18 | USE dom_oce ! ocean space and time domain variables |
---|
19 | USE zdf_oce ! ocean vertical physics variables |
---|
20 | USE zdfkpp ! KPP vertical mixing |
---|
21 | USE in_out_manager ! I/O manager |
---|
22 | USE iom ! for iom_put |
---|
23 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
24 | |
---|
25 | IMPLICIT NONE |
---|
26 | PRIVATE |
---|
27 | |
---|
28 | PUBLIC zdf_evd ! called by step.F90 |
---|
29 | |
---|
30 | !! * Substitutions |
---|
31 | # include "domzgr_substitute.h90" |
---|
32 | !!---------------------------------------------------------------------- |
---|
33 | !! NEMO/OPA 4.0 , NEMO Consortium (2011) |
---|
34 | !! $Id$ |
---|
35 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
36 | !!---------------------------------------------------------------------- |
---|
37 | CONTAINS |
---|
38 | |
---|
39 | SUBROUTINE zdf_evd( kt ) |
---|
40 | !!---------------------------------------------------------------------- |
---|
41 | !! *** ROUTINE zdf_evd *** |
---|
42 | !! |
---|
43 | !! ** Purpose : Local increased the vertical eddy viscosity and diffu- |
---|
44 | !! sivity coefficients when a static instability is encountered. |
---|
45 | !! |
---|
46 | !! ** Method : avt, avm, and the 4 neighbouring avmu, avmv coefficients |
---|
47 | !! are set to avevd (namelist parameter) if the water column is |
---|
48 | !! statically unstable (i.e. if rn2 < -1.e-12 ) |
---|
49 | !! |
---|
50 | !! ** Action : avt, avm, avmu, avmv updted in static instability cases |
---|
51 | !! |
---|
52 | !! References : Lazar, A., these de l'universite Paris VI, France, 1997 |
---|
53 | !!---------------------------------------------------------------------- |
---|
54 | USE oce, zavt_evd => ua , zavm_evd => va ! (ua,va) used ua workspace |
---|
55 | ! |
---|
56 | INTEGER, INTENT( in ) :: kt ! ocean time-step indexocean time step |
---|
57 | ! |
---|
58 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
59 | !!---------------------------------------------------------------------- |
---|
60 | |
---|
61 | IF( kt == nit000 ) THEN |
---|
62 | IF(lwp) WRITE(numout,*) |
---|
63 | IF(lwp) WRITE(numout,*) 'zdf_evd : Enhanced Vertical Diffusion (evd)' |
---|
64 | IF(lwp) WRITE(numout,*) '~~~~~~~ ' |
---|
65 | IF(lwp) WRITE(numout,*) |
---|
66 | ENDIF |
---|
67 | |
---|
68 | zavt_evd(:,:,:) = avt(:,:,:) ! set avt prior to evd application |
---|
69 | |
---|
70 | SELECT CASE ( nn_evdm ) |
---|
71 | ! |
---|
72 | CASE ( 1 ) ! enhance vertical eddy viscosity and diffusivity (if rn2<-1.e-12) |
---|
73 | ! |
---|
74 | zavm_evd(:,:,:) = avm(:,:,:) ! set avm prior to evd application |
---|
75 | ! |
---|
76 | DO jk = 1, jpkm1 |
---|
77 | #if defined key_vectopt_loop |
---|
78 | DO jj = 1, 1 ! big loop forced |
---|
79 | DO ji = jpi+2, jpij |
---|
80 | #else |
---|
81 | DO jj = 2, jpj ! no vector opt. |
---|
82 | DO ji = 2, jpi |
---|
83 | #endif |
---|
84 | #if defined key_zdfkpp |
---|
85 | ! no evd mixing in the boundary layer with KPP |
---|
86 | IF( MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 .AND. fsdepw(ji,jj,jk) > hkpp(ji,jj) ) THEN |
---|
87 | #else |
---|
88 | IF( MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 ) THEN |
---|
89 | #endif |
---|
90 | avt (ji ,jj ,jk) = rn_avevd * tmask(ji ,jj ,jk) |
---|
91 | avm (ji ,jj ,jk) = rn_avevd * tmask(ji ,jj ,jk) |
---|
92 | avmu(ji ,jj ,jk) = rn_avevd * umask(ji ,jj ,jk) |
---|
93 | avmu(ji-1,jj ,jk) = rn_avevd * umask(ji-1,jj ,jk) |
---|
94 | avmv(ji ,jj ,jk) = rn_avevd * vmask(ji ,jj ,jk) |
---|
95 | avmv(ji ,jj-1,jk) = rn_avevd * vmask(ji ,jj-1,jk) |
---|
96 | ENDIF |
---|
97 | END DO |
---|
98 | END DO |
---|
99 | END DO |
---|
100 | CALL lbc_lnk( avt , 'W', 1. ) ; CALL lbc_lnk( avm , 'W', 1. ) ! Lateral boundary conditions |
---|
101 | CALL lbc_lnk( avmu, 'U', 1. ) ; CALL lbc_lnk( avmv, 'V', 1. ) |
---|
102 | ! |
---|
103 | zavm_evd(:,:,:) = avm(:,:,:) - zavm_evd(:,:,:) ! change in avm due to evd |
---|
104 | CALL iom_put( "avm_evd", zavm_evd ) ! output this change |
---|
105 | ! |
---|
106 | CASE DEFAULT ! enhance vertical eddy diffusivity only (if rn2<-1.e-12) |
---|
107 | DO jk = 1, jpkm1 |
---|
108 | !!! WHERE( rn2(:,:,jk) <= -1.e-12 ) avt(:,:,jk) = tmask(:,:,jk) * avevd ! agissant sur T SEUL! |
---|
109 | #if defined key_vectopt_loop |
---|
110 | DO jj = 1, 1 ! big loop forced |
---|
111 | DO ji = 1, jpij |
---|
112 | #else |
---|
113 | DO jj = 1, jpj ! loop over the whole domain (no lbc_lnk call) |
---|
114 | DO ji = 1, jpi |
---|
115 | #endif |
---|
116 | #if defined key_zdfkpp |
---|
117 | ! no evd mixing in the boundary layer with KPP |
---|
118 | IF( MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 .AND. fsdepw(ji,jj,jk) > hkpp(ji,jj) ) & |
---|
119 | #else |
---|
120 | IF( MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 ) & |
---|
121 | #endif |
---|
122 | avt(ji,jj,jk) = rn_avevd * tmask(ji,jj,jk) |
---|
123 | END DO |
---|
124 | END DO |
---|
125 | END DO |
---|
126 | ! |
---|
127 | END SELECT |
---|
128 | |
---|
129 | zavt_evd(:,:,:) = avt(:,:,:) - zavt_evd(:,:,:) ! change in avt due to evd |
---|
130 | CALL iom_put( "avt_evd", zavt_evd ) ! output this change |
---|
131 | ! |
---|
132 | END SUBROUTINE zdf_evd |
---|
133 | |
---|
134 | !!====================================================================== |
---|
135 | END MODULE zdfevd |
---|