43 |
#include "DYNVARS.h" |
#include "DYNVARS.h" |
44 |
#include "SURFACE.h" |
#include "SURFACE.h" |
45 |
#include "GAD.h" |
#include "GAD.h" |
46 |
|
#ifdef ALLOW_PTRACERS |
47 |
|
#include "PTRACERS_OPTIONS.h" |
48 |
|
#include "PTRACERS.h" |
49 |
|
#endif |
50 |
|
|
51 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
52 |
#include "tamc.h" |
#include "tamc.h" |
66 |
C diffK4 :: bi-harmonic diffusion coefficient |
C diffK4 :: bi-harmonic diffusion coefficient |
67 |
C KappaRT :: 3-D array for vertical diffusion coefficient |
C KappaRT :: 3-D array for vertical diffusion coefficient |
68 |
C Tracer :: tracer field |
C Tracer :: tracer field |
69 |
C tracerIdentity :: identifier for the tracer (required only for KPP) |
C tracerIdentity :: identifier for the tracer (required for KPP and GM) |
70 |
C advectionScheme :: advection scheme to use |
C advectionScheme :: advection scheme to use |
71 |
C calcAdvection :: =False if Advec terms computed with multiDim scheme |
C calcAdvection :: =False if Advec terms computed with multiDim scheme |
72 |
C myThid :: thread number |
C myThid :: thread number |
135 |
|
|
136 |
C-- Unless we have already calculated the advection terms we initialize |
C-- Unless we have already calculated the advection terms we initialize |
137 |
C the tendency to zero. |
C the tendency to zero. |
138 |
IF (calcAdvection) THEN |
C <== now done earlier at the beginning of thermodynamics. |
139 |
DO j=1-Oly,sNy+Oly |
c IF (calcAdvection) THEN |
140 |
DO i=1-Olx,sNx+Olx |
c DO j=1-Oly,sNy+Oly |
141 |
gTracer(i,j,k,bi,bj)=0. _d 0 |
c DO i=1-Olx,sNx+Olx |
142 |
ENDDO |
c gTracer(i,j,k,bi,bj)=0. _d 0 |
143 |
ENDDO |
c ENDDO |
144 |
ENDIF |
c ENDDO |
145 |
|
c ENDIF |
146 |
|
|
147 |
C-- Pre-calculate del^2 T if bi-harmonic coefficient is non-zero |
C-- Pre-calculate del^2 T if bi-harmonic coefficient is non-zero |
148 |
IF (diffK4 .NE. 0.) THEN |
IF (diffK4 .NE. 0.) THEN |
407 |
I iMin,iMax,jMin,jMax,bi,bj,k,km1, |
I iMin,iMax,jMin,jMax,bi,bj,k,km1, |
408 |
I KappaRT, |
I KappaRT, |
409 |
U df ) |
U df ) |
410 |
|
#ifdef ALLOW_PTRACERS |
411 |
|
ELSEIF (tracerIdentity .GE. GAD_TR1 .AND. |
412 |
|
& tracerIdentity .LE. (GAD_TR1+PTRACERS_numInUse-1)) THEN |
413 |
|
CALL KPP_TRANSPORT_PTR( |
414 |
|
I iMin,iMax,jMin,jMax,bi,bj,k,km1, |
415 |
|
I tracerIdentity,KappaRT, |
416 |
|
U df ) |
417 |
|
#endif |
418 |
ELSE |
ELSE |
419 |
|
PRINT*,'invalid tracer indentity: ', tracerIdentity |
420 |
STOP 'GAD_CALC_RHS: Ooops' |
STOP 'GAD_CALC_RHS: Ooops' |
421 |
ENDIF |
ENDIF |
422 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |