11 |
I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown, |
I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown, |
12 |
I xA,yA,uTrans,vTrans,rTrans,rTransKp1,maskUp, |
I xA,yA,uTrans,vTrans,rTrans,rTransKp1,maskUp, |
13 |
I uVel, vVel, wVel, |
I uVel, vVel, wVel, |
14 |
I diffKh, diffK4, KappaR, Tracer, TracAB, |
I diffKh, diffK4, KappaR, TracerN, TracAB, |
15 |
I tracerIdentity, advectionScheme, vertAdvecScheme, |
I tracerIdentity, advectionScheme, vertAdvecScheme, |
16 |
I calcAdvection, implicitAdvection, |
I calcAdvection, implicitAdvection, applyAB_onTracer, |
17 |
U fVerT, gTracer, |
U fVerT, gTracer, |
18 |
I myTime, myIter, myThid ) |
I myTime, myIter, myThid ) |
19 |
|
|
66 |
C diffKh :: horizontal diffusion coefficient |
C diffKh :: horizontal diffusion coefficient |
67 |
C diffK4 :: bi-harmonic diffusion coefficient |
C diffK4 :: bi-harmonic diffusion coefficient |
68 |
C KappaR :: 2-D array for vertical diffusion coefficient, interf k |
C KappaR :: 2-D array for vertical diffusion coefficient, interf k |
69 |
C Tracer :: tracer field @ time-step n (Note: only used |
C TracerN :: tracer field @ time-step n (Note: only used |
70 |
C if applying AB on tracer field rather than on tendency Gtr) |
C if applying AB on tracer field rather than on tendency gTr) |
71 |
C TracAB :: current tracer field (@ time-step n if applying AB on Gtr |
C TracAB :: current tracer field (@ time-step n if applying AB on gTr |
72 |
C or extrapolated fwd in time to n+1/2 if applying AB on Tr) |
C or extrapolated fwd in time to n+1/2 if applying AB on Tr) |
73 |
C tracerIdentity :: tracer identifier (required for KPP,GM) |
C tracerIdentity :: tracer identifier (required for KPP,GM) |
74 |
C advectionScheme :: advection scheme to use (Horizontal plane) |
C advectionScheme :: advection scheme to use (Horizontal plane) |
75 |
C vertAdvecScheme :: advection scheme to use (Vertical direction) |
C vertAdvecScheme :: advection scheme to use (Vertical direction) |
76 |
C calcAdvection :: =False if Advec computed with multiDim scheme |
C calcAdvection :: =False if Advec computed with multiDim scheme |
77 |
C implicitAdvection:: =True if vertical Advec computed implicitly |
C implicitAdvection:: =True if vertical Advec computed implicitly |
78 |
|
C applyAB_onTracer :: apply Adams-Bashforth on Tracer (rather than on gTr) |
79 |
C myTime :: current time |
C myTime :: current time |
80 |
C myIter :: iteration number |
C myIter :: iteration number |
81 |
C myThid :: thread number |
C myThid :: thread number |
93 |
_RL wVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
_RL wVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
94 |
_RL diffKh, diffK4 |
_RL diffKh, diffK4 |
95 |
_RL KappaR(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL KappaR(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
96 |
_RL Tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
_RL TracerN(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
97 |
_RL TracAB(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
_RL TracAB (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
98 |
INTEGER tracerIdentity |
INTEGER tracerIdentity |
99 |
INTEGER advectionScheme, vertAdvecScheme |
INTEGER advectionScheme, vertAdvecScheme |
100 |
LOGICAL calcAdvection |
LOGICAL calcAdvection |
101 |
LOGICAL implicitAdvection |
LOGICAL implicitAdvection, applyAB_onTracer |
102 |
_RL myTime |
_RL myTime |
103 |
INTEGER myIter, myThid |
INTEGER myIter, myThid |
104 |
|
|
162 |
ENDDO |
ENDDO |
163 |
|
|
164 |
C-- Make local copy of tracer array |
C-- Make local copy of tracer array |
165 |
#ifdef ALLOW_ADAMSBASHFORTH_3 |
IF ( applyAB_onTracer ) THEN |
166 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
167 |
DO i=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
168 |
localT(i,j)=Tracer(i,j,k,bi,bj) |
localT(i,j)=TracerN(i,j,k,bi,bj) |
169 |
locABT(i,j)=TracAB(i,j,k,bi,bj) |
locABT(i,j)= TracAB(i,j,k,bi,bj) |
170 |
ENDDO |
ENDDO |
171 |
ENDDO |
ENDDO |
172 |
#else /* ALLOW_ADAMSBASHFORTH_3 */ |
ELSE |
173 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
174 |
DO i=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
175 |
localT(i,j)=TracAB(i,j,k,bi,bj) |
localT(i,j)= TracAB(i,j,k,bi,bj) |
176 |
locABT(i,j)=TracAB(i,j,k,bi,bj) |
locABT(i,j)= TracAB(i,j,k,bi,bj) |
177 |
ENDDO |
ENDDO |
178 |
ENDDO |
ENDDO |
179 |
#endif /* ALLOW_ADAMSBASHFORTH_3 */ |
ENDIF |
180 |
|
|
181 |
C-- Unless we have already calculated the advection terms we initialize |
C-- Unless we have already calculated the advection terms we initialize |
182 |
C the tendency to zero. |
C the tendency to zero. |
273 |
C- GM/Redi flux in X |
C- GM/Redi flux in X |
274 |
IF (useGMRedi) THEN |
IF (useGMRedi) THEN |
275 |
C *note* should update GMREDI_XTRANSPORT to set df *aja* |
C *note* should update GMREDI_XTRANSPORT to set df *aja* |
276 |
CALL GMREDI_XTRANSPORT( |
IF ( applyAB_onTracer ) THEN |
277 |
I iMin,iMax,jMin,jMax,bi,bj,K, |
CALL GMREDI_XTRANSPORT( |
278 |
#ifdef ALLOW_ADAMSBASHFORTH_3 |
I iMin,iMax,jMin,jMax,bi,bj,k, |
279 |
I xA,Tracer,tracerIdentity, |
I xA,TracerN,tracerIdentity, |
280 |
#else |
U df, |
281 |
I xA,TracAB,tracerIdentity, |
I myThid) |
282 |
#endif |
ELSE |
283 |
U df, |
CALL GMREDI_XTRANSPORT( |
284 |
I myThid) |
I iMin,iMax,jMin,jMax,bi,bj,k, |
285 |
|
I xA,TracAB, tracerIdentity, |
286 |
|
U df, |
287 |
|
I myThid) |
288 |
|
ENDIF |
289 |
ENDIF |
ENDIF |
290 |
#endif |
#endif |
291 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
381 |
C- GM/Redi flux in Y |
C- GM/Redi flux in Y |
382 |
IF (useGMRedi) THEN |
IF (useGMRedi) THEN |
383 |
C *note* should update GMREDI_YTRANSPORT to set df *aja* |
C *note* should update GMREDI_YTRANSPORT to set df *aja* |
384 |
CALL GMREDI_YTRANSPORT( |
IF ( applyAB_onTracer ) THEN |
385 |
I iMin,iMax,jMin,jMax,bi,bj,K, |
CALL GMREDI_YTRANSPORT( |
386 |
#ifdef ALLOW_ADAMSBASHFORTH_3 |
I iMin,iMax,jMin,jMax,bi,bj,k, |
387 |
I yA,Tracer,tracerIdentity, |
I yA,TracerN,tracerIdentity, |
388 |
#else |
U df, |
389 |
I yA,TracAB,tracerIdentity, |
I myThid) |
390 |
#endif |
ELSE |
391 |
U df, |
CALL GMREDI_YTRANSPORT( |
392 |
I myThid) |
I iMin,iMax,jMin,jMax,bi,bj,k, |
393 |
|
I yA,TracAB, tracerIdentity, |
394 |
|
U df, |
395 |
|
I myThid) |
396 |
|
ENDIF |
397 |
ENDIF |
ENDIF |
398 |
#endif |
#endif |
399 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
416 |
C- Advective flux in R |
C- Advective flux in R |
417 |
#ifdef ALLOW_AIM |
#ifdef ALLOW_AIM |
418 |
C- a hack to prevent Water-Vapor vert.transport into the stratospheric level Nr |
C- a hack to prevent Water-Vapor vert.transport into the stratospheric level Nr |
419 |
IF (calcAdvection .AND. .NOT.implicitAdvection .AND. K.GE.2 .AND. |
IF (calcAdvection .AND. .NOT.implicitAdvection .AND. k.GE.2 .AND. |
420 |
& (.NOT.useAIM .OR.tracerIdentity.NE.GAD_SALINITY .OR.K.LT.Nr) |
& (.NOT.useAIM .OR.tracerIdentity.NE.GAD_SALINITY .OR.k.LT.Nr) |
421 |
& ) THEN |
& ) THEN |
422 |
#else |
#else |
423 |
IF (calcAdvection .AND. .NOT.implicitAdvection .AND. K.GE.2) THEN |
IF (calcAdvection .AND. .NOT.implicitAdvection .AND. k.GE.2) THEN |
424 |
#endif |
#endif |
425 |
C- Compute vertical advective flux in the interior: |
C- Compute vertical advective flux in the interior: |
426 |
IF (vertAdvecScheme.EQ.ENUM_CENTERED_2ND) THEN |
IF (vertAdvecScheme.EQ.ENUM_CENTERED_2ND) THEN |
485 |
ENDDO |
ENDDO |
486 |
ENDDO |
ENDDO |
487 |
ELSE |
ELSE |
488 |
#ifdef ALLOW_ADAMSBASHFORTH_3 |
IF ( applyAB_onTracer ) THEN |
489 |
CALL GAD_DIFF_R(bi,bj,k,KappaR,Tracer,df,myThid) |
CALL GAD_DIFF_R(bi,bj,k,KappaR,TracerN,df,myThid) |
490 |
#else |
ELSE |
491 |
CALL GAD_DIFF_R(bi,bj,k,KappaR,TracAB,df,myThid) |
CALL GAD_DIFF_R(bi,bj,k,KappaR,TracAB, df,myThid) |
492 |
#endif |
ENDIF |
493 |
ENDIF |
ENDIF |
494 |
|
|
495 |
#ifdef ALLOW_GMREDI |
#ifdef ALLOW_GMREDI |
496 |
C- GM/Redi flux in R |
C- GM/Redi flux in R |
497 |
IF (useGMRedi) THEN |
IF (useGMRedi) THEN |
498 |
C *note* should update GMREDI_RTRANSPORT to set df *aja* |
C *note* should update GMREDI_RTRANSPORT to set df *aja* |
499 |
CALL GMREDI_RTRANSPORT( |
IF ( applyAB_onTracer ) THEN |
500 |
I iMin,iMax,jMin,jMax,bi,bj,K, |
CALL GMREDI_RTRANSPORT( |
501 |
#ifdef ALLOW_ADAMSBASHFORTH_3 |
I iMin,iMax,jMin,jMax,bi,bj,k, |
502 |
I Tracer,tracerIdentity, |
I TracerN,tracerIdentity, |
503 |
#else |
U df, |
504 |
I TracAB,tracerIdentity, |
I myThid) |
505 |
#endif |
ELSE |
506 |
U df, |
CALL GMREDI_RTRANSPORT( |
507 |
I myThid) |
I iMin,iMax,jMin,jMax,bi,bj,k, |
508 |
|
I TracAB, tracerIdentity, |
509 |
|
U df, |
510 |
|
I myThid) |
511 |
|
ENDIF |
512 |
ENDIF |
ENDIF |
513 |
#endif |
#endif |
514 |
|
|