1 |
C $Header: /u/gcmpack/MITgcm/model/src/timestep_tracer.F,v 1.16 2011/05/23 00:33:38 jmc 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, k, deltaTloc, |
12 |
I tracer, |
13 |
U gTracer, |
14 |
I 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 |
INTEGER bi, bj, k |
33 |
_RL deltaTloc |
34 |
_RL tracer (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
35 |
_RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
36 |
INTEGER myIter, myThid |
37 |
|
38 |
C !LOCAL VARIABLES: |
39 |
C == Local variables == |
40 |
INTEGER i,j |
41 |
CEOP |
42 |
|
43 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
44 |
|
45 |
C- Step tracer forward in time and store provisional value in gTracer array |
46 |
DO j=1-Oly,sNy+Oly |
47 |
DO i=1-Olx,sNx+Olx |
48 |
gTracer(i,j,k,bi,bj)=tracer(i,j,k,bi,bj) |
49 |
& +deltaTloc*gTracer(i,j,k,bi,bj) |
50 |
#ifdef ALLOW_OBCS |
51 |
CML For the Stevens open boundary conditions, we need to step forward |
52 |
CML the tracer even on the boundary in order to include surface |
53 |
CML forcing and (vertical) diffusion contributions. For other cases |
54 |
CML this mask was meant to avoid unrealistic values on the open boundaries. |
55 |
CML Lets hope that we can live without this safety net. |
56 |
C & *maskInC(i,j,bi,bj) |
57 |
#endif |
58 |
ENDDO |
59 |
ENDDO |
60 |
|
61 |
RETURN |
62 |
END |