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