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