/[MITgcm]/MITgcm/model/src/timestep_tracer.F
ViewVC logotype

Annotation of /MITgcm/model/src/timestep_tracer.F

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


Revision 1.4 - (hide annotations) (download)
Wed Aug 15 18:40:57 2001 UTC (22 years, 9 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint40pre8
Changes since 1.3: +24 -9 lines
Finally mover timestep_tracer.F back to model/src
 - annoyingly needs GAD.h but since the only time GAD.h couldn't
   be available is in conjuction with no tracer stepping it seems ok.

1 adcroft 1.4 C $Header: /u/gcmpack/models/MITgcmUV/model/src/timestep_tracer.F,v 1.3 2001/07/31 15:01:33 adcroft Exp $
2 adcroft 1.2 C $Name: $
3 adcroft 1.1
4     #include "CPP_OPTIONS.h"
5    
6 adcroft 1.2 SUBROUTINE TIMESTEP_TRACER(
7 adcroft 1.4 I bi, bj, iMin, iMax, jMin, jMax, K,
8     I advection_scheme,
9     I tracer, gTracer,
10     O gTrNm1,
11 adcroft 1.2 I myIter, myThid )
12 adcroft 1.1 C /==========================================================\
13     C | S/R TIMESTEP_TRACER |
14     C | o Step model tracer field forward in time |
15     C \==========================================================/
16 adcroft 1.2 IMPLICIT NONE
17    
18     C == Global variables ===
19 adcroft 1.1 #include "SIZE.h"
20     #include "EEPARAMS.h"
21     #include "PARAMS.h"
22 adcroft 1.4 #include "GAD.h"
23 adcroft 1.2
24 adcroft 1.1 C == Routine Arguments ==
25     INTEGER bi,bj,iMin,iMax,jMin,jMax,K
26 adcroft 1.4 INTEGER advection_scheme
27 adcroft 1.1 _RL tracer (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
28     _RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
29     _RL gTrNm1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
30     INTEGER myIter, myThid
31     C == Local variables ==
32     INTEGER i,j
33     _RL ab15,ab05
34    
35     C Adams-Bashforth timestepping weights
36 adcroft 1.3 IF (myIter .EQ. 0) THEN
37     ab15=1.0
38     ab05=0.0
39     ELSE
40 adcroft 1.4 ab15=1.5+abEps
41     ab05=-(0.5+abEps)
42 adcroft 1.3 ENDIF
43 adcroft 1.1
44     C Step forward temperature
45 adcroft 1.4 IF ( advection_scheme.EQ.ENUM_CENTERED_2ND
46     & .OR.advection_scheme.EQ.ENUM_UPWIND_3RD
47     & .OR.advection_scheme.EQ.ENUM_CENTERED_4TH ) THEN
48     DO j=jMin,jMax
49 adcroft 1.1 DO i=iMin,iMax
50     gTrNm1(i,j,k,bi,bj)=tracer(i,j,k,bi,bj)
51     & +deltaTtracer*(
52     & ab15*gTracer(i,j,k,bi,bj)
53     & +ab05*gTrNm1(i,j,k,bi,bj) )
54     ENDDO
55 adcroft 1.4 ENDDO
56     ELSEIF (advection_scheme.EQ.ENUM_FLUX_LIMIT) THEN
57     DO j=jMin,jMax
58     DO i=iMin,iMax
59     gTrNm1(i,j,k,bi,bj)=tracer(i,j,k,bi,bj)
60     & +deltaTtracer*gTracer(i,j,k,bi,bj)
61     ENDDO
62     ENDDO
63     ELSE
64     STOP 'TIMESTEP_TRACER: Bad advection_scheme'
65     ENDIF
66 adcroft 1.1
67     RETURN
68     END

  ViewVC Help
Powered by ViewVC 1.1.22