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