/[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.6 - (hide annotations) (download)
Fri Apr 15 14:11:01 2005 UTC (19 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57s_post, checkpoint58b_post, checkpoint57g_post, checkpoint57y_post, checkpoint57r_post, checkpoint57i_post, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint58y_post, checkpoint58t_post, checkpoint58m_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57h_pre, checkpoint58w_post, checkpoint57h_post, checkpoint57y_pre, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint58r_post, checkpoint58n_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59h, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, checkpoint58k_post, checkpoint58v_post, checkpoint58l_post, checkpoint57h_done, checkpoint57j_post, checkpoint58g_post, checkpoint58x_post, checkpoint58h_post, checkpoint58j_post, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post, checkpoint58u_post, checkpoint58s_post
Changes since 1.5: +6 -9 lines
modified to be used for momentum tendencies.

1 jmc 1.6 C $Header: /u/gcmpack/MITgcm/model/src/adams_bashforth2.F,v 1.5 2004/12/03 15:39:11 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     I myIter, myThid )
13 cnh 1.2 C !DESCRIPTION: \bv
14     C *==========================================================*
15     C | S/R ADAMS_BASHFORTH2
16 jmc 1.6 C | o Extrapolate tendencies forward in time using
17 cnh 1.2 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    
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     C myIter :: Current time step number
34     C myThid :: Thread number of this thread
35 jmc 1.6 INTEGER bi,bj,k
36 adcroft 1.1 _RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
37     _RL gTrNm1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
38     INTEGER myIter, myThid
39 cnh 1.2
40     C !LOCAL VARIABLES:
41 adcroft 1.1 C == Local variables ==
42 cnh 1.2 C i,j :: Loop counters
43     C ab15, ab05 :: Adams bashforth extrapolation weights.
44 adcroft 1.1 INTEGER i,j
45     _RL ab15,ab05
46     _RL gTrtmp
47 cnh 1.2 CEOP
48 adcroft 1.1
49     C Adams-Bashforth timestepping weights
50 jmc 1.6 IF ( myIter.EQ.0 ) THEN
51 adcroft 1.1 ab15=1.0
52     ab05=0.0
53     ELSE
54     ab15=1.5+abEps
55     ab05=-(0.5+abEps)
56     ENDIF
57    
58 cnh 1.2 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----
59 adcroft 1.1
60     C- Compute effective G-term with Adams-Bashforth weights:
61     DO j=1-Oly,sNy+Oly
62     DO i=1-Olx,sNx+Olx
63     gTrtmp = ab15*gTracer(i,j,k,bi,bj)
64     & + ab05*gTrNm1(i,j,k,bi,bj)
65     gTrNm1(i,j,k,bi,bj) = gTracer(i,j,k,bi,bj)
66     gTracer(i,j,k,bi,bj) = gTrtmp
67     ENDDO
68     ENDDO
69    
70     RETURN
71     END

  ViewVC Help
Powered by ViewVC 1.1.22