1 |
adcroft |
1.1 |
C $Header: $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "CPP_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
SUBROUTINE ADAMS_BASHFORTH2( |
7 |
|
|
I bi, bj, K, |
8 |
|
|
U gTracer, gTrNm1, |
9 |
|
|
I myIter, myThid ) |
10 |
|
|
C /==========================================================\ |
11 |
|
|
C | S/R ADAMS_BASHFORTH2 | |
12 |
|
|
C | o Extrapolate tendancies forward in time using | |
13 |
|
|
C | quasi-second order Adams-Bashforth method. | |
14 |
|
|
C \==========================================================/ |
15 |
|
|
IMPLICIT NONE |
16 |
|
|
|
17 |
|
|
C == Global variables === |
18 |
|
|
#include "SIZE.h" |
19 |
|
|
#include "EEPARAMS.h" |
20 |
|
|
#include "PARAMS.h" |
21 |
|
|
#include "GAD.h" |
22 |
|
|
#include "GRID.h" |
23 |
|
|
#include "SURFACE.h" |
24 |
|
|
|
25 |
|
|
C == Routine Arguments == |
26 |
|
|
INTEGER bi,bj,K |
27 |
|
|
_RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
28 |
|
|
_RL gTrNm1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
29 |
|
|
INTEGER myIter, myThid |
30 |
|
|
C == Local variables == |
31 |
|
|
INTEGER i,j |
32 |
|
|
_RL ab15,ab05 |
33 |
|
|
_RL gTrtmp |
34 |
|
|
|
35 |
|
|
C Adams-Bashforth timestepping weights |
36 |
|
|
IF (myIter .EQ. 0) THEN |
37 |
|
|
ab15=1.0 |
38 |
|
|
ab05=0.0 |
39 |
|
|
ELSE |
40 |
|
|
ab15=1.5+abEps |
41 |
|
|
ab05=-(0.5+abEps) |
42 |
|
|
ENDIF |
43 |
|
|
|
44 |
|
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
45 |
|
|
|
46 |
|
|
C- Compute effective G-term with Adams-Bashforth weights: |
47 |
|
|
DO j=1-Oly,sNy+Oly |
48 |
|
|
DO i=1-Olx,sNx+Olx |
49 |
|
|
gTrtmp = ab15*gTracer(i,j,k,bi,bj) |
50 |
|
|
& + ab05*gTrNm1(i,j,k,bi,bj) |
51 |
|
|
gTrNm1(i,j,k,bi,bj) = gTracer(i,j,k,bi,bj) |
52 |
|
|
gTracer(i,j,k,bi,bj) = gTrtmp |
53 |
|
|
ENDDO |
54 |
|
|
ENDDO |
55 |
|
|
|
56 |
|
|
RETURN |
57 |
|
|
END |