/[MITgcm]/MITgcm/pkg/diagnostics/diagnostics_fill_state.F
ViewVC logotype

Contents of /MITgcm/pkg/diagnostics/diagnostics_fill_state.F

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


Revision 1.12 - (show annotations) (download)
Wed Sep 8 01:49:26 2004 UTC (19 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint55d_pre, checkpoint55j_post, checkpoint56b_post, checkpoint55h_post, checkpoint55b_post, checkpoint56c_post, checkpoint55, checkpoint57a_post, checkpoint54f_post, checkpoint55g_post, checkpoint55f_post, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, checkpoint55e_post, checkpoint55a_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.11: +15 -1 lines
add diagnostics of d.Rho/dr & (dEta/dt)^2

1 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagnostics_fill_state.F,v 1.11 2004/07/07 03:10:14 edhill Exp $
2 C $Name: $
3
4 #include "DIAG_OPTIONS.h"
5
6 subroutine diagnostics_fill_state(myThid)
7
8 implicit none
9 #include "SIZE.h"
10 #include "EEPARAMS.h"
11 #include "GRID.h"
12 #include "DYNVARS.h"
13 #include "SURFACE.h"
14
15 integer myThid
16
17 #ifdef ALLOW_DIAGNOSTICS
18 _RL dummy(1-OLx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
19 _RL dummys(1-OLx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
20 integer i,j,K,bi,bj
21 integer km1
22
23 call fill_diagnostics(myThid,'ETAN ',0,1,0,1,1,etaN)
24
25 do bj = myByLo(myThid), myByHi(myThid)
26 do bi = myBxLo(myThid), myBxHi(myThid)
27 do j = 1,sNy
28 do i = 1,sNx
29 dummys(i,j,bi,bj) = etaN(i,j,bi,bj)*etaN(i,j,bi,bj)
30 enddo
31 enddo
32 enddo
33 enddo
34 call fill_diagnostics(myThid,'ETANSQ ',0,1,0,1,1,dummys)
35
36 #ifdef EXACT_CONSERV
37 do bj = myByLo(myThid), myByHi(myThid)
38 do bi = myBxLo(myThid), myBxHi(myThid)
39 do j = 1,sNy
40 do i = 1,sNx
41 dummys(i,j,bi,bj) = dEtaHdt(i,j,bi,bj)*dEtaHdt(i,j,bi,bj)
42 enddo
43 enddo
44 enddo
45 enddo
46 call fill_diagnostics(myThid,'DETADT2 ',0,1,0,1,1,dummys)
47 #endif
48
49 call fill_diagnostics(myThid,'UVEL ',0,Nr,0,1,1,uVel)
50 call fill_diagnostics(myThid,'VVEL ',0,Nr,0,1,1,vVel)
51 call fill_diagnostics(myThid,'WVEL ',0,Nr,0,1,1,wVel)
52 call fill_diagnostics(myThid,'THETA ',0,Nr,0,1,1,theta)
53 call fill_diagnostics(myThid,'SALT ',0,Nr,0,1,1,salt)
54
55 do bj = myByLo(myThid), myByHi(myThid)
56 do bi = myBxLo(myThid), myBxHi(myThid)
57 do K=1,Nr
58 do j = 1,sNy
59 do i = 1,sNx
60 dummy(i,j,K,bi,bj) = uVel(i,j,K,bi,bj)*uVel(i,j,K,bi,bj)
61 enddo
62 enddo
63 enddo
64 enddo
65 enddo
66 call fill_diagnostics(myThid,'UVELSQ ',0,Nr,0,1,1,dummy)
67
68 do bj = myByLo(myThid), myByHi(myThid)
69 do bi = myBxLo(myThid), myBxHi(myThid)
70 do K=1,Nr
71 do j = 1,sNy
72 do i = 1,sNx
73 dummy(i,j,K,bi,bj) = vVel(i,j,K,bi,bj)*vVel(i,j,K,bi,bj)
74 enddo
75 enddo
76 enddo
77 enddo
78 enddo
79 call fill_diagnostics(myThid,'VVELSQ ',0,Nr,0,1,1,dummy)
80
81 do bj = myByLo(myThid), myByHi(myThid)
82 do bi = myBxLo(myThid), myBxHi(myThid)
83 do K=1,Nr
84 do j = 1,sNy
85 do i = 1,sNx
86 dummy(i,j,K,bi,bj) = wVel(i,j,K,bi,bj)*wVel(i,j,K,bi,bj)
87 enddo
88 enddo
89 enddo
90 enddo
91 enddo
92 call fill_diagnostics(myThid,'WVELSQ ',0,Nr,0,1,1,dummy)
93
94 do bj = myByLo(myThid), myByHi(myThid)
95 do bi = myBxLo(myThid), myBxHi(myThid)
96 do K=1,Nr
97 do j = 1,sNy
98 do i = 1,sNx
99 dummy(i,j,K,bi,bj)
100 & = theta(i,j,K,bi,bj)*theta(i,j,K,bi,bj)
101 enddo
102 enddo
103 enddo
104 enddo
105 enddo
106 call fill_diagnostics(myThid,'THETASQ ',0,Nr,0,1,1,dummy)
107
108 do bj = myByLo(myThid), myByHi(myThid)
109 do bi = myBxLo(myThid), myBxHi(myThid)
110 do K=1,Nr
111 do j = 1,sNy
112 do i = 1,sNx
113 dummy(i,j,K,bi,bj) = salt(i,j,K,bi,bj)*salt(i,j,K,bi,bj)
114 enddo
115 enddo
116 enddo
117 enddo
118 enddo
119 call fill_diagnostics(myThid,'SALTSQ ',0,Nr,0,1,1,dummy)
120
121 do bj = myByLo(myThid), myByHi(myThid)
122 do bi = myBxLo(myThid), myBxHi(myThid)
123 do K=1,Nr
124 do j = 1,sNy
125 do i = 1,sNx
126 dummy(i,j,K,bi,bj) = uVel(i,j,K,bi,bj)*vVel(i,j,K,bi,bj)
127 enddo
128 enddo
129 enddo
130 enddo
131 enddo
132 call fill_diagnostics(myThid,'UVELVVEL',0,Nr,0,1,1,dummy)
133
134 do bj = myByLo(myThid), myByHi(myThid)
135 do bi = myBxLo(myThid), myBxHi(myThid)
136 do K=1,Nr
137 do j = 1,sNy
138 do i = 1,sNx
139 dummy(i,j,K,bi,bj) = uVel(i,j,K,bi,bj)*
140 & 0.5*(theta(i,j,K,bi,bj)+theta(i-1,j,K,bi,bj))
141 enddo
142 enddo
143 enddo
144 enddo
145 enddo
146 call fill_diagnostics(myThid,'UVELTH ',0,Nr,0,1,1,dummy)
147
148 do bj = myByLo(myThid), myByHi(myThid)
149 do bi = myBxLo(myThid), myBxHi(myThid)
150 do K=1,Nr
151 do j = 1,sNy
152 do i = 1,sNx
153 dummy(i,j,K,bi,bj) = vVel(i,j,K,bi,bj)*
154 & 0.5*(theta(i,j,K,bi,bj)+theta(i,j-1,K,bi,bj))
155 enddo
156 enddo
157 enddo
158 enddo
159 enddo
160 call fill_diagnostics(myThid,'VVELTH ',0,Nr,0,1,1,dummy)
161
162 do bj = myByLo(myThid), myByHi(myThid)
163 do bi = myBxLo(myThid), myBxHi(myThid)
164 do K=1,Nr
165 km1 = MAX(k-1,1)
166 do j = 1,sNy
167 do i = 1,sNx
168 dummy(i,j,K,bi,bj) = wVel(i,j,K,bi,bj)*0.5*
169 & (theta(i,j,K,bi,bj)+theta(i,j,km1,bi,bj))
170 enddo
171 enddo
172 enddo
173 enddo
174 enddo
175 call fill_diagnostics(myThid,'WVELTH ',0,Nr,0,1,1,dummy)
176
177 do bj = myByLo(myThid), myByHi(myThid)
178 do bi = myBxLo(myThid), myBxHi(myThid)
179 do K=1,Nr
180 do j = 1,sNy
181 do i = 1,sNx
182 dummy(i,j,K,bi,bj) = uVel(i,j,K,bi,bj)*
183 & 0.5*(salt(i,j,K,bi,bj)+salt(i-1,j,K,bi,bj))
184 enddo
185 enddo
186 enddo
187 enddo
188 enddo
189 call fill_diagnostics(myThid,'UVELSLT ',0,Nr,0,1,1,dummy)
190
191 do bj = myByLo(myThid), myByHi(myThid)
192 do bi = myBxLo(myThid), myBxHi(myThid)
193 do K=1,Nr
194 do j = 1,sNy
195 do i = 1,sNx
196 dummy(i,j,K,bi,bj) = vVel(i,j,K,bi,bj)*
197 & 0.5*(salt(i,j,K,bi,bj)+salt(i,j-1,K,bi,bj))
198 enddo
199 enddo
200 enddo
201 enddo
202 enddo
203 call fill_diagnostics(myThid,'VVELSLT ',0,Nr,0,1,1,dummy)
204
205 do bj = myByLo(myThid), myByHi(myThid)
206 do bi = myBxLo(myThid), myBxHi(myThid)
207 do K=1,Nr
208 km1 = MAX(k-1,1)
209 do j = 1,sNy
210 do i = 1,sNx
211 dummy(i,j,K,bi,bj) = wVel(i,j,K,bi,bj)*0.5*
212 & (salt(i,j,K,bi,bj)+salt(i,j,km1,bi,bj))
213 enddo
214 enddo
215 enddo
216 enddo
217 enddo
218 call fill_diagnostics(myThid,'WVELSLT ',0,Nr,0,1,1,dummy)
219
220 do bj = myByLo(myThid), myByHi(myThid)
221 do bi = myBxLo(myThid), myBxHi(myThid)
222 do K=1,Nr
223 do j = 1,sNy
224 do i = 1,sNx
225 dummy(i,j,K,bi,bj)
226 & = uVel(i,j,K,bi,bj)*hFacW(i,j,K,bi,bj)
227 enddo
228 enddo
229 enddo
230 enddo
231 enddo
232 call fill_diagnostics(myThid,'UVELMASS',0,Nr,0,1,1,dummy)
233
234 do bj = myByLo(myThid), myByHi(myThid)
235 do bi = myBxLo(myThid), myBxHi(myThid)
236 do K=1,Nr
237 do j = 1,sNy
238 do i = 1,sNx
239 dummy(i,j,K,bi,bj)
240 & = vVel(i,j,K,bi,bj)*hFacS(i,j,K,bi,bj)
241 enddo
242 enddo
243 enddo
244 enddo
245 enddo
246 call fill_diagnostics(myThid,'VVELMASS',0,Nr,0,1,1,dummy)
247
248 do bj = myByLo(myThid), myByHi(myThid)
249 do bi = myBxLo(myThid), myBxHi(myThid)
250 do K=1,Nr
251 do j = 1,sNy
252 do i = 1,sNx
253 dummy(i,j,K,bi,bj) = uVel(i,j,K,bi,bj)*
254 & 0.5*(theta(i,j,K,bi,bj)+theta(i-1,j,K,bi,bj))
255 & * hFacW(i,j,K,bi,bj)
256 enddo
257 enddo
258 enddo
259 enddo
260 enddo
261 call fill_diagnostics(myThid,'UTHMASS ',0,Nr,0,1,1,dummy)
262
263 do bj = myByLo(myThid), myByHi(myThid)
264 do bi = myBxLo(myThid), myBxHi(myThid)
265 do K=1,Nr
266 do j = 1,sNy
267 do i = 1,sNx
268 dummy(i,j,K,bi,bj) = vVel(i,j,K,bi,bj)*
269 & 0.5*(theta(i,j,K,bi,bj)+theta(i,j-1,K,bi,bj))
270 & * hFacS(i,j,K,bi,bj)
271 enddo
272 enddo
273 enddo
274 enddo
275 enddo
276 call fill_diagnostics(myThid,'VTHMASS ',0,Nr,0,1,1,dummy)
277
278 do bj = myByLo(myThid), myByHi(myThid)
279 do bi = myBxLo(myThid), myBxHi(myThid)
280 do K=1,Nr
281 do j = 1,sNy
282 do i = 1,sNx
283 dummy(i,j,K,bi,bj) = uVel(i,j,K,bi,bj)*
284 & 0.5*(salt(i,j,K,bi,bj)+salt(i-1,j,K,bi,bj))
285 & * hFacW(i,j,K,bi,bj)
286 enddo
287 enddo
288 enddo
289 enddo
290 enddo
291 call fill_diagnostics(myThid,'USLTMASS',0,Nr,0,1,1,dummy)
292
293 do bj = myByLo(myThid), myByHi(myThid)
294 do bi = myBxLo(myThid), myBxHi(myThid)
295 do K=1,Nr
296 do j = 1,sNy
297 do i = 1,sNx
298 dummy(i,j,K,bi,bj) = vVel(i,j,K,bi,bj)*
299 & 0.5*(salt(i,j,K,bi,bj)+salt(i,j-1,K,bi,bj))
300 & * hFacS(i,j,K,bi,bj)
301 enddo
302 enddo
303 enddo
304 enddo
305 enddo
306 call fill_diagnostics(myThid,'VSLTMASS',0,Nr,0,1,1,dummy)
307
308
309 #endif /* ALLOW_DIAGNOSTICS */
310
311 return
312 end

  ViewVC Help
Powered by ViewVC 1.1.22