[1682] | 1 | !> @file average_3d_data.f90 |
---|
[2000] | 2 | !------------------------------------------------------------------------------! |
---|
[2696] | 3 | ! This file is part of the PALM model system. |
---|
[1036] | 4 | ! |
---|
[2000] | 5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
| 6 | ! terms of the GNU General Public License as published by the Free Software |
---|
| 7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
| 8 | ! version. |
---|
[1036] | 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 | ! |
---|
[3655] | 17 | ! Copyright 1997-2019 Leibniz Universitaet Hannover |
---|
[2000] | 18 | !------------------------------------------------------------------------------! |
---|
[1036] | 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
[3589] | 22 | ! |
---|
| 23 | ! |
---|
| 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: average_3d_data.f90 4182 2019-08-22 15:20:23Z resler $ |
---|
[4182] | 27 | ! Corrected "Former revisions" section |
---|
| 28 | ! |
---|
| 29 | ! 4048 2019-06-21 21:00:21Z knoop |
---|
[4048] | 30 | ! Moved tcm_3d_data_averaging to module_interface |
---|
| 31 | ! |
---|
| 32 | ! 4039 2019-06-18 10:32:41Z suehring |
---|
[4039] | 33 | ! Modularize diagnostic output |
---|
| 34 | ! |
---|
| 35 | ! 3994 2019-05-22 18:08:09Z suehring |
---|
[3994] | 36 | ! output of turbulence intensity added |
---|
| 37 | ! |
---|
| 38 | ! 3933 2019-04-25 12:33:20Z kanani |
---|
[3933] | 39 | ! Bugfix in CASE theta_2m*, removal of redundant code |
---|
| 40 | ! |
---|
| 41 | ! 3773 2019-03-01 08:56:57Z maronga |
---|
[3773] | 42 | ! Added output of theta_2m*_xy_av |
---|
| 43 | ! |
---|
| 44 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
[3637] | 45 | ! Implementation of the PALM module interface |
---|
[3582] | 46 | ! |
---|
[4182] | 47 | ! Revision 1.1 2006/02/23 09:48:58 raasch |
---|
| 48 | ! Initial revision |
---|
| 49 | ! |
---|
| 50 | ! |
---|
[1] | 51 | ! Description: |
---|
| 52 | ! ------------ |
---|
[1682] | 53 | !> Time-averaging of 3d-data-arrays. |
---|
[1] | 54 | !------------------------------------------------------------------------------! |
---|
[1682] | 55 | SUBROUTINE average_3d_data |
---|
| 56 | |
---|
[1] | 57 | |
---|
| 58 | USE averaging |
---|
| 59 | |
---|
[1320] | 60 | USE control_parameters, & |
---|
[3637] | 61 | ONLY: average_count_3d, doav, doav_n, varnamelength |
---|
[1320] | 62 | |
---|
| 63 | USE cpulog, & |
---|
| 64 | ONLY: cpu_log, log_point |
---|
| 65 | |
---|
| 66 | USE indices, & |
---|
[2232] | 67 | ONLY: nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt |
---|
[1320] | 68 | |
---|
| 69 | USE kinds |
---|
| 70 | |
---|
[3637] | 71 | USE module_interface, & |
---|
| 72 | ONLY: module_interface_3d_data_averaging |
---|
[1320] | 73 | |
---|
[2696] | 74 | |
---|
[1691] | 75 | |
---|
[2007] | 76 | |
---|
[1] | 77 | IMPLICIT NONE |
---|
| 78 | |
---|
[3294] | 79 | INTEGER(iwp) :: i !< loop index |
---|
| 80 | INTEGER(iwp) :: ii !< loop index |
---|
| 81 | INTEGER(iwp) :: j !< loop index |
---|
| 82 | INTEGER(iwp) :: k !< loop index |
---|
[1] | 83 | |
---|
[2011] | 84 | CHARACTER (LEN=varnamelength) :: trimvar !< TRIM of output-variable string |
---|
[1] | 85 | |
---|
[2007] | 86 | |
---|
[1] | 87 | CALL cpu_log (log_point(35),'average_3d_data','start') |
---|
| 88 | |
---|
| 89 | ! |
---|
| 90 | !-- Check, if averaging is necessary |
---|
| 91 | IF ( average_count_3d <= 1 ) RETURN |
---|
| 92 | |
---|
| 93 | ! |
---|
| 94 | !-- Loop of all variables to be averaged. |
---|
| 95 | DO ii = 1, doav_n |
---|
| 96 | |
---|
[2007] | 97 | trimvar = TRIM( doav(ii) ) |
---|
| 98 | |
---|
| 99 | ! |
---|
[1] | 100 | !-- Store the array chosen on the temporary array. |
---|
[2007] | 101 | SELECT CASE ( trimvar ) |
---|
[1] | 102 | |
---|
| 103 | CASE ( 'e' ) |
---|
[3004] | 104 | IF ( ALLOCATED( e_av ) ) THEN |
---|
| 105 | DO i = nxlg, nxrg |
---|
| 106 | DO j = nysg, nyng |
---|
| 107 | DO k = nzb, nzt+1 |
---|
| 108 | e_av(k,j,i) = e_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 109 | ENDDO |
---|
[1] | 110 | ENDDO |
---|
| 111 | ENDDO |
---|
[3004] | 112 | ENDIF |
---|
[1] | 113 | |
---|
[2797] | 114 | CASE ( 'ghf*' ) |
---|
[3004] | 115 | IF ( ALLOCATED( ghf_av ) ) THEN |
---|
| 116 | DO i = nxl, nxr |
---|
| 117 | DO j = nys, nyn |
---|
| 118 | ghf_av(j,i) = ghf_av(j,i) & |
---|
| 119 | / REAL( average_count_3d, KIND=wp ) |
---|
| 120 | ENDDO |
---|
[2797] | 121 | ENDDO |
---|
[3004] | 122 | CALL exchange_horiz_2d( ghf_av, nbgp ) |
---|
| 123 | ENDIF |
---|
[2797] | 124 | |
---|
[354] | 125 | CASE ( 'qsws*' ) |
---|
[3004] | 126 | IF ( ALLOCATED( qsws_av ) ) THEN |
---|
| 127 | DO i = nxlg, nxrg |
---|
| 128 | DO j = nysg, nyng |
---|
| 129 | qsws_av(j,i) = qsws_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 130 | ENDDO |
---|
[354] | 131 | ENDDO |
---|
[3004] | 132 | CALL exchange_horiz_2d( qsws_av, nbgp ) |
---|
| 133 | ENDIF |
---|
[354] | 134 | |
---|
[3421] | 135 | CASE ( 'thetal' ) |
---|
[3004] | 136 | IF ( ALLOCATED( lpt_av ) ) THEN |
---|
| 137 | DO i = nxlg, nxrg |
---|
| 138 | DO j = nysg, nyng |
---|
| 139 | DO k = nzb, nzt+1 |
---|
| 140 | lpt_av(k,j,i) = lpt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 141 | ENDDO |
---|
[771] | 142 | ENDDO |
---|
| 143 | ENDDO |
---|
[3004] | 144 | ENDIF |
---|
[771] | 145 | |
---|
[1] | 146 | CASE ( 'lwp*' ) |
---|
[3004] | 147 | IF ( ALLOCATED( lwp_av ) ) THEN |
---|
| 148 | DO i = nxlg, nxrg |
---|
| 149 | DO j = nysg, nyng |
---|
| 150 | lwp_av(j,i) = lwp_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 151 | ENDDO |
---|
[1] | 152 | ENDDO |
---|
[3004] | 153 | ENDIF |
---|
[1] | 154 | |
---|
[1691] | 155 | CASE ( 'ol*' ) |
---|
[3004] | 156 | IF ( ALLOCATED( ol_av ) ) THEN |
---|
| 157 | DO i = nxlg, nxrg |
---|
| 158 | DO j = nysg, nyng |
---|
| 159 | ol_av(j,i) = ol_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 160 | ENDDO |
---|
[1691] | 161 | ENDDO |
---|
[3004] | 162 | CALL exchange_horiz_2d( ol_av, nbgp ) |
---|
| 163 | ENDIF |
---|
[1691] | 164 | |
---|
[1] | 165 | CASE ( 'p' ) |
---|
[3004] | 166 | IF ( ALLOCATED( p_av ) ) THEN |
---|
| 167 | DO i = nxlg, nxrg |
---|
| 168 | DO j = nysg, nyng |
---|
| 169 | DO k = nzb, nzt+1 |
---|
| 170 | p_av(k,j,i) = p_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 171 | ENDDO |
---|
[1] | 172 | ENDDO |
---|
| 173 | ENDDO |
---|
[3004] | 174 | ENDIF |
---|
[1] | 175 | |
---|
| 176 | CASE ( 'pc' ) |
---|
[3004] | 177 | IF ( ALLOCATED( pc_av ) ) THEN |
---|
| 178 | DO i = nxl, nxr |
---|
| 179 | DO j = nys, nyn |
---|
| 180 | DO k = nzb, nzt+1 |
---|
| 181 | pc_av(k,j,i) = pc_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 182 | ENDDO |
---|
[1] | 183 | ENDDO |
---|
| 184 | ENDDO |
---|
[3004] | 185 | ENDIF |
---|
[1] | 186 | |
---|
| 187 | CASE ( 'pr' ) |
---|
[3004] | 188 | IF ( ALLOCATED( pr_av ) ) THEN |
---|
| 189 | DO i = nxl, nxr |
---|
| 190 | DO j = nys, nyn |
---|
| 191 | DO k = nzb, nzt+1 |
---|
| 192 | pr_av(k,j,i) = pr_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 193 | ENDDO |
---|
[1] | 194 | ENDDO |
---|
| 195 | ENDDO |
---|
[3004] | 196 | ENDIF |
---|
[1] | 197 | |
---|
[3421] | 198 | CASE ( 'theta' ) |
---|
[3004] | 199 | IF ( ALLOCATED( pt_av ) ) THEN |
---|
| 200 | DO i = nxlg, nxrg |
---|
| 201 | DO j = nysg, nyng |
---|
| 202 | DO k = nzb, nzt+1 |
---|
| 203 | pt_av(k,j,i) = pt_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 204 | ENDDO |
---|
[1] | 205 | ENDDO |
---|
| 206 | ENDDO |
---|
[3004] | 207 | ENDIF |
---|
[1] | 208 | |
---|
| 209 | CASE ( 'q' ) |
---|
[3004] | 210 | IF ( ALLOCATED( q_av ) ) THEN |
---|
| 211 | DO i = nxlg, nxrg |
---|
| 212 | DO j = nysg, nyng |
---|
| 213 | DO k = nzb, nzt+1 |
---|
| 214 | q_av(k,j,i) = q_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 215 | ENDDO |
---|
[1] | 216 | ENDDO |
---|
| 217 | ENDDO |
---|
[3004] | 218 | ENDIF |
---|
[367] | 219 | |
---|
[1] | 220 | CASE ( 'ql' ) |
---|
[3004] | 221 | IF ( ALLOCATED( ql_av ) ) THEN |
---|
| 222 | DO i = nxlg, nxrg |
---|
| 223 | DO j = nysg, nyng |
---|
| 224 | DO k = nzb, nzt+1 |
---|
| 225 | ql_av(k,j,i) = ql_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 226 | ENDDO |
---|
[1] | 227 | ENDDO |
---|
| 228 | ENDDO |
---|
[3004] | 229 | ENDIF |
---|
[1] | 230 | |
---|
| 231 | CASE ( 'ql_c' ) |
---|
[3004] | 232 | IF ( ALLOCATED( ql_c_av ) ) THEN |
---|
| 233 | DO i = nxlg, nxrg |
---|
| 234 | DO j = nysg, nyng |
---|
| 235 | DO k = nzb, nzt+1 |
---|
| 236 | ql_c_av(k,j,i) = ql_c_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_v' ) |
---|
[3004] | 243 | IF ( ALLOCATED( ql_v_av ) ) THEN |
---|
| 244 | DO i = nxlg, nxrg |
---|
| 245 | DO j = nysg, nyng |
---|
| 246 | DO k = nzb, nzt+1 |
---|
| 247 | ql_v_av(k,j,i) = ql_v_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_vp' ) |
---|
[3004] | 254 | IF ( ALLOCATED( ql_vp_av ) ) THEN |
---|
| 255 | DO i = nxlg, nxrg |
---|
| 256 | DO j = nysg, nyng |
---|
| 257 | DO k = nzb, nzt+1 |
---|
| 258 | ql_vp_av(k,j,i) = ql_vp_av(k,j,i) / & |
---|
| 259 | REAL( average_count_3d, KIND=wp ) |
---|
| 260 | ENDDO |
---|
[1] | 261 | ENDDO |
---|
| 262 | ENDDO |
---|
[3004] | 263 | ENDIF |
---|
[1] | 264 | |
---|
| 265 | CASE ( 'qv' ) |
---|
[3004] | 266 | IF ( ALLOCATED( qv_av ) ) THEN |
---|
| 267 | DO i = nxlg, nxrg |
---|
| 268 | DO j = nysg, nyng |
---|
| 269 | DO k = nzb, nzt+1 |
---|
| 270 | qv_av(k,j,i) = qv_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 271 | ENDDO |
---|
[1] | 272 | ENDDO |
---|
| 273 | ENDDO |
---|
[3004] | 274 | ENDIF |
---|
[367] | 275 | |
---|
[2735] | 276 | CASE ( 'r_a*' ) |
---|
[3004] | 277 | IF ( ALLOCATED( r_a_av ) ) THEN |
---|
| 278 | DO i = nxlg, nxrg |
---|
| 279 | DO j = nysg, nyng |
---|
| 280 | r_a_av(j,i) = r_a_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 281 | ENDDO |
---|
[2735] | 282 | ENDDO |
---|
[3004] | 283 | CALL exchange_horiz_2d( r_a_av, nbgp ) |
---|
| 284 | ENDIF |
---|
[2735] | 285 | |
---|
[1] | 286 | CASE ( 's' ) |
---|
[3004] | 287 | IF ( ALLOCATED( s_av ) ) THEN |
---|
| 288 | DO i = nxlg, nxrg |
---|
| 289 | DO j = nysg, nyng |
---|
| 290 | DO k = nzb, nzt+1 |
---|
| 291 | s_av(k,j,i) = s_av(k,j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 292 | ENDDO |
---|
[1] | 293 | ENDDO |
---|
| 294 | ENDDO |
---|
[3004] | 295 | ENDIF |
---|
[367] | 296 | |
---|
[354] | 297 | CASE ( 'shf*' ) |
---|
[3004] | 298 | IF ( ALLOCATED( shf_av ) ) THEN |
---|
| 299 | DO i = nxlg, nxrg |
---|
| 300 | DO j = nysg, nyng |
---|
| 301 | shf_av(j,i) = shf_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 302 | ENDDO |
---|
[354] | 303 | ENDDO |
---|
[3004] | 304 | CALL exchange_horiz_2d( shf_av, nbgp ) |
---|
| 305 | ENDIF |
---|
[367] | 306 | |
---|
[1960] | 307 | CASE ( 'ssws*' ) |
---|
[3004] | 308 | IF ( ALLOCATED( ssws_av ) ) THEN |
---|
| 309 | DO i = nxlg, nxrg |
---|
| 310 | DO j = nysg, nyng |
---|
| 311 | ssws_av(j,i) = ssws_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 312 | ENDDO |
---|
[1960] | 313 | ENDDO |
---|
[3004] | 314 | CALL exchange_horiz_2d( ssws_av, nbgp ) |
---|
| 315 | ENDIF |
---|
[1960] | 316 | |
---|
[3773] | 317 | CASE ( 'theta_2m*' ) |
---|
[3933] | 318 | IF ( ALLOCATED( pt_2m_av ) ) THEN |
---|
[3773] | 319 | DO i = nxlg, nxrg |
---|
| 320 | DO j = nysg, nyng |
---|
| 321 | pt_2m_av(j,i) = pt_2m_av(j,i) / REAL( average_count_3d, KIND=wp ) |
---|
| 322 | ENDDO |
---|
| 323 | ENDDO |
---|
| 324 | CALL exchange_horiz_2d( pt_2m_av, nbgp ) |
---|
| 325 | ENDIF |
---|
[3933] | 326 | |
---|
[1] | 327 | CASE ( 't*' ) |
---|
[3004] | 328 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
| 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 |
---|
[3004] | 334 | CALL exchange_horiz_2d( ts_av, nbgp ) |
---|
| 335 | ENDIF |
---|
[1] | 336 | |
---|
[2742] | 337 | CASE ( 'tsurf*' ) |
---|
[3004] | 338 | IF ( ALLOCATED( tsurf_av ) ) THEN |
---|
| 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 |
---|
[3004] | 344 | CALL exchange_horiz_2d( tsurf_av, nbgp ) |
---|
| 345 | ENDIF |
---|
[2742] | 346 | |
---|
[1] | 347 | CASE ( 'u' ) |
---|
[3004] | 348 | IF ( ALLOCATED( u_av ) ) THEN |
---|
| 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*' ) |
---|
[3004] | 359 | IF ( ALLOCATED( us_av ) ) THEN |
---|
| 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 |
---|
[3004] | 365 | CALL exchange_horiz_2d( us_av, nbgp ) |
---|
| 366 | ENDIF |
---|
[1] | 367 | |
---|
| 368 | CASE ( 'v' ) |
---|
[3004] | 369 | IF ( ALLOCATED( v_av ) ) THEN |
---|
| 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' ) |
---|
[3004] | 380 | IF ( ALLOCATED( vpt_av ) ) THEN |
---|
| 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' ) |
---|
[3004] | 391 | IF ( ALLOCATED( w_av ) ) THEN |
---|
| 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*' ) |
---|
[3004] | 402 | IF ( ALLOCATED( z0_av ) ) THEN |
---|
| 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 |
---|
[3004] | 408 | CALL exchange_horiz_2d( z0_av, nbgp ) |
---|
| 409 | ENDIF |
---|
[72] | 410 | |
---|
[978] | 411 | CASE ( 'z0h*' ) |
---|
[3004] | 412 | IF ( ALLOCATED( z0h_av ) ) THEN |
---|
| 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 |
---|
[3004] | 418 | CALL exchange_horiz_2d( z0h_av, nbgp ) |
---|
| 419 | ENDIF |
---|
| 420 | |
---|
| 421 | CASE ( 'z0q*' ) |
---|
| 422 | IF ( ALLOCATED( z0q_av ) ) THEN |
---|
| 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 |
---|
| 428 | CALL exchange_horiz_2d( z0q_av, nbgp ) |
---|
| 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 |
---|