1 |
jmc |
1.5 |
C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_advection.F,v 1.4 2004/07/07 18:45:28 jmc Exp $ |
2 |
jmc |
1.2 |
C $Name: $ |
3 |
adcroft |
1.1 |
|
4 |
|
|
#include "PTRACERS_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CBOP |
7 |
|
|
C !ROUTINE: PTRACERS_ADVECTION |
8 |
|
|
|
9 |
|
|
C !INTERFACE: ========================================================== |
10 |
|
|
SUBROUTINE PTRACERS_ADVECTION( bi,bj,myIter,myTime,myThid ) |
11 |
|
|
|
12 |
|
|
C !DESCRIPTION: |
13 |
|
|
C Calculates tendancy for passive tracers and integrates forward |
14 |
|
|
C in time. |
15 |
|
|
|
16 |
|
|
C !USES: =============================================================== |
17 |
|
|
IMPLICIT NONE |
18 |
|
|
#include "SIZE.h" |
19 |
|
|
#include "EEPARAMS.h" |
20 |
jmc |
1.2 |
#include "PARAMS.h" |
21 |
|
|
#include "DYNVARS.h" |
22 |
jmc |
1.5 |
#include "PTRACERS_SIZE.h" |
23 |
adcroft |
1.1 |
#include "PTRACERS.h" |
24 |
|
|
#include "GAD.h" |
25 |
|
|
|
26 |
|
|
C !INPUT PARAMETERS: =================================================== |
27 |
|
|
C bi,bj :: tile indices |
28 |
|
|
C myIter :: time-step number |
29 |
|
|
C myTime :: model time |
30 |
|
|
C myThid :: thread number |
31 |
|
|
INTEGER bi,bj |
32 |
|
|
INTEGER myIter |
33 |
|
|
_RL myTime |
34 |
|
|
INTEGER myThid |
35 |
|
|
|
36 |
|
|
C !OUTPUT PARAMETERS: ================================================== |
37 |
|
|
C none |
38 |
|
|
|
39 |
|
|
#ifdef ALLOW_PTRACERS |
40 |
|
|
|
41 |
|
|
C !LOCAL VARIABLES: ==================================================== |
42 |
|
|
C i,j,k,bi,bj,iTracer :: loop indices |
43 |
|
|
C iMin,iMax,jMin,jMax :: loop ranges |
44 |
|
|
C kUp,kDown :: toggle indices for even/odd level fluxes |
45 |
|
|
C km1 :: =min(1,k-1) |
46 |
|
|
C rFlx :: vertical flux |
47 |
|
|
INTEGER iTracer |
48 |
|
|
CEOP |
49 |
|
|
|
50 |
|
|
C Loop over tracers |
51 |
|
|
DO iTracer=1,PTRACERS_numInUse |
52 |
|
|
|
53 |
|
|
IF ( |
54 |
jmc |
1.4 |
& multiDimAdvection .AND. |
55 |
adcroft |
1.1 |
& PTRACERS_advScheme(iTracer).NE.ENUM_CENTERED_2ND .AND. |
56 |
|
|
& PTRACERS_advScheme(iTracer).NE.ENUM_UPWIND_3RD .AND. |
57 |
|
|
& PTRACERS_advScheme(iTracer).NE.ENUM_CENTERED_4TH ) THEN |
58 |
jmc |
1.2 |
CALL GAD_ADVECTION( |
59 |
|
|
I .FALSE., |
60 |
adcroft |
1.1 |
I PTRACERS_advScheme(iTracer), |
61 |
jmc |
1.3 |
I PTRACERS_advScheme(iTracer), |
62 |
adcroft |
1.1 |
I GAD_TR1, |
63 |
jmc |
1.2 |
I uVel, vVel, wVel, |
64 |
|
|
I pTracer(1-Olx,1-Oly,1,1,1,iTracer), |
65 |
|
|
O gPtr(1-Olx,1-Oly,1,1,1,iTracer), |
66 |
|
|
I bi,bj,myTime,myIter,myThid) |
67 |
adcroft |
1.1 |
ENDIF |
68 |
|
|
|
69 |
|
|
|
70 |
|
|
C end of tracer loop |
71 |
|
|
ENDDO |
72 |
|
|
|
73 |
|
|
#endif /* ALLOW_PTRACERS */ |
74 |
|
|
|
75 |
|
|
RETURN |
76 |
|
|
END |