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