/[MITgcm]/MITgcm/model/src/adams_bashforth2.F
ViewVC logotype

Annotation of /MITgcm/model/src/adams_bashforth2.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.7 - (hide annotations) (download)
Fri Oct 19 14:41:39 2007 UTC (16 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint63d, checkpoint63e, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint62b, checkpoint61f, checkpoint61n, checkpoint59j, checkpoint61q, checkpoint61e, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.6: +14 -12 lines
prepare for "clever pickup" implementation:
add startAB parameter to argument list of S/R ADAMS_BASHFORTH2

1 jmc 1.7 C $Header: /u/gcmpack/MITgcm/model/src/adams_bashforth2.F,v 1.6 2005/04/15 14:11:01 jmc Exp $
2 cnh 1.2 C $Name: $
3 adcroft 1.1
4     #include "CPP_OPTIONS.h"
5    
6 cnh 1.2 CBOP
7     C !ROUTINE: ADAMS_BASHFORTH2
8     C !INTERFACE:
9 adcroft 1.1 SUBROUTINE ADAMS_BASHFORTH2(
10 jmc 1.6 I bi, bj, k,
11 adcroft 1.1 U gTracer, gTrNm1,
12 jmc 1.7 I startAB, myIter, myThid )
13 cnh 1.2 C !DESCRIPTION: \bv
14     C *==========================================================*
15 jmc 1.7 C | S/R ADAMS_BASHFORTH2
16     C | o Extrapolate tendencies forward in time using
17     C | quasi-second order Adams-Bashforth method.
18 cnh 1.2 C *==========================================================*
19     C \ev
20    
21     C !USES:
22 adcroft 1.1 IMPLICIT NONE
23     C == Global variables ===
24     #include "SIZE.h"
25     #include "EEPARAMS.h"
26     #include "PARAMS.h"
27    
28 cnh 1.2 C !INPUT/OUTPUT PARAMETERS:
29 adcroft 1.1 C == Routine Arguments ==
30 jmc 1.6 C bi,bj,k :: Tile and level indices
31 cnh 1.2 C gTracer :: Tendency at current time ( generally units of quantity/sec )
32     C gTrNm1 :: Tendency at previous time ( generally units of quantity/sec )
33 jmc 1.7 C startAB :: number of previous time level available to start/restart AB
34 cnh 1.2 C myIter :: Current time step number
35     C myThid :: Thread number of this thread
36 jmc 1.6 INTEGER bi,bj,k
37 adcroft 1.1 _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)
39 jmc 1.7 INTEGER startAB
40 adcroft 1.1 INTEGER myIter, myThid
41 cnh 1.2
42     C !LOCAL VARIABLES:
43 adcroft 1.1 C == Local variables ==
44 cnh 1.2 C i,j :: Loop counters
45     C ab15, ab05 :: Adams bashforth extrapolation weights.
46 adcroft 1.1 INTEGER i,j
47     _RL ab15,ab05
48     _RL gTrtmp
49 cnh 1.2 CEOP
50 adcroft 1.1
51     C Adams-Bashforth timestepping weights
52 jmc 1.7 IF ( myIter.EQ.nIter0 .AND. startAB.EQ.0 ) THEN
53     ab15 = 1. _d 0
54     ab05 = 0. _d 0
55 adcroft 1.1 ELSE
56 jmc 1.7 ab15 = 1.5 _d 0 + abEps
57     ab05 = -( 0.5 _d 0 + abEps )
58 adcroft 1.1 ENDIF
59    
60 jmc 1.7 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
61 adcroft 1.1
62     C- Compute effective G-term with Adams-Bashforth weights:
63     DO j=1-Oly,sNy+Oly
64     DO i=1-Olx,sNx+Olx
65 jmc 1.7 gTrtmp = ab15*gTracer(i,j,k,bi,bj)
66 adcroft 1.1 & + ab05*gTrNm1(i,j,k,bi,bj)
67     gTrNm1(i,j,k,bi,bj) = gTracer(i,j,k,bi,bj)
68     gTracer(i,j,k,bi,bj) = gTrtmp
69     ENDDO
70     ENDDO
71    
72     RETURN
73     END

  ViewVC Help
Powered by ViewVC 1.1.22