1 |
C $Header: /u/gcmpack/MITgcm/model/src/timestep_tracer.F,v 1.17 2011/12/13 15:12:53 mlosch Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "PACKAGES_CONFIG.h" |
5 |
#include "CPP_OPTIONS.h" |
6 |
|
7 |
CBOP |
8 |
C !ROUTINE: TIMESTEP_TRACER |
9 |
C !INTERFACE: |
10 |
SUBROUTINE TIMESTEP_TRACER( |
11 |
I bi, bj, deltaTLev, |
12 |
I tracer, |
13 |
U gTracer, |
14 |
I myTime, myIter, myThid ) |
15 |
C !DESCRIPTION: \bv |
16 |
C *==========================================================* |
17 |
C | S/R TIMESTEP_TRACER |
18 |
C | o Step model tracer field forward in time |
19 |
C *==========================================================* |
20 |
C \ev |
21 |
|
22 |
C !USES: |
23 |
IMPLICIT NONE |
24 |
C == Global variables === |
25 |
#include "SIZE.h" |
26 |
#include "EEPARAMS.h" |
27 |
#include "PARAMS.h" |
28 |
#include "GRID.h" |
29 |
|
30 |
C !INPUT/OUTPUT PARAMETERS: |
31 |
C == Routine Arguments == |
32 |
C bi, bj :: current tile indices |
33 |
C deltaTLev :: time-step [s] (vertical dimension vector) |
34 |
C tracer :: tracer field |
35 |
C gTracer :: input: tracer tendency ; output: updated tracer |
36 |
C myTime :: current time in simulation |
37 |
C myIter :: current iteration number |
38 |
C myThid :: my Thread Id number |
39 |
INTEGER bi, bj |
40 |
_RL deltaTLev(Nr) |
41 |
_RL tracer (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
42 |
_RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
43 |
_RL myTime |
44 |
INTEGER myIter, myThid |
45 |
|
46 |
C !LOCAL VARIABLES: |
47 |
C == Local variables == |
48 |
INTEGER i, j, k |
49 |
CEOP |
50 |
|
51 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
52 |
|
53 |
C- Step tracer forward in time and store provisional value in gTracer array |
54 |
DO k=1,Nr |
55 |
DO j=1-OLy,sNy+OLy |
56 |
DO i=1-OLx,sNx+OLx |
57 |
gTracer(i,j,k) = tracer(i,j,k) |
58 |
& + deltaTLev(k)*gTracer(i,j,k) |
59 |
#ifdef ALLOW_OBCS |
60 |
CML For the Stevens open boundary conditions, we need to step forward |
61 |
CML the tracer even on the boundary in order to include surface |
62 |
CML forcing and (vertical) diffusion contributions. For other cases |
63 |
CML this mask was meant to avoid unrealistic values on the open boundaries. |
64 |
CML Lets hope that we can live without this safety net. |
65 |
C & *maskInC(i,j,bi,bj) |
66 |
#endif |
67 |
ENDDO |
68 |
ENDDO |
69 |
ENDDO |
70 |
|
71 |
RETURN |
72 |
END |