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

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

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


Revision 1.6 - (show annotations) (download)
Tue Mar 16 00:22:26 2010 UTC (14 years, 1 month 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 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_diagnostics_state.F,v 1.5 2010/01/02 23:42:51 jmc Exp $
2 C $Name: $
3
4 #include "PTRACERS_OPTIONS.h"
5
6 CBOP 1
7 C !ROUTINE: PTRACERS_DIAGNOSTICS_STATE
8
9 C !INTERFACE:
10 SUBROUTINE PTRACERS_DIAGNOSTICS_STATE(myTime, myIter, myThid)
11
12 C !DESCRIPTION:
13 C Fill-in the diagnostics array for PTRACERS state variables
14
15 C !USES:
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "PARAMS.h"
20 #include "GRID.h"
21 #include "DYNVARS.h"
22 #include "PTRACERS_SIZE.h"
23 #include "PTRACERS_PARAMS.h"
24 #include "PTRACERS_FIELDS.h"
25 #ifdef ALLOW_LONGSTEP
26 #include "LONGSTEP.h"
27 #endif
28
29 C !INPUT PARAMETERS:
30 _RL myTime
31 INTEGER myIter
32 INTEGER myThid
33 CEOP
34
35 #ifdef ALLOW_DIAGNOSTICS
36
37 C !LOCAL VARIABLES:
38 LOGICAL DIAGNOSTICS_IS_ON
39 EXTERNAL DIAGNOSTICS_IS_ON
40 _RL dummy(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
41 INTEGER i,j,k,bi,bj,iTr
42 CHARACTER*8 diagName
43 INTEGER km1
44 #ifdef ALLOW_LONGSTEP
45 INTEGER trIter
46 #endif
47
48 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
49
50 #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
64 diagName = ' '
65
66 DO iTr = 1,PTRACERS_numInUse
67
68 diagName = ' '
69 WRITE(diagName,'(A4,A2)') 'TRAC',PTRACERS_ioLabel(iTr)
70 CALL DIAGNOSTICS_FILL( pTracer(1-Olx,1-Oly,1,1,1,iTr), diagName,
71 & 0,Nr,0,1,1,myThid )
72
73 diagName = ' '
74 WRITE(diagName,'(A5,A2)') 'UTRAC',PTRACERS_ioLabel(iTr)
75 IF ( DIAGNOSTICS_IS_ON(diagName,myThid) ) THEN
76 DO bj = myByLo(myThid), myByHi(myThid)
77 DO bi = myBxLo(myThid), myBxHi(myThid)
78 DO k=1,Nr
79 DO j = 1,sNy
80 DO i = 1,sNx+1
81 #ifdef ALLOW_LONGSTEP
82 C at first timestep we do not have averaged velocities yet -
83 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 dummy(i,j,k,bi,bj) =
94 & uVel(i,j,k,bi,bj)*hFacW(i,j,k,bi,bj) *
95 & 0.5 _d 0*( pTracer(i,j,k,bi,bj,iTr)
96 & + pTracer(i-1,j,k,bi,bj,iTr) )
97 ENDIF
98 ENDDO
99 ENDDO
100 ENDDO
101 ENDDO
102 ENDDO
103 CALL DIAGNOSTICS_FILL( dummy, diagName, 0,Nr,0,1,1,myThid )
104 ENDIF
105
106 diagName = ' '
107 WRITE(diagName,'(A5,A2)') 'VTRAC',PTRACERS_ioLabel(iTr)
108 IF ( DIAGNOSTICS_IS_ON(diagName,myThid) ) THEN
109 DO bj = myByLo(myThid), myByHi(myThid)
110 DO bi = myBxLo(myThid), myBxHi(myThid)
111 DO k=1,Nr
112 DO j = 1,sNy+1
113 DO i = 1,sNx
114 #ifdef ALLOW_LONGSTEP
115 C at first timestep we do not have averaged velocities yet -
116 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 dummy(i,j,k,bi,bj) =
127 & vVel(i,j,k,bi,bj)*hFacS(i,j,k,bi,bj) *
128 & 0.5 _d 0*( pTracer(i,j,k,bi,bj,iTr)
129 & + pTracer(i,j-1,k,bi,bj,iTr) )
130 ENDIF
131 ENDDO
132 ENDDO
133 ENDDO
134 ENDDO
135 ENDDO
136 CALL DIAGNOSTICS_FILL( dummy, diagName, 0,Nr,0,1,1,myThid )
137 ENDIF
138
139 diagName = ' '
140 WRITE(diagName,'(A5,A2)') 'WTRAC',PTRACERS_ioLabel(iTr)
141 IF ( DIAGNOSTICS_IS_ON(diagName,myThid) ) THEN
142 DO bj = myByLo(myThid), myByHi(myThid)
143 DO bi = myBxLo(myThid), myBxHi(myThid)
144 DO k=1,Nr
145 km1 = MAX(k-1,1)
146 DO j = 1,sNy
147 DO i = 1,sNx
148 #ifdef ALLOW_LONGSTEP
149 C at first timestep we do not have averaged velocities yet -
150 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 dummy(i,j,k,bi,bj) = wVel(i,j,k,bi,bj) *
160 & 0.5 _d 0*( pTracer(i,j,k,bi,bj,iTr)
161 & + pTracer(i,j,km1,bi,bj,iTr) )
162 ENDIF
163 ENDDO
164 ENDDO
165 ENDDO
166 ENDDO
167 ENDDO
168 CALL DIAGNOSTICS_FILL( dummy, diagName, 0,Nr,0,1,1,myThid )
169 ENDIF
170
171 ENDDO
172
173 C LS_doTimeStep
174 ENDIF
175
176 #endif /* ALLOW_DIAGNOSTICS */
177
178 RETURN
179 END
180
181 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22