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