84 |
_RL pH (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nz) |
_RL pH (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nz) |
85 |
_RL rhokm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL rhokm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
86 |
_RL rhokp1(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL rhokp1(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
87 |
|
_RL rhotmp(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
88 |
_RL pSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL pSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
89 |
_RL pSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL pSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
90 |
_RL K13 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nz) |
_RL K13 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nz) |
123 |
ENDDO |
ENDDO |
124 |
rhokm1(i,j) = 0. _d 0 |
rhokm1(i,j) = 0. _d 0 |
125 |
rhokp1(i,j) = 0. _d 0 |
rhokp1(i,j) = 0. _d 0 |
126 |
|
rhotmp(i,j) = 0. _d 0 |
127 |
ENDDO |
ENDDO |
128 |
ENDDO |
ENDDO |
129 |
|
|
173 |
|
|
174 |
C-- Density of 1st level (below W(1)) reference to level 1 |
C-- Density of 1st level (below W(1)) reference to level 1 |
175 |
CALL FIND_RHO( |
CALL FIND_RHO( |
176 |
I bi, bj, iMin, iMax, jMin, jMax, 1, 1, 'LINEAR', |
I bi, bj, iMin, iMax, jMin, jMax, 1, 1, eosType, |
177 |
O rhoKm1, |
O rhoKm1, |
178 |
I myThid ) |
I myThid ) |
179 |
C-- Integrate hydrostatic balance for pH with BC of pH(z=0)=0 |
C-- Integrate hydrostatic balance for pH with BC of pH(z=0)=0 |
181 |
I bi,bj,iMin,iMax,jMin,jMax,1,rhoKm1,rhoKm1, |
I bi,bj,iMin,iMax,jMin,jMax,1,rhoKm1,rhoKm1, |
182 |
U pH, |
U pH, |
183 |
I myThid ) |
I myThid ) |
184 |
|
DO J=1-Oly,sNy+Oly |
185 |
|
DO I=1-Olx,sNx+Olx |
186 |
|
rhoKp1(I,J)=rhoKm1(I,J) |
187 |
|
ENDDO |
188 |
|
ENDDO |
189 |
|
|
190 |
DO K=2,Nz |
DO K=2,Nz |
191 |
C-- Update fields in Kth level according to tendency terms |
C-- Update fields in Kth level according to tendency terms |
192 |
CALL TIMESTEP( |
CALL TIMESTEP( |
193 |
I bi,bj,iMin,iMax,jMin,jMax,K,pSurfX,pSurfY,myThid) |
I bi,bj,iMin,iMax,jMin,jMax,K,pSurfX,pSurfY,myThid) |
194 |
C-- Density of K-1 level (above W(K)) reference to K level |
C-- Density of K-1 level (above W(K)) reference to K-1 level |
195 |
CALL FIND_RHO( |
copt CALL FIND_RHO( |
196 |
I bi, bj, iMin, iMax, jMin, jMax, K-1, K, 'LINEAR', |
copt I bi, bj, iMin, iMax, jMin, jMax, K-1, K-1, eosType, |
197 |
O rhoKm1, |
copt O rhoKm1, |
198 |
I myThid ) |
copt I myThid ) |
199 |
|
C rhoKm1=rhoKp1 |
200 |
|
DO J=1-Oly,sNy+Oly |
201 |
|
DO I=1-Olx,sNx+Olx |
202 |
|
rhoKm1(I,J)=rhoKp1(I,J) |
203 |
|
ENDDO |
204 |
|
ENDDO |
205 |
C-- Density of K level (below W(K)) reference to K level |
C-- Density of K level (below W(K)) reference to K level |
206 |
CALL FIND_RHO( |
CALL FIND_RHO( |
207 |
I bi, bj, iMin, iMax, jMin, jMax, K, K, 'LINEAR', |
I bi, bj, iMin, iMax, jMin, jMax, K, K, eosType, |
208 |
O rhoKp1, |
O rhoKp1, |
209 |
I myThid ) |
I myThid ) |
210 |
|
C-- Density of K-1 level (above W(K)) reference to K level |
211 |
|
CALL FIND_RHO( |
212 |
|
I bi, bj, iMin, iMax, jMin, jMax, K-1, K, eosType, |
213 |
|
O rhotmp, |
214 |
|
I myThid ) |
215 |
C-- Calculate iso-neutral slopes for the GM/Redi parameterisation |
C-- Calculate iso-neutral slopes for the GM/Redi parameterisation |
216 |
CALL CALC_ISOSLOPES( |
CALL CALC_ISOSLOPES( |
217 |
I bi, bj, iMin, iMax, jMin, jMax, K, |
I bi, bj, iMin, iMax, jMin, jMax, K, |
218 |
I rhoKm1, rhoKp1, |
I rhoKm1, rhoKp1, rhotmp, |
219 |
O K13, K23, K33, KapGM, |
O K13, K23, K33, KapGM, |
220 |
I myThid ) |
I myThid ) |
221 |
C-- Calculate static stability and mix where convectively unstable |
C-- Calculate static stability and mix where convectively unstable |
224 |
I myTime,myIter,myThid) |
I myTime,myIter,myThid) |
225 |
C-- Density of K-1 level (above W(K)) reference to K-1 level |
C-- Density of K-1 level (above W(K)) reference to K-1 level |
226 |
CALL FIND_RHO( |
CALL FIND_RHO( |
227 |
I bi, bj, iMin, iMax, jMin, jMax, K-1, K-1, 'LINEAR', |
I bi, bj, iMin, iMax, jMin, jMax, K-1, K-1, eosType, |
228 |
O rhoKm1, |
O rhoKm1, |
229 |
I myThid ) |
I myThid ) |
230 |
C-- Density of K level (below W(K)) referenced to K level |
C-- Density of K level (below W(K)) referenced to K level |
231 |
CALL FIND_RHO( |
CALL FIND_RHO( |
232 |
I bi, bj, iMin, iMax, jMin, jMax, K, K, 'LINEAR', |
I bi, bj, iMin, iMax, jMin, jMax, K, K, eosType, |
233 |
O rhoKp1, |
O rhoKp1, |
234 |
I myThid ) |
I myThid ) |
235 |
C-- Integrate hydrostatic balance for pH with BC of pH(z=0)=0 |
C-- Integrate hydrostatic balance for pH with BC of pH(z=0)=0 |
292 |
!dbg & maxval(uVel(1:sNx,1:sNy,:,:,:)) |
!dbg & maxval(uVel(1:sNx,1:sNy,:,:,:)) |
293 |
!dbg write(0,*) 'dynamics: V',minval(vVel(1:sNx,1:sNy,:,:,:)), |
!dbg write(0,*) 'dynamics: V',minval(vVel(1:sNx,1:sNy,:,:,:)), |
294 |
!dbg & maxval(vVel(1:sNx,1:sNy,:,:,:)) |
!dbg & maxval(vVel(1:sNx,1:sNy,:,:,:)) |
295 |
|
!dbg write(0,*) 'dynamics: K13',minval(K13(1:sNx,1:sNy,:)), |
296 |
|
!dbg & maxval(K13(1:sNx,1:sNy,:)) |
297 |
|
!dbg write(0,*) 'dynamics: K23',minval(K23(1:sNx,1:sNy,:)), |
298 |
|
!dbg & maxval(K23(1:sNx,1:sNy,:)) |
299 |
|
!dbg write(0,*) 'dynamics: K33',minval(K33(1:sNx,1:sNy,:)), |
300 |
|
!dbg & maxval(K33(1:sNx,1:sNy,:)) |
301 |
!dbg write(0,*) 'dynamics: gT',minval(gT(1:sNx,1:sNy,:,:,:)), |
!dbg write(0,*) 'dynamics: gT',minval(gT(1:sNx,1:sNy,:,:,:)), |
302 |
!dbg & maxval(gT(1:sNx,1:sNy,:,:,:)) |
!dbg & maxval(gT(1:sNx,1:sNy,:,:,:)) |
303 |
!dbg write(0,*) 'dynamics: T',minval(Theta(1:sNx,1:sNy,:,:,:)), |
!dbg write(0,*) 'dynamics: T',minval(Theta(1:sNx,1:sNy,:,:,:)), |