/[MITgcm]/MITgcm/pkg/ptracers/ptracers_diagnostics_state.F
ViewVC logotype

Annotation of /MITgcm/pkg/ptracers/ptracers_diagnostics_state.F

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


Revision 1.6 - (hide annotations) (download)
Tue Mar 16 00:22:26 2010 UTC (14 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, HEAD
Changes since 1.5: +4 -4 lines
avoid unbalanced quote (single or double) in commented line

1 jmc 1.6 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_diagnostics_state.F,v 1.5 2010/01/02 23:42:51 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "PTRACERS_OPTIONS.h"
5    
6     CBOP 1
7     C !ROUTINE: PTRACERS_DIAGNOSTICS_STATE
8    
9     C !INTERFACE:
10 jahn 1.4 SUBROUTINE PTRACERS_DIAGNOSTICS_STATE(myTime, myIter, myThid)
11 jmc 1.1
12     C !DESCRIPTION:
13     C Fill-in the diagnostics array for PTRACERS state variables
14 jmc 1.2
15 jmc 1.1 C !USES:
16     IMPLICIT NONE
17     #include "SIZE.h"
18     #include "EEPARAMS.h"
19 jahn 1.4 #include "PARAMS.h"
20 jmc 1.1 #include "GRID.h"
21     #include "DYNVARS.h"
22     #include "PTRACERS_SIZE.h"
23 jmc 1.2 #include "PTRACERS_PARAMS.h"
24     #include "PTRACERS_FIELDS.h"
25 jahn 1.4 #ifdef ALLOW_LONGSTEP
26     #include "LONGSTEP.h"
27     #endif
28 jmc 1.1
29     C !INPUT PARAMETERS:
30 jahn 1.4 _RL myTime
31     INTEGER myIter
32 jmc 1.2 INTEGER myThid
33 jmc 1.1 CEOP
34    
35     #ifdef ALLOW_DIAGNOSTICS
36    
37     C !LOCAL VARIABLES:
38     LOGICAL DIAGNOSTICS_IS_ON
39     EXTERNAL DIAGNOSTICS_IS_ON
40 jmc 1.2 _RL dummy(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
41 jmc 1.3 INTEGER i,j,k,bi,bj,iTr
42 jmc 1.2 CHARACTER*8 diagName
43 jmc 1.1 INTEGER km1
44 jmc 1.5 #ifdef ALLOW_LONGSTEP
45 jahn 1.4 INTEGER trIter
46 jmc 1.5 #endif
47    
48     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
49 jmc 1.2
50 jahn 1.4 #ifdef ALLOW_LONGSTEP
51     C fill only once every long time step
52     C have to treat first time step by hand...
53     C trIter=0 when this routine is called the first time
54     IF ( staggerTimeStep ) THEN
55     trIter = myIter-1
56     ELSE
57     trIter = myIter
58     ENDIF
59     IF ( LS_doTimeStep .OR. trIter.EQ.nIter0 ) THEN
60     #else
61     IF ( .TRUE. ) THEN
62     #endif
63 jmc 1.2
64 jahn 1.4 diagName = ' '
65    
66     DO iTr = 1,PTRACERS_numInUse
67 jmc 1.2
68     diagName = ' '
69 jmc 1.3 WRITE(diagName,'(A4,A2)') 'TRAC',PTRACERS_ioLabel(iTr)
70     CALL DIAGNOSTICS_FILL( pTracer(1-Olx,1-Oly,1,1,1,iTr), diagName,
71 jmc 1.1 & 0,Nr,0,1,1,myThid )
72 jmc 1.2
73     diagName = ' '
74 jmc 1.3 WRITE(diagName,'(A5,A2)') 'UTRAC',PTRACERS_ioLabel(iTr)
75 jmc 1.2 IF ( DIAGNOSTICS_IS_ON(diagName,myThid) ) THEN
76 jmc 1.1 DO bj = myByLo(myThid), myByHi(myThid)
77     DO bi = myBxLo(myThid), myBxHi(myThid)
78 jmc 1.2 DO k=1,Nr
79 jmc 1.1 DO j = 1,sNy
80 jmc 1.2 DO i = 1,sNx+1
81 jahn 1.4 #ifdef ALLOW_LONGSTEP
82 jmc 1.6 C at first timestep we do not have averaged velocities yet -
83 jahn 1.4 C use initial velocities instead
84     IF ( trIter.GT.nIter0 ) THEN
85     dummy(i,j,k,bi,bj) =
86     & LS_uVel(i,j,k,bi,bj)*hFacW(i,j,k,bi,bj) *
87     & 0.5 _d 0*( pTracer(i,j,k,bi,bj,iTr)
88     & + pTracer(i-1,j,k,bi,bj,iTr) )
89     ELSE
90     #else
91     IF (.TRUE.) THEN
92     #endif
93 jmc 1.2 dummy(i,j,k,bi,bj) =
94     & uVel(i,j,k,bi,bj)*hFacW(i,j,k,bi,bj) *
95 jmc 1.3 & 0.5 _d 0*( pTracer(i,j,k,bi,bj,iTr)
96     & + pTracer(i-1,j,k,bi,bj,iTr) )
97 jahn 1.4 ENDIF
98 jmc 1.1 ENDDO
99     ENDDO
100     ENDDO
101     ENDDO
102     ENDDO
103 jmc 1.2 CALL DIAGNOSTICS_FILL( dummy, diagName, 0,Nr,0,1,1,myThid )
104 jmc 1.1 ENDIF
105 jmc 1.2
106     diagName = ' '
107 jmc 1.3 WRITE(diagName,'(A5,A2)') 'VTRAC',PTRACERS_ioLabel(iTr)
108 jmc 1.2 IF ( DIAGNOSTICS_IS_ON(diagName,myThid) ) THEN
109 jmc 1.1 DO bj = myByLo(myThid), myByHi(myThid)
110     DO bi = myBxLo(myThid), myBxHi(myThid)
111 jmc 1.2 DO k=1,Nr
112     DO j = 1,sNy+1
113 jmc 1.1 DO i = 1,sNx
114 jahn 1.4 #ifdef ALLOW_LONGSTEP
115 jmc 1.6 C at first timestep we do not have averaged velocities yet -
116 jahn 1.4 C use initial velocities instead
117     IF ( trIter.GT.nIter0 ) THEN
118     dummy(i,j,k,bi,bj) =
119     & LS_vVel(i,j,k,bi,bj)*hFacS(i,j,k,bi,bj) *
120     & 0.5 _d 0*( pTracer(i,j,k,bi,bj,iTr)
121     & + pTracer(i,j-1,k,bi,bj,iTr) )
122     ELSE
123     #else
124     IF (.TRUE.) THEN
125     #endif
126 jmc 1.2 dummy(i,j,k,bi,bj) =
127     & vVel(i,j,k,bi,bj)*hFacS(i,j,k,bi,bj) *
128 jmc 1.3 & 0.5 _d 0*( pTracer(i,j,k,bi,bj,iTr)
129     & + pTracer(i,j-1,k,bi,bj,iTr) )
130 jahn 1.4 ENDIF
131 jmc 1.1 ENDDO
132     ENDDO
133     ENDDO
134     ENDDO
135     ENDDO
136 jmc 1.2 CALL DIAGNOSTICS_FILL( dummy, diagName, 0,Nr,0,1,1,myThid )
137 jmc 1.1 ENDIF
138 jmc 1.2
139     diagName = ' '
140 jmc 1.3 WRITE(diagName,'(A5,A2)') 'WTRAC',PTRACERS_ioLabel(iTr)
141 jmc 1.2 IF ( DIAGNOSTICS_IS_ON(diagName,myThid) ) THEN
142 jmc 1.1 DO bj = myByLo(myThid), myByHi(myThid)
143     DO bi = myBxLo(myThid), myBxHi(myThid)
144 jmc 1.2 DO k=1,Nr
145     km1 = MAX(k-1,1)
146 jmc 1.1 DO j = 1,sNy
147     DO i = 1,sNx
148 jahn 1.4 #ifdef ALLOW_LONGSTEP
149 jmc 1.6 C at first timestep we do not have averaged velocities yet -
150 jahn 1.4 C use initial velocities instead
151     IF ( trIter.GT.nIter0 ) THEN
152     dummy(i,j,k,bi,bj) = LS_wVel(i,j,k,bi,bj) *
153     & 0.5 _d 0*( pTracer(i,j,k,bi,bj,iTr)
154     & + pTracer(i,j,km1,bi,bj,iTr) )
155     ELSE
156     #else
157     IF (.TRUE.) THEN
158     #endif
159 jmc 1.2 dummy(i,j,k,bi,bj) = wVel(i,j,k,bi,bj) *
160 jmc 1.3 & 0.5 _d 0*( pTracer(i,j,k,bi,bj,iTr)
161     & + pTracer(i,j,km1,bi,bj,iTr) )
162 jahn 1.4 ENDIF
163 jmc 1.1 ENDDO
164     ENDDO
165     ENDDO
166     ENDDO
167     ENDDO
168 jmc 1.2 CALL DIAGNOSTICS_FILL( dummy, diagName, 0,Nr,0,1,1,myThid )
169 jmc 1.1 ENDIF
170 jmc 1.2
171 jahn 1.4 ENDDO
172    
173     C LS_doTimeStep
174     ENDIF
175 jmc 1.1
176     #endif /* ALLOW_DIAGNOSTICS */
177    
178 jmc 1.2 RETURN
179 jmc 1.1 END
180    
181     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22