125 |
c (ghat is temporary storage for horizontally smoothed dbloc) |
c (ghat is temporary storage for horizontally smoothed dbloc) |
126 |
c----------------------------------------------------------------------- |
c----------------------------------------------------------------------- |
127 |
|
|
128 |
CADJ STORE ghat = comlev1_kpp, key = ikey |
cph( |
129 |
|
cph these storings avoid recomp. of Ri_iwmix |
130 |
|
CADJ STORE ghat = comlev1_kpp, key = ikey |
131 |
|
CADJ STORE dbloc = comlev1_kpp, key = ikey |
132 |
|
cph) |
133 |
call Ri_iwmix ( |
call Ri_iwmix ( |
134 |
I kmtj, shsq, dbloc, ghat |
I kmtj, shsq, dbloc, ghat |
135 |
I , ikey |
I , ikey |
136 |
O , diffus ) |
O , diffus ) |
137 |
|
|
138 |
|
cph( |
139 |
|
cph these storings avoid recomp. of Ri_iwmix |
140 |
|
cph DESPITE TAFs 'not necessary' warning! |
141 |
|
CADJ STORE dbloc = comlev1_kpp, key = ikey |
142 |
|
CADJ STORE shsq = comlev1_kpp, key = ikey |
143 |
|
CADJ STORE ghat = comlev1_kpp, key = ikey |
144 |
|
CADJ STORE diffus = comlev1_kpp, key = ikey |
145 |
|
cph) |
146 |
|
|
147 |
c----------------------------------------------------------------------- |
c----------------------------------------------------------------------- |
148 |
c set seafloor values to zero and fill extra "Nrp1" coefficients |
c set seafloor values to zero and fill extra "Nrp1" coefficients |
149 |
c for blmix |
c for blmix |
181 |
I ustar, bfsfc, hbl, stable, casea, diffus, kbl |
I ustar, bfsfc, hbl, stable, casea, diffus, kbl |
182 |
O , dkm1, blmc, ghat, sigma, ikey |
O , dkm1, blmc, ghat, sigma, ikey |
183 |
& ) |
& ) |
184 |
|
cph( |
185 |
CADJ STORE dkm1,blmc,ghat = comlev1_kpp, key = ikey |
CADJ STORE dkm1,blmc,ghat = comlev1_kpp, key = ikey |
186 |
|
CADJ STORE hbl, kbl, diffus, casea = comlev1_kpp, key = ikey |
187 |
|
cph) |
188 |
|
|
189 |
c----------------------------------------------------------------------- |
c----------------------------------------------------------------------- |
190 |
c enhance diffusivity at interface kbl - 1 |
c enhance diffusivity at interface kbl - 1 |
195 |
U , ghat |
U , ghat |
196 |
O , blmc ) |
O , blmc ) |
197 |
|
|
198 |
|
cph( |
199 |
|
cph avoids recomp. of enhance |
200 |
|
CADJ STORE blmc = comlev1_kpp, key = ikey |
201 |
|
cph) |
202 |
|
|
203 |
c----------------------------------------------------------------------- |
c----------------------------------------------------------------------- |
204 |
c combine interior and boundary layer coefficients and nonlocal term |
c combine interior and boundary layer coefficients and nonlocal term |
205 |
|
c !!!NOTE!!! In shallow (2-level) regions and for shallow mixed layers |
206 |
|
c (< 1 level), diffusivity blmc can become negative. The max's below |
207 |
|
c are a hack until this problem is properly diagnosed and fixed. |
208 |
c----------------------------------------------------------------------- |
c----------------------------------------------------------------------- |
|
|
|
209 |
do k = 1, Nr |
do k = 1, Nr |
210 |
do i = 1, imt |
do i = 1, imt |
211 |
if (k .lt. kbl(i)) then |
if (k .lt. kbl(i)) then |
212 |
do md = 1, mdiff |
diffus(i,k,1) = max ( blmc(i,k,1), viscAr ) |
213 |
diffus(i,k,md) = blmc(i,k,md) |
diffus(i,k,2) = max ( blmc(i,k,2), diffKrS ) |
214 |
end do |
diffus(i,k,3) = max ( blmc(i,k,3), diffKrT ) |
215 |
else |
else |
216 |
ghat(i,k) = 0. |
ghat(i,k) = 0. |
217 |
endif |
endif |