[1] | 1 | SUBROUTINE sum_up_3d_data |
---|
| 2 | |
---|
[1036] | 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 | ! |
---|
[1310] | 17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1036] | 18 | !--------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
[1360] | 22 | ! |
---|
[1556] | 23 | ! |
---|
[1321] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: sum_up_3d_data.f90 1556 2015-03-04 17:45:02Z raasch $ |
---|
| 27 | ! |
---|
[1556] | 28 | ! 1555 2015-03-04 17:44:27Z maronga |
---|
| 29 | ! Added output of r_a and r_s |
---|
| 30 | ! |
---|
[1552] | 31 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 32 | ! Added support for land surface model and radiation model data. |
---|
| 33 | ! |
---|
[1360] | 34 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
| 35 | ! New particle structure integrated. |
---|
| 36 | ! |
---|
[1354] | 37 | ! 1353 2014-04-08 15:21:23Z heinze |
---|
| 38 | ! REAL constants provided with KIND-attribute |
---|
| 39 | ! |
---|
[1321] | 40 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 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 | ! old module precision_kind is removed, |
---|
| 45 | ! revision history before 2012 removed, |
---|
| 46 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 47 | ! all variable declaration statements |
---|
[1] | 48 | ! |
---|
[1319] | 49 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
| 50 | ! barrier argument removed from cpu_log, |
---|
| 51 | ! module interfaces removed |
---|
| 52 | ! |
---|
[1116] | 53 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
| 54 | ! ql is calculated by calc_liquid_water_content |
---|
| 55 | ! |
---|
[1054] | 56 | ! 1053 2012-11-13 17:11:03Z hoffmann |
---|
| 57 | ! +nr, prr, qr |
---|
| 58 | ! |
---|
[1037] | 59 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 60 | ! code put under GPL (PALM 3.9) |
---|
| 61 | ! |
---|
[1008] | 62 | ! 1007 2012-09-19 14:30:36Z franke |
---|
| 63 | ! Bugfix in calculation of ql_vp |
---|
| 64 | ! |
---|
[979] | 65 | ! 978 2012-08-09 08:28:32Z fricke |
---|
| 66 | ! +z0h* |
---|
| 67 | ! |
---|
[1] | 68 | ! Revision 1.1 2006/02/23 12:55:23 raasch |
---|
| 69 | ! Initial revision |
---|
| 70 | ! |
---|
| 71 | ! |
---|
| 72 | ! Description: |
---|
| 73 | ! ------------ |
---|
| 74 | ! Sum-up the values of 3d-arrays. The real averaging is later done in routine |
---|
| 75 | ! average_3d_data. |
---|
| 76 | !------------------------------------------------------------------------------! |
---|
| 77 | |
---|
[1320] | 78 | USE arrays_3d, & |
---|
| 79 | ONLY: dzw, e, nr, p, pt, q, qc, ql, ql_c, ql_v, qr, qsws, rho, sa, & |
---|
| 80 | shf, ts, u, us, v, vpt, w, z0, z0h |
---|
[1] | 81 | |
---|
[1320] | 82 | USE averaging, & |
---|
| 83 | ONLY: e_av, lpt_av, lwp_av, nr_av, p_av, pc_av, pr_av, prr_av, & |
---|
| 84 | precipitation_rate_av, pt_av, q_av, qc_av, ql_av, ql_c_av, & |
---|
| 85 | ql_v_av, ql_vp_av, qr_av, qsws_av, qv_av, rho_av, s_av, sa_av, & |
---|
| 86 | shf_av, ts_av, u_av, us_av, v_av, vpt_av, w_av, z0_av, z0h_av |
---|
| 87 | |
---|
| 88 | USE cloud_parameters, & |
---|
| 89 | ONLY: l_d_cp, precipitation_rate, pt_d_t |
---|
| 90 | |
---|
| 91 | USE control_parameters, & |
---|
| 92 | ONLY: average_count_3d, cloud_physics, doav, doav_n |
---|
| 93 | |
---|
| 94 | USE cpulog, & |
---|
| 95 | ONLY: cpu_log, log_point |
---|
| 96 | |
---|
| 97 | USE indices, & |
---|
| 98 | ONLY: nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt |
---|
| 99 | |
---|
| 100 | USE kinds |
---|
| 101 | |
---|
[1551] | 102 | USE land_surface_model_mod, & |
---|
| 103 | ONLY: c_liq, c_liq_av, c_soil_av, c_veg, c_veg_av, ghf_eb, & |
---|
| 104 | ghf_eb_av, lai, lai_av, m_liq_eb, m_liq_eb_av, m_soil, & |
---|
| 105 | m_soil_av, nzb_soil, nzt_soil, qsws_eb, qsws_eb_av, & |
---|
| 106 | qsws_liq_eb, qsws_liq_eb_av, qsws_soil_eb, qsws_soil_eb_av, & |
---|
[1555] | 107 | qsws_veg_eb, qsws_veg_eb_av, shf_eb, shf_eb_av, r_a, r_a_av, & |
---|
| 108 | r_s, r_s_av, t_soil, t_soil_av |
---|
[1551] | 109 | |
---|
[1320] | 110 | USE particle_attributes, & |
---|
[1359] | 111 | ONLY: grid_particles, number_of_particles, particles, prt_count |
---|
[1320] | 112 | |
---|
[1551] | 113 | USE radiation_model_mod, & |
---|
| 114 | ONLY: rad_net, rad_net_av, rad_sw_in, rad_sw_in_av |
---|
| 115 | |
---|
[1] | 116 | IMPLICIT NONE |
---|
| 117 | |
---|
[1320] | 118 | INTEGER(iwp) :: i !: |
---|
| 119 | INTEGER(iwp) :: ii !: |
---|
| 120 | INTEGER(iwp) :: j !: |
---|
| 121 | INTEGER(iwp) :: k !: |
---|
| 122 | INTEGER(iwp) :: n !: |
---|
| 123 | INTEGER(iwp) :: psi !: |
---|
[1] | 124 | |
---|
[1320] | 125 | REAL(wp) :: mean_r !: |
---|
[1359] | 126 | REAL(wp) :: s_r2 !: |
---|
[1320] | 127 | REAL(wp) :: s_r3 !: |
---|
[1] | 128 | |
---|
| 129 | CALL cpu_log (log_point(34),'sum_up_3d_data','start') |
---|
| 130 | |
---|
| 131 | ! |
---|
| 132 | !-- Allocate and initialize the summation arrays if called for the very first |
---|
| 133 | !-- time or the first time after average_3d_data has been called |
---|
| 134 | !-- (some or all of the arrays may have been already allocated |
---|
| 135 | !-- in read_3d_binary) |
---|
| 136 | IF ( average_count_3d == 0 ) THEN |
---|
| 137 | |
---|
| 138 | DO ii = 1, doav_n |
---|
| 139 | |
---|
| 140 | SELECT CASE ( TRIM( doav(ii) ) ) |
---|
| 141 | |
---|
[1551] | 142 | CASE ( 'c_liq*' ) |
---|
| 143 | IF ( .NOT. ALLOCATED( c_liq_av ) ) THEN |
---|
| 144 | ALLOCATE( c_liq_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 145 | ENDIF |
---|
| 146 | c_liq_av = 0.0_wp |
---|
| 147 | |
---|
| 148 | CASE ( 'c_soil*' ) |
---|
| 149 | IF ( .NOT. ALLOCATED( c_soil_av ) ) THEN |
---|
| 150 | ALLOCATE( c_soil_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 151 | ENDIF |
---|
| 152 | c_soil_av = 0.0_wp |
---|
| 153 | |
---|
| 154 | CASE ( 'c_veg*' ) |
---|
| 155 | IF ( .NOT. ALLOCATED( c_veg_av ) ) THEN |
---|
| 156 | ALLOCATE( c_veg_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 157 | ENDIF |
---|
| 158 | c_veg_av = 0.0_wp |
---|
| 159 | |
---|
[1] | 160 | CASE ( 'e' ) |
---|
| 161 | IF ( .NOT. ALLOCATED( e_av ) ) THEN |
---|
[667] | 162 | ALLOCATE( e_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 163 | ENDIF |
---|
[1353] | 164 | e_av = 0.0_wp |
---|
[1] | 165 | |
---|
[1551] | 166 | CASE ( 'ghf_eb*' ) |
---|
| 167 | IF ( .NOT. ALLOCATED( ghf_eb_av ) ) THEN |
---|
| 168 | ALLOCATE( ghf_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 169 | ENDIF |
---|
| 170 | ghf_eb_av = 0.0_wp |
---|
| 171 | |
---|
| 172 | CASE ( 'lai*' ) |
---|
| 173 | IF ( .NOT. ALLOCATED( lai_av ) ) THEN |
---|
| 174 | ALLOCATE( lai_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 175 | ENDIF |
---|
| 176 | lai_av = 0.0_wp |
---|
| 177 | |
---|
[771] | 178 | CASE ( 'lpt' ) |
---|
| 179 | IF ( .NOT. ALLOCATED( lpt_av ) ) THEN |
---|
| 180 | ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 181 | ENDIF |
---|
[1353] | 182 | lpt_av = 0.0_wp |
---|
[771] | 183 | |
---|
[1] | 184 | CASE ( 'lwp*' ) |
---|
| 185 | IF ( .NOT. ALLOCATED( lwp_av ) ) THEN |
---|
[667] | 186 | ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 187 | ENDIF |
---|
[1353] | 188 | lwp_av = 0.0_wp |
---|
[1] | 189 | |
---|
[1551] | 190 | CASE ( 'm_liq_eb*' ) |
---|
| 191 | IF ( .NOT. ALLOCATED( m_liq_eb_av ) ) THEN |
---|
| 192 | ALLOCATE( m_liq_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 193 | ENDIF |
---|
| 194 | m_liq_eb_av = 0.0_wp |
---|
| 195 | |
---|
| 196 | CASE ( 'm_soil' ) |
---|
| 197 | IF ( .NOT. ALLOCATED( m_soil_av ) ) THEN |
---|
| 198 | ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) |
---|
| 199 | ENDIF |
---|
| 200 | m_soil_av = 0.0_wp |
---|
| 201 | |
---|
[1053] | 202 | CASE ( 'nr' ) |
---|
| 203 | IF ( .NOT. ALLOCATED( nr_av ) ) THEN |
---|
| 204 | ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 205 | ENDIF |
---|
[1353] | 206 | nr_av = 0.0_wp |
---|
[1053] | 207 | |
---|
[1] | 208 | CASE ( 'p' ) |
---|
| 209 | IF ( .NOT. ALLOCATED( p_av ) ) THEN |
---|
[667] | 210 | ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 211 | ENDIF |
---|
[1353] | 212 | p_av = 0.0_wp |
---|
[1] | 213 | |
---|
| 214 | CASE ( 'pc' ) |
---|
| 215 | IF ( .NOT. ALLOCATED( pc_av ) ) THEN |
---|
[667] | 216 | ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 217 | ENDIF |
---|
[1353] | 218 | pc_av = 0.0_wp |
---|
[1] | 219 | |
---|
| 220 | CASE ( 'pr' ) |
---|
| 221 | IF ( .NOT. ALLOCATED( pr_av ) ) THEN |
---|
[667] | 222 | ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 223 | ENDIF |
---|
[1353] | 224 | pr_av = 0.0_wp |
---|
[1] | 225 | |
---|
[1053] | 226 | CASE ( 'prr' ) |
---|
| 227 | IF ( .NOT. ALLOCATED( prr_av ) ) THEN |
---|
| 228 | ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 229 | ENDIF |
---|
[1353] | 230 | prr_av = 0.0_wp |
---|
[1053] | 231 | |
---|
[72] | 232 | CASE ( 'prr*' ) |
---|
| 233 | IF ( .NOT. ALLOCATED( precipitation_rate_av ) ) THEN |
---|
[667] | 234 | ALLOCATE( precipitation_rate_av(nysg:nyng,nxlg:nxrg) ) |
---|
[72] | 235 | ENDIF |
---|
[1353] | 236 | precipitation_rate_av = 0.0_wp |
---|
[72] | 237 | |
---|
[1] | 238 | CASE ( 'pt' ) |
---|
| 239 | IF ( .NOT. ALLOCATED( pt_av ) ) THEN |
---|
[667] | 240 | ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 241 | ENDIF |
---|
[1353] | 242 | pt_av = 0.0_wp |
---|
[1] | 243 | |
---|
| 244 | CASE ( 'q' ) |
---|
| 245 | IF ( .NOT. ALLOCATED( q_av ) ) THEN |
---|
[667] | 246 | ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 247 | ENDIF |
---|
[1353] | 248 | q_av = 0.0_wp |
---|
[1] | 249 | |
---|
[1115] | 250 | CASE ( 'qc' ) |
---|
| 251 | IF ( .NOT. ALLOCATED( qc_av ) ) THEN |
---|
| 252 | ALLOCATE( qc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 253 | ENDIF |
---|
[1353] | 254 | qc_av = 0.0_wp |
---|
[1115] | 255 | |
---|
[1] | 256 | CASE ( 'ql' ) |
---|
| 257 | IF ( .NOT. ALLOCATED( ql_av ) ) THEN |
---|
[667] | 258 | ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 259 | ENDIF |
---|
[1353] | 260 | ql_av = 0.0_wp |
---|
[1] | 261 | |
---|
| 262 | CASE ( 'ql_c' ) |
---|
| 263 | IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN |
---|
[667] | 264 | ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 265 | ENDIF |
---|
[1353] | 266 | ql_c_av = 0.0_wp |
---|
[1] | 267 | |
---|
| 268 | CASE ( 'ql_v' ) |
---|
| 269 | IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN |
---|
[667] | 270 | ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 271 | ENDIF |
---|
[1353] | 272 | ql_v_av = 0.0_wp |
---|
[1] | 273 | |
---|
| 274 | CASE ( 'ql_vp' ) |
---|
| 275 | IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN |
---|
[667] | 276 | ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 277 | ENDIF |
---|
[1353] | 278 | ql_vp_av = 0.0_wp |
---|
[1] | 279 | |
---|
[1053] | 280 | CASE ( 'qr' ) |
---|
| 281 | IF ( .NOT. ALLOCATED( qr_av ) ) THEN |
---|
| 282 | ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 283 | ENDIF |
---|
[1353] | 284 | qr_av = 0.0_wp |
---|
[1053] | 285 | |
---|
[354] | 286 | CASE ( 'qsws*' ) |
---|
| 287 | IF ( .NOT. ALLOCATED( qsws_av ) ) THEN |
---|
[667] | 288 | ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 289 | ENDIF |
---|
[1353] | 290 | qsws_av = 0.0_wp |
---|
[354] | 291 | |
---|
[1551] | 292 | CASE ( 'qsws_eb*' ) |
---|
| 293 | IF ( .NOT. ALLOCATED( qsws_eb_av ) ) THEN |
---|
| 294 | ALLOCATE( qsws_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 295 | ENDIF |
---|
| 296 | qsws_eb_av = 0.0_wp |
---|
| 297 | |
---|
| 298 | CASE ( 'qsws_liq_eb*' ) |
---|
| 299 | IF ( .NOT. ALLOCATED( qsws_liq_eb_av ) ) THEN |
---|
| 300 | ALLOCATE( qsws_liq_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 301 | ENDIF |
---|
| 302 | qsws_liq_eb_av = 0.0_wp |
---|
| 303 | |
---|
| 304 | CASE ( 'qsws_soil_eb*' ) |
---|
| 305 | IF ( .NOT. ALLOCATED( qsws_soil_eb_av ) ) THEN |
---|
| 306 | ALLOCATE( qsws_soil_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 307 | ENDIF |
---|
| 308 | qsws_soil_eb_av = 0.0_wp |
---|
| 309 | |
---|
| 310 | CASE ( 'qsws_veg_eb*' ) |
---|
| 311 | IF ( .NOT. ALLOCATED( qsws_veg_eb_av ) ) THEN |
---|
| 312 | ALLOCATE( qsws_veg_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 313 | ENDIF |
---|
| 314 | qsws_veg_eb_av = 0.0_wp |
---|
| 315 | |
---|
[1] | 316 | CASE ( 'qv' ) |
---|
| 317 | IF ( .NOT. ALLOCATED( qv_av ) ) THEN |
---|
[667] | 318 | ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 319 | ENDIF |
---|
[1353] | 320 | qv_av = 0.0_wp |
---|
[1] | 321 | |
---|
[1551] | 322 | CASE ( 'rad_net*' ) |
---|
| 323 | IF ( .NOT. ALLOCATED( rad_net_av ) ) THEN |
---|
| 324 | ALLOCATE( rad_net_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 325 | ENDIF |
---|
| 326 | rad_net_av = 0.0_wp |
---|
| 327 | |
---|
| 328 | CASE ( 'rad_sw_in*' ) |
---|
| 329 | IF ( .NOT. ALLOCATED( rad_sw_in_av ) ) THEN |
---|
| 330 | ALLOCATE( rad_sw_in_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 331 | ENDIF |
---|
| 332 | rad_sw_in_av = 0.0_wp |
---|
| 333 | |
---|
[96] | 334 | CASE ( 'rho' ) |
---|
| 335 | IF ( .NOT. ALLOCATED( rho_av ) ) THEN |
---|
[667] | 336 | ALLOCATE( rho_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[96] | 337 | ENDIF |
---|
[1353] | 338 | rho_av = 0.0_wp |
---|
[96] | 339 | |
---|
[1555] | 340 | CASE ( 'r_a*' ) |
---|
| 341 | IF ( .NOT. ALLOCATED( r_a_av ) ) THEN |
---|
| 342 | ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 343 | ENDIF |
---|
| 344 | r_a_av = 0.0_wp |
---|
| 345 | |
---|
| 346 | CASE ( 'r_s*' ) |
---|
| 347 | IF ( .NOT. ALLOCATED( r_s_av ) ) THEN |
---|
| 348 | ALLOCATE( r_s_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 349 | ENDIF |
---|
| 350 | r_s_av = 0.0_wp |
---|
| 351 | |
---|
[1] | 352 | CASE ( 's' ) |
---|
| 353 | IF ( .NOT. ALLOCATED( s_av ) ) THEN |
---|
[667] | 354 | ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 355 | ENDIF |
---|
[1353] | 356 | s_av = 0.0_wp |
---|
[1] | 357 | |
---|
[96] | 358 | CASE ( 'sa' ) |
---|
| 359 | IF ( .NOT. ALLOCATED( sa_av ) ) THEN |
---|
[667] | 360 | ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[96] | 361 | ENDIF |
---|
[1353] | 362 | sa_av = 0.0_wp |
---|
[96] | 363 | |
---|
[354] | 364 | CASE ( 'shf*' ) |
---|
| 365 | IF ( .NOT. ALLOCATED( shf_av ) ) THEN |
---|
[667] | 366 | ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 367 | ENDIF |
---|
[1353] | 368 | shf_av = 0.0_wp |
---|
[354] | 369 | |
---|
[1551] | 370 | CASE ( 'shf_eb*' ) |
---|
| 371 | IF ( .NOT. ALLOCATED( shf_eb_av ) ) THEN |
---|
| 372 | ALLOCATE( shf_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 373 | ENDIF |
---|
| 374 | shf_eb_av = 0.0_wp |
---|
| 375 | |
---|
| 376 | CASE ( 't_soil' ) |
---|
| 377 | IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN |
---|
| 378 | ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) |
---|
| 379 | ENDIF |
---|
| 380 | t_soil_av = 0.0_wp |
---|
| 381 | |
---|
[1] | 382 | CASE ( 't*' ) |
---|
| 383 | IF ( .NOT. ALLOCATED( ts_av ) ) THEN |
---|
[667] | 384 | ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 385 | ENDIF |
---|
[1353] | 386 | ts_av = 0.0_wp |
---|
[1] | 387 | |
---|
| 388 | CASE ( 'u' ) |
---|
| 389 | IF ( .NOT. ALLOCATED( u_av ) ) THEN |
---|
[667] | 390 | ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 391 | ENDIF |
---|
[1353] | 392 | u_av = 0.0_wp |
---|
[1] | 393 | |
---|
| 394 | CASE ( 'u*' ) |
---|
| 395 | IF ( .NOT. ALLOCATED( us_av ) ) THEN |
---|
[667] | 396 | ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 397 | ENDIF |
---|
[1353] | 398 | us_av = 0.0_wp |
---|
[1] | 399 | |
---|
| 400 | CASE ( 'v' ) |
---|
| 401 | IF ( .NOT. ALLOCATED( v_av ) ) THEN |
---|
[667] | 402 | ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 403 | ENDIF |
---|
[1353] | 404 | v_av = 0.0_wp |
---|
[1] | 405 | |
---|
| 406 | CASE ( 'vpt' ) |
---|
| 407 | IF ( .NOT. ALLOCATED( vpt_av ) ) THEN |
---|
[667] | 408 | ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 409 | ENDIF |
---|
[1353] | 410 | vpt_av = 0.0_wp |
---|
[1] | 411 | |
---|
| 412 | CASE ( 'w' ) |
---|
| 413 | IF ( .NOT. ALLOCATED( w_av ) ) THEN |
---|
[667] | 414 | ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 415 | ENDIF |
---|
[1353] | 416 | w_av = 0.0_wp |
---|
[1] | 417 | |
---|
[72] | 418 | CASE ( 'z0*' ) |
---|
| 419 | IF ( .NOT. ALLOCATED( z0_av ) ) THEN |
---|
[667] | 420 | ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) ) |
---|
[72] | 421 | ENDIF |
---|
[1353] | 422 | z0_av = 0.0_wp |
---|
[72] | 423 | |
---|
[978] | 424 | CASE ( 'z0h*' ) |
---|
| 425 | IF ( .NOT. ALLOCATED( z0h_av ) ) THEN |
---|
| 426 | ALLOCATE( z0h_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 427 | ENDIF |
---|
[1353] | 428 | z0h_av = 0.0_wp |
---|
[978] | 429 | |
---|
[1] | 430 | CASE DEFAULT |
---|
| 431 | ! |
---|
| 432 | !-- User-defined quantity |
---|
| 433 | CALL user_3d_data_averaging( 'allocate', doav(ii) ) |
---|
| 434 | |
---|
| 435 | END SELECT |
---|
| 436 | |
---|
| 437 | ENDDO |
---|
| 438 | |
---|
| 439 | ENDIF |
---|
| 440 | |
---|
| 441 | ! |
---|
| 442 | !-- Loop of all variables to be averaged. |
---|
| 443 | DO ii = 1, doav_n |
---|
| 444 | |
---|
| 445 | ! |
---|
| 446 | !-- Store the array chosen on the temporary array. |
---|
| 447 | SELECT CASE ( TRIM( doav(ii) ) ) |
---|
| 448 | |
---|
[1551] | 449 | CASE ( 'c_liq*' ) |
---|
| 450 | DO i = nxlg, nxrg |
---|
| 451 | DO j = nysg, nyng |
---|
| 452 | c_liq_av(j,i) = c_liq_av(j,i) |
---|
| 453 | ENDDO |
---|
| 454 | ENDDO |
---|
| 455 | |
---|
| 456 | CASE ( 'c_soil*' ) |
---|
| 457 | DO i = nxlg, nxrg |
---|
| 458 | DO j = nysg, nyng |
---|
| 459 | c_soil_av(j,i) = c_soil_av(j,i) + (1.0_wp - c_veg(j,i)) |
---|
| 460 | ENDDO |
---|
| 461 | ENDDO |
---|
| 462 | |
---|
| 463 | CASE ( 'c_veg*' ) |
---|
| 464 | DO i = nxlg, nxrg |
---|
| 465 | DO j = nysg, nyng |
---|
| 466 | c_veg_av(j,i) = c_veg_av(j,i) |
---|
| 467 | ENDDO |
---|
| 468 | ENDDO |
---|
| 469 | |
---|
[1] | 470 | CASE ( 'e' ) |
---|
[667] | 471 | DO i = nxlg, nxrg |
---|
| 472 | DO j = nysg, nyng |
---|
[1] | 473 | DO k = nzb, nzt+1 |
---|
| 474 | e_av(k,j,i) = e_av(k,j,i) + e(k,j,i) |
---|
| 475 | ENDDO |
---|
| 476 | ENDDO |
---|
| 477 | ENDDO |
---|
| 478 | |
---|
[1551] | 479 | CASE ( 'ghf_eb*' ) |
---|
| 480 | DO i = nxlg, nxrg |
---|
| 481 | DO j = nysg, nyng |
---|
| 482 | ghf_eb_av(j,i) = ghf_eb_av(j,i) + ghf_eb(j,i) |
---|
| 483 | ENDDO |
---|
| 484 | ENDDO |
---|
| 485 | |
---|
| 486 | CASE ( 'lai*' ) |
---|
| 487 | DO i = nxlg, nxrg |
---|
| 488 | DO j = nysg, nyng |
---|
| 489 | lai_av(j,i) = lai_av(j,i) |
---|
| 490 | ENDDO |
---|
| 491 | ENDDO |
---|
| 492 | |
---|
[771] | 493 | CASE ( 'lpt' ) |
---|
| 494 | DO i = nxlg, nxrg |
---|
| 495 | DO j = nysg, nyng |
---|
| 496 | DO k = nzb, nzt+1 |
---|
| 497 | lpt_av(k,j,i) = lpt_av(k,j,i) + pt(k,j,i) |
---|
| 498 | ENDDO |
---|
| 499 | ENDDO |
---|
| 500 | ENDDO |
---|
| 501 | |
---|
[1] | 502 | CASE ( 'lwp*' ) |
---|
[667] | 503 | DO i = nxlg, nxrg |
---|
| 504 | DO j = nysg, nyng |
---|
[1] | 505 | lwp_av(j,i) = lwp_av(j,i) + SUM( ql(nzb:nzt,j,i) * & |
---|
| 506 | dzw(1:nzt+1) ) |
---|
| 507 | ENDDO |
---|
| 508 | ENDDO |
---|
| 509 | |
---|
[1551] | 510 | CASE ( 'm_liq_eb*' ) |
---|
| 511 | DO i = nxlg, nxrg |
---|
| 512 | DO j = nysg, nyng |
---|
| 513 | m_liq_eb_av(j,i) = m_liq_eb_av(j,i) + m_liq_eb(j,i) |
---|
| 514 | ENDDO |
---|
| 515 | ENDDO |
---|
| 516 | |
---|
| 517 | CASE ( 'm_soil' ) |
---|
| 518 | DO i = nxlg, nxrg |
---|
| 519 | DO j = nysg, nyng |
---|
| 520 | DO k = nzb_soil, nzt_soil |
---|
| 521 | m_soil_av(k,j,i) = m_soil_av(k,j,i) + m_soil(k,j,i) |
---|
| 522 | ENDDO |
---|
| 523 | ENDDO |
---|
| 524 | ENDDO |
---|
| 525 | |
---|
[1053] | 526 | CASE ( 'nr' ) |
---|
| 527 | DO i = nxlg, nxrg |
---|
| 528 | DO j = nysg, nyng |
---|
| 529 | DO k = nzb, nzt+1 |
---|
| 530 | nr_av(k,j,i) = nr_av(k,j,i) + nr(k,j,i) |
---|
| 531 | ENDDO |
---|
| 532 | ENDDO |
---|
| 533 | ENDDO |
---|
| 534 | |
---|
[1] | 535 | CASE ( 'p' ) |
---|
[667] | 536 | DO i = nxlg, nxrg |
---|
| 537 | DO j = nysg, nyng |
---|
[1] | 538 | DO k = nzb, nzt+1 |
---|
| 539 | p_av(k,j,i) = p_av(k,j,i) + p(k,j,i) |
---|
| 540 | ENDDO |
---|
| 541 | ENDDO |
---|
| 542 | ENDDO |
---|
| 543 | |
---|
| 544 | CASE ( 'pc' ) |
---|
| 545 | DO i = nxl, nxr |
---|
| 546 | DO j = nys, nyn |
---|
| 547 | DO k = nzb, nzt+1 |
---|
| 548 | pc_av(k,j,i) = pc_av(k,j,i) + prt_count(k,j,i) |
---|
| 549 | ENDDO |
---|
| 550 | ENDDO |
---|
| 551 | ENDDO |
---|
| 552 | |
---|
| 553 | CASE ( 'pr' ) |
---|
| 554 | DO i = nxl, nxr |
---|
| 555 | DO j = nys, nyn |
---|
| 556 | DO k = nzb, nzt+1 |
---|
[1359] | 557 | number_of_particles = prt_count(k,j,i) |
---|
| 558 | IF ( number_of_particles <= 0 ) CYCLE |
---|
| 559 | particles => grid_particles(k,j,i)%particles(1:number_of_particles) |
---|
| 560 | s_r2 = 0.0_wp |
---|
[1353] | 561 | s_r3 = 0.0_wp |
---|
[1359] | 562 | |
---|
| 563 | DO n = 1, number_of_particles |
---|
| 564 | IF ( particles(n)%particle_mask ) THEN |
---|
| 565 | s_r2 = s_r2 + particles(n)%radius**2 * & |
---|
| 566 | particles(n)%weight_factor |
---|
| 567 | s_r3 = s_r3 + particles(n)%radius**3 * & |
---|
| 568 | particles(n)%weight_factor |
---|
| 569 | ENDIF |
---|
[1] | 570 | ENDDO |
---|
[1359] | 571 | |
---|
| 572 | IF ( s_r2 > 0.0_wp ) THEN |
---|
| 573 | mean_r = s_r3 / s_r2 |
---|
[1] | 574 | ELSE |
---|
[1353] | 575 | mean_r = 0.0_wp |
---|
[1] | 576 | ENDIF |
---|
| 577 | pr_av(k,j,i) = pr_av(k,j,i) + mean_r |
---|
| 578 | ENDDO |
---|
| 579 | ENDDO |
---|
| 580 | ENDDO |
---|
| 581 | |
---|
[1359] | 582 | |
---|
[72] | 583 | CASE ( 'pr*' ) |
---|
[667] | 584 | DO i = nxlg, nxrg |
---|
| 585 | DO j = nysg, nyng |
---|
[72] | 586 | precipitation_rate_av(j,i) = precipitation_rate_av(j,i) + & |
---|
| 587 | precipitation_rate(j,i) |
---|
| 588 | ENDDO |
---|
| 589 | ENDDO |
---|
| 590 | |
---|
[1] | 591 | CASE ( 'pt' ) |
---|
| 592 | IF ( .NOT. cloud_physics ) THEN |
---|
[667] | 593 | DO i = nxlg, nxrg |
---|
| 594 | DO j = nysg, nyng |
---|
| 595 | DO k = nzb, nzt+1 |
---|
[1] | 596 | pt_av(k,j,i) = pt_av(k,j,i) + pt(k,j,i) |
---|
| 597 | ENDDO |
---|
| 598 | ENDDO |
---|
| 599 | ENDDO |
---|
| 600 | ELSE |
---|
[667] | 601 | DO i = nxlg, nxrg |
---|
| 602 | DO j = nysg, nyng |
---|
| 603 | DO k = nzb, nzt+1 |
---|
[1] | 604 | pt_av(k,j,i) = pt_av(k,j,i) + pt(k,j,i) + l_d_cp * & |
---|
| 605 | pt_d_t(k) * ql(k,j,i) |
---|
| 606 | ENDDO |
---|
| 607 | ENDDO |
---|
| 608 | ENDDO |
---|
| 609 | ENDIF |
---|
| 610 | |
---|
| 611 | CASE ( 'q' ) |
---|
[667] | 612 | DO i = nxlg, nxrg |
---|
| 613 | DO j = nysg, nyng |
---|
[1] | 614 | DO k = nzb, nzt+1 |
---|
| 615 | q_av(k,j,i) = q_av(k,j,i) + q(k,j,i) |
---|
| 616 | ENDDO |
---|
| 617 | ENDDO |
---|
| 618 | ENDDO |
---|
[402] | 619 | |
---|
[1115] | 620 | CASE ( 'qc' ) |
---|
| 621 | DO i = nxlg, nxrg |
---|
| 622 | DO j = nysg, nyng |
---|
| 623 | DO k = nzb, nzt+1 |
---|
| 624 | qc_av(k,j,i) = qc_av(k,j,i) + qc(k,j,i) |
---|
| 625 | ENDDO |
---|
| 626 | ENDDO |
---|
| 627 | ENDDO |
---|
| 628 | |
---|
[1] | 629 | CASE ( 'ql' ) |
---|
[667] | 630 | DO i = nxlg, nxrg |
---|
| 631 | DO j = nysg, nyng |
---|
[1] | 632 | DO k = nzb, nzt+1 |
---|
| 633 | ql_av(k,j,i) = ql_av(k,j,i) + ql(k,j,i) |
---|
| 634 | ENDDO |
---|
| 635 | ENDDO |
---|
| 636 | ENDDO |
---|
| 637 | |
---|
| 638 | CASE ( 'ql_c' ) |
---|
[667] | 639 | DO i = nxlg, nxrg |
---|
| 640 | DO j = nysg, nyng |
---|
[1] | 641 | DO k = nzb, nzt+1 |
---|
| 642 | ql_c_av(k,j,i) = ql_c_av(k,j,i) + ql_c(k,j,i) |
---|
| 643 | ENDDO |
---|
| 644 | ENDDO |
---|
| 645 | ENDDO |
---|
| 646 | |
---|
| 647 | CASE ( 'ql_v' ) |
---|
[667] | 648 | DO i = nxlg, nxrg |
---|
| 649 | DO j = nysg, nyng |
---|
[1] | 650 | DO k = nzb, nzt+1 |
---|
| 651 | ql_v_av(k,j,i) = ql_v_av(k,j,i) + ql_v(k,j,i) |
---|
| 652 | ENDDO |
---|
| 653 | ENDDO |
---|
| 654 | ENDDO |
---|
| 655 | |
---|
| 656 | CASE ( 'ql_vp' ) |
---|
[1007] | 657 | DO i = nxl, nxr |
---|
| 658 | DO j = nys, nyn |
---|
[1] | 659 | DO k = nzb, nzt+1 |
---|
[1359] | 660 | number_of_particles = prt_count(k,j,i) |
---|
| 661 | IF ( number_of_particles <= 0 ) CYCLE |
---|
| 662 | particles => grid_particles(k,j,i)%particles(1:number_of_particles) |
---|
| 663 | DO n = 1, number_of_particles |
---|
| 664 | IF ( particles(n)%particle_mask ) THEN |
---|
| 665 | ql_vp_av(k,j,i) = ql_vp_av(k,j,i) + & |
---|
| 666 | particles(n)%weight_factor / & |
---|
| 667 | number_of_particles |
---|
| 668 | ENDIF |
---|
[1007] | 669 | ENDDO |
---|
[1] | 670 | ENDDO |
---|
| 671 | ENDDO |
---|
| 672 | ENDDO |
---|
| 673 | |
---|
[1053] | 674 | CASE ( 'qr' ) |
---|
| 675 | DO i = nxlg, nxrg |
---|
| 676 | DO j = nysg, nyng |
---|
| 677 | DO k = nzb, nzt+1 |
---|
| 678 | qr_av(k,j,i) = qr_av(k,j,i) + qr(k,j,i) |
---|
| 679 | ENDDO |
---|
| 680 | ENDDO |
---|
| 681 | ENDDO |
---|
| 682 | |
---|
[402] | 683 | CASE ( 'qsws*' ) |
---|
[667] | 684 | DO i = nxlg, nxrg |
---|
| 685 | DO j = nysg, nyng |
---|
[402] | 686 | qsws_av(j,i) = qsws_av(j,i) + qsws(j,i) |
---|
| 687 | ENDDO |
---|
| 688 | ENDDO |
---|
| 689 | |
---|
[1551] | 690 | CASE ( 'qsws_eb*' ) |
---|
| 691 | DO i = nxlg, nxrg |
---|
| 692 | DO j = nysg, nyng |
---|
| 693 | qsws_eb_av(j,i) = qsws_eb_av(j,i) + qsws_eb(j,i) |
---|
| 694 | ENDDO |
---|
| 695 | ENDDO |
---|
| 696 | |
---|
| 697 | CASE ( 'qsws_liq_eb*' ) |
---|
| 698 | DO i = nxlg, nxrg |
---|
| 699 | DO j = nysg, nyng |
---|
| 700 | qsws_liq_eb_av(j,i) = qsws_liq_eb_av(j,i) + qsws_liq_eb(j,i) |
---|
| 701 | ENDDO |
---|
| 702 | ENDDO |
---|
| 703 | |
---|
| 704 | CASE ( 'qsws_soil_eb*' ) |
---|
| 705 | DO i = nxlg, nxrg |
---|
| 706 | DO j = nysg, nyng |
---|
| 707 | qsws_soil_eb_av(j,i) = qsws_soil_eb_av(j,i) + qsws_soil_eb(j,i) |
---|
| 708 | ENDDO |
---|
| 709 | ENDDO |
---|
| 710 | |
---|
| 711 | CASE ( 'qsws_veg_eb*' ) |
---|
| 712 | DO i = nxlg, nxrg |
---|
| 713 | DO j = nysg, nyng |
---|
| 714 | qsws_veg_eb_av(j,i) = qsws_veg_eb_av(j,i) + qsws_veg_eb(j,i) |
---|
| 715 | ENDDO |
---|
| 716 | ENDDO |
---|
| 717 | |
---|
[1] | 718 | CASE ( 'qv' ) |
---|
[667] | 719 | DO i = nxlg, nxrg |
---|
| 720 | DO j = nysg, nyng |
---|
[1] | 721 | DO k = nzb, nzt+1 |
---|
| 722 | qv_av(k,j,i) = qv_av(k,j,i) + q(k,j,i) - ql(k,j,i) |
---|
| 723 | ENDDO |
---|
| 724 | ENDDO |
---|
| 725 | ENDDO |
---|
| 726 | |
---|
[1551] | 727 | CASE ( 'rad_net*' ) |
---|
| 728 | DO i = nxlg, nxrg |
---|
| 729 | DO j = nysg, nyng |
---|
| 730 | rad_net_av(j,i) = rad_net_av(j,i) + rad_net(j,i) |
---|
| 731 | ENDDO |
---|
| 732 | ENDDO |
---|
| 733 | |
---|
| 734 | CASE ( 'rad_sw_in*' ) |
---|
| 735 | DO i = nxlg, nxrg |
---|
| 736 | DO j = nysg, nyng |
---|
| 737 | rad_sw_in_av(j,i) = rad_sw_in_av(j,i) + rad_sw_in(j,i) |
---|
| 738 | ENDDO |
---|
| 739 | ENDDO |
---|
| 740 | |
---|
[1555] | 741 | CASE ( 'r_a*' ) |
---|
| 742 | DO i = nxlg, nxrg |
---|
| 743 | DO j = nysg, nyng |
---|
| 744 | r_a_av(j,i) = r_a_av(j,i) + r_a(j,i) |
---|
| 745 | ENDDO |
---|
| 746 | ENDDO |
---|
| 747 | |
---|
| 748 | CASE ( 'r_s*' ) |
---|
| 749 | DO i = nxlg, nxrg |
---|
| 750 | DO j = nysg, nyng |
---|
| 751 | r_s_av(j,i) = r_s_av(j,i) + r_s(j,i) |
---|
| 752 | ENDDO |
---|
| 753 | ENDDO |
---|
| 754 | |
---|
[96] | 755 | CASE ( 'rho' ) |
---|
[667] | 756 | DO i = nxlg, nxrg |
---|
| 757 | DO j = nysg, nyng |
---|
[96] | 758 | DO k = nzb, nzt+1 |
---|
| 759 | rho_av(k,j,i) = rho_av(k,j,i) + rho(k,j,i) |
---|
| 760 | ENDDO |
---|
| 761 | ENDDO |
---|
| 762 | ENDDO |
---|
[402] | 763 | |
---|
[1] | 764 | CASE ( 's' ) |
---|
[667] | 765 | DO i = nxlg, nxrg |
---|
| 766 | DO j = nysg, nyng |
---|
[1] | 767 | DO k = nzb, nzt+1 |
---|
| 768 | s_av(k,j,i) = s_av(k,j,i) + q(k,j,i) |
---|
| 769 | ENDDO |
---|
| 770 | ENDDO |
---|
| 771 | ENDDO |
---|
[402] | 772 | |
---|
[96] | 773 | CASE ( 'sa' ) |
---|
[667] | 774 | DO i = nxlg, nxrg |
---|
| 775 | DO j = nysg, nyng |
---|
[96] | 776 | DO k = nzb, nzt+1 |
---|
| 777 | sa_av(k,j,i) = sa_av(k,j,i) + sa(k,j,i) |
---|
| 778 | ENDDO |
---|
| 779 | ENDDO |
---|
| 780 | ENDDO |
---|
[402] | 781 | |
---|
| 782 | CASE ( 'shf*' ) |
---|
[667] | 783 | DO i = nxlg, nxrg |
---|
| 784 | DO j = nysg, nyng |
---|
[402] | 785 | shf_av(j,i) = shf_av(j,i) + shf(j,i) |
---|
| 786 | ENDDO |
---|
| 787 | ENDDO |
---|
| 788 | |
---|
[1551] | 789 | CASE ( 'shf_eb*' ) |
---|
| 790 | DO i = nxlg, nxrg |
---|
| 791 | DO j = nysg, nyng |
---|
| 792 | shf_eb_av(j,i) = shf_eb_av(j,i) + shf_eb(j,i) |
---|
| 793 | ENDDO |
---|
| 794 | ENDDO |
---|
| 795 | |
---|
[1] | 796 | CASE ( 't*' ) |
---|
[667] | 797 | DO i = nxlg, nxrg |
---|
| 798 | DO j = nysg, nyng |
---|
[1] | 799 | ts_av(j,i) = ts_av(j,i) + ts(j,i) |
---|
| 800 | ENDDO |
---|
| 801 | ENDDO |
---|
| 802 | |
---|
[1551] | 803 | CASE ( 't_soil' ) |
---|
| 804 | DO i = nxlg, nxrg |
---|
| 805 | DO j = nysg, nyng |
---|
| 806 | DO k = nzb_soil, nzt_soil |
---|
| 807 | t_soil_av(k,j,i) = t_soil_av(k,j,i) + t_soil(k,j,i) |
---|
| 808 | ENDDO |
---|
| 809 | ENDDO |
---|
| 810 | ENDDO |
---|
| 811 | |
---|
[1] | 812 | CASE ( 'u' ) |
---|
[667] | 813 | DO i = nxlg, nxrg |
---|
| 814 | DO j = nysg, nyng |
---|
[1] | 815 | DO k = nzb, nzt+1 |
---|
| 816 | u_av(k,j,i) = u_av(k,j,i) + u(k,j,i) |
---|
| 817 | ENDDO |
---|
| 818 | ENDDO |
---|
| 819 | ENDDO |
---|
| 820 | |
---|
| 821 | CASE ( 'u*' ) |
---|
[667] | 822 | DO i = nxlg, nxrg |
---|
| 823 | DO j = nysg, nyng |
---|
[1] | 824 | us_av(j,i) = us_av(j,i) + us(j,i) |
---|
| 825 | ENDDO |
---|
| 826 | ENDDO |
---|
| 827 | |
---|
| 828 | CASE ( 'v' ) |
---|
[667] | 829 | DO i = nxlg, nxrg |
---|
| 830 | DO j = nysg, nyng |
---|
[1] | 831 | DO k = nzb, nzt+1 |
---|
| 832 | v_av(k,j,i) = v_av(k,j,i) + v(k,j,i) |
---|
| 833 | ENDDO |
---|
| 834 | ENDDO |
---|
| 835 | ENDDO |
---|
| 836 | |
---|
| 837 | CASE ( 'vpt' ) |
---|
[667] | 838 | DO i = nxlg, nxrg |
---|
| 839 | DO j = nysg, nyng |
---|
[1] | 840 | DO k = nzb, nzt+1 |
---|
| 841 | vpt_av(k,j,i) = vpt_av(k,j,i) + vpt(k,j,i) |
---|
| 842 | ENDDO |
---|
| 843 | ENDDO |
---|
| 844 | ENDDO |
---|
| 845 | |
---|
| 846 | CASE ( 'w' ) |
---|
[667] | 847 | DO i = nxlg, nxrg |
---|
| 848 | DO j = nysg, nyng |
---|
[1] | 849 | DO k = nzb, nzt+1 |
---|
| 850 | w_av(k,j,i) = w_av(k,j,i) + w(k,j,i) |
---|
| 851 | ENDDO |
---|
| 852 | ENDDO |
---|
| 853 | ENDDO |
---|
| 854 | |
---|
[72] | 855 | CASE ( 'z0*' ) |
---|
[667] | 856 | DO i = nxlg, nxrg |
---|
| 857 | DO j = nysg, nyng |
---|
[72] | 858 | z0_av(j,i) = z0_av(j,i) + z0(j,i) |
---|
| 859 | ENDDO |
---|
| 860 | ENDDO |
---|
| 861 | |
---|
[978] | 862 | CASE ( 'z0h*' ) |
---|
| 863 | DO i = nxlg, nxrg |
---|
| 864 | DO j = nysg, nyng |
---|
| 865 | z0h_av(j,i) = z0h_av(j,i) + z0h(j,i) |
---|
| 866 | ENDDO |
---|
| 867 | ENDDO |
---|
| 868 | |
---|
[1] | 869 | CASE DEFAULT |
---|
| 870 | ! |
---|
| 871 | !-- User-defined quantity |
---|
| 872 | CALL user_3d_data_averaging( 'sum', doav(ii) ) |
---|
| 873 | |
---|
| 874 | END SELECT |
---|
| 875 | |
---|
| 876 | ENDDO |
---|
| 877 | |
---|
[1318] | 878 | CALL cpu_log( log_point(34), 'sum_up_3d_data', 'stop' ) |
---|
[1] | 879 | |
---|
| 880 | |
---|
| 881 | END SUBROUTINE sum_up_3d_data |
---|