/[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.2 - (hide annotations) (download)
Tue Mar 23 15:39:08 2004 UTC (20 years, 1 month ago) by molod
Branch: MAIN
Changes since 1.1: +2 -0 lines
Adjust code for local arrays and add more diagnostics

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

  ViewVC Help
Powered by ViewVC 1.1.22