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