93 |
# endif |
# endif |
94 |
# ifdef ALLOW_PTRACERS |
# ifdef ALLOW_PTRACERS |
95 |
# include "PTRACERS_SIZE.h" |
# include "PTRACERS_SIZE.h" |
96 |
# include "PTRACERS.h" |
# include "PTRACERS_FIELDS.h" |
97 |
# endif |
# endif |
98 |
# ifdef ALLOW_OBCS |
# ifdef ALLOW_OBCS |
99 |
# include "OBCS.h" |
# include "OBCS.h" |
139 |
|
|
140 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
141 |
C == Routine arguments == |
C == Routine arguments == |
142 |
C myTime - Current time in simulation |
C myTime :: Current time in simulation |
143 |
C myIter - Current iteration number in simulation |
C myIter :: Current iteration number in simulation |
144 |
C myThid - Thread number for this instance of the routine. |
C myThid :: Thread number for this instance of the routine. |
145 |
_RL myTime |
_RL myTime |
146 |
INTEGER myIter |
INTEGER myIter |
147 |
INTEGER myThid |
INTEGER myThid |
162 |
C phiSurfY or geopotential (atmos) in X and Y direction |
C phiSurfY or geopotential (atmos) in X and Y direction |
163 |
C guDissip :: dissipation tendency (all explicit terms), u component |
C guDissip :: dissipation tendency (all explicit terms), u component |
164 |
C gvDissip :: dissipation tendency (all explicit terms), v component |
C gvDissip :: dissipation tendency (all explicit terms), v component |
165 |
C KappaRU:: vertical viscosity |
C KappaRU :: vertical viscosity |
166 |
C KappaRV:: vertical viscosity |
C KappaRV :: vertical viscosity |
167 |
C iMin, iMax - Ranges and sub-block indices on which calculations |
C iMin, iMax - Ranges and sub-block indices on which calculations |
168 |
C jMin, jMax are applied. |
C jMin, jMax are applied. |
169 |
C bi, bj |
C bi, bj |
287 |
C point numbers. This prevents spurious hardware signals due to |
C point numbers. This prevents spurious hardware signals due to |
288 |
C uninitialised but inert locations. |
C uninitialised but inert locations. |
289 |
|
|
290 |
|
#ifdef ALLOW_AUTODIFF_TAMC |
291 |
DO k=1,Nr |
DO k=1,Nr |
292 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
293 |
DO i=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
294 |
KappaRU(i,j,k) = 0. _d 0 |
KappaRU(i,j,k) = 0. _d 0 |
295 |
KappaRV(i,j,k) = 0. _d 0 |
KappaRV(i,j,k) = 0. _d 0 |
|
#ifdef ALLOW_AUTODIFF_TAMC |
|
296 |
cph( |
cph( |
297 |
c-- need some re-initialisation here to break dependencies |
c-- need some re-initialisation here to break dependencies |
298 |
cph) |
cph) |
299 |
gU(i,j,k,bi,bj) = 0. _d 0 |
gU(i,j,k,bi,bj) = 0. _d 0 |
300 |
gV(i,j,k,bi,bj) = 0. _d 0 |
gV(i,j,k,bi,bj) = 0. _d 0 |
|
#endif |
|
301 |
ENDDO |
ENDDO |
302 |
ENDDO |
ENDDO |
303 |
ENDDO |
ENDDO |
304 |
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
305 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
306 |
DO i=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
307 |
fVerU (i,j,1) = 0. _d 0 |
fVerU (i,j,1) = 0. _d 0 |
316 |
phiSurfY(i,j) = 0. _d 0 |
phiSurfY(i,j) = 0. _d 0 |
317 |
guDissip(i,j) = 0. _d 0 |
guDissip(i,j) = 0. _d 0 |
318 |
gvDissip(i,j) = 0. _d 0 |
gvDissip(i,j) = 0. _d 0 |
319 |
|
#ifdef ALLOW_AUTODIFF_TAMC |
320 |
|
# ifdef NONLIN_FRSURF |
321 |
|
# ifndef DISABLE_RSTAR_CODE |
322 |
|
dWtransC(i,j,bi,bj) = 0. _d 0 |
323 |
|
dWtransU(i,j,bi,bj) = 0. _d 0 |
324 |
|
dWtransV(i,j,bi,bj) = 0. _d 0 |
325 |
|
# endif |
326 |
|
# endif |
327 |
|
#endif |
328 |
ENDDO |
ENDDO |
329 |
ENDDO |
ENDDO |
330 |
|
|
336 |
|
|
337 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
338 |
CADJ STORE wvel (:,:,:,bi,bj) = |
CADJ STORE wvel (:,:,:,bi,bj) = |
339 |
CADJ & comlev1_bibj, key = idynkey, byte = isbyte |
CADJ & comlev1_bibj, key=idynkey, byte=isbyte |
340 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
341 |
|
|
342 |
C-- Explicit part of the Surface Potentiel Gradient (add in TIMESTEP) |
C-- Explicit part of the Surface Potentiel Gradient (add in TIMESTEP) |
359 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
360 |
|
|
361 |
#ifdef INCLUDE_CALC_DIFFUSIVITY_CALL |
#ifdef INCLUDE_CALC_DIFFUSIVITY_CALL |
362 |
C-- Calculate the total vertical diffusivity |
C-- Calculate the total vertical viscosity |
363 |
|
CALL CALC_VISCOSITY( |
364 |
|
I bi,bj, iMin,iMax,jMin,jMax, |
365 |
|
O KappaRU, KappaRV, |
366 |
|
I myThid ) |
367 |
|
#else |
368 |
DO k=1,Nr |
DO k=1,Nr |
369 |
CALL CALC_VISCOSITY( |
DO j=1-OLy,sNy+OLy |
370 |
I bi,bj,iMin,iMax,jMin,jMax,k, |
DO i=1-OLx,sNx+OLx |
371 |
O KappaRU,KappaRV, |
KappaRU(i,j,k) = 0. _d 0 |
372 |
I myThid) |
KappaRV(i,j,k) = 0. _d 0 |
373 |
ENDDO |
ENDDO |
374 |
|
ENDDO |
375 |
|
ENDDO |
376 |
#endif |
#endif |
377 |
|
|
378 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
469 |
C-- Calculate accelerations in the momentum equations (gU, gV, ...) |
C-- Calculate accelerations in the momentum equations (gU, gV, ...) |
470 |
C and step forward storing the result in gU, gV, etc... |
C and step forward storing the result in gU, gV, etc... |
471 |
IF ( momStepping ) THEN |
IF ( momStepping ) THEN |
472 |
|
#ifdef ALLOW_AUTODIFF_TAMC |
473 |
|
# ifdef NONLIN_FRSURF |
474 |
|
# ifndef DISABLE_RSTAR_CODE |
475 |
|
CADJ STORE dWtransC(:,:,bi,bj) |
476 |
|
CADJ & = comlev1_bibj_k, key=kkey, byte=isbyte |
477 |
|
CADJ STORE dWtransU(:,:,bi,bj) |
478 |
|
CADJ & = comlev1_bibj_k, key=kkey, byte=isbyte |
479 |
|
CADJ STORE dWtransV(:,:,bi,bj) |
480 |
|
CADJ & = comlev1_bibj_k, key=kkey, byte=isbyte |
481 |
|
# endif |
482 |
|
# endif |
483 |
|
#endif |
484 |
IF (.NOT. vectorInvariantMomentum) THEN |
IF (.NOT. vectorInvariantMomentum) THEN |
485 |
#ifdef ALLOW_MOM_FLUXFORM |
#ifdef ALLOW_MOM_FLUXFORM |
486 |
C |
C |
630 |
C run with etaH of a z/p-coordinate run the drift of phiHydLow |
C run with etaH of a z/p-coordinate run the drift of phiHydLow |
631 |
C has to be removed by something like the following subroutine: |
C has to be removed by something like the following subroutine: |
632 |
C CALL REMOVE_MEAN_RL( 1, phiHydLow, maskH, maskH, rA, drF, |
C CALL REMOVE_MEAN_RL( 1, phiHydLow, maskH, maskH, rA, drF, |
633 |
C & 'phiHydLow', myThid ) |
C & 'phiHydLow', myTime, myThid ) |
634 |
Cml) |
Cml) |
635 |
|
|
636 |
#ifdef ALLOW_DIAGNOSTICS |
#ifdef ALLOW_DIAGNOSTICS |