[1682] | 1 | !> @file average_3d_data.f90 |
---|
[4509] | 2 | !--------------------------------------------------------------------------------------------------! |
---|
[2696] | 3 | ! This file is part of the PALM model system. |
---|
[1036] | 4 | ! |
---|
[4509] | 5 | ! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General |
---|
| 6 | ! Public License as published by the Free Software Foundation, either version 3 of the License, or |
---|
| 7 | ! (at your option) any later version. |
---|
[1036] | 8 | ! |
---|
[4509] | 9 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the |
---|
| 10 | ! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
---|
| 11 | ! Public License for more details. |
---|
[1036] | 12 | ! |
---|
[4509] | 13 | ! You should have received a copy of the GNU General Public License along with PALM. If not, see |
---|
| 14 | ! <http://www.gnu.org/licenses/>. |
---|
[1036] | 15 | ! |
---|
[4360] | 16 | ! Copyright 1997-2020 Leibniz Universitaet Hannover |
---|
[4509] | 17 | !--------------------------------------------------------------------------------------------------! |
---|
[1036] | 18 | ! |
---|
[484] | 19 | ! Current revisions: |
---|
[1] | 20 | ! ----------------- |
---|
[3589] | 21 | ! |
---|
| 22 | ! |
---|
| 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
| 25 | ! $Id: average_3d_data.f90 4509 2020-04-26 15:57:55Z monakurppa $ |
---|
[4509] | 26 | ! file re-formatted to follow the PALM coding standard |
---|
| 27 | ! |
---|
| 28 | ! 4457 2020-03-11 14:20:43Z raasch |
---|
[4457] | 29 | ! use statement for exchange horiz added, |
---|
| 30 | ! bugfix for call of exchange horiz 2d |
---|
| 31 | ! |
---|
| 32 | ! 4360 2020-01-07 11:25:50Z suehring |
---|
[4331] | 33 | ! Move 2-m potential temperature output to diagnostic_output_quantities |
---|
| 34 | ! |
---|
| 35 | ! 4182 2019-08-22 15:20:23Z scharf |
---|
[4182] | 36 | ! Corrected "Former revisions" section |
---|
| 37 | ! |
---|
| 38 | ! 4048 2019-06-21 21:00:21Z knoop |
---|
[4048] | 39 | ! Moved tcm_3d_data_averaging to module_interface |
---|
| 40 | ! |
---|
| 41 | ! 4039 2019-06-18 10:32:41Z suehring |
---|
[4039] | 42 | ! Modularize diagnostic output |
---|
| 43 | ! |
---|
| 44 | ! 3994 2019-05-22 18:08:09Z suehring |
---|
[3994] | 45 | ! output of turbulence intensity added |
---|
| 46 | ! |
---|
| 47 | ! 3933 2019-04-25 12:33:20Z kanani |
---|
[3933] | 48 | ! Bugfix in CASE theta_2m*, removal of redundant code |
---|
| 49 | ! |
---|
| 50 | ! 3773 2019-03-01 08:56:57Z maronga |
---|
[3773] | 51 | ! Added output of theta_2m*_xy_av |
---|
| 52 | ! |
---|
| 53 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
[3637] | 54 | ! Implementation of the PALM module interface |
---|
[3582] | 55 | ! |
---|
[4182] | 56 | ! Revision 1.1 2006/02/23 09:48:58 raasch |
---|
| 57 | ! Initial revision |
---|
| 58 | ! |
---|
| 59 | ! |
---|
[1] | 60 | ! Description: |
---|
| 61 | ! ------------ |
---|
[1682] | 62 | !> Time-averaging of 3d-data-arrays. |
---|
[4509] | 63 | !--------------------------------------------------------------------------------------------------! |
---|
[1682] | 64 | SUBROUTINE average_3d_data |
---|
| 65 | |
---|
[1] | 66 | |
---|
| 67 | USE averaging |
---|
| 68 | |
---|
[4509] | 69 | USE control_parameters, & |
---|
[3637] | 70 | ONLY: average_count_3d, doav, doav_n, varnamelength |
---|
[1320] | 71 | |
---|
[4509] | 72 | USE cpulog, & |
---|
[1320] | 73 | ONLY: cpu_log, log_point |
---|
| 74 | |
---|
[4509] | 75 | USE exchange_horiz_mod, & |
---|
[4457] | 76 | ONLY: exchange_horiz_2d |
---|
| 77 | |
---|
[4509] | 78 | USE indices, & |
---|
[4457] | 79 | ONLY: nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt |
---|
[1320] | 80 | |
---|
| 81 | USE kinds |
---|
| 82 | |
---|
[4509] | 83 | USE module_interface, & |
---|
[3637] | 84 | ONLY: module_interface_3d_data_averaging |
---|
[1320] | 85 | |
---|
[2696] | 86 | |
---|
[1691] | 87 | |
---|
[2007] | 88 | |
---|
[1] | 89 | IMPLICIT NONE |
---|
| 90 | |
---|
[3294] | 91 | INTEGER(iwp) :: i !< loop index |
---|
| 92 | INTEGER(iwp) :: ii !< loop index |
---|
| 93 | INTEGER(iwp) :: j !< loop index |
---|
| 94 | INTEGER(iwp) :: k !< loop index |
---|
[1] | 95 | |
---|
[2011] | 96 | CHARACTER (LEN=varnamelength) :: trimvar !< TRIM of output-variable string |
---|
[1] | 97 | |
---|
[2007] | 98 | |
---|
[1] | 99 | CALL cpu_log (log_point(35),'average_3d_data','start') |
---|
| 100 | |
---|
| 101 | ! |
---|
| 102 | !-- Check, if averaging is necessary |
---|
| 103 | IF ( average_count_3d <= 1 ) RETURN |
---|
| 104 | |
---|
| 105 | ! |
---|
| 106 | !-- Loop of all variables to be averaged. |
---|
| 107 | DO ii = 1, doav_n |
---|
| 108 | |
---|
[2007] | 109 | trimvar = TRIM( doav(ii) ) |
---|
| 110 | |
---|
| 111 | ! |
---|
[1] | 112 | !-- Store the array chosen on the temporary array. |
---|
[2007] | 113 | SELECT CASE ( trimvar ) |
---|
[1] | 114 | |
---|
| 115 | CASE ( 'e' ) |
---|
[4509] | 116 | IF ( ALLOCATED( e_av ) ) THEN |
---|
[3004] | 117 | DO i = nxlg, nxrg |
---|
| 118 | DO j = nysg, nyng |
---|
| 119 | DO k = nzb, nzt+1 |
---|
| 120 | e_av(k,j,i) = e_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 121 | ENDDO |
---|
[1] | 122 | ENDDO |
---|
| 123 | ENDDO |
---|
[3004] | 124 | ENDIF |
---|
[1] | 125 | |
---|
[2797] | 126 | CASE ( 'ghf*' ) |
---|
[4509] | 127 | IF ( ALLOCATED( ghf_av ) ) THEN |
---|
[3004] | 128 | DO i = nxl, nxr |
---|
| 129 | DO j = nys, nyn |
---|
[4509] | 130 | ghf_av(j,i) = ghf_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[3004] | 131 | ENDDO |
---|
[2797] | 132 | ENDDO |
---|
[4457] | 133 | CALL exchange_horiz_2d( ghf_av ) |
---|
[3004] | 134 | ENDIF |
---|
[2797] | 135 | |
---|
[354] | 136 | CASE ( 'qsws*' ) |
---|
[4509] | 137 | IF ( ALLOCATED( qsws_av ) ) THEN |
---|
[3004] | 138 | DO i = nxlg, nxrg |
---|
| 139 | DO j = nysg, nyng |
---|
| 140 | qsws_av(j,i) = qsws_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 141 | ENDDO |
---|
[354] | 142 | ENDDO |
---|
[4457] | 143 | CALL exchange_horiz_2d( qsws_av ) |
---|
[3004] | 144 | ENDIF |
---|
[354] | 145 | |
---|
[3421] | 146 | CASE ( 'thetal' ) |
---|
[4509] | 147 | IF ( ALLOCATED( lpt_av ) ) THEN |
---|
[3004] | 148 | DO i = nxlg, nxrg |
---|
| 149 | DO j = nysg, nyng |
---|
| 150 | DO k = nzb, nzt+1 |
---|
| 151 | lpt_av(k,j,i) = lpt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 152 | ENDDO |
---|
[771] | 153 | ENDDO |
---|
| 154 | ENDDO |
---|
[3004] | 155 | ENDIF |
---|
[771] | 156 | |
---|
[1] | 157 | CASE ( 'lwp*' ) |
---|
[4509] | 158 | IF ( ALLOCATED( lwp_av ) ) THEN |
---|
[3004] | 159 | DO i = nxlg, nxrg |
---|
| 160 | DO j = nysg, nyng |
---|
| 161 | lwp_av(j,i) = lwp_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 162 | ENDDO |
---|
[1] | 163 | ENDDO |
---|
[3004] | 164 | ENDIF |
---|
[1] | 165 | |
---|
[1691] | 166 | CASE ( 'ol*' ) |
---|
[4509] | 167 | IF ( ALLOCATED( ol_av ) ) THEN |
---|
[3004] | 168 | DO i = nxlg, nxrg |
---|
| 169 | DO j = nysg, nyng |
---|
| 170 | ol_av(j,i) = ol_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 171 | ENDDO |
---|
[1691] | 172 | ENDDO |
---|
[4457] | 173 | CALL exchange_horiz_2d( ol_av ) |
---|
[3004] | 174 | ENDIF |
---|
[1691] | 175 | |
---|
[1] | 176 | CASE ( 'p' ) |
---|
[4509] | 177 | IF ( ALLOCATED( p_av ) ) THEN |
---|
[3004] | 178 | DO i = nxlg, nxrg |
---|
| 179 | DO j = nysg, nyng |
---|
| 180 | DO k = nzb, nzt+1 |
---|
| 181 | p_av(k,j,i) = p_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 182 | ENDDO |
---|
[1] | 183 | ENDDO |
---|
| 184 | ENDDO |
---|
[3004] | 185 | ENDIF |
---|
[1] | 186 | |
---|
| 187 | CASE ( 'pc' ) |
---|
[4509] | 188 | IF ( ALLOCATED( pc_av ) ) THEN |
---|
[3004] | 189 | DO i = nxl, nxr |
---|
| 190 | DO j = nys, nyn |
---|
| 191 | DO k = nzb, nzt+1 |
---|
| 192 | pc_av(k,j,i) = pc_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 193 | ENDDO |
---|
[1] | 194 | ENDDO |
---|
| 195 | ENDDO |
---|
[3004] | 196 | ENDIF |
---|
[1] | 197 | |
---|
| 198 | CASE ( 'pr' ) |
---|
[4509] | 199 | IF ( ALLOCATED( pr_av ) ) THEN |
---|
[3004] | 200 | DO i = nxl, nxr |
---|
| 201 | DO j = nys, nyn |
---|
| 202 | DO k = nzb, nzt+1 |
---|
| 203 | pr_av(k,j,i) = pr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 204 | ENDDO |
---|
[1] | 205 | ENDDO |
---|
| 206 | ENDDO |
---|
[3004] | 207 | ENDIF |
---|
[1] | 208 | |
---|
[3421] | 209 | CASE ( 'theta' ) |
---|
[4509] | 210 | IF ( ALLOCATED( pt_av ) ) THEN |
---|
[3004] | 211 | DO i = nxlg, nxrg |
---|
| 212 | DO j = nysg, nyng |
---|
| 213 | DO k = nzb, nzt+1 |
---|
| 214 | pt_av(k,j,i) = pt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 215 | ENDDO |
---|
[1] | 216 | ENDDO |
---|
| 217 | ENDDO |
---|
[3004] | 218 | ENDIF |
---|
[1] | 219 | |
---|
| 220 | CASE ( 'q' ) |
---|
[4509] | 221 | IF ( ALLOCATED( q_av ) ) THEN |
---|
[3004] | 222 | DO i = nxlg, nxrg |
---|
| 223 | DO j = nysg, nyng |
---|
| 224 | DO k = nzb, nzt+1 |
---|
| 225 | q_av(k,j,i) = q_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 226 | ENDDO |
---|
[1] | 227 | ENDDO |
---|
| 228 | ENDDO |
---|
[3004] | 229 | ENDIF |
---|
[367] | 230 | |
---|
[1] | 231 | CASE ( 'ql' ) |
---|
[4509] | 232 | IF ( ALLOCATED( ql_av ) ) THEN |
---|
[3004] | 233 | DO i = nxlg, nxrg |
---|
| 234 | DO j = nysg, nyng |
---|
| 235 | DO k = nzb, nzt+1 |
---|
| 236 | ql_av(k,j,i) = ql_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 237 | ENDDO |
---|
[1] | 238 | ENDDO |
---|
| 239 | ENDDO |
---|
[3004] | 240 | ENDIF |
---|
[1] | 241 | |
---|
| 242 | CASE ( 'ql_c' ) |
---|
[4509] | 243 | IF ( ALLOCATED( ql_c_av ) ) THEN |
---|
[3004] | 244 | DO i = nxlg, nxrg |
---|
| 245 | DO j = nysg, nyng |
---|
| 246 | DO k = nzb, nzt+1 |
---|
| 247 | ql_c_av(k,j,i) = ql_c_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 248 | ENDDO |
---|
[1] | 249 | ENDDO |
---|
| 250 | ENDDO |
---|
[3004] | 251 | ENDIF |
---|
[1] | 252 | |
---|
| 253 | CASE ( 'ql_v' ) |
---|
[4509] | 254 | IF ( ALLOCATED( ql_v_av ) ) THEN |
---|
[3004] | 255 | DO i = nxlg, nxrg |
---|
| 256 | DO j = nysg, nyng |
---|
| 257 | DO k = nzb, nzt+1 |
---|
| 258 | ql_v_av(k,j,i) = ql_v_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 259 | ENDDO |
---|
[1] | 260 | ENDDO |
---|
| 261 | ENDDO |
---|
[3004] | 262 | ENDIF |
---|
[1] | 263 | |
---|
| 264 | CASE ( 'ql_vp' ) |
---|
[4509] | 265 | IF ( ALLOCATED( ql_vp_av ) ) THEN |
---|
[3004] | 266 | DO i = nxlg, nxrg |
---|
| 267 | DO j = nysg, nyng |
---|
| 268 | DO k = nzb, nzt+1 |
---|
[4509] | 269 | ql_vp_av(k,j,i) = ql_vp_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
[3004] | 270 | ENDDO |
---|
[1] | 271 | ENDDO |
---|
| 272 | ENDDO |
---|
[3004] | 273 | ENDIF |
---|
[1] | 274 | |
---|
| 275 | CASE ( 'qv' ) |
---|
[4509] | 276 | IF ( ALLOCATED( qv_av ) ) THEN |
---|
[3004] | 277 | DO i = nxlg, nxrg |
---|
| 278 | DO j = nysg, nyng |
---|
| 279 | DO k = nzb, nzt+1 |
---|
| 280 | qv_av(k,j,i) = qv_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 281 | ENDDO |
---|
[1] | 282 | ENDDO |
---|
| 283 | ENDDO |
---|
[3004] | 284 | ENDIF |
---|
[367] | 285 | |
---|
[2735] | 286 | CASE ( 'r_a*' ) |
---|
[4509] | 287 | IF ( ALLOCATED( r_a_av ) ) THEN |
---|
[3004] | 288 | DO i = nxlg, nxrg |
---|
| 289 | DO j = nysg, nyng |
---|
| 290 | r_a_av(j,i) = r_a_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 291 | ENDDO |
---|
[2735] | 292 | ENDDO |
---|
[4457] | 293 | CALL exchange_horiz_2d( r_a_av ) |
---|
[3004] | 294 | ENDIF |
---|
[2735] | 295 | |
---|
[1] | 296 | CASE ( 's' ) |
---|
[4509] | 297 | IF ( ALLOCATED( s_av ) ) THEN |
---|
[3004] | 298 | DO i = nxlg, nxrg |
---|
| 299 | DO j = nysg, nyng |
---|
| 300 | DO k = nzb, nzt+1 |
---|
| 301 | s_av(k,j,i) = s_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 302 | ENDDO |
---|
[1] | 303 | ENDDO |
---|
| 304 | ENDDO |
---|
[3004] | 305 | ENDIF |
---|
[367] | 306 | |
---|
[354] | 307 | CASE ( 'shf*' ) |
---|
[4509] | 308 | IF ( ALLOCATED( shf_av ) ) THEN |
---|
[3004] | 309 | DO i = nxlg, nxrg |
---|
| 310 | DO j = nysg, nyng |
---|
| 311 | shf_av(j,i) = shf_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 312 | ENDDO |
---|
[354] | 313 | ENDDO |
---|
[4457] | 314 | CALL exchange_horiz_2d( shf_av ) |
---|
[3004] | 315 | ENDIF |
---|
[367] | 316 | |
---|
[1960] | 317 | CASE ( 'ssws*' ) |
---|
[4509] | 318 | IF ( ALLOCATED( ssws_av ) ) THEN |
---|
[3004] | 319 | DO i = nxlg, nxrg |
---|
| 320 | DO j = nysg, nyng |
---|
| 321 | ssws_av(j,i) = ssws_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 322 | ENDDO |
---|
[1960] | 323 | ENDDO |
---|
[4457] | 324 | CALL exchange_horiz_2d( ssws_av ) |
---|
[3004] | 325 | ENDIF |
---|
[1960] | 326 | |
---|
[1] | 327 | CASE ( 't*' ) |
---|
[4509] | 328 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
[3004] | 329 | DO i = nxlg, nxrg |
---|
| 330 | DO j = nysg, nyng |
---|
| 331 | ts_av(j,i) = ts_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 332 | ENDDO |
---|
[1] | 333 | ENDDO |
---|
[4457] | 334 | CALL exchange_horiz_2d( ts_av ) |
---|
[3004] | 335 | ENDIF |
---|
[1] | 336 | |
---|
[2742] | 337 | CASE ( 'tsurf*' ) |
---|
[4509] | 338 | IF ( ALLOCATED( tsurf_av ) ) THEN |
---|
[3004] | 339 | DO i = nxlg, nxrg |
---|
| 340 | DO j = nysg, nyng |
---|
| 341 | tsurf_av(j,i) = tsurf_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 342 | ENDDO |
---|
[2742] | 343 | ENDDO |
---|
[4457] | 344 | CALL exchange_horiz_2d( tsurf_av ) |
---|
[3004] | 345 | ENDIF |
---|
[2742] | 346 | |
---|
[1] | 347 | CASE ( 'u' ) |
---|
[4509] | 348 | IF ( ALLOCATED( u_av ) ) THEN |
---|
[3004] | 349 | DO i = nxlg, nxrg |
---|
| 350 | DO j = nysg, nyng |
---|
| 351 | DO k = nzb, nzt+1 |
---|
| 352 | u_av(k,j,i) = u_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 353 | ENDDO |
---|
[1] | 354 | ENDDO |
---|
| 355 | ENDDO |
---|
[3004] | 356 | ENDIF |
---|
[1] | 357 | |
---|
[3421] | 358 | CASE ( 'us*' ) |
---|
[4509] | 359 | IF ( ALLOCATED( us_av ) ) THEN |
---|
[3004] | 360 | DO i = nxlg, nxrg |
---|
| 361 | DO j = nysg, nyng |
---|
| 362 | us_av(j,i) = us_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 363 | ENDDO |
---|
[1] | 364 | ENDDO |
---|
[4457] | 365 | CALL exchange_horiz_2d( us_av ) |
---|
[3004] | 366 | ENDIF |
---|
[1] | 367 | |
---|
| 368 | CASE ( 'v' ) |
---|
[4509] | 369 | IF ( ALLOCATED( v_av ) ) THEN |
---|
[3004] | 370 | DO i = nxlg, nxrg |
---|
| 371 | DO j = nysg, nyng |
---|
| 372 | DO k = nzb, nzt+1 |
---|
| 373 | v_av(k,j,i) = v_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 374 | ENDDO |
---|
[1] | 375 | ENDDO |
---|
| 376 | ENDDO |
---|
[3004] | 377 | ENDIF |
---|
[1] | 378 | |
---|
[3421] | 379 | CASE ( 'thetav' ) |
---|
[4509] | 380 | IF ( ALLOCATED( vpt_av ) ) THEN |
---|
[3004] | 381 | DO i = nxlg, nxrg |
---|
| 382 | DO j = nysg, nyng |
---|
| 383 | DO k = nzb, nzt+1 |
---|
| 384 | vpt_av(k,j,i) = vpt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 385 | ENDDO |
---|
[1] | 386 | ENDDO |
---|
| 387 | ENDDO |
---|
[3004] | 388 | ENDIF |
---|
[1] | 389 | |
---|
| 390 | CASE ( 'w' ) |
---|
[4509] | 391 | IF ( ALLOCATED( w_av ) ) THEN |
---|
[3004] | 392 | DO i = nxlg, nxrg |
---|
| 393 | DO j = nysg, nyng |
---|
| 394 | DO k = nzb, nzt+1 |
---|
| 395 | w_av(k,j,i) = w_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 396 | ENDDO |
---|
[1] | 397 | ENDDO |
---|
| 398 | ENDDO |
---|
[3004] | 399 | ENDIF |
---|
[1] | 400 | |
---|
[72] | 401 | CASE ( 'z0*' ) |
---|
[4509] | 402 | IF ( ALLOCATED( z0_av ) ) THEN |
---|
[3004] | 403 | DO i = nxlg, nxrg |
---|
| 404 | DO j = nysg, nyng |
---|
| 405 | z0_av(j,i) = z0_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 406 | ENDDO |
---|
[72] | 407 | ENDDO |
---|
[4457] | 408 | CALL exchange_horiz_2d( z0_av ) |
---|
[3004] | 409 | ENDIF |
---|
[72] | 410 | |
---|
[978] | 411 | CASE ( 'z0h*' ) |
---|
[4509] | 412 | IF ( ALLOCATED( z0h_av ) ) THEN |
---|
[3004] | 413 | DO i = nxlg, nxrg |
---|
| 414 | DO j = nysg, nyng |
---|
| 415 | z0h_av(j,i) = z0h_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 416 | ENDDO |
---|
[978] | 417 | ENDDO |
---|
[4457] | 418 | CALL exchange_horiz_2d( z0h_av ) |
---|
[3004] | 419 | ENDIF |
---|
| 420 | |
---|
| 421 | CASE ( 'z0q*' ) |
---|
[4509] | 422 | IF ( ALLOCATED( z0q_av ) ) THEN |
---|
[3004] | 423 | DO i = nxlg, nxrg |
---|
| 424 | DO j = nysg, nyng |
---|
| 425 | z0q_av(j,i) = z0q_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 426 | ENDDO |
---|
| 427 | ENDDO |
---|
[4457] | 428 | CALL exchange_horiz_2d( z0q_av ) |
---|
[3004] | 429 | ENDIF |
---|
| 430 | |
---|
[1] | 431 | CASE DEFAULT |
---|
[1976] | 432 | ! |
---|
[3637] | 433 | !-- Averaging of data from all other modules |
---|
| 434 | CALL module_interface_3d_data_averaging( 'average', trimvar ) |
---|
[1] | 435 | |
---|
| 436 | END SELECT |
---|
| 437 | |
---|
| 438 | ENDDO |
---|
| 439 | |
---|
| 440 | ! |
---|
| 441 | !-- Reset the counter |
---|
| 442 | average_count_3d = 0.0 |
---|
| 443 | |
---|
[1318] | 444 | CALL cpu_log( log_point(35), 'average_3d_data', 'stop' ) |
---|
[1] | 445 | |
---|
| 446 | |
---|
| 447 | END SUBROUTINE average_3d_data |
---|