[1] | 1 | SUBROUTINE sum_up_3d_data |
---|
| 2 | |
---|
| 3 | !------------------------------------------------------------------------------! |
---|
[484] | 4 | ! Current revisions: |
---|
[1] | 5 | ! ----------------- |
---|
[791] | 6 | ! |
---|
[1] | 7 | ! |
---|
| 8 | ! Former revisions: |
---|
| 9 | ! ----------------- |
---|
[3] | 10 | ! $Id: sum_up_3d_data.f90 791 2011-11-29 03:33:42Z gryschka $ |
---|
[77] | 11 | ! |
---|
[791] | 12 | ! 790 2011-11-29 03:11:20Z raasch |
---|
| 13 | ! bugfix: calculation of 'pr' must depend on the particle weighting factor |
---|
| 14 | ! |
---|
[772] | 15 | ! 771 2011-10-27 10:56:21Z heinze |
---|
| 16 | ! +lpt_av |
---|
| 17 | ! |
---|
[668] | 18 | ! 667 2010-12-23 12:06:00Z suehring/gryschka |
---|
| 19 | ! nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng |
---|
| 20 | ! |
---|
[482] | 21 | ! 402 2009-10-21 11:59:41Z maronga |
---|
| 22 | ! Bugfix in calculation of shf*_av, qsws*_av |
---|
| 23 | ! |
---|
[392] | 24 | ! 2009-08-25 08:35:52Z maronga |
---|
| 25 | ! +shf*, qsws* |
---|
| 26 | ! |
---|
[98] | 27 | ! 96 2007-06-04 08:07:41Z raasch |
---|
| 28 | ! +sum-up of density and salinity |
---|
| 29 | ! |
---|
[77] | 30 | ! 72 2007-03-19 08:20:46Z raasch |
---|
| 31 | ! +sum-up of precipitation rate and roughness length (prr*, z0*) |
---|
| 32 | ! |
---|
[3] | 33 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
| 34 | ! |
---|
[1] | 35 | ! Revision 1.1 2006/02/23 12:55:23 raasch |
---|
| 36 | ! Initial revision |
---|
| 37 | ! |
---|
| 38 | ! |
---|
| 39 | ! Description: |
---|
| 40 | ! ------------ |
---|
| 41 | ! Sum-up the values of 3d-arrays. The real averaging is later done in routine |
---|
| 42 | ! average_3d_data. |
---|
| 43 | !------------------------------------------------------------------------------! |
---|
| 44 | |
---|
| 45 | USE arrays_3d |
---|
| 46 | USE averaging |
---|
| 47 | USE cloud_parameters |
---|
| 48 | USE control_parameters |
---|
| 49 | USE cpulog |
---|
| 50 | USE indices |
---|
| 51 | USE interfaces |
---|
| 52 | USE particle_attributes |
---|
| 53 | |
---|
| 54 | IMPLICIT NONE |
---|
| 55 | |
---|
| 56 | INTEGER :: i, ii, j, k, n, psi |
---|
| 57 | |
---|
| 58 | REAL :: mean_r, s_r3, s_r4 |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | CALL cpu_log (log_point(34),'sum_up_3d_data','start') |
---|
| 62 | |
---|
| 63 | ! |
---|
| 64 | !-- Allocate and initialize the summation arrays if called for the very first |
---|
| 65 | !-- time or the first time after average_3d_data has been called |
---|
| 66 | !-- (some or all of the arrays may have been already allocated |
---|
| 67 | !-- in read_3d_binary) |
---|
| 68 | IF ( average_count_3d == 0 ) THEN |
---|
| 69 | |
---|
| 70 | DO ii = 1, doav_n |
---|
| 71 | |
---|
| 72 | SELECT CASE ( TRIM( doav(ii) ) ) |
---|
| 73 | |
---|
| 74 | CASE ( 'e' ) |
---|
| 75 | IF ( .NOT. ALLOCATED( e_av ) ) THEN |
---|
[667] | 76 | ALLOCATE( e_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 77 | ENDIF |
---|
| 78 | e_av = 0.0 |
---|
| 79 | |
---|
[771] | 80 | CASE ( 'lpt' ) |
---|
| 81 | IF ( .NOT. ALLOCATED( lpt_av ) ) THEN |
---|
| 82 | ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 83 | ENDIF |
---|
| 84 | lpt_av = 0.0 |
---|
| 85 | |
---|
[1] | 86 | CASE ( 'lwp*' ) |
---|
| 87 | IF ( .NOT. ALLOCATED( lwp_av ) ) THEN |
---|
[667] | 88 | ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 89 | ENDIF |
---|
| 90 | lwp_av = 0.0 |
---|
| 91 | |
---|
| 92 | CASE ( 'p' ) |
---|
| 93 | IF ( .NOT. ALLOCATED( p_av ) ) THEN |
---|
[667] | 94 | ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 95 | ENDIF |
---|
| 96 | p_av = 0.0 |
---|
| 97 | |
---|
| 98 | CASE ( 'pc' ) |
---|
| 99 | IF ( .NOT. ALLOCATED( pc_av ) ) THEN |
---|
[667] | 100 | ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 101 | ENDIF |
---|
| 102 | pc_av = 0.0 |
---|
| 103 | |
---|
| 104 | CASE ( 'pr' ) |
---|
| 105 | IF ( .NOT. ALLOCATED( pr_av ) ) THEN |
---|
[667] | 106 | ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 107 | ENDIF |
---|
| 108 | pr_av = 0.0 |
---|
| 109 | |
---|
[72] | 110 | CASE ( 'prr*' ) |
---|
| 111 | IF ( .NOT. ALLOCATED( precipitation_rate_av ) ) THEN |
---|
[667] | 112 | ALLOCATE( precipitation_rate_av(nysg:nyng,nxlg:nxrg) ) |
---|
[72] | 113 | ENDIF |
---|
| 114 | precipitation_rate_av = 0.0 |
---|
| 115 | |
---|
[1] | 116 | CASE ( 'pt' ) |
---|
| 117 | IF ( .NOT. ALLOCATED( pt_av ) ) THEN |
---|
[667] | 118 | ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 119 | ENDIF |
---|
| 120 | pt_av = 0.0 |
---|
| 121 | |
---|
| 122 | CASE ( 'q' ) |
---|
| 123 | IF ( .NOT. ALLOCATED( q_av ) ) THEN |
---|
[667] | 124 | ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 125 | ENDIF |
---|
| 126 | q_av = 0.0 |
---|
| 127 | |
---|
| 128 | CASE ( 'ql' ) |
---|
| 129 | IF ( .NOT. ALLOCATED( ql_av ) ) THEN |
---|
[667] | 130 | ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 131 | ENDIF |
---|
| 132 | ql_av = 0.0 |
---|
| 133 | |
---|
| 134 | CASE ( 'ql_c' ) |
---|
| 135 | IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN |
---|
[667] | 136 | ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 137 | ENDIF |
---|
| 138 | ql_c_av = 0.0 |
---|
| 139 | |
---|
| 140 | CASE ( 'ql_v' ) |
---|
| 141 | IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN |
---|
[667] | 142 | ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 143 | ENDIF |
---|
| 144 | ql_v_av = 0.0 |
---|
| 145 | |
---|
| 146 | CASE ( 'ql_vp' ) |
---|
| 147 | IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN |
---|
[667] | 148 | ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 149 | ENDIF |
---|
| 150 | ql_vp_av = 0.0 |
---|
| 151 | |
---|
[354] | 152 | CASE ( 'qsws*' ) |
---|
| 153 | IF ( .NOT. ALLOCATED( qsws_av ) ) THEN |
---|
[667] | 154 | ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 155 | ENDIF |
---|
| 156 | qsws_av = 0.0 |
---|
| 157 | |
---|
[1] | 158 | CASE ( 'qv' ) |
---|
| 159 | IF ( .NOT. ALLOCATED( qv_av ) ) THEN |
---|
[667] | 160 | ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 161 | ENDIF |
---|
| 162 | qv_av = 0.0 |
---|
| 163 | |
---|
[96] | 164 | CASE ( 'rho' ) |
---|
| 165 | IF ( .NOT. ALLOCATED( rho_av ) ) THEN |
---|
[667] | 166 | ALLOCATE( rho_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[96] | 167 | ENDIF |
---|
| 168 | rho_av = 0.0 |
---|
| 169 | |
---|
[1] | 170 | CASE ( 's' ) |
---|
| 171 | IF ( .NOT. ALLOCATED( s_av ) ) THEN |
---|
[667] | 172 | ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 173 | ENDIF |
---|
| 174 | s_av = 0.0 |
---|
| 175 | |
---|
[96] | 176 | CASE ( 'sa' ) |
---|
| 177 | IF ( .NOT. ALLOCATED( sa_av ) ) THEN |
---|
[667] | 178 | ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[96] | 179 | ENDIF |
---|
| 180 | sa_av = 0.0 |
---|
| 181 | |
---|
[354] | 182 | CASE ( 'shf*' ) |
---|
| 183 | IF ( .NOT. ALLOCATED( shf_av ) ) THEN |
---|
[667] | 184 | ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 185 | ENDIF |
---|
| 186 | shf_av = 0.0 |
---|
| 187 | |
---|
[1] | 188 | CASE ( 't*' ) |
---|
| 189 | IF ( .NOT. ALLOCATED( ts_av ) ) THEN |
---|
[667] | 190 | ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 191 | ENDIF |
---|
| 192 | ts_av = 0.0 |
---|
| 193 | |
---|
| 194 | CASE ( 'u' ) |
---|
| 195 | IF ( .NOT. ALLOCATED( u_av ) ) THEN |
---|
[667] | 196 | ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 197 | ENDIF |
---|
| 198 | u_av = 0.0 |
---|
| 199 | |
---|
| 200 | CASE ( 'u*' ) |
---|
| 201 | IF ( .NOT. ALLOCATED( us_av ) ) THEN |
---|
[667] | 202 | ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 203 | ENDIF |
---|
| 204 | us_av = 0.0 |
---|
| 205 | |
---|
| 206 | CASE ( 'v' ) |
---|
| 207 | IF ( .NOT. ALLOCATED( v_av ) ) THEN |
---|
[667] | 208 | ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 209 | ENDIF |
---|
| 210 | v_av = 0.0 |
---|
| 211 | |
---|
| 212 | CASE ( 'vpt' ) |
---|
| 213 | IF ( .NOT. ALLOCATED( vpt_av ) ) THEN |
---|
[667] | 214 | ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 215 | ENDIF |
---|
| 216 | vpt_av = 0.0 |
---|
| 217 | |
---|
| 218 | CASE ( 'w' ) |
---|
| 219 | IF ( .NOT. ALLOCATED( w_av ) ) THEN |
---|
[667] | 220 | ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 221 | ENDIF |
---|
| 222 | w_av = 0.0 |
---|
| 223 | |
---|
[72] | 224 | CASE ( 'z0*' ) |
---|
| 225 | IF ( .NOT. ALLOCATED( z0_av ) ) THEN |
---|
[667] | 226 | ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) ) |
---|
[72] | 227 | ENDIF |
---|
| 228 | z0_av = 0.0 |
---|
| 229 | |
---|
[1] | 230 | CASE DEFAULT |
---|
| 231 | ! |
---|
| 232 | !-- User-defined quantity |
---|
| 233 | CALL user_3d_data_averaging( 'allocate', doav(ii) ) |
---|
| 234 | |
---|
| 235 | END SELECT |
---|
| 236 | |
---|
| 237 | ENDDO |
---|
| 238 | |
---|
| 239 | ENDIF |
---|
| 240 | |
---|
| 241 | ! |
---|
| 242 | !-- Loop of all variables to be averaged. |
---|
| 243 | DO ii = 1, doav_n |
---|
| 244 | |
---|
| 245 | ! |
---|
| 246 | !-- Store the array chosen on the temporary array. |
---|
| 247 | SELECT CASE ( TRIM( doav(ii) ) ) |
---|
| 248 | |
---|
| 249 | CASE ( 'e' ) |
---|
[667] | 250 | DO i = nxlg, nxrg |
---|
| 251 | DO j = nysg, nyng |
---|
[1] | 252 | DO k = nzb, nzt+1 |
---|
| 253 | e_av(k,j,i) = e_av(k,j,i) + e(k,j,i) |
---|
| 254 | ENDDO |
---|
| 255 | ENDDO |
---|
| 256 | ENDDO |
---|
| 257 | |
---|
[771] | 258 | CASE ( 'lpt' ) |
---|
| 259 | DO i = nxlg, nxrg |
---|
| 260 | DO j = nysg, nyng |
---|
| 261 | DO k = nzb, nzt+1 |
---|
| 262 | lpt_av(k,j,i) = lpt_av(k,j,i) + pt(k,j,i) |
---|
| 263 | ENDDO |
---|
| 264 | ENDDO |
---|
| 265 | ENDDO |
---|
| 266 | |
---|
[1] | 267 | CASE ( 'lwp*' ) |
---|
[667] | 268 | DO i = nxlg, nxrg |
---|
| 269 | DO j = nysg, nyng |
---|
[1] | 270 | lwp_av(j,i) = lwp_av(j,i) + SUM( ql(nzb:nzt,j,i) * & |
---|
| 271 | dzw(1:nzt+1) ) |
---|
| 272 | ENDDO |
---|
| 273 | ENDDO |
---|
| 274 | |
---|
| 275 | CASE ( 'p' ) |
---|
[667] | 276 | DO i = nxlg, nxrg |
---|
| 277 | DO j = nysg, nyng |
---|
[1] | 278 | DO k = nzb, nzt+1 |
---|
| 279 | p_av(k,j,i) = p_av(k,j,i) + p(k,j,i) |
---|
| 280 | ENDDO |
---|
| 281 | ENDDO |
---|
| 282 | ENDDO |
---|
| 283 | |
---|
| 284 | CASE ( 'pc' ) |
---|
| 285 | DO i = nxl, nxr |
---|
| 286 | DO j = nys, nyn |
---|
| 287 | DO k = nzb, nzt+1 |
---|
| 288 | pc_av(k,j,i) = pc_av(k,j,i) + prt_count(k,j,i) |
---|
| 289 | ENDDO |
---|
| 290 | ENDDO |
---|
| 291 | ENDDO |
---|
| 292 | |
---|
| 293 | CASE ( 'pr' ) |
---|
| 294 | DO i = nxl, nxr |
---|
| 295 | DO j = nys, nyn |
---|
| 296 | DO k = nzb, nzt+1 |
---|
| 297 | psi = prt_start_index(k,j,i) |
---|
| 298 | s_r3 = 0.0 |
---|
| 299 | s_r4 = 0.0 |
---|
| 300 | DO n = psi, psi+prt_count(k,j,i)-1 |
---|
[790] | 301 | s_r3 = s_r3 + particles(n)%radius**3 * & |
---|
| 302 | particles(n)%weight_factor |
---|
| 303 | s_r4 = s_r4 + particles(n)%radius**4 * & |
---|
| 304 | particles(n)%weight_factor |
---|
[1] | 305 | ENDDO |
---|
| 306 | IF ( s_r3 /= 0.0 ) THEN |
---|
| 307 | mean_r = s_r4 / s_r3 |
---|
| 308 | ELSE |
---|
| 309 | mean_r = 0.0 |
---|
| 310 | ENDIF |
---|
| 311 | pr_av(k,j,i) = pr_av(k,j,i) + mean_r |
---|
| 312 | ENDDO |
---|
| 313 | ENDDO |
---|
| 314 | ENDDO |
---|
| 315 | |
---|
[72] | 316 | CASE ( 'pr*' ) |
---|
[667] | 317 | DO i = nxlg, nxrg |
---|
| 318 | DO j = nysg, nyng |
---|
[72] | 319 | precipitation_rate_av(j,i) = precipitation_rate_av(j,i) + & |
---|
| 320 | precipitation_rate(j,i) |
---|
| 321 | ENDDO |
---|
| 322 | ENDDO |
---|
| 323 | |
---|
[1] | 324 | CASE ( 'pt' ) |
---|
| 325 | IF ( .NOT. cloud_physics ) THEN |
---|
[667] | 326 | DO i = nxlg, nxrg |
---|
| 327 | DO j = nysg, nyng |
---|
| 328 | DO k = nzb, nzt+1 |
---|
[1] | 329 | pt_av(k,j,i) = pt_av(k,j,i) + pt(k,j,i) |
---|
| 330 | ENDDO |
---|
| 331 | ENDDO |
---|
| 332 | ENDDO |
---|
| 333 | ELSE |
---|
[667] | 334 | DO i = nxlg, nxrg |
---|
| 335 | DO j = nysg, nyng |
---|
| 336 | DO k = nzb, nzt+1 |
---|
[1] | 337 | pt_av(k,j,i) = pt_av(k,j,i) + pt(k,j,i) + l_d_cp * & |
---|
| 338 | pt_d_t(k) * ql(k,j,i) |
---|
| 339 | ENDDO |
---|
| 340 | ENDDO |
---|
| 341 | ENDDO |
---|
| 342 | ENDIF |
---|
| 343 | |
---|
| 344 | CASE ( 'q' ) |
---|
[667] | 345 | DO i = nxlg, nxrg |
---|
| 346 | DO j = nysg, nyng |
---|
[1] | 347 | DO k = nzb, nzt+1 |
---|
| 348 | q_av(k,j,i) = q_av(k,j,i) + q(k,j,i) |
---|
| 349 | ENDDO |
---|
| 350 | ENDDO |
---|
| 351 | ENDDO |
---|
[402] | 352 | |
---|
[1] | 353 | CASE ( 'ql' ) |
---|
[667] | 354 | DO i = nxlg, nxrg |
---|
| 355 | DO j = nysg, nyng |
---|
[1] | 356 | DO k = nzb, nzt+1 |
---|
| 357 | ql_av(k,j,i) = ql_av(k,j,i) + ql(k,j,i) |
---|
| 358 | ENDDO |
---|
| 359 | ENDDO |
---|
| 360 | ENDDO |
---|
| 361 | |
---|
| 362 | CASE ( 'ql_c' ) |
---|
[667] | 363 | DO i = nxlg, nxrg |
---|
| 364 | DO j = nysg, nyng |
---|
[1] | 365 | DO k = nzb, nzt+1 |
---|
| 366 | ql_c_av(k,j,i) = ql_c_av(k,j,i) + ql_c(k,j,i) |
---|
| 367 | ENDDO |
---|
| 368 | ENDDO |
---|
| 369 | ENDDO |
---|
| 370 | |
---|
| 371 | CASE ( 'ql_v' ) |
---|
[667] | 372 | DO i = nxlg, nxrg |
---|
| 373 | DO j = nysg, nyng |
---|
[1] | 374 | DO k = nzb, nzt+1 |
---|
| 375 | ql_v_av(k,j,i) = ql_v_av(k,j,i) + ql_v(k,j,i) |
---|
| 376 | ENDDO |
---|
| 377 | ENDDO |
---|
| 378 | ENDDO |
---|
| 379 | |
---|
| 380 | CASE ( 'ql_vp' ) |
---|
[667] | 381 | DO i = nxlg, nxrg |
---|
| 382 | DO j = nysg, nyng |
---|
[1] | 383 | DO k = nzb, nzt+1 |
---|
| 384 | ql_vp_av(k,j,i) = ql_vp_av(k,j,i) + ql_vp(k,j,i) |
---|
| 385 | ENDDO |
---|
| 386 | ENDDO |
---|
| 387 | ENDDO |
---|
| 388 | |
---|
[402] | 389 | CASE ( 'qsws*' ) |
---|
[667] | 390 | DO i = nxlg, nxrg |
---|
| 391 | DO j = nysg, nyng |
---|
[402] | 392 | qsws_av(j,i) = qsws_av(j,i) + qsws(j,i) |
---|
| 393 | ENDDO |
---|
| 394 | ENDDO |
---|
| 395 | |
---|
[1] | 396 | CASE ( 'qv' ) |
---|
[667] | 397 | DO i = nxlg, nxrg |
---|
| 398 | DO j = nysg, nyng |
---|
[1] | 399 | DO k = nzb, nzt+1 |
---|
| 400 | qv_av(k,j,i) = qv_av(k,j,i) + q(k,j,i) - ql(k,j,i) |
---|
| 401 | ENDDO |
---|
| 402 | ENDDO |
---|
| 403 | ENDDO |
---|
| 404 | |
---|
[96] | 405 | CASE ( 'rho' ) |
---|
[667] | 406 | DO i = nxlg, nxrg |
---|
| 407 | DO j = nysg, nyng |
---|
[96] | 408 | DO k = nzb, nzt+1 |
---|
| 409 | rho_av(k,j,i) = rho_av(k,j,i) + rho(k,j,i) |
---|
| 410 | ENDDO |
---|
| 411 | ENDDO |
---|
| 412 | ENDDO |
---|
[402] | 413 | |
---|
[1] | 414 | CASE ( 's' ) |
---|
[667] | 415 | DO i = nxlg, nxrg |
---|
| 416 | DO j = nysg, nyng |
---|
[1] | 417 | DO k = nzb, nzt+1 |
---|
| 418 | s_av(k,j,i) = s_av(k,j,i) + q(k,j,i) |
---|
| 419 | ENDDO |
---|
| 420 | ENDDO |
---|
| 421 | ENDDO |
---|
[402] | 422 | |
---|
[96] | 423 | CASE ( 'sa' ) |
---|
[667] | 424 | DO i = nxlg, nxrg |
---|
| 425 | DO j = nysg, nyng |
---|
[96] | 426 | DO k = nzb, nzt+1 |
---|
| 427 | sa_av(k,j,i) = sa_av(k,j,i) + sa(k,j,i) |
---|
| 428 | ENDDO |
---|
| 429 | ENDDO |
---|
| 430 | ENDDO |
---|
[402] | 431 | |
---|
| 432 | CASE ( 'shf*' ) |
---|
[667] | 433 | DO i = nxlg, nxrg |
---|
| 434 | DO j = nysg, nyng |
---|
[402] | 435 | shf_av(j,i) = shf_av(j,i) + shf(j,i) |
---|
| 436 | ENDDO |
---|
| 437 | ENDDO |
---|
| 438 | |
---|
[1] | 439 | CASE ( 't*' ) |
---|
[667] | 440 | DO i = nxlg, nxrg |
---|
| 441 | DO j = nysg, nyng |
---|
[1] | 442 | ts_av(j,i) = ts_av(j,i) + ts(j,i) |
---|
| 443 | ENDDO |
---|
| 444 | ENDDO |
---|
| 445 | |
---|
| 446 | CASE ( 'u' ) |
---|
[667] | 447 | DO i = nxlg, nxrg |
---|
| 448 | DO j = nysg, nyng |
---|
[1] | 449 | DO k = nzb, nzt+1 |
---|
| 450 | u_av(k,j,i) = u_av(k,j,i) + u(k,j,i) |
---|
| 451 | ENDDO |
---|
| 452 | ENDDO |
---|
| 453 | ENDDO |
---|
| 454 | |
---|
| 455 | CASE ( 'u*' ) |
---|
[667] | 456 | DO i = nxlg, nxrg |
---|
| 457 | DO j = nysg, nyng |
---|
[1] | 458 | us_av(j,i) = us_av(j,i) + us(j,i) |
---|
| 459 | ENDDO |
---|
| 460 | ENDDO |
---|
| 461 | |
---|
| 462 | CASE ( 'v' ) |
---|
[667] | 463 | DO i = nxlg, nxrg |
---|
| 464 | DO j = nysg, nyng |
---|
[1] | 465 | DO k = nzb, nzt+1 |
---|
| 466 | v_av(k,j,i) = v_av(k,j,i) + v(k,j,i) |
---|
| 467 | ENDDO |
---|
| 468 | ENDDO |
---|
| 469 | ENDDO |
---|
| 470 | |
---|
| 471 | CASE ( 'vpt' ) |
---|
[667] | 472 | DO i = nxlg, nxrg |
---|
| 473 | DO j = nysg, nyng |
---|
[1] | 474 | DO k = nzb, nzt+1 |
---|
| 475 | vpt_av(k,j,i) = vpt_av(k,j,i) + vpt(k,j,i) |
---|
| 476 | ENDDO |
---|
| 477 | ENDDO |
---|
| 478 | ENDDO |
---|
| 479 | |
---|
| 480 | CASE ( 'w' ) |
---|
[667] | 481 | DO i = nxlg, nxrg |
---|
| 482 | DO j = nysg, nyng |
---|
[1] | 483 | DO k = nzb, nzt+1 |
---|
| 484 | w_av(k,j,i) = w_av(k,j,i) + w(k,j,i) |
---|
| 485 | ENDDO |
---|
| 486 | ENDDO |
---|
| 487 | ENDDO |
---|
| 488 | |
---|
[72] | 489 | CASE ( 'z0*' ) |
---|
[667] | 490 | DO i = nxlg, nxrg |
---|
| 491 | DO j = nysg, nyng |
---|
[72] | 492 | z0_av(j,i) = z0_av(j,i) + z0(j,i) |
---|
| 493 | ENDDO |
---|
| 494 | ENDDO |
---|
| 495 | |
---|
[1] | 496 | CASE DEFAULT |
---|
| 497 | ! |
---|
| 498 | !-- User-defined quantity |
---|
| 499 | CALL user_3d_data_averaging( 'sum', doav(ii) ) |
---|
| 500 | |
---|
| 501 | END SELECT |
---|
| 502 | |
---|
| 503 | ENDDO |
---|
| 504 | |
---|
| 505 | CALL cpu_log (log_point(34),'sum_up_3d_data','stop','nobarrier') |
---|
| 506 | |
---|
| 507 | |
---|
| 508 | END SUBROUTINE sum_up_3d_data |
---|