[1682] | 1 | !> @file sum_up_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: |
---|
[3569] | 21 | ! ------------------ |
---|
[1360] | 22 | ! |
---|
[3589] | 23 | ! |
---|
[1321] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: sum_up_3d_data.f90 3943 2019-05-02 09:50:41Z suehring $ |
---|
[3943] | 27 | ! Added output of qsws_av for green roofs. |
---|
| 28 | ! |
---|
| 29 | ! 3933 2019-04-25 12:33:20Z kanani |
---|
[3933] | 30 | ! Formatting |
---|
| 31 | ! |
---|
| 32 | ! 3773 2019-03-01 08:56:57Z maronga |
---|
[3773] | 33 | ! Added output of theta_2m*_xy_av |
---|
| 34 | ! |
---|
| 35 | ! 3761 2019-02-25 15:31:42Z raasch |
---|
[3761] | 36 | ! unused variables removed |
---|
| 37 | ! |
---|
| 38 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
[3637] | 39 | ! Implementation of the PALM module interface |
---|
| 40 | ! |
---|
| 41 | ! 3597 2018-12-04 08:40:18Z maronga |
---|
[3597] | 42 | ! Added output of theta_2m |
---|
| 43 | ! |
---|
| 44 | ! 3589 2018-11-30 15:09:51Z suehring |
---|
[3589] | 45 | ! Move the control parameter "salsa" from salsa_mod to control_parameters |
---|
| 46 | ! (M. Kurppa) |
---|
| 47 | ! |
---|
| 48 | ! 3582 2018-11-29 19:16:36Z suehring |
---|
[3569] | 49 | ! dom_dwd_user, Schrempf: |
---|
| 50 | ! Remove CALLs to uv exposure model, this is now part of biometeorology_mod |
---|
| 51 | ! |
---|
| 52 | ! 3553 2018-11-22 10:30:48Z suehring |
---|
[3553] | 53 | ! variables documented |
---|
| 54 | ! |
---|
| 55 | ! 3552 2018-11-22 10:28:35Z suehring |
---|
[3525] | 56 | ! Changes related to clean-up of biometeorology (dom_dwd_user) |
---|
| 57 | ! |
---|
| 58 | ! 3467 2018-10-30 19:05:21Z suehring |
---|
[3467] | 59 | ! Implementation of a new aerosol module salsa. |
---|
| 60 | ! |
---|
| 61 | ! 3448 2018-10-29 18:14:31Z kanani |
---|
[3448] | 62 | ! Adjustment of biometeorology calls |
---|
| 63 | ! |
---|
| 64 | ! 3421 2018-10-24 18:39:32Z gronemeier |
---|
[3421] | 65 | ! Renamed output variables |
---|
| 66 | ! |
---|
| 67 | ! 3337 2018-10-12 15:17:09Z kanani |
---|
[3337] | 68 | ! (from branch resler) |
---|
| 69 | ! Add biometeorology, |
---|
| 70 | ! fix chemistry output call, |
---|
| 71 | ! move usm calls |
---|
| 72 | ! |
---|
| 73 | ! 3294 2018-10-01 02:37:10Z raasch |
---|
[3294] | 74 | ! changes concerning modularization of ocean option |
---|
| 75 | ! |
---|
| 76 | ! 3291 2018-09-28 11:33:03Z scharf |
---|
[3291] | 77 | ! corrected previous commit for 3D topography |
---|
| 78 | ! |
---|
| 79 | ! 3285 2018-09-27 17:16:52Z scharf |
---|
[3285] | 80 | ! bugfix for shf_av and qsws_av |
---|
| 81 | ! |
---|
| 82 | ! 3274 2018-09-24 15:42:55Z knoop |
---|
[3274] | 83 | ! Modularization of all bulk cloud physics code components |
---|
| 84 | ! |
---|
| 85 | ! 3241 2018-09-12 15:02:00Z raasch |
---|
[3241] | 86 | ! unused variables removed |
---|
| 87 | ! |
---|
| 88 | ! 3176 2018-07-26 17:12:48Z suehring |
---|
[3176] | 89 | ! Remove output of latent heat flux at urban-surfaces and set fill values |
---|
| 90 | ! instead |
---|
| 91 | ! |
---|
| 92 | ! 3173 2018-07-26 12:55:23Z suehring |
---|
[3173] | 93 | ! Bugfix for last commit |
---|
| 94 | ! |
---|
| 95 | ! 3170 2018-07-25 15:19:37Z suehring |
---|
[3170] | 96 | ! Revise output of surface quantities in case of overhanging structures |
---|
| 97 | ! |
---|
| 98 | ! 3151 2018-07-19 08:45:38Z raasch |
---|
[3151] | 99 | ! Remaining preprocessor directive __chem removed |
---|
| 100 | ! |
---|
| 101 | ! 3004 2018-04-27 12:33:25Z Giersch |
---|
[3004] | 102 | ! prr field added to ONLY-list, prr* case/pr* case/precipitation_rate_av |
---|
| 103 | ! removed, further allocation checks implemented |
---|
| 104 | ! |
---|
| 105 | ! 2963 2018-04-12 14:47:44Z suehring |
---|
[2963] | 106 | ! Introduce index for vegetation/wall, pavement/green-wall and water/window |
---|
| 107 | ! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. . |
---|
| 108 | ! |
---|
| 109 | ! 2894 2018-03-15 09:17:58Z Giersch |
---|
[2894] | 110 | ! Changed comment |
---|
| 111 | ! |
---|
| 112 | ! 2817 2018-02-19 16:32:21Z suehring |
---|
[2817] | 113 | ! Preliminary gust module interface implemented |
---|
| 114 | ! |
---|
| 115 | ! 2798 2018-02-09 17:16:39Z suehring |
---|
[2798] | 116 | ! Consider also default-type surfaces for surface temperature output. |
---|
| 117 | ! |
---|
| 118 | ! 2797 2018-02-08 13:24:35Z suehring |
---|
[2797] | 119 | ! Enable output of ground-heat flux also at urban surfaces. |
---|
| 120 | ! |
---|
| 121 | ! 2790 2018-02-06 11:57:19Z suehring |
---|
[2790] | 122 | ! Bugfix in summation of surface sensible and latent heat flux |
---|
| 123 | ! |
---|
| 124 | ! 2766 2018-01-22 17:17:47Z kanani |
---|
[2766] | 125 | ! Removed preprocessor directive __chem |
---|
| 126 | ! |
---|
| 127 | ! 2743 2018-01-12 16:03:39Z suehring |
---|
[2743] | 128 | ! In case of natural- and urban-type surfaces output surfaces fluxes in W/m2. |
---|
| 129 | ! |
---|
| 130 | ! 2742 2018-01-12 14:59:47Z suehring |
---|
[2742] | 131 | ! Enable output of surface temperature |
---|
| 132 | ! |
---|
| 133 | ! 2735 2018-01-11 12:01:27Z suehring |
---|
[2735] | 134 | ! output of r_a moved from land-surface to consider also urban-type surfaces |
---|
| 135 | ! |
---|
| 136 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
[2716] | 137 | ! Corrected "Former revisions" section |
---|
| 138 | ! |
---|
| 139 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
| 140 | ! - Change in file header (GPL part) |
---|
[2696] | 141 | ! - Implementation of uv exposure model (FK) |
---|
| 142 | ! - output of diss_av, kh_av, km_av (turbulence_closure_mod) (TG) |
---|
| 143 | ! - Implementation of chemistry module (FK) |
---|
| 144 | ! - Workaround for sum-up usm arrays in case of restart runs, to avoid program |
---|
| 145 | ! crash (MS) |
---|
[3582] | 146 | ! |
---|
[2696] | 147 | ! 2292 2017-06-20 09:51:42Z schwenkel |
---|
[2292] | 148 | ! Implementation of new microphysic scheme: cloud_scheme = 'morrison' |
---|
| 149 | ! includes two more prognostic equations for cloud drop concentration (nc) |
---|
| 150 | ! and cloud water content (qc). |
---|
| 151 | ! |
---|
| 152 | ! 2233 2017-05-30 18:08:54Z suehring |
---|
[1321] | 153 | ! |
---|
[2233] | 154 | ! 2232 2017-05-30 17:47:52Z suehring |
---|
| 155 | ! Adjustments to new surface concept |
---|
| 156 | ! |
---|
[2032] | 157 | ! 2031 2016-10-21 15:11:58Z knoop |
---|
| 158 | ! renamed variable rho to rho_ocean and rho_av to rho_ocean_av |
---|
| 159 | ! |
---|
[2025] | 160 | ! 2024 2016-10-12 16:42:37Z kanani |
---|
| 161 | ! Added missing CASE for ssws* |
---|
| 162 | ! |
---|
[2012] | 163 | ! 2011 2016-09-19 17:29:57Z kanani |
---|
| 164 | ! Flag urban_surface is now defined in module control_parameters, |
---|
| 165 | ! changed prefix for urban surface model output to "usm_", |
---|
| 166 | ! introduced control parameter varnamelength for LEN of trimvar. |
---|
| 167 | ! |
---|
[2008] | 168 | ! 2007 2016-08-24 15:47:17Z kanani |
---|
| 169 | ! Added support for new urban surface model (temporary modifications of |
---|
| 170 | ! SELECT CASE ( ) necessary, see variable trimvar), |
---|
| 171 | ! added comments in variable declaration section |
---|
| 172 | ! |
---|
[2001] | 173 | ! 2000 2016-08-20 18:09:15Z knoop |
---|
| 174 | ! Forced header and separation lines into 80 columns |
---|
| 175 | ! |
---|
[1993] | 176 | ! 1992 2016-08-12 15:14:59Z suehring |
---|
| 177 | ! Bugfix in summation of passive scalar |
---|
| 178 | ! |
---|
[1977] | 179 | ! 1976 2016-07-27 13:28:04Z maronga |
---|
| 180 | ! Radiation actions are now done directly in the respective module |
---|
| 181 | ! |
---|
[1973] | 182 | ! 1972 2016-07-26 07:52:02Z maronga |
---|
| 183 | ! Land surface actions are now done directly in the respective module |
---|
| 184 | ! |
---|
[1961] | 185 | ! 1960 2016-07-12 16:34:24Z suehring |
---|
| 186 | ! Scalar surface flux added |
---|
| 187 | ! |
---|
[1950] | 188 | ! 1949 2016-06-17 07:19:16Z maronga |
---|
| 189 | ! Bugfix: calculation of lai_av, c_veg_av and c_liq_av. |
---|
| 190 | ! |
---|
[1851] | 191 | ! 1849 2016-04-08 11:33:18Z hoffmann |
---|
| 192 | ! precipitation_rate moved to arrays_3d |
---|
[1852] | 193 | ! |
---|
[1789] | 194 | ! 1788 2016-03-10 11:01:04Z maronga |
---|
| 195 | ! Added z0q and z0q_av |
---|
| 196 | ! |
---|
[1694] | 197 | ! 1693 2015-10-27 08:35:45Z maronga |
---|
| 198 | ! Last revision text corrected |
---|
| 199 | ! |
---|
[1692] | 200 | ! 1691 2015-10-26 16:17:44Z maronga |
---|
| 201 | ! Added output of Obukhov length and radiative heating rates for RRTMG. |
---|
[1693] | 202 | ! Corrected output of liquid water path. |
---|
[1692] | 203 | ! |
---|
[1683] | 204 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 205 | ! Code annotations made doxygen readable |
---|
| 206 | ! |
---|
[1586] | 207 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
| 208 | ! Adapted for RRTMG |
---|
| 209 | ! |
---|
[1556] | 210 | ! 1555 2015-03-04 17:44:27Z maronga |
---|
| 211 | ! Added output of r_a and r_s |
---|
| 212 | ! |
---|
[1552] | 213 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 214 | ! Added support for land surface model and radiation model data. |
---|
| 215 | ! |
---|
[1360] | 216 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
| 217 | ! New particle structure integrated. |
---|
| 218 | ! |
---|
[1354] | 219 | ! 1353 2014-04-08 15:21:23Z heinze |
---|
| 220 | ! REAL constants provided with KIND-attribute |
---|
| 221 | ! |
---|
[1321] | 222 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 223 | ! ONLY-attribute added to USE-statements, |
---|
| 224 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 225 | ! kinds are defined in new module kinds, |
---|
| 226 | ! old module precision_kind is removed, |
---|
| 227 | ! revision history before 2012 removed, |
---|
| 228 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 229 | ! all variable declaration statements |
---|
[1] | 230 | ! |
---|
[1319] | 231 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
| 232 | ! barrier argument removed from cpu_log, |
---|
| 233 | ! module interfaces removed |
---|
| 234 | ! |
---|
[1116] | 235 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
| 236 | ! ql is calculated by calc_liquid_water_content |
---|
| 237 | ! |
---|
[1054] | 238 | ! 1053 2012-11-13 17:11:03Z hoffmann |
---|
| 239 | ! +nr, prr, qr |
---|
| 240 | ! |
---|
[1037] | 241 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 242 | ! code put under GPL (PALM 3.9) |
---|
| 243 | ! |
---|
[1008] | 244 | ! 1007 2012-09-19 14:30:36Z franke |
---|
| 245 | ! Bugfix in calculation of ql_vp |
---|
| 246 | ! |
---|
[979] | 247 | ! 978 2012-08-09 08:28:32Z fricke |
---|
| 248 | ! +z0h* |
---|
| 249 | ! |
---|
[1] | 250 | ! Revision 1.1 2006/02/23 12:55:23 raasch |
---|
| 251 | ! Initial revision |
---|
| 252 | ! |
---|
| 253 | ! |
---|
| 254 | ! Description: |
---|
| 255 | ! ------------ |
---|
[1682] | 256 | !> Sum-up the values of 3d-arrays. The real averaging is later done in routine |
---|
| 257 | !> average_3d_data. |
---|
[1] | 258 | !------------------------------------------------------------------------------! |
---|
[1682] | 259 | SUBROUTINE sum_up_3d_data |
---|
| 260 | |
---|
[1] | 261 | |
---|
[1320] | 262 | USE arrays_3d, & |
---|
[3761] | 263 | ONLY: dzw, d_exner, e, heatflux_output_conversion, p, & |
---|
| 264 | pt, q, ql, ql_c, ql_v, s, u, v, vpt, w, & |
---|
[3294] | 265 | waterflux_output_conversion |
---|
[1] | 266 | |
---|
[1320] | 267 | USE averaging, & |
---|
[3294] | 268 | ONLY: e_av, ghf_av, lpt_av, lwp_av, ol_av, p_av, pc_av, pr_av, pt_av, & |
---|
[3597] | 269 | pt_2m_av, q_av, ql_av, ql_c_av, ql_v_av, ql_vp_av, qsws_av, & |
---|
| 270 | qv_av, r_a_av, s_av, shf_av, ssws_av, ts_av, tsurf_av, u_av, & |
---|
| 271 | us_av, v_av, vpt_av, w_av, z0_av, z0h_av, z0q_av |
---|
[3241] | 272 | |
---|
[3274] | 273 | USE basic_constants_and_equations_mod, & |
---|
| 274 | ONLY: c_p, lv_d_cp, l_v |
---|
| 275 | |
---|
| 276 | USE bulk_cloud_model_mod, & |
---|
[3637] | 277 | ONLY: bulk_cloud_model |
---|
[3274] | 278 | |
---|
[1320] | 279 | USE control_parameters, & |
---|
[3637] | 280 | ONLY: average_count_3d, doav, doav_n, rho_surface, urban_surface, & |
---|
[3569] | 281 | varnamelength |
---|
[1320] | 282 | |
---|
| 283 | USE cpulog, & |
---|
| 284 | ONLY: cpu_log, log_point |
---|
| 285 | |
---|
| 286 | USE indices, & |
---|
| 287 | ONLY: nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt |
---|
| 288 | |
---|
| 289 | USE kinds |
---|
| 290 | |
---|
[3637] | 291 | USE module_interface, & |
---|
| 292 | ONLY: module_interface_3d_data_averaging |
---|
[1551] | 293 | |
---|
[1320] | 294 | USE particle_attributes, & |
---|
[1359] | 295 | ONLY: grid_particles, number_of_particles, particles, prt_count |
---|
[1320] | 296 | |
---|
[2232] | 297 | USE surface_mod, & |
---|
[2963] | 298 | ONLY: ind_pav_green, ind_veg_wall, ind_wat_win, & |
---|
| 299 | surf_def_h, surf_lsm_h, surf_usm_h |
---|
[2232] | 300 | |
---|
[2696] | 301 | USE turbulence_closure_mod, & |
---|
| 302 | ONLY: tcm_3d_data_averaging |
---|
| 303 | |
---|
[2007] | 304 | USE urban_surface_mod, & |
---|
[3637] | 305 | ONLY: usm_3d_data_averaging |
---|
[1691] | 306 | |
---|
[2007] | 307 | |
---|
[1] | 308 | IMPLICIT NONE |
---|
| 309 | |
---|
[3170] | 310 | LOGICAL :: match_def !< flag indicating default-type surface |
---|
| 311 | LOGICAL :: match_lsm !< flag indicating natural-type surface |
---|
| 312 | LOGICAL :: match_usm !< flag indicating urban-type surface |
---|
| 313 | |
---|
[2232] | 314 | INTEGER(iwp) :: i !< grid index x direction |
---|
[2007] | 315 | INTEGER(iwp) :: ii !< running index |
---|
[2232] | 316 | INTEGER(iwp) :: j !< grid index y direction |
---|
| 317 | INTEGER(iwp) :: k !< grid index x direction |
---|
[3552] | 318 | INTEGER(iwp) :: m !< running index over surfacle elements |
---|
| 319 | INTEGER(iwp) :: n !< running index over number of particles per grid box |
---|
[1] | 320 | |
---|
[3552] | 321 | REAL(wp) :: mean_r !< mean-particle radius witin grid box |
---|
| 322 | REAL(wp) :: s_r2 !< mean-particle radius witin grid box to the power of two |
---|
| 323 | REAL(wp) :: s_r3 !< mean-particle radius witin grid box to the power of three |
---|
[1] | 324 | |
---|
[2011] | 325 | CHARACTER (LEN=varnamelength) :: trimvar !< TRIM of output-variable string |
---|
[2007] | 326 | |
---|
| 327 | |
---|
[1] | 328 | CALL cpu_log (log_point(34),'sum_up_3d_data','start') |
---|
| 329 | |
---|
| 330 | ! |
---|
| 331 | !-- Allocate and initialize the summation arrays if called for the very first |
---|
| 332 | !-- time or the first time after average_3d_data has been called |
---|
| 333 | !-- (some or all of the arrays may have been already allocated |
---|
[2894] | 334 | !-- in rrd_local) |
---|
[1] | 335 | IF ( average_count_3d == 0 ) THEN |
---|
| 336 | |
---|
| 337 | DO ii = 1, doav_n |
---|
[3337] | 338 | |
---|
[2007] | 339 | trimvar = TRIM( doav(ii) ) |
---|
[3337] | 340 | |
---|
[2007] | 341 | SELECT CASE ( trimvar ) |
---|
[1] | 342 | |
---|
[2797] | 343 | CASE ( 'ghf*' ) |
---|
| 344 | IF ( .NOT. ALLOCATED( ghf_av ) ) THEN |
---|
| 345 | ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 346 | ENDIF |
---|
| 347 | ghf_av = 0.0_wp |
---|
| 348 | |
---|
[1] | 349 | CASE ( 'e' ) |
---|
| 350 | IF ( .NOT. ALLOCATED( e_av ) ) THEN |
---|
[667] | 351 | ALLOCATE( e_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 352 | ENDIF |
---|
[1353] | 353 | e_av = 0.0_wp |
---|
[1] | 354 | |
---|
[3421] | 355 | CASE ( 'thetal' ) |
---|
[771] | 356 | IF ( .NOT. ALLOCATED( lpt_av ) ) THEN |
---|
| 357 | ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 358 | ENDIF |
---|
[1353] | 359 | lpt_av = 0.0_wp |
---|
[771] | 360 | |
---|
[1] | 361 | CASE ( 'lwp*' ) |
---|
| 362 | IF ( .NOT. ALLOCATED( lwp_av ) ) THEN |
---|
[667] | 363 | ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 364 | ENDIF |
---|
[1353] | 365 | lwp_av = 0.0_wp |
---|
[1] | 366 | |
---|
[1691] | 367 | CASE ( 'ol*' ) |
---|
| 368 | IF ( .NOT. ALLOCATED( ol_av ) ) THEN |
---|
| 369 | ALLOCATE( ol_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 370 | ENDIF |
---|
| 371 | ol_av = 0.0_wp |
---|
| 372 | |
---|
[1] | 373 | CASE ( 'p' ) |
---|
| 374 | IF ( .NOT. ALLOCATED( p_av ) ) THEN |
---|
[667] | 375 | ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 376 | ENDIF |
---|
[1353] | 377 | p_av = 0.0_wp |
---|
[1] | 378 | |
---|
| 379 | CASE ( 'pc' ) |
---|
| 380 | IF ( .NOT. ALLOCATED( pc_av ) ) THEN |
---|
[667] | 381 | ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 382 | ENDIF |
---|
[1353] | 383 | pc_av = 0.0_wp |
---|
[1] | 384 | |
---|
| 385 | CASE ( 'pr' ) |
---|
| 386 | IF ( .NOT. ALLOCATED( pr_av ) ) THEN |
---|
[667] | 387 | ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 388 | ENDIF |
---|
[1353] | 389 | pr_av = 0.0_wp |
---|
[1] | 390 | |
---|
[3421] | 391 | CASE ( 'theta' ) |
---|
[1] | 392 | IF ( .NOT. ALLOCATED( pt_av ) ) THEN |
---|
[667] | 393 | ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 394 | ENDIF |
---|
[1353] | 395 | pt_av = 0.0_wp |
---|
[1] | 396 | |
---|
| 397 | CASE ( 'q' ) |
---|
| 398 | IF ( .NOT. ALLOCATED( q_av ) ) THEN |
---|
[667] | 399 | ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 400 | ENDIF |
---|
[1353] | 401 | q_av = 0.0_wp |
---|
[1] | 402 | |
---|
| 403 | CASE ( 'ql' ) |
---|
| 404 | IF ( .NOT. ALLOCATED( ql_av ) ) THEN |
---|
[667] | 405 | ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 406 | ENDIF |
---|
[1353] | 407 | ql_av = 0.0_wp |
---|
[1] | 408 | |
---|
| 409 | CASE ( 'ql_c' ) |
---|
| 410 | IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN |
---|
[667] | 411 | ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 412 | ENDIF |
---|
[1353] | 413 | ql_c_av = 0.0_wp |
---|
[1] | 414 | |
---|
| 415 | CASE ( 'ql_v' ) |
---|
| 416 | IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN |
---|
[667] | 417 | ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 418 | ENDIF |
---|
[1353] | 419 | ql_v_av = 0.0_wp |
---|
[1] | 420 | |
---|
| 421 | CASE ( 'ql_vp' ) |
---|
| 422 | IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN |
---|
[667] | 423 | ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 424 | ENDIF |
---|
[1353] | 425 | ql_vp_av = 0.0_wp |
---|
[1] | 426 | |
---|
[354] | 427 | CASE ( 'qsws*' ) |
---|
| 428 | IF ( .NOT. ALLOCATED( qsws_av ) ) THEN |
---|
[667] | 429 | ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 430 | ENDIF |
---|
[1353] | 431 | qsws_av = 0.0_wp |
---|
[354] | 432 | |
---|
[1] | 433 | CASE ( 'qv' ) |
---|
| 434 | IF ( .NOT. ALLOCATED( qv_av ) ) THEN |
---|
[667] | 435 | ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 436 | ENDIF |
---|
[1353] | 437 | qv_av = 0.0_wp |
---|
[1] | 438 | |
---|
[2735] | 439 | CASE ( 'r_a*' ) |
---|
| 440 | IF ( .NOT. ALLOCATED( r_a_av ) ) THEN |
---|
| 441 | ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 442 | ENDIF |
---|
| 443 | r_a_av = 0.0_wp |
---|
| 444 | |
---|
[1] | 445 | CASE ( 's' ) |
---|
| 446 | IF ( .NOT. ALLOCATED( s_av ) ) THEN |
---|
[667] | 447 | ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 448 | ENDIF |
---|
[1353] | 449 | s_av = 0.0_wp |
---|
[1] | 450 | |
---|
[354] | 451 | CASE ( 'shf*' ) |
---|
| 452 | IF ( .NOT. ALLOCATED( shf_av ) ) THEN |
---|
[667] | 453 | ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 454 | ENDIF |
---|
[1353] | 455 | shf_av = 0.0_wp |
---|
[2024] | 456 | |
---|
| 457 | CASE ( 'ssws*' ) |
---|
| 458 | IF ( .NOT. ALLOCATED( ssws_av ) ) THEN |
---|
| 459 | ALLOCATE( ssws_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 460 | ENDIF |
---|
| 461 | ssws_av = 0.0_wp |
---|
[354] | 462 | |
---|
[1] | 463 | CASE ( 't*' ) |
---|
| 464 | IF ( .NOT. ALLOCATED( ts_av ) ) THEN |
---|
[667] | 465 | ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 466 | ENDIF |
---|
[1353] | 467 | ts_av = 0.0_wp |
---|
[1] | 468 | |
---|
[2742] | 469 | CASE ( 'tsurf*' ) |
---|
| 470 | IF ( .NOT. ALLOCATED( tsurf_av ) ) THEN |
---|
| 471 | ALLOCATE( tsurf_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 472 | ENDIF |
---|
| 473 | tsurf_av = 0.0_wp |
---|
| 474 | |
---|
[1] | 475 | CASE ( 'u' ) |
---|
| 476 | IF ( .NOT. ALLOCATED( u_av ) ) THEN |
---|
[667] | 477 | ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 478 | ENDIF |
---|
[1353] | 479 | u_av = 0.0_wp |
---|
[1] | 480 | |
---|
[3421] | 481 | CASE ( 'us*' ) |
---|
[1] | 482 | IF ( .NOT. ALLOCATED( us_av ) ) THEN |
---|
[667] | 483 | ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 484 | ENDIF |
---|
[1353] | 485 | us_av = 0.0_wp |
---|
[1] | 486 | |
---|
| 487 | CASE ( 'v' ) |
---|
| 488 | IF ( .NOT. ALLOCATED( v_av ) ) THEN |
---|
[667] | 489 | ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 490 | ENDIF |
---|
[1353] | 491 | v_av = 0.0_wp |
---|
[1] | 492 | |
---|
[3421] | 493 | CASE ( 'thetav' ) |
---|
[1] | 494 | IF ( .NOT. ALLOCATED( vpt_av ) ) THEN |
---|
[667] | 495 | ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 496 | ENDIF |
---|
[1353] | 497 | vpt_av = 0.0_wp |
---|
[1] | 498 | |
---|
[3597] | 499 | CASE ( 'theta_2m*' ) |
---|
| 500 | IF ( .NOT. ALLOCATED( pt_2m_av ) ) THEN |
---|
| 501 | ALLOCATE( pt_2m_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 502 | ENDIF |
---|
| 503 | pt_2m_av = 0.0_wp |
---|
| 504 | |
---|
[1] | 505 | CASE ( 'w' ) |
---|
| 506 | IF ( .NOT. ALLOCATED( w_av ) ) THEN |
---|
[667] | 507 | ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1] | 508 | ENDIF |
---|
[1353] | 509 | w_av = 0.0_wp |
---|
[1] | 510 | |
---|
[72] | 511 | CASE ( 'z0*' ) |
---|
| 512 | IF ( .NOT. ALLOCATED( z0_av ) ) THEN |
---|
[667] | 513 | ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) ) |
---|
[72] | 514 | ENDIF |
---|
[1353] | 515 | z0_av = 0.0_wp |
---|
[72] | 516 | |
---|
[978] | 517 | CASE ( 'z0h*' ) |
---|
| 518 | IF ( .NOT. ALLOCATED( z0h_av ) ) THEN |
---|
| 519 | ALLOCATE( z0h_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 520 | ENDIF |
---|
[1353] | 521 | z0h_av = 0.0_wp |
---|
[978] | 522 | |
---|
[1788] | 523 | CASE ( 'z0q*' ) |
---|
| 524 | IF ( .NOT. ALLOCATED( z0q_av ) ) THEN |
---|
| 525 | ALLOCATE( z0q_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 526 | ENDIF |
---|
| 527 | z0q_av = 0.0_wp |
---|
[3294] | 528 | |
---|
[2007] | 529 | |
---|
[1] | 530 | CASE DEFAULT |
---|
[1972] | 531 | |
---|
[1] | 532 | ! |
---|
[3637] | 533 | !-- Allocating and initializing data arrays for turbulence closure module |
---|
| 534 | CALL tcm_3d_data_averaging( 'allocate', trimvar ) |
---|
[3337] | 535 | |
---|
[3637] | 536 | ! |
---|
| 537 | !-- Allocating and initializing data arrays for all other modules |
---|
| 538 | CALL module_interface_3d_data_averaging( 'allocate', trimvar ) |
---|
[3337] | 539 | |
---|
[3274] | 540 | |
---|
[1] | 541 | END SELECT |
---|
| 542 | |
---|
| 543 | ENDDO |
---|
| 544 | |
---|
| 545 | ENDIF |
---|
| 546 | |
---|
| 547 | ! |
---|
| 548 | !-- Loop of all variables to be averaged. |
---|
| 549 | DO ii = 1, doav_n |
---|
[3337] | 550 | |
---|
| 551 | trimvar = TRIM( doav(ii) ) |
---|
[1] | 552 | ! |
---|
| 553 | !-- Store the array chosen on the temporary array. |
---|
[2007] | 554 | SELECT CASE ( trimvar ) |
---|
[1] | 555 | |
---|
[2797] | 556 | CASE ( 'ghf*' ) |
---|
[3004] | 557 | IF ( ALLOCATED( ghf_av ) ) THEN |
---|
[3170] | 558 | DO i = nxl, nxr |
---|
| 559 | DO j = nys, nyn |
---|
| 560 | ! |
---|
| 561 | !-- Check whether grid point is a natural- or urban-type |
---|
| 562 | !-- surface. |
---|
| 563 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 564 | surf_lsm_h%end_index(j,i) |
---|
| 565 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 566 | surf_usm_h%end_index(j,i) |
---|
| 567 | ! |
---|
| 568 | !-- In order to avoid double-counting of surface properties, |
---|
| 569 | !-- always assume that natural-type surfaces are below urban- |
---|
| 570 | !-- type surfaces, e.g. in case of bridges. |
---|
| 571 | !-- Further, take only the last suface element, i.e. the |
---|
| 572 | !-- uppermost surface which would be visible from above |
---|
| 573 | IF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 574 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 575 | ghf_av(j,i) = ghf_av(j,i) + & |
---|
[3170] | 576 | surf_lsm_h%ghf(m) |
---|
| 577 | ELSEIF ( match_usm ) THEN |
---|
| 578 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 579 | ghf_av(j,i) = ghf_av(j,i) + & |
---|
[3170] | 580 | surf_usm_h%frac(ind_veg_wall,m) * & |
---|
| 581 | surf_usm_h%wghf_eb(m) + & |
---|
| 582 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
| 583 | surf_usm_h%wghf_eb_green(m) + & |
---|
| 584 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
| 585 | surf_usm_h%wghf_eb_window(m) |
---|
| 586 | ENDIF |
---|
| 587 | ENDDO |
---|
[3004] | 588 | ENDDO |
---|
| 589 | ENDIF |
---|
[2797] | 590 | |
---|
[1] | 591 | CASE ( 'e' ) |
---|
[3004] | 592 | IF ( ALLOCATED( e_av ) ) THEN |
---|
| 593 | DO i = nxlg, nxrg |
---|
| 594 | DO j = nysg, nyng |
---|
| 595 | DO k = nzb, nzt+1 |
---|
| 596 | e_av(k,j,i) = e_av(k,j,i) + e(k,j,i) |
---|
| 597 | ENDDO |
---|
[1] | 598 | ENDDO |
---|
| 599 | ENDDO |
---|
[3004] | 600 | ENDIF |
---|
[1] | 601 | |
---|
[3421] | 602 | CASE ( 'thetal' ) |
---|
[3004] | 603 | IF ( ALLOCATED( lpt_av ) ) THEN |
---|
| 604 | DO i = nxlg, nxrg |
---|
| 605 | DO j = nysg, nyng |
---|
| 606 | DO k = nzb, nzt+1 |
---|
| 607 | lpt_av(k,j,i) = lpt_av(k,j,i) + pt(k,j,i) |
---|
| 608 | ENDDO |
---|
[771] | 609 | ENDDO |
---|
| 610 | ENDDO |
---|
[3004] | 611 | ENDIF |
---|
[771] | 612 | |
---|
[1] | 613 | CASE ( 'lwp*' ) |
---|
[3004] | 614 | IF ( ALLOCATED( lwp_av ) ) THEN |
---|
| 615 | DO i = nxlg, nxrg |
---|
| 616 | DO j = nysg, nyng |
---|
| 617 | lwp_av(j,i) = lwp_av(j,i) + SUM( ql(nzb:nzt,j,i) & |
---|
| 618 | * dzw(1:nzt+1) ) * rho_surface |
---|
| 619 | ENDDO |
---|
[1] | 620 | ENDDO |
---|
[3004] | 621 | ENDIF |
---|
[1] | 622 | |
---|
[1691] | 623 | CASE ( 'ol*' ) |
---|
[3004] | 624 | IF ( ALLOCATED( ol_av ) ) THEN |
---|
[3170] | 625 | DO i = nxl, nxr |
---|
| 626 | DO j = nys, nyn |
---|
| 627 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 628 | surf_def_h(0)%end_index(j,i) |
---|
| 629 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 630 | surf_lsm_h%end_index(j,i) |
---|
| 631 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 632 | surf_usm_h%end_index(j,i) |
---|
| 633 | |
---|
| 634 | IF ( match_def ) THEN |
---|
| 635 | m = surf_def_h(0)%end_index(j,i) |
---|
[3173] | 636 | ol_av(j,i) = ol_av(j,i) + & |
---|
[3170] | 637 | surf_def_h(0)%ol(m) |
---|
| 638 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 639 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 640 | ol_av(j,i) = ol_av(j,i) + & |
---|
[3170] | 641 | surf_lsm_h%ol(m) |
---|
| 642 | ELSEIF ( match_usm ) THEN |
---|
| 643 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 644 | ol_av(j,i) = ol_av(j,i) + & |
---|
[3170] | 645 | surf_usm_h%ol(m) |
---|
| 646 | ENDIF |
---|
| 647 | ENDDO |
---|
[3004] | 648 | ENDDO |
---|
| 649 | ENDIF |
---|
[1691] | 650 | |
---|
[1] | 651 | CASE ( 'p' ) |
---|
[3004] | 652 | IF ( ALLOCATED( p_av ) ) THEN |
---|
| 653 | DO i = nxlg, nxrg |
---|
| 654 | DO j = nysg, nyng |
---|
| 655 | DO k = nzb, nzt+1 |
---|
| 656 | p_av(k,j,i) = p_av(k,j,i) + p(k,j,i) |
---|
| 657 | ENDDO |
---|
[1] | 658 | ENDDO |
---|
| 659 | ENDDO |
---|
[3004] | 660 | ENDIF |
---|
[1] | 661 | |
---|
| 662 | CASE ( 'pc' ) |
---|
[3004] | 663 | IF ( ALLOCATED( pc_av ) ) THEN |
---|
| 664 | DO i = nxl, nxr |
---|
| 665 | DO j = nys, nyn |
---|
| 666 | DO k = nzb, nzt+1 |
---|
| 667 | pc_av(k,j,i) = pc_av(k,j,i) + prt_count(k,j,i) |
---|
| 668 | ENDDO |
---|
[1] | 669 | ENDDO |
---|
| 670 | ENDDO |
---|
[3004] | 671 | ENDIF |
---|
[1] | 672 | |
---|
| 673 | CASE ( 'pr' ) |
---|
[3004] | 674 | IF ( ALLOCATED( pr_av ) ) THEN |
---|
| 675 | DO i = nxl, nxr |
---|
| 676 | DO j = nys, nyn |
---|
| 677 | DO k = nzb, nzt+1 |
---|
| 678 | number_of_particles = prt_count(k,j,i) |
---|
| 679 | IF ( number_of_particles <= 0 ) CYCLE |
---|
| 680 | particles => & |
---|
| 681 | grid_particles(k,j,i)%particles(1:number_of_particles) |
---|
| 682 | s_r2 = 0.0_wp |
---|
| 683 | s_r3 = 0.0_wp |
---|
[1359] | 684 | |
---|
[3004] | 685 | DO n = 1, number_of_particles |
---|
| 686 | IF ( particles(n)%particle_mask ) THEN |
---|
| 687 | s_r2 = s_r2 + particles(n)%radius**2 * & |
---|
| 688 | particles(n)%weight_factor |
---|
| 689 | s_r3 = s_r3 + particles(n)%radius**3 * & |
---|
| 690 | particles(n)%weight_factor |
---|
| 691 | ENDIF |
---|
| 692 | ENDDO |
---|
| 693 | |
---|
| 694 | IF ( s_r2 > 0.0_wp ) THEN |
---|
| 695 | mean_r = s_r3 / s_r2 |
---|
| 696 | ELSE |
---|
| 697 | mean_r = 0.0_wp |
---|
[1359] | 698 | ENDIF |
---|
[3004] | 699 | pr_av(k,j,i) = pr_av(k,j,i) + mean_r |
---|
[1] | 700 | ENDDO |
---|
| 701 | ENDDO |
---|
| 702 | ENDDO |
---|
[3004] | 703 | ENDIF |
---|
[1] | 704 | |
---|
[3421] | 705 | CASE ( 'theta' ) |
---|
[3004] | 706 | IF ( ALLOCATED( pt_av ) ) THEN |
---|
[3274] | 707 | IF ( .NOT. bulk_cloud_model ) THEN |
---|
[3004] | 708 | DO i = nxlg, nxrg |
---|
| 709 | DO j = nysg, nyng |
---|
| 710 | DO k = nzb, nzt+1 |
---|
| 711 | pt_av(k,j,i) = pt_av(k,j,i) + pt(k,j,i) |
---|
| 712 | ENDDO |
---|
[1] | 713 | ENDDO |
---|
| 714 | ENDDO |
---|
[3004] | 715 | ELSE |
---|
| 716 | DO i = nxlg, nxrg |
---|
| 717 | DO j = nysg, nyng |
---|
| 718 | DO k = nzb, nzt+1 |
---|
[3274] | 719 | pt_av(k,j,i) = pt_av(k,j,i) + pt(k,j,i) + lv_d_cp * & |
---|
| 720 | d_exner(k) * ql(k,j,i) |
---|
[3004] | 721 | ENDDO |
---|
[1] | 722 | ENDDO |
---|
| 723 | ENDDO |
---|
[3004] | 724 | ENDIF |
---|
[1] | 725 | ENDIF |
---|
| 726 | |
---|
| 727 | CASE ( 'q' ) |
---|
[3004] | 728 | IF ( ALLOCATED( q_av ) ) THEN |
---|
| 729 | DO i = nxlg, nxrg |
---|
| 730 | DO j = nysg, nyng |
---|
| 731 | DO k = nzb, nzt+1 |
---|
| 732 | q_av(k,j,i) = q_av(k,j,i) + q(k,j,i) |
---|
| 733 | ENDDO |
---|
[1] | 734 | ENDDO |
---|
| 735 | ENDDO |
---|
[3004] | 736 | ENDIF |
---|
[402] | 737 | |
---|
[1] | 738 | CASE ( 'ql' ) |
---|
[3004] | 739 | IF ( ALLOCATED( ql_av ) ) THEN |
---|
| 740 | DO i = nxlg, nxrg |
---|
| 741 | DO j = nysg, nyng |
---|
| 742 | DO k = nzb, nzt+1 |
---|
| 743 | ql_av(k,j,i) = ql_av(k,j,i) + ql(k,j,i) |
---|
| 744 | ENDDO |
---|
[1] | 745 | ENDDO |
---|
| 746 | ENDDO |
---|
[3004] | 747 | ENDIF |
---|
[1] | 748 | |
---|
| 749 | CASE ( 'ql_c' ) |
---|
[3004] | 750 | IF ( ALLOCATED( ql_c_av ) ) THEN |
---|
| 751 | DO i = nxlg, nxrg |
---|
| 752 | DO j = nysg, nyng |
---|
| 753 | DO k = nzb, nzt+1 |
---|
| 754 | ql_c_av(k,j,i) = ql_c_av(k,j,i) + ql_c(k,j,i) |
---|
| 755 | ENDDO |
---|
[1] | 756 | ENDDO |
---|
| 757 | ENDDO |
---|
[3004] | 758 | ENDIF |
---|
[1] | 759 | |
---|
| 760 | CASE ( 'ql_v' ) |
---|
[3004] | 761 | IF ( ALLOCATED( ql_v_av ) ) THEN |
---|
| 762 | DO i = nxlg, nxrg |
---|
| 763 | DO j = nysg, nyng |
---|
| 764 | DO k = nzb, nzt+1 |
---|
| 765 | ql_v_av(k,j,i) = ql_v_av(k,j,i) + ql_v(k,j,i) |
---|
| 766 | ENDDO |
---|
[1] | 767 | ENDDO |
---|
| 768 | ENDDO |
---|
[3004] | 769 | ENDIF |
---|
[1] | 770 | |
---|
| 771 | CASE ( 'ql_vp' ) |
---|
[3004] | 772 | IF ( ALLOCATED( ql_vp_av ) ) THEN |
---|
| 773 | DO i = nxl, nxr |
---|
| 774 | DO j = nys, nyn |
---|
| 775 | DO k = nzb, nzt+1 |
---|
| 776 | number_of_particles = prt_count(k,j,i) |
---|
| 777 | IF ( number_of_particles <= 0 ) CYCLE |
---|
| 778 | particles => & |
---|
| 779 | grid_particles(k,j,i)%particles(1:number_of_particles) |
---|
| 780 | DO n = 1, number_of_particles |
---|
| 781 | IF ( particles(n)%particle_mask ) THEN |
---|
| 782 | ql_vp_av(k,j,i) = ql_vp_av(k,j,i) + & |
---|
| 783 | particles(n)%weight_factor / & |
---|
| 784 | number_of_particles |
---|
| 785 | ENDIF |
---|
| 786 | ENDDO |
---|
[1007] | 787 | ENDDO |
---|
[1] | 788 | ENDDO |
---|
| 789 | ENDDO |
---|
[3004] | 790 | ENDIF |
---|
[1] | 791 | |
---|
[402] | 792 | CASE ( 'qsws*' ) |
---|
[2743] | 793 | ! |
---|
| 794 | !-- In case of default surfaces, clean-up flux by density. |
---|
| 795 | !-- In case of land- and urban-surfaces, convert fluxes into |
---|
| 796 | !-- dynamic units. |
---|
[3943] | 797 | !-- Question (maronga): are the .NOT. statements really required? |
---|
[3004] | 798 | IF ( ALLOCATED( qsws_av ) ) THEN |
---|
[3170] | 799 | DO i = nxl, nxr |
---|
| 800 | DO j = nys, nyn |
---|
| 801 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 802 | surf_def_h(0)%end_index(j,i) |
---|
| 803 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 804 | surf_lsm_h%end_index(j,i) |
---|
| 805 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 806 | surf_usm_h%end_index(j,i) |
---|
| 807 | |
---|
| 808 | IF ( match_def ) THEN |
---|
| 809 | m = surf_def_h(0)%end_index(j,i) |
---|
[3173] | 810 | qsws_av(j,i) = qsws_av(j,i) + & |
---|
[3170] | 811 | surf_def_h(0)%qsws(m) * & |
---|
[3285] | 812 | waterflux_output_conversion(nzb) |
---|
[3170] | 813 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 814 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 815 | qsws_av(j,i) = qsws_av(j,i) + & |
---|
[3170] | 816 | surf_lsm_h%qsws(m) * l_v |
---|
[3943] | 817 | ELSEIF ( match_usm .AND. .NOT. match_lsm ) THEN |
---|
| 818 | m = surf_usm_h%end_index(j,i) |
---|
| 819 | qsws_av(j,i) = qsws_av(j,i) + & |
---|
| 820 | surf_usm_h%qsws(m) * l_v |
---|
[3170] | 821 | ENDIF |
---|
| 822 | ENDDO |
---|
[3004] | 823 | ENDDO |
---|
| 824 | ENDIF |
---|
[402] | 825 | |
---|
[1] | 826 | CASE ( 'qv' ) |
---|
[3004] | 827 | IF ( ALLOCATED( qv_av ) ) THEN |
---|
| 828 | DO i = nxlg, nxrg |
---|
| 829 | DO j = nysg, nyng |
---|
| 830 | DO k = nzb, nzt+1 |
---|
| 831 | qv_av(k,j,i) = qv_av(k,j,i) + q(k,j,i) - ql(k,j,i) |
---|
| 832 | ENDDO |
---|
[1] | 833 | ENDDO |
---|
| 834 | ENDDO |
---|
[3004] | 835 | ENDIF |
---|
[1] | 836 | |
---|
[2735] | 837 | CASE ( 'r_a*' ) |
---|
[3004] | 838 | IF ( ALLOCATED( r_a_av ) ) THEN |
---|
[3170] | 839 | DO i = nxl, nxr |
---|
| 840 | DO j = nys, nyn |
---|
| 841 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 842 | surf_lsm_h%end_index(j,i) |
---|
| 843 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 844 | surf_usm_h%end_index(j,i) |
---|
| 845 | |
---|
| 846 | IF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 847 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 848 | r_a_av(j,i) = r_a_av(j,i) + & |
---|
[3170] | 849 | surf_lsm_h%r_a(m) |
---|
| 850 | ELSEIF ( match_usm ) THEN |
---|
| 851 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 852 | r_a_av(j,i) = r_a_av(j,i) + & |
---|
[3170] | 853 | surf_usm_h%frac(ind_veg_wall,m) * & |
---|
| 854 | surf_usm_h%r_a(m) + & |
---|
| 855 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
| 856 | surf_usm_h%r_a_green(m) + & |
---|
| 857 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
| 858 | surf_usm_h%r_a_window(m) |
---|
| 859 | ENDIF |
---|
| 860 | ENDDO |
---|
[3004] | 861 | ENDDO |
---|
| 862 | ENDIF |
---|
[2735] | 863 | |
---|
[1] | 864 | CASE ( 's' ) |
---|
[3004] | 865 | IF ( ALLOCATED( s_av ) ) THEN |
---|
| 866 | DO i = nxlg, nxrg |
---|
| 867 | DO j = nysg, nyng |
---|
| 868 | DO k = nzb, nzt+1 |
---|
| 869 | s_av(k,j,i) = s_av(k,j,i) + s(k,j,i) |
---|
| 870 | ENDDO |
---|
[1] | 871 | ENDDO |
---|
| 872 | ENDDO |
---|
[3004] | 873 | ENDIF |
---|
[402] | 874 | |
---|
| 875 | CASE ( 'shf*' ) |
---|
[2743] | 876 | ! |
---|
| 877 | !-- In case of default surfaces, clean-up flux by density. |
---|
| 878 | !-- In case of land- and urban-surfaces, convert fluxes into |
---|
| 879 | !-- dynamic units. |
---|
[3004] | 880 | IF ( ALLOCATED( shf_av ) ) THEN |
---|
[3170] | 881 | DO i = nxl, nxr |
---|
| 882 | DO j = nys, nyn |
---|
| 883 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 884 | surf_def_h(0)%end_index(j,i) |
---|
| 885 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 886 | surf_lsm_h%end_index(j,i) |
---|
| 887 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 888 | surf_usm_h%end_index(j,i) |
---|
| 889 | |
---|
| 890 | IF ( match_def ) THEN |
---|
| 891 | m = surf_def_h(0)%end_index(j,i) |
---|
[3173] | 892 | shf_av(j,i) = shf_av(j,i) + & |
---|
[3170] | 893 | surf_def_h(0)%shf(m) * & |
---|
[3285] | 894 | heatflux_output_conversion(nzb) |
---|
[3170] | 895 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 896 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 897 | shf_av(j,i) = shf_av(j,i) + & |
---|
[3274] | 898 | surf_lsm_h%shf(m) * c_p |
---|
[3170] | 899 | ELSEIF ( match_usm ) THEN |
---|
| 900 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 901 | shf_av(j,i) = shf_av(j,i) + & |
---|
[3274] | 902 | surf_usm_h%shf(m) * c_p |
---|
[3170] | 903 | ENDIF |
---|
| 904 | ENDDO |
---|
[3004] | 905 | ENDDO |
---|
| 906 | ENDIF |
---|
[402] | 907 | |
---|
[1960] | 908 | CASE ( 'ssws*' ) |
---|
[3004] | 909 | IF ( ALLOCATED( ssws_av ) ) THEN |
---|
[3170] | 910 | DO i = nxl, nxr |
---|
| 911 | DO j = nys, nyn |
---|
| 912 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 913 | surf_def_h(0)%end_index(j,i) |
---|
| 914 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 915 | surf_lsm_h%end_index(j,i) |
---|
| 916 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 917 | surf_usm_h%end_index(j,i) |
---|
| 918 | |
---|
| 919 | IF ( match_def ) THEN |
---|
| 920 | m = surf_def_h(0)%end_index(j,i) |
---|
[3173] | 921 | ssws_av(j,i) = ssws_av(j,i) + & |
---|
[3170] | 922 | surf_def_h(0)%ssws(m) |
---|
| 923 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 924 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 925 | ssws_av(j,i) = ssws_av(j,i) + & |
---|
[3170] | 926 | surf_lsm_h%ssws(m) |
---|
| 927 | ELSEIF ( match_usm ) THEN |
---|
| 928 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 929 | ssws_av(j,i) = ssws_av(j,i) + & |
---|
[3170] | 930 | surf_usm_h%ssws(m) |
---|
| 931 | ENDIF |
---|
| 932 | ENDDO |
---|
[3004] | 933 | ENDDO |
---|
| 934 | ENDIF |
---|
[1960] | 935 | |
---|
[3773] | 936 | CASE ( 'theta_2m*' ) |
---|
| 937 | IF ( ALLOCATED( pt_2m_av ) ) THEN |
---|
| 938 | DO i = nxl, nxr |
---|
| 939 | DO j = nys, nyn |
---|
| 940 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 941 | surf_def_h(0)%end_index(j,i) |
---|
| 942 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 943 | surf_lsm_h%end_index(j,i) |
---|
| 944 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 945 | surf_usm_h%end_index(j,i) |
---|
| 946 | |
---|
| 947 | IF ( match_def ) THEN |
---|
| 948 | m = surf_def_h(0)%end_index(j,i) |
---|
| 949 | pt_2m_av(j,i) = pt_2m_av(j,i) + & |
---|
| 950 | surf_def_h(0)%pt_2m(m) |
---|
| 951 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 952 | m = surf_lsm_h%end_index(j,i) |
---|
[3933] | 953 | pt_2m_av(j,i) = pt_2m_av(j,i) + & |
---|
[3773] | 954 | surf_lsm_h%pt_2m(m) |
---|
| 955 | ELSEIF ( match_usm ) THEN |
---|
| 956 | m = surf_usm_h%end_index(j,i) |
---|
| 957 | pt_2m_av(j,i) = pt_2m_av(j,i) + & |
---|
| 958 | surf_usm_h%pt_2m(m) |
---|
| 959 | ENDIF |
---|
| 960 | ENDDO |
---|
| 961 | ENDDO |
---|
| 962 | ENDIF |
---|
| 963 | |
---|
| 964 | |
---|
[1] | 965 | CASE ( 't*' ) |
---|
[3004] | 966 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
[3170] | 967 | DO i = nxl, nxr |
---|
| 968 | DO j = nys, nyn |
---|
| 969 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 970 | surf_def_h(0)%end_index(j,i) |
---|
| 971 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 972 | surf_lsm_h%end_index(j,i) |
---|
| 973 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 974 | surf_usm_h%end_index(j,i) |
---|
| 975 | |
---|
| 976 | IF ( match_def ) THEN |
---|
| 977 | m = surf_def_h(0)%end_index(j,i) |
---|
[3173] | 978 | ts_av(j,i) = ts_av(j,i) + & |
---|
[3170] | 979 | surf_def_h(0)%ts(m) |
---|
| 980 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 981 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 982 | ts_av(j,i) = ts_av(j,i) + & |
---|
[3170] | 983 | surf_lsm_h%ts(m) |
---|
| 984 | ELSEIF ( match_usm ) THEN |
---|
| 985 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 986 | ts_av(j,i) = ts_av(j,i) + & |
---|
[3170] | 987 | surf_usm_h%ts(m) |
---|
| 988 | ENDIF |
---|
| 989 | ENDDO |
---|
[3004] | 990 | ENDDO |
---|
| 991 | ENDIF |
---|
[1] | 992 | |
---|
[2742] | 993 | CASE ( 'tsurf*' ) |
---|
[3170] | 994 | IF ( ALLOCATED( tsurf_av ) ) THEN |
---|
| 995 | DO i = nxl, nxr |
---|
| 996 | DO j = nys, nyn |
---|
| 997 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 998 | surf_def_h(0)%end_index(j,i) |
---|
| 999 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 1000 | surf_lsm_h%end_index(j,i) |
---|
| 1001 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 1002 | surf_usm_h%end_index(j,i) |
---|
[2798] | 1003 | |
---|
[3170] | 1004 | IF ( match_def ) THEN |
---|
| 1005 | m = surf_def_h(0)%end_index(j,i) |
---|
| 1006 | tsurf_av(j,i) = tsurf_av(j,i) + & |
---|
| 1007 | surf_def_h(0)%pt_surface(m) |
---|
| 1008 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 1009 | m = surf_lsm_h%end_index(j,i) |
---|
| 1010 | tsurf_av(j,i) = tsurf_av(j,i) + & |
---|
| 1011 | surf_lsm_h%pt_surface(m) |
---|
| 1012 | ELSEIF ( match_usm ) THEN |
---|
| 1013 | m = surf_usm_h%end_index(j,i) |
---|
| 1014 | tsurf_av(j,i) = tsurf_av(j,i) + & |
---|
| 1015 | surf_usm_h%pt_surface(m) |
---|
| 1016 | ENDIF |
---|
| 1017 | ENDDO |
---|
[3004] | 1018 | ENDDO |
---|
| 1019 | ENDIF |
---|
[2742] | 1020 | |
---|
[1] | 1021 | CASE ( 'u' ) |
---|
[3004] | 1022 | IF ( ALLOCATED( u_av ) ) THEN |
---|
| 1023 | DO i = nxlg, nxrg |
---|
| 1024 | DO j = nysg, nyng |
---|
| 1025 | DO k = nzb, nzt+1 |
---|
| 1026 | u_av(k,j,i) = u_av(k,j,i) + u(k,j,i) |
---|
| 1027 | ENDDO |
---|
[1] | 1028 | ENDDO |
---|
| 1029 | ENDDO |
---|
[3004] | 1030 | ENDIF |
---|
[1] | 1031 | |
---|
[3421] | 1032 | CASE ( 'us*' ) |
---|
[3004] | 1033 | IF ( ALLOCATED( us_av ) ) THEN |
---|
[3170] | 1034 | DO i = nxl, nxr |
---|
| 1035 | DO j = nys, nyn |
---|
| 1036 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 1037 | surf_def_h(0)%end_index(j,i) |
---|
| 1038 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 1039 | surf_lsm_h%end_index(j,i) |
---|
| 1040 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 1041 | surf_usm_h%end_index(j,i) |
---|
| 1042 | |
---|
| 1043 | IF ( match_def ) THEN |
---|
| 1044 | m = surf_def_h(0)%end_index(j,i) |
---|
[3173] | 1045 | us_av(j,i) = us_av(j,i) + & |
---|
[3170] | 1046 | surf_def_h(0)%us(m) |
---|
| 1047 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 1048 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 1049 | us_av(j,i) = us_av(j,i) + & |
---|
[3170] | 1050 | surf_lsm_h%us(m) |
---|
| 1051 | ELSEIF ( match_usm ) THEN |
---|
| 1052 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 1053 | us_av(j,i) = us_av(j,i) + & |
---|
[3170] | 1054 | surf_usm_h%us(m) |
---|
| 1055 | ENDIF |
---|
| 1056 | ENDDO |
---|
[3004] | 1057 | ENDDO |
---|
| 1058 | ENDIF |
---|
[1] | 1059 | |
---|
| 1060 | CASE ( 'v' ) |
---|
[3004] | 1061 | IF ( ALLOCATED( v_av ) ) THEN |
---|
| 1062 | DO i = nxlg, nxrg |
---|
| 1063 | DO j = nysg, nyng |
---|
| 1064 | DO k = nzb, nzt+1 |
---|
| 1065 | v_av(k,j,i) = v_av(k,j,i) + v(k,j,i) |
---|
| 1066 | ENDDO |
---|
[1] | 1067 | ENDDO |
---|
| 1068 | ENDDO |
---|
[3004] | 1069 | ENDIF |
---|
[1] | 1070 | |
---|
[3421] | 1071 | CASE ( 'thetav' ) |
---|
[3004] | 1072 | IF ( ALLOCATED( vpt_av ) ) THEN |
---|
| 1073 | DO i = nxlg, nxrg |
---|
| 1074 | DO j = nysg, nyng |
---|
| 1075 | DO k = nzb, nzt+1 |
---|
| 1076 | vpt_av(k,j,i) = vpt_av(k,j,i) + vpt(k,j,i) |
---|
| 1077 | ENDDO |
---|
[1] | 1078 | ENDDO |
---|
| 1079 | ENDDO |
---|
[3004] | 1080 | ENDIF |
---|
[1] | 1081 | |
---|
| 1082 | CASE ( 'w' ) |
---|
[3004] | 1083 | IF ( ALLOCATED( w_av ) ) THEN |
---|
| 1084 | DO i = nxlg, nxrg |
---|
| 1085 | DO j = nysg, nyng |
---|
| 1086 | DO k = nzb, nzt+1 |
---|
| 1087 | w_av(k,j,i) = w_av(k,j,i) + w(k,j,i) |
---|
| 1088 | ENDDO |
---|
[1] | 1089 | ENDDO |
---|
| 1090 | ENDDO |
---|
[3004] | 1091 | ENDIF |
---|
[1] | 1092 | |
---|
[72] | 1093 | CASE ( 'z0*' ) |
---|
[3004] | 1094 | IF ( ALLOCATED( z0_av ) ) THEN |
---|
[3170] | 1095 | DO i = nxl, nxr |
---|
| 1096 | DO j = nys, nyn |
---|
| 1097 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 1098 | surf_def_h(0)%end_index(j,i) |
---|
| 1099 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 1100 | surf_lsm_h%end_index(j,i) |
---|
| 1101 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 1102 | surf_usm_h%end_index(j,i) |
---|
| 1103 | |
---|
| 1104 | IF ( match_def ) THEN |
---|
| 1105 | m = surf_def_h(0)%end_index(j,i) |
---|
[3173] | 1106 | z0_av(j,i) = z0_av(j,i) + & |
---|
[3170] | 1107 | surf_def_h(0)%z0(m) |
---|
| 1108 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 1109 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 1110 | z0_av(j,i) = z0_av(j,i) + & |
---|
[3170] | 1111 | surf_lsm_h%z0(m) |
---|
| 1112 | ELSEIF ( match_usm ) THEN |
---|
| 1113 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 1114 | z0_av(j,i) = z0_av(j,i) + & |
---|
[3170] | 1115 | surf_usm_h%z0(m) |
---|
| 1116 | ENDIF |
---|
| 1117 | ENDDO |
---|
| 1118 | ENDDO |
---|
[3004] | 1119 | ENDIF |
---|
[72] | 1120 | |
---|
[978] | 1121 | CASE ( 'z0h*' ) |
---|
[3004] | 1122 | IF ( ALLOCATED( z0h_av ) ) THEN |
---|
[3170] | 1123 | DO i = nxl, nxr |
---|
| 1124 | DO j = nys, nyn |
---|
| 1125 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 1126 | surf_def_h(0)%end_index(j,i) |
---|
| 1127 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 1128 | surf_lsm_h%end_index(j,i) |
---|
| 1129 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 1130 | surf_usm_h%end_index(j,i) |
---|
| 1131 | |
---|
| 1132 | IF ( match_def ) THEN |
---|
| 1133 | m = surf_def_h(0)%end_index(j,i) |
---|
[3173] | 1134 | z0h_av(j,i) = z0h_av(j,i) + & |
---|
[3170] | 1135 | surf_def_h(0)%z0h(m) |
---|
| 1136 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 1137 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 1138 | z0h_av(j,i) = z0h_av(j,i) + & |
---|
[3170] | 1139 | surf_lsm_h%z0h(m) |
---|
| 1140 | ELSEIF ( match_usm ) THEN |
---|
| 1141 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 1142 | z0h_av(j,i) = z0h_av(j,i) + & |
---|
[3170] | 1143 | surf_usm_h%z0h(m) |
---|
| 1144 | ENDIF |
---|
| 1145 | ENDDO |
---|
[3004] | 1146 | ENDDO |
---|
| 1147 | ENDIF |
---|
| 1148 | |
---|
[1788] | 1149 | CASE ( 'z0q*' ) |
---|
[3004] | 1150 | IF ( ALLOCATED( z0q_av ) ) THEN |
---|
[3170] | 1151 | DO i = nxl, nxr |
---|
| 1152 | DO j = nys, nyn |
---|
| 1153 | match_def = surf_def_h(0)%start_index(j,i) <= & |
---|
| 1154 | surf_def_h(0)%end_index(j,i) |
---|
| 1155 | match_lsm = surf_lsm_h%start_index(j,i) <= & |
---|
| 1156 | surf_lsm_h%end_index(j,i) |
---|
| 1157 | match_usm = surf_usm_h%start_index(j,i) <= & |
---|
| 1158 | surf_usm_h%end_index(j,i) |
---|
| 1159 | |
---|
| 1160 | IF ( match_def ) THEN |
---|
| 1161 | m = surf_def_h(0)%end_index(j,i) |
---|
[3173] | 1162 | z0q_av(j,i) = z0q_av(j,i) + & |
---|
[3170] | 1163 | surf_def_h(0)%z0q(m) |
---|
| 1164 | ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN |
---|
| 1165 | m = surf_lsm_h%end_index(j,i) |
---|
[3173] | 1166 | z0q_av(j,i) = z0q_av(j,i) + & |
---|
[3170] | 1167 | surf_lsm_h%z0q(m) |
---|
| 1168 | ELSEIF ( match_usm ) THEN |
---|
| 1169 | m = surf_usm_h%end_index(j,i) |
---|
[3173] | 1170 | z0q_av(j,i) = z0q_av(j,i) + & |
---|
[3170] | 1171 | surf_usm_h%z0q(m) |
---|
| 1172 | ENDIF |
---|
| 1173 | ENDDO |
---|
[3004] | 1174 | ENDDO |
---|
| 1175 | ENDIF |
---|
[3294] | 1176 | |
---|
[1] | 1177 | CASE DEFAULT |
---|
[3274] | 1178 | |
---|
[3337] | 1179 | !-- In case of urban surface variables it should be always checked |
---|
| 1180 | !-- if respective arrays are allocated, at least in case of a restart |
---|
| 1181 | !-- run, as averaged usm arrays are not read from file at the moment. |
---|
[3637] | 1182 | IF ( urban_surface ) THEN |
---|
| 1183 | CALL usm_3d_data_averaging( 'allocate', trimvar ) |
---|
[3337] | 1184 | ENDIF |
---|
| 1185 | |
---|
[2696] | 1186 | ! |
---|
[3637] | 1187 | !-- Summing up data from turbulence closure module |
---|
| 1188 | CALL tcm_3d_data_averaging( 'sum', trimvar ) |
---|
[1] | 1189 | |
---|
[3637] | 1190 | ! |
---|
| 1191 | !-- Summing up data from all other modules |
---|
| 1192 | CALL module_interface_3d_data_averaging( 'sum', trimvar ) |
---|
| 1193 | |
---|
| 1194 | |
---|
[1] | 1195 | END SELECT |
---|
| 1196 | |
---|
| 1197 | ENDDO |
---|
| 1198 | |
---|
[1318] | 1199 | CALL cpu_log( log_point(34), 'sum_up_3d_data', 'stop' ) |
---|
[1] | 1200 | |
---|
| 1201 | |
---|
| 1202 | END SUBROUTINE sum_up_3d_data |
---|