/[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.1 - (show annotations) (download)
Wed Sep 19 02:43:27 2001 UTC (22 years, 8 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint40
Re-arranged sequence of operations for Adams-Bashforth
 o this does not change numbers
 o this makes it very easy to extract forcing/diffusion out of ABII
   by changing calling sequence in calc_gt, calc_gs,...

Key modifications:
 o new s/r: ADAMS_BASHFORTH2  gT=3/2*gT-1/2*gTnm1
 o changed TIMESTEP_TRACER from gTnm1=t+dt*(3/2*gT-1/2*gTnm1)
   to  gT=T+dt*gT
 o changed CALC_GT,CALC_GS & CALC_GTR1 to calcuate "gT" defined
   by new timestep_tracer (ie. including forcing, ABII, N-L F-S, etc...)
   now calls ADAMS_BASHFORTH2 and FREESURF_RESCALE_G
 o changed CYCLE_TRACER appropriately  T=gT only

Other associated mods:
 o new s/r: FREESURF_RESCALE_G applies non-linear free-surface term
   this used to be in TIMESTEP_TRACER
 o added myIter as argument to CALC_GS,CALC_GT,CALC_GTR1

1 C $Header: $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE ADAMS_BASHFORTH2(
7 I bi, bj, K,
8 U gTracer, gTrNm1,
9 I myIter, myThid )
10 C /==========================================================\
11 C | S/R ADAMS_BASHFORTH2 |
12 C | o Extrapolate tendancies forward in time using |
13 C | quasi-second order Adams-Bashforth method. |
14 C \==========================================================/
15 IMPLICIT NONE
16
17 C == Global variables ===
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "GAD.h"
22 #include "GRID.h"
23 #include "SURFACE.h"
24
25 C == Routine Arguments ==
26 INTEGER bi,bj,K
27 _RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
28 _RL gTrNm1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
29 INTEGER myIter, myThid
30 C == Local variables ==
31 INTEGER i,j
32 _RL ab15,ab05
33 _RL gTrtmp
34
35 C Adams-Bashforth timestepping weights
36 IF (myIter .EQ. 0) THEN
37 ab15=1.0
38 ab05=0.0
39 ELSE
40 ab15=1.5+abEps
41 ab05=-(0.5+abEps)
42 ENDIF
43
44 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
45
46 C- Compute effective G-term with Adams-Bashforth weights:
47 DO j=1-Oly,sNy+Oly
48 DO i=1-Olx,sNx+Olx
49 gTrtmp = ab15*gTracer(i,j,k,bi,bj)
50 & + ab05*gTrNm1(i,j,k,bi,bj)
51 gTrNm1(i,j,k,bi,bj) = gTracer(i,j,k,bi,bj)
52 gTracer(i,j,k,bi,bj) = gTrtmp
53 ENDDO
54 ENDDO
55
56 RETURN
57 END

  ViewVC Help
Powered by ViewVC 1.1.22