/[MITgcm]/MITgcm/pkg/generic_advdiff/timestep_tracer.F
ViewVC logotype

Contents of /MITgcm/pkg/generic_advdiff/timestep_tracer.F

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


Revision 1.1 - (show annotations) (download)
Wed May 30 19:34:48 2001 UTC (22 years, 11 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint40pre1
Added "gad" package. Needs generalizing to allow selection
of advection schemes at run-time and different schemes for
each tracer.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/timestep_tracer.F,v 1.1.2.1 2001/04/09 16:08:35 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE TIMESTEP_TRACER(
7 I bi, bj, iMin, iMax, jMin, jMax, K, tauAB,
8 U tracer, gTracer, gTrNm1,
9 I myIter, myThid )
10 C /==========================================================\
11 C | S/R TIMESTEP_TRACER |
12 C | o Step model tracer field forward in time |
13 C \==========================================================/
14 IMPLICIT NONE
15
16 C == Global variables ===
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "PARAMS.h"
20 #include "GAD.h"
21
22 C == Routine Arguments ==
23 C tauAB - Adams-Bashforth timestepping weight: 0=forward ; 1/2=Adams-Bashf.
24 INTEGER bi,bj,iMin,iMax,jMin,jMax,K
25 _RL tauAB
26 _RL tracer (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
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
34 C Adams-Bashforth timestepping weights
35 ab15 = 1.+ tauAB
36 ab05 = -tauAB
37
38 C Step forward temperature
39 IF (gad_advection_scheme.EQ.ENUM_CENTERED_2ND
40 &.OR.gad_advection_scheme.EQ.ENUM_CENTERED_4TH) THEN
41 DO j=jMin,jMax
42 DO i=iMin,iMax
43 gTrNm1(i,j,k,bi,bj)=tracer(i,j,k,bi,bj)
44 & +deltaTtracer*(
45 & ab15*gTracer(i,j,k,bi,bj)
46 & +ab05*gTrNm1(i,j,k,bi,bj) )
47 ENDDO
48 ENDDO
49 ELSEIF (gad_advection_scheme.EQ.ENUM_FLUX_LIMIT) THEN
50 DO j=jMin,jMax
51 DO i=iMin,iMax
52 gTrNm1(i,j,k,bi,bj)=tracer(i,j,k,bi,bj)
53 & +deltaTtracer*gTracer(i,j,k,bi,bj)
54 ENDDO
55 ENDDO
56 ELSE
57 STOP 'TIMESTEP_TRACER: Bad gad_advection_scheme'
58 ENDIF
59
60 RETURN
61 END

  ViewVC Help
Powered by ViewVC 1.1.22