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