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

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

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


Revision 1.1 - (hide annotations) (download)
Wed Mar 17 22:06:02 2004 UTC (20 years, 1 month ago) by molod
Branch: MAIN
Wrapper routine to fill any (activated) state field diagnostics

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

  ViewVC Help
Powered by ViewVC 1.1.22