43 |
#include "PARAMS.h" |
#include "PARAMS.h" |
44 |
#include "GRID.h" |
#include "GRID.h" |
45 |
#include "FFIELDS.h" |
#include "FFIELDS.h" |
46 |
|
#ifdef ALLOW_KPP |
47 |
|
#include "KPPMIX.h" |
48 |
|
#endif |
49 |
|
|
50 |
C == Routine arguments == |
C == Routine arguments == |
51 |
C fZon - Work array for flux of temperature in the east-west |
C fZon - Work array for flux of temperature in the east-west |
60 |
C yA - Tracer cell face area normal to X |
C yA - Tracer cell face area normal to X |
61 |
C uTrans - Zonal volume transport through cell face |
C uTrans - Zonal volume transport through cell face |
62 |
C vTrans - Meridional volume transport through cell face |
C vTrans - Meridional volume transport through cell face |
63 |
C wTrans - Vertical volume transport through cell face |
C rTrans - Vertical volume transport through cell face |
64 |
C af - Advective flux component work array |
C af - Advective flux component work array |
65 |
C df - Diffusive flux component work array |
C df - Diffusive flux component work array |
66 |
C bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation |
C bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation |
84 |
_RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
85 |
INTEGER k,kUp,kDown,kM1 |
INTEGER k,kUp,kDown,kM1 |
86 |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
|
INTEGER myThid |
|
87 |
_RL myCurrentTime |
_RL myCurrentTime |
88 |
|
INTEGER myThid |
89 |
CEndOfInterface |
CEndOfInterface |
90 |
|
|
91 |
C == Local variables == |
C == Local variables == |
230 |
ENDDO |
ENDDO |
231 |
ENDDO |
ENDDO |
232 |
ENDIF |
ENDIF |
233 |
|
#ifdef ALLOW_KPP |
234 |
|
IF (usingKPPmixing) THEN |
235 |
|
C-- Add non local transport coefficient (ghat term) to right-hand-side |
236 |
|
C The nonlocal transport term is noNrero only for scalars in unstable |
237 |
|
C (convective) forcing conditions. |
238 |
|
IF ( TOP_LAYER ) THEN |
239 |
|
DO j=jMin,jMax |
240 |
|
DO i=iMin,iMax |
241 |
|
df(i,j) = df(i,j) - _rA(i,j,bi,bj) * |
242 |
|
& EmPmR(i,j,bi,bj) * delZ(1) * |
243 |
|
& ( KappaRS(i,j,k) * KPPghat(i,j,k,bi,bj) ) |
244 |
|
ENDDO |
245 |
|
ENDDO |
246 |
|
ELSE |
247 |
|
DO j=jMin,jMax |
248 |
|
DO i=iMin,iMax |
249 |
|
df(i,j) = df(i,j) - _rA(i,j,bi,bj) * |
250 |
|
& EmPmR(i,j,bi,bj) * delZ(1) * |
251 |
|
& ( KappaRS(i,j,k) * KPPghat(i,j,k,bi,bj) |
252 |
|
& - KappaRS(i,j,k-1) * KPPghat(i,j,k-1,bi,bj) ) |
253 |
|
ENDDO |
254 |
|
ENDDO |
255 |
|
ENDIF |
256 |
|
ENDIF |
257 |
|
#endif /* ALLOW_KPP */ |
258 |
|
|
259 |
C Net vertical flux |
C Net vertical flux |
260 |
DO j=jMin,jMax |
DO j=jMin,jMax |
261 |
DO i=iMin,iMax |
DO i=iMin,iMax |