/[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.4 - (hide annotations) (download)
Tue Jul 27 00:16:17 2004 UTC (19 years, 11 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 jmc 1.4 C $Header: /u/gcmpack/MITgcm/model/src/adams_bashforth2.F,v 1.3 2003/10/31 20:35:32 edhill 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     I bi, bj, K,
11     U gTracer, gTrNm1,
12     I myIter, myThid )
13 cnh 1.2 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 adcroft 1.1 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 cnh 1.2 C !INPUT/OUTPUT PARAMETERS:
32 adcroft 1.1 C == Routine Arguments ==
33 cnh 1.2 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 adcroft 1.1 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 cnh 1.2
43     C !LOCAL VARIABLES:
44 adcroft 1.1 C == Local variables ==
45 cnh 1.2 C i,j :: Loop counters
46     C ab15, ab05 :: Adams bashforth extrapolation weights.
47 adcroft 1.1 INTEGER i,j
48     _RL ab15,ab05
49     _RL gTrtmp
50 cnh 1.2 CEOP
51 adcroft 1.1
52     C Adams-Bashforth timestepping weights
53 jmc 1.4 IF ( myIter.EQ.0 .OR.
54     & (myIter.EQ.1 .AND. staggerTimeStep) ) THEN
55 adcroft 1.1 ab15=1.0
56     ab05=0.0
57     ELSE
58     ab15=1.5+abEps
59     ab05=-(0.5+abEps)
60     ENDIF
61    
62 cnh 1.2 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----
63 adcroft 1.1
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