/[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.4 - (show annotations) (download)
Tue Jul 27 00:16:17 2004 UTC (19 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint56b_post, checkpoint54d_post, checkpoint54e_post, checkpoint55, checkpoint56, checkpoint54f_post, checkpoint55i_post, checkpoint55c_post, checkpoint55g_post, checkpoint55d_post, checkpoint55d_pre, checkpoint55j_post, checkpoint55h_post, checkpoint55b_post, checkpoint55f_post, checkpoint56a_post, checkpoint56c_post, checkpoint55a_post, checkpoint55e_post
Changes since 1.3: +3 -3 lines
no Adams-Bashforth for the 1rst iteration: fix it when staggerTimeStep

1 C $Header: /u/gcmpack/MITgcm/model/src/adams_bashforth2.F,v 1.3 2003/10/31 20:35:32 edhill 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 "GAD.h"
28 #include "GRID.h"
29 #include "SURFACE.h"
30
31 C !INPUT/OUTPUT PARAMETERS:
32 C == Routine Arguments ==
33 C bi,bj,K :: Tile and level indices
34 C gTracer :: Tendency at current time ( generally units of quantity/sec )
35 C gTrNm1 :: Tendency at previous time ( generally units of quantity/sec )
36 C myIter :: Current time step number
37 C myThid :: Thread number of this thread
38 INTEGER bi,bj,K
39 _RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
40 _RL gTrNm1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
41 INTEGER myIter, myThid
42
43 C !LOCAL VARIABLES:
44 C == Local variables ==
45 C i,j :: Loop counters
46 C ab15, ab05 :: Adams bashforth extrapolation weights.
47 INTEGER i,j
48 _RL ab15,ab05
49 _RL gTrtmp
50 CEOP
51
52 C Adams-Bashforth timestepping weights
53 IF ( myIter.EQ.0 .OR.
54 & (myIter.EQ.1 .AND. staggerTimeStep) ) THEN
55 ab15=1.0
56 ab05=0.0
57 ELSE
58 ab15=1.5+abEps
59 ab05=-(0.5+abEps)
60 ENDIF
61
62 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----
63
64 C- Compute effective G-term with Adams-Bashforth weights:
65 DO j=1-Oly,sNy+Oly
66 DO i=1-Olx,sNx+Olx
67 gTrtmp = ab15*gTracer(i,j,k,bi,bj)
68 & + ab05*gTrNm1(i,j,k,bi,bj)
69 gTrNm1(i,j,k,bi,bj) = gTracer(i,j,k,bi,bj)
70 gTracer(i,j,k,bi,bj) = gTrtmp
71 ENDDO
72 ENDDO
73
74 RETURN
75 END

  ViewVC Help
Powered by ViewVC 1.1.22