1 | SUBROUTINE average_3d_data |
---|
2 | |
---|
3 | !--------------------------------------------------------------------------------! |
---|
4 | ! This file is part of PALM. |
---|
5 | ! |
---|
6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
8 | ! either version 3 of the License, or (at your option) any later version. |
---|
9 | ! |
---|
10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
13 | ! |
---|
14 | ! You should have received a copy of the GNU General Public License along with |
---|
15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
16 | ! |
---|
17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
18 | !--------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: average_3d_data.f90 1586 2015-04-30 07:11:33Z raasch $ |
---|
27 | ! |
---|
28 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
29 | ! Adapted for RRTMG |
---|
30 | ! |
---|
31 | ! 1555 2015-03-04 17:44:27Z maronga |
---|
32 | ! Added output of r_a and r_s |
---|
33 | ! |
---|
34 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
35 | ! Added support for land surface and radiation model parameters. |
---|
36 | ! |
---|
37 | ! 1322 2014-03-20 16:38:49Z raasch |
---|
38 | ! REAL functions provided with KIND-attribute |
---|
39 | ! |
---|
40 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
41 | ! ONLY-attribute added to USE-statements, |
---|
42 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
43 | ! kinds are defined in new module kinds, |
---|
44 | ! revision history before 2012 removed, |
---|
45 | ! comment fields (!:) to be used for variable explanations added to |
---|
46 | ! all variable declaration statements |
---|
47 | ! |
---|
48 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
49 | ! barrier argument removed from cpu_log, |
---|
50 | ! module interfaces removed |
---|
51 | ! |
---|
52 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
53 | ! +qc |
---|
54 | ! |
---|
55 | ! 1053 2012-11-13 17:11:03Z hoffmann |
---|
56 | ! averaging of nr, qr added |
---|
57 | ! |
---|
58 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
59 | ! code put under GPL (PALM 3.9) |
---|
60 | ! |
---|
61 | ! 978 2012-08-09 08:28:32Z fricke |
---|
62 | ! +z0h_av |
---|
63 | ! |
---|
64 | ! Revision 1.1 2006/02/23 09:48:58 raasch |
---|
65 | ! Initial revision |
---|
66 | ! |
---|
67 | ! |
---|
68 | ! Description: |
---|
69 | ! ------------ |
---|
70 | ! Time-averaging of 3d-data-arrays. |
---|
71 | !------------------------------------------------------------------------------! |
---|
72 | |
---|
73 | USE averaging |
---|
74 | |
---|
75 | USE control_parameters, & |
---|
76 | ONLY: average_count_3d, doav, doav_n |
---|
77 | |
---|
78 | USE cpulog, & |
---|
79 | ONLY: cpu_log, log_point |
---|
80 | |
---|
81 | USE indices, & |
---|
82 | ONLY: nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt |
---|
83 | |
---|
84 | USE kinds |
---|
85 | |
---|
86 | USE land_surface_model_mod, & |
---|
87 | ONLY: c_liq_av, c_soil_av, c_veg_av, ghf_eb_av, lai_av, m_liq_eb_av, & |
---|
88 | m_soil_av, nzb_soil, nzt_soil, qsws_eb_av, qsws_liq_eb_av, & |
---|
89 | qsws_soil_eb_av, qsws_veg_eb_av, r_a, r_a_av, r_s, r_s_av, & |
---|
90 | shf_eb_av, t_soil_av |
---|
91 | |
---|
92 | USE radiation_model_mod, & |
---|
93 | ONLY: rad_net, rad_net_av, rad_lw_in, rad_lw_in_av, rad_lw_out, & |
---|
94 | rad_lw_out_av, rad_sw_in, rad_sw_in_av, rad_sw_out, & |
---|
95 | rad_sw_out_av |
---|
96 | |
---|
97 | IMPLICIT NONE |
---|
98 | |
---|
99 | INTEGER(iwp) :: i !: |
---|
100 | INTEGER(iwp) :: ii !: |
---|
101 | INTEGER(iwp) :: j !: |
---|
102 | INTEGER(iwp) :: k !: |
---|
103 | |
---|
104 | |
---|
105 | CALL cpu_log (log_point(35),'average_3d_data','start') |
---|
106 | |
---|
107 | ! |
---|
108 | !-- Check, if averaging is necessary |
---|
109 | IF ( average_count_3d <= 1 ) RETURN |
---|
110 | |
---|
111 | ! |
---|
112 | !-- Loop of all variables to be averaged. |
---|
113 | DO ii = 1, doav_n |
---|
114 | |
---|
115 | ! |
---|
116 | !-- Store the array chosen on the temporary array. |
---|
117 | SELECT CASE ( TRIM( doav(ii) ) ) |
---|
118 | |
---|
119 | CASE ( 'c_liq*' ) |
---|
120 | DO i = nxlg, nxrg |
---|
121 | DO j = nysg, nyng |
---|
122 | c_liq_av(j,i) = c_liq_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
123 | ENDDO |
---|
124 | ENDDO |
---|
125 | |
---|
126 | CASE ( 'c_soil*' ) |
---|
127 | DO i = nxlg, nxrg |
---|
128 | DO j = nysg, nyng |
---|
129 | c_soil_av(j,i) = c_soil_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
130 | ENDDO |
---|
131 | ENDDO |
---|
132 | |
---|
133 | CASE ( 'c_veg*' ) |
---|
134 | DO i = nxlg, nxrg |
---|
135 | DO j = nysg, nyng |
---|
136 | c_veg_av(j,i) = c_veg_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
137 | ENDDO |
---|
138 | ENDDO |
---|
139 | |
---|
140 | CASE ( 'e' ) |
---|
141 | DO i = nxlg, nxrg |
---|
142 | DO j = nysg, nyng |
---|
143 | DO k = nzb, nzt+1 |
---|
144 | e_av(k,j,i) = e_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
145 | ENDDO |
---|
146 | ENDDO |
---|
147 | ENDDO |
---|
148 | |
---|
149 | CASE ( 'ghf_eb*' ) |
---|
150 | DO i = nxlg, nxrg |
---|
151 | DO j = nysg, nyng |
---|
152 | ghf_eb_av(j,i) = ghf_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
153 | ENDDO |
---|
154 | ENDDO |
---|
155 | |
---|
156 | CASE ( 'qsws*' ) |
---|
157 | DO i = nxlg, nxrg |
---|
158 | DO j = nysg, nyng |
---|
159 | qsws_av(j,i) = qsws_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
160 | ENDDO |
---|
161 | ENDDO |
---|
162 | |
---|
163 | CASE ( 'lai*' ) |
---|
164 | DO i = nxlg, nxrg |
---|
165 | DO j = nysg, nyng |
---|
166 | lai_av(j,i) = lai_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
167 | ENDDO |
---|
168 | ENDDO |
---|
169 | |
---|
170 | CASE ( 'lpt' ) |
---|
171 | DO i = nxlg, nxrg |
---|
172 | DO j = nysg, nyng |
---|
173 | DO k = nzb, nzt+1 |
---|
174 | lpt_av(k,j,i) = lpt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
175 | ENDDO |
---|
176 | ENDDO |
---|
177 | ENDDO |
---|
178 | |
---|
179 | CASE ( 'lwp*' ) |
---|
180 | DO i = nxlg, nxrg |
---|
181 | DO j = nysg, nyng |
---|
182 | lwp_av(j,i) = lwp_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
183 | ENDDO |
---|
184 | ENDDO |
---|
185 | |
---|
186 | CASE ( 'm_liq_eb*' ) |
---|
187 | DO i = nxlg, nxrg |
---|
188 | DO j = nysg, nyng |
---|
189 | m_liq_eb_av(j,i) = m_liq_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
190 | ENDDO |
---|
191 | ENDDO |
---|
192 | |
---|
193 | CASE ( 'm_soil' ) |
---|
194 | DO i = nxlg, nxrg |
---|
195 | DO j = nysg, nyng |
---|
196 | DO k = nzb_soil, nzt_soil |
---|
197 | m_soil_av(k,j,i) = m_soil_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
198 | ENDDO |
---|
199 | ENDDO |
---|
200 | ENDDO |
---|
201 | |
---|
202 | CASE ( 'nr' ) |
---|
203 | DO i = nxlg, nxrg |
---|
204 | DO j = nysg, nyng |
---|
205 | DO k = nzb, nzt+1 |
---|
206 | nr_av(k,j,i) = nr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
207 | ENDDO |
---|
208 | ENDDO |
---|
209 | ENDDO |
---|
210 | |
---|
211 | CASE ( 'p' ) |
---|
212 | DO i = nxlg, nxrg |
---|
213 | DO j = nysg, nyng |
---|
214 | DO k = nzb, nzt+1 |
---|
215 | p_av(k,j,i) = p_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
216 | ENDDO |
---|
217 | ENDDO |
---|
218 | ENDDO |
---|
219 | |
---|
220 | CASE ( 'pc' ) |
---|
221 | DO i = nxl, nxr |
---|
222 | DO j = nys, nyn |
---|
223 | DO k = nzb, nzt+1 |
---|
224 | pc_av(k,j,i) = pc_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
225 | ENDDO |
---|
226 | ENDDO |
---|
227 | ENDDO |
---|
228 | |
---|
229 | CASE ( 'pr' ) |
---|
230 | DO i = nxl, nxr |
---|
231 | DO j = nys, nyn |
---|
232 | DO k = nzb, nzt+1 |
---|
233 | pr_av(k,j,i) = pr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
234 | ENDDO |
---|
235 | ENDDO |
---|
236 | ENDDO |
---|
237 | |
---|
238 | CASE ( 'prr*' ) |
---|
239 | DO i = nxlg, nxrg |
---|
240 | DO j = nysg, nyng |
---|
241 | precipitation_rate_av(j,i) = precipitation_rate_av(j,i) / & |
---|
242 | REAL( average_count_3d, KIND=wp ) |
---|
243 | ENDDO |
---|
244 | ENDDO |
---|
245 | |
---|
246 | CASE ( 'pt' ) |
---|
247 | DO i = nxlg, nxrg |
---|
248 | DO j = nysg, nyng |
---|
249 | DO k = nzb, nzt+1 |
---|
250 | pt_av(k,j,i) = pt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
251 | ENDDO |
---|
252 | ENDDO |
---|
253 | ENDDO |
---|
254 | |
---|
255 | CASE ( 'q' ) |
---|
256 | DO i = nxlg, nxrg |
---|
257 | DO j = nysg, nyng |
---|
258 | DO k = nzb, nzt+1 |
---|
259 | q_av(k,j,i) = q_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
260 | ENDDO |
---|
261 | ENDDO |
---|
262 | ENDDO |
---|
263 | |
---|
264 | CASE ( 'qc' ) |
---|
265 | DO i = nxlg, nxrg |
---|
266 | DO j = nysg, nyng |
---|
267 | DO k = nzb, nzt+1 |
---|
268 | qc_av(k,j,i) = qc_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
269 | ENDDO |
---|
270 | ENDDO |
---|
271 | ENDDO |
---|
272 | |
---|
273 | CASE ( 'ql' ) |
---|
274 | DO i = nxlg, nxrg |
---|
275 | DO j = nysg, nyng |
---|
276 | DO k = nzb, nzt+1 |
---|
277 | ql_av(k,j,i) = ql_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
278 | ENDDO |
---|
279 | ENDDO |
---|
280 | ENDDO |
---|
281 | |
---|
282 | CASE ( 'ql_c' ) |
---|
283 | DO i = nxlg, nxrg |
---|
284 | DO j = nysg, nyng |
---|
285 | DO k = nzb, nzt+1 |
---|
286 | ql_c_av(k,j,i) = ql_c_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
287 | ENDDO |
---|
288 | ENDDO |
---|
289 | ENDDO |
---|
290 | |
---|
291 | CASE ( 'ql_v' ) |
---|
292 | DO i = nxlg, nxrg |
---|
293 | DO j = nysg, nyng |
---|
294 | DO k = nzb, nzt+1 |
---|
295 | ql_v_av(k,j,i) = ql_v_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
296 | ENDDO |
---|
297 | ENDDO |
---|
298 | ENDDO |
---|
299 | |
---|
300 | CASE ( 'ql_vp' ) |
---|
301 | DO i = nxlg, nxrg |
---|
302 | DO j = nysg, nyng |
---|
303 | DO k = nzb, nzt+1 |
---|
304 | ql_vp_av(k,j,i) = ql_vp_av(k,j,i) / & |
---|
305 | REAL( average_count_3d, KIND=wp ) |
---|
306 | ENDDO |
---|
307 | ENDDO |
---|
308 | ENDDO |
---|
309 | |
---|
310 | CASE ( 'qr' ) |
---|
311 | DO i = nxlg, nxrg |
---|
312 | DO j = nysg, nyng |
---|
313 | DO k = nzb, nzt+1 |
---|
314 | qr_av(k,j,i) = qr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
315 | ENDDO |
---|
316 | ENDDO |
---|
317 | ENDDO |
---|
318 | |
---|
319 | CASE ( 'qsws_eb*' ) |
---|
320 | DO i = nxlg, nxrg |
---|
321 | DO j = nysg, nyng |
---|
322 | qsws_eb_av(j,i) = qsws_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
323 | ENDDO |
---|
324 | ENDDO |
---|
325 | |
---|
326 | CASE ( 'qsws_liq_eb*' ) |
---|
327 | DO i = nxlg, nxrg |
---|
328 | DO j = nysg, nyng |
---|
329 | qsws_liq_eb_av(j,i) = qsws_liq_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
330 | ENDDO |
---|
331 | ENDDO |
---|
332 | |
---|
333 | CASE ( 'qsws_soil_eb*' ) |
---|
334 | DO i = nxlg, nxrg |
---|
335 | DO j = nysg, nyng |
---|
336 | qsws_soil_eb_av(j,i) = qsws_soil_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
337 | ENDDO |
---|
338 | ENDDO |
---|
339 | |
---|
340 | CASE ( 'qsws_veg_eb*' ) |
---|
341 | DO i = nxlg, nxrg |
---|
342 | DO j = nysg, nyng |
---|
343 | qsws_veg_eb_av(j,i) = qsws_veg_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
344 | ENDDO |
---|
345 | ENDDO |
---|
346 | |
---|
347 | CASE ( 'qv' ) |
---|
348 | DO i = nxlg, nxrg |
---|
349 | DO j = nysg, nyng |
---|
350 | DO k = nzb, nzt+1 |
---|
351 | qv_av(k,j,i) = qv_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
352 | ENDDO |
---|
353 | ENDDO |
---|
354 | ENDDO |
---|
355 | |
---|
356 | CASE ( 'rad_net*' ) |
---|
357 | DO i = nxlg, nxrg |
---|
358 | DO j = nysg, nyng |
---|
359 | rad_net_av(j,i) = rad_net_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
360 | ENDDO |
---|
361 | ENDDO |
---|
362 | |
---|
363 | CASE ( 'rad_lw_in' ) |
---|
364 | DO i = nxlg, nxrg |
---|
365 | DO j = nysg, nyng |
---|
366 | DO k = nzb, nzt+1 |
---|
367 | rad_lw_in_av(k,j,i) = rad_lw_in_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
368 | ENDDO |
---|
369 | ENDDO |
---|
370 | ENDDO |
---|
371 | |
---|
372 | CASE ( 'rad_lw_out' ) |
---|
373 | DO i = nxlg, nxrg |
---|
374 | DO j = nysg, nyng |
---|
375 | DO k = nzb, nzt+1 |
---|
376 | rad_lw_out_av(k,j,i) = rad_lw_out_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
377 | ENDDO |
---|
378 | ENDDO |
---|
379 | ENDDO |
---|
380 | |
---|
381 | CASE ( 'rad_sw_in' ) |
---|
382 | DO i = nxlg, nxrg |
---|
383 | DO j = nysg, nyng |
---|
384 | DO k = nzb, nzt+1 |
---|
385 | rad_sw_in_av(k,j,i) = rad_sw_in_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
386 | ENDDO |
---|
387 | ENDDO |
---|
388 | ENDDO |
---|
389 | |
---|
390 | CASE ( 'rad_sw_out' ) |
---|
391 | DO i = nxlg, nxrg |
---|
392 | DO j = nysg, nyng |
---|
393 | DO k = nzb, nzt+1 |
---|
394 | rad_sw_out_av(k,j,i) = rad_sw_out_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
395 | ENDDO |
---|
396 | ENDDO |
---|
397 | ENDDO |
---|
398 | |
---|
399 | CASE ( 'r_a*' ) |
---|
400 | DO i = nxlg, nxrg |
---|
401 | DO j = nysg, nyng |
---|
402 | r_a_av(j,i) = r_a_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
403 | ENDDO |
---|
404 | ENDDO |
---|
405 | |
---|
406 | CASE ( 'r_s*' ) |
---|
407 | DO i = nxlg, nxrg |
---|
408 | DO j = nysg, nyng |
---|
409 | r_s_av(j,i) = r_s_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
410 | ENDDO |
---|
411 | ENDDO |
---|
412 | |
---|
413 | CASE ( 'rho' ) |
---|
414 | DO i = nxlg, nxrg |
---|
415 | DO j = nysg, nyng |
---|
416 | DO k = nzb, nzt+1 |
---|
417 | rho_av(k,j,i) = rho_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
418 | ENDDO |
---|
419 | ENDDO |
---|
420 | ENDDO |
---|
421 | |
---|
422 | CASE ( 's' ) |
---|
423 | DO i = nxlg, nxrg |
---|
424 | DO j = nysg, nyng |
---|
425 | DO k = nzb, nzt+1 |
---|
426 | s_av(k,j,i) = s_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
427 | ENDDO |
---|
428 | ENDDO |
---|
429 | ENDDO |
---|
430 | |
---|
431 | CASE ( 'sa' ) |
---|
432 | DO i = nxlg, nxrg |
---|
433 | DO j = nysg, nyng |
---|
434 | DO k = nzb, nzt+1 |
---|
435 | sa_av(k,j,i) = sa_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
436 | ENDDO |
---|
437 | ENDDO |
---|
438 | ENDDO |
---|
439 | |
---|
440 | CASE ( 'shf*' ) |
---|
441 | DO i = nxlg, nxrg |
---|
442 | DO j = nysg, nyng |
---|
443 | shf_av(j,i) = shf_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
444 | ENDDO |
---|
445 | ENDDO |
---|
446 | |
---|
447 | CASE ( 't*' ) |
---|
448 | DO i = nxlg, nxrg |
---|
449 | DO j = nysg, nyng |
---|
450 | ts_av(j,i) = ts_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
451 | ENDDO |
---|
452 | ENDDO |
---|
453 | |
---|
454 | CASE ( 't_soil' ) |
---|
455 | DO i = nxlg, nxrg |
---|
456 | DO j = nysg, nyng |
---|
457 | DO k = nzb_soil, nzt_soil |
---|
458 | t_soil_av(k,j,i) = t_soil_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
459 | ENDDO |
---|
460 | ENDDO |
---|
461 | ENDDO |
---|
462 | |
---|
463 | CASE ( 'u' ) |
---|
464 | DO i = nxlg, nxrg |
---|
465 | DO j = nysg, nyng |
---|
466 | DO k = nzb, nzt+1 |
---|
467 | u_av(k,j,i) = u_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
468 | ENDDO |
---|
469 | ENDDO |
---|
470 | ENDDO |
---|
471 | |
---|
472 | CASE ( 'u*' ) |
---|
473 | DO i = nxlg, nxrg |
---|
474 | DO j = nysg, nyng |
---|
475 | us_av(j,i) = us_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
476 | ENDDO |
---|
477 | ENDDO |
---|
478 | |
---|
479 | CASE ( 'v' ) |
---|
480 | DO i = nxlg, nxrg |
---|
481 | DO j = nysg, nyng |
---|
482 | DO k = nzb, nzt+1 |
---|
483 | v_av(k,j,i) = v_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
484 | ENDDO |
---|
485 | ENDDO |
---|
486 | ENDDO |
---|
487 | |
---|
488 | CASE ( 'vpt' ) |
---|
489 | DO i = nxlg, nxrg |
---|
490 | DO j = nysg, nyng |
---|
491 | DO k = nzb, nzt+1 |
---|
492 | vpt_av(k,j,i) = vpt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
493 | ENDDO |
---|
494 | ENDDO |
---|
495 | ENDDO |
---|
496 | |
---|
497 | CASE ( 'w' ) |
---|
498 | DO i = nxlg, nxrg |
---|
499 | DO j = nysg, nyng |
---|
500 | DO k = nzb, nzt+1 |
---|
501 | w_av(k,j,i) = w_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
502 | ENDDO |
---|
503 | ENDDO |
---|
504 | ENDDO |
---|
505 | |
---|
506 | CASE ( 'z0*' ) |
---|
507 | DO i = nxlg, nxrg |
---|
508 | DO j = nysg, nyng |
---|
509 | z0_av(j,i) = z0_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
510 | ENDDO |
---|
511 | ENDDO |
---|
512 | |
---|
513 | CASE ( 'z0h*' ) |
---|
514 | DO i = nxlg, nxrg |
---|
515 | DO j = nysg, nyng |
---|
516 | z0h_av(j,i) = z0h_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
517 | ENDDO |
---|
518 | ENDDO |
---|
519 | |
---|
520 | CASE DEFAULT |
---|
521 | ! |
---|
522 | !-- User-defined quantity |
---|
523 | CALL user_3d_data_averaging( 'average', doav(ii) ) |
---|
524 | |
---|
525 | END SELECT |
---|
526 | |
---|
527 | ENDDO |
---|
528 | |
---|
529 | ! |
---|
530 | !-- Reset the counter |
---|
531 | average_count_3d = 0.0 |
---|
532 | |
---|
533 | CALL cpu_log( log_point(35), 'average_3d_data', 'stop' ) |
---|
534 | |
---|
535 | |
---|
536 | END SUBROUTINE average_3d_data |
---|