9 |
SUBROUTINE ADAMS_BASHFORTH2( |
SUBROUTINE ADAMS_BASHFORTH2( |
10 |
I bi, bj, k, |
I bi, bj, k, |
11 |
U gTracer, gTrNm1, |
U gTracer, gTrNm1, |
12 |
I myIter, myThid ) |
I startAB, myIter, myThid ) |
13 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
14 |
C *==========================================================* |
C *==========================================================* |
15 |
C | S/R ADAMS_BASHFORTH2 |
C | S/R ADAMS_BASHFORTH2 |
16 |
C | o Extrapolate tendencies forward in time using |
C | o Extrapolate tendencies forward in time using |
17 |
C | quasi-second order Adams-Bashforth method. |
C | quasi-second order Adams-Bashforth method. |
18 |
C *==========================================================* |
C *==========================================================* |
19 |
C \ev |
C \ev |
20 |
|
|
30 |
C bi,bj,k :: Tile and level indices |
C bi,bj,k :: Tile and level indices |
31 |
C gTracer :: Tendency at current time ( generally units of quantity/sec ) |
C gTracer :: Tendency at current time ( generally units of quantity/sec ) |
32 |
C gTrNm1 :: Tendency at previous time ( generally units of quantity/sec ) |
C gTrNm1 :: Tendency at previous time ( generally units of quantity/sec ) |
33 |
|
C startAB :: number of previous time level available to start/restart AB |
34 |
C myIter :: Current time step number |
C myIter :: Current time step number |
35 |
C myThid :: Thread number of this thread |
C myThid :: Thread number of this thread |
36 |
INTEGER bi,bj,k |
INTEGER bi,bj,k |
37 |
_RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
_RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
38 |
_RL gTrNm1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
_RL gTrNm1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
39 |
|
INTEGER startAB |
40 |
INTEGER myIter, myThid |
INTEGER myIter, myThid |
41 |
|
|
42 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
49 |
CEOP |
CEOP |
50 |
|
|
51 |
C Adams-Bashforth timestepping weights |
C Adams-Bashforth timestepping weights |
52 |
IF ( myIter.EQ.0 ) THEN |
IF ( myIter.EQ.nIter0 .AND. startAB.EQ.0 ) THEN |
53 |
ab15=1.0 |
ab15 = 1. _d 0 |
54 |
ab05=0.0 |
ab05 = 0. _d 0 |
55 |
ELSE |
ELSE |
56 |
ab15=1.5+abEps |
ab15 = 1.5 _d 0 + abEps |
57 |
ab05=-(0.5+abEps) |
ab05 = -( 0.5 _d 0 + abEps ) |
58 |
ENDIF |
ENDIF |
59 |
|
|
60 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+---- |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
61 |
|
|
62 |
C- Compute effective G-term with Adams-Bashforth weights: |
C- Compute effective G-term with Adams-Bashforth weights: |
63 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
64 |
DO i=1-Olx,sNx+Olx |
DO i=1-Olx,sNx+Olx |
65 |
gTrtmp = ab15*gTracer(i,j,k,bi,bj) |
gTrtmp = ab15*gTracer(i,j,k,bi,bj) |
66 |
& + ab05*gTrNm1(i,j,k,bi,bj) |
& + ab05*gTrNm1(i,j,k,bi,bj) |
67 |
gTrNm1(i,j,k,bi,bj) = gTracer(i,j,k,bi,bj) |
gTrNm1(i,j,k,bi,bj) = gTracer(i,j,k,bi,bj) |
68 |
gTracer(i,j,k,bi,bj) = gTrtmp |
gTracer(i,j,k,bi,bj) = gTrtmp |