/[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.6 - (show annotations) (download)
Wed May 5 00:39:21 2004 UTC (20 years ago) by edhill
Branch: MAIN
CVS Tags: checkpoint52n_post, checkpoint53d_post, checkpoint53c_post, checkpoint53b_post, checkpoint53b_pre, checkpoint53a_post, checkpoint53, checkpoint53d_pre
Changes since 1.5: +3 -0 lines
 o adding cvs 'Header:' and 'Name:' strings

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

  ViewVC Help
Powered by ViewVC 1.1.22