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

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

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


Revision 1.5 - (show annotations) (download)
Fri Dec 3 15:39:11 2004 UTC (19 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57g_pre, checkpoint57b_post, checkpoint57d_post, checkpoint57, checkpoint57f_post, checkpoint57a_post, checkpoint57c_post, checkpoint57c_pre, checkpoint57e_post, eckpoint57e_pre, checkpoint57f_pre, checkpoint57a_pre
Changes since 1.4: +1 -2 lines
allow to compile without generic_advdiff pkg.

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

  ViewVC Help
Powered by ViewVC 1.1.22