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