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