[2737] | 1 | !> @file urban_surface_mod.f90 |
---|
| 2 | !------------------------------------------------------------------------------! |
---|
| 3 | ! This file is part of the PALM model system. |
---|
| 4 | ! |
---|
| 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. |
---|
| 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 | ! |
---|
| 17 | ! Copyright 2015-2018 Czech Technical University in Prague |
---|
[2920] | 18 | ! Copyright 2015-2018 Institute of Computer Science of the |
---|
| 19 | ! Czech Academy of Sciences, Prague |
---|
[2737] | 20 | ! Copyright 1997-2018 Leibniz Universitaet Hannover |
---|
| 21 | !------------------------------------------------------------------------------! |
---|
| 22 | ! |
---|
| 23 | ! Current revisions: |
---|
| 24 | ! ------------------ |
---|
[2705] | 25 | ! |
---|
[3049] | 26 | ! |
---|
[2737] | 27 | ! Former revisions: |
---|
| 28 | ! ----------------- |
---|
| 29 | ! $Id: urban_surface_mod.f90 3435 2018-10-26 18:25:44Z gronemeier $ |
---|
[3435] | 30 | ! Bugfix: allocate gamma_w_green_sat until nzt_wall+1 |
---|
| 31 | ! |
---|
| 32 | ! 3418 2018-10-24 16:07:39Z kanani |
---|
[3418] | 33 | ! (rvtils, srissman) |
---|
| 34 | ! -Updated building databse, two green roof types (ind_green_type_roof) |
---|
| 35 | ! -Latent heat flux for green walls and roofs, new output of latent heatflux |
---|
| 36 | ! and soil water content of green roof substrate |
---|
| 37 | ! -t_surf changed to t_surf_wall |
---|
| 38 | ! -Added namelist parameter usm_wall_mod for lower wall tendency |
---|
| 39 | ! of first two wall layers during spinup |
---|
| 40 | ! -Window calculations deactivated during spinup |
---|
| 41 | ! |
---|
| 42 | ! 3382 2018-10-19 13:10:32Z knoop |
---|
[3382] | 43 | ! Bugix: made array declaration Fortran Standard conform |
---|
| 44 | ! |
---|
| 45 | ! 3378 2018-10-19 12:34:59Z kanani |
---|
[3378] | 46 | ! merge from radiation branch (r3362) into trunk |
---|
| 47 | ! (moh.hefny): |
---|
| 48 | ! - check the requested output variables if they are correct |
---|
| 49 | ! - added unscheduled_radiation_calls switch to control force_radiation_call |
---|
| 50 | ! - minor formate changes |
---|
| 51 | ! |
---|
| 52 | ! 3371 2018-10-18 13:40:12Z knoop |
---|
[3351] | 53 | ! Set flag indicating that albedo at urban surfaces is already initialized |
---|
| 54 | ! |
---|
| 55 | ! 3347 2018-10-15 14:21:08Z suehring |
---|
[3347] | 56 | ! Enable USM initialization with default building parameters in case no static |
---|
| 57 | ! input file exist. |
---|
| 58 | ! |
---|
| 59 | ! 3343 2018-10-15 10:38:52Z suehring |
---|
[3337] | 60 | ! Add output variables usm_rad_pc_inlw, usm_rad_pc_insw* |
---|
| 61 | ! |
---|
| 62 | ! 3274 2018-09-24 15:42:55Z knoop |
---|
[3274] | 63 | ! Modularization of all bulk cloud physics code components |
---|
| 64 | ! |
---|
| 65 | ! 3248 2018-09-14 09:42:06Z sward |
---|
[3248] | 66 | ! Minor formating changes |
---|
| 67 | ! |
---|
| 68 | ! 3246 2018-09-13 15:14:50Z sward |
---|
[3246] | 69 | ! Added error handling for input namelist via parin_fail_message |
---|
| 70 | ! |
---|
| 71 | ! 3241 2018-09-12 15:02:00Z raasch |
---|
[3241] | 72 | ! unused variables removed |
---|
| 73 | ! |
---|
| 74 | ! 3223 2018-08-30 13:48:17Z suehring |
---|
[3223] | 75 | ! Bugfix for commit 3222 |
---|
| 76 | ! |
---|
| 77 | ! 3222 2018-08-30 13:35:35Z suehring |
---|
[3222] | 78 | ! Introduction of surface array for type and its name |
---|
| 79 | ! |
---|
| 80 | ! 3203 2018-08-23 10:48:36Z suehring |
---|
[3203] | 81 | ! Revise bulk parameter for emissivity at ground-floor level |
---|
| 82 | ! |
---|
| 83 | ! 3196 2018-08-13 12:26:14Z maronga |
---|
[3196] | 84 | ! Added maximum aerodynamic resistance of 300 for horiztonal surfaces. |
---|
| 85 | ! |
---|
| 86 | ! 3176 2018-07-26 17:12:48Z suehring |
---|
[3176] | 87 | ! Bugfix, update virtual potential surface temparture, else heat fluxes on |
---|
| 88 | ! roofs might become unphysical |
---|
| 89 | ! |
---|
| 90 | ! 3152 2018-07-19 13:26:52Z suehring |
---|
[3152] | 91 | ! Initialize q_surface, which might be used in surface_layer_fluxes |
---|
| 92 | ! |
---|
| 93 | ! 3151 2018-07-19 08:45:38Z raasch |
---|
[3151] | 94 | ! remaining preprocessor define strings __check removed |
---|
| 95 | ! |
---|
| 96 | ! 3136 2018-07-16 14:48:21Z suehring |
---|
[3136] | 97 | ! Limit also roughness length for heat and moisture where necessary |
---|
| 98 | ! |
---|
| 99 | ! 3123 2018-07-12 16:21:53Z suehring |
---|
[3123] | 100 | ! Correct working precision for INTEGER number |
---|
| 101 | ! |
---|
| 102 | ! 3115 2018-07-10 12:49:26Z suehring |
---|
[3115] | 103 | ! Additional building type to represent bridges |
---|
| 104 | ! |
---|
| 105 | ! 3091 2018-06-28 16:20:35Z suehring |
---|
[3091] | 106 | ! - Limit aerodynamic resistance at vertical walls. |
---|
| 107 | ! - Add check for local roughness length not exceeding surface-layer height and |
---|
| 108 | ! limit roughness length where necessary. |
---|
| 109 | ! |
---|
| 110 | ! 3065 2018-06-12 07:03:02Z Giersch |
---|
[3065] | 111 | ! Unused array dxdir was removed, dz was replaced by dzu to consider vertical |
---|
| 112 | ! grid stretching |
---|
| 113 | ! |
---|
| 114 | ! 3049 2018-05-29 13:52:36Z Giersch |
---|
[3049] | 115 | ! Error messages revised |
---|
| 116 | ! |
---|
| 117 | ! 3045 2018-05-28 07:55:41Z Giersch |
---|
[3045] | 118 | ! Error message added |
---|
| 119 | ! |
---|
| 120 | ! 3029 2018-05-23 12:19:17Z raasch |
---|
[3029] | 121 | ! bugfix: close unit 151 instead of 90 |
---|
| 122 | ! |
---|
| 123 | ! 3014 2018-05-09 08:42:38Z maronga |
---|
[3014] | 124 | ! Added pc_transpiration_rate |
---|
| 125 | ! |
---|
| 126 | ! 2977 2018-04-17 10:27:57Z kanani |
---|
[2977] | 127 | ! Implement changes from branch radiation (r2948-2971) with minor modifications. |
---|
| 128 | ! (moh.hefny): |
---|
| 129 | ! Extended exn for all model domain height to avoid the need to get nzut. |
---|
| 130 | ! |
---|
| 131 | ! 2963 2018-04-12 14:47:44Z suehring |
---|
[2963] | 132 | ! Introduce index for vegetation/wall, pavement/green-wall and water/window |
---|
| 133 | ! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. . |
---|
| 134 | ! |
---|
| 135 | ! 2943 2018-04-03 16:17:10Z suehring |
---|
[2943] | 136 | ! Calculate exner function at all height levels and remove some un-used |
---|
| 137 | ! variables. |
---|
| 138 | ! |
---|
| 139 | ! 2932 2018-03-26 09:39:22Z maronga |
---|
[2932] | 140 | ! renamed urban_surface_par to urban_surface_parameters |
---|
| 141 | ! |
---|
| 142 | ! 2921 2018-03-22 15:05:23Z Giersch |
---|
[2921] | 143 | ! The activation of spinup has been moved to parin |
---|
| 144 | ! |
---|
| 145 | ! 2920 2018-03-22 11:22:01Z kanani |
---|
[2920] | 146 | ! Remove unused pcbl, npcbl from ONLY list |
---|
| 147 | ! moh.hefny: |
---|
| 148 | ! Fixed bugs introduced by new structures and by moving radiation interaction |
---|
| 149 | ! into radiation_model_mod.f90. |
---|
| 150 | ! Bugfix: usm data output 3D didn't respect directions |
---|
| 151 | ! |
---|
| 152 | ! 2906 2018-03-19 08:56:40Z Giersch |
---|
[2906] | 153 | ! Local variable ids has to be initialized with a value of -1 in |
---|
| 154 | ! usm_average_3d_data |
---|
| 155 | ! |
---|
| 156 | ! 2894 2018-03-15 09:17:58Z Giersch |
---|
[2894] | 157 | ! Calculations of the index range of the subdomain on file which overlaps with |
---|
| 158 | ! the current subdomain are already done in read_restart_data_mod, |
---|
| 159 | ! usm_read/write_restart_data have been renamed to usm_r/wrd_local, variable |
---|
| 160 | ! named found has been introduced for checking if restart data was found, |
---|
| 161 | ! reading of restart strings has been moved completely to |
---|
| 162 | ! read_restart_data_mod, usm_rrd_local is already inside the overlap loop |
---|
| 163 | ! programmed in read_restart_data_mod, SAVE attribute added where necessary, |
---|
| 164 | ! deallocation and allocation of some arrays have been changed to take care of |
---|
| 165 | ! different restart files that can be opened (index i), the marker *** end usm |
---|
| 166 | ! *** is not necessary anymore, strings and their respective lengths are |
---|
| 167 | ! written out and read now in case of restart runs to get rid of prescribed |
---|
| 168 | ! character lengths |
---|
| 169 | ! |
---|
| 170 | ! 2805 2018-02-14 17:00:09Z suehring |
---|
[2805] | 171 | ! Initialization of resistances. |
---|
| 172 | ! |
---|
| 173 | ! 2797 2018-02-08 13:24:35Z suehring |
---|
[2797] | 174 | ! Comment concerning output of ground-heat flux added. |
---|
| 175 | ! |
---|
| 176 | ! 2766 2018-01-22 17:17:47Z kanani |
---|
[2766] | 177 | ! Removed redundant commas, added some blanks |
---|
| 178 | ! |
---|
| 179 | ! 2765 2018-01-22 11:34:58Z maronga |
---|
[2765] | 180 | ! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in |
---|
| 181 | ! building_pars |
---|
| 182 | ! |
---|
| 183 | ! 2750 2018-01-15 16:26:51Z knoop |
---|
[2746] | 184 | ! Move flag plant canopy to modules |
---|
| 185 | ! |
---|
| 186 | ! 2737 2018-01-11 14:58:11Z kanani |
---|
[2737] | 187 | ! Removed unused variables t_surf_whole... |
---|
| 188 | ! |
---|
| 189 | ! 2735 2018-01-11 12:01:27Z suehring |
---|
| 190 | ! resistances are saved in surface attributes |
---|
| 191 | ! |
---|
[2735] | 192 | ! 2723 2018-01-05 09:27:03Z maronga |
---|
[2737] | 193 | ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) |
---|
| 194 | ! |
---|
| 195 | ! 2720 2018-01-02 16:27:15Z kanani |
---|
| 196 | ! Correction of comment |
---|
| 197 | ! |
---|
| 198 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
| 199 | ! Corrected "Former revisions" section |
---|
| 200 | ! |
---|
| 201 | ! 2705 2017-12-18 11:26:23Z maronga |
---|
| 202 | ! Changes from last commit documented |
---|
| 203 | ! |
---|
| 204 | ! 2703 2017-12-15 20:12:38Z maronga |
---|
| 205 | ! Workaround for calculation of r_a |
---|
| 206 | ! |
---|
| 207 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
| 208 | ! - Change in file header (GPL part) |
---|
| 209 | ! - Bugfix in calculation of pt_surface and related fluxes. (BM) |
---|
| 210 | ! - Do not write surface temperatures onto pt array as this might cause |
---|
| 211 | ! problems with nesting. (MS) |
---|
| 212 | ! - Revised calculation of pt1 (now done in surface_layer_fluxes). |
---|
| 213 | ! Bugfix, f_shf_window and f_shf_green were not set at vertical surface |
---|
| 214 | ! elements. (MS) |
---|
| 215 | ! - merged with branch ebsolver |
---|
| 216 | ! green building surfaces do not evaporate yet |
---|
| 217 | ! properties of green wall layers and window layers are taken from wall layers |
---|
| 218 | ! this input data is missing. (RvT) |
---|
| 219 | ! - Merged with branch radiation (developed by Mohamed Salim) |
---|
| 220 | ! - Revised initialization. (MS) |
---|
| 221 | ! - Rename emiss_surf into emissivity, roughness_wall into z0, albedo_surf into |
---|
| 222 | ! albedo. (MS) |
---|
| 223 | ! - Move first call of usm_radiatin from usm_init to init_3d_model |
---|
| 224 | ! - fixed problem with near surface temperature |
---|
| 225 | ! - added near surface temperature t_surf_10cm_h(m), t_surf_10cm_v(l)%t(m) |
---|
| 226 | ! - does not work with temp profile including stability, ol |
---|
| 227 | ! t_surf_10cm = pt1 now |
---|
| 228 | ! - merged with 2357 bugfix, error message for nopointer version |
---|
| 229 | ! - added indoor model coupling with wall heat flux |
---|
| 230 | ! - added green substrate/ dry vegetation layer for buildings |
---|
| 231 | ! - merged with 2232 new surface-type structure |
---|
| 232 | ! - added transmissivity of window tiles |
---|
| 233 | ! - added MOSAIK tile approach for 3 different surfaces (RvT) |
---|
| 234 | ! |
---|
| 235 | ! 2583 2017-10-26 13:58:38Z knoop |
---|
| 236 | ! Bugfix: reverted MPI_Win_allocate_cptr introduction in last commit |
---|
| 237 | ! |
---|
| 238 | ! 2582 2017-10-26 13:19:46Z hellstea |
---|
| 239 | ! Workaround for gnufortran compiler added in usm_calc_svf. CALL MPI_Win_allocate is |
---|
| 240 | ! replaced by CALL MPI_Win_allocate_cptr if defined ( __gnufortran ). |
---|
| 241 | ! |
---|
| 242 | ! 2544 2017-10-13 18:09:32Z maronga |
---|
| 243 | ! Date and time quantities are now read from date_and_time_mod. Solar constant is |
---|
| 244 | ! read from radiation_model_mod |
---|
| 245 | ! |
---|
| 246 | ! 2516 2017-10-04 11:03:04Z suehring |
---|
| 247 | ! Remove tabs |
---|
| 248 | ! |
---|
| 249 | ! 2514 2017-10-04 09:52:37Z suehring |
---|
| 250 | ! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny |
---|
| 251 | ! no output of ghost layer data |
---|
| 252 | ! |
---|
| 253 | ! 2350 2017-08-15 11:48:26Z kanani |
---|
| 254 | ! Bugfix and error message for nopointer version. |
---|
| 255 | ! Additional "! defined(__nopointer)" as workaround to enable compilation of |
---|
| 256 | ! nopointer version. |
---|
| 257 | ! |
---|
| 258 | ! 2318 2017-07-20 17:27:44Z suehring |
---|
| 259 | ! Get topography top index via Function call |
---|
| 260 | ! |
---|
| 261 | ! 2317 2017-07-20 17:27:19Z suehring |
---|
| 262 | ! Bugfix: adjust output of shf. Added support for spinups |
---|
| 263 | ! |
---|
| 264 | ! 2287 2017-06-15 16:46:30Z suehring |
---|
| 265 | ! Bugfix in determination topography-top index |
---|
| 266 | ! |
---|
| 267 | ! 2269 2017-06-09 11:57:32Z suehring |
---|
| 268 | ! Enable restart runs with different number of PEs |
---|
| 269 | ! Bugfixes nopointer branch |
---|
| 270 | ! |
---|
| 271 | ! 2258 2017-06-08 07:55:13Z suehring |
---|
| 272 | ! Bugfix, add pre-preprocessor directives to enable non-parrallel mode |
---|
| 273 | ! |
---|
| 274 | ! 2233 2017-05-30 18:08:54Z suehring |
---|
| 275 | ! |
---|
| 276 | ! 2232 2017-05-30 17:47:52Z suehring |
---|
| 277 | ! Adjustments according to new surface-type structure. Remove usm_wall_heat_flux; |
---|
| 278 | ! insteat, heat fluxes are directly applied in diffusion_s. |
---|
| 279 | ! |
---|
| 280 | ! 2213 2017-04-24 15:10:35Z kanani |
---|
| 281 | ! Removal of output quantities usm_lad and usm_canopy_hr |
---|
| 282 | ! |
---|
| 283 | ! 2209 2017-04-19 09:34:46Z kanani |
---|
| 284 | ! cpp switch __mpi3 removed, |
---|
| 285 | ! minor formatting, |
---|
| 286 | ! small bugfix for division by zero (Krc) |
---|
| 287 | ! |
---|
| 288 | ! 2113 2017-01-12 13:40:46Z kanani |
---|
| 289 | ! cpp switch __mpi3 added for MPI-3 standard code (Ketelsen) |
---|
| 290 | ! |
---|
| 291 | ! 2071 2016-11-17 11:22:14Z maronga |
---|
| 292 | ! Small bugfix (Resler) |
---|
| 293 | ! |
---|
| 294 | ! 2031 2016-10-21 15:11:58Z knoop |
---|
| 295 | ! renamed variable rho to rho_ocean |
---|
| 296 | ! |
---|
| 297 | ! 2024 2016-10-12 16:42:37Z kanani |
---|
| 298 | ! Bugfixes in deallocation of array plantt and reading of csf/csfsurf, |
---|
| 299 | ! optimization of MPI-RMA operations, |
---|
| 300 | ! declaration of pcbl as integer, |
---|
| 301 | ! renamed usm_radnet -> usm_rad_net, usm_canopy_khf -> usm_canopy_hr, |
---|
| 302 | ! splitted arrays svf -> svf & csf, svfsurf -> svfsurf & csfsurf, |
---|
| 303 | ! use of new control parameter varnamelength, |
---|
| 304 | ! added output variables usm_rad_ressw, usm_rad_reslw, |
---|
| 305 | ! minor formatting changes, |
---|
| 306 | ! minor optimizations. |
---|
| 307 | ! |
---|
| 308 | ! 2011 2016-09-19 17:29:57Z kanani |
---|
| 309 | ! Major reformatting according to PALM coding standard (comments, blanks, |
---|
| 310 | ! alphabetical ordering, etc.), |
---|
| 311 | ! removed debug_prints, |
---|
| 312 | ! removed auxiliary SUBROUTINE get_usm_info, instead, USM flag urban_surface is |
---|
| 313 | ! defined in MODULE control_parameters (modules.f90) to avoid circular |
---|
| 314 | ! dependencies, |
---|
| 315 | ! renamed canopy_heat_flux to pc_heating_rate, as meaning of quantity changed. |
---|
| 316 | ! |
---|
| 317 | ! 2007 2016-08-24 15:47:17Z kanani |
---|
| 318 | ! Initial revision |
---|
| 319 | ! |
---|
| 320 | ! |
---|
| 321 | ! Description: |
---|
| 322 | ! ------------ |
---|
| 323 | ! 2016/6/9 - Initial version of the USM (Urban Surface Model) |
---|
| 324 | ! authors: Jaroslav Resler, Pavel Krc |
---|
| 325 | ! (Czech Technical University in Prague and Institute of |
---|
| 326 | ! Computer Science of the Czech Academy of Sciences, Prague) |
---|
| 327 | ! with contributions: Michal Belda, Nina Benesova, Ondrej Vlcek |
---|
| 328 | ! partly inspired by PALM LSM (B. Maronga) |
---|
| 329 | ! parameterizations of Ra checked with TUF3D (E. S. Krayenhoff) |
---|
| 330 | !> Module for Urban Surface Model (USM) |
---|
| 331 | !> The module includes: |
---|
| 332 | !> 1. radiation model with direct/diffuse radiation, shading, reflections |
---|
| 333 | !> and integration with plant canopy |
---|
| 334 | !> 2. wall and wall surface model |
---|
| 335 | !> 3. surface layer energy balance |
---|
| 336 | !> 4. anthropogenic heat (only from transportation so far) |
---|
| 337 | !> 5. necessary auxiliary subroutines (reading inputs, writing outputs, |
---|
| 338 | !> restart simulations, ...) |
---|
| 339 | !> It also make use of standard radiation and integrates it into |
---|
| 340 | !> urban surface model. |
---|
| 341 | !> |
---|
| 342 | !> Further work: |
---|
| 343 | !> ------------- |
---|
[2920] | 344 | !> 1. Remove global arrays surfouts, surfoutl and only keep track of radiosity |
---|
[2737] | 345 | !> from surfaces that are visible from local surfaces (i.e. there is a SVF |
---|
| 346 | !> where target is local). To do that, radiosity will be exchanged after each |
---|
| 347 | !> reflection step using MPI_Alltoall instead of current MPI_Allgather. |
---|
| 348 | !> |
---|
[2920] | 349 | !> 2. Temporarily large values of surface heat flux can be observed, up to |
---|
[2737] | 350 | !> 1.2 Km/s, which seem to be not realistic. |
---|
| 351 | !> |
---|
| 352 | !> @todo Output of _av variables in case of restarts |
---|
| 353 | !> @todo Revise flux conversion in energy-balance solver |
---|
| 354 | !> @todo Bugfixing in nopointer branch |
---|
| 355 | !> @todo Check optimizations for RMA operations |
---|
| 356 | !> @todo Alternatives for MPI_WIN_ALLOCATE? (causes problems with openmpi) |
---|
| 357 | !> @todo Check for load imbalances in CPU measures, e.g. for exchange_horiz_prog |
---|
| 358 | !> factor 3 between min and max time |
---|
| 359 | !> @todo Move setting of flag indoor_model to indoor_model_mod once available |
---|
| 360 | !> @todo Check divisions in wtend (etc.) calculations for possible division |
---|
| 361 | !> by zero, e.g. in case fraq(0,m) + fraq(1,m) = 0?! |
---|
| 362 | !> @todo Use unit 90 for OPEN/CLOSE of input files (FK) |
---|
[3014] | 363 | !> @todo Move plant canopy stuff into plant canopy code |
---|
[2737] | 364 | !------------------------------------------------------------------------------! |
---|
| 365 | MODULE urban_surface_mod |
---|
| 366 | |
---|
[3371] | 367 | USE arrays_3d, & |
---|
[2737] | 368 | #if ! defined( __nopointer ) |
---|
[3418] | 369 | ONLY: hyp, zu, pt, p, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
[3371] | 370 | #else |
---|
[3418] | 371 | ONLY: hyp, pt, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
[2737] | 372 | #endif |
---|
[3418] | 373 | USE calc_mean_profile_mod, & |
---|
| 374 | ONLY: calc_mean_profile |
---|
[2737] | 375 | |
---|
[3274] | 376 | USE basic_constants_and_equations_mod, & |
---|
[3418] | 377 | ONLY: c_p, g, kappa, pi, r_d, rho_l, l_v |
---|
[2737] | 378 | |
---|
| 379 | USE control_parameters, & |
---|
[3152] | 380 | ONLY: coupling_start_time, topography, dt_3d, humidity, & |
---|
[2737] | 381 | intermediate_timestep_count, initializing_actions, & |
---|
| 382 | intermediate_timestep_count_max, simulated_time, end_time, & |
---|
| 383 | timestep_scheme, tsc, coupling_char, io_blocks, io_group, & |
---|
| 384 | message_string, time_since_reference_point, surface_pressure, & |
---|
[3274] | 385 | pt_surface, large_scale_forcing, lsf_surf, spinup, & |
---|
[2737] | 386 | spinup_pt_mean, spinup_time, time_do3d, dt_do3d, & |
---|
[3274] | 387 | average_count_3d, varnamelength, urban_surface, & |
---|
[3337] | 388 | plant_canopy, dz |
---|
[2737] | 389 | |
---|
[3418] | 390 | USE bulk_cloud_model_mod, & |
---|
| 391 | ONLY: bulk_cloud_model, precipitation |
---|
| 392 | |
---|
[2737] | 393 | USE cpulog, & |
---|
| 394 | ONLY: cpu_log, log_point, log_point_s |
---|
| 395 | |
---|
| 396 | USE date_and_time_mod, & |
---|
[2920] | 397 | ONLY: time_utc_init |
---|
[2737] | 398 | |
---|
| 399 | USE grid_variables, & |
---|
| 400 | ONLY: dx, dy, ddx, ddy, ddx2, ddy2 |
---|
| 401 | |
---|
| 402 | USE indices, & |
---|
| 403 | ONLY: nx, ny, nnx, nny, nnz, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, & |
---|
| 404 | nysg, nzb, nzt, nbgp, wall_flags_0 |
---|
| 405 | |
---|
| 406 | USE, INTRINSIC :: iso_c_binding |
---|
| 407 | |
---|
| 408 | USE kinds |
---|
| 409 | |
---|
| 410 | USE pegrid |
---|
| 411 | |
---|
| 412 | USE plant_canopy_model_mod, & |
---|
[3014] | 413 | ONLY: pc_heating_rate, pc_transpiration_rate |
---|
[2737] | 414 | |
---|
| 415 | USE radiation_model_mod, & |
---|
[2943] | 416 | ONLY: albedo_type, radiation_interaction, calc_zenith, zenith, & |
---|
[3045] | 417 | radiation, rad_sw_in, rad_lw_in, rad_sw_out, rad_lw_out, & |
---|
[3274] | 418 | sigma_sb, sun_direction, sun_dir_lat, sun_dir_lon, & |
---|
[2737] | 419 | force_radiation_call, surfinsw, surfinlw, surfinswdir, & |
---|
| 420 | surfinswdif, surfoutsw, surfoutlw, surfins,nsvfl, svf, svfsurf, & |
---|
[2920] | 421 | surfinl, surfinlwdif, rad_sw_in_dir, rad_sw_in_diff, & |
---|
[2737] | 422 | rad_lw_in_diff, surfouts, surfoutl, surfoutsl, surfoutll, surf, & |
---|
[3337] | 423 | surfl, nsurfl, pcbinsw, pcbinlw, pcbinswdir, & |
---|
| 424 | pcbinswdif, iup_u, inorth_u, isouth_u, ieast_u, iwest_u, iup_l, & |
---|
[2920] | 425 | inorth_l, isouth_l, ieast_l, iwest_l, id, & |
---|
[3337] | 426 | iz, iy, ix, nsurf, idsvf, ndsvf, & |
---|
[2920] | 427 | idcsf, ndcsf, kdcsf, pct, & |
---|
[3337] | 428 | startland, endland, startwall, endwall, skyvf, skyvft, nzub, & |
---|
[3378] | 429 | nzut, npcbl, pcbl, unscheduled_radiation_calls |
---|
[2737] | 430 | |
---|
| 431 | USE statistics, & |
---|
| 432 | ONLY: hom, statistic_regions |
---|
| 433 | |
---|
[2963] | 434 | USE surface_mod, & |
---|
| 435 | ONLY: get_topography_top_index_ji, get_topography_top_index, & |
---|
| 436 | ind_pav_green, ind_veg_wall, ind_wat_win, surf_usm_h, & |
---|
| 437 | surf_usm_v, surface_restore_elements |
---|
[2737] | 438 | |
---|
| 439 | |
---|
| 440 | IMPLICIT NONE |
---|
| 441 | |
---|
[3418] | 442 | ! |
---|
| 443 | !-- USM model constants |
---|
[2737] | 444 | |
---|
[3418] | 445 | REAL(wp), PARAMETER :: & |
---|
| 446 | b_ch = 6.04_wp, & ! Clapp & Hornberger exponent |
---|
| 447 | lambda_h_green_dry = 0.19_wp, & ! heat conductivity for dry soil |
---|
| 448 | lambda_h_green_sm = 3.44_wp, & ! heat conductivity of the soil matrix |
---|
| 449 | lambda_h_water = 0.57_wp, & ! heat conductivity of water |
---|
| 450 | psi_sat = -0.388_wp, & ! soil matrix potential at saturation |
---|
| 451 | rho_c_soil = 2.19E6_wp, & ! volumetric heat capacity of soil |
---|
| 452 | rho_c_water = 4.20E6_wp !, & ! volumetric heat capacity of water |
---|
| 453 | ! m_max_depth = 0.0002_wp ! Maximum capacity of the water reservoir (m) |
---|
| 454 | |
---|
| 455 | ! |
---|
| 456 | !-- Soil parameters I alpha_vg, l_vg_green, n_vg, gamma_w_green_sat |
---|
| 457 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: soil_pars = RESHAPE( (/ & |
---|
| 458 | 3.83_wp, 1.250_wp, 1.38_wp, 6.94E-6_wp, & ! 1 |
---|
| 459 | 3.14_wp, -2.342_wp, 1.28_wp, 1.16E-6_wp, & ! 2 |
---|
| 460 | 0.83_wp, -0.588_wp, 1.25_wp, 0.26E-6_wp, & ! 3 |
---|
| 461 | 3.67_wp, -1.977_wp, 1.10_wp, 2.87E-6_wp, & ! 4 |
---|
| 462 | 2.65_wp, 2.500_wp, 1.10_wp, 1.74E-6_wp, & ! 5 |
---|
| 463 | 1.30_wp, 0.400_wp, 1.20_wp, 0.93E-6_wp, & ! 6 |
---|
| 464 | 0.00_wp, 0.00_wp, 0.00_wp, 0.57E-6_wp & ! 7 |
---|
| 465 | /), (/ 4, 7 /) ) |
---|
| 466 | |
---|
| 467 | ! |
---|
| 468 | !-- Soil parameters II swc_sat, fc, wilt, swc_res |
---|
| 469 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: m_soil_pars = RESHAPE( (/ & |
---|
| 470 | 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp, & ! 1 |
---|
| 471 | 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp, & ! 2 |
---|
| 472 | 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp, & ! 3 |
---|
| 473 | 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp, & ! 4 |
---|
| 474 | 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp, & ! 5 |
---|
| 475 | 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp, & ! 6 |
---|
| 476 | 0.472_wp, 0.323_wp, 0.171_wp, 0.000_wp & ! 7 |
---|
| 477 | /), (/ 4, 7 /) ) |
---|
| 478 | |
---|
| 479 | ! value 9999999.9_wp -> generic available or user-defined value must be set |
---|
| 480 | ! otherwise -> no generic variable and user setting is optional |
---|
| 481 | REAL(wp) :: alpha_vangenuchten = 9999999.9_wp, & !< NAMELIST alpha_vg |
---|
| 482 | field_capacity = 9999999.9_wp, & !< NAMELIST fc |
---|
| 483 | hydraulic_conductivity = 9999999.9_wp, & !< NAMELIST gamma_w_green_sat |
---|
| 484 | lambda_h_green_sat = 0.0_wp, & !< heat conductivity for saturated soil |
---|
| 485 | l_vangenuchten = 9999999.9_wp, & !< NAMELIST l_vg |
---|
| 486 | n_vangenuchten = 9999999.9_wp, & !< NAMELIST n_vg |
---|
| 487 | residual_moisture = 9999999.9_wp, & !< NAMELIST m_res |
---|
| 488 | saturation_moisture = 9999999.9_wp, & !< NAMELIST m_sat |
---|
| 489 | wilting_point = 9999999.9_wp!, & !< NAMELIST m_wilt |
---|
| 490 | |
---|
| 491 | |
---|
[2737] | 492 | !-- configuration parameters (they can be setup in PALM config) |
---|
[3151] | 493 | LOGICAL :: usm_material_model = .TRUE. !< flag parameter indicating wheather the model of heat in materials is used |
---|
| 494 | LOGICAL :: usm_anthropogenic_heat = .FALSE. !< flag parameter indicating wheather the anthropogenic heat sources (e.g.transportation) are used |
---|
| 495 | LOGICAL :: force_radiation_call_l = .FALSE. !< flag parameter for unscheduled radiation model calls |
---|
| 496 | LOGICAL :: indoor_model = .FALSE. !< whether to use the indoor model |
---|
| 497 | LOGICAL :: read_wall_temp_3d = .FALSE. |
---|
[3418] | 498 | LOGICAL :: usm_wall_mod = .FALSE. !< reduces conductivity of the first 2 wall layers by factor 0.1 |
---|
[2737] | 499 | |
---|
[2920] | 500 | |
---|
[3151] | 501 | INTEGER(iwp) :: building_type = 1 !< default building type (preleminary setting) |
---|
| 502 | INTEGER(iwp) :: land_category = 2 !< default category for land surface |
---|
| 503 | INTEGER(iwp) :: wall_category = 2 !< default category for wall surface over pedestrian zone |
---|
| 504 | INTEGER(iwp) :: pedestrian_category = 2 !< default category for wall surface in pedestrian zone |
---|
| 505 | INTEGER(iwp) :: roof_category = 2 !< default category for root surface |
---|
[3337] | 506 | REAL(wp) :: roughness_concrete = 0.001_wp !< roughness length of average concrete surface |
---|
[2737] | 507 | ! |
---|
| 508 | !-- Indices of input attributes for (above) ground floor level |
---|
[3418] | 509 | INTEGER(iwp) :: ind_alb_wall_agfl = 65 !< index in input list for albedo_type of wall above ground floor level |
---|
| 510 | INTEGER(iwp) :: ind_alb_wall_gfl = 32 !< index in input list for albedo_type of wall ground floor level |
---|
| 511 | INTEGER(iwp) :: ind_alb_wall_r = 96 !< index in input list for albedo_type of wall roof |
---|
| 512 | INTEGER(iwp) :: ind_alb_green_agfl = 83 !< index in input list for albedo_type of green above ground floor level |
---|
| 513 | INTEGER(iwp) :: ind_alb_green_gfl = 50 !< index in input list for albedo_type of green ground floor level |
---|
| 514 | INTEGER(iwp) :: ind_alb_green_r = 115 !< index in input list for albedo_type of green roof |
---|
| 515 | INTEGER(iwp) :: ind_alb_win_agfl = 79 !< index in input list for albedo_type of window fraction above ground floor level |
---|
| 516 | INTEGER(iwp) :: ind_alb_win_gfl = 46 !< index in input list for albedo_type of window fraction ground floor level |
---|
| 517 | INTEGER(iwp) :: ind_alb_win_r = 110 !< index in input list for albedo_type of window fraction roof |
---|
| 518 | INTEGER(iwp) :: ind_emis_wall_agfl = 64 !< index in input list for wall emissivity, above ground floor level |
---|
| 519 | INTEGER(iwp) :: ind_emis_wall_gfl = 31 !< index in input list for wall emissivity, ground floor level |
---|
| 520 | INTEGER(iwp) :: ind_emis_wall_r = 95 !< index in input list for wall emissivity, roof |
---|
| 521 | INTEGER(iwp) :: ind_emis_green_agfl = 82 !< index in input list for green emissivity, above ground floor level |
---|
| 522 | INTEGER(iwp) :: ind_emis_green_gfl = 49 !< index in input list for green emissivity, ground floor level |
---|
| 523 | INTEGER(iwp) :: ind_emis_green_r = 114 !< index in input list for green emissivity, roof |
---|
| 524 | INTEGER(iwp) :: ind_emis_win_agfl = 77 !< index in input list for window emissivity, above ground floor level |
---|
| 525 | INTEGER(iwp) :: ind_emis_win_gfl = 44 !< index in input list for window emissivity, ground floor level |
---|
| 526 | INTEGER(iwp) :: ind_emis_win_r = 108 !< index in input list for window emissivity, roof |
---|
| 527 | INTEGER(iwp) :: ind_green_frac_w_agfl = 80 !< index in input list for green fraction on wall, above ground floor level |
---|
| 528 | INTEGER(iwp) :: ind_green_frac_w_gfl = 47 !< index in input list for green fraction on wall, ground floor level |
---|
| 529 | INTEGER(iwp) :: ind_green_frac_r_agfl = 112 !< index in input list for green fraction on roof, above ground floor level |
---|
| 530 | INTEGER(iwp) :: ind_green_frac_r_gfl = 111 !< index in input list for green fraction on roof, ground floor level |
---|
| 531 | INTEGER(iwp) :: ind_hc1_agfl = 58 !< index in input list for heat capacity at first wall layer, above ground floor level |
---|
| 532 | INTEGER(iwp) :: ind_hc1_gfl = 25 !< index in input list for heat capacity at first wall layer, ground floor level |
---|
| 533 | INTEGER(iwp) :: ind_hc1_wall_r = 89 !< index in input list for heat capacity at first wall layer, roof |
---|
| 534 | INTEGER(iwp) :: ind_hc1_win_agfl = 71 !< index in input list for heat capacity at first window layer, above ground floor level |
---|
| 535 | INTEGER(iwp) :: ind_hc1_win_gfl = 38 !< index in input list for heat capacity at first window layer, ground floor level |
---|
| 536 | INTEGER(iwp) :: ind_hc1_win_r = 102 !< index in input list for heat capacity at first window layer, roof |
---|
| 537 | INTEGER(iwp) :: ind_hc2_agfl = 59 !< index in input list for heat capacity at second wall layer, above ground floor level |
---|
| 538 | INTEGER(iwp) :: ind_hc2_gfl = 26 !< index in input list for heat capacity at second wall layer, ground floor level |
---|
| 539 | INTEGER(iwp) :: ind_hc2_wall_r = 90 !< index in input list for heat capacity at second wall layer, roof |
---|
| 540 | INTEGER(iwp) :: ind_hc2_win_agfl = 72 !< index in input list for heat capacity at second window layer, above ground floor level |
---|
| 541 | INTEGER(iwp) :: ind_hc2_win_gfl = 39 !< index in input list for heat capacity at second window layer, ground floor level |
---|
| 542 | INTEGER(iwp) :: ind_hc2_win_r = 103 !< index in input list for heat capacity at second window layer, roof |
---|
| 543 | INTEGER(iwp) :: ind_hc3_agfl = 60 !< index in input list for heat capacity at third wall layer, above ground floor level |
---|
| 544 | INTEGER(iwp) :: ind_hc3_gfl = 27 !< index in input list for heat capacity at third wall layer, ground floor level |
---|
| 545 | INTEGER(iwp) :: ind_hc3_wall_r = 91 !< index in input list for heat capacity at third wall layer, roof |
---|
| 546 | INTEGER(iwp) :: ind_hc3_win_agfl = 73 !< index in input list for heat capacity at third window layer, above ground floor level |
---|
| 547 | INTEGER(iwp) :: ind_hc3_win_gfl = 40 !< index in input list for heat capacity at third window layer, ground floor level |
---|
| 548 | INTEGER(iwp) :: ind_hc3_win_r = 104 !< index in input list for heat capacity at third window layer, roof |
---|
| 549 | INTEGER(iwp) :: ind_gflh = 17 !< index in input list for ground floor level height |
---|
| 550 | INTEGER(iwp) :: ind_lai_r_agfl = 113 !< index in input list for LAI on roof, above ground floor level |
---|
| 551 | INTEGER(iwp) :: ind_lai_r_gfl = 113 !< index in input list for LAI on roof, ground floor level |
---|
| 552 | INTEGER(iwp) :: ind_lai_w_agfl = 81 !< index in input list for LAI on wall, above ground floor level |
---|
| 553 | INTEGER(iwp) :: ind_lai_w_gfl = 48 !< index in input list for LAI on wall, ground floor level |
---|
| 554 | INTEGER(iwp) :: ind_tc1_agfl = 61 !< index in input list for thermal conductivity at first wall layer, above ground floor level |
---|
| 555 | INTEGER(iwp) :: ind_tc1_gfl = 28 !< index in input list for thermal conductivity at first wall layer, ground floor level |
---|
| 556 | INTEGER(iwp) :: ind_tc1_wall_r = 92 !< index in input list for thermal conductivity at first wall layer, roof |
---|
| 557 | INTEGER(iwp) :: ind_tc1_win_agfl = 74 !< index in input list for thermal conductivity at first window layer, above ground floor level |
---|
| 558 | INTEGER(iwp) :: ind_tc1_win_gfl = 41 !< index in input list for thermal conductivity at first window layer, ground floor level |
---|
| 559 | INTEGER(iwp) :: ind_tc1_win_r = 105 !< index in input list for thermal conductivity at first window layer, roof |
---|
| 560 | INTEGER(iwp) :: ind_tc2_agfl = 62 !< index in input list for thermal conductivity at second wall layer, above ground floor level |
---|
| 561 | INTEGER(iwp) :: ind_tc2_gfl = 29 !< index in input list for thermal conductivity at second wall layer, ground floor level |
---|
| 562 | INTEGER(iwp) :: ind_tc2_wall_r = 93 !< index in input list for thermal conductivity at second wall layer, roof |
---|
| 563 | INTEGER(iwp) :: ind_tc2_win_agfl = 75 !< index in input list for thermal conductivity at second window layer, above ground floor level |
---|
| 564 | INTEGER(iwp) :: ind_tc2_win_gfl = 42 !< index in input list for thermal conductivity at second window layer, ground floor level |
---|
| 565 | INTEGER(iwp) :: ind_tc2_win_r = 106 !< index in input list for thermal conductivity at second window layer, ground floor level |
---|
| 566 | INTEGER(iwp) :: ind_tc3_agfl = 63 !< index in input list for thermal conductivity at third wall layer, above ground floor level |
---|
| 567 | INTEGER(iwp) :: ind_tc3_gfl = 30 !< index in input list for thermal conductivity at third wall layer, ground floor level |
---|
| 568 | INTEGER(iwp) :: ind_tc3_wall_r = 94 !< index in input list for thermal conductivity at third wall layer, roof |
---|
| 569 | INTEGER(iwp) :: ind_tc3_win_agfl = 76 !< index in input list for thermal conductivity at third window layer, above ground floor level |
---|
| 570 | INTEGER(iwp) :: ind_tc3_win_gfl = 43 !< index in input list for thermal conductivity at third window layer, ground floor level |
---|
| 571 | INTEGER(iwp) :: ind_tc3_win_r = 107 !< index in input list for thermal conductivity at third window layer, roof |
---|
| 572 | INTEGER(iwp) :: ind_thick_1_agfl = 54 !< index for wall layer thickness - 1st layer above ground floor level |
---|
| 573 | INTEGER(iwp) :: ind_thick_1_gfl = 21 !< index for wall layer thickness - 1st layer ground floor level |
---|
| 574 | INTEGER(iwp) :: ind_thick_1_wall_r = 85 !< index for wall layer thickness - 1st layer roof |
---|
| 575 | INTEGER(iwp) :: ind_thick_1_win_agfl = 67 !< index for window layer thickness - 1st layer above ground floor level |
---|
| 576 | INTEGER(iwp) :: ind_thick_1_win_gfl = 34 !< index for window layer thickness - 1st layer ground floor level |
---|
| 577 | INTEGER(iwp) :: ind_thick_1_win_r = 98 !< index for window layer thickness - 1st layer roof |
---|
| 578 | INTEGER(iwp) :: ind_thick_2_agfl = 55 !< index for wall layer thickness - 2nd layer above ground floor level |
---|
| 579 | INTEGER(iwp) :: ind_thick_2_gfl = 22 !< index for wall layer thickness - 2nd layer ground floor level |
---|
| 580 | INTEGER(iwp) :: ind_thick_2_wall_r = 86 !< index for wall layer thickness - 2nd layer roof |
---|
| 581 | INTEGER(iwp) :: ind_thick_2_win_agfl = 68 !< index for window layer thickness - 2nd layer above ground floor level |
---|
| 582 | INTEGER(iwp) :: ind_thick_2_win_gfl = 35 !< index for window layer thickness - 2nd layer ground floor level |
---|
| 583 | INTEGER(iwp) :: ind_thick_2_win_r = 99 !< index for window layer thickness - 2nd layer roof |
---|
| 584 | INTEGER(iwp) :: ind_thick_3_agfl = 56 !< index for wall layer thickness - 3rd layer above ground floor level |
---|
| 585 | INTEGER(iwp) :: ind_thick_3_gfl = 23 !< index for wall layer thickness - 3rd layer ground floor level |
---|
| 586 | INTEGER(iwp) :: ind_thick_3_wall_r = 87 !< index for wall layer thickness - 3rd layer roof |
---|
| 587 | INTEGER(iwp) :: ind_thick_3_win_agfl = 69 !< index for window layer thickness - 3rd layer above ground floor level |
---|
| 588 | INTEGER(iwp) :: ind_thick_3_win_gfl = 36 !< index for window layer thickness - 3rd layer ground floor level |
---|
| 589 | INTEGER(iwp) :: ind_thick_3_win_r = 100 !< index for window layer thickness - 3rd layer roof |
---|
| 590 | INTEGER(iwp) :: ind_thick_4_agfl = 57 !< index for wall layer thickness - 4th layer above ground floor level |
---|
| 591 | INTEGER(iwp) :: ind_thick_4_gfl = 24 !< index for wall layer thickness - 4th layer ground floor level |
---|
| 592 | INTEGER(iwp) :: ind_thick_4_wall_r = 88 !< index for wall layer thickness - 4st layer roof |
---|
| 593 | INTEGER(iwp) :: ind_thick_4_win_agfl = 70 !< index for window layer thickness - 4th layer above ground floor level |
---|
| 594 | INTEGER(iwp) :: ind_thick_4_win_gfl = 37 !< index for window layer thickness - 4th layer ground floor level |
---|
| 595 | INTEGER(iwp) :: ind_thick_4_win_r = 101 !< index for window layer thickness - 4th layer roof |
---|
| 596 | INTEGER(iwp) :: ind_trans_agfl = 78 !< index in input list for window transmissivity, above ground floor level |
---|
| 597 | INTEGER(iwp) :: ind_trans_gfl = 45 !< index in input list for window transmissivity, ground floor level |
---|
| 598 | INTEGER(iwp) :: ind_trans_r = 109 !< index in input list for window transmissivity, roof |
---|
| 599 | INTEGER(iwp) :: ind_wall_frac_agfl = 53 !< index in input list for wall fraction, above ground floor level |
---|
| 600 | INTEGER(iwp) :: ind_wall_frac_gfl = 20 !< index in input list for wall fraction, ground floor level |
---|
| 601 | INTEGER(iwp) :: ind_wall_frac_r = 84 !< index in input list for wall fraction, roof |
---|
| 602 | INTEGER(iwp) :: ind_win_frac_agfl = 66 !< index in input list for window fraction, above ground floor level |
---|
| 603 | INTEGER(iwp) :: ind_win_frac_gfl = 33 !< index in input list for window fraction, ground floor level |
---|
| 604 | INTEGER(iwp) :: ind_win_frac_r = 97 !< index in input list for window fraction, roof |
---|
| 605 | INTEGER(iwp) :: ind_z0_agfl = 51 !< index in input list for z0, above ground floor level |
---|
| 606 | INTEGER(iwp) :: ind_z0_gfl = 18 !< index in input list for z0, ground floor level |
---|
| 607 | INTEGER(iwp) :: ind_z0qh_agfl = 52 !< index in input list for z0h / z0q, above ground floor level |
---|
| 608 | INTEGER(iwp) :: ind_z0qh_gfl = 19 !< index in input list for z0h / z0q, ground floor level |
---|
| 609 | INTEGER(iwp) :: ind_green_type_roof = 116 !< index in input list for type of green roof |
---|
[2737] | 610 | |
---|
| 611 | |
---|
[3418] | 612 | REAL(wp) :: roof_height_limit = 4.0_wp !< height for distinguish between land surfaces and roofs |
---|
[2737] | 613 | REAL(wp) :: ground_floor_level = 4.0_wp !< default ground floor level |
---|
| 614 | |
---|
[2920] | 615 | |
---|
[3115] | 616 | CHARACTER(37), DIMENSION(0:7), PARAMETER :: building_type_name = (/ & |
---|
[2737] | 617 | 'user-defined ', & ! 0 |
---|
| 618 | 'residential - 1950 ', & ! 1 |
---|
| 619 | 'residential 1951 - 2000 ', & ! 2 |
---|
| 620 | 'residential 2001 - ', & ! 3 |
---|
| 621 | 'office - 1950 ', & ! 4 |
---|
| 622 | 'office 1951 - 2000 ', & ! 5 |
---|
[3115] | 623 | 'office 2001 - ', & ! 6 |
---|
| 624 | 'bridges ' & ! 7 |
---|
[2737] | 625 | /) |
---|
| 626 | ! |
---|
[3418] | 627 | !-- building parameters, 6 different types |
---|
| 628 | !-- Parameter for urban surface model |
---|
| 629 | !-- 0 - heat capacity wall surface, 1 - heat capacity of window surface, 2 - heat capacity of green surface |
---|
| 630 | !-- 3 - thermal conductivity of wall surface, 4 - thermal conductivity of window surface, |
---|
| 631 | !-- 5 - thermal conductivty of green surface, 6 - wall fraction ground plate, |
---|
| 632 | !-- 7 - 1st wall layer thickness ground plate, 8 - 2nd wall layer thickness ground plate |
---|
| 633 | !-- 9 - 3rd wall layer thickness ground plate, 10 - 4th wall layer thickness ground plate, |
---|
| 634 | !-- 11 - heat capacity 1st/2nd wall layer ground plate, 12 - heat capacity 3rd wall layer ground plate |
---|
| 635 | !-- 13 - heat capacity 4th wall layer ground plate, 14 - thermal conductivity 1st/2nd wall layer ground plate, |
---|
| 636 | !-- 15 - thermal conductivity 3rd wall layer ground plate, 16 - thermal conductivity 4th wall layer ground plate |
---|
| 637 | !-- 17 - ground floor level height, 18 - z0 roughness ground floor level, 19 - z0h/z0g roughness heaat/humidity, |
---|
| 638 | !-- 20 - wall fraction ground floor level, 21 - 1st wall layer thickness ground floor level, |
---|
| 639 | !-- 22 - 2nd wall layer thickness ground floor level, 23 - 3rd wall layer thickness ground floor level, |
---|
| 640 | !-- 24 - 4th wall layer thickness ground floor level, 25 - heat capacity 1st/2nd wall layer ground floor level, |
---|
| 641 | !-- 26 - heat capacity 3rd wall layer ground floor level, 27 - heat capacity 4th wall layer ground floor level, |
---|
| 642 | !-- 28 - thermal conductivity 1st/2nd wall layer ground floor level, |
---|
| 643 | !-- 29 - thermal conductivity 3rd wall layer ground floor level, 30 - thermal conductivity 4th wall layer ground floor level |
---|
| 644 | !-- 31 - wall emissivity ground floor level, 32 - wall albedo ground floor level, 33 - window fraction ground floor level, |
---|
| 645 | !-- 34 - 1st window layer thickness ground floor level, 35 - 2nd window layer thickness ground floor level, |
---|
| 646 | !-- 36 - 3rd window layer thickness ground floor level, 37 - 4th window layer thickness ground floor level, |
---|
| 647 | !-- 38 - heat capacity 1st/2nd window layer ground floor level, 39 - heat capacity 3rd window layer ground floor level, |
---|
| 648 | !-- 40 - heat capacity 4th window layer ground floor level, |
---|
| 649 | !-- 41 - thermal conductivity 1st/2nd window layer ground floor level, |
---|
| 650 | !-- 42 - thermal conductivity 3rd window layer ground floor level, |
---|
| 651 | !-- 43 - thermal conductivity 4th window layer ground floor level, 44 - window emissivity ground floor level, |
---|
| 652 | !-- 45 - window transmissivity ground floor level, 46 - window albedo ground floor level, |
---|
| 653 | !-- 47 - green fraction ground floor level, 48 - LAI on wall ground floor level, 49 - green emissivity ground floor level, |
---|
| 654 | !-- 50 - green albedo ground floor level, 51 - z0 roughness above ground floor level, |
---|
| 655 | !-- 52 - z0h/z0g roughness heat/humidity above ground floor level, 53 - wall fraction above ground floor level |
---|
| 656 | !-- 54 - 1st wall layer thickness above ground floor level, 55 - 2nd wall layer thickness above ground floor level |
---|
| 657 | !-- 56 - 3rd wall layer thickness above ground floor level, 57 - 4th wall layer thickness above ground floor level |
---|
| 658 | !-- 58 - heat capacity 1st/2nd wall layer above ground floor level, |
---|
| 659 | !-- 59 - heat capacity 3rd wall layer above ground floor level, |
---|
| 660 | !-- 60 - heat capacity 4th wall layer above ground floor level, |
---|
| 661 | !-- 61 - thermal conductivity 1st/2nd wall layer above ground floor level, |
---|
| 662 | !-- 62 - thermal conductivity 3rd wall layer above ground floor level, |
---|
| 663 | !-- 63 - thermal conductivity 4th wall layer above ground floor level, |
---|
| 664 | !-- 64 - wall emissivity above ground floor level, 65 - wall albedo above ground floor level, |
---|
| 665 | !-- 66 - window fraction above ground floor level, 67 - 1st window layer thickness above ground floor level, |
---|
| 666 | !-- 68 - 2nd thickness window layer above ground floor level, 69 - 3rd window layer thickness above ground floor level, |
---|
| 667 | !-- 70 - 4th window layer thickness above ground floor level, |
---|
| 668 | !-- 71 - heat capacity 1st/2nd window layer above ground floor level, |
---|
| 669 | !-- 72 - heat capacity 3rd window layer above ground floor level, |
---|
| 670 | !-- 73 - heat capacity 4th window layer above ground floor level, |
---|
| 671 | !-- 74 - conductivity 1st/2nd window layer above ground floor level, |
---|
| 672 | !-- 75 - thermal conductivity 3rd window layer above ground floor level, |
---|
| 673 | !-- 76 - thermal conductivity 4th window layer above ground floor level, 77 - window emissivity above ground floor level, |
---|
| 674 | !-- 78 - window transmissivity above ground floor level, 79 - window albedo above ground floor level, |
---|
| 675 | !-- 80 - green fraction above ground floor level, 81 - LAI on wall above ground floor level, |
---|
| 676 | !-- 82 - green emissivity above ground floor level, 83 - green albedo above ground floor level, |
---|
| 677 | !-- 84 - wall fraction roof, 85 - 1st wall layer thickness roof, 86 - 2nd wall layer thickness roof, |
---|
| 678 | !-- 87 - 3rd wall layer thickness roof, 88 - 4th wall layer thickness roof, |
---|
| 679 | !-- 89 - heat capacity 1st/2nd wall layer roof, 90 - heat capacity 3rd wall layer roof, |
---|
| 680 | !-- 91 - heat capacity 4th wall layer roof, 92 - thermal conductivity 1st/2nd wall layer roof, |
---|
| 681 | !-- 93 - thermal conductivity 3rd wall layer roof, 94 - thermal conductivity 4th wall layer roof, |
---|
| 682 | !-- 95 - wall emissivity roof, 96 - wall albedo roof, 97 - window fraction roof, |
---|
| 683 | !-- 98 - window 1st layer thickness roof, 99 - window 2nd layer thickness roof, 100 - window 3rd layer thickness roof, |
---|
| 684 | !-- 101 - window 4th layer thickness, 102 - heat capacity 1st/2nd window layer roof, |
---|
| 685 | !-- 103 - heat capacity 3rd window layer roof, 104 - heat capacity 4th window layer roof, |
---|
| 686 | !-- 105 - thermal conductivity 1st/2nd window layer roof, 106 - thermal conductivity 3rd window layer roof, |
---|
| 687 | !-- 107 - thermal conductivity 4th window layer roof, 108 - window emissivity roof, 109 - window transmissivity roof, |
---|
| 688 | !-- 110 - window albedo roof, 111 - green fraction roof ground floor level, |
---|
| 689 | !-- 112 - green fraction roof above ground floor level, 113 - LAI roof, 114 - green emissivity roof, |
---|
| 690 | !-- 115 - green albedo roof, 116 - green type roof, |
---|
| 691 | !-- Parameter for indoor model |
---|
| 692 | !-- 117 - indoor target summer temperature, 118 - indoor target winter temperature, |
---|
| 693 | !-- 119 - shading factor, 120 - g-value windows, 121 - u-value windows, 122 - basical airflow without occupancy of the room, |
---|
| 694 | !-- 123 - additional airflow depend of occupancy of the room, 124 - heat recovery efficiency, |
---|
| 695 | !-- 125 - dynamic parameter specific effective surface, 126 - dynamic parameter innner heatstorage, |
---|
| 696 | !-- 127 - ratio internal surface/floor area, 128 - maximal heating capacity, 129 - maximal cooling capacity, |
---|
| 697 | !-- 130 - additional internal heat gains dependent on occupancy of the room, |
---|
| 698 | !-- 131 - basic internal heat gains without occupancy of the room, 132 - storey height, 133 - ceiling construction height |
---|
[2737] | 699 | |
---|
[3418] | 700 | |
---|
| 701 | REAL(wp), DIMENSION(0:133,1:7), PARAMETER :: building_pars = RESHAPE( (/ & |
---|
| 702 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
| 703 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
| 704 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
| 705 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
| 706 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
| 707 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
| 708 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
| 709 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
| 710 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
| 711 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
| 712 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
| 713 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
| 714 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
| 715 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
| 716 | 2.1_wp, 0.93_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
| 717 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
| 718 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
| 719 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
| 720 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
| 721 | 0.005_wp, 0.01_wp, 0.31_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
| 722 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
| 723 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
| 724 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
| 725 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
| 726 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
| 727 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
| 728 | 0.1_wp, 0.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
| 729 | 100000.0_wp, 0.0_wp, 3.0_wp, 10.0_wp, 3.0_wp, 0.2_wp, & !parameter 128-133- end of type 1 |
---|
| 730 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
| 731 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.42_wp, 2000000.0_wp, & !parameter 6-11 |
---|
| 732 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
| 733 | 0.01_wp, 0.001_wp, 0.78_wp, & !parameter 18-20 |
---|
| 734 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
| 735 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
| 736 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
| 737 | 27.0_wp, 0.22_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
| 738 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
| 739 | 0.11_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 41-44 |
---|
| 740 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
| 741 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.73_wp, 0.005_wp, & !parameter 50-54 |
---|
| 742 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
| 743 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
| 744 | 0.04_wp, 0.92_wp, 27.0_wp, 0.27_wp, & !parameter 63-66 |
---|
| 745 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
| 746 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
| 747 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
| 748 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
| 749 | 0.005_wp, 0.01_wp, 0.5_wp, 0.79_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
| 750 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
| 751 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
| 752 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
| 753 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
| 754 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
| 755 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
| 756 | 0.1_wp, 0.5_wp, 0.0_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
| 757 | 100000.0_wp, 0.0_wp, 4.0_wp, 8.0_wp, 3.0_wp, 0.2_wp, & !parameter 128-133- end of type 2 |
---|
| 758 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
| 759 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
| 760 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
| 761 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
| 762 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
| 763 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
| 764 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
| 765 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
| 766 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
| 767 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
| 768 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
| 769 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
| 770 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
| 771 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
| 772 | 0.035_wp, 0.92_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
| 773 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
| 774 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
| 775 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
| 776 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
| 777 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
| 778 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
| 779 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
| 780 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
| 781 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
| 782 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
| 783 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
| 784 | 0.1_wp, 0.5_wp, 0.8_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
| 785 | 100000.0_wp, 0.0_wp, 3.0_wp, 8.0_wp, 3.0_wp, 0.2_wp, & !parameter 128-133- end of type 3 |
---|
| 786 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
| 787 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
| 788 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
| 789 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
| 790 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
| 791 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
| 792 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
| 793 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
| 794 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
| 795 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
| 796 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
| 797 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
| 798 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
| 799 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
| 800 | 2.1_wp, 0.93_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
| 801 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
| 802 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
| 803 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
| 804 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
| 805 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
| 806 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
| 807 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
| 808 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
| 809 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
| 810 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
| 811 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
| 812 | 0.1_wp, 1.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
| 813 | 100000.0_wp, 0.0_wp, 3.0_wp, 10.0_wp, 3.0_wp, 0.2_wp, & !parameter 128-133- end of type 4 |
---|
| 814 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
| 815 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 6-11 |
---|
| 816 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
| 817 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
| 818 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
| 819 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
| 820 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
| 821 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
| 822 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
| 823 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, & !parameter 41-44 |
---|
| 824 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
| 825 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
| 826 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
| 827 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
| 828 | 0.04_wp, 0.92_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
| 829 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
| 830 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
| 831 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
| 832 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
| 833 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
| 834 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
| 835 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
| 836 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
| 837 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
| 838 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
| 839 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
| 840 | 0.1_wp, 1.5_wp, 0.65_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
| 841 | 100000.0_wp, 0.0_wp, 7.0_wp, 20.0_wp, 3.0_wp, 0.2_wp, & !parameter 128-133- end of type 5 |
---|
| 842 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
| 843 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
| 844 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
| 845 | 0.01_wp, 0.001_wp, 0.475_wp, & !parameter 18-20 |
---|
| 846 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
| 847 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
| 848 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
| 849 | 27.0_wp, 0.525_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
| 850 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
| 851 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
| 852 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
| 853 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.425_wp, 0.005_wp, & !parameter 50-54 |
---|
| 854 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
| 855 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
| 856 | 0.035_wp, 0.92_wp, 27.0_wp, 0.575_wp, & !parameter 63-66 |
---|
| 857 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
| 858 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
| 859 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
| 860 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
| 861 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
| 862 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
| 863 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
| 864 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
| 865 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
| 866 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
| 867 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
| 868 | 0.1_wp, 1.5_wp, 0.9_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
| 869 | 100000.0_wp, 0.0_wp, 5.0_wp, 15.0_wp, 3.0_wp, 0.2_wp, & !parameter 128-133- end of type 6 |
---|
| 870 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
| 871 | 1.0_wp, 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 6-11 |
---|
| 872 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 4.0_wp, & !parameter 12-17 |
---|
| 873 | 0.01_wp, 0.001_wp, 1.0_wp, & !parameter 18-20 |
---|
| 874 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 21-25 |
---|
| 875 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, & !parameter 26-28 |
---|
| 876 | 1.0_wp, 1.0_wp, 0.9_wp, & !parameter 29-31 |
---|
| 877 | 27.0_wp, 0.0_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
| 878 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
| 879 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, & !parameter 41-44 |
---|
| 880 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
| 881 | 5.0_wp, 0.001_wp, 0.0001_wp, 1.0_wp, 0.29_wp, & !parameter 50-54 |
---|
| 882 | 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 55-58 |
---|
| 883 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, & !parameter 59-62 |
---|
| 884 | 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 63-66 |
---|
| 885 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
| 886 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
| 887 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
| 888 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
| 889 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, 1848000.0_wp, & !parameter 85-90 |
---|
| 890 | 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
| 891 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
| 892 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
| 893 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
| 894 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
| 895 | 299.15_wp, 293.15_wp, 0.8_wp, 100.0_wp, 100.0_wp, & !parameter 117-121 |
---|
| 896 | 20.0_wp, 20.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 4.5_wp, & !parameter 122-127 |
---|
| 897 | 100000.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp, 0.2_wp & !parameter 128-133- end of type 7 (bridge) |
---|
| 898 | /), & |
---|
| 899 | (/134, 7/) ) |
---|
| 900 | |
---|
[2737] | 901 | ! |
---|
| 902 | !-- Type for surface temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
| 903 | TYPE t_surf_vertical |
---|
| 904 | REAL(wp), DIMENSION(:), ALLOCATABLE :: t |
---|
| 905 | END TYPE t_surf_vertical |
---|
| 906 | ! |
---|
| 907 | !-- Type for wall temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
| 908 | TYPE t_wall_vertical |
---|
| 909 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t |
---|
| 910 | END TYPE t_wall_vertical |
---|
| 911 | |
---|
[3418] | 912 | TYPE surf_type_usm |
---|
| 913 | REAL(wp), DIMENSION(:), ALLOCATABLE :: var_usm_1d !< 1D prognostic variable |
---|
| 914 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: var_usm_2d !< 2D prognostic variable |
---|
| 915 | END TYPE surf_type_usm |
---|
| 916 | |
---|
| 917 | #if defined( __nopointer ) |
---|
| 918 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
| 919 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
[2737] | 920 | |
---|
[3418] | 921 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
| 922 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
| 923 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
| 924 | #else |
---|
| 925 | TYPE(surf_type_usm), POINTER :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
| 926 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
| 927 | |
---|
| 928 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h_1, & !< |
---|
| 929 | m_liq_usm_h_2 !< |
---|
| 930 | |
---|
| 931 | TYPE(surf_type_usm), DIMENSION(:), POINTER :: & |
---|
| 932 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
| 933 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
| 934 | |
---|
| 935 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
| 936 | m_liq_usm_v_1, & !< |
---|
| 937 | m_liq_usm_v_2 !< |
---|
| 938 | #endif |
---|
| 939 | |
---|
| 940 | TYPE(surf_type_usm), TARGET :: tm_liq_usm_h_m !< liquid water reservoir tendency (m), horizontal surface elements |
---|
| 941 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: tm_liq_usm_v_m !< liquid water reservoir tendency (m), vertical surface elements |
---|
| 942 | |
---|
| 943 | |
---|
[2737] | 944 | !-- arrays for time averages |
---|
| 945 | !-- Attention: the variable rad_net_av is also used in the 3d field variable in radiation_model_mod.f90. It may be better to rename it |
---|
| 946 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinsw_av !< average of sw radiation falling to local surface including radiation from reflections |
---|
| 947 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlw_av !< average of lw radiation falling to local surface including radiation from reflections |
---|
| 948 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswdir_av !< average of direct sw radiation falling to local surface |
---|
| 949 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswdif_av !< average of diffuse sw radiation from sky and model boundary falling to local surface |
---|
| 950 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlwdif_av !< average of diffuse lw radiation from sky and model boundary falling to local surface |
---|
| 951 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswref_av !< average of sw radiation falling to surface from reflections |
---|
| 952 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlwref_av !< average of lw radiation falling to surface from reflections |
---|
| 953 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfoutsw_av !< average of total sw radiation outgoing from nonvirtual surfaces surfaces after all reflection |
---|
| 954 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfoutlw_av !< average of total lw radiation outgoing from nonvirtual surfaces surfaces after all reflection |
---|
| 955 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfins_av !< average of array of residua of sw radiation absorbed in surface after last reflection |
---|
| 956 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinl_av !< average of array of residua of lw radiation absorbed in surface after last reflection |
---|
[3337] | 957 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinlw_av !< Average of pcbinlw |
---|
| 958 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinsw_av !< Average of pcbinsw |
---|
| 959 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinswdir_av !< Average of pcbinswdir |
---|
| 960 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinswdif_av !< Average of pcbinswdif |
---|
| 961 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinswref_av !< Average of pcbinswref |
---|
[3418] | 962 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfhf_av !< average of total radiation flux incoming to minus outgoing from local surface |
---|
| 963 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_av !< average of wghf_eb |
---|
| 964 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wshf_eb_av !< average of wshf_eb |
---|
| 965 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_wall_av !< Average of t_wall |
---|
| 966 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_green_av !< average of wghf_eb_green |
---|
| 967 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_green_av !< Average of t_green |
---|
| 968 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_window_av !< average of wghf_eb_window |
---|
| 969 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_window_av !< Average of t_window |
---|
| 970 | REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_eb_av !< average of qsws_eb |
---|
| 971 | REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg_eb_av !< average of qsws_veg_eb |
---|
| 972 | REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq_eb_av !< average of qsws_liq_eb |
---|
| 973 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: swc_av !< Average of swc |
---|
[2737] | 974 | |
---|
| 975 | |
---|
| 976 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 977 | !-- anthropogenic heat sources |
---|
| 978 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[2920] | 979 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: aheat !< daily average of anthropogenic heat (W/m2) |
---|
| 980 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: aheatprof !< diurnal profiles of anthropogenic heat for particular layers |
---|
[3123] | 981 | INTEGER(iwp) :: naheatlayers = 1 !< number of layers of anthropogenic heat |
---|
[2737] | 982 | |
---|
| 983 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 984 | !-- wall surface model |
---|
| 985 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 986 | !-- wall surface model constants |
---|
| 987 | INTEGER(iwp), PARAMETER :: nzb_wall = 0 !< inner side of the wall model (to be switched) |
---|
| 988 | INTEGER(iwp), PARAMETER :: nzt_wall = 3 !< outer side of the wall model (to be switched) |
---|
| 989 | INTEGER(iwp), PARAMETER :: nzw = 4 !< number of wall layers (fixed for now) |
---|
| 990 | |
---|
| 991 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
| 992 | !< normalized soil, wall and roof layer depths (m/m) |
---|
| 993 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
| 994 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
| 995 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
| 996 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
| 997 | !< normalized window layer depths (m/m) |
---|
| 998 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
| 999 | !< normalized green layer depths (m/m) |
---|
| 1000 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
| 1001 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
| 1002 | |
---|
| 1003 | |
---|
[2920] | 1004 | REAL(wp) :: wall_inner_temperature = 295.0_wp !< temperature of the inner wall surface (~22 degrees C) (K) |
---|
| 1005 | REAL(wp) :: roof_inner_temperature = 295.0_wp !< temperature of the inner roof surface (~22 degrees C) (K) |
---|
| 1006 | REAL(wp) :: soil_inner_temperature = 288.0_wp !< temperature of the deep soil (~15 degrees C) (K) |
---|
| 1007 | REAL(wp) :: window_inner_temperature = 295.0_wp !< temperature of the inner window surface (~22 degrees C) (K) |
---|
| 1008 | |
---|
[3418] | 1009 | REAL(wp) :: m_total = 0.0_wp !< weighted total water content of the soil (m3/m3) |
---|
| 1010 | INTEGER(iwp) :: soil_type |
---|
| 1011 | |
---|
[2737] | 1012 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1013 | !-- surface and material model variables for walls, ground, roofs |
---|
| 1014 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1015 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn !< normalized wall layer depths (m) |
---|
| 1016 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_window !< normalized window layer depths (m) |
---|
| 1017 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_green !< normalized green layer depths (m) |
---|
| 1018 | |
---|
| 1019 | #if defined( __nopointer ) |
---|
[3418] | 1020 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h !< wall surface temperature (K) at horizontal walls |
---|
| 1021 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_p !< progn. wall surface temperature (K) at horizontal walls |
---|
[2737] | 1022 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h !< window surface temperature (K) at horizontal walls |
---|
| 1023 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_p !< progn. window surface temperature (K) at horizontal walls |
---|
| 1024 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h !< green surface temperature (K) at horizontal walls |
---|
| 1025 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_p !< progn. green surface temperature (K) at horizontal walls |
---|
| 1026 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h !< near surface temperature (10cm) (K) at horizontal walls |
---|
| 1027 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_p !< progn. near surface temperature (10cm) (K) at horizontal walls |
---|
[3418] | 1028 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v |
---|
| 1029 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_p |
---|
[2737] | 1030 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v |
---|
| 1031 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_p |
---|
| 1032 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v |
---|
| 1033 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_p |
---|
| 1034 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v |
---|
| 1035 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_p |
---|
| 1036 | #else |
---|
[3418] | 1037 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h |
---|
| 1038 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h_p |
---|
[2737] | 1039 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h |
---|
| 1040 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h_p |
---|
| 1041 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h |
---|
| 1042 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h_p |
---|
| 1043 | REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h |
---|
| 1044 | REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h_p |
---|
| 1045 | |
---|
[3418] | 1046 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_1 |
---|
| 1047 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_2 |
---|
[2737] | 1048 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_1 |
---|
| 1049 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_2 |
---|
| 1050 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_1 |
---|
| 1051 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_2 |
---|
| 1052 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_1 |
---|
| 1053 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_2 |
---|
| 1054 | |
---|
[3418] | 1055 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v |
---|
| 1056 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v_p |
---|
[2737] | 1057 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v |
---|
| 1058 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v_p |
---|
| 1059 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v |
---|
| 1060 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v_p |
---|
| 1061 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v |
---|
| 1062 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v_p |
---|
| 1063 | |
---|
[3418] | 1064 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_1 |
---|
| 1065 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_2 |
---|
[2737] | 1066 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_1 |
---|
| 1067 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_2 |
---|
| 1068 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_1 |
---|
| 1069 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_2 |
---|
| 1070 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_1 |
---|
| 1071 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_2 |
---|
| 1072 | |
---|
| 1073 | #endif |
---|
[3418] | 1074 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_av !< average of wall surface temperature (K) |
---|
| 1075 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_av !< average of window surface temperature (K) |
---|
| 1076 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_av !< average of green wall surface temperature (K) |
---|
| 1077 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_av !< average of whole wall surface temperature (K) |
---|
[2737] | 1078 | |
---|
[3418] | 1079 | !-- Temporal tendencies for time stepping |
---|
| 1080 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_wall_m !< surface temperature tendency of wall (K) |
---|
| 1081 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_window_m !< surface temperature tendency of window (K) |
---|
| 1082 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_green_m !< surface temperature tendency of green wall (K) |
---|
| 1083 | |
---|
[2737] | 1084 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1085 | !-- Energy balance variables |
---|
| 1086 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 1087 | !-- parameters of the land, roof and wall surfaces |
---|
| 1088 | |
---|
| 1089 | #if defined( __nopointer ) |
---|
| 1090 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h !< Wall temperature (K) |
---|
[3418] | 1091 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_av !< Average of t_wall |
---|
[2737] | 1092 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_p !< Prog. wall temperature (K) |
---|
| 1093 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h !< Window temperature (K) |
---|
[3418] | 1094 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_av !< Average of t_window |
---|
[2737] | 1095 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_p !< Prog. window temperature (K) |
---|
| 1096 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h !< Green temperature (K) |
---|
[3418] | 1097 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_av !< Average of t_green |
---|
[2737] | 1098 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_p !< Prog. green temperature (K) |
---|
[3418] | 1099 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h !< soil water content green building layer |
---|
| 1100 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_av !< avg of soil water content green building layer |
---|
| 1101 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_p !< Prog. soil water content green building layer |
---|
| 1102 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_sat_h !< soil water content green building layer at saturation |
---|
| 1103 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_res_h !< soil water content green building layer residual |
---|
| 1104 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: rootfr_h !< root fraction green green building layer |
---|
| 1105 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: wilt_h !< wilting point green building layer |
---|
| 1106 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: fc_h !< field capacity green building layer |
---|
[2737] | 1107 | |
---|
[3418] | 1108 | |
---|
[2737] | 1109 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v !< Wall temperature (K) |
---|
[3418] | 1110 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_av !< Average of t_wall |
---|
[2737] | 1111 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_p !< Prog. wall temperature (K) |
---|
| 1112 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v !< Window temperature (K) |
---|
[3418] | 1113 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_av !< Average of t_window |
---|
[2737] | 1114 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_p !< Prog. window temperature (K) |
---|
| 1115 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v !< Green temperature (K) |
---|
[3418] | 1116 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_av !< Average of t_green |
---|
[2737] | 1117 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_p !< Prog. green temperature (K) |
---|
[3418] | 1118 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v !< Wall swc |
---|
| 1119 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_av !< Average of swc |
---|
| 1120 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_p !< Prog. swc |
---|
| 1121 | |
---|
[2737] | 1122 | #else |
---|
| 1123 | REAL(wp), DIMENSION(:,:), POINTER :: t_wall_h, t_wall_h_p |
---|
[3418] | 1124 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_av, t_wall_h_1, t_wall_h_2 |
---|
[2737] | 1125 | REAL(wp), DIMENSION(:,:), POINTER :: t_window_h, t_window_h_p |
---|
[3418] | 1126 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_av, t_window_h_1, t_window_h_2 |
---|
[2737] | 1127 | REAL(wp), DIMENSION(:,:), POINTER :: t_green_h, t_green_h_p |
---|
[3418] | 1128 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_av, t_green_h_1, t_green_h_2 |
---|
| 1129 | REAL(wp), DIMENSION(:,:), POINTER :: swc_h, rootfr_h, wilt_h, fc_h, swc_sat_h, swc_h_p, swc_res_h |
---|
| 1130 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_1, rootfr_h_1, & |
---|
| 1131 | wilt_h_1, fc_h_1, swc_sat_h_1, swc_h_2, swc_res_h_1 |
---|
| 1132 | |
---|
[2737] | 1133 | |
---|
| 1134 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_wall_v, t_wall_v_p |
---|
[3418] | 1135 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_av, t_wall_v_1, t_wall_v_2 |
---|
[2737] | 1136 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_window_v, t_window_v_p |
---|
[3418] | 1137 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_av, t_window_v_1, t_window_v_2 |
---|
[2737] | 1138 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_green_v, t_green_v_p |
---|
[3418] | 1139 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_av, t_green_v_1, t_green_v_2 |
---|
| 1140 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: swc_v, swc_v_p |
---|
| 1141 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_av, swc_v_1, swc_v_2 |
---|
[2737] | 1142 | #endif |
---|
| 1143 | |
---|
[3418] | 1144 | !-- Wall temporal tendencies for time stepping |
---|
| 1145 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_wall_m !< t_wall prognostic array |
---|
| 1146 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_window_m !< t_window prognostic array |
---|
| 1147 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_green_m !< t_green prognostic array |
---|
| 1148 | |
---|
[2737] | 1149 | !-- Surface and material parameters classes (surface_type) |
---|
| 1150 | !-- albedo, emissivity, lambda_surf, roughness, thickness, volumetric heat capacity, thermal conductivity |
---|
| 1151 | INTEGER(iwp) :: n_surface_types !< number of the wall type categories |
---|
[2920] | 1152 | INTEGER(iwp), PARAMETER :: n_surface_params = 9 !< number of parameters for each type of the wall |
---|
[2737] | 1153 | INTEGER(iwp), PARAMETER :: ialbedo = 1 !< albedo of the surface |
---|
| 1154 | INTEGER(iwp), PARAMETER :: iemiss = 2 !< emissivity of the surface |
---|
[2920] | 1155 | INTEGER(iwp), PARAMETER :: ilambdas = 3 !< heat conductivity lambda S between surface and material ( W m-2 K-1 ) |
---|
| 1156 | INTEGER(iwp), PARAMETER :: irough = 4 !< roughness length z0 for movements |
---|
| 1157 | INTEGER(iwp), PARAMETER :: iroughh = 5 !< roughness length z0h for scalars (heat, humidity,...) |
---|
| 1158 | INTEGER(iwp), PARAMETER :: icsurf = 6 !< Surface skin layer heat capacity (J m-2 K-1 ) |
---|
| 1159 | INTEGER(iwp), PARAMETER :: ithick = 7 !< thickness of the surface (wall, roof, land) ( m ) |
---|
| 1160 | INTEGER(iwp), PARAMETER :: irhoC = 8 !< volumetric heat capacity rho*C of the material ( J m-3 K-1 ) |
---|
| 1161 | INTEGER(iwp), PARAMETER :: ilambdah = 9 !< thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
[2737] | 1162 | CHARACTER(12), DIMENSION(:), ALLOCATABLE :: surface_type_names !< names of wall types (used only for reports) |
---|
| 1163 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: surface_type_codes !< codes of wall types |
---|
| 1164 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: surface_params !< parameters of wall types |
---|
| 1165 | |
---|
| 1166 | |
---|
| 1167 | !-- interfaces of subroutines accessed from outside of this module |
---|
| 1168 | INTERFACE usm_boundary_condition |
---|
| 1169 | MODULE PROCEDURE usm_boundary_condition |
---|
| 1170 | END INTERFACE usm_boundary_condition |
---|
| 1171 | |
---|
| 1172 | INTERFACE usm_check_data_output |
---|
| 1173 | MODULE PROCEDURE usm_check_data_output |
---|
| 1174 | END INTERFACE usm_check_data_output |
---|
| 1175 | |
---|
| 1176 | INTERFACE usm_check_parameters |
---|
| 1177 | MODULE PROCEDURE usm_check_parameters |
---|
| 1178 | END INTERFACE usm_check_parameters |
---|
| 1179 | |
---|
| 1180 | INTERFACE usm_data_output_3d |
---|
| 1181 | MODULE PROCEDURE usm_data_output_3d |
---|
| 1182 | END INTERFACE usm_data_output_3d |
---|
| 1183 | |
---|
| 1184 | INTERFACE usm_define_netcdf_grid |
---|
| 1185 | MODULE PROCEDURE usm_define_netcdf_grid |
---|
| 1186 | END INTERFACE usm_define_netcdf_grid |
---|
| 1187 | |
---|
| 1188 | INTERFACE usm_init_urban_surface |
---|
| 1189 | MODULE PROCEDURE usm_init_urban_surface |
---|
| 1190 | END INTERFACE usm_init_urban_surface |
---|
| 1191 | |
---|
| 1192 | INTERFACE usm_material_heat_model |
---|
| 1193 | MODULE PROCEDURE usm_material_heat_model |
---|
| 1194 | END INTERFACE usm_material_heat_model |
---|
| 1195 | |
---|
| 1196 | INTERFACE usm_green_heat_model |
---|
| 1197 | MODULE PROCEDURE usm_green_heat_model |
---|
| 1198 | END INTERFACE usm_green_heat_model |
---|
| 1199 | |
---|
| 1200 | INTERFACE usm_parin |
---|
| 1201 | MODULE PROCEDURE usm_parin |
---|
| 1202 | END INTERFACE usm_parin |
---|
| 1203 | |
---|
| 1204 | INTERFACE usm_temperature_near_surface |
---|
| 1205 | MODULE PROCEDURE usm_temperature_near_surface |
---|
| 1206 | END INTERFACE usm_temperature_near_surface |
---|
| 1207 | |
---|
[2894] | 1208 | INTERFACE usm_rrd_local |
---|
| 1209 | MODULE PROCEDURE usm_rrd_local |
---|
| 1210 | END INTERFACE usm_rrd_local |
---|
[2737] | 1211 | |
---|
| 1212 | INTERFACE usm_surface_energy_balance |
---|
| 1213 | MODULE PROCEDURE usm_surface_energy_balance |
---|
| 1214 | END INTERFACE usm_surface_energy_balance |
---|
| 1215 | |
---|
| 1216 | INTERFACE usm_swap_timelevel |
---|
| 1217 | MODULE PROCEDURE usm_swap_timelevel |
---|
| 1218 | END INTERFACE usm_swap_timelevel |
---|
| 1219 | |
---|
[2894] | 1220 | INTERFACE usm_wrd_local |
---|
| 1221 | MODULE PROCEDURE usm_wrd_local |
---|
| 1222 | END INTERFACE usm_wrd_local |
---|
[2737] | 1223 | |
---|
| 1224 | INTERFACE usm_allocate_surface |
---|
| 1225 | MODULE PROCEDURE usm_allocate_surface |
---|
| 1226 | END INTERFACE usm_allocate_surface |
---|
| 1227 | |
---|
| 1228 | INTERFACE usm_average_3d_data |
---|
| 1229 | MODULE PROCEDURE usm_average_3d_data |
---|
| 1230 | END INTERFACE usm_average_3d_data |
---|
| 1231 | |
---|
| 1232 | |
---|
| 1233 | SAVE |
---|
| 1234 | |
---|
| 1235 | PRIVATE |
---|
| 1236 | |
---|
| 1237 | !-- Public functions |
---|
| 1238 | PUBLIC usm_boundary_condition, usm_check_parameters, usm_init_urban_surface,& |
---|
[2920] | 1239 | usm_rrd_local, & |
---|
| 1240 | usm_surface_energy_balance, usm_material_heat_model, & |
---|
| 1241 | usm_swap_timelevel, usm_check_data_output, usm_average_3d_data, & |
---|
| 1242 | usm_data_output_3d, usm_define_netcdf_grid, usm_parin, & |
---|
[2894] | 1243 | usm_wrd_local, usm_allocate_surface |
---|
[2737] | 1244 | |
---|
| 1245 | !-- Public parameters, constants and initial values |
---|
[3418] | 1246 | PUBLIC usm_anthropogenic_heat, usm_material_model, usm_wall_mod, & |
---|
| 1247 | usm_green_heat_model, usm_temperature_near_surface, building_pars |
---|
[2737] | 1248 | |
---|
| 1249 | |
---|
| 1250 | |
---|
| 1251 | CONTAINS |
---|
| 1252 | |
---|
| 1253 | !------------------------------------------------------------------------------! |
---|
| 1254 | ! Description: |
---|
| 1255 | ! ------------ |
---|
| 1256 | !> This subroutine creates the necessary indices of the urban surfaces |
---|
| 1257 | !> and plant canopy and it allocates the needed arrays for USM |
---|
| 1258 | !------------------------------------------------------------------------------! |
---|
| 1259 | SUBROUTINE usm_allocate_surface |
---|
| 1260 | |
---|
| 1261 | IMPLICIT NONE |
---|
| 1262 | |
---|
| 1263 | INTEGER(iwp) :: l |
---|
| 1264 | |
---|
| 1265 | ! |
---|
| 1266 | !-- Allocate radiation arrays which are part of the new data type. |
---|
| 1267 | !-- For horizontal surfaces. |
---|
| 1268 | ALLOCATE( surf_usm_h%surfhf(1:surf_usm_h%ns) ) |
---|
| 1269 | ALLOCATE( surf_usm_h%rad_net_l(1:surf_usm_h%ns) ) |
---|
| 1270 | ! |
---|
| 1271 | !-- For vertical surfaces |
---|
| 1272 | DO l = 0, 3 |
---|
| 1273 | ALLOCATE( surf_usm_v(l)%surfhf(1:surf_usm_v(l)%ns) ) |
---|
| 1274 | ALLOCATE( surf_usm_v(l)%rad_net_l(1:surf_usm_v(l)%ns) ) |
---|
| 1275 | ENDDO |
---|
| 1276 | |
---|
| 1277 | !-- Wall surface model |
---|
| 1278 | !-- allocate arrays for wall surface model and define pointers |
---|
| 1279 | |
---|
| 1280 | !-- allocate array of wall types and wall parameters |
---|
[3222] | 1281 | ALLOCATE ( surf_usm_h%surface_types(1:surf_usm_h%ns) ) |
---|
| 1282 | ALLOCATE ( surf_usm_h%building_type(1:surf_usm_h%ns) ) |
---|
| 1283 | ALLOCATE ( surf_usm_h%building_type_name(1:surf_usm_h%ns) ) |
---|
[3223] | 1284 | surf_usm_h%building_type = 0 |
---|
| 1285 | surf_usm_h%building_type_name = 'none' |
---|
[2737] | 1286 | DO l = 0, 3 |
---|
| 1287 | ALLOCATE( surf_usm_v(l)%surface_types(1:surf_usm_v(l)%ns) ) |
---|
[3222] | 1288 | ALLOCATE ( surf_usm_v(l)%building_type(1:surf_usm_v(l)%ns) ) |
---|
| 1289 | ALLOCATE ( surf_usm_v(l)%building_type_name(1:surf_usm_v(l)%ns) ) |
---|
[3223] | 1290 | surf_usm_v(l)%building_type = 0 |
---|
| 1291 | surf_usm_v(l)%building_type_name = 'none' |
---|
[2737] | 1292 | ENDDO |
---|
| 1293 | ! |
---|
| 1294 | !-- Allocate albedo_type and albedo. Each surface element |
---|
| 1295 | !-- has 3 values, 0: wall fraction, 1: green fraction, 2: window fraction. |
---|
| 1296 | ALLOCATE( surf_usm_h%albedo_type(0:2,1:surf_usm_h%ns) ) |
---|
| 1297 | ALLOCATE( surf_usm_h%albedo(0:2,1:surf_usm_h%ns) ) |
---|
| 1298 | surf_usm_h%albedo_type = albedo_type |
---|
| 1299 | DO l = 0, 3 |
---|
| 1300 | ALLOCATE( surf_usm_v(l)%albedo_type(0:2,1:surf_usm_v(l)%ns) ) |
---|
| 1301 | ALLOCATE( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns) ) |
---|
| 1302 | surf_usm_v(l)%albedo_type = albedo_type |
---|
| 1303 | ENDDO |
---|
| 1304 | |
---|
| 1305 | |
---|
| 1306 | ! |
---|
| 1307 | !-- Allocate indoor target temperature for summer and winter |
---|
| 1308 | ALLOCATE( surf_usm_h%target_temp_summer(1:surf_usm_h%ns) ) |
---|
| 1309 | ALLOCATE( surf_usm_h%target_temp_winter(1:surf_usm_h%ns) ) |
---|
| 1310 | DO l = 0, 3 |
---|
| 1311 | ALLOCATE( surf_usm_v(l)%target_temp_summer(1:surf_usm_v(l)%ns) ) |
---|
| 1312 | ALLOCATE( surf_usm_v(l)%target_temp_winter(1:surf_usm_v(l)%ns) ) |
---|
| 1313 | ENDDO |
---|
| 1314 | ! |
---|
| 1315 | !-- Allocate flag indicating ground floor level surface elements |
---|
| 1316 | ALLOCATE ( surf_usm_h%ground_level(1:surf_usm_h%ns) ) |
---|
| 1317 | DO l = 0, 3 |
---|
| 1318 | ALLOCATE( surf_usm_v(l)%ground_level(1:surf_usm_v(l)%ns) ) |
---|
| 1319 | ENDDO |
---|
| 1320 | ! |
---|
| 1321 | !-- Allocate arrays for relative surface fraction. |
---|
| 1322 | !-- 0 - wall fraction, 1 - green fraction, 2 - window fraction |
---|
| 1323 | ALLOCATE( surf_usm_h%frac(0:2,1:surf_usm_h%ns) ) |
---|
| 1324 | surf_usm_h%frac = 0.0_wp |
---|
| 1325 | DO l = 0, 3 |
---|
| 1326 | ALLOCATE( surf_usm_v(l)%frac(0:2,1:surf_usm_v(l)%ns) ) |
---|
| 1327 | surf_usm_v(l)%frac = 0.0_wp |
---|
| 1328 | ENDDO |
---|
| 1329 | |
---|
| 1330 | !-- wall and roof surface parameters. First for horizontal surfaces |
---|
[3418] | 1331 | ALLOCATE ( surf_usm_h%isroof_surf(1:surf_usm_h%ns) ) |
---|
| 1332 | ALLOCATE ( surf_usm_h%lambda_surf(1:surf_usm_h%ns) ) |
---|
[2737] | 1333 | ALLOCATE ( surf_usm_h%lambda_surf_window(1:surf_usm_h%ns) ) |
---|
| 1334 | ALLOCATE ( surf_usm_h%lambda_surf_green(1:surf_usm_h%ns) ) |
---|
[3418] | 1335 | ALLOCATE ( surf_usm_h%c_surface(1:surf_usm_h%ns) ) |
---|
[2737] | 1336 | ALLOCATE ( surf_usm_h%c_surface_window(1:surf_usm_h%ns) ) |
---|
| 1337 | ALLOCATE ( surf_usm_h%c_surface_green(1:surf_usm_h%ns) ) |
---|
[3418] | 1338 | ALLOCATE ( surf_usm_h%transmissivity(1:surf_usm_h%ns) ) |
---|
| 1339 | ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns) ) |
---|
| 1340 | ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns) ) |
---|
| 1341 | ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns) ) |
---|
| 1342 | ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns) ) |
---|
| 1343 | ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns) ) |
---|
| 1344 | ALLOCATE ( surf_usm_h%green_type_roof(1:surf_usm_h%ns) ) |
---|
| 1345 | ALLOCATE ( surf_usm_h%r_s(1:surf_usm_h%ns) ) |
---|
[2737] | 1346 | ! |
---|
| 1347 | !-- For vertical surfaces. |
---|
| 1348 | DO l = 0, 3 |
---|
| 1349 | ALLOCATE ( surf_usm_v(l)%lambda_surf(1:surf_usm_v(l)%ns) ) |
---|
| 1350 | ALLOCATE ( surf_usm_v(l)%c_surface(1:surf_usm_v(l)%ns) ) |
---|
| 1351 | ALLOCATE ( surf_usm_v(l)%lambda_surf_window(1:surf_usm_v(l)%ns) ) |
---|
| 1352 | ALLOCATE ( surf_usm_v(l)%c_surface_window(1:surf_usm_v(l)%ns) ) |
---|
| 1353 | ALLOCATE ( surf_usm_v(l)%lambda_surf_green(1:surf_usm_v(l)%ns) ) |
---|
| 1354 | ALLOCATE ( surf_usm_v(l)%c_surface_green(1:surf_usm_v(l)%ns) ) |
---|
| 1355 | ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns) ) |
---|
| 1356 | ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns) ) |
---|
| 1357 | ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns) ) |
---|
| 1358 | ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) |
---|
| 1359 | ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) |
---|
| 1360 | ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) |
---|
[3418] | 1361 | |
---|
| 1362 | ALLOCATE ( surf_usm_v(l)%r_s(1:surf_usm_v(l)%ns) ) |
---|
[2737] | 1363 | ENDDO |
---|
| 1364 | |
---|
| 1365 | ! |
---|
| 1366 | !-- allocate wall and roof material parameters. First for horizontal surfaces |
---|
| 1367 | ALLOCATE ( surf_usm_h%thickness_wall(1:surf_usm_h%ns) ) |
---|
| 1368 | ALLOCATE ( surf_usm_h%thickness_window(1:surf_usm_h%ns) ) |
---|
| 1369 | ALLOCATE ( surf_usm_h%thickness_green(1:surf_usm_h%ns) ) |
---|
| 1370 | ALLOCATE ( surf_usm_h%lambda_h(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1371 | ALLOCATE ( surf_usm_h%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1372 | ALLOCATE ( surf_usm_h%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1373 | ALLOCATE ( surf_usm_h%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1374 | ALLOCATE ( surf_usm_h%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1375 | ALLOCATE ( surf_usm_h%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1376 | |
---|
[3418] | 1377 | ALLOCATE ( surf_usm_h%rho_c_total_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1378 | ALLOCATE ( surf_usm_h%n_vg_green(1:surf_usm_h%ns) ) |
---|
| 1379 | ALLOCATE ( surf_usm_h%alpha_vg_green(1:surf_usm_h%ns) ) |
---|
| 1380 | ALLOCATE ( surf_usm_h%l_vg_green(1:surf_usm_h%ns) ) |
---|
[3435] | 1381 | ALLOCATE ( surf_usm_h%gamma_w_green_sat(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
[3418] | 1382 | ALLOCATE ( surf_usm_h%lambda_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1383 | ALLOCATE ( surf_usm_h%gamma_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1384 | ALLOCATE ( surf_usm_h%tswc_h_m(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1385 | |
---|
[2737] | 1386 | ! |
---|
| 1387 | !-- For vertical surfaces. |
---|
| 1388 | DO l = 0, 3 |
---|
| 1389 | ALLOCATE ( surf_usm_v(l)%thickness_wall(1:surf_usm_v(l)%ns) ) |
---|
| 1390 | ALLOCATE ( surf_usm_v(l)%thickness_window(1:surf_usm_v(l)%ns) ) |
---|
| 1391 | ALLOCATE ( surf_usm_v(l)%thickness_green(1:surf_usm_v(l)%ns) ) |
---|
| 1392 | ALLOCATE ( surf_usm_v(l)%lambda_h(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1393 | ALLOCATE ( surf_usm_v(l)%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1394 | ALLOCATE ( surf_usm_v(l)%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1395 | ALLOCATE ( surf_usm_v(l)%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1396 | ALLOCATE ( surf_usm_v(l)%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1397 | ALLOCATE ( surf_usm_v(l)%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1398 | ENDDO |
---|
| 1399 | |
---|
[3418] | 1400 | ! |
---|
| 1401 | !-- allocate green wall and roof vegetation and soil parameters. First horizontal surfaces |
---|
| 1402 | ALLOCATE ( surf_usm_h%g_d(1:surf_usm_h%ns) ) |
---|
| 1403 | ALLOCATE ( surf_usm_h%c_liq(1:surf_usm_h%ns) ) |
---|
| 1404 | ALLOCATE ( surf_usm_h%qsws_liq_eb(1:surf_usm_h%ns) ) |
---|
| 1405 | ALLOCATE ( surf_usm_h%qsws_veg_eb(1:surf_usm_h%ns) ) |
---|
| 1406 | ALLOCATE ( surf_usm_h%r_canopy(1:surf_usm_h%ns) ) |
---|
| 1407 | ALLOCATE ( surf_usm_h%r_canopy_min(1:surf_usm_h%ns) ) |
---|
| 1408 | ALLOCATE ( surf_usm_h%qsws_eb(1:surf_usm_h%ns) ) |
---|
| 1409 | |
---|
| 1410 | ! |
---|
| 1411 | !-- For vertical surfaces. |
---|
| 1412 | DO l = 0, 3 |
---|
| 1413 | ALLOCATE ( surf_usm_v(l)%g_d(1:surf_usm_v(l)%ns) ) |
---|
| 1414 | ALLOCATE ( surf_usm_v(l)%c_liq(1:surf_usm_v(l)%ns) ) |
---|
| 1415 | ALLOCATE ( surf_usm_v(l)%qsws_liq_eb(1:surf_usm_v(l)%ns) ) |
---|
| 1416 | ALLOCATE ( surf_usm_v(l)%qsws_veg_eb(1:surf_usm_v(l)%ns) ) |
---|
| 1417 | ALLOCATE ( surf_usm_v(l)%qsws_eb(1:surf_usm_v(l)%ns) ) |
---|
| 1418 | ALLOCATE ( surf_usm_v(l)%r_canopy(1:surf_usm_v(l)%ns) ) |
---|
| 1419 | ALLOCATE ( surf_usm_v(l)%r_canopy_min(1:surf_usm_v(l)%ns) ) |
---|
| 1420 | ENDDO |
---|
| 1421 | |
---|
[2737] | 1422 | !-- allocate wall and roof layers sizes. For horizontal surfaces. |
---|
| 1423 | ALLOCATE ( zwn(nzb_wall:nzt_wall) ) |
---|
| 1424 | ALLOCATE ( surf_usm_h%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1425 | ALLOCATE ( zwn_window(nzb_wall:nzt_wall) ) |
---|
| 1426 | ALLOCATE ( surf_usm_h%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1427 | ALLOCATE ( zwn_green(nzb_wall:nzt_wall) ) |
---|
| 1428 | ALLOCATE ( surf_usm_h%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1429 | ALLOCATE ( surf_usm_h%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1430 | ALLOCATE ( surf_usm_h%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1431 | ALLOCATE ( surf_usm_h%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1432 | ALLOCATE ( surf_usm_h%zw(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1433 | ALLOCATE ( surf_usm_h%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1434 | ALLOCATE ( surf_usm_h%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1435 | ALLOCATE ( surf_usm_h%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1436 | ALLOCATE ( surf_usm_h%zw_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1437 | ALLOCATE ( surf_usm_h%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1438 | ALLOCATE ( surf_usm_h%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1439 | ALLOCATE ( surf_usm_h%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1440 | ALLOCATE ( surf_usm_h%zw_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 1441 | ! |
---|
| 1442 | !-- For vertical surfaces. |
---|
| 1443 | DO l = 0, 3 |
---|
| 1444 | ALLOCATE ( surf_usm_v(l)%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1445 | ALLOCATE ( surf_usm_v(l)%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1446 | ALLOCATE ( surf_usm_v(l)%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1447 | ALLOCATE ( surf_usm_v(l)%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1448 | ALLOCATE ( surf_usm_v(l)%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1449 | ALLOCATE ( surf_usm_v(l)%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1450 | ALLOCATE ( surf_usm_v(l)%zw(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1451 | ALLOCATE ( surf_usm_v(l)%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1452 | ALLOCATE ( surf_usm_v(l)%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1453 | ALLOCATE ( surf_usm_v(l)%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1454 | ALLOCATE ( surf_usm_v(l)%zw_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1455 | ALLOCATE ( surf_usm_v(l)%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1456 | ALLOCATE ( surf_usm_v(l)%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1457 | ALLOCATE ( surf_usm_v(l)%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1458 | ALLOCATE ( surf_usm_v(l)%zw_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 1459 | ENDDO |
---|
| 1460 | |
---|
| 1461 | !-- allocate wall and roof temperature arrays, for horizontal walls |
---|
| 1462 | #if defined( __nopointer ) |
---|
[3418] | 1463 | IF ( .NOT. ALLOCATED( t_surf_wall_h ) ) & |
---|
| 1464 | ALLOCATE ( t_surf_wall_h(1:surf_usm_h%ns) ) |
---|
| 1465 | IF ( .NOT. ALLOCATED( t_surf_wall_h_p ) ) & |
---|
| 1466 | ALLOCATE ( t_surf_wall_h_p(1:surf_usm_h%ns) ) |
---|
[2737] | 1467 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
| 1468 | ALLOCATE ( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1469 | IF ( .NOT. ALLOCATED( t_wall_h_p ) ) & |
---|
| 1470 | ALLOCATE ( t_wall_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1471 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
| 1472 | ALLOCATE ( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
| 1473 | IF ( .NOT. ALLOCATED( t_surf_window_h_p ) ) & |
---|
| 1474 | ALLOCATE ( t_surf_window_h_p(1:surf_usm_h%ns) ) |
---|
| 1475 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
| 1476 | ALLOCATE ( t_window_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1477 | IF ( .NOT. ALLOCATED( t_window_h_p ) ) & |
---|
| 1478 | ALLOCATE ( t_window_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1479 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
| 1480 | ALLOCATE ( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
| 1481 | IF ( .NOT. ALLOCATED( t_surf_green_h_p ) ) & |
---|
| 1482 | ALLOCATE ( t_surf_green_h_p(1:surf_usm_h%ns) ) |
---|
| 1483 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
| 1484 | ALLOCATE ( t_green_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1485 | IF ( .NOT. ALLOCATED( t_green_h_p ) ) & |
---|
| 1486 | ALLOCATE ( t_green_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1487 | IF ( .NOT. ALLOCATED( t_surf_10cm_h ) ) & |
---|
| 1488 | ALLOCATE ( t_surf_10cm_h(1:surf_usm_h%ns) ) |
---|
| 1489 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_p ) ) & |
---|
| 1490 | ALLOCATE ( t_surf_10cm_h_p(1:surf_usm_h%ns) ) |
---|
[3418] | 1491 | IF ( .NOT. ALLOCATED( swc_h ) ) & |
---|
| 1492 | ALLOCATE ( swc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1493 | IF ( .NOT. ALLOCATED( swc_sat_h ) ) & |
---|
| 1494 | ALLOCATE ( swc_sat_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1495 | IF ( .NOT. ALLOCATED( swc_res_h ) ) & |
---|
| 1496 | ALLOCATE ( swc_res_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1497 | IF ( .NOT. ALLOCATED( rootfr_h ) ) & |
---|
| 1498 | ALLOCATE ( rootfr_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1499 | IF ( .NOT. ALLOCATED( wilt_h ) ) & |
---|
| 1500 | ALLOCATE ( wilt_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1501 | IF ( .NOT. ALLOCATED( fc_h ) ) & |
---|
| 1502 | ALLOCATE ( fc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1503 | |
---|
| 1504 | IF ( .NOT. ALLOCATED( m_liq_usm_h%var_usm_1d ) ) & |
---|
| 1505 | ALLOCATE ( m_liq_usm_h%var_usm_1d(1:surf_usm_h%ns) ) |
---|
| 1506 | |
---|
| 1507 | !-- Horizontal surfaces |
---|
| 1508 | ALLOCATE ( m_liq_usm_h_p%var_usm_1d(1:surf_usm_h%ns) ) |
---|
| 1509 | ! |
---|
| 1510 | !-- Vertical surfaces |
---|
| 1511 | DO l = 0, 3 |
---|
| 1512 | ALLOCATE ( m_liq_usm_v_p(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
| 1513 | ENDDO |
---|
| 1514 | |
---|
[2737] | 1515 | #else |
---|
| 1516 | ! |
---|
| 1517 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
| 1518 | !-- might be already allocated. |
---|
[3418] | 1519 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
| 1520 | ALLOCATE ( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
| 1521 | IF ( .NOT. ALLOCATED( t_surf_wall_h_2 ) ) & |
---|
| 1522 | ALLOCATE ( t_surf_wall_h_2(1:surf_usm_h%ns) ) |
---|
[2737] | 1523 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
| 1524 | ALLOCATE ( t_wall_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1525 | IF ( .NOT. ALLOCATED( t_wall_h_2 ) ) & |
---|
| 1526 | ALLOCATE ( t_wall_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1527 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
| 1528 | ALLOCATE ( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
| 1529 | IF ( .NOT. ALLOCATED( t_surf_window_h_2 ) ) & |
---|
| 1530 | ALLOCATE ( t_surf_window_h_2(1:surf_usm_h%ns) ) |
---|
| 1531 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
| 1532 | ALLOCATE ( t_window_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1533 | IF ( .NOT. ALLOCATED( t_window_h_2 ) ) & |
---|
| 1534 | ALLOCATE ( t_window_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1535 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
| 1536 | ALLOCATE ( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
| 1537 | IF ( .NOT. ALLOCATED( t_surf_green_h_2 ) ) & |
---|
| 1538 | ALLOCATE ( t_surf_green_h_2(1:surf_usm_h%ns) ) |
---|
| 1539 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
| 1540 | ALLOCATE ( t_green_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1541 | IF ( .NOT. ALLOCATED( t_green_h_2 ) ) & |
---|
| 1542 | ALLOCATE ( t_green_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1543 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_1 ) ) & |
---|
| 1544 | ALLOCATE ( t_surf_10cm_h_1(1:surf_usm_h%ns) ) |
---|
| 1545 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_2 ) ) & |
---|
| 1546 | ALLOCATE ( t_surf_10cm_h_2(1:surf_usm_h%ns) ) |
---|
[3418] | 1547 | IF ( .NOT. ALLOCATED( swc_h_1 ) ) & |
---|
| 1548 | ALLOCATE ( swc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1549 | IF ( .NOT. ALLOCATED( swc_sat_h_1 ) ) & |
---|
| 1550 | ALLOCATE ( swc_sat_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1551 | IF ( .NOT. ALLOCATED( swc_res_h_1 ) ) & |
---|
| 1552 | ALLOCATE ( swc_res_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1553 | IF ( .NOT. ALLOCATED( swc_h_2 ) ) & |
---|
| 1554 | ALLOCATE ( swc_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1555 | IF ( .NOT. ALLOCATED( rootfr_h_1 ) ) & |
---|
| 1556 | ALLOCATE ( rootfr_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1557 | IF ( .NOT. ALLOCATED( wilt_h_1 ) ) & |
---|
| 1558 | ALLOCATE ( wilt_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1559 | IF ( .NOT. ALLOCATED( fc_h_1 ) ) & |
---|
| 1560 | ALLOCATE ( fc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1561 | |
---|
| 1562 | IF ( .NOT. ALLOCATED( m_liq_usm_h_1%var_usm_1d ) ) & |
---|
| 1563 | ALLOCATE ( m_liq_usm_h_1%var_usm_1d(1:surf_usm_h%ns) ) |
---|
| 1564 | IF ( .NOT. ALLOCATED( m_liq_usm_h_2%var_usm_1d ) ) & |
---|
| 1565 | ALLOCATE ( m_liq_usm_h_2%var_usm_1d(1:surf_usm_h%ns) ) |
---|
| 1566 | |
---|
[2737] | 1567 | ! |
---|
| 1568 | !-- initial assignment of the pointers |
---|
| 1569 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
| 1570 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
| 1571 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
[3418] | 1572 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
[2737] | 1573 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
| 1574 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
| 1575 | t_surf_10cm_h => t_surf_10cm_h_1; t_surf_10cm_h_p => t_surf_10cm_h_2 |
---|
[3418] | 1576 | m_liq_usm_h => m_liq_usm_h_1; m_liq_usm_h_p => m_liq_usm_h_2 |
---|
| 1577 | swc_h => swc_h_1; swc_h_p => swc_h_2 |
---|
| 1578 | swc_sat_h => swc_sat_h_1 |
---|
| 1579 | swc_res_h => swc_res_h_1 |
---|
| 1580 | rootfr_h => rootfr_h_1 |
---|
| 1581 | wilt_h => wilt_h_1 |
---|
| 1582 | fc_h => fc_h_1 |
---|
[2737] | 1583 | |
---|
| 1584 | #endif |
---|
| 1585 | |
---|
| 1586 | !-- allocate wall and roof temperature arrays, for vertical walls if required |
---|
| 1587 | #if defined( __nopointer ) |
---|
| 1588 | DO l = 0, 3 |
---|
[3418] | 1589 | IF ( .NOT. ALLOCATED( t_surf_wall_v(l)%t ) ) & |
---|
| 1590 | ALLOCATE ( t_surf_wall_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1591 | IF ( .NOT. ALLOCATED( t_surf_wall_v_p(l)%t ) ) & |
---|
| 1592 | ALLOCATE ( t_surf_wall_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
[2737] | 1593 | IF ( .NOT. ALLOCATED( t_wall_v(l)%t ) ) & |
---|
| 1594 | ALLOCATE ( t_wall_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1595 | IF ( .NOT. ALLOCATED( t_wall_v_p(l)%t ) ) & |
---|
| 1596 | ALLOCATE ( t_wall_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1597 | IF ( .NOT. ALLOCATED( t_surf_window_v(l)%t ) ) & |
---|
| 1598 | ALLOCATE ( t_surf_window_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1599 | IF ( .NOT. ALLOCATED( t_surf_window_v_p(l)%t ) ) & |
---|
| 1600 | ALLOCATE ( t_surf_window_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1601 | IF ( .NOT. ALLOCATED( t_window_v(l)%t ) ) & |
---|
| 1602 | ALLOCATE ( t_window_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1603 | IF ( .NOT. ALLOCATED( t_window_v_p(l)%t ) ) & |
---|
| 1604 | ALLOCATE ( t_window_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1605 | IF ( .NOT. ALLOCATED( t_green_v(l)%t ) ) & |
---|
| 1606 | ALLOCATE ( t_green_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1607 | IF ( .NOT. ALLOCATED( t_green_v_p(l)%t ) ) & |
---|
| 1608 | ALLOCATE ( t_green_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1609 | IF ( .NOT. ALLOCATED( t_surf_green_v(l)%t ) ) & |
---|
| 1610 | ALLOCATE ( t_surf_green_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1611 | IF ( .NOT. ALLOCATED( t_surf_green_v_p(l)%t ) ) & |
---|
| 1612 | ALLOCATE ( t_surf_green_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1613 | IF ( .NOT. ALLOCATED( t_surf_10cm_v(l)%t ) ) & |
---|
| 1614 | ALLOCATE ( t_surf_10cm_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1615 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_p(l)%t ) ) & |
---|
| 1616 | ALLOCATE ( t_surf_10cm_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
[3418] | 1617 | IF ( .NOT. ALLOCATED( m_liq_usm_v(l)%var_usm_1d ) ) & |
---|
| 1618 | ALLOCATE ( m_liq_usm_v(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
| 1619 | IF ( .NOT. ALLOCATED( swc_v(l)%t ) ) & |
---|
| 1620 | ALLOCATE ( swc_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1621 | IF ( .NOT. ALLOCATED( swc_v_p(l)%t ) ) & |
---|
| 1622 | ALLOCATE ( swc_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
[2737] | 1623 | ENDDO |
---|
| 1624 | #else |
---|
| 1625 | ! |
---|
| 1626 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
| 1627 | !-- might be already allocated. |
---|
| 1628 | DO l = 0, 3 |
---|
[3418] | 1629 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(l)%t ) ) & |
---|
| 1630 | ALLOCATE ( t_surf_wall_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1631 | IF ( .NOT. ALLOCATED( t_surf_wall_v_2(l)%t ) ) & |
---|
| 1632 | ALLOCATE ( t_surf_wall_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
[2737] | 1633 | IF ( .NOT. ALLOCATED( t_wall_v_1(l)%t ) ) & |
---|
| 1634 | ALLOCATE ( t_wall_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1635 | IF ( .NOT. ALLOCATED( t_wall_v_2(l)%t ) ) & |
---|
| 1636 | ALLOCATE ( t_wall_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1637 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(l)%t ) ) & |
---|
| 1638 | ALLOCATE ( t_surf_window_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1639 | IF ( .NOT. ALLOCATED( t_surf_window_v_2(l)%t ) ) & |
---|
| 1640 | ALLOCATE ( t_surf_window_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1641 | IF ( .NOT. ALLOCATED( t_window_v_1(l)%t ) ) & |
---|
| 1642 | ALLOCATE ( t_window_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1643 | IF ( .NOT. ALLOCATED( t_window_v_2(l)%t ) ) & |
---|
| 1644 | ALLOCATE ( t_window_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1645 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(l)%t ) ) & |
---|
| 1646 | ALLOCATE ( t_surf_green_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1647 | IF ( .NOT. ALLOCATED( t_surf_green_v_2(l)%t ) ) & |
---|
| 1648 | ALLOCATE ( t_surf_green_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1649 | IF ( .NOT. ALLOCATED( t_green_v_1(l)%t ) ) & |
---|
| 1650 | ALLOCATE ( t_green_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1651 | IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) ) & |
---|
| 1652 | ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1653 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_1(l)%t ) ) & |
---|
| 1654 | ALLOCATE ( t_surf_10cm_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
| 1655 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_2(l)%t ) ) & |
---|
| 1656 | ALLOCATE ( t_surf_10cm_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
[3418] | 1657 | IF ( .NOT. ALLOCATED( m_liq_usm_v_1(l)%var_usm_1d ) ) & |
---|
| 1658 | ALLOCATE ( m_liq_usm_v_1(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
| 1659 | IF ( .NOT. ALLOCATED( m_liq_usm_v_2(l)%var_usm_1d ) ) & |
---|
| 1660 | ALLOCATE ( m_liq_usm_v_2(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
| 1661 | IF ( .NOT. ALLOCATED( swc_v_1(l)%t ) ) & |
---|
| 1662 | ALLOCATE ( swc_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1663 | IF ( .NOT. ALLOCATED( swc_v_2(l)%t ) ) & |
---|
| 1664 | ALLOCATE ( swc_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
[2737] | 1665 | ENDDO |
---|
| 1666 | ! |
---|
| 1667 | !-- initial assignment of the pointers |
---|
| 1668 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
[3418] | 1669 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
[2737] | 1670 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
| 1671 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
| 1672 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
| 1673 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
| 1674 | t_surf_10cm_v => t_surf_10cm_v_1; t_surf_10cm_v_p => t_surf_10cm_v_2 |
---|
[3418] | 1675 | m_liq_usm_v => m_liq_usm_v_1; m_liq_usm_v_p => m_liq_usm_v_2 |
---|
| 1676 | swc_v => swc_v_1; swc_v_p => swc_v_2 |
---|
[2737] | 1677 | |
---|
| 1678 | #endif |
---|
| 1679 | ! |
---|
| 1680 | !-- Allocate intermediate timestep arrays. For horizontal surfaces. |
---|
[3418] | 1681 | ALLOCATE ( surf_usm_h%tt_surface_wall_m(1:surf_usm_h%ns) ) |
---|
[2737] | 1682 | ALLOCATE ( surf_usm_h%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1683 | ALLOCATE ( surf_usm_h%tt_surface_window_m(1:surf_usm_h%ns) ) |
---|
| 1684 | ALLOCATE ( surf_usm_h%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1685 | ALLOCATE ( surf_usm_h%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 1686 | ALLOCATE ( surf_usm_h%tt_surface_green_m(1:surf_usm_h%ns) ) |
---|
| 1687 | |
---|
| 1688 | ! |
---|
[3418] | 1689 | !-- Allocate intermediate timestep arrays |
---|
| 1690 | !-- Horizontal surfaces |
---|
| 1691 | ALLOCATE ( tm_liq_usm_h_m%var_usm_1d(1:surf_usm_h%ns) ) |
---|
| 1692 | ! |
---|
| 1693 | !-- Horizontal surfaces |
---|
| 1694 | DO l = 0, 3 |
---|
| 1695 | ALLOCATE ( tm_liq_usm_v_m(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
| 1696 | ENDDO |
---|
| 1697 | |
---|
| 1698 | ! |
---|
[2737] | 1699 | !-- Set inital values for prognostic quantities |
---|
[3418] | 1700 | IF ( ALLOCATED( surf_usm_h%tt_surface_wall_m ) ) surf_usm_h%tt_surface_wall_m = 0.0_wp |
---|
[2737] | 1701 | IF ( ALLOCATED( surf_usm_h%tt_wall_m ) ) surf_usm_h%tt_wall_m = 0.0_wp |
---|
| 1702 | IF ( ALLOCATED( surf_usm_h%tt_surface_window_m ) ) surf_usm_h%tt_surface_window_m = 0.0_wp |
---|
| 1703 | IF ( ALLOCATED( surf_usm_h%tt_window_m ) ) surf_usm_h%tt_window_m = 0.0_wp |
---|
| 1704 | IF ( ALLOCATED( surf_usm_h%tt_green_m ) ) surf_usm_h%tt_green_m = 0.0_wp |
---|
| 1705 | IF ( ALLOCATED( surf_usm_h%tt_surface_green_m ) ) surf_usm_h%tt_surface_green_m = 0.0_wp |
---|
| 1706 | ! |
---|
| 1707 | !-- Now, for vertical surfaces |
---|
| 1708 | DO l = 0, 3 |
---|
[3418] | 1709 | ALLOCATE ( surf_usm_v(l)%tt_surface_wall_m(1:surf_usm_v(l)%ns) ) |
---|
[2737] | 1710 | ALLOCATE ( surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
[3418] | 1711 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_wall_m ) ) surf_usm_v(l)%tt_surface_wall_m = 0.0_wp |
---|
[2737] | 1712 | IF ( ALLOCATED( surf_usm_v(l)%tt_wall_m ) ) surf_usm_v(l)%tt_wall_m = 0.0_wp |
---|
| 1713 | ALLOCATE ( surf_usm_v(l)%tt_surface_window_m(1:surf_usm_v(l)%ns) ) |
---|
| 1714 | ALLOCATE ( surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1715 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_window_m ) ) surf_usm_v(l)%tt_surface_window_m = 0.0_wp |
---|
| 1716 | IF ( ALLOCATED( surf_usm_v(l)%tt_window_m ) ) surf_usm_v(l)%tt_window_m = 0.0_wp |
---|
| 1717 | ALLOCATE ( surf_usm_v(l)%tt_surface_green_m(1:surf_usm_v(l)%ns) ) |
---|
| 1718 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_green_m ) ) surf_usm_v(l)%tt_surface_green_m = 0.0_wp |
---|
| 1719 | ALLOCATE ( surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
| 1720 | IF ( ALLOCATED( surf_usm_v(l)%tt_green_m ) ) surf_usm_v(l)%tt_green_m = 0.0_wp |
---|
| 1721 | ENDDO |
---|
| 1722 | |
---|
| 1723 | !-- allocate wall heat flux output array and set initial values. For horizontal surfaces |
---|
| 1724 | ! ALLOCATE ( surf_usm_h%wshf(1:surf_usm_h%ns) ) !can be removed |
---|
| 1725 | ALLOCATE ( surf_usm_h%wshf_eb(1:surf_usm_h%ns) ) |
---|
| 1726 | ALLOCATE ( surf_usm_h%wghf_eb(1:surf_usm_h%ns) ) |
---|
| 1727 | ALLOCATE ( surf_usm_h%wghf_eb_window(1:surf_usm_h%ns) ) |
---|
| 1728 | ALLOCATE ( surf_usm_h%wghf_eb_green(1:surf_usm_h%ns) ) |
---|
| 1729 | ALLOCATE ( surf_usm_h%iwghf_eb(1:surf_usm_h%ns) ) |
---|
| 1730 | ALLOCATE ( surf_usm_h%iwghf_eb_window(1:surf_usm_h%ns) ) |
---|
| 1731 | IF ( ALLOCATED( surf_usm_h%wshf ) ) surf_usm_h%wshf = 0.0_wp |
---|
| 1732 | IF ( ALLOCATED( surf_usm_h%wshf_eb ) ) surf_usm_h%wshf_eb = 0.0_wp |
---|
| 1733 | IF ( ALLOCATED( surf_usm_h%wghf_eb ) ) surf_usm_h%wghf_eb = 0.0_wp |
---|
| 1734 | IF ( ALLOCATED( surf_usm_h%wghf_eb_window ) ) surf_usm_h%wghf_eb_window = 0.0_wp |
---|
| 1735 | IF ( ALLOCATED( surf_usm_h%wghf_eb_green ) ) surf_usm_h%wghf_eb_green = 0.0_wp |
---|
| 1736 | IF ( ALLOCATED( surf_usm_h%iwghf_eb ) ) surf_usm_h%iwghf_eb = 0.0_wp |
---|
| 1737 | IF ( ALLOCATED( surf_usm_h%iwghf_eb_window ) ) surf_usm_h%iwghf_eb_window = 0.0_wp |
---|
| 1738 | ! |
---|
| 1739 | !-- Now, for vertical surfaces |
---|
| 1740 | DO l = 0, 3 |
---|
| 1741 | ! ALLOCATE ( surf_usm_v(l)%wshf(1:surf_usm_v(l)%ns) ) ! can be removed |
---|
| 1742 | ALLOCATE ( surf_usm_v(l)%wshf_eb(1:surf_usm_v(l)%ns) ) |
---|
| 1743 | ALLOCATE ( surf_usm_v(l)%wghf_eb(1:surf_usm_v(l)%ns) ) |
---|
| 1744 | ALLOCATE ( surf_usm_v(l)%wghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
| 1745 | ALLOCATE ( surf_usm_v(l)%wghf_eb_green(1:surf_usm_v(l)%ns) ) |
---|
| 1746 | ALLOCATE ( surf_usm_v(l)%iwghf_eb(1:surf_usm_v(l)%ns) ) |
---|
| 1747 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
| 1748 | IF ( ALLOCATED( surf_usm_v(l)%wshf ) ) surf_usm_v(l)%wshf = 0.0_wp |
---|
| 1749 | IF ( ALLOCATED( surf_usm_v(l)%wshf_eb ) ) surf_usm_v(l)%wshf_eb = 0.0_wp |
---|
| 1750 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb ) ) surf_usm_v(l)%wghf_eb = 0.0_wp |
---|
| 1751 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_window ) ) surf_usm_v(l)%wghf_eb_window = 0.0_wp |
---|
| 1752 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_green ) ) surf_usm_v(l)%wghf_eb_green = 0.0_wp |
---|
| 1753 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb ) ) surf_usm_v(l)%iwghf_eb = 0.0_wp |
---|
| 1754 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) ) surf_usm_v(l)%iwghf_eb_window = 0.0_wp |
---|
| 1755 | ENDDO |
---|
| 1756 | |
---|
| 1757 | END SUBROUTINE usm_allocate_surface |
---|
| 1758 | |
---|
| 1759 | |
---|
| 1760 | !------------------------------------------------------------------------------! |
---|
| 1761 | ! Description: |
---|
| 1762 | ! ------------ |
---|
| 1763 | !> Sum up and time-average urban surface output quantities as well as allocate |
---|
| 1764 | !> the array necessary for storing the average. |
---|
| 1765 | !------------------------------------------------------------------------------! |
---|
| 1766 | SUBROUTINE usm_average_3d_data( mode, variable ) |
---|
| 1767 | |
---|
| 1768 | IMPLICIT NONE |
---|
| 1769 | |
---|
[3241] | 1770 | CHARACTER(LEN=*), INTENT(IN) :: mode |
---|
| 1771 | CHARACTER(LEN=*), INTENT(IN) :: variable |
---|
[2737] | 1772 | |
---|
[2920] | 1773 | INTEGER(iwp) :: i, j, k, l, m, ids, idsint, iwl, istat |
---|
[3241] | 1774 | CHARACTER(LEN=varnamelength) :: var |
---|
[2737] | 1775 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
[3241] | 1776 | CHARACTER(LEN=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
[2920] | 1777 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
[2737] | 1778 | |
---|
| 1779 | !-- find the real name of the variable |
---|
[2906] | 1780 | ids = -1 |
---|
[3337] | 1781 | l = -1 |
---|
[2737] | 1782 | var = TRIM(variable) |
---|
| 1783 | DO i = 0, nd-1 |
---|
| 1784 | k = len(TRIM(var)) |
---|
| 1785 | j = len(TRIM(dirname(i))) |
---|
[3337] | 1786 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
[2737] | 1787 | ids = i |
---|
[2920] | 1788 | idsint = dirint(ids) |
---|
[2737] | 1789 | var = var(:k-j) |
---|
| 1790 | EXIT |
---|
| 1791 | ENDIF |
---|
| 1792 | ENDDO |
---|
[3337] | 1793 | l = idsint - 2 ! horisontal direction index - terible hack ! |
---|
| 1794 | IF ( l < 0 .OR. l > 3 ) THEN |
---|
| 1795 | l = -1 |
---|
| 1796 | END IF |
---|
[2737] | 1797 | IF ( ids == -1 ) THEN |
---|
| 1798 | var = TRIM(variable) |
---|
| 1799 | ENDIF |
---|
| 1800 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
| 1801 | !-- wall layers |
---|
| 1802 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
| 1803 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
| 1804 | var = var(1:10) |
---|
| 1805 | ELSE |
---|
| 1806 | !-- wrong wall layer index |
---|
| 1807 | RETURN |
---|
| 1808 | ENDIF |
---|
| 1809 | ENDIF |
---|
| 1810 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
| 1811 | !-- wall layers |
---|
| 1812 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
| 1813 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
| 1814 | var = var(1:12) |
---|
| 1815 | ELSE |
---|
| 1816 | !-- wrong window layer index |
---|
| 1817 | RETURN |
---|
| 1818 | ENDIF |
---|
| 1819 | ENDIF |
---|
| 1820 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
| 1821 | !-- wall layers |
---|
| 1822 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
| 1823 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
| 1824 | var = var(1:11) |
---|
| 1825 | ELSE |
---|
| 1826 | !-- wrong green layer index |
---|
| 1827 | RETURN |
---|
| 1828 | ENDIF |
---|
| 1829 | ENDIF |
---|
[3418] | 1830 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
| 1831 | !-- swc layers |
---|
| 1832 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
| 1833 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
| 1834 | var = var(1:7) |
---|
| 1835 | ELSE |
---|
| 1836 | !-- wrong swc layer index |
---|
| 1837 | RETURN |
---|
| 1838 | ENDIF |
---|
| 1839 | ENDIF |
---|
[2737] | 1840 | |
---|
| 1841 | IF ( mode == 'allocate' ) THEN |
---|
| 1842 | |
---|
| 1843 | SELECT CASE ( TRIM( var ) ) |
---|
| 1844 | |
---|
| 1845 | CASE ( 'usm_rad_net' ) |
---|
| 1846 | !-- array of complete radiation balance |
---|
[3337] | 1847 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%rad_net_av) ) THEN |
---|
[2737] | 1848 | ALLOCATE( surf_usm_h%rad_net_av(1:surf_usm_h%ns) ) |
---|
| 1849 | surf_usm_h%rad_net_av = 0.0_wp |
---|
[3337] | 1850 | ELSE |
---|
| 1851 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%rad_net_av) ) THEN |
---|
| 1852 | ALLOCATE( surf_usm_v(l)%rad_net_av(1:surf_usm_v(l)%ns) ) |
---|
| 1853 | surf_usm_v(l)%rad_net_av = 0.0_wp |
---|
| 1854 | ENDIF |
---|
[2737] | 1855 | ENDIF |
---|
| 1856 | |
---|
| 1857 | CASE ( 'usm_rad_insw' ) |
---|
| 1858 | !-- array of sw radiation falling to surface after i-th reflection |
---|
[2920] | 1859 | IF ( .NOT. ALLOCATED(surfinsw_av) ) THEN |
---|
| 1860 | ALLOCATE( surfinsw_av(nsurfl) ) |
---|
| 1861 | surfinsw_av = 0.0_wp |
---|
[2737] | 1862 | ENDIF |
---|
[2920] | 1863 | |
---|
[2737] | 1864 | CASE ( 'usm_rad_inlw' ) |
---|
| 1865 | !-- array of lw radiation falling to surface after i-th reflection |
---|
[2920] | 1866 | IF ( .NOT. ALLOCATED(surfinlw_av) ) THEN |
---|
| 1867 | ALLOCATE( surfinlw_av(nsurfl) ) |
---|
| 1868 | surfinlw_av = 0.0_wp |
---|
[2737] | 1869 | ENDIF |
---|
| 1870 | |
---|
| 1871 | CASE ( 'usm_rad_inswdir' ) |
---|
| 1872 | !-- array of direct sw radiation falling to surface from sun |
---|
| 1873 | IF ( .NOT. ALLOCATED(surfinswdir_av) ) THEN |
---|
[2920] | 1874 | ALLOCATE( surfinswdir_av(nsurfl) ) |
---|
[2737] | 1875 | surfinswdir_av = 0.0_wp |
---|
| 1876 | ENDIF |
---|
| 1877 | |
---|
| 1878 | CASE ( 'usm_rad_inswdif' ) |
---|
| 1879 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
| 1880 | IF ( .NOT. ALLOCATED(surfinswdif_av) ) THEN |
---|
[2920] | 1881 | ALLOCATE( surfinswdif_av(nsurfl) ) |
---|
[2737] | 1882 | surfinswdif_av = 0.0_wp |
---|
| 1883 | ENDIF |
---|
| 1884 | |
---|
| 1885 | CASE ( 'usm_rad_inswref' ) |
---|
| 1886 | !-- array of sw radiation falling to surface from reflections |
---|
| 1887 | IF ( .NOT. ALLOCATED(surfinswref_av) ) THEN |
---|
[2920] | 1888 | ALLOCATE( surfinswref_av(nsurfl) ) |
---|
[2737] | 1889 | surfinswref_av = 0.0_wp |
---|
| 1890 | ENDIF |
---|
| 1891 | |
---|
| 1892 | CASE ( 'usm_rad_inlwdif' ) |
---|
| 1893 | !-- array of sw radiation falling to surface after i-th reflection |
---|
| 1894 | IF ( .NOT. ALLOCATED(surfinlwdif_av) ) THEN |
---|
[2920] | 1895 | ALLOCATE( surfinlwdif_av(nsurfl) ) |
---|
[2737] | 1896 | surfinlwdif_av = 0.0_wp |
---|
| 1897 | ENDIF |
---|
| 1898 | |
---|
| 1899 | CASE ( 'usm_rad_inlwref' ) |
---|
| 1900 | !-- array of lw radiation falling to surface from reflections |
---|
| 1901 | IF ( .NOT. ALLOCATED(surfinlwref_av) ) THEN |
---|
[2920] | 1902 | ALLOCATE( surfinlwref_av(nsurfl) ) |
---|
[2737] | 1903 | surfinlwref_av = 0.0_wp |
---|
| 1904 | ENDIF |
---|
| 1905 | |
---|
| 1906 | CASE ( 'usm_rad_outsw' ) |
---|
| 1907 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
| 1908 | IF ( .NOT. ALLOCATED(surfoutsw_av) ) THEN |
---|
[2920] | 1909 | ALLOCATE( surfoutsw_av(nsurfl) ) |
---|
[2737] | 1910 | surfoutsw_av = 0.0_wp |
---|
| 1911 | ENDIF |
---|
| 1912 | |
---|
| 1913 | CASE ( 'usm_rad_outlw' ) |
---|
| 1914 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
| 1915 | IF ( .NOT. ALLOCATED(surfoutlw_av) ) THEN |
---|
[2920] | 1916 | ALLOCATE( surfoutlw_av(nsurfl) ) |
---|
[2737] | 1917 | surfoutlw_av = 0.0_wp |
---|
| 1918 | ENDIF |
---|
| 1919 | CASE ( 'usm_rad_ressw' ) |
---|
| 1920 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
| 1921 | IF ( .NOT. ALLOCATED(surfins_av) ) THEN |
---|
[2920] | 1922 | ALLOCATE( surfins_av(nsurfl) ) |
---|
[2737] | 1923 | surfins_av = 0.0_wp |
---|
| 1924 | ENDIF |
---|
| 1925 | |
---|
| 1926 | CASE ( 'usm_rad_reslw' ) |
---|
| 1927 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
| 1928 | IF ( .NOT. ALLOCATED(surfinl_av) ) THEN |
---|
[2920] | 1929 | ALLOCATE( surfinl_av(nsurfl) ) |
---|
[2737] | 1930 | surfinl_av = 0.0_wp |
---|
| 1931 | ENDIF |
---|
| 1932 | |
---|
[3337] | 1933 | CASE ( 'usm_rad_pc_inlw' ) |
---|
| 1934 | !-- array of of lw radiation absorbed in plant canopy |
---|
| 1935 | IF ( .NOT. ALLOCATED(pcbinlw_av) ) THEN |
---|
| 1936 | ALLOCATE( pcbinlw_av(1:npcbl) ) |
---|
| 1937 | pcbinlw_av = 0.0_wp |
---|
| 1938 | ENDIF |
---|
| 1939 | |
---|
| 1940 | CASE ( 'usm_rad_pc_insw' ) |
---|
| 1941 | !-- array of of sw radiation absorbed in plant canopy |
---|
| 1942 | IF ( .NOT. ALLOCATED(pcbinsw_av) ) THEN |
---|
| 1943 | ALLOCATE( pcbinsw_av(1:npcbl) ) |
---|
| 1944 | pcbinsw_av = 0.0_wp |
---|
| 1945 | ENDIF |
---|
| 1946 | |
---|
| 1947 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
| 1948 | !-- array of of direct sw radiation absorbed in plant canopy |
---|
| 1949 | IF ( .NOT. ALLOCATED(pcbinswdir_av) ) THEN |
---|
| 1950 | ALLOCATE( pcbinswdir_av(1:npcbl) ) |
---|
| 1951 | pcbinswdir_av = 0.0_wp |
---|
| 1952 | ENDIF |
---|
| 1953 | |
---|
| 1954 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
| 1955 | !-- array of of diffuse sw radiation absorbed in plant canopy |
---|
| 1956 | IF ( .NOT. ALLOCATED(pcbinswdif_av) ) THEN |
---|
| 1957 | ALLOCATE( pcbinswdif_av(1:npcbl) ) |
---|
| 1958 | pcbinswdif_av = 0.0_wp |
---|
| 1959 | ENDIF |
---|
| 1960 | |
---|
| 1961 | CASE ( 'usm_rad_pc_inswref' ) |
---|
| 1962 | !-- array of of reflected sw radiation absorbed in plant canopy |
---|
| 1963 | IF ( .NOT. ALLOCATED(pcbinswref_av) ) THEN |
---|
| 1964 | ALLOCATE( pcbinswref_av(1:npcbl) ) |
---|
| 1965 | pcbinswref_av = 0.0_wp |
---|
| 1966 | ENDIF |
---|
| 1967 | |
---|
[2737] | 1968 | CASE ( 'usm_rad_hf' ) |
---|
| 1969 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
[3337] | 1970 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%surfhf_av) ) THEN |
---|
[2737] | 1971 | ALLOCATE( surf_usm_h%surfhf_av(1:surf_usm_h%ns) ) |
---|
| 1972 | surf_usm_h%surfhf_av = 0.0_wp |
---|
[3337] | 1973 | ELSE |
---|
[2737] | 1974 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%surfhf_av) ) THEN |
---|
| 1975 | ALLOCATE( surf_usm_v(l)%surfhf_av(1:surf_usm_v(l)%ns) ) |
---|
| 1976 | surf_usm_v(l)%surfhf_av = 0.0_wp |
---|
| 1977 | ENDIF |
---|
[3337] | 1978 | ENDIF |
---|
[2737] | 1979 | |
---|
| 1980 | CASE ( 'usm_wshf' ) |
---|
| 1981 | !-- array of sensible heat flux from surfaces |
---|
| 1982 | !-- land surfaces |
---|
[3337] | 1983 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%wshf_eb_av) ) THEN |
---|
[2737] | 1984 | ALLOCATE( surf_usm_h%wshf_eb_av(1:surf_usm_h%ns) ) |
---|
| 1985 | surf_usm_h%wshf_eb_av = 0.0_wp |
---|
[3337] | 1986 | ELSE |
---|
[2737] | 1987 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wshf_eb_av) ) THEN |
---|
| 1988 | ALLOCATE( surf_usm_v(l)%wshf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
| 1989 | surf_usm_v(l)%wshf_eb_av = 0.0_wp |
---|
| 1990 | ENDIF |
---|
[3337] | 1991 | ENDIF |
---|
[3418] | 1992 | |
---|
| 1993 | CASE ( 'usm_qsws' ) |
---|
| 1994 | !-- array of latent heat flux from surfaces |
---|
| 1995 | !-- land surfaces |
---|
| 1996 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_eb_av) ) THEN |
---|
| 1997 | ALLOCATE( surf_usm_h%qsws_eb_av(1:surf_usm_h%ns) ) |
---|
| 1998 | surf_usm_h%qsws_eb_av = 0.0_wp |
---|
| 1999 | ELSE |
---|
| 2000 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_eb_av) ) THEN |
---|
| 2001 | ALLOCATE( surf_usm_v(l)%qsws_eb_av(1:surf_usm_v(l)%ns) ) |
---|
| 2002 | surf_usm_v(l)%qsws_eb_av = 0.0_wp |
---|
| 2003 | ENDIF |
---|
| 2004 | ENDIF |
---|
| 2005 | |
---|
| 2006 | CASE ( 'usm_qsws_veg' ) |
---|
| 2007 | !-- array of latent heat flux from vegetation surfaces |
---|
| 2008 | !-- land surfaces |
---|
| 2009 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_veg_eb_av) ) THEN |
---|
| 2010 | ALLOCATE( surf_usm_h%qsws_veg_eb_av(1:surf_usm_h%ns) ) |
---|
| 2011 | surf_usm_h%qsws_veg_eb_av = 0.0_wp |
---|
| 2012 | ELSE |
---|
| 2013 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_veg_eb_av) ) THEN |
---|
| 2014 | ALLOCATE( surf_usm_v(l)%qsws_veg_eb_av(1:surf_usm_v(l)%ns) ) |
---|
| 2015 | surf_usm_v(l)%qsws_veg_eb_av = 0.0_wp |
---|
| 2016 | ENDIF |
---|
| 2017 | ENDIF |
---|
| 2018 | |
---|
| 2019 | CASE ( 'usm_qsws_liq' ) |
---|
| 2020 | !-- array of latent heat flux from surfaces with liquid |
---|
| 2021 | !-- land surfaces |
---|
| 2022 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_liq_eb_av) ) THEN |
---|
| 2023 | ALLOCATE( surf_usm_h%qsws_liq_eb_av(1:surf_usm_h%ns) ) |
---|
| 2024 | surf_usm_h%qsws_liq_eb_av = 0.0_wp |
---|
| 2025 | ELSE |
---|
| 2026 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_liq_eb_av) ) THEN |
---|
| 2027 | ALLOCATE( surf_usm_v(l)%qsws_liq_eb_av(1:surf_usm_v(l)%ns) ) |
---|
| 2028 | surf_usm_v(l)%qsws_liq_eb_av = 0.0_wp |
---|
| 2029 | ENDIF |
---|
| 2030 | ENDIF |
---|
[2797] | 2031 | ! |
---|
| 2032 | !-- Please note, the following output quantities belongs to the |
---|
| 2033 | !-- individual tile fractions - ground heat flux at wall-, window-, |
---|
| 2034 | !-- and green fraction. Aggregated ground-heat flux is treated |
---|
| 2035 | !-- accordingly in average_3d_data, sum_up_3d_data, etc.. |
---|
[2737] | 2036 | CASE ( 'usm_wghf' ) |
---|
| 2037 | !-- array of heat flux from ground (wall, roof, land) |
---|
[3337] | 2038 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%wghf_eb_av) ) THEN |
---|
[2737] | 2039 | ALLOCATE( surf_usm_h%wghf_eb_av(1:surf_usm_h%ns) ) |
---|
| 2040 | surf_usm_h%wghf_eb_av = 0.0_wp |
---|
[3337] | 2041 | ELSE |
---|
[2737] | 2042 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_av) ) THEN |
---|
| 2043 | ALLOCATE( surf_usm_v(l)%wghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
| 2044 | surf_usm_v(l)%wghf_eb_av = 0.0_wp |
---|
| 2045 | ENDIF |
---|
[3337] | 2046 | ENDIF |
---|
[2737] | 2047 | |
---|
| 2048 | CASE ( 'usm_wghf_window' ) |
---|
| 2049 | !-- array of heat flux from window ground (wall, roof, land) |
---|
[3337] | 2050 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%wghf_eb_window_av) ) THEN |
---|
[2737] | 2051 | ALLOCATE( surf_usm_h%wghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
| 2052 | surf_usm_h%wghf_eb_window_av = 0.0_wp |
---|
[3337] | 2053 | ELSE |
---|
[2737] | 2054 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_window_av) ) THEN |
---|
| 2055 | ALLOCATE( surf_usm_v(l)%wghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
| 2056 | surf_usm_v(l)%wghf_eb_window_av = 0.0_wp |
---|
| 2057 | ENDIF |
---|
[3337] | 2058 | ENDIF |
---|
[2737] | 2059 | |
---|
| 2060 | CASE ( 'usm_wghf_green' ) |
---|
| 2061 | !-- array of heat flux from green ground (wall, roof, land) |
---|
[3337] | 2062 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%wghf_eb_green_av) ) THEN |
---|
[2737] | 2063 | ALLOCATE( surf_usm_h%wghf_eb_green_av(1:surf_usm_h%ns) ) |
---|
| 2064 | surf_usm_h%wghf_eb_green_av = 0.0_wp |
---|
[3337] | 2065 | ELSE |
---|
[2737] | 2066 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_green_av) ) THEN |
---|
| 2067 | ALLOCATE( surf_usm_v(l)%wghf_eb_green_av(1:surf_usm_v(l)%ns) ) |
---|
| 2068 | surf_usm_v(l)%wghf_eb_green_av = 0.0_wp |
---|
| 2069 | ENDIF |
---|
[3337] | 2070 | ENDIF |
---|
[2737] | 2071 | |
---|
| 2072 | CASE ( 'usm_iwghf' ) |
---|
| 2073 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
[3337] | 2074 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%iwghf_eb_av) ) THEN |
---|
[2737] | 2075 | ALLOCATE( surf_usm_h%iwghf_eb_av(1:surf_usm_h%ns) ) |
---|
| 2076 | surf_usm_h%iwghf_eb_av = 0.0_wp |
---|
[3337] | 2077 | ELSE |
---|
[2737] | 2078 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_av) ) THEN |
---|
| 2079 | ALLOCATE( surf_usm_v(l)%iwghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
| 2080 | surf_usm_v(l)%iwghf_eb_av = 0.0_wp |
---|
| 2081 | ENDIF |
---|
[3337] | 2082 | ENDIF |
---|
[2737] | 2083 | |
---|
| 2084 | CASE ( 'usm_iwghf_window' ) |
---|
| 2085 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
[3337] | 2086 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%iwghf_eb_window_av) ) THEN |
---|
[2737] | 2087 | ALLOCATE( surf_usm_h%iwghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
| 2088 | surf_usm_h%iwghf_eb_window_av = 0.0_wp |
---|
[3337] | 2089 | ELSE |
---|
[2737] | 2090 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_window_av) ) THEN |
---|
| 2091 | ALLOCATE( surf_usm_v(l)%iwghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
| 2092 | surf_usm_v(l)%iwghf_eb_window_av = 0.0_wp |
---|
| 2093 | ENDIF |
---|
[3337] | 2094 | ENDIF |
---|
[2737] | 2095 | |
---|
[3418] | 2096 | CASE ( 'usm_t_surf_wall' ) |
---|
[2737] | 2097 | !-- surface temperature for surfaces |
---|
[3418] | 2098 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%t_surf_wall_av) ) THEN |
---|
| 2099 | ALLOCATE( surf_usm_h%t_surf_wall_av(1:surf_usm_h%ns) ) |
---|
| 2100 | surf_usm_h%t_surf_wall_av = 0.0_wp |
---|
[3337] | 2101 | ELSE |
---|
[3418] | 2102 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_wall_av) ) THEN |
---|
| 2103 | ALLOCATE( surf_usm_v(l)%t_surf_wall_av(1:surf_usm_v(l)%ns) ) |
---|
| 2104 | surf_usm_v(l)%t_surf_wall_av = 0.0_wp |
---|
[2737] | 2105 | ENDIF |
---|
[3337] | 2106 | ENDIF |
---|
[2737] | 2107 | |
---|
| 2108 | CASE ( 'usm_t_surf_window' ) |
---|
| 2109 | !-- surface temperature for window surfaces |
---|
[3337] | 2110 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%t_surf_window_av) ) THEN |
---|
[2737] | 2111 | ALLOCATE( surf_usm_h%t_surf_window_av(1:surf_usm_h%ns) ) |
---|
| 2112 | surf_usm_h%t_surf_window_av = 0.0_wp |
---|
[3337] | 2113 | ELSE |
---|
[2737] | 2114 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_window_av) ) THEN |
---|
| 2115 | ALLOCATE( surf_usm_v(l)%t_surf_window_av(1:surf_usm_v(l)%ns) ) |
---|
| 2116 | surf_usm_v(l)%t_surf_window_av = 0.0_wp |
---|
| 2117 | ENDIF |
---|
[3337] | 2118 | ENDIF |
---|
[2737] | 2119 | |
---|
| 2120 | CASE ( 'usm_t_surf_green' ) |
---|
| 2121 | !-- surface temperature for green surfaces |
---|
[3337] | 2122 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%t_surf_green_av) ) THEN |
---|
[2737] | 2123 | ALLOCATE( surf_usm_h%t_surf_green_av(1:surf_usm_h%ns) ) |
---|
| 2124 | surf_usm_h%t_surf_green_av = 0.0_wp |
---|
[3337] | 2125 | ELSE |
---|
[2737] | 2126 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_green_av) ) THEN |
---|
| 2127 | ALLOCATE( surf_usm_v(l)%t_surf_green_av(1:surf_usm_v(l)%ns) ) |
---|
| 2128 | surf_usm_v(l)%t_surf_green_av = 0.0_wp |
---|
| 2129 | ENDIF |
---|
[3337] | 2130 | ENDIF |
---|
[2737] | 2131 | |
---|
| 2132 | CASE ( 'usm_t_surf_10cm' ) |
---|
| 2133 | !-- near surface temperature for whole surfaces |
---|
[3337] | 2134 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%t_surf_10cm_av) ) THEN |
---|
[2737] | 2135 | ALLOCATE( surf_usm_h%t_surf_10cm_av(1:surf_usm_h%ns) ) |
---|
| 2136 | surf_usm_h%t_surf_10cm_av = 0.0_wp |
---|
[3337] | 2137 | ELSE |
---|
[2737] | 2138 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_10cm_av) ) THEN |
---|
| 2139 | ALLOCATE( surf_usm_v(l)%t_surf_10cm_av(1:surf_usm_v(l)%ns) ) |
---|
| 2140 | surf_usm_v(l)%t_surf_10cm_av = 0.0_wp |
---|
| 2141 | ENDIF |
---|
[3337] | 2142 | ENDIF |
---|
[2737] | 2143 | |
---|
| 2144 | CASE ( 'usm_t_wall' ) |
---|
| 2145 | !-- wall temperature for iwl layer of walls and land |
---|
[3337] | 2146 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%t_wall_av) ) THEN |
---|
[2737] | 2147 | ALLOCATE( surf_usm_h%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 2148 | surf_usm_h%t_wall_av = 0.0_wp |
---|
[3337] | 2149 | ELSE |
---|
[2737] | 2150 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_wall_av) ) THEN |
---|
| 2151 | ALLOCATE( surf_usm_v(l)%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 2152 | surf_usm_v(l)%t_wall_av = 0.0_wp |
---|
| 2153 | ENDIF |
---|
[3337] | 2154 | ENDIF |
---|
[2737] | 2155 | |
---|
| 2156 | CASE ( 'usm_t_window' ) |
---|
| 2157 | !-- window temperature for iwl layer of walls and land |
---|
[3337] | 2158 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%t_window_av) ) THEN |
---|
[2737] | 2159 | ALLOCATE( surf_usm_h%t_window_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 2160 | surf_usm_h%t_window_av = 0.0_wp |
---|
[3337] | 2161 | ELSE |
---|
[2737] | 2162 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_window_av) ) THEN |
---|
| 2163 | ALLOCATE( surf_usm_v(l)%t_window_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 2164 | surf_usm_v(l)%t_window_av = 0.0_wp |
---|
| 2165 | ENDIF |
---|
[3337] | 2166 | ENDIF |
---|
[2737] | 2167 | |
---|
| 2168 | CASE ( 'usm_t_green' ) |
---|
| 2169 | !-- green temperature for iwl layer of walls and land |
---|
[3337] | 2170 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%t_green_av) ) THEN |
---|
[2737] | 2171 | ALLOCATE( surf_usm_h%t_green_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 2172 | surf_usm_h%t_green_av = 0.0_wp |
---|
[3337] | 2173 | ELSE |
---|
[2737] | 2174 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_green_av) ) THEN |
---|
| 2175 | ALLOCATE( surf_usm_v(l)%t_green_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 2176 | surf_usm_v(l)%t_green_av = 0.0_wp |
---|
| 2177 | ENDIF |
---|
[3337] | 2178 | ENDIF |
---|
[3418] | 2179 | CASE ( 'usm_swc' ) |
---|
| 2180 | !-- soil water content for iwl layer of walls and land |
---|
| 2181 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%swc_av) ) THEN |
---|
| 2182 | ALLOCATE( surf_usm_h%swc_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
| 2183 | surf_usm_h%swc_av = 0.0_wp |
---|
| 2184 | ELSE |
---|
| 2185 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%swc_av) ) THEN |
---|
| 2186 | ALLOCATE( surf_usm_v(l)%swc_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
| 2187 | surf_usm_v(l)%swc_av = 0.0_wp |
---|
| 2188 | ENDIF |
---|
| 2189 | ENDIF |
---|
[2737] | 2190 | |
---|
| 2191 | CASE DEFAULT |
---|
| 2192 | CONTINUE |
---|
| 2193 | |
---|
| 2194 | END SELECT |
---|
| 2195 | |
---|
| 2196 | ELSEIF ( mode == 'sum' ) THEN |
---|
| 2197 | |
---|
| 2198 | SELECT CASE ( TRIM( var ) ) |
---|
| 2199 | |
---|
| 2200 | CASE ( 'usm_rad_net' ) |
---|
| 2201 | !-- array of complete radiation balance |
---|
[3337] | 2202 | IF ( l == -1 ) THEN |
---|
| 2203 | DO m = 1, surf_usm_h%ns |
---|
| 2204 | surf_usm_h%rad_net_av(m) = & |
---|
| 2205 | surf_usm_h%rad_net_av(m) + & |
---|
| 2206 | surf_usm_h%rad_net_l(m) |
---|
| 2207 | ENDDO |
---|
| 2208 | ELSE |
---|
[2737] | 2209 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2210 | surf_usm_v(l)%rad_net_av(m) = & |
---|
| 2211 | surf_usm_v(l)%rad_net_av(m) + & |
---|
| 2212 | surf_usm_v(l)%rad_net_l(m) |
---|
| 2213 | ENDDO |
---|
[3337] | 2214 | ENDIF |
---|
| 2215 | |
---|
[2737] | 2216 | CASE ( 'usm_rad_insw' ) |
---|
| 2217 | !-- array of sw radiation falling to surface after i-th reflection |
---|
[2920] | 2218 | DO l = 1, nsurfl |
---|
| 2219 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2220 | surfinsw_av(l) = surfinsw_av(l) + surfinsw(l) |
---|
| 2221 | ENDIF |
---|
| 2222 | ENDDO |
---|
| 2223 | |
---|
| 2224 | CASE ( 'usm_rad_inlw' ) |
---|
| 2225 | !-- array of lw radiation falling to surface after i-th reflection |
---|
[2920] | 2226 | DO l = 1, nsurfl |
---|
| 2227 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2228 | surfinlw_av(l) = surfinlw_av(l) + surfinlw(l) |
---|
| 2229 | ENDIF |
---|
| 2230 | ENDDO |
---|
| 2231 | |
---|
| 2232 | CASE ( 'usm_rad_inswdir' ) |
---|
| 2233 | !-- array of direct sw radiation falling to surface from sun |
---|
[2920] | 2234 | DO l = 1, nsurfl |
---|
| 2235 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2236 | surfinswdir_av(l) = surfinswdir_av(l) + surfinswdir(l) |
---|
| 2237 | ENDIF |
---|
| 2238 | ENDDO |
---|
| 2239 | |
---|
| 2240 | CASE ( 'usm_rad_inswdif' ) |
---|
| 2241 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
[2920] | 2242 | DO l = 1, nsurfl |
---|
| 2243 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2244 | surfinswdif_av(l) = surfinswdif_av(l) + surfinswdif(l) |
---|
| 2245 | ENDIF |
---|
| 2246 | ENDDO |
---|
| 2247 | |
---|
| 2248 | CASE ( 'usm_rad_inswref' ) |
---|
| 2249 | !-- array of sw radiation falling to surface from reflections |
---|
[2920] | 2250 | DO l = 1, nsurfl |
---|
| 2251 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2252 | surfinswref_av(l) = surfinswref_av(l) + surfinsw(l) - & |
---|
| 2253 | surfinswdir(l) - surfinswdif(l) |
---|
| 2254 | ENDIF |
---|
| 2255 | ENDDO |
---|
| 2256 | |
---|
| 2257 | |
---|
| 2258 | CASE ( 'usm_rad_inlwdif' ) |
---|
| 2259 | !-- array of sw radiation falling to surface after i-th reflection |
---|
[2920] | 2260 | DO l = 1, nsurfl |
---|
| 2261 | IF ( surfl(id,l) == idsint ) THEN |
---|
| 2262 | surfinlwdif_av(l) = surfinlwdif_av(l) + surfinlwdif(l) |
---|
[2737] | 2263 | ENDIF |
---|
| 2264 | ENDDO |
---|
| 2265 | ! |
---|
| 2266 | CASE ( 'usm_rad_inlwref' ) |
---|
| 2267 | !-- array of lw radiation falling to surface from reflections |
---|
[2920] | 2268 | DO l = 1, nsurfl |
---|
| 2269 | IF ( surfl(id,l) == idsint ) THEN |
---|
| 2270 | surfinlwref_av(l) = surfinlwref_av(l) + & |
---|
| 2271 | surfinlw(l) - surfinlwdif(l) |
---|
[2737] | 2272 | ENDIF |
---|
| 2273 | ENDDO |
---|
| 2274 | |
---|
| 2275 | CASE ( 'usm_rad_outsw' ) |
---|
| 2276 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
[2920] | 2277 | DO l = 1, nsurfl |
---|
| 2278 | IF ( surfl(id,l) == idsint ) THEN |
---|
| 2279 | surfoutsw_av(l) = surfoutsw_av(l) + surfoutsw(l) |
---|
[2737] | 2280 | ENDIF |
---|
| 2281 | ENDDO |
---|
| 2282 | |
---|
| 2283 | CASE ( 'usm_rad_outlw' ) |
---|
| 2284 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
[2920] | 2285 | DO l = 1, nsurfl |
---|
| 2286 | IF ( surfl(id,l) == idsint ) THEN |
---|
| 2287 | surfoutlw_av(l) = surfoutlw_av(l) + surfoutlw(l) |
---|
[2737] | 2288 | ENDIF |
---|
| 2289 | ENDDO |
---|
| 2290 | |
---|
| 2291 | CASE ( 'usm_rad_ressw' ) |
---|
| 2292 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
[2920] | 2293 | DO l = 1, nsurfl |
---|
| 2294 | IF ( surfl(id,l) == idsint ) THEN |
---|
| 2295 | surfins_av(l) = surfins_av(l) + surfins(l) |
---|
[2737] | 2296 | ENDIF |
---|
| 2297 | ENDDO |
---|
| 2298 | |
---|
| 2299 | CASE ( 'usm_rad_reslw' ) |
---|
| 2300 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
[2920] | 2301 | DO l = 1, nsurfl |
---|
| 2302 | IF ( surfl(id,l) == idsint ) THEN |
---|
| 2303 | surfinl_av(l) = surfinl_av(l) + surfinl(l) |
---|
[2737] | 2304 | ENDIF |
---|
| 2305 | ENDDO |
---|
| 2306 | |
---|
[3337] | 2307 | CASE ( 'usm_rad_pc_inlw' ) |
---|
| 2308 | pcbinlw_av(:) = pcbinlw_av(:) + pcbinlw(:) |
---|
| 2309 | |
---|
| 2310 | CASE ( 'usm_rad_pc_insw' ) |
---|
| 2311 | pcbinsw_av(:) = pcbinsw_av(:) + pcbinsw(:) |
---|
| 2312 | |
---|
| 2313 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
| 2314 | pcbinswdir_av(:) = pcbinswdir_av(:) + pcbinswdir(:) |
---|
| 2315 | |
---|
| 2316 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
| 2317 | pcbinswdif_av(:) = pcbinswdif_av(:) + pcbinswdif(:) |
---|
| 2318 | |
---|
| 2319 | CASE ( 'usm_rad_pc_inswref' ) |
---|
| 2320 | pcbinswref_av(:) = pcbinswref_av(:) + pcbinsw(:) & |
---|
| 2321 | - pcbinswdir(:) & |
---|
| 2322 | - pcbinswdif(:) |
---|
| 2323 | |
---|
[2737] | 2324 | CASE ( 'usm_rad_hf' ) |
---|
| 2325 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
[3337] | 2326 | IF ( l == -1 ) THEN |
---|
| 2327 | DO m = 1, surf_usm_h%ns |
---|
| 2328 | surf_usm_h%surfhf_av(m) = & |
---|
| 2329 | surf_usm_h%surfhf_av(m) + & |
---|
| 2330 | surf_usm_h%surfhf(m) |
---|
| 2331 | ENDDO |
---|
| 2332 | ELSE |
---|
[2737] | 2333 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2334 | surf_usm_v(l)%surfhf_av(m) = & |
---|
| 2335 | surf_usm_v(l)%surfhf_av(m) + & |
---|
| 2336 | surf_usm_v(l)%surfhf(m) |
---|
| 2337 | ENDDO |
---|
[3337] | 2338 | ENDIF |
---|
[2737] | 2339 | |
---|
| 2340 | CASE ( 'usm_wshf' ) |
---|
| 2341 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
[3337] | 2342 | IF ( l == -1 ) THEN |
---|
| 2343 | DO m = 1, surf_usm_h%ns |
---|
| 2344 | surf_usm_h%wshf_eb_av(m) = & |
---|
| 2345 | surf_usm_h%wshf_eb_av(m) + & |
---|
| 2346 | surf_usm_h%wshf_eb(m) |
---|
| 2347 | ENDDO |
---|
| 2348 | ELSE |
---|
[2737] | 2349 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2350 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
| 2351 | surf_usm_v(l)%wshf_eb_av(m) + & |
---|
| 2352 | surf_usm_v(l)%wshf_eb(m) |
---|
| 2353 | ENDDO |
---|
[3337] | 2354 | ENDIF |
---|
[2737] | 2355 | |
---|
[3418] | 2356 | CASE ( 'usm_qsws' ) |
---|
| 2357 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
| 2358 | IF ( l == -1 ) THEN |
---|
| 2359 | DO m = 1, surf_usm_h%ns |
---|
| 2360 | surf_usm_h%qsws_eb_av(m) = & |
---|
| 2361 | surf_usm_h%qsws_eb_av(m) + & |
---|
| 2362 | surf_usm_h%qsws_eb(m) |
---|
| 2363 | ENDDO |
---|
| 2364 | ELSE |
---|
| 2365 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2366 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
| 2367 | surf_usm_v(l)%qsws_eb_av(m) + & |
---|
| 2368 | surf_usm_v(l)%qsws_eb(m) |
---|
| 2369 | ENDDO |
---|
| 2370 | ENDIF |
---|
| 2371 | |
---|
| 2372 | CASE ( 'usm_qsws_veg' ) |
---|
| 2373 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
| 2374 | IF ( l == -1 ) THEN |
---|
| 2375 | DO m = 1, surf_usm_h%ns |
---|
| 2376 | surf_usm_h%qsws_veg_eb_av(m) = & |
---|
| 2377 | surf_usm_h%qsws_veg_eb_av(m) + & |
---|
| 2378 | surf_usm_h%qsws_veg_eb(m) |
---|
| 2379 | ENDDO |
---|
| 2380 | ELSE |
---|
| 2381 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2382 | surf_usm_v(l)%qsws_veg_eb_av(m) = & |
---|
| 2383 | surf_usm_v(l)%qsws_veg_eb_av(m) + & |
---|
| 2384 | surf_usm_v(l)%qsws_veg_eb(m) |
---|
| 2385 | ENDDO |
---|
| 2386 | ENDIF |
---|
| 2387 | |
---|
| 2388 | CASE ( 'usm_qsws_liq' ) |
---|
| 2389 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
| 2390 | IF ( l == -1 ) THEN |
---|
| 2391 | DO m = 1, surf_usm_h%ns |
---|
| 2392 | surf_usm_h%qsws_liq_eb_av(m) = & |
---|
| 2393 | surf_usm_h%qsws_liq_eb_av(m) + & |
---|
| 2394 | surf_usm_h%qsws_liq_eb(m) |
---|
| 2395 | ENDDO |
---|
| 2396 | ELSE |
---|
| 2397 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2398 | surf_usm_v(l)%qsws_liq_eb_av(m) = & |
---|
| 2399 | surf_usm_v(l)%qsws_liq_eb_av(m) + & |
---|
| 2400 | surf_usm_v(l)%qsws_liq_eb(m) |
---|
| 2401 | ENDDO |
---|
| 2402 | ENDIF |
---|
| 2403 | |
---|
[2737] | 2404 | CASE ( 'usm_wghf' ) |
---|
| 2405 | !-- array of heat flux from ground (wall, roof, land) |
---|
[3337] | 2406 | IF ( l == -1 ) THEN |
---|
| 2407 | DO m = 1, surf_usm_h%ns |
---|
| 2408 | surf_usm_h%wghf_eb_av(m) = & |
---|
| 2409 | surf_usm_h%wghf_eb_av(m) + & |
---|
| 2410 | surf_usm_h%wghf_eb(m) |
---|
| 2411 | ENDDO |
---|
| 2412 | ELSE |
---|
[2737] | 2413 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2414 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
| 2415 | surf_usm_v(l)%wghf_eb_av(m) + & |
---|
| 2416 | surf_usm_v(l)%wghf_eb(m) |
---|
| 2417 | ENDDO |
---|
[3337] | 2418 | ENDIF |
---|
[2737] | 2419 | |
---|
| 2420 | CASE ( 'usm_wghf_window' ) |
---|
| 2421 | !-- array of heat flux from window ground (wall, roof, land) |
---|
[3337] | 2422 | IF ( l == -1 ) THEN |
---|
| 2423 | DO m = 1, surf_usm_h%ns |
---|
| 2424 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
| 2425 | surf_usm_h%wghf_eb_window_av(m) + & |
---|
| 2426 | surf_usm_h%wghf_eb_window(m) |
---|
| 2427 | ENDDO |
---|
| 2428 | ELSE |
---|
[2737] | 2429 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2430 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
| 2431 | surf_usm_v(l)%wghf_eb_window_av(m) + & |
---|
| 2432 | surf_usm_v(l)%wghf_eb_window(m) |
---|
| 2433 | ENDDO |
---|
[3337] | 2434 | ENDIF |
---|
[2737] | 2435 | |
---|
| 2436 | CASE ( 'usm_wghf_green' ) |
---|
| 2437 | !-- array of heat flux from green ground (wall, roof, land) |
---|
[3337] | 2438 | IF ( l == -1 ) THEN |
---|
| 2439 | DO m = 1, surf_usm_h%ns |
---|
| 2440 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
| 2441 | surf_usm_h%wghf_eb_green_av(m) + & |
---|
| 2442 | surf_usm_h%wghf_eb_green(m) |
---|
| 2443 | ENDDO |
---|
| 2444 | ELSE |
---|
[2737] | 2445 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2446 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
| 2447 | surf_usm_v(l)%wghf_eb_green_av(m) + & |
---|
| 2448 | surf_usm_v(l)%wghf_eb_green(m) |
---|
| 2449 | ENDDO |
---|
[3337] | 2450 | ENDIF |
---|
[2737] | 2451 | |
---|
| 2452 | CASE ( 'usm_iwghf' ) |
---|
| 2453 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
[3337] | 2454 | IF ( l == -1 ) THEN |
---|
| 2455 | DO m = 1, surf_usm_h%ns |
---|
| 2456 | surf_usm_h%iwghf_eb_av(m) = & |
---|
| 2457 | surf_usm_h%iwghf_eb_av(m) + & |
---|
| 2458 | surf_usm_h%iwghf_eb(m) |
---|
| 2459 | ENDDO |
---|
| 2460 | ELSE |
---|
[2737] | 2461 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2462 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
| 2463 | surf_usm_v(l)%iwghf_eb_av(m) + & |
---|
| 2464 | surf_usm_v(l)%iwghf_eb(m) |
---|
| 2465 | ENDDO |
---|
[3337] | 2466 | ENDIF |
---|
[2737] | 2467 | |
---|
| 2468 | CASE ( 'usm_iwghf_window' ) |
---|
| 2469 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
[3337] | 2470 | IF ( l == -1 ) THEN |
---|
| 2471 | DO m = 1, surf_usm_h%ns |
---|
| 2472 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
| 2473 | surf_usm_h%iwghf_eb_window_av(m) + & |
---|
| 2474 | surf_usm_h%iwghf_eb_window(m) |
---|
| 2475 | ENDDO |
---|
| 2476 | ELSE |
---|
[2737] | 2477 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2478 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
| 2479 | surf_usm_v(l)%iwghf_eb_window_av(m) + & |
---|
| 2480 | surf_usm_v(l)%iwghf_eb_window(m) |
---|
| 2481 | ENDDO |
---|
[3337] | 2482 | ENDIF |
---|
[2737] | 2483 | |
---|
[3418] | 2484 | CASE ( 'usm_t_surf_wall' ) |
---|
[2737] | 2485 | !-- surface temperature for surfaces |
---|
[3337] | 2486 | IF ( l == -1 ) THEN |
---|
| 2487 | DO m = 1, surf_usm_h%ns |
---|
[3418] | 2488 | surf_usm_h%t_surf_wall_av(m) = & |
---|
| 2489 | surf_usm_h%t_surf_wall_av(m) + & |
---|
| 2490 | t_surf_wall_h(m) |
---|
[3337] | 2491 | ENDDO |
---|
| 2492 | ELSE |
---|
[2737] | 2493 | DO m = 1, surf_usm_v(l)%ns |
---|
[3418] | 2494 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
| 2495 | surf_usm_v(l)%t_surf_wall_av(m) + & |
---|
| 2496 | t_surf_wall_v(l)%t(m) |
---|
[2737] | 2497 | ENDDO |
---|
[3337] | 2498 | ENDIF |
---|
[2737] | 2499 | |
---|
| 2500 | CASE ( 'usm_t_surf_window' ) |
---|
| 2501 | !-- surface temperature for window surfaces |
---|
[3337] | 2502 | IF ( l == -1 ) THEN |
---|
| 2503 | DO m = 1, surf_usm_h%ns |
---|
| 2504 | surf_usm_h%t_surf_window_av(m) = & |
---|
| 2505 | surf_usm_h%t_surf_window_av(m) + & |
---|
| 2506 | t_surf_window_h(m) |
---|
| 2507 | ENDDO |
---|
| 2508 | ELSE |
---|
[2737] | 2509 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2510 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
| 2511 | surf_usm_v(l)%t_surf_window_av(m) + & |
---|
| 2512 | t_surf_window_v(l)%t(m) |
---|
| 2513 | ENDDO |
---|
[3337] | 2514 | ENDIF |
---|
[2737] | 2515 | |
---|
| 2516 | CASE ( 'usm_t_surf_green' ) |
---|
| 2517 | !-- surface temperature for green surfaces |
---|
[3337] | 2518 | IF ( l == -1 ) THEN |
---|
| 2519 | DO m = 1, surf_usm_h%ns |
---|
| 2520 | surf_usm_h%t_surf_green_av(m) = & |
---|
| 2521 | surf_usm_h%t_surf_green_av(m) + & |
---|
| 2522 | t_surf_green_h(m) |
---|
| 2523 | ENDDO |
---|
| 2524 | ELSE |
---|
[2737] | 2525 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2526 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
| 2527 | surf_usm_v(l)%t_surf_green_av(m) + & |
---|
| 2528 | t_surf_green_v(l)%t(m) |
---|
| 2529 | ENDDO |
---|
[3337] | 2530 | ENDIF |
---|
[2737] | 2531 | |
---|
| 2532 | CASE ( 'usm_t_surf_10cm' ) |
---|
| 2533 | !-- near surface temperature for whole surfaces |
---|
[3337] | 2534 | IF ( l == -1 ) THEN |
---|
| 2535 | DO m = 1, surf_usm_h%ns |
---|
| 2536 | surf_usm_h%t_surf_10cm_av(m) = & |
---|
| 2537 | surf_usm_h%t_surf_10cm_av(m) + & |
---|
| 2538 | t_surf_10cm_h(m) |
---|
| 2539 | ENDDO |
---|
| 2540 | ELSE |
---|
[2737] | 2541 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2542 | surf_usm_v(l)%t_surf_10cm_av(m) = & |
---|
| 2543 | surf_usm_v(l)%t_surf_10cm_av(m) + & |
---|
| 2544 | t_surf_10cm_v(l)%t(m) |
---|
| 2545 | ENDDO |
---|
[3337] | 2546 | ENDIF |
---|
[2737] | 2547 | |
---|
| 2548 | |
---|
| 2549 | CASE ( 'usm_t_wall' ) |
---|
| 2550 | !-- wall temperature for iwl layer of walls and land |
---|
[3337] | 2551 | IF ( l == -1 ) THEN |
---|
| 2552 | DO m = 1, surf_usm_h%ns |
---|
| 2553 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
| 2554 | surf_usm_h%t_wall_av(iwl,m) + & |
---|
| 2555 | t_wall_h(iwl,m) |
---|
| 2556 | ENDDO |
---|
| 2557 | ELSE |
---|
[2737] | 2558 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2559 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
| 2560 | surf_usm_v(l)%t_wall_av(iwl,m) + & |
---|
| 2561 | t_wall_v(l)%t(iwl,m) |
---|
| 2562 | ENDDO |
---|
[3337] | 2563 | ENDIF |
---|
[2737] | 2564 | |
---|
| 2565 | CASE ( 'usm_t_window' ) |
---|
| 2566 | !-- window temperature for iwl layer of walls and land |
---|
[3337] | 2567 | IF ( l == -1 ) THEN |
---|
| 2568 | DO m = 1, surf_usm_h%ns |
---|
| 2569 | surf_usm_h%t_window_av(iwl,m) = & |
---|
| 2570 | surf_usm_h%t_window_av(iwl,m) + & |
---|
| 2571 | t_window_h(iwl,m) |
---|
| 2572 | ENDDO |
---|
| 2573 | ELSE |
---|
[2737] | 2574 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2575 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
| 2576 | surf_usm_v(l)%t_window_av(iwl,m) + & |
---|
| 2577 | t_window_v(l)%t(iwl,m) |
---|
| 2578 | ENDDO |
---|
[3337] | 2579 | ENDIF |
---|
[2737] | 2580 | |
---|
| 2581 | CASE ( 'usm_t_green' ) |
---|
| 2582 | !-- green temperature for iwl layer of walls and land |
---|
[3337] | 2583 | IF ( l == -1 ) THEN |
---|
| 2584 | DO m = 1, surf_usm_h%ns |
---|
| 2585 | surf_usm_h%t_green_av(iwl,m) = & |
---|
| 2586 | surf_usm_h%t_green_av(iwl,m) + & |
---|
| 2587 | t_green_h(iwl,m) |
---|
| 2588 | ENDDO |
---|
| 2589 | ELSE |
---|
[2737] | 2590 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2591 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
| 2592 | surf_usm_v(l)%t_green_av(iwl,m) + & |
---|
| 2593 | t_green_v(l)%t(iwl,m) |
---|
| 2594 | ENDDO |
---|
[3337] | 2595 | ENDIF |
---|
[2737] | 2596 | |
---|
[3418] | 2597 | CASE ( 'usm_swc' ) |
---|
| 2598 | !-- soil water content for iwl layer of walls and land |
---|
| 2599 | IF ( l == -1 ) THEN |
---|
| 2600 | DO m = 1, surf_usm_h%ns |
---|
| 2601 | surf_usm_h%swc_av(iwl,m) = & |
---|
| 2602 | surf_usm_h%swc_av(iwl,m) + & |
---|
| 2603 | swc_h(iwl,m) |
---|
| 2604 | ENDDO |
---|
| 2605 | ELSE |
---|
| 2606 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2607 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
| 2608 | surf_usm_v(l)%swc_av(iwl,m) + & |
---|
| 2609 | swc_v(l)%t(iwl,m) |
---|
| 2610 | ENDDO |
---|
| 2611 | ENDIF |
---|
| 2612 | |
---|
[2737] | 2613 | CASE DEFAULT |
---|
| 2614 | CONTINUE |
---|
| 2615 | |
---|
| 2616 | END SELECT |
---|
| 2617 | |
---|
| 2618 | ELSEIF ( mode == 'average' ) THEN |
---|
| 2619 | |
---|
| 2620 | SELECT CASE ( TRIM( var ) ) |
---|
| 2621 | |
---|
| 2622 | CASE ( 'usm_rad_net' ) |
---|
| 2623 | !-- array of complete radiation balance |
---|
[3337] | 2624 | IF ( l == -1 ) THEN |
---|
| 2625 | DO m = 1, surf_usm_h%ns |
---|
| 2626 | surf_usm_h%rad_net_av(m) = & |
---|
| 2627 | surf_usm_h%rad_net_av(m) / & |
---|
| 2628 | REAL( average_count_3d, kind=wp ) |
---|
| 2629 | ENDDO |
---|
| 2630 | ELSE |
---|
[2737] | 2631 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2632 | surf_usm_v(l)%rad_net_av(m) = & |
---|
| 2633 | surf_usm_v(l)%rad_net_av(m) / & |
---|
| 2634 | REAL( average_count_3d, kind=wp ) |
---|
| 2635 | ENDDO |
---|
[3337] | 2636 | ENDIF |
---|
[2737] | 2637 | |
---|
| 2638 | CASE ( 'usm_rad_insw' ) |
---|
| 2639 | !-- array of sw radiation falling to surface after i-th reflection |
---|
[2920] | 2640 | DO l = 1, nsurfl |
---|
| 2641 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2642 | surfinsw_av(l) = surfinsw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2643 | ENDIF |
---|
| 2644 | ENDDO |
---|
| 2645 | |
---|
| 2646 | CASE ( 'usm_rad_inlw' ) |
---|
| 2647 | !-- array of lw radiation falling to surface after i-th reflection |
---|
[2920] | 2648 | DO l = 1, nsurfl |
---|
| 2649 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2650 | surfinlw_av(l) = surfinlw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2651 | ENDIF |
---|
| 2652 | ENDDO |
---|
| 2653 | |
---|
| 2654 | CASE ( 'usm_rad_inswdir' ) |
---|
| 2655 | !-- array of direct sw radiation falling to surface from sun |
---|
[2920] | 2656 | DO l = 1, nsurfl |
---|
| 2657 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2658 | surfinswdir_av(l) = surfinswdir_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2659 | ENDIF |
---|
| 2660 | ENDDO |
---|
| 2661 | |
---|
| 2662 | CASE ( 'usm_rad_inswdif' ) |
---|
| 2663 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
[2920] | 2664 | DO l = 1, nsurfl |
---|
| 2665 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2666 | surfinswdif_av(l) = surfinswdif_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2667 | ENDIF |
---|
| 2668 | ENDDO |
---|
| 2669 | |
---|
| 2670 | CASE ( 'usm_rad_inswref' ) |
---|
| 2671 | !-- array of sw radiation falling to surface from reflections |
---|
[2920] | 2672 | DO l = 1, nsurfl |
---|
| 2673 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2674 | surfinswref_av(l) = surfinswref_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2675 | ENDIF |
---|
| 2676 | ENDDO |
---|
| 2677 | |
---|
| 2678 | CASE ( 'usm_rad_inlwdif' ) |
---|
| 2679 | !-- array of sw radiation falling to surface after i-th reflection |
---|
[2920] | 2680 | DO l = 1, nsurfl |
---|
| 2681 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2682 | surfinlwdif_av(l) = surfinlwdif_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2683 | ENDIF |
---|
| 2684 | ENDDO |
---|
| 2685 | |
---|
| 2686 | CASE ( 'usm_rad_inlwref' ) |
---|
| 2687 | !-- array of lw radiation falling to surface from reflections |
---|
[2920] | 2688 | DO l = 1, nsurfl |
---|
| 2689 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2690 | surfinlwref_av(l) = surfinlwref_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2691 | ENDIF |
---|
| 2692 | ENDDO |
---|
| 2693 | |
---|
| 2694 | CASE ( 'usm_rad_outsw' ) |
---|
| 2695 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
[2920] | 2696 | DO l = 1, nsurfl |
---|
| 2697 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2698 | surfoutsw_av(l) = surfoutsw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2699 | ENDIF |
---|
| 2700 | ENDDO |
---|
| 2701 | |
---|
| 2702 | CASE ( 'usm_rad_outlw' ) |
---|
| 2703 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
[2920] | 2704 | DO l = 1, nsurfl |
---|
| 2705 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2706 | surfoutlw_av(l) = surfoutlw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2707 | ENDIF |
---|
| 2708 | ENDDO |
---|
| 2709 | |
---|
| 2710 | CASE ( 'usm_rad_ressw' ) |
---|
| 2711 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
[2920] | 2712 | DO l = 1, nsurfl |
---|
| 2713 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2714 | surfins_av(l) = surfins_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2715 | ENDIF |
---|
| 2716 | ENDDO |
---|
| 2717 | |
---|
| 2718 | CASE ( 'usm_rad_reslw' ) |
---|
| 2719 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
[2920] | 2720 | DO l = 1, nsurfl |
---|
| 2721 | IF ( surfl(id,l) == idsint ) THEN |
---|
[2737] | 2722 | surfinl_av(l) = surfinl_av(l) / REAL( average_count_3d, kind=wp ) |
---|
| 2723 | ENDIF |
---|
| 2724 | ENDDO |
---|
| 2725 | |
---|
[3337] | 2726 | CASE ( 'usm_rad_pc_inlw' ) |
---|
| 2727 | pcbinlw_av(:) = pcbinlw_av(:) / REAL( average_count_3d, kind=wp ) |
---|
| 2728 | |
---|
| 2729 | CASE ( 'usm_rad_pc_insw' ) |
---|
| 2730 | pcbinsw_av(:) = pcbinsw_av(:) / REAL( average_count_3d, kind=wp ) |
---|
| 2731 | |
---|
| 2732 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
| 2733 | pcbinswdir_av(:) = pcbinswdir_av(:) / REAL( average_count_3d, kind=wp ) |
---|
| 2734 | |
---|
| 2735 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
| 2736 | pcbinswdif_av(:) = pcbinswdif_av(:) / REAL( average_count_3d, kind=wp ) |
---|
| 2737 | |
---|
| 2738 | CASE ( 'usm_rad_pc_inswref' ) |
---|
| 2739 | pcbinswref_av(:) = pcbinswref_av(:) / REAL( average_count_3d, kind=wp ) |
---|
| 2740 | |
---|
[2737] | 2741 | CASE ( 'usm_rad_hf' ) |
---|
| 2742 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
[3337] | 2743 | IF ( l == -1 ) THEN |
---|
| 2744 | DO m = 1, surf_usm_h%ns |
---|
| 2745 | surf_usm_h%surfhf_av(m) = & |
---|
| 2746 | surf_usm_h%surfhf_av(m) / & |
---|
| 2747 | REAL( average_count_3d, kind=wp ) |
---|
| 2748 | ENDDO |
---|
| 2749 | ELSE |
---|
[2737] | 2750 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2751 | surf_usm_v(l)%surfhf_av(m) = & |
---|
| 2752 | surf_usm_v(l)%surfhf_av(m) / & |
---|
| 2753 | REAL( average_count_3d, kind=wp ) |
---|
| 2754 | ENDDO |
---|
[3337] | 2755 | ENDIF |
---|
[2737] | 2756 | |
---|
| 2757 | CASE ( 'usm_wshf' ) |
---|
| 2758 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
[3337] | 2759 | IF ( l == -1 ) THEN |
---|
| 2760 | DO m = 1, surf_usm_h%ns |
---|
| 2761 | surf_usm_h%wshf_eb_av(m) = & |
---|
| 2762 | surf_usm_h%wshf_eb_av(m) / & |
---|
| 2763 | REAL( average_count_3d, kind=wp ) |
---|
| 2764 | ENDDO |
---|
| 2765 | ELSE |
---|
[2737] | 2766 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2767 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
| 2768 | surf_usm_v(l)%wshf_eb_av(m) / & |
---|
| 2769 | REAL( average_count_3d, kind=wp ) |
---|
| 2770 | ENDDO |
---|
[3337] | 2771 | ENDIF |
---|
[2737] | 2772 | |
---|
[3418] | 2773 | CASE ( 'usm_qsws' ) |
---|
| 2774 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
| 2775 | IF ( l == -1 ) THEN |
---|
| 2776 | DO m = 1, surf_usm_h%ns |
---|
| 2777 | surf_usm_h%qsws_eb_av(m) = & |
---|
| 2778 | surf_usm_h%qsws_eb_av(m) / & |
---|
| 2779 | REAL( average_count_3d, kind=wp ) |
---|
| 2780 | ENDDO |
---|
| 2781 | ELSE |
---|
| 2782 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2783 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
| 2784 | surf_usm_v(l)%qsws_eb_av(m) / & |
---|
| 2785 | REAL( average_count_3d, kind=wp ) |
---|
| 2786 | ENDDO |
---|
| 2787 | ENDIF |
---|
| 2788 | |
---|
| 2789 | CASE ( 'usm_qsws_veg' ) |
---|
| 2790 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
| 2791 | IF ( l == -1 ) THEN |
---|
| 2792 | DO m = 1, surf_usm_h%ns |
---|
| 2793 | surf_usm_h%qsws_veg_eb_av(m) = & |
---|
| 2794 | surf_usm_h%qsws_veg_eb_av(m) / & |
---|
| 2795 | REAL( average_count_3d, kind=wp ) |
---|
| 2796 | ENDDO |
---|
| 2797 | ELSE |
---|
| 2798 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2799 | surf_usm_v(l)%qsws_veg_eb_av(m) = & |
---|
| 2800 | surf_usm_v(l)%qsws_veg_eb_av(m) / & |
---|
| 2801 | REAL( average_count_3d, kind=wp ) |
---|
| 2802 | ENDDO |
---|
| 2803 | ENDIF |
---|
| 2804 | |
---|
| 2805 | CASE ( 'usm_qsws_liq' ) |
---|
| 2806 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
| 2807 | IF ( l == -1 ) THEN |
---|
| 2808 | DO m = 1, surf_usm_h%ns |
---|
| 2809 | surf_usm_h%qsws_liq_eb_av(m) = & |
---|
| 2810 | surf_usm_h%qsws_liq_eb_av(m) / & |
---|
| 2811 | REAL( average_count_3d, kind=wp ) |
---|
| 2812 | ENDDO |
---|
| 2813 | ELSE |
---|
| 2814 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2815 | surf_usm_v(l)%qsws_liq_eb_av(m) = & |
---|
| 2816 | surf_usm_v(l)%qsws_liq_eb_av(m) / & |
---|
| 2817 | REAL( average_count_3d, kind=wp ) |
---|
| 2818 | ENDDO |
---|
| 2819 | ENDIF |
---|
| 2820 | |
---|
[2737] | 2821 | CASE ( 'usm_wghf' ) |
---|
| 2822 | !-- array of heat flux from ground (wall, roof, land) |
---|
[3337] | 2823 | IF ( l == -1 ) THEN |
---|
| 2824 | DO m = 1, surf_usm_h%ns |
---|
| 2825 | surf_usm_h%wghf_eb_av(m) = & |
---|
| 2826 | surf_usm_h%wghf_eb_av(m) / & |
---|
| 2827 | REAL( average_count_3d, kind=wp ) |
---|
| 2828 | ENDDO |
---|
| 2829 | ELSE |
---|
[2737] | 2830 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2831 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
| 2832 | surf_usm_v(l)%wghf_eb_av(m) / & |
---|
| 2833 | REAL( average_count_3d, kind=wp ) |
---|
| 2834 | ENDDO |
---|
[3337] | 2835 | ENDIF |
---|
[2737] | 2836 | |
---|
| 2837 | CASE ( 'usm_wghf_window' ) |
---|
| 2838 | !-- array of heat flux from window ground (wall, roof, land) |
---|
[3337] | 2839 | IF ( l == -1 ) THEN |
---|
| 2840 | DO m = 1, surf_usm_h%ns |
---|
| 2841 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
| 2842 | surf_usm_h%wghf_eb_window_av(m) / & |
---|
| 2843 | REAL( average_count_3d, kind=wp ) |
---|
| 2844 | ENDDO |
---|
| 2845 | ELSE |
---|
[2737] | 2846 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2847 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
| 2848 | surf_usm_v(l)%wghf_eb_window_av(m) / & |
---|
| 2849 | REAL( average_count_3d, kind=wp ) |
---|
| 2850 | ENDDO |
---|
[3337] | 2851 | ENDIF |
---|
[2737] | 2852 | |
---|
| 2853 | CASE ( 'usm_wghf_green' ) |
---|
| 2854 | !-- array of heat flux from green ground (wall, roof, land) |
---|
[3337] | 2855 | IF ( l == -1 ) THEN |
---|
| 2856 | DO m = 1, surf_usm_h%ns |
---|
| 2857 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
| 2858 | surf_usm_h%wghf_eb_green_av(m) / & |
---|
| 2859 | REAL( average_count_3d, kind=wp ) |
---|
| 2860 | ENDDO |
---|
| 2861 | ELSE |
---|
[2737] | 2862 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2863 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
| 2864 | surf_usm_v(l)%wghf_eb_green_av(m) / & |
---|
| 2865 | REAL( average_count_3d, kind=wp ) |
---|
| 2866 | ENDDO |
---|
[3337] | 2867 | ENDIF |
---|
[2737] | 2868 | |
---|
| 2869 | CASE ( 'usm_iwghf' ) |
---|
| 2870 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
[3337] | 2871 | IF ( l == -1 ) THEN |
---|
| 2872 | DO m = 1, surf_usm_h%ns |
---|
| 2873 | surf_usm_h%iwghf_eb_av(m) = & |
---|
| 2874 | surf_usm_h%iwghf_eb_av(m) / & |
---|
| 2875 | REAL( average_count_3d, kind=wp ) |
---|
| 2876 | ENDDO |
---|
| 2877 | ELSE |
---|
[2737] | 2878 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2879 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
| 2880 | surf_usm_v(l)%iwghf_eb_av(m) / & |
---|
| 2881 | REAL( average_count_3d, kind=wp ) |
---|
| 2882 | ENDDO |
---|
[3337] | 2883 | ENDIF |
---|
[2737] | 2884 | |
---|
| 2885 | CASE ( 'usm_iwghf_window' ) |
---|
| 2886 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
[3337] | 2887 | IF ( l == -1 ) THEN |
---|
| 2888 | DO m = 1, surf_usm_h%ns |
---|
| 2889 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
| 2890 | surf_usm_h%iwghf_eb_window_av(m) / & |
---|
| 2891 | REAL( average_count_3d, kind=wp ) |
---|
| 2892 | ENDDO |
---|
| 2893 | ELSE |
---|
[2737] | 2894 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2895 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
| 2896 | surf_usm_v(l)%iwghf_eb_window_av(m) / & |
---|
| 2897 | REAL( average_count_3d, kind=wp ) |
---|
| 2898 | ENDDO |
---|
[3337] | 2899 | ENDIF |
---|
[2737] | 2900 | |
---|
[3418] | 2901 | CASE ( 'usm_t_surf_wall' ) |
---|
[2737] | 2902 | !-- surface temperature for surfaces |
---|
[3337] | 2903 | IF ( l == -1 ) THEN |
---|
| 2904 | DO m = 1, surf_usm_h%ns |
---|
[3418] | 2905 | surf_usm_h%t_surf_wall_av(m) = & |
---|
| 2906 | surf_usm_h%t_surf_wall_av(m) / & |
---|
[3337] | 2907 | REAL( average_count_3d, kind=wp ) |
---|
| 2908 | ENDDO |
---|
| 2909 | ELSE |
---|
[2737] | 2910 | DO m = 1, surf_usm_v(l)%ns |
---|
[3418] | 2911 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
| 2912 | surf_usm_v(l)%t_surf_wall_av(m) / & |
---|
[2737] | 2913 | REAL( average_count_3d, kind=wp ) |
---|
| 2914 | ENDDO |
---|
[3337] | 2915 | ENDIF |
---|
[2737] | 2916 | |
---|
| 2917 | CASE ( 'usm_t_surf_window' ) |
---|
| 2918 | !-- surface temperature for window surfaces |
---|
[3337] | 2919 | IF ( l == -1 ) THEN |
---|
| 2920 | DO m = 1, surf_usm_h%ns |
---|
| 2921 | surf_usm_h%t_surf_window_av(m) = & |
---|
| 2922 | surf_usm_h%t_surf_window_av(m) / & |
---|
| 2923 | REAL( average_count_3d, kind=wp ) |
---|
| 2924 | ENDDO |
---|
| 2925 | ELSE |
---|
[2737] | 2926 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2927 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
| 2928 | surf_usm_v(l)%t_surf_window_av(m) / & |
---|
| 2929 | REAL( average_count_3d, kind=wp ) |
---|
| 2930 | ENDDO |
---|
[3337] | 2931 | ENDIF |
---|
[2737] | 2932 | |
---|
| 2933 | CASE ( 'usm_t_surf_green' ) |
---|
| 2934 | !-- surface temperature for green surfaces |
---|
[3337] | 2935 | IF ( l == -1 ) THEN |
---|
| 2936 | DO m = 1, surf_usm_h%ns |
---|
| 2937 | surf_usm_h%t_surf_green_av(m) = & |
---|
| 2938 | surf_usm_h%t_surf_green_av(m) / & |
---|
| 2939 | REAL( average_count_3d, kind=wp ) |
---|
| 2940 | ENDDO |
---|
| 2941 | ELSE |
---|
[2737] | 2942 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2943 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
| 2944 | surf_usm_v(l)%t_surf_green_av(m) / & |
---|
| 2945 | REAL( average_count_3d, kind=wp ) |
---|
| 2946 | ENDDO |
---|
[3337] | 2947 | ENDIF |
---|
[2737] | 2948 | |
---|
| 2949 | CASE ( 'usm_t_surf_10cm' ) |
---|
| 2950 | !-- near surface temperature for whole surfaces |
---|
[3337] | 2951 | IF ( l == -1 ) THEN |
---|
| 2952 | DO m = 1, surf_usm_h%ns |
---|
| 2953 | surf_usm_h%t_surf_10cm_av(m) = & |
---|
| 2954 | surf_usm_h%t_surf_10cm_av(m) / & |
---|
| 2955 | REAL( average_count_3d, kind=wp ) |
---|
| 2956 | ENDDO |
---|
| 2957 | ELSE |
---|
[2737] | 2958 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2959 | surf_usm_v(l)%t_surf_10cm_av(m) = & |
---|
| 2960 | surf_usm_v(l)%t_surf_10cm_av(m) / & |
---|
| 2961 | REAL( average_count_3d, kind=wp ) |
---|
| 2962 | ENDDO |
---|
[3337] | 2963 | ENDIF |
---|
[2737] | 2964 | |
---|
| 2965 | CASE ( 'usm_t_wall' ) |
---|
| 2966 | !-- wall temperature for iwl layer of walls and land |
---|
[3337] | 2967 | IF ( l == -1 ) THEN |
---|
| 2968 | DO m = 1, surf_usm_h%ns |
---|
| 2969 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
| 2970 | surf_usm_h%t_wall_av(iwl,m) / & |
---|
| 2971 | REAL( average_count_3d, kind=wp ) |
---|
| 2972 | ENDDO |
---|
| 2973 | ELSE |
---|
[2737] | 2974 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2975 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
| 2976 | surf_usm_v(l)%t_wall_av(iwl,m) / & |
---|
| 2977 | REAL( average_count_3d, kind=wp ) |
---|
| 2978 | ENDDO |
---|
[3337] | 2979 | ENDIF |
---|
[2737] | 2980 | |
---|
| 2981 | CASE ( 'usm_t_window' ) |
---|
| 2982 | !-- window temperature for iwl layer of walls and land |
---|
[3337] | 2983 | IF ( l == -1 ) THEN |
---|
| 2984 | DO m = 1, surf_usm_h%ns |
---|
| 2985 | surf_usm_h%t_window_av(iwl,m) = & |
---|
| 2986 | surf_usm_h%t_window_av(iwl,m) / & |
---|
| 2987 | REAL( average_count_3d, kind=wp ) |
---|
| 2988 | ENDDO |
---|
| 2989 | ELSE |
---|
[2737] | 2990 | DO m = 1, surf_usm_v(l)%ns |
---|
| 2991 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
| 2992 | surf_usm_v(l)%t_window_av(iwl,m) / & |
---|
| 2993 | REAL( average_count_3d, kind=wp ) |
---|
| 2994 | ENDDO |
---|
[3337] | 2995 | ENDIF |
---|
[2737] | 2996 | |
---|
| 2997 | CASE ( 'usm_t_green' ) |
---|
| 2998 | !-- green temperature for iwl layer of walls and land |
---|
[3337] | 2999 | IF ( l == -1 ) THEN |
---|
| 3000 | DO m = 1, surf_usm_h%ns |
---|
| 3001 | surf_usm_h%t_green_av(iwl,m) = & |
---|
| 3002 | surf_usm_h%t_green_av(iwl,m) / & |
---|
| 3003 | REAL( average_count_3d, kind=wp ) |
---|
| 3004 | ENDDO |
---|
| 3005 | ELSE |
---|
[2737] | 3006 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3007 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
| 3008 | surf_usm_v(l)%t_green_av(iwl,m) / & |
---|
| 3009 | REAL( average_count_3d, kind=wp ) |
---|
| 3010 | ENDDO |
---|
[3337] | 3011 | ENDIF |
---|
[3418] | 3012 | |
---|
| 3013 | CASE ( 'usm_swc' ) |
---|
| 3014 | !-- soil water content for iwl layer of walls and land |
---|
| 3015 | IF ( l == -1 ) THEN |
---|
| 3016 | DO m = 1, surf_usm_h%ns |
---|
| 3017 | surf_usm_h%swc_av(iwl,m) = & |
---|
| 3018 | surf_usm_h%swc_av(iwl,m) / & |
---|
| 3019 | REAL( average_count_3d, kind=wp ) |
---|
| 3020 | ENDDO |
---|
| 3021 | ELSE |
---|
| 3022 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3023 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
| 3024 | surf_usm_v(l)%swc_av(iwl,m) / & |
---|
| 3025 | REAL( average_count_3d, kind=wp ) |
---|
| 3026 | ENDDO |
---|
| 3027 | ENDIF |
---|
[2737] | 3028 | |
---|
| 3029 | |
---|
| 3030 | END SELECT |
---|
| 3031 | |
---|
| 3032 | ENDIF |
---|
| 3033 | |
---|
| 3034 | END SUBROUTINE usm_average_3d_data |
---|
| 3035 | |
---|
| 3036 | |
---|
| 3037 | |
---|
| 3038 | !------------------------------------------------------------------------------! |
---|
| 3039 | ! Description: |
---|
| 3040 | ! ------------ |
---|
| 3041 | !> Set internal Neumann boundary condition at outer soil grid points |
---|
| 3042 | !> for temperature and humidity. |
---|
| 3043 | !------------------------------------------------------------------------------! |
---|
| 3044 | SUBROUTINE usm_boundary_condition |
---|
| 3045 | |
---|
| 3046 | IMPLICIT NONE |
---|
| 3047 | |
---|
| 3048 | INTEGER(iwp) :: i !< grid index x-direction |
---|
| 3049 | INTEGER(iwp) :: ioff !< offset index x-direction indicating location of soil grid point |
---|
| 3050 | INTEGER(iwp) :: j !< grid index y-direction |
---|
| 3051 | INTEGER(iwp) :: joff !< offset index x-direction indicating location of soil grid point |
---|
| 3052 | INTEGER(iwp) :: k !< grid index z-direction |
---|
| 3053 | INTEGER(iwp) :: koff !< offset index x-direction indicating location of soil grid point |
---|
| 3054 | INTEGER(iwp) :: l !< running index surface-orientation |
---|
| 3055 | INTEGER(iwp) :: m !< running index surface elements |
---|
| 3056 | |
---|
| 3057 | koff = surf_usm_h%koff |
---|
| 3058 | DO m = 1, surf_usm_h%ns |
---|
| 3059 | i = surf_usm_h%i(m) |
---|
| 3060 | j = surf_usm_h%j(m) |
---|
| 3061 | k = surf_usm_h%k(m) |
---|
| 3062 | pt(k+koff,j,i) = pt(k,j,i) |
---|
| 3063 | ENDDO |
---|
| 3064 | |
---|
| 3065 | DO l = 0, 3 |
---|
| 3066 | ioff = surf_usm_v(l)%ioff |
---|
| 3067 | joff = surf_usm_v(l)%joff |
---|
| 3068 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3069 | i = surf_usm_v(l)%i(m) |
---|
| 3070 | j = surf_usm_v(l)%j(m) |
---|
| 3071 | k = surf_usm_v(l)%k(m) |
---|
| 3072 | pt(k,j+joff,i+ioff) = pt(k,j,i) |
---|
| 3073 | ENDDO |
---|
| 3074 | ENDDO |
---|
| 3075 | |
---|
| 3076 | END SUBROUTINE usm_boundary_condition |
---|
| 3077 | |
---|
| 3078 | |
---|
| 3079 | !------------------------------------------------------------------------------! |
---|
| 3080 | ! |
---|
| 3081 | ! Description: |
---|
| 3082 | ! ------------ |
---|
| 3083 | !> Subroutine checks variables and assigns units. |
---|
| 3084 | !> It is called out from subroutine check_parameters. |
---|
| 3085 | !------------------------------------------------------------------------------! |
---|
| 3086 | SUBROUTINE usm_check_data_output( variable, unit ) |
---|
[3418] | 3087 | |
---|
[2737] | 3088 | IMPLICIT NONE |
---|
| 3089 | |
---|
[3418] | 3090 | CHARACTER(LEN=*),INTENT(IN) :: variable !< |
---|
| 3091 | CHARACTER(LEN=*),INTENT(OUT) :: unit !< |
---|
| 3092 | |
---|
[3378] | 3093 | INTEGER(iwp) :: i,j !< index |
---|
[3418] | 3094 | CHARACTER(LEN=varnamelength) :: var !< TRIM(variable) |
---|
[3378] | 3095 | INTEGER(iwp), PARAMETER :: nl1 = 32 !< number of directional usm variables |
---|
| 3096 | CHARACTER(LEN=varnamelength), DIMENSION(nl1) :: varlist1 = & !< list of directional usm variables |
---|
[3382] | 3097 | (/'usm_rad_net ', & |
---|
| 3098 | 'usm_rad_insw ', & |
---|
| 3099 | 'usm_rad_inlw ', & |
---|
| 3100 | 'usm_rad_inswdir ', & |
---|
| 3101 | 'usm_rad_inswdif ', & |
---|
| 3102 | 'usm_rad_inswref ', & |
---|
| 3103 | 'usm_rad_inlwdif ', & |
---|
| 3104 | 'usm_wshf ', & |
---|
| 3105 | 'usm_rad_inlwref ', & |
---|
| 3106 | 'usm_rad_outsw ', & |
---|
| 3107 | 'usm_rad_outlw ', & |
---|
| 3108 | 'usm_rad_hf ', & |
---|
| 3109 | 'usm_rad_ressw ', & |
---|
| 3110 | 'usm_rad_reslw ', & |
---|
| 3111 | 'usm_wghf ', & |
---|
| 3112 | 'usm_wghf_window ', & |
---|
| 3113 | 'usm_wghf_green ', & |
---|
| 3114 | 'usm_iwghf ', & |
---|
| 3115 | 'usm_iwghf_window ', & |
---|
| 3116 | 'usm_surfz ', & |
---|
| 3117 | 'usm_surfwintrans ', & |
---|
| 3118 | 'usm_surfcat ', & |
---|
| 3119 | 'usm_surfalb ', & |
---|
| 3120 | 'usm_surfemis ', & |
---|
| 3121 | 'usm_t_surf ', & |
---|
| 3122 | 'usm_t_surf_window ', & |
---|
| 3123 | 'usm_t_surf_green ', & |
---|
| 3124 | 'usm_t_green ', & |
---|
| 3125 | 'usm_t_surf_10cm ', & |
---|
| 3126 | 'usm_t_wall ', & |
---|
| 3127 | 'usm_t_window ', & |
---|
| 3128 | 'usm_t_green '/) |
---|
[3378] | 3129 | |
---|
| 3130 | INTEGER(iwp), PARAMETER :: nl2 = 9 !< number of other variables |
---|
| 3131 | CHARACTER(LEN=varnamelength), DIMENSION(nl2) :: varlist2 = & !< list of other usm variables |
---|
[3382] | 3132 | (/'usm_skyvf ', & |
---|
| 3133 | 'usm_skyvft ', & |
---|
| 3134 | 'usm_svf ', & |
---|
| 3135 | 'usm_dif ', & |
---|
| 3136 | 'usm_rad_pc_inlw ', & |
---|
| 3137 | 'usm_rad_pc_insw ', & |
---|
| 3138 | 'usm_rad_pc_inswdir ', & |
---|
| 3139 | 'usm_rad_pc_inswdif ', & |
---|
| 3140 | 'usm_rad_pc_inswref '/) |
---|
[3378] | 3141 | |
---|
| 3142 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
| 3143 | CHARACTER(LEN=6), DIMENSION(nd), PARAMETER :: dirname = & !< direction names |
---|
| 3144 | (/'_roof ','_south','_north','_west ','_east '/) |
---|
| 3145 | LOGICAL :: lfound !< flag if the variable is found |
---|
| 3146 | |
---|
| 3147 | |
---|
| 3148 | lfound = .FALSE. |
---|
[3418] | 3149 | |
---|
[2737] | 3150 | var = TRIM(variable) |
---|
[3378] | 3151 | |
---|
| 3152 | !-- check if variable exists |
---|
| 3153 | ! directional variables |
---|
| 3154 | DO i = 1, nl1 |
---|
| 3155 | DO j = 1, nd |
---|
| 3156 | IF ( TRIM(var) == TRIM(varlist1(i))//TRIM(dirname(j)) ) THEN |
---|
| 3157 | lfound = .TRUE. |
---|
| 3158 | EXIT |
---|
| 3159 | ENDIF |
---|
| 3160 | IF ( lfound ) EXIT |
---|
| 3161 | ENDDO |
---|
| 3162 | ENDDO |
---|
| 3163 | IF ( lfound ) GOTO 10 |
---|
| 3164 | ! other variables |
---|
| 3165 | DO i = 1, nl2 |
---|
| 3166 | IF ( TRIM(var) == TRIM(varlist2(i)) ) THEN |
---|
| 3167 | lfound = .TRUE. |
---|
| 3168 | EXIT |
---|
| 3169 | ENDIF |
---|
| 3170 | ENDDO |
---|
| 3171 | IF ( .NOT. lfound ) THEN |
---|
| 3172 | unit = 'illegal' |
---|
| 3173 | RETURN |
---|
| 3174 | ENDIF |
---|
| 3175 | 10 CONTINUE |
---|
| 3176 | |
---|
[2737] | 3177 | IF ( var(1:12) == 'usm_rad_net_' .OR. var(1:13) == 'usm_rad_insw_' .OR. & |
---|
| 3178 | var(1:13) == 'usm_rad_inlw_' .OR. var(1:16) == 'usm_rad_inswdir_' .OR. & |
---|
| 3179 | var(1:16) == 'usm_rad_inswdif_' .OR. var(1:16) == 'usm_rad_inswref_' .OR. & |
---|
| 3180 | var(1:16) == 'usm_rad_inlwdif_' .OR. var(1:16) == 'usm_rad_inlwref_' .OR. & |
---|
| 3181 | var(1:14) == 'usm_rad_outsw_' .OR. var(1:14) == 'usm_rad_outlw_' .OR. & |
---|
| 3182 | var(1:14) == 'usm_rad_ressw_' .OR. var(1:14) == 'usm_rad_reslw_' .OR. & |
---|
| 3183 | var(1:11) == 'usm_rad_hf_' .OR. & |
---|
| 3184 | var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
| 3185 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
[3418] | 3186 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
| 3187 | var(1:17) == 'usm_surfwintrans_' .OR. & |
---|
| 3188 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
| 3189 | var(1:13) == 'usm_qsws_liq_' ) THEN |
---|
[2737] | 3190 | unit = 'W/m2' |
---|
[3418] | 3191 | ELSE IF ( var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
[2737] | 3192 | var(1:12) == 'usm_t_window' .OR. var(1:17) == 'usm_t_surf_window' .OR. & |
---|
| 3193 | var(1:16) == 'usm_t_surf_green' .OR. & |
---|
[3418] | 3194 | var(1:11) == 'usm_t_green' .OR. var(1:7) == 'usm_swc' .OR. & |
---|
[3337] | 3195 | var(1:15) == 'usm_t_surf_10cm' ) THEN |
---|
[2737] | 3196 | unit = 'K' |
---|
[3337] | 3197 | ELSE IF ( var == 'usm_rad_pc_inlw' .OR. var == 'usm_rad_pc_insw' .OR. & |
---|
| 3198 | var == 'usm_rad_pc_inswdir' .OR. var == 'usm_rad_pc_inswdif' .OR. & |
---|
| 3199 | var == 'usm_rad_pc_inswref' ) THEN |
---|
| 3200 | unit = 'W' |
---|
[2737] | 3201 | ELSE IF ( var(1:9) == 'usm_surfz' .OR. var(1:7) == 'usm_svf' .OR. & |
---|
| 3202 | var(1:7) == 'usm_dif' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
[2920] | 3203 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
| 3204 | var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' ) THEN |
---|
[2737] | 3205 | unit = '1' |
---|
| 3206 | ELSE |
---|
| 3207 | unit = 'illegal' |
---|
| 3208 | ENDIF |
---|
| 3209 | |
---|
| 3210 | END SUBROUTINE usm_check_data_output |
---|
| 3211 | |
---|
| 3212 | |
---|
| 3213 | !------------------------------------------------------------------------------! |
---|
| 3214 | ! Description: |
---|
| 3215 | ! ------------ |
---|
| 3216 | !> Check parameters routine for urban surface model |
---|
| 3217 | !------------------------------------------------------------------------------! |
---|
| 3218 | SUBROUTINE usm_check_parameters |
---|
| 3219 | |
---|
| 3220 | USE control_parameters, & |
---|
| 3221 | ONLY: bc_pt_b, bc_q_b, constant_flux_layer, large_scale_forcing, & |
---|
| 3222 | lsf_surf, topography |
---|
| 3223 | |
---|
| 3224 | ! |
---|
| 3225 | !-- Dirichlet boundary conditions are required as the surface fluxes are |
---|
| 3226 | !-- calculated from the temperature/humidity gradients in the urban surface |
---|
| 3227 | !-- model |
---|
| 3228 | IF ( bc_pt_b == 'neumann' .OR. bc_q_b == 'neumann' ) THEN |
---|
| 3229 | message_string = 'urban surface model requires setting of '// & |
---|
| 3230 | 'bc_pt_b = "dirichlet" and '// & |
---|
| 3231 | 'bc_q_b = "dirichlet"' |
---|
[3045] | 3232 | CALL message( 'usm_check_parameters', 'PA0590', 1, 2, 0, 6, 0 ) |
---|
[2737] | 3233 | ENDIF |
---|
| 3234 | |
---|
| 3235 | IF ( .NOT. constant_flux_layer ) THEN |
---|
| 3236 | message_string = 'urban surface model requires '// & |
---|
| 3237 | 'constant_flux_layer = .T.' |
---|
[3045] | 3238 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
[2737] | 3239 | ENDIF |
---|
[3045] | 3240 | |
---|
| 3241 | IF ( .NOT. radiation ) THEN |
---|
| 3242 | message_string = 'urban surface model requires '// & |
---|
| 3243 | 'the radiation model to be switched on' |
---|
| 3244 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
| 3245 | ENDIF |
---|
[2737] | 3246 | ! |
---|
| 3247 | !-- Surface forcing has to be disabled for LSF in case of enabled |
---|
| 3248 | !-- urban surface module |
---|
| 3249 | IF ( large_scale_forcing ) THEN |
---|
| 3250 | lsf_surf = .FALSE. |
---|
| 3251 | ENDIF |
---|
| 3252 | ! |
---|
| 3253 | !-- Topography |
---|
| 3254 | IF ( topography == 'flat' ) THEN |
---|
| 3255 | message_string = 'topography /= "flat" is required '// & |
---|
| 3256 | 'when using the urban surface model' |
---|
| 3257 | CALL message( 'check_parameters', 'PA0592', 1, 2, 0, 6, 0 ) |
---|
| 3258 | ENDIF |
---|
[2920] | 3259 | ! |
---|
| 3260 | !-- naheatlayers |
---|
| 3261 | IF ( naheatlayers > nzt ) THEN |
---|
| 3262 | message_string = 'number of anthropogenic heat layers '// & |
---|
| 3263 | '"naheatlayers" can not be larger than'// & |
---|
| 3264 | ' number of domain layers "nzt"' |
---|
| 3265 | CALL message( 'check_parameters', 'PA0593', 1, 2, 0, 6, 0 ) |
---|
| 3266 | ENDIF |
---|
[2737] | 3267 | |
---|
| 3268 | END SUBROUTINE usm_check_parameters |
---|
| 3269 | |
---|
| 3270 | |
---|
| 3271 | !------------------------------------------------------------------------------! |
---|
| 3272 | ! |
---|
| 3273 | ! Description: |
---|
| 3274 | ! ------------ |
---|
| 3275 | !> Output of the 3D-arrays in netCDF and/or AVS format |
---|
| 3276 | !> for variables of urban_surface model. |
---|
| 3277 | !> It resorts the urban surface module output quantities from surf style |
---|
| 3278 | !> indexing into temporary 3D array with indices (i,j,k). |
---|
| 3279 | !> It is called from subroutine data_output_3d. |
---|
| 3280 | !------------------------------------------------------------------------------! |
---|
| 3281 | SUBROUTINE usm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
| 3282 | |
---|
| 3283 | IMPLICIT NONE |
---|
| 3284 | |
---|
| 3285 | INTEGER(iwp), INTENT(IN) :: av !< |
---|
| 3286 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
| 3287 | INTEGER(iwp), INTENT(IN) :: nzb_do !< lower limit of the data output (usually 0) |
---|
| 3288 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) |
---|
| 3289 | LOGICAL, INTENT(OUT) :: found !< |
---|
| 3290 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< sp - it has to correspond to module data_output_3d |
---|
| 3291 | REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: temp_pf !< temp array for urban surface output procedure |
---|
| 3292 | |
---|
| 3293 | CHARACTER (len=varnamelength) :: var, surfid |
---|
| 3294 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
| 3295 | CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
[2920] | 3296 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
| 3297 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: diridx = (/ -1, 1, 0, 3, 2 /) |
---|
| 3298 | !< index for surf_*_v: 0:3 = (North, South, East, West) |
---|
[2737] | 3299 | INTEGER(iwp), DIMENSION(0:nd-1) :: dirstart |
---|
| 3300 | INTEGER(iwp), DIMENSION(0:nd-1) :: dirend |
---|
[3337] | 3301 | INTEGER(iwp) :: ids,idsint,idsidx,isurf,isvf,isurfs,isurflt,ipcgb |
---|
[2737] | 3302 | INTEGER(iwp) :: is,js,ks,i,j,k,iwl,istat, l, m |
---|
| 3303 | |
---|
| 3304 | dirstart = (/ startland, startwall, startwall, startwall, startwall /) |
---|
| 3305 | dirend = (/ endland, endwall, endwall, endwall, endwall /) |
---|
| 3306 | |
---|
| 3307 | found = .TRUE. |
---|
| 3308 | temp_pf = -1._wp |
---|
| 3309 | |
---|
| 3310 | ids = -1 |
---|
| 3311 | var = TRIM(variable) |
---|
| 3312 | DO i = 0, nd-1 |
---|
| 3313 | k = len(TRIM(var)) |
---|
| 3314 | j = len(TRIM(dirname(i))) |
---|
[3337] | 3315 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
[2737] | 3316 | ids = i |
---|
[2920] | 3317 | idsint = dirint(ids) |
---|
| 3318 | idsidx = diridx(ids) |
---|
[2737] | 3319 | var = var(:k-j) |
---|
| 3320 | EXIT |
---|
| 3321 | ENDIF |
---|
| 3322 | ENDDO |
---|
| 3323 | IF ( ids == -1 ) THEN |
---|
| 3324 | var = TRIM(variable) |
---|
| 3325 | ENDIF |
---|
| 3326 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
| 3327 | !-- wall layers |
---|
| 3328 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
| 3329 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
| 3330 | var = var(1:10) |
---|
| 3331 | ENDIF |
---|
| 3332 | ENDIF |
---|
| 3333 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
| 3334 | !-- window layers |
---|
| 3335 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
| 3336 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
| 3337 | var = var(1:12) |
---|
| 3338 | ENDIF |
---|
| 3339 | ENDIF |
---|
| 3340 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
| 3341 | !-- green layers |
---|
| 3342 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
| 3343 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
| 3344 | var = var(1:11) |
---|
| 3345 | ENDIF |
---|
| 3346 | ENDIF |
---|
[3418] | 3347 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
| 3348 | !-- green layers soil water content |
---|
| 3349 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
| 3350 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
| 3351 | var = var(1:7) |
---|
| 3352 | ENDIF |
---|
| 3353 | ENDIF |
---|
[2737] | 3354 | IF ( (var(1:8) == 'usm_svf_' .OR. var(1:8) == 'usm_dif_') .AND. len(TRIM(var)) >= 13 ) THEN |
---|
| 3355 | !-- svf values to particular surface |
---|
| 3356 | surfid = var(9:) |
---|
| 3357 | i = index(surfid,'_') |
---|
| 3358 | j = index(surfid(i+1:),'_') |
---|
| 3359 | READ(surfid(1:i-1),*, iostat=istat ) is |
---|
| 3360 | IF ( istat == 0 ) THEN |
---|
| 3361 | READ(surfid(i+1:i+j-1),*, iostat=istat ) js |
---|
| 3362 | ENDIF |
---|
| 3363 | IF ( istat == 0 ) THEN |
---|
| 3364 | READ(surfid(i+j+1:),*, iostat=istat ) ks |
---|
| 3365 | ENDIF |
---|
| 3366 | IF ( istat == 0 ) THEN |
---|
| 3367 | var = var(1:7) |
---|
| 3368 | ENDIF |
---|
| 3369 | ENDIF |
---|
| 3370 | |
---|
| 3371 | SELECT CASE ( TRIM(var) ) |
---|
| 3372 | |
---|
| 3373 | CASE ( 'usm_surfz' ) |
---|
[3378] | 3374 | !-- array of surface height (z) |
---|
[2920] | 3375 | IF ( idsint == iup_u ) THEN |
---|
| 3376 | DO m = 1, surf_usm_h%ns |
---|
| 3377 | i = surf_usm_h%i(m) |
---|
| 3378 | j = surf_usm_h%j(m) |
---|
| 3379 | k = surf_usm_h%k(m) |
---|
| 3380 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) ) |
---|
| 3381 | ENDDO |
---|
| 3382 | ELSE |
---|
| 3383 | l = idsidx |
---|
[2737] | 3384 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3385 | i = surf_usm_v(l)%i(m) |
---|
| 3386 | j = surf_usm_v(l)%j(m) |
---|
| 3387 | k = surf_usm_v(l)%k(m) |
---|
| 3388 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) + 1.0_wp ) |
---|
| 3389 | ENDDO |
---|
[2920] | 3390 | ENDIF |
---|
[2737] | 3391 | |
---|
| 3392 | CASE ( 'usm_surfcat' ) |
---|
| 3393 | !-- surface category |
---|
[2920] | 3394 | IF ( idsint == iup_u ) THEN |
---|
| 3395 | DO m = 1, surf_usm_h%ns |
---|
| 3396 | i = surf_usm_h%i(m) |
---|
| 3397 | j = surf_usm_h%j(m) |
---|
| 3398 | k = surf_usm_h%k(m) |
---|
| 3399 | temp_pf(k,j,i) = surf_usm_h%surface_types(m) |
---|
| 3400 | ENDDO |
---|
| 3401 | ELSE |
---|
| 3402 | l = idsidx |
---|
[2737] | 3403 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3404 | i = surf_usm_v(l)%i(m) |
---|
| 3405 | j = surf_usm_v(l)%j(m) |
---|
| 3406 | k = surf_usm_v(l)%k(m) |
---|
| 3407 | temp_pf(k,j,i) = surf_usm_v(l)%surface_types(m) |
---|
| 3408 | ENDDO |
---|
[2920] | 3409 | ENDIF |
---|
[2737] | 3410 | |
---|
| 3411 | CASE ( 'usm_surfalb' ) |
---|
| 3412 | !-- surface albedo, weighted average |
---|
[2920] | 3413 | IF ( idsint == iup_u ) THEN |
---|
| 3414 | DO m = 1, surf_usm_h%ns |
---|
| 3415 | i = surf_usm_h%i(m) |
---|
| 3416 | j = surf_usm_h%j(m) |
---|
| 3417 | k = surf_usm_h%k(m) |
---|
[2963] | 3418 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
| 3419 | surf_usm_h%albedo(ind_veg_wall,m) + & |
---|
| 3420 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
| 3421 | surf_usm_h%albedo(ind_pav_green,m) + & |
---|
| 3422 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
| 3423 | surf_usm_h%albedo(ind_wat_win,m) |
---|
[2920] | 3424 | ENDDO |
---|
| 3425 | ELSE |
---|
| 3426 | l = idsidx |
---|
[2737] | 3427 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3428 | i = surf_usm_v(l)%i(m) |
---|
| 3429 | j = surf_usm_v(l)%j(m) |
---|
| 3430 | k = surf_usm_v(l)%k(m) |
---|
[2963] | 3431 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
| 3432 | surf_usm_v(l)%albedo(ind_veg_wall,m) + & |
---|
| 3433 | surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
| 3434 | surf_usm_v(l)%albedo(ind_pav_green,m) + & |
---|
| 3435 | surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
| 3436 | surf_usm_v(l)%albedo(ind_wat_win,m) |
---|
[2737] | 3437 | ENDDO |
---|
[2920] | 3438 | ENDIF |
---|
[2737] | 3439 | |
---|
| 3440 | CASE ( 'usm_surfemis' ) |
---|
| 3441 | !-- surface emissivity, weighted average |
---|
[2920] | 3442 | IF ( idsint == iup_u ) THEN |
---|
| 3443 | DO m = 1, surf_usm_h%ns |
---|
| 3444 | i = surf_usm_h%i(m) |
---|
| 3445 | j = surf_usm_h%j(m) |
---|
| 3446 | k = surf_usm_h%k(m) |
---|
[2963] | 3447 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
| 3448 | surf_usm_h%emissivity(ind_veg_wall,m) + & |
---|
| 3449 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
| 3450 | surf_usm_h%emissivity(ind_pav_green,m) + & |
---|
| 3451 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
| 3452 | surf_usm_h%emissivity(ind_wat_win,m) |
---|
[2920] | 3453 | ENDDO |
---|
| 3454 | ELSE |
---|
| 3455 | l = idsidx |
---|
[2737] | 3456 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3457 | i = surf_usm_v(l)%i(m) |
---|
| 3458 | j = surf_usm_v(l)%j(m) |
---|
| 3459 | k = surf_usm_v(l)%k(m) |
---|
[2963] | 3460 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) *& |
---|
| 3461 | surf_usm_v(l)%emissivity(ind_veg_wall,m) +& |
---|
| 3462 | surf_usm_v(l)%frac(ind_pav_green,m) *& |
---|
| 3463 | surf_usm_v(l)%emissivity(ind_pav_green,m)+& |
---|
| 3464 | surf_usm_v(l)%frac(ind_wat_win,m) *& |
---|
| 3465 | surf_usm_v(l)%emissivity(ind_wat_win,m) |
---|
[2737] | 3466 | ENDDO |
---|
[2920] | 3467 | ENDIF |
---|
[2737] | 3468 | |
---|
| 3469 | CASE ( 'usm_surfwintrans' ) |
---|
| 3470 | !-- transmissivity window tiles |
---|
[2920] | 3471 | IF ( idsint == iup_u ) THEN |
---|
| 3472 | DO m = 1, surf_usm_h%ns |
---|
| 3473 | i = surf_usm_h%i(m) |
---|
| 3474 | j = surf_usm_h%j(m) |
---|
| 3475 | k = surf_usm_h%k(m) |
---|
| 3476 | temp_pf(k,j,i) = surf_usm_h%transmissivity(m) |
---|
| 3477 | ENDDO |
---|
| 3478 | ELSE |
---|
| 3479 | l = idsidx |
---|
[2737] | 3480 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3481 | i = surf_usm_v(l)%i(m) |
---|
| 3482 | j = surf_usm_v(l)%j(m) |
---|
| 3483 | k = surf_usm_v(l)%k(m) |
---|
| 3484 | temp_pf(k,j,i) = surf_usm_v(l)%transmissivity(m) |
---|
| 3485 | ENDDO |
---|
[2920] | 3486 | ENDIF |
---|
[2737] | 3487 | |
---|
[2920] | 3488 | CASE ( 'usm_skyvf' ) |
---|
| 3489 | !-- sky view factor |
---|
| 3490 | DO isurf = dirstart(ids), dirend(ids) |
---|
| 3491 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
| 3492 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvf(isurf) |
---|
| 3493 | ENDIF |
---|
[2737] | 3494 | ENDDO |
---|
[2920] | 3495 | |
---|
| 3496 | CASE ( 'usm_skyvft' ) |
---|
| 3497 | !-- sky view factor |
---|
| 3498 | DO isurf = dirstart(ids), dirend(ids) |
---|
| 3499 | IF ( surfl(id,isurf) == ids ) THEN |
---|
| 3500 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvft(isurf) |
---|
| 3501 | ENDIF |
---|
| 3502 | ENDDO |
---|
[2737] | 3503 | |
---|
| 3504 | ! |
---|
| 3505 | !-- Not adjusted so far |
---|
| 3506 | CASE ( 'usm_svf', 'usm_dif' ) |
---|
| 3507 | !-- shape view factors or iradiance factors to selected surface |
---|
| 3508 | IF ( TRIM(var)=='usm_svf' ) THEN |
---|
| 3509 | k = 1 |
---|
| 3510 | ELSE |
---|
| 3511 | k = 2 |
---|
| 3512 | ENDIF |
---|
| 3513 | DO isvf = 1, nsvfl |
---|
| 3514 | isurflt = svfsurf(1, isvf) |
---|
| 3515 | isurfs = svfsurf(2, isvf) |
---|
| 3516 | |
---|
| 3517 | IF ( surf(ix,isurfs) == is .AND. surf(iy,isurfs) == js .AND. & |
---|
[2920] | 3518 | surf(iz,isurfs) == ks .AND. surf(id,isurfs) == idsint ) THEN |
---|
[2737] | 3519 | !-- correct source surface |
---|
| 3520 | temp_pf(surfl(iz,isurflt),surfl(iy,isurflt),surfl(ix,isurflt)) = svf(k,isvf) |
---|
| 3521 | ENDIF |
---|
| 3522 | ENDDO |
---|
| 3523 | |
---|
| 3524 | CASE ( 'usm_rad_net' ) |
---|
| 3525 | !-- array of complete radiation balance |
---|
| 3526 | IF ( av == 0 ) THEN |
---|
[2920] | 3527 | IF ( idsint == iup_u ) THEN |
---|
| 3528 | DO m = 1, surf_usm_h%ns |
---|
| 3529 | i = surf_usm_h%i(m) |
---|
| 3530 | j = surf_usm_h%j(m) |
---|
| 3531 | k = surf_usm_h%k(m) |
---|
| 3532 | temp_pf(k,j,i) = surf_usm_h%rad_net_l(m) |
---|
| 3533 | ENDDO |
---|
| 3534 | ELSE |
---|
| 3535 | l = idsidx |
---|
[2737] | 3536 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3537 | i = surf_usm_v(l)%i(m) |
---|
| 3538 | j = surf_usm_v(l)%j(m) |
---|
| 3539 | k = surf_usm_v(l)%k(m) |
---|
| 3540 | temp_pf(k,j,i) = surf_usm_v(l)%rad_net_l(m) |
---|
| 3541 | ENDDO |
---|
[2920] | 3542 | ENDIF |
---|
[2737] | 3543 | ELSE |
---|
[2920] | 3544 | IF ( idsint == iup_u ) THEN |
---|
| 3545 | DO m = 1, surf_usm_h%ns |
---|
| 3546 | i = surf_usm_h%i(m) |
---|
| 3547 | j = surf_usm_h%j(m) |
---|
| 3548 | k = surf_usm_h%k(m) |
---|
| 3549 | temp_pf(k,j,i) = surf_usm_h%rad_net_av(m) |
---|
| 3550 | ENDDO |
---|
| 3551 | ELSE |
---|
| 3552 | l = idsidx |
---|
[2737] | 3553 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3554 | i = surf_usm_v(l)%i(m) |
---|
| 3555 | j = surf_usm_v(l)%j(m) |
---|
| 3556 | k = surf_usm_v(l)%k(m) |
---|
| 3557 | temp_pf(k,j,i) = surf_usm_v(l)%rad_net_av(m) |
---|
| 3558 | ENDDO |
---|
[2920] | 3559 | ENDIF |
---|
[2737] | 3560 | ENDIF |
---|
| 3561 | |
---|
| 3562 | CASE ( 'usm_rad_insw' ) |
---|
| 3563 | !-- array of sw radiation falling to surface after i-th reflection |
---|
| 3564 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3565 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3566 | IF ( av == 0 ) THEN |
---|
| 3567 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw(isurf) |
---|
| 3568 | ELSE |
---|
| 3569 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw_av(isurf) |
---|
| 3570 | ENDIF |
---|
| 3571 | ENDIF |
---|
| 3572 | ENDDO |
---|
| 3573 | |
---|
| 3574 | CASE ( 'usm_rad_inlw' ) |
---|
| 3575 | !-- array of lw radiation falling to surface after i-th reflection |
---|
| 3576 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3577 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3578 | IF ( av == 0 ) THEN |
---|
| 3579 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf) |
---|
| 3580 | ELSE |
---|
| 3581 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw_av(isurf) |
---|
| 3582 | ENDIF |
---|
| 3583 | ENDIF |
---|
| 3584 | ENDDO |
---|
| 3585 | |
---|
| 3586 | CASE ( 'usm_rad_inswdir' ) |
---|
| 3587 | !-- array of direct sw radiation falling to surface from sun |
---|
| 3588 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3589 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3590 | IF ( av == 0 ) THEN |
---|
| 3591 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir(isurf) |
---|
| 3592 | ELSE |
---|
| 3593 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir_av(isurf) |
---|
| 3594 | ENDIF |
---|
| 3595 | ENDIF |
---|
| 3596 | ENDDO |
---|
| 3597 | |
---|
| 3598 | CASE ( 'usm_rad_inswdif' ) |
---|
| 3599 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
| 3600 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3601 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3602 | IF ( av == 0 ) THEN |
---|
| 3603 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif(isurf) |
---|
| 3604 | ELSE |
---|
| 3605 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif_av(isurf) |
---|
| 3606 | ENDIF |
---|
| 3607 | ENDIF |
---|
| 3608 | ENDDO |
---|
| 3609 | |
---|
| 3610 | CASE ( 'usm_rad_inswref' ) |
---|
| 3611 | !-- array of sw radiation falling to surface from reflections |
---|
| 3612 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3613 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3614 | IF ( av == 0 ) THEN |
---|
| 3615 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = & |
---|
| 3616 | surfinsw(isurf) - surfinswdir(isurf) - surfinswdif(isurf) |
---|
| 3617 | ELSE |
---|
| 3618 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswref_av(isurf) |
---|
| 3619 | ENDIF |
---|
| 3620 | ENDIF |
---|
| 3621 | ENDDO |
---|
| 3622 | |
---|
[2920] | 3623 | CASE ( 'usm_rad_inlwdif' ) |
---|
| 3624 | !-- array of difusion lw radiation falling to surface from sky and borders of the domain |
---|
| 3625 | DO isurf = dirstart(ids), dirend(ids) |
---|
| 3626 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
| 3627 | IF ( av == 0 ) THEN |
---|
| 3628 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif(isurf) |
---|
| 3629 | ELSE |
---|
| 3630 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif_av(isurf) |
---|
| 3631 | ENDIF |
---|
| 3632 | ENDIF |
---|
| 3633 | ENDDO |
---|
| 3634 | |
---|
[2737] | 3635 | CASE ( 'usm_rad_inlwref' ) |
---|
| 3636 | !-- array of lw radiation falling to surface from reflections |
---|
| 3637 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3638 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3639 | IF ( av == 0 ) THEN |
---|
| 3640 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf) - surfinlwdif(isurf) |
---|
| 3641 | ELSE |
---|
| 3642 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwref_av(isurf) |
---|
| 3643 | ENDIF |
---|
| 3644 | ENDIF |
---|
| 3645 | ENDDO |
---|
| 3646 | |
---|
| 3647 | CASE ( 'usm_rad_outsw' ) |
---|
| 3648 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
| 3649 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3650 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3651 | IF ( av == 0 ) THEN |
---|
| 3652 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw(isurf) |
---|
| 3653 | ELSE |
---|
| 3654 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw_av(isurf) |
---|
| 3655 | ENDIF |
---|
| 3656 | ENDIF |
---|
| 3657 | ENDDO |
---|
| 3658 | |
---|
| 3659 | CASE ( 'usm_rad_outlw' ) |
---|
| 3660 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
| 3661 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3662 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3663 | IF ( av == 0 ) THEN |
---|
| 3664 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw(isurf) |
---|
| 3665 | ELSE |
---|
| 3666 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw_av(isurf) |
---|
| 3667 | ENDIF |
---|
| 3668 | ENDIF |
---|
| 3669 | ENDDO |
---|
| 3670 | |
---|
| 3671 | CASE ( 'usm_rad_ressw' ) |
---|
| 3672 | !-- average of array of residua of sw radiation absorbed in surface after last reflection |
---|
| 3673 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3674 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3675 | IF ( av == 0 ) THEN |
---|
| 3676 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins(isurf) |
---|
| 3677 | ELSE |
---|
| 3678 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins_av(isurf) |
---|
| 3679 | ENDIF |
---|
| 3680 | ENDIF |
---|
| 3681 | ENDDO |
---|
| 3682 | |
---|
| 3683 | CASE ( 'usm_rad_reslw' ) |
---|
| 3684 | !-- average of array of residua of lw radiation absorbed in surface after last reflection |
---|
| 3685 | DO isurf = dirstart(ids), dirend(ids) |
---|
[2920] | 3686 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
[2737] | 3687 | IF ( av == 0 ) THEN |
---|
| 3688 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl(isurf) |
---|
| 3689 | ELSE |
---|
| 3690 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl_av(isurf) |
---|
| 3691 | ENDIF |
---|
| 3692 | ENDIF |
---|
| 3693 | ENDDO |
---|
[3337] | 3694 | |
---|
| 3695 | CASE ( 'usm_rad_pc_inlw' ) |
---|
| 3696 | !-- array of lw radiation absorbed by plant canopy |
---|
| 3697 | DO ipcgb = 1, npcbl |
---|
| 3698 | IF ( av == 0 ) THEN |
---|
| 3699 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinlw(ipcgb) |
---|
| 3700 | ELSE |
---|
| 3701 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinlw_av(ipcgb) |
---|
| 3702 | ENDIF |
---|
| 3703 | ENDDO |
---|
| 3704 | |
---|
| 3705 | CASE ( 'usm_rad_pc_insw' ) |
---|
| 3706 | !-- array of sw radiation absorbed by plant canopy |
---|
| 3707 | DO ipcgb = 1, npcbl |
---|
| 3708 | IF ( av == 0 ) THEN |
---|
| 3709 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw(ipcgb) |
---|
| 3710 | ELSE |
---|
| 3711 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw_av(ipcgb) |
---|
| 3712 | ENDIF |
---|
| 3713 | ENDDO |
---|
| 3714 | |
---|
| 3715 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
| 3716 | !-- array of direct sw radiation absorbed by plant canopy |
---|
| 3717 | DO ipcgb = 1, npcbl |
---|
| 3718 | IF ( av == 0 ) THEN |
---|
| 3719 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdir(ipcgb) |
---|
| 3720 | ELSE |
---|
| 3721 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdir_av(ipcgb) |
---|
| 3722 | ENDIF |
---|
| 3723 | ENDDO |
---|
| 3724 | |
---|
| 3725 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
| 3726 | !-- array of diffuse sw radiation absorbed by plant canopy |
---|
| 3727 | DO ipcgb = 1, npcbl |
---|
| 3728 | IF ( av == 0 ) THEN |
---|
| 3729 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdif(ipcgb) |
---|
| 3730 | ELSE |
---|
| 3731 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdif_av(ipcgb) |
---|
| 3732 | ENDIF |
---|
| 3733 | ENDDO |
---|
| 3734 | |
---|
| 3735 | CASE ( 'usm_rad_pc_inswref' ) |
---|
| 3736 | !-- array of reflected sw radiation absorbed by plant canopy |
---|
| 3737 | DO ipcgb = 1, npcbl |
---|
| 3738 | IF ( av == 0 ) THEN |
---|
| 3739 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw(ipcgb) & |
---|
| 3740 | - pcbinswdir(ipcgb) & |
---|
| 3741 | - pcbinswdif(ipcgb) |
---|
| 3742 | ELSE |
---|
| 3743 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswref_av(ipcgb) |
---|
| 3744 | ENDIF |
---|
| 3745 | ENDDO |
---|
[2737] | 3746 | |
---|
| 3747 | CASE ( 'usm_rad_hf' ) |
---|
| 3748 | !-- array of heat flux from radiation for surfaces after all reflections |
---|
| 3749 | IF ( av == 0 ) THEN |
---|
[2920] | 3750 | IF ( idsint == iup_u ) THEN |
---|
| 3751 | DO m = 1, surf_usm_h%ns |
---|
| 3752 | i = surf_usm_h%i(m) |
---|
| 3753 | j = surf_usm_h%j(m) |
---|
| 3754 | k = surf_usm_h%k(m) |
---|
| 3755 | temp_pf(k,j,i) = surf_usm_h%surfhf(m) |
---|
| 3756 | ENDDO |
---|
| 3757 | ELSE |
---|
| 3758 | l = idsidx |
---|
[2737] | 3759 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3760 | i = surf_usm_v(l)%i(m) |
---|
| 3761 | j = surf_usm_v(l)%j(m) |
---|
| 3762 | k = surf_usm_v(l)%k(m) |
---|
| 3763 | temp_pf(k,j,i) = surf_usm_v(l)%surfhf(m) |
---|
| 3764 | ENDDO |
---|
[2920] | 3765 | ENDIF |
---|
[2737] | 3766 | ELSE |
---|
[2920] | 3767 | IF ( idsint == iup_u ) THEN |
---|
| 3768 | DO m = 1, surf_usm_h%ns |
---|
| 3769 | i = surf_usm_h%i(m) |
---|
| 3770 | j = surf_usm_h%j(m) |
---|
| 3771 | k = surf_usm_h%k(m) |
---|
| 3772 | temp_pf(k,j,i) = surf_usm_h%surfhf_av(m) |
---|
| 3773 | ENDDO |
---|
| 3774 | ELSE |
---|
| 3775 | l = idsidx |
---|
[2737] | 3776 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3777 | i = surf_usm_v(l)%i(m) |
---|
| 3778 | j = surf_usm_v(l)%j(m) |
---|
| 3779 | k = surf_usm_v(l)%k(m) |
---|
| 3780 | temp_pf(k,j,i) = surf_usm_v(l)%surfhf_av(m) |
---|
| 3781 | ENDDO |
---|
[2920] | 3782 | ENDIF |
---|
[2737] | 3783 | ENDIF |
---|
| 3784 | |
---|
| 3785 | CASE ( 'usm_wshf' ) |
---|
| 3786 | !-- array of sensible heat flux from surfaces |
---|
| 3787 | IF ( av == 0 ) THEN |
---|
[2920] | 3788 | IF ( idsint == iup_u ) THEN |
---|
| 3789 | DO m = 1, surf_usm_h%ns |
---|
| 3790 | i = surf_usm_h%i(m) |
---|
| 3791 | j = surf_usm_h%j(m) |
---|
| 3792 | k = surf_usm_h%k(m) |
---|
| 3793 | temp_pf(k,j,i) = surf_usm_h%wshf_eb(m) |
---|
| 3794 | ENDDO |
---|
| 3795 | ELSE |
---|
| 3796 | l = idsidx |
---|
[2737] | 3797 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3798 | i = surf_usm_v(l)%i(m) |
---|
| 3799 | j = surf_usm_v(l)%j(m) |
---|
| 3800 | k = surf_usm_v(l)%k(m) |
---|
| 3801 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb(m) |
---|
| 3802 | ENDDO |
---|
[2920] | 3803 | ENDIF |
---|
[2737] | 3804 | ELSE |
---|
[2920] | 3805 | IF ( idsint == iup_u ) THEN |
---|
| 3806 | DO m = 1, surf_usm_h%ns |
---|
| 3807 | i = surf_usm_h%i(m) |
---|
| 3808 | j = surf_usm_h%j(m) |
---|
| 3809 | k = surf_usm_h%k(m) |
---|
| 3810 | temp_pf(k,j,i) = surf_usm_h%wshf_eb_av(m) |
---|
| 3811 | ENDDO |
---|
| 3812 | ELSE |
---|
| 3813 | l = idsidx |
---|
[2737] | 3814 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3815 | i = surf_usm_v(l)%i(m) |
---|
| 3816 | j = surf_usm_v(l)%j(m) |
---|
| 3817 | k = surf_usm_v(l)%k(m) |
---|
| 3818 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb_av(m) |
---|
| 3819 | ENDDO |
---|
[2920] | 3820 | ENDIF |
---|
[2737] | 3821 | ENDIF |
---|
[3418] | 3822 | |
---|
| 3823 | |
---|
| 3824 | CASE ( 'usm_qsws' ) |
---|
| 3825 | !-- array of latent heat flux from surfaces |
---|
| 3826 | IF ( av == 0 ) THEN |
---|
| 3827 | IF ( idsint == iup_u ) THEN |
---|
| 3828 | DO m = 1, surf_usm_h%ns |
---|
| 3829 | i = surf_usm_h%i(m) |
---|
| 3830 | j = surf_usm_h%j(m) |
---|
| 3831 | k = surf_usm_h%k(m) |
---|
| 3832 | temp_pf(k,j,i) = surf_usm_h%qsws_eb(m) |
---|
| 3833 | ENDDO |
---|
| 3834 | ELSE |
---|
| 3835 | l = idsidx |
---|
| 3836 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3837 | i = surf_usm_v(l)%i(m) |
---|
| 3838 | j = surf_usm_v(l)%j(m) |
---|
| 3839 | k = surf_usm_v(l)%k(m) |
---|
| 3840 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb(m) |
---|
| 3841 | ENDDO |
---|
| 3842 | ENDIF |
---|
| 3843 | ELSE |
---|
| 3844 | IF ( idsint == iup_u ) THEN |
---|
| 3845 | DO m = 1, surf_usm_h%ns |
---|
| 3846 | i = surf_usm_h%i(m) |
---|
| 3847 | j = surf_usm_h%j(m) |
---|
| 3848 | k = surf_usm_h%k(m) |
---|
| 3849 | temp_pf(k,j,i) = surf_usm_h%qsws_eb_av(m) |
---|
| 3850 | ENDDO |
---|
| 3851 | ELSE |
---|
| 3852 | l = idsidx |
---|
| 3853 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3854 | i = surf_usm_v(l)%i(m) |
---|
| 3855 | j = surf_usm_v(l)%j(m) |
---|
| 3856 | k = surf_usm_v(l)%k(m) |
---|
| 3857 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb_av(m) |
---|
| 3858 | ENDDO |
---|
| 3859 | ENDIF |
---|
| 3860 | ENDIF |
---|
| 3861 | |
---|
| 3862 | CASE ( 'usm_qsws_veg' ) |
---|
| 3863 | !-- array of latent heat flux from vegetation surfaces |
---|
| 3864 | IF ( av == 0 ) THEN |
---|
| 3865 | IF ( idsint == iup_u ) THEN |
---|
| 3866 | DO m = 1, surf_usm_h%ns |
---|
| 3867 | i = surf_usm_h%i(m) |
---|
| 3868 | j = surf_usm_h%j(m) |
---|
| 3869 | k = surf_usm_h%k(m) |
---|
| 3870 | temp_pf(k,j,i) = surf_usm_h%qsws_veg_eb(m) |
---|
| 3871 | ENDDO |
---|
| 3872 | ELSE |
---|
| 3873 | l = idsidx |
---|
| 3874 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3875 | i = surf_usm_v(l)%i(m) |
---|
| 3876 | j = surf_usm_v(l)%j(m) |
---|
| 3877 | k = surf_usm_v(l)%k(m) |
---|
| 3878 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_eb(m) |
---|
| 3879 | ENDDO |
---|
| 3880 | ENDIF |
---|
| 3881 | ELSE |
---|
| 3882 | IF ( idsint == iup_u ) THEN |
---|
| 3883 | DO m = 1, surf_usm_h%ns |
---|
| 3884 | i = surf_usm_h%i(m) |
---|
| 3885 | j = surf_usm_h%j(m) |
---|
| 3886 | k = surf_usm_h%k(m) |
---|
| 3887 | temp_pf(k,j,i) = surf_usm_h%qsws_veg_eb_av(m) |
---|
| 3888 | ENDDO |
---|
| 3889 | ELSE |
---|
| 3890 | l = idsidx |
---|
| 3891 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3892 | i = surf_usm_v(l)%i(m) |
---|
| 3893 | j = surf_usm_v(l)%j(m) |
---|
| 3894 | k = surf_usm_v(l)%k(m) |
---|
| 3895 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_eb_av(m) |
---|
| 3896 | ENDDO |
---|
| 3897 | ENDIF |
---|
| 3898 | ENDIF |
---|
| 3899 | |
---|
| 3900 | CASE ( 'usm_qsws_liq' ) |
---|
| 3901 | !-- array of latent heat flux from surfaces with liquid |
---|
| 3902 | IF ( av == 0 ) THEN |
---|
| 3903 | IF ( idsint == iup_u ) THEN |
---|
| 3904 | DO m = 1, surf_usm_h%ns |
---|
| 3905 | i = surf_usm_h%i(m) |
---|
| 3906 | j = surf_usm_h%j(m) |
---|
| 3907 | k = surf_usm_h%k(m) |
---|
| 3908 | temp_pf(k,j,i) = surf_usm_h%qsws_liq_eb(m) |
---|
| 3909 | ENDDO |
---|
| 3910 | ELSE |
---|
| 3911 | l = idsidx |
---|
| 3912 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3913 | i = surf_usm_v(l)%i(m) |
---|
| 3914 | j = surf_usm_v(l)%j(m) |
---|
| 3915 | k = surf_usm_v(l)%k(m) |
---|
| 3916 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_eb(m) |
---|
| 3917 | ENDDO |
---|
| 3918 | ENDIF |
---|
| 3919 | ELSE |
---|
| 3920 | IF ( idsint == iup_u ) THEN |
---|
| 3921 | DO m = 1, surf_usm_h%ns |
---|
| 3922 | i = surf_usm_h%i(m) |
---|
| 3923 | j = surf_usm_h%j(m) |
---|
| 3924 | k = surf_usm_h%k(m) |
---|
| 3925 | temp_pf(k,j,i) = surf_usm_h%qsws_liq_eb_av(m) |
---|
| 3926 | ENDDO |
---|
| 3927 | ELSE |
---|
| 3928 | l = idsidx |
---|
| 3929 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3930 | i = surf_usm_v(l)%i(m) |
---|
| 3931 | j = surf_usm_v(l)%j(m) |
---|
| 3932 | k = surf_usm_v(l)%k(m) |
---|
| 3933 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_eb_av(m) |
---|
| 3934 | ENDDO |
---|
| 3935 | ENDIF |
---|
| 3936 | ENDIF |
---|
[2737] | 3937 | |
---|
| 3938 | |
---|
[3418] | 3939 | |
---|
| 3940 | |
---|
[2737] | 3941 | CASE ( 'usm_wghf' ) |
---|
| 3942 | !-- array of heat flux from ground (land, wall, roof) |
---|
| 3943 | IF ( av == 0 ) THEN |
---|
[2920] | 3944 | IF ( idsint == iup_u ) THEN |
---|
| 3945 | DO m = 1, surf_usm_h%ns |
---|
| 3946 | i = surf_usm_h%i(m) |
---|
| 3947 | j = surf_usm_h%j(m) |
---|
| 3948 | k = surf_usm_h%k(m) |
---|
| 3949 | temp_pf(k,j,i) = surf_usm_h%wghf_eb(m) |
---|
| 3950 | ENDDO |
---|
| 3951 | ELSE |
---|
| 3952 | l = idsidx |
---|
[2737] | 3953 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3954 | i = surf_usm_v(l)%i(m) |
---|
| 3955 | j = surf_usm_v(l)%j(m) |
---|
| 3956 | k = surf_usm_v(l)%k(m) |
---|
| 3957 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb(m) |
---|
| 3958 | ENDDO |
---|
[2920] | 3959 | ENDIF |
---|
[2737] | 3960 | ELSE |
---|
[2920] | 3961 | IF ( idsint == iup_u ) THEN |
---|
| 3962 | DO m = 1, surf_usm_h%ns |
---|
| 3963 | i = surf_usm_h%i(m) |
---|
| 3964 | j = surf_usm_h%j(m) |
---|
| 3965 | k = surf_usm_h%k(m) |
---|
| 3966 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_av(m) |
---|
| 3967 | ENDDO |
---|
| 3968 | ELSE |
---|
| 3969 | l = idsidx |
---|
[2737] | 3970 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3971 | i = surf_usm_v(l)%i(m) |
---|
| 3972 | j = surf_usm_v(l)%j(m) |
---|
| 3973 | k = surf_usm_v(l)%k(m) |
---|
| 3974 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_av(m) |
---|
| 3975 | ENDDO |
---|
[2920] | 3976 | ENDIF |
---|
[2737] | 3977 | ENDIF |
---|
| 3978 | |
---|
| 3979 | CASE ( 'usm_wghf_window' ) |
---|
| 3980 | !-- array of heat flux from window ground (land, wall, roof) |
---|
| 3981 | |
---|
| 3982 | IF ( av == 0 ) THEN |
---|
[2920] | 3983 | IF ( idsint == iup_u ) THEN |
---|
| 3984 | DO m = 1, surf_usm_h%ns |
---|
| 3985 | i = surf_usm_h%i(m) |
---|
| 3986 | j = surf_usm_h%j(m) |
---|
| 3987 | k = surf_usm_h%k(m) |
---|
| 3988 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window(m) |
---|
| 3989 | ENDDO |
---|
| 3990 | ELSE |
---|
| 3991 | l = idsidx |
---|
[2737] | 3992 | DO m = 1, surf_usm_v(l)%ns |
---|
| 3993 | i = surf_usm_v(l)%i(m) |
---|
| 3994 | j = surf_usm_v(l)%j(m) |
---|
| 3995 | k = surf_usm_v(l)%k(m) |
---|
| 3996 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window(m) |
---|
| 3997 | ENDDO |
---|
[2920] | 3998 | ENDIF |
---|
[2737] | 3999 | ELSE |
---|
[2920] | 4000 | IF ( idsint == iup_u ) THEN |
---|
| 4001 | DO m = 1, surf_usm_h%ns |
---|
| 4002 | i = surf_usm_h%i(m) |
---|
| 4003 | j = surf_usm_h%j(m) |
---|
| 4004 | k = surf_usm_h%k(m) |
---|
| 4005 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window_av(m) |
---|
| 4006 | ENDDO |
---|
| 4007 | ELSE |
---|
| 4008 | l = idsidx |
---|
[2737] | 4009 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4010 | i = surf_usm_v(l)%i(m) |
---|
| 4011 | j = surf_usm_v(l)%j(m) |
---|
| 4012 | k = surf_usm_v(l)%k(m) |
---|
| 4013 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window_av(m) |
---|
| 4014 | ENDDO |
---|
[2920] | 4015 | ENDIF |
---|
[2737] | 4016 | ENDIF |
---|
| 4017 | |
---|
| 4018 | CASE ( 'usm_wghf_green' ) |
---|
| 4019 | !-- array of heat flux from green ground (land, wall, roof) |
---|
| 4020 | |
---|
| 4021 | IF ( av == 0 ) THEN |
---|
[2920] | 4022 | IF ( idsint == iup_u ) THEN |
---|
| 4023 | DO m = 1, surf_usm_h%ns |
---|
| 4024 | i = surf_usm_h%i(m) |
---|
| 4025 | j = surf_usm_h%j(m) |
---|
| 4026 | k = surf_usm_h%k(m) |
---|
| 4027 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green(m) |
---|
| 4028 | ENDDO |
---|
| 4029 | ELSE |
---|
| 4030 | l = idsidx |
---|
[2737] | 4031 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4032 | i = surf_usm_v(l)%i(m) |
---|
| 4033 | j = surf_usm_v(l)%j(m) |
---|
| 4034 | k = surf_usm_v(l)%k(m) |
---|
| 4035 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green(m) |
---|
| 4036 | ENDDO |
---|
[2920] | 4037 | ENDIF |
---|
[2737] | 4038 | ELSE |
---|
[2920] | 4039 | IF ( idsint == iup_u ) THEN |
---|
| 4040 | DO m = 1, surf_usm_h%ns |
---|
| 4041 | i = surf_usm_h%i(m) |
---|
| 4042 | j = surf_usm_h%j(m) |
---|
| 4043 | k = surf_usm_h%k(m) |
---|
| 4044 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green_av(m) |
---|
| 4045 | ENDDO |
---|
| 4046 | ELSE |
---|
| 4047 | l = idsidx |
---|
[2737] | 4048 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4049 | i = surf_usm_v(l)%i(m) |
---|
| 4050 | j = surf_usm_v(l)%j(m) |
---|
| 4051 | k = surf_usm_v(l)%k(m) |
---|
| 4052 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green_av(m) |
---|
| 4053 | ENDDO |
---|
[2920] | 4054 | ENDIF |
---|
[2737] | 4055 | ENDIF |
---|
| 4056 | |
---|
| 4057 | CASE ( 'usm_iwghf' ) |
---|
| 4058 | !-- array of heat flux from indoor ground (land, wall, roof) |
---|
| 4059 | IF ( av == 0 ) THEN |
---|
[2920] | 4060 | IF ( idsint == iup_u ) THEN |
---|
| 4061 | DO m = 1, surf_usm_h%ns |
---|
| 4062 | i = surf_usm_h%i(m) |
---|
| 4063 | j = surf_usm_h%j(m) |
---|
| 4064 | k = surf_usm_h%k(m) |
---|
| 4065 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb(m) |
---|
| 4066 | ENDDO |
---|
| 4067 | ELSE |
---|
| 4068 | l = idsidx |
---|
[2737] | 4069 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4070 | i = surf_usm_v(l)%i(m) |
---|
| 4071 | j = surf_usm_v(l)%j(m) |
---|
| 4072 | k = surf_usm_v(l)%k(m) |
---|
| 4073 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb(m) |
---|
| 4074 | ENDDO |
---|
[2920] | 4075 | ENDIF |
---|
[2737] | 4076 | ELSE |
---|
[2920] | 4077 | IF ( idsint == iup_u ) THEN |
---|
| 4078 | DO m = 1, surf_usm_h%ns |
---|
| 4079 | i = surf_usm_h%i(m) |
---|
| 4080 | j = surf_usm_h%j(m) |
---|
| 4081 | k = surf_usm_h%k(m) |
---|
| 4082 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_av(m) |
---|
| 4083 | ENDDO |
---|
| 4084 | ELSE |
---|
| 4085 | l = idsidx |
---|
[2737] | 4086 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4087 | i = surf_usm_v(l)%i(m) |
---|
| 4088 | j = surf_usm_v(l)%j(m) |
---|
| 4089 | k = surf_usm_v(l)%k(m) |
---|
| 4090 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_av(m) |
---|
| 4091 | ENDDO |
---|
[2920] | 4092 | ENDIF |
---|
[2737] | 4093 | ENDIF |
---|
| 4094 | |
---|
| 4095 | CASE ( 'usm_iwghf_window' ) |
---|
| 4096 | !-- array of heat flux from indoor window ground (land, wall, roof) |
---|
| 4097 | |
---|
| 4098 | IF ( av == 0 ) THEN |
---|
[2920] | 4099 | IF ( idsint == iup_u ) THEN |
---|
| 4100 | DO m = 1, surf_usm_h%ns |
---|
| 4101 | i = surf_usm_h%i(m) |
---|
| 4102 | j = surf_usm_h%j(m) |
---|
| 4103 | k = surf_usm_h%k(m) |
---|
| 4104 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window(m) |
---|
| 4105 | ENDDO |
---|
| 4106 | ELSE |
---|
| 4107 | l = idsidx |
---|
[2737] | 4108 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4109 | i = surf_usm_v(l)%i(m) |
---|
| 4110 | j = surf_usm_v(l)%j(m) |
---|
| 4111 | k = surf_usm_v(l)%k(m) |
---|
| 4112 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window(m) |
---|
| 4113 | ENDDO |
---|
[2920] | 4114 | ENDIF |
---|
[2737] | 4115 | ELSE |
---|
[2920] | 4116 | IF ( idsint == iup_u ) THEN |
---|
| 4117 | DO m = 1, surf_usm_h%ns |
---|
| 4118 | i = surf_usm_h%i(m) |
---|
| 4119 | j = surf_usm_h%j(m) |
---|
| 4120 | k = surf_usm_h%k(m) |
---|
| 4121 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window_av(m) |
---|
| 4122 | ENDDO |
---|
| 4123 | ELSE |
---|
| 4124 | l = idsidx |
---|
[2737] | 4125 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4126 | i = surf_usm_v(l)%i(m) |
---|
| 4127 | j = surf_usm_v(l)%j(m) |
---|
| 4128 | k = surf_usm_v(l)%k(m) |
---|
| 4129 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window_av(m) |
---|
| 4130 | ENDDO |
---|
[2920] | 4131 | ENDIF |
---|
[2737] | 4132 | ENDIF |
---|
| 4133 | |
---|
[3418] | 4134 | CASE ( 'usm_t_surf_wall' ) |
---|
[2737] | 4135 | !-- surface temperature for surfaces |
---|
| 4136 | IF ( av == 0 ) THEN |
---|
[2920] | 4137 | IF ( idsint == iup_u ) THEN |
---|
| 4138 | DO m = 1, surf_usm_h%ns |
---|
| 4139 | i = surf_usm_h%i(m) |
---|
| 4140 | j = surf_usm_h%j(m) |
---|
| 4141 | k = surf_usm_h%k(m) |
---|
[3418] | 4142 | temp_pf(k,j,i) = t_surf_wall_h(m) |
---|
[2920] | 4143 | ENDDO |
---|
| 4144 | ELSE |
---|
| 4145 | l = idsidx |
---|
[2737] | 4146 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4147 | i = surf_usm_v(l)%i(m) |
---|
| 4148 | j = surf_usm_v(l)%j(m) |
---|
| 4149 | k = surf_usm_v(l)%k(m) |
---|
[3418] | 4150 | temp_pf(k,j,i) = t_surf_wall_v(l)%t(m) |
---|
[2737] | 4151 | ENDDO |
---|
[2920] | 4152 | ENDIF |
---|
[2737] | 4153 | ELSE |
---|
[2920] | 4154 | IF ( idsint == iup_u ) THEN |
---|
| 4155 | DO m = 1, surf_usm_h%ns |
---|
| 4156 | i = surf_usm_h%i(m) |
---|
| 4157 | j = surf_usm_h%j(m) |
---|
| 4158 | k = surf_usm_h%k(m) |
---|
[3418] | 4159 | temp_pf(k,j,i) = surf_usm_h%t_surf_wall_av(m) |
---|
[2920] | 4160 | ENDDO |
---|
| 4161 | ELSE |
---|
| 4162 | l = idsidx |
---|
[2737] | 4163 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4164 | i = surf_usm_v(l)%i(m) |
---|
| 4165 | j = surf_usm_v(l)%j(m) |
---|
| 4166 | k = surf_usm_v(l)%k(m) |
---|
[3418] | 4167 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_wall_av(m) |
---|
[2737] | 4168 | ENDDO |
---|
[2920] | 4169 | ENDIF |
---|
[2737] | 4170 | ENDIF |
---|
| 4171 | |
---|
| 4172 | CASE ( 'usm_t_surf_window' ) |
---|
| 4173 | !-- surface temperature for window surfaces |
---|
| 4174 | |
---|
| 4175 | IF ( av == 0 ) THEN |
---|
[2920] | 4176 | IF ( idsint == iup_u ) THEN |
---|
| 4177 | DO m = 1, surf_usm_h%ns |
---|
| 4178 | i = surf_usm_h%i(m) |
---|
| 4179 | j = surf_usm_h%j(m) |
---|
| 4180 | k = surf_usm_h%k(m) |
---|
| 4181 | temp_pf(k,j,i) = t_surf_window_h(m) |
---|
| 4182 | ENDDO |
---|
| 4183 | ELSE |
---|
| 4184 | l = idsidx |
---|
[2737] | 4185 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4186 | i = surf_usm_v(l)%i(m) |
---|
| 4187 | j = surf_usm_v(l)%j(m) |
---|
| 4188 | k = surf_usm_v(l)%k(m) |
---|
| 4189 | temp_pf(k,j,i) = t_surf_window_v(l)%t(m) |
---|
| 4190 | ENDDO |
---|
[2920] | 4191 | ENDIF |
---|
[2737] | 4192 | |
---|
| 4193 | ELSE |
---|
[2920] | 4194 | IF ( idsint == iup_u ) THEN |
---|
| 4195 | DO m = 1, surf_usm_h%ns |
---|
| 4196 | i = surf_usm_h%i(m) |
---|
| 4197 | j = surf_usm_h%j(m) |
---|
| 4198 | k = surf_usm_h%k(m) |
---|
| 4199 | temp_pf(k,j,i) = surf_usm_h%t_surf_window_av(m) |
---|
| 4200 | ENDDO |
---|
| 4201 | ELSE |
---|
| 4202 | l = idsidx |
---|
[2737] | 4203 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4204 | i = surf_usm_v(l)%i(m) |
---|
| 4205 | j = surf_usm_v(l)%j(m) |
---|
| 4206 | k = surf_usm_v(l)%k(m) |
---|
| 4207 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_window_av(m) |
---|
| 4208 | ENDDO |
---|
| 4209 | |
---|
[2920] | 4210 | ENDIF |
---|
[2737] | 4211 | |
---|
| 4212 | ENDIF |
---|
| 4213 | |
---|
| 4214 | CASE ( 'usm_t_surf_green' ) |
---|
| 4215 | !-- surface temperature for green surfaces |
---|
| 4216 | |
---|
| 4217 | IF ( av == 0 ) THEN |
---|
[2920] | 4218 | IF ( idsint == iup_u ) THEN |
---|
| 4219 | DO m = 1, surf_usm_h%ns |
---|
| 4220 | i = surf_usm_h%i(m) |
---|
| 4221 | j = surf_usm_h%j(m) |
---|
| 4222 | k = surf_usm_h%k(m) |
---|
| 4223 | temp_pf(k,j,i) = t_surf_green_h(m) |
---|
| 4224 | ENDDO |
---|
| 4225 | ELSE |
---|
| 4226 | l = idsidx |
---|
[2737] | 4227 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4228 | i = surf_usm_v(l)%i(m) |
---|
| 4229 | j = surf_usm_v(l)%j(m) |
---|
| 4230 | k = surf_usm_v(l)%k(m) |
---|
| 4231 | temp_pf(k,j,i) = t_surf_green_v(l)%t(m) |
---|
| 4232 | ENDDO |
---|
[2920] | 4233 | ENDIF |
---|
[2737] | 4234 | |
---|
| 4235 | ELSE |
---|
[2920] | 4236 | IF ( idsint == iup_u ) THEN |
---|
| 4237 | DO m = 1, surf_usm_h%ns |
---|
| 4238 | i = surf_usm_h%i(m) |
---|
| 4239 | j = surf_usm_h%j(m) |
---|
| 4240 | k = surf_usm_h%k(m) |
---|
| 4241 | temp_pf(k,j,i) = surf_usm_h%t_surf_green_av(m) |
---|
| 4242 | ENDDO |
---|
| 4243 | ELSE |
---|
| 4244 | l = idsidx |
---|
[2737] | 4245 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4246 | i = surf_usm_v(l)%i(m) |
---|
| 4247 | j = surf_usm_v(l)%j(m) |
---|
| 4248 | k = surf_usm_v(l)%k(m) |
---|
| 4249 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_green_av(m) |
---|
| 4250 | ENDDO |
---|
| 4251 | |
---|
[2920] | 4252 | ENDIF |
---|
[2737] | 4253 | |
---|
| 4254 | ENDIF |
---|
| 4255 | |
---|
| 4256 | CASE ( 'usm_t_surf_10cm' ) |
---|
| 4257 | !-- near surface temperature for whole surfaces |
---|
| 4258 | |
---|
| 4259 | IF ( av == 0 ) THEN |
---|
[2920] | 4260 | IF ( idsint == iup_u ) THEN |
---|
| 4261 | DO m = 1, surf_usm_h%ns |
---|
| 4262 | i = surf_usm_h%i(m) |
---|
| 4263 | j = surf_usm_h%j(m) |
---|
| 4264 | k = surf_usm_h%k(m) |
---|
| 4265 | temp_pf(k,j,i) = t_surf_10cm_h(m) |
---|
| 4266 | ENDDO |
---|
| 4267 | ELSE |
---|
| 4268 | l = idsidx |
---|
[2737] | 4269 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4270 | i = surf_usm_v(l)%i(m) |
---|
| 4271 | j = surf_usm_v(l)%j(m) |
---|
| 4272 | k = surf_usm_v(l)%k(m) |
---|
| 4273 | temp_pf(k,j,i) = t_surf_10cm_v(l)%t(m) |
---|
| 4274 | ENDDO |
---|
[2920] | 4275 | ENDIF |
---|
[2737] | 4276 | |
---|
| 4277 | ELSE |
---|
[2920] | 4278 | IF ( idsint == iup_u ) THEN |
---|
| 4279 | DO m = 1, surf_usm_h%ns |
---|
| 4280 | i = surf_usm_h%i(m) |
---|
| 4281 | j = surf_usm_h%j(m) |
---|
| 4282 | k = surf_usm_h%k(m) |
---|
| 4283 | temp_pf(k,j,i) = surf_usm_h%t_surf_10cm_av(m) |
---|
| 4284 | ENDDO |
---|
| 4285 | ELSE |
---|
| 4286 | l = idsidx |
---|
[2737] | 4287 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4288 | i = surf_usm_v(l)%i(m) |
---|
| 4289 | j = surf_usm_v(l)%j(m) |
---|
| 4290 | k = surf_usm_v(l)%k(m) |
---|
| 4291 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_10cm_av(m) |
---|
| 4292 | ENDDO |
---|
| 4293 | |
---|
[2920] | 4294 | ENDIF |
---|
[2737] | 4295 | |
---|
| 4296 | ENDIF |
---|
| 4297 | |
---|
| 4298 | |
---|
| 4299 | CASE ( 'usm_t_wall' ) |
---|
| 4300 | !-- wall temperature for iwl layer of walls and land |
---|
| 4301 | IF ( av == 0 ) THEN |
---|
[2920] | 4302 | IF ( idsint == iup_u ) THEN |
---|
| 4303 | DO m = 1, surf_usm_h%ns |
---|
| 4304 | i = surf_usm_h%i(m) |
---|
| 4305 | j = surf_usm_h%j(m) |
---|
| 4306 | k = surf_usm_h%k(m) |
---|
| 4307 | temp_pf(k,j,i) = t_wall_h(iwl,m) |
---|
| 4308 | ENDDO |
---|
| 4309 | ELSE |
---|
| 4310 | l = idsidx |
---|
[2737] | 4311 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4312 | i = surf_usm_v(l)%i(m) |
---|
| 4313 | j = surf_usm_v(l)%j(m) |
---|
| 4314 | k = surf_usm_v(l)%k(m) |
---|
| 4315 | temp_pf(k,j,i) = t_wall_v(l)%t(iwl,m) |
---|
| 4316 | ENDDO |
---|
[2920] | 4317 | ENDIF |
---|
[2737] | 4318 | ELSE |
---|
[2920] | 4319 | IF ( idsint == iup_u ) THEN |
---|
| 4320 | DO m = 1, surf_usm_h%ns |
---|
| 4321 | i = surf_usm_h%i(m) |
---|
| 4322 | j = surf_usm_h%j(m) |
---|
| 4323 | k = surf_usm_h%k(m) |
---|
| 4324 | temp_pf(k,j,i) = surf_usm_h%t_wall_av(iwl,m) |
---|
| 4325 | ENDDO |
---|
| 4326 | ELSE |
---|
| 4327 | l = idsidx |
---|
[2737] | 4328 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4329 | i = surf_usm_v(l)%i(m) |
---|
| 4330 | j = surf_usm_v(l)%j(m) |
---|
| 4331 | k = surf_usm_v(l)%k(m) |
---|
| 4332 | temp_pf(k,j,i) = surf_usm_v(l)%t_wall_av(iwl,m) |
---|
| 4333 | ENDDO |
---|
[2920] | 4334 | ENDIF |
---|
[2737] | 4335 | ENDIF |
---|
| 4336 | |
---|
| 4337 | CASE ( 'usm_t_window' ) |
---|
| 4338 | !-- window temperature for iwl layer of walls and land |
---|
| 4339 | IF ( av == 0 ) THEN |
---|
[2920] | 4340 | IF ( idsint == iup_u ) THEN |
---|
| 4341 | DO m = 1, surf_usm_h%ns |
---|
| 4342 | i = surf_usm_h%i(m) |
---|
| 4343 | j = surf_usm_h%j(m) |
---|
| 4344 | k = surf_usm_h%k(m) |
---|
| 4345 | temp_pf(k,j,i) = t_window_h(iwl,m) |
---|
| 4346 | ENDDO |
---|
| 4347 | ELSE |
---|
| 4348 | l = idsidx |
---|
[2737] | 4349 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4350 | i = surf_usm_v(l)%i(m) |
---|
| 4351 | j = surf_usm_v(l)%j(m) |
---|
| 4352 | k = surf_usm_v(l)%k(m) |
---|
| 4353 | temp_pf(k,j,i) = t_window_v(l)%t(iwl,m) |
---|
| 4354 | ENDDO |
---|
[2920] | 4355 | ENDIF |
---|
[2737] | 4356 | ELSE |
---|
[2920] | 4357 | IF ( idsint == iup_u ) THEN |
---|
| 4358 | DO m = 1, surf_usm_h%ns |
---|
| 4359 | i = surf_usm_h%i(m) |
---|
| 4360 | j = surf_usm_h%j(m) |
---|
| 4361 | k = surf_usm_h%k(m) |
---|
| 4362 | temp_pf(k,j,i) = surf_usm_h%t_window_av(iwl,m) |
---|
| 4363 | ENDDO |
---|
| 4364 | ELSE |
---|
| 4365 | l = idsidx |
---|
[2737] | 4366 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4367 | i = surf_usm_v(l)%i(m) |
---|
| 4368 | j = surf_usm_v(l)%j(m) |
---|
| 4369 | k = surf_usm_v(l)%k(m) |
---|
| 4370 | temp_pf(k,j,i) = surf_usm_v(l)%t_window_av(iwl,m) |
---|
| 4371 | ENDDO |
---|
[2920] | 4372 | ENDIF |
---|
[2737] | 4373 | ENDIF |
---|
| 4374 | |
---|
| 4375 | CASE ( 'usm_t_green' ) |
---|
| 4376 | !-- green temperature for iwl layer of walls and land |
---|
| 4377 | IF ( av == 0 ) THEN |
---|
[2920] | 4378 | IF ( idsint == iup_u ) THEN |
---|
| 4379 | DO m = 1, surf_usm_h%ns |
---|
| 4380 | i = surf_usm_h%i(m) |
---|
| 4381 | j = surf_usm_h%j(m) |
---|
| 4382 | k = surf_usm_h%k(m) |
---|
| 4383 | temp_pf(k,j,i) = t_green_h(iwl,m) |
---|
| 4384 | ENDDO |
---|
| 4385 | ELSE |
---|
| 4386 | l = idsidx |
---|
[2737] | 4387 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4388 | i = surf_usm_v(l)%i(m) |
---|
| 4389 | j = surf_usm_v(l)%j(m) |
---|
| 4390 | k = surf_usm_v(l)%k(m) |
---|
| 4391 | temp_pf(k,j,i) = t_green_v(l)%t(iwl,m) |
---|
| 4392 | ENDDO |
---|
[2920] | 4393 | ENDIF |
---|
[2737] | 4394 | ELSE |
---|
[2920] | 4395 | IF ( idsint == iup_u ) THEN |
---|
| 4396 | DO m = 1, surf_usm_h%ns |
---|
| 4397 | i = surf_usm_h%i(m) |
---|
| 4398 | j = surf_usm_h%j(m) |
---|
| 4399 | k = surf_usm_h%k(m) |
---|
| 4400 | temp_pf(k,j,i) = surf_usm_h%t_green_av(iwl,m) |
---|
| 4401 | ENDDO |
---|
| 4402 | ELSE |
---|
| 4403 | l = idsidx |
---|
[2737] | 4404 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4405 | i = surf_usm_v(l)%i(m) |
---|
| 4406 | j = surf_usm_v(l)%j(m) |
---|
| 4407 | k = surf_usm_v(l)%k(m) |
---|
| 4408 | temp_pf(k,j,i) = surf_usm_v(l)%t_green_av(iwl,m) |
---|
| 4409 | ENDDO |
---|
[2920] | 4410 | ENDIF |
---|
[2737] | 4411 | ENDIF |
---|
[3418] | 4412 | |
---|
| 4413 | CASE ( 'usm_swc' ) |
---|
| 4414 | !-- soil water content for iwl layer of walls and land |
---|
| 4415 | IF ( av == 0 ) THEN |
---|
| 4416 | IF ( idsint == iup_u ) THEN |
---|
| 4417 | DO m = 1, surf_usm_h%ns |
---|
| 4418 | i = surf_usm_h%i(m) |
---|
| 4419 | j = surf_usm_h%j(m) |
---|
| 4420 | k = surf_usm_h%k(m) |
---|
| 4421 | temp_pf(k,j,i) = swc_h(iwl,m) |
---|
| 4422 | ENDDO |
---|
| 4423 | ELSE |
---|
| 4424 | l = idsidx |
---|
| 4425 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4426 | i = surf_usm_v(l)%i(m) |
---|
| 4427 | j = surf_usm_v(l)%j(m) |
---|
| 4428 | k = surf_usm_v(l)%k(m) |
---|
| 4429 | temp_pf(k,j,i) = swc_v(l)%t(iwl,m) |
---|
| 4430 | ENDDO |
---|
| 4431 | ENDIF |
---|
| 4432 | ELSE |
---|
| 4433 | IF ( idsint == iup_u ) THEN |
---|
| 4434 | DO m = 1, surf_usm_h%ns |
---|
| 4435 | i = surf_usm_h%i(m) |
---|
| 4436 | j = surf_usm_h%j(m) |
---|
| 4437 | k = surf_usm_h%k(m) |
---|
| 4438 | temp_pf(k,j,i) = surf_usm_h%swc_av(iwl,m) |
---|
| 4439 | ENDDO |
---|
| 4440 | ELSE |
---|
| 4441 | l = idsidx |
---|
| 4442 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4443 | i = surf_usm_v(l)%i(m) |
---|
| 4444 | j = surf_usm_v(l)%j(m) |
---|
| 4445 | k = surf_usm_v(l)%k(m) |
---|
| 4446 | temp_pf(k,j,i) = surf_usm_v(l)%swc_av(iwl,m) |
---|
| 4447 | ENDDO |
---|
| 4448 | ENDIF |
---|
| 4449 | ENDIF |
---|
[2737] | 4450 | |
---|
| 4451 | |
---|
| 4452 | CASE DEFAULT |
---|
| 4453 | found = .FALSE. |
---|
[3337] | 4454 | RETURN |
---|
[2737] | 4455 | END SELECT |
---|
| 4456 | |
---|
| 4457 | ! |
---|
| 4458 | !-- Rearrange dimensions for NetCDF output |
---|
[2920] | 4459 | !-- FIXME: this may generate FPE overflow upon conversion from DP to SP |
---|
[2737] | 4460 | DO j = nys, nyn |
---|
| 4461 | DO i = nxl, nxr |
---|
| 4462 | DO k = nzb_do, nzt_do |
---|
| 4463 | local_pf(i,j,k) = temp_pf(k,j,i) |
---|
| 4464 | ENDDO |
---|
| 4465 | ENDDO |
---|
| 4466 | ENDDO |
---|
| 4467 | |
---|
| 4468 | END SUBROUTINE usm_data_output_3d |
---|
| 4469 | |
---|
| 4470 | |
---|
| 4471 | !------------------------------------------------------------------------------! |
---|
| 4472 | ! |
---|
| 4473 | ! Description: |
---|
| 4474 | ! ------------ |
---|
| 4475 | !> Soubroutine defines appropriate grid for netcdf variables. |
---|
| 4476 | !> It is called out from subroutine netcdf. |
---|
| 4477 | !------------------------------------------------------------------------------! |
---|
| 4478 | SUBROUTINE usm_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) |
---|
| 4479 | |
---|
| 4480 | IMPLICIT NONE |
---|
| 4481 | |
---|
| 4482 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
| 4483 | LOGICAL, INTENT(OUT) :: found !< |
---|
| 4484 | CHARACTER (len=*), INTENT(OUT) :: grid_x !< |
---|
| 4485 | CHARACTER (len=*), INTENT(OUT) :: grid_y !< |
---|
| 4486 | CHARACTER (len=*), INTENT(OUT) :: grid_z !< |
---|
| 4487 | |
---|
| 4488 | CHARACTER (len=varnamelength) :: var |
---|
| 4489 | |
---|
| 4490 | var = TRIM(variable) |
---|
| 4491 | IF ( var(1:12) == 'usm_rad_net_' .OR. var(1:13) == 'usm_rad_insw_' .OR. & |
---|
| 4492 | var(1:13) == 'usm_rad_inlw_' .OR. var(1:16) == 'usm_rad_inswdir_' .OR. & |
---|
| 4493 | var(1:16) == 'usm_rad_inswdif_' .OR. var(1:16) == 'usm_rad_inswref_' .OR. & |
---|
| 4494 | var(1:16) == 'usm_rad_inlwdif_' .OR. var(1:16) == 'usm_rad_inlwref_' .OR. & |
---|
| 4495 | var(1:14) == 'usm_rad_outsw_' .OR. var(1:14) == 'usm_rad_outlw_' .OR. & |
---|
| 4496 | var(1:14) == 'usm_rad_ressw_' .OR. var(1:14) == 'usm_rad_reslw_' .OR. & |
---|
[3337] | 4497 | var(1:11) == 'usm_rad_hf_' .OR. var == 'usm_rad_pc_inlw' .OR. & |
---|
| 4498 | var == 'usm_rad_pc_insw' .OR. var == 'usm_rad_pc_inswdir' .OR. & |
---|
| 4499 | var == 'usm_rad_pc_inswdif' .OR. var == 'usm_rad_pc_inswref' .OR. & |
---|
[2737] | 4500 | var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
| 4501 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
| 4502 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
[3418] | 4503 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
| 4504 | var(1:13) == 'usm_qsws_liq_' .OR. & |
---|
| 4505 | var(1:10) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
[2737] | 4506 | var(1:17) == 'usm_t_surf_window' .OR. var(1:12) == 'usm_t_window' .OR. & |
---|
[3418] | 4507 | var(1:16) == 'usm_t_surf_green' .OR. var(1:11) == 'usm_t_green' .OR. & |
---|
[2737] | 4508 | var(1:15) == 'usm_t_surf_10cm' .OR. & |
---|
| 4509 | var(1:9) == 'usm_surfz' .OR. var(1:7) == 'usm_svf' .OR. & |
---|
| 4510 | var(1:7) == 'usm_dif' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
| 4511 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
[3418] | 4512 | var(1:16) == 'usm_surfwintrans' .OR. var(1:7) == 'usm_swc' .OR. & |
---|
[2920] | 4513 | var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' ) THEN |
---|
[2737] | 4514 | |
---|
| 4515 | found = .TRUE. |
---|
| 4516 | grid_x = 'x' |
---|
| 4517 | grid_y = 'y' |
---|
| 4518 | grid_z = 'zu' |
---|
| 4519 | ELSE |
---|
| 4520 | found = .FALSE. |
---|
| 4521 | grid_x = 'none' |
---|
| 4522 | grid_y = 'none' |
---|
| 4523 | grid_z = 'none' |
---|
| 4524 | ENDIF |
---|
| 4525 | |
---|
| 4526 | END SUBROUTINE usm_define_netcdf_grid |
---|
| 4527 | |
---|
| 4528 | |
---|
| 4529 | !------------------------------------------------------------------------------! |
---|
| 4530 | ! Description: |
---|
| 4531 | ! ------------ |
---|
| 4532 | !> Initialization of the wall surface model |
---|
| 4533 | !------------------------------------------------------------------------------! |
---|
| 4534 | SUBROUTINE usm_init_material_model |
---|
| 4535 | |
---|
| 4536 | IMPLICIT NONE |
---|
| 4537 | |
---|
| 4538 | INTEGER(iwp) :: k, l, m !< running indices |
---|
| 4539 | |
---|
| 4540 | CALL location_message( ' initialization of wall surface model', .TRUE. ) |
---|
| 4541 | |
---|
| 4542 | !-- Calculate wall grid spacings. |
---|
| 4543 | !-- Temperature is defined at the center of the wall layers, |
---|
| 4544 | !-- whereas gradients/fluxes are defined at the edges (_stag) |
---|
| 4545 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
| 4546 | DO m = 1, surf_usm_h%ns |
---|
| 4547 | |
---|
| 4548 | surf_usm_h%dz_wall(nzb_wall,m) = surf_usm_h%zw(nzb_wall,m) |
---|
| 4549 | DO k = nzb_wall+1, nzt_wall |
---|
| 4550 | surf_usm_h%dz_wall(k,m) = surf_usm_h%zw(k,m) - & |
---|
| 4551 | surf_usm_h%zw(k-1,m) |
---|
| 4552 | ENDDO |
---|
| 4553 | surf_usm_h%dz_window(nzb_wall,m) = surf_usm_h%zw_window(nzb_wall,m) |
---|
| 4554 | DO k = nzb_wall+1, nzt_wall |
---|
| 4555 | surf_usm_h%dz_window(k,m) = surf_usm_h%zw_window(k,m) - & |
---|
| 4556 | surf_usm_h%zw_window(k-1,m) |
---|
| 4557 | ENDDO |
---|
[3418] | 4558 | ! surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
| 4559 | ! DO k = nzb_wall+1, nzt_wall |
---|
| 4560 | ! surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
| 4561 | ! surf_usm_h%zw_green(k-1,m) |
---|
| 4562 | ! ENDDO |
---|
[2737] | 4563 | |
---|
| 4564 | surf_usm_h%dz_wall(nzt_wall+1,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
| 4565 | |
---|
| 4566 | DO k = nzb_wall, nzt_wall-1 |
---|
| 4567 | surf_usm_h%dz_wall_stag(k,m) = 0.5 * ( & |
---|
| 4568 | surf_usm_h%dz_wall(k+1,m) + surf_usm_h%dz_wall(k,m) ) |
---|
| 4569 | ENDDO |
---|
| 4570 | surf_usm_h%dz_wall_stag(nzt_wall,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
| 4571 | |
---|
| 4572 | surf_usm_h%dz_window(nzt_wall+1,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
| 4573 | |
---|
| 4574 | DO k = nzb_wall, nzt_wall-1 |
---|
| 4575 | surf_usm_h%dz_window_stag(k,m) = 0.5 * ( & |
---|
| 4576 | surf_usm_h%dz_window(k+1,m) + surf_usm_h%dz_window(k,m) ) |
---|
| 4577 | ENDDO |
---|
| 4578 | surf_usm_h%dz_window_stag(nzt_wall,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
| 4579 | |
---|
[3418] | 4580 | ! surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
| 4581 | ! |
---|
| 4582 | ! DO k = nzb_wall, nzt_wall-1 |
---|
| 4583 | ! surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
| 4584 | ! surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
| 4585 | ! ENDDO |
---|
| 4586 | ! surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
| 4587 | !------------- |
---|
| 4588 | IF (surf_usm_h%green_type_roof(m) == 2.0_wp ) then |
---|
| 4589 | soil_type = 3 !extensiv green roof |
---|
| 4590 | surf_usm_h%lai(m) = 2.0_wp |
---|
| 4591 | |
---|
| 4592 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
| 4593 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
| 4594 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.15_wp |
---|
| 4595 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.20_wp |
---|
| 4596 | ELSE |
---|
| 4597 | soil_type = 6 !intensiv green roof |
---|
| 4598 | surf_usm_h%lai(m) = 4.0_wp |
---|
| 4599 | |
---|
| 4600 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
| 4601 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
| 4602 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.40_wp |
---|
| 4603 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.80_wp |
---|
| 4604 | ENDIF |
---|
| 4605 | |
---|
| 4606 | surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
| 4607 | DO k = nzb_wall+1, nzt_wall |
---|
| 4608 | surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
| 4609 | surf_usm_h%zw_green(k-1,m) |
---|
| 4610 | ENDDO |
---|
[2737] | 4611 | surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
| 4612 | |
---|
| 4613 | DO k = nzb_wall, nzt_wall-1 |
---|
| 4614 | surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
| 4615 | surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
| 4616 | ENDDO |
---|
| 4617 | surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
[3418] | 4618 | |
---|
| 4619 | IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
| 4620 | alpha_vangenuchten = soil_pars(0,soil_type) |
---|
| 4621 | ENDIF |
---|
| 4622 | |
---|
| 4623 | IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
| 4624 | l_vangenuchten = soil_pars(1,soil_type) |
---|
| 4625 | ENDIF |
---|
| 4626 | |
---|
| 4627 | IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
| 4628 | n_vangenuchten = soil_pars(2,soil_type) |
---|
| 4629 | ENDIF |
---|
| 4630 | |
---|
| 4631 | IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
| 4632 | hydraulic_conductivity = soil_pars(3,soil_type) |
---|
| 4633 | ENDIF |
---|
| 4634 | |
---|
| 4635 | IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
| 4636 | saturation_moisture = m_soil_pars(0,soil_type) |
---|
| 4637 | ENDIF |
---|
| 4638 | |
---|
| 4639 | IF ( field_capacity == 9999999.9_wp ) THEN |
---|
| 4640 | field_capacity = m_soil_pars(1,soil_type) |
---|
| 4641 | ENDIF |
---|
| 4642 | |
---|
| 4643 | IF ( wilting_point == 9999999.9_wp ) THEN |
---|
| 4644 | wilting_point = m_soil_pars(2,soil_type) |
---|
| 4645 | ENDIF |
---|
| 4646 | |
---|
| 4647 | IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
| 4648 | residual_moisture = m_soil_pars(3,soil_type) |
---|
| 4649 | ENDIF |
---|
| 4650 | |
---|
| 4651 | DO k = nzb_wall, nzt_wall+1 |
---|
| 4652 | swc_h(k,m) = field_capacity |
---|
| 4653 | rootfr_h(k,m) = 0.5_wp |
---|
| 4654 | surf_usm_h%alpha_vg_green(m) = alpha_vangenuchten |
---|
| 4655 | surf_usm_h%l_vg_green(m) = l_vangenuchten |
---|
| 4656 | surf_usm_h%n_vg_green(m) = n_vangenuchten |
---|
| 4657 | surf_usm_h%gamma_w_green_sat(k,m) = hydraulic_conductivity |
---|
| 4658 | swc_sat_h(k,m) = saturation_moisture |
---|
| 4659 | fc_h(k,m) = field_capacity |
---|
| 4660 | wilt_h(k,m) = wilting_point |
---|
| 4661 | swc_res_h(k,m) = residual_moisture |
---|
| 4662 | ENDDO |
---|
| 4663 | !------------------------------- |
---|
[2737] | 4664 | ENDDO |
---|
| 4665 | surf_usm_h%ddz_wall = 1.0_wp / surf_usm_h%dz_wall |
---|
| 4666 | surf_usm_h%ddz_wall_stag = 1.0_wp / surf_usm_h%dz_wall_stag |
---|
| 4667 | surf_usm_h%ddz_window = 1.0_wp / surf_usm_h%dz_window |
---|
| 4668 | surf_usm_h%ddz_window_stag = 1.0_wp / surf_usm_h%dz_window_stag |
---|
| 4669 | surf_usm_h%ddz_green = 1.0_wp / surf_usm_h%dz_green |
---|
| 4670 | surf_usm_h%ddz_green_stag = 1.0_wp / surf_usm_h%dz_green_stag |
---|
| 4671 | ! |
---|
| 4672 | !-- For vertical surfaces |
---|
| 4673 | DO l = 0, 3 |
---|
| 4674 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4675 | surf_usm_v(l)%dz_wall(nzb_wall,m) = surf_usm_v(l)%zw(nzb_wall,m) |
---|
| 4676 | DO k = nzb_wall+1, nzt_wall |
---|
| 4677 | surf_usm_v(l)%dz_wall(k,m) = surf_usm_v(l)%zw(k,m) - & |
---|
| 4678 | surf_usm_v(l)%zw(k-1,m) |
---|
| 4679 | ENDDO |
---|
| 4680 | surf_usm_v(l)%dz_window(nzb_wall,m) = surf_usm_v(l)%zw_window(nzb_wall,m) |
---|
| 4681 | DO k = nzb_wall+1, nzt_wall |
---|
| 4682 | surf_usm_v(l)%dz_window(k,m) = surf_usm_v(l)%zw_window(k,m) - & |
---|
| 4683 | surf_usm_v(l)%zw_window(k-1,m) |
---|
| 4684 | ENDDO |
---|
| 4685 | surf_usm_v(l)%dz_green(nzb_wall,m) = surf_usm_v(l)%zw_green(nzb_wall,m) |
---|
| 4686 | DO k = nzb_wall+1, nzt_wall |
---|
| 4687 | surf_usm_v(l)%dz_green(k,m) = surf_usm_v(l)%zw_green(k,m) - & |
---|
| 4688 | surf_usm_v(l)%zw_green(k-1,m) |
---|
| 4689 | ENDDO |
---|
| 4690 | |
---|
| 4691 | surf_usm_v(l)%dz_wall(nzt_wall+1,m) = & |
---|
| 4692 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
| 4693 | |
---|
| 4694 | DO k = nzb_wall, nzt_wall-1 |
---|
| 4695 | surf_usm_v(l)%dz_wall_stag(k,m) = 0.5 * ( & |
---|
| 4696 | surf_usm_v(l)%dz_wall(k+1,m) + & |
---|
| 4697 | surf_usm_v(l)%dz_wall(k,m) ) |
---|
| 4698 | ENDDO |
---|
| 4699 | surf_usm_v(l)%dz_wall_stag(nzt_wall,m) = & |
---|
| 4700 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
| 4701 | surf_usm_v(l)%dz_window(nzt_wall+1,m) = & |
---|
| 4702 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
| 4703 | |
---|
| 4704 | DO k = nzb_wall, nzt_wall-1 |
---|
| 4705 | surf_usm_v(l)%dz_window_stag(k,m) = 0.5 * ( & |
---|
| 4706 | surf_usm_v(l)%dz_window(k+1,m) + & |
---|
| 4707 | surf_usm_v(l)%dz_window(k,m) ) |
---|
| 4708 | ENDDO |
---|
| 4709 | surf_usm_v(l)%dz_window_stag(nzt_wall,m) = & |
---|
| 4710 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
| 4711 | surf_usm_v(l)%dz_green(nzt_wall+1,m) = & |
---|
| 4712 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
| 4713 | |
---|
| 4714 | DO k = nzb_wall, nzt_wall-1 |
---|
| 4715 | surf_usm_v(l)%dz_green_stag(k,m) = 0.5 * ( & |
---|
| 4716 | surf_usm_v(l)%dz_green(k+1,m) + & |
---|
| 4717 | surf_usm_v(l)%dz_green(k,m) ) |
---|
| 4718 | ENDDO |
---|
| 4719 | surf_usm_v(l)%dz_green_stag(nzt_wall,m) = & |
---|
| 4720 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
| 4721 | ENDDO |
---|
| 4722 | surf_usm_v(l)%ddz_wall = 1.0_wp / surf_usm_v(l)%dz_wall |
---|
| 4723 | surf_usm_v(l)%ddz_wall_stag = 1.0_wp / surf_usm_v(l)%dz_wall_stag |
---|
| 4724 | surf_usm_v(l)%ddz_window = 1.0_wp / surf_usm_v(l)%dz_window |
---|
| 4725 | surf_usm_v(l)%ddz_window_stag = 1.0_wp / surf_usm_v(l)%dz_window_stag |
---|
| 4726 | surf_usm_v(l)%ddz_green = 1.0_wp / surf_usm_v(l)%dz_green |
---|
| 4727 | surf_usm_v(l)%ddz_green_stag = 1.0_wp / surf_usm_v(l)%dz_green_stag |
---|
| 4728 | ENDDO |
---|
| 4729 | |
---|
| 4730 | |
---|
[3418] | 4731 | ! soil_type = 6 |
---|
| 4732 | ! !-- Initialize standard soil types. It is possible to overwrite each |
---|
| 4733 | ! !-- parameter by setting the respecticy NAMELIST variable to a |
---|
| 4734 | ! !-- value /= 9999999.9. |
---|
| 4735 | ! IF ( soil_type /= 0 ) THEN |
---|
| 4736 | ! |
---|
| 4737 | ! IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
| 4738 | ! alpha_vangenuchten = soil_pars(0,soil_type) |
---|
| 4739 | ! ENDIF |
---|
| 4740 | ! |
---|
| 4741 | ! IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
| 4742 | ! l_vangenuchten = soil_pars(1,soil_type) |
---|
| 4743 | ! ENDIF |
---|
| 4744 | ! |
---|
| 4745 | ! IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
| 4746 | ! n_vangenuchten = soil_pars(2,soil_type) |
---|
| 4747 | ! ENDIF |
---|
| 4748 | ! |
---|
| 4749 | ! IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
| 4750 | ! hydraulic_conductivity = soil_pars(3,soil_type) |
---|
| 4751 | ! ENDIF |
---|
| 4752 | ! |
---|
| 4753 | ! IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
| 4754 | ! saturation_moisture = m_soil_pars(0,soil_type) |
---|
| 4755 | ! ENDIF |
---|
| 4756 | ! |
---|
| 4757 | ! IF ( field_capacity == 9999999.9_wp ) THEN |
---|
| 4758 | ! field_capacity = m_soil_pars(1,soil_type) |
---|
| 4759 | ! ENDIF |
---|
| 4760 | ! |
---|
| 4761 | ! IF ( wilting_point == 9999999.9_wp ) THEN |
---|
| 4762 | ! wilting_point = m_soil_pars(2,soil_type) |
---|
| 4763 | ! ENDIF |
---|
| 4764 | ! |
---|
| 4765 | ! IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
| 4766 | ! residual_moisture = m_soil_pars(3,soil_type) |
---|
| 4767 | ! ENDIF |
---|
| 4768 | ! |
---|
| 4769 | ! DO m = 1, surf_usm_h%ns |
---|
| 4770 | ! DO k = nzb_wall, nzt_wall+1 |
---|
| 4771 | ! swc_h(k,m) = field_capacity |
---|
| 4772 | ! rootfr_h(k,m) = 0.5_wp |
---|
| 4773 | ! ENDDO |
---|
| 4774 | ! ENDDO |
---|
| 4775 | ! ! ! |
---|
| 4776 | ! ! !-- Vertical surfaces |
---|
| 4777 | ! ! DO l = 0, 3 |
---|
| 4778 | ! ! DO m = 1, surf_usm_v(l)%ns |
---|
| 4779 | ! ! DO k = nzb_wall, nzt_wall+1 |
---|
| 4780 | ! ! swc_v(l)%t(k,m) = 0.5_wp |
---|
| 4781 | ! ! ENDDO |
---|
| 4782 | ! ! ENDDO |
---|
| 4783 | ! ! ENDDO |
---|
| 4784 | ! |
---|
| 4785 | ! ENDIF |
---|
| 4786 | ! |
---|
| 4787 | ! ! |
---|
| 4788 | ! !-- Map values to the respective 2D arrays |
---|
| 4789 | ! surf_usm_h%alpha_vg_green = alpha_vangenuchten |
---|
| 4790 | ! surf_usm_h%l_vg_green = l_vangenuchten |
---|
| 4791 | ! surf_usm_h%n_vg_green = n_vangenuchten |
---|
| 4792 | ! surf_usm_h%gamma_w_green_sat = hydraulic_conductivity |
---|
| 4793 | ! swc_sat_h = saturation_moisture |
---|
| 4794 | ! fc_h = field_capacity |
---|
| 4795 | ! wilt_h = wilting_point |
---|
| 4796 | ! swc_res_h = residual_moisture |
---|
| 4797 | ! ! r_soil_min = min_soil_resistance |
---|
| 4798 | |
---|
[2737] | 4799 | CALL location_message( ' wall structures filed out', .TRUE. ) |
---|
| 4800 | |
---|
| 4801 | CALL location_message( ' initialization of wall surface model finished', .TRUE. ) |
---|
| 4802 | |
---|
| 4803 | END SUBROUTINE usm_init_material_model |
---|
| 4804 | |
---|
| 4805 | |
---|
| 4806 | !------------------------------------------------------------------------------! |
---|
| 4807 | ! Description: |
---|
| 4808 | ! ------------ |
---|
| 4809 | !> Initialization of the urban surface model |
---|
| 4810 | !------------------------------------------------------------------------------! |
---|
| 4811 | SUBROUTINE usm_init_urban_surface |
---|
| 4812 | |
---|
| 4813 | USE arrays_3d, & |
---|
| 4814 | ONLY: zw |
---|
| 4815 | |
---|
| 4816 | USE netcdf_data_input_mod, & |
---|
| 4817 | ONLY: building_pars_f, building_type_f, terrain_height_f |
---|
| 4818 | |
---|
| 4819 | IMPLICIT NONE |
---|
| 4820 | |
---|
| 4821 | INTEGER(iwp) :: i !< loop index x-dirction |
---|
[3418] | 4822 | INTEGER(iwp) :: ind_alb_green !< index in input list for green albedo |
---|
| 4823 | INTEGER(iwp) :: ind_alb_wall !< index in input list for wall albedo |
---|
| 4824 | INTEGER(iwp) :: ind_alb_win !< index in input list for window albedo |
---|
[2737] | 4825 | INTEGER(iwp) :: ind_emis_wall !< index in input list for wall emissivity |
---|
| 4826 | INTEGER(iwp) :: ind_emis_green !< index in input list for green emissivity |
---|
| 4827 | INTEGER(iwp) :: ind_emis_win !< index in input list for window emissivity |
---|
| 4828 | INTEGER(iwp) :: ind_green_frac_w !< index in input list for green fraction on wall |
---|
| 4829 | INTEGER(iwp) :: ind_green_frac_r !< index in input list for green fraction on roof |
---|
| 4830 | INTEGER(iwp) :: ind_hc1 !< index in input list for heat capacity at first wall layer |
---|
[3418] | 4831 | INTEGER(iwp) :: ind_hc1_win !< index in input list for heat capacity at first window layer |
---|
[2737] | 4832 | INTEGER(iwp) :: ind_hc2 !< index in input list for heat capacity at second wall layer |
---|
[3418] | 4833 | INTEGER(iwp) :: ind_hc2_win !< index in input list for heat capacity at second window layer |
---|
[2737] | 4834 | INTEGER(iwp) :: ind_hc3 !< index in input list for heat capacity at third wall layer |
---|
[3418] | 4835 | INTEGER(iwp) :: ind_hc3_win !< index in input list for heat capacity at third window layer |
---|
[2737] | 4836 | INTEGER(iwp) :: ind_lai_r !< index in input list for LAI on roof |
---|
| 4837 | INTEGER(iwp) :: ind_lai_w !< index in input list for LAI on wall |
---|
| 4838 | INTEGER(iwp) :: ind_tc1 !< index in input list for thermal conductivity at first wall layer |
---|
[3418] | 4839 | INTEGER(iwp) :: ind_tc1_win !< index in input list for thermal conductivity at first window layer |
---|
[2737] | 4840 | INTEGER(iwp) :: ind_tc2 !< index in input list for thermal conductivity at second wall layer |
---|
[3418] | 4841 | INTEGER(iwp) :: ind_tc2_win !< index in input list for thermal conductivity at second window layer |
---|
[2737] | 4842 | INTEGER(iwp) :: ind_tc3 !< index in input list for thermal conductivity at third wall layer |
---|
[3418] | 4843 | INTEGER(iwp) :: ind_tc3_win !< index in input list for thermal conductivity at third window layer |
---|
| 4844 | INTEGER(iwp) :: ind_thick_1 !< index in input list for thickness of first wall layer |
---|
| 4845 | INTEGER(iwp) :: ind_thick_1_win !< index in input list for thickness of first window layer |
---|
| 4846 | INTEGER(iwp) :: ind_thick_2 !< index in input list for thickness of second wall layer |
---|
| 4847 | INTEGER(iwp) :: ind_thick_2_win !< index in input list for thickness of second window layer |
---|
| 4848 | INTEGER(iwp) :: ind_thick_3 !< index in input list for thickness of third wall layer |
---|
| 4849 | INTEGER(iwp) :: ind_thick_3_win !< index in input list for thickness of third window layer |
---|
| 4850 | INTEGER(iwp) :: ind_thick_4 !< index in input list for thickness of fourth wall layer |
---|
| 4851 | INTEGER(iwp) :: ind_thick_4_win !< index in input list for thickness of fourth window layer |
---|
[2737] | 4852 | INTEGER(iwp) :: ind_trans !< index in input list for window transmissivity |
---|
| 4853 | INTEGER(iwp) :: ind_wall_frac !< index in input list for wall fraction |
---|
| 4854 | INTEGER(iwp) :: ind_win_frac !< index in input list for window fraction |
---|
| 4855 | INTEGER(iwp) :: ind_z0 !< index in input list for z0 |
---|
| 4856 | INTEGER(iwp) :: ind_z0qh !< index in input list for z0h / z0q |
---|
| 4857 | INTEGER(iwp) :: j !< loop index y-dirction |
---|
| 4858 | INTEGER(iwp) :: k !< loop index z-dirction |
---|
| 4859 | INTEGER(iwp) :: l !< loop index surface orientation |
---|
| 4860 | INTEGER(iwp) :: m !< loop index surface element |
---|
| 4861 | INTEGER(iwp) :: st !< dummy |
---|
| 4862 | |
---|
[3418] | 4863 | REAL(wp) :: c, d, tin, twin |
---|
[2737] | 4864 | REAL(wp) :: ground_floor_level_l !< local height of ground floor level |
---|
| 4865 | REAL(wp) :: z_agl !< height above ground |
---|
| 4866 | |
---|
| 4867 | ! |
---|
| 4868 | !-- NOPOINTER version not implemented yet |
---|
| 4869 | #if defined( __nopointer ) |
---|
| 4870 | message_string = 'The urban surface module only runs with POINTER version' |
---|
| 4871 | CALL message( 'urban_surface_mod', 'PA0452', 1, 2, 0, 6, 0 ) |
---|
| 4872 | #endif |
---|
| 4873 | |
---|
| 4874 | CALL cpu_log( log_point_s(78), 'usm_init', 'start' ) |
---|
| 4875 | !-- surface forcing have to be disabled for LSF |
---|
| 4876 | !-- in case of enabled urban surface module |
---|
| 4877 | IF ( large_scale_forcing ) THEN |
---|
| 4878 | lsf_surf = .FALSE. |
---|
| 4879 | ENDIF |
---|
| 4880 | |
---|
| 4881 | ! |
---|
| 4882 | !-- Flag surface elements belonging to the ground floor level. Therefore, |
---|
| 4883 | !-- use terrain height array from file, if available. This flag is later used |
---|
| 4884 | !-- to control initialization of surface attributes. |
---|
| 4885 | surf_usm_h%ground_level = .FALSE. |
---|
| 4886 | DO m = 1, surf_usm_h%ns |
---|
| 4887 | i = surf_usm_h%i(m) |
---|
| 4888 | j = surf_usm_h%j(m) |
---|
| 4889 | k = surf_usm_h%k(m) |
---|
| 4890 | ! |
---|
| 4891 | !-- Get local ground level. If no ground level is given in input file, |
---|
| 4892 | !-- use default value. |
---|
| 4893 | ground_floor_level_l = ground_floor_level |
---|
| 4894 | IF ( building_pars_f%from_file ) THEN |
---|
| 4895 | IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
| 4896 | building_pars_f%fill ) & |
---|
| 4897 | ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
| 4898 | ENDIF |
---|
| 4899 | ! |
---|
| 4900 | !-- Determine height of surface element above ground level |
---|
| 4901 | IF ( terrain_height_f%from_file ) THEN |
---|
| 4902 | z_agl = zw(k) - terrain_height_f%var(j,i) |
---|
| 4903 | ELSE |
---|
| 4904 | z_agl = zw(k) |
---|
| 4905 | ENDIF |
---|
| 4906 | ! |
---|
| 4907 | !-- Set flag for ground level |
---|
| 4908 | IF ( z_agl <= ground_floor_level_l ) & |
---|
| 4909 | surf_usm_h%ground_level(m) = .TRUE. |
---|
| 4910 | ENDDO |
---|
| 4911 | |
---|
| 4912 | DO l = 0, 3 |
---|
| 4913 | surf_usm_v(l)%ground_level = .FALSE. |
---|
| 4914 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4915 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
| 4916 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
| 4917 | k = surf_usm_v(l)%k(m) |
---|
| 4918 | ! |
---|
| 4919 | !-- Get local ground level. If no ground level is given in input file, |
---|
| 4920 | !-- use default value. |
---|
| 4921 | ground_floor_level_l = ground_floor_level |
---|
| 4922 | IF ( building_pars_f%from_file ) THEN |
---|
| 4923 | IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
| 4924 | building_pars_f%fill ) & |
---|
| 4925 | ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
| 4926 | ENDIF |
---|
| 4927 | ! |
---|
| 4928 | !-- Determine height of surface element above ground level. Please |
---|
| 4929 | !-- note, height of surface element is determined with respect to |
---|
| 4930 | !-- its height of the adjoing atmospheric grid point. |
---|
| 4931 | IF ( terrain_height_f%from_file ) THEN |
---|
| 4932 | z_agl = zw(k) - terrain_height_f%var(j-surf_usm_v(l)%joff, & |
---|
| 4933 | i-surf_usm_v(l)%ioff) |
---|
| 4934 | ELSE |
---|
| 4935 | z_agl = zw(k) |
---|
| 4936 | ENDIF |
---|
| 4937 | ! |
---|
| 4938 | !-- Set flag for ground level |
---|
| 4939 | IF ( z_agl <= ground_floor_level_l ) & |
---|
| 4940 | surf_usm_v(l)%ground_level(m) = .TRUE. |
---|
| 4941 | |
---|
| 4942 | ENDDO |
---|
| 4943 | ENDDO |
---|
| 4944 | ! |
---|
[2805] | 4945 | !-- Initialization of resistances. |
---|
| 4946 | DO m = 1, surf_usm_h%ns |
---|
| 4947 | surf_usm_h%r_a(m) = 50.0_wp |
---|
| 4948 | surf_usm_h%r_a_green(m) = 50.0_wp |
---|
| 4949 | surf_usm_h%r_a_window(m) = 50.0_wp |
---|
| 4950 | ENDDO |
---|
| 4951 | DO l = 0, 3 |
---|
| 4952 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4953 | surf_usm_v(l)%r_a(m) = 50.0_wp |
---|
| 4954 | surf_usm_v(l)%r_a_green(m) = 50.0_wp |
---|
| 4955 | surf_usm_v(l)%r_a_window(m) = 50.0_wp |
---|
| 4956 | ENDDO |
---|
| 4957 | ENDDO |
---|
[3418] | 4958 | |
---|
| 4959 | !--------------------------------------------------------------------------------------------- |
---|
[2805] | 4960 | ! |
---|
[3418] | 4961 | !-- Map values onto horizontal elemements |
---|
| 4962 | DO m = 1, surf_usm_h%ns |
---|
| 4963 | surf_usm_h%r_canopy_min(m) = 200.0_wp !min_canopy_resistance |
---|
| 4964 | surf_usm_h%g_d(m) = 0.0_wp !canopy_resistance_coefficient |
---|
| 4965 | ENDDO |
---|
| 4966 | ! |
---|
| 4967 | !-- Map values onto vertical elements, even though this does not make |
---|
| 4968 | !-- much sense. |
---|
| 4969 | DO l = 0, 3 |
---|
| 4970 | DO m = 1, surf_usm_v(l)%ns |
---|
| 4971 | surf_usm_v(l)%r_canopy_min(m) = 200.0_wp !min_canopy_resistance |
---|
| 4972 | surf_usm_v(l)%g_d(m) = 0.0_wp !canopy_resistance_coefficient |
---|
| 4973 | ENDDO |
---|
| 4974 | ENDDO |
---|
| 4975 | !--------------------------------------------------------------------------------------------- |
---|
| 4976 | ! |
---|
| 4977 | ! |
---|
[2737] | 4978 | !-- Initialize urban-type surface attribute. According to initialization in |
---|
| 4979 | !-- land-surface model, follow a 3-level approach. |
---|
| 4980 | !-- Level 1 - initialization via default attributes |
---|
| 4981 | DO m = 1, surf_usm_h%ns |
---|
| 4982 | ! |
---|
| 4983 | !-- Now, all horizontal surfaces are roof surfaces (?) |
---|
| 4984 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
| 4985 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
| 4986 | ! |
---|
| 4987 | !-- In order to distinguish between ground floor level and |
---|
[3418] | 4988 | !-- above-ground-floor level surfaces, set input indices. |
---|
| 4989 | |
---|
[2737] | 4990 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
| 4991 | surf_usm_h%ground_level(m) ) |
---|
| 4992 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
| 4993 | surf_usm_h%ground_level(m) ) |
---|
| 4994 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
| 4995 | surf_usm_h%ground_level(m) ) |
---|
| 4996 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
| 4997 | surf_usm_h%ground_level(m) ) |
---|
| 4998 | ! |
---|
[3222] | 4999 | !-- Store building type and its name on each surface element |
---|
| 5000 | surf_usm_h%building_type(m) = building_type |
---|
| 5001 | surf_usm_h%building_type_name(m) = building_type_name(building_type) |
---|
| 5002 | ! |
---|
[2737] | 5003 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
[3418] | 5004 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,building_type) |
---|
[2963] | 5005 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,building_type) |
---|
[3418] | 5006 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,building_type) |
---|
| 5007 | surf_usm_h%lai(m) = building_pars(ind_lai_r,building_type) |
---|
[2737] | 5008 | |
---|
[3418] | 5009 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
| 5010 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
| 5011 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,building_type) |
---|
| 5012 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,building_type) |
---|
| 5013 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
| 5014 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
| 5015 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,building_type) |
---|
| 5016 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,building_type) |
---|
| 5017 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
| 5018 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
| 5019 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,building_type) |
---|
| 5020 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,building_type) |
---|
| 5021 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
| 5022 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
| 5023 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,building_type) |
---|
| 5024 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,building_type) |
---|
| 5025 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,building_type) |
---|
| 5026 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,building_type) |
---|
| 5027 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,building_type) |
---|
| 5028 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,building_type) |
---|
| 5029 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,building_type) |
---|
| 5030 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,building_type) |
---|
| 5031 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,building_type) |
---|
| 5032 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,building_type) |
---|
[2737] | 5033 | |
---|
[3418] | 5034 | surf_usm_h%target_temp_summer(m) = building_pars(117,building_type) |
---|
| 5035 | surf_usm_h%target_temp_winter(m) = building_pars(118,building_type) |
---|
[2737] | 5036 | ! |
---|
| 5037 | !-- emissivity of wall-, green- and window fraction |
---|
[3418] | 5038 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,building_type) |
---|
| 5039 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,building_type) |
---|
| 5040 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,building_type) |
---|
[2737] | 5041 | |
---|
[3418] | 5042 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,building_type) |
---|
[2737] | 5043 | |
---|
| 5044 | surf_usm_h%z0(m) = building_pars(ind_z0,building_type) |
---|
| 5045 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
| 5046 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
| 5047 | ! |
---|
| 5048 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
[3418] | 5049 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,building_type) ) |
---|
| 5050 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,building_type) ) |
---|
| 5051 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,building_type) ) |
---|
[2737] | 5052 | |
---|
[3418] | 5053 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
| 5054 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
| 5055 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
| 5056 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
[2737] | 5057 | |
---|
[3418] | 5058 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
| 5059 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
| 5060 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
| 5061 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
[2737] | 5062 | |
---|
[3418] | 5063 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,building_type) |
---|
| 5064 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,building_type) |
---|
| 5065 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,building_type) |
---|
| 5066 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,building_type) |
---|
[2737] | 5067 | |
---|
[3418] | 5068 | surf_usm_h%c_surface(m) = building_pars(0,building_type) |
---|
| 5069 | surf_usm_h%lambda_surf(m) = building_pars(3,building_type) |
---|
| 5070 | surf_usm_h%c_surface_green(m) = building_pars(2,building_type) |
---|
| 5071 | surf_usm_h%lambda_surf_green(m) = building_pars(5,building_type) |
---|
| 5072 | surf_usm_h%c_surface_window(m) = building_pars(1,building_type) |
---|
| 5073 | surf_usm_h%lambda_surf_window(m) = building_pars(4,building_type) |
---|
| 5074 | |
---|
| 5075 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,building_type) |
---|
[2737] | 5076 | |
---|
| 5077 | ENDDO |
---|
| 5078 | |
---|
| 5079 | DO l = 0, 3 |
---|
| 5080 | DO m = 1, surf_usm_v(l)%ns |
---|
| 5081 | |
---|
| 5082 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for root surface |
---|
| 5083 | ! |
---|
| 5084 | !-- In order to distinguish between ground floor level and |
---|
[3418] | 5085 | !-- above-ground-floor level surfaces, set input indices. |
---|
| 5086 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
| 5087 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5088 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
| 5089 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5090 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
| 5091 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5092 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
| 5093 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5094 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
| 5095 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5096 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
| 5097 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5098 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
| 5099 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5100 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
| 5101 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5102 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
| 5103 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5104 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
| 5105 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5106 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
| 5107 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5108 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
| 5109 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5110 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
| 5111 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5112 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
| 5113 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5114 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
| 5115 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5116 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
| 5117 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5118 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
| 5119 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5120 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
| 5121 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5122 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
| 5123 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5124 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
| 5125 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5126 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
| 5127 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5128 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
| 5129 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5130 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
| 5131 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5132 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
| 5133 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5134 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
| 5135 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5136 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
| 5137 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5138 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
| 5139 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5140 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
| 5141 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5142 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
| 5143 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5144 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
| 5145 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5146 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
| 5147 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5148 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
| 5149 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5150 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
| 5151 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5152 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
| 5153 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5154 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
| 5155 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5156 | ! |
---|
[3222] | 5157 | !-- Store building type and its name on each surface element |
---|
| 5158 | surf_usm_v(l)%building_type(m) = building_type |
---|
| 5159 | surf_usm_v(l)%building_type_name(m) = building_type_name(building_type) |
---|
| 5160 | ! |
---|
[2737] | 5161 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
[2963] | 5162 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,building_type) |
---|
| 5163 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,building_type) |
---|
| 5164 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,building_type) |
---|
[2737] | 5165 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,building_type) |
---|
| 5166 | |
---|
| 5167 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
| 5168 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
| 5169 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
| 5170 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
| 5171 | |
---|
[3418] | 5172 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
| 5173 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
| 5174 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,building_type) |
---|
| 5175 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,building_type) |
---|
[2737] | 5176 | |
---|
[3418] | 5177 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,building_type) |
---|
| 5178 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,building_type) |
---|
| 5179 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,building_type) |
---|
| 5180 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,building_type) |
---|
[2737] | 5181 | |
---|
| 5182 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
| 5183 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
| 5184 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
| 5185 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
| 5186 | |
---|
[3418] | 5187 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
| 5188 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
| 5189 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,building_type) |
---|
| 5190 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,building_type) |
---|
[2737] | 5191 | |
---|
[3418] | 5192 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,building_type) |
---|
| 5193 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,building_type) |
---|
| 5194 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,building_type) |
---|
| 5195 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,building_type) |
---|
[2737] | 5196 | |
---|
[3418] | 5197 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,building_type) |
---|
| 5198 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,building_type) |
---|
[2737] | 5199 | ! |
---|
| 5200 | !-- emissivity of wall-, green- and window fraction |
---|
[2963] | 5201 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,building_type) |
---|
| 5202 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,building_type) |
---|
| 5203 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,building_type) |
---|
[2737] | 5204 | |
---|
| 5205 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,building_type) |
---|
| 5206 | |
---|
| 5207 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,building_type) |
---|
| 5208 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
| 5209 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
| 5210 | |
---|
[2963] | 5211 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,building_type) ) |
---|
| 5212 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,building_type) ) |
---|
| 5213 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,building_type) ) |
---|
[2737] | 5214 | |
---|
| 5215 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
| 5216 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
| 5217 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
| 5218 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
| 5219 | |
---|
| 5220 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
| 5221 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
| 5222 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
| 5223 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
| 5224 | |
---|
[3418] | 5225 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,building_type) |
---|
| 5226 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,building_type) |
---|
| 5227 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,building_type) |
---|
| 5228 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,building_type) |
---|
[2737] | 5229 | |
---|
[3418] | 5230 | surf_usm_v(l)%c_surface(m) = building_pars(0,building_type) |
---|
| 5231 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,building_type) |
---|
| 5232 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,building_type) |
---|
| 5233 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,building_type) |
---|
| 5234 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,building_type) |
---|
| 5235 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,building_type) |
---|
[2737] | 5236 | |
---|
| 5237 | ENDDO |
---|
| 5238 | ENDDO |
---|
| 5239 | ! |
---|
| 5240 | !-- Level 2 - initialization via building type read from file |
---|
| 5241 | IF ( building_type_f%from_file ) THEN |
---|
| 5242 | DO m = 1, surf_usm_h%ns |
---|
| 5243 | i = surf_usm_h%i(m) |
---|
| 5244 | j = surf_usm_h%j(m) |
---|
| 5245 | ! |
---|
| 5246 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
| 5247 | st = building_type_f%var(j,i) |
---|
| 5248 | IF ( st /= building_type_f%fill ) THEN |
---|
| 5249 | |
---|
| 5250 | ! |
---|
| 5251 | !-- In order to distinguish between ground floor level and |
---|
[3418] | 5252 | !-- above-ground-floor level surfaces, set input indices. |
---|
| 5253 | |
---|
[2737] | 5254 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
| 5255 | surf_usm_h%ground_level(m) ) |
---|
| 5256 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
| 5257 | surf_usm_h%ground_level(m) ) |
---|
| 5258 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
| 5259 | surf_usm_h%ground_level(m) ) |
---|
| 5260 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
| 5261 | surf_usm_h%ground_level(m) ) |
---|
| 5262 | ! |
---|
[3222] | 5263 | !-- Store building type and its name on each surface element |
---|
| 5264 | surf_usm_h%building_type(m) = st |
---|
| 5265 | surf_usm_h%building_type_name(m) = building_type_name(st) |
---|
| 5266 | ! |
---|
[2737] | 5267 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
[3418] | 5268 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,st) |
---|
[2963] | 5269 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,st) |
---|
[3418] | 5270 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,st) |
---|
| 5271 | surf_usm_h%lai(m) = building_pars(ind_lai_r,st) |
---|
[2737] | 5272 | |
---|
[3418] | 5273 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,st) |
---|
| 5274 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,st) |
---|
| 5275 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,st) |
---|
| 5276 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,st) |
---|
| 5277 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,st) |
---|
| 5278 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,st) |
---|
| 5279 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,st) |
---|
| 5280 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,st) |
---|
[2737] | 5281 | |
---|
[3418] | 5282 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
| 5283 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
| 5284 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,st) |
---|
| 5285 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,st) |
---|
| 5286 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
| 5287 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
| 5288 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,st) |
---|
| 5289 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,st) |
---|
[2737] | 5290 | |
---|
[3418] | 5291 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,st) |
---|
| 5292 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,st) |
---|
| 5293 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,st) |
---|
| 5294 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,st) |
---|
| 5295 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,st) |
---|
| 5296 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,st) |
---|
| 5297 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,st) |
---|
| 5298 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,st) |
---|
[2737] | 5299 | |
---|
[3418] | 5300 | surf_usm_h%target_temp_summer(m) = building_pars(117,st) |
---|
| 5301 | surf_usm_h%target_temp_winter(m) = building_pars(118,st) |
---|
[2737] | 5302 | ! |
---|
| 5303 | !-- emissivity of wall-, green- and window fraction |
---|
[3418] | 5304 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,st) |
---|
| 5305 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,st) |
---|
| 5306 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,st) |
---|
[2737] | 5307 | |
---|
[3418] | 5308 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,st) |
---|
[2737] | 5309 | |
---|
| 5310 | surf_usm_h%z0(m) = building_pars(ind_z0,st) |
---|
| 5311 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,st) |
---|
| 5312 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,st) |
---|
| 5313 | ! |
---|
| 5314 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
[3418] | 5315 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,st) ) |
---|
| 5316 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,st) ) |
---|
| 5317 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,st) ) |
---|
[2737] | 5318 | |
---|
[3418] | 5319 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
| 5320 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
| 5321 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
| 5322 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
[2737] | 5323 | |
---|
[3418] | 5324 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
| 5325 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
| 5326 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
| 5327 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
[2737] | 5328 | |
---|
[3418] | 5329 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,st) |
---|
| 5330 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,st) |
---|
| 5331 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,st) |
---|
| 5332 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,st) |
---|
[2737] | 5333 | |
---|
[3418] | 5334 | surf_usm_h%c_surface(m) = building_pars(0,st) |
---|
| 5335 | surf_usm_h%lambda_surf(m) = building_pars(3,st) |
---|
| 5336 | surf_usm_h%c_surface_green(m) = building_pars(2,st) |
---|
| 5337 | surf_usm_h%lambda_surf_green(m) = building_pars(5,st) |
---|
| 5338 | surf_usm_h%c_surface_window(m) = building_pars(1,st) |
---|
| 5339 | surf_usm_h%lambda_surf_window(m) = building_pars(4,st) |
---|
| 5340 | |
---|
| 5341 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,st) |
---|
[2737] | 5342 | |
---|
| 5343 | ENDIF |
---|
| 5344 | ENDDO |
---|
| 5345 | |
---|
| 5346 | DO l = 0, 3 |
---|
| 5347 | DO m = 1, surf_usm_v(l)%ns |
---|
| 5348 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
| 5349 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
| 5350 | ! |
---|
| 5351 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
| 5352 | |
---|
| 5353 | st = building_type_f%var(j,i) |
---|
| 5354 | IF ( st /= building_type_f%fill ) THEN |
---|
| 5355 | |
---|
| 5356 | ! |
---|
| 5357 | !-- In order to distinguish between ground floor level and |
---|
[3418] | 5358 | !-- above-ground-floor level surfaces, set input indices. |
---|
| 5359 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
| 5360 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5361 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
| 5362 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5363 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
| 5364 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5365 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
| 5366 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5367 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
| 5368 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5369 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
| 5370 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5371 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
| 5372 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5373 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
| 5374 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5375 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
| 5376 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5377 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
| 5378 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5379 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
| 5380 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5381 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
| 5382 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5383 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
| 5384 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5385 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
| 5386 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5387 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
| 5388 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5389 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
| 5390 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5391 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
| 5392 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5393 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
| 5394 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5395 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
| 5396 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5397 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
| 5398 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5399 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
| 5400 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5401 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
| 5402 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5403 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
| 5404 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5405 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
| 5406 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5407 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
| 5408 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5409 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
| 5410 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5411 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
| 5412 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5413 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
| 5414 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5415 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
| 5416 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5417 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
| 5418 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5419 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
| 5420 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5421 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
| 5422 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5423 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
[3418] | 5424 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5425 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
| 5426 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5427 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
| 5428 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5429 | ! |
---|
[3222] | 5430 | !-- Store building type and its name on each surface element |
---|
| 5431 | surf_usm_v(l)%building_type(m) = st |
---|
| 5432 | surf_usm_v(l)%building_type_name(m) = building_type_name(st) |
---|
| 5433 | ! |
---|
[2737] | 5434 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
[2963] | 5435 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,st) |
---|
| 5436 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,st) |
---|
| 5437 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,st) |
---|
| 5438 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,st) |
---|
[2737] | 5439 | |
---|
| 5440 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
| 5441 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
| 5442 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
| 5443 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
| 5444 | |
---|
[3418] | 5445 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
| 5446 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
| 5447 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,st) |
---|
| 5448 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,st) |
---|
[2737] | 5449 | |
---|
[3418] | 5450 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,st) |
---|
| 5451 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,st) |
---|
| 5452 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,st) |
---|
| 5453 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,st) |
---|
[2737] | 5454 | |
---|
| 5455 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
| 5456 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
| 5457 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
| 5458 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
| 5459 | |
---|
[3418] | 5460 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
| 5461 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
| 5462 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,st) |
---|
| 5463 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,st) |
---|
[2737] | 5464 | |
---|
[3418] | 5465 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,st) |
---|
| 5466 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,st) |
---|
| 5467 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,st) |
---|
| 5468 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,st) |
---|
[2737] | 5469 | |
---|
[3418] | 5470 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,st) |
---|
| 5471 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,st) |
---|
[2737] | 5472 | ! |
---|
| 5473 | !-- emissivity of wall-, green- and window fraction |
---|
[2963] | 5474 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,st) |
---|
| 5475 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,st) |
---|
| 5476 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,st) |
---|
[2737] | 5477 | |
---|
| 5478 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,st) |
---|
| 5479 | |
---|
| 5480 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,st) |
---|
| 5481 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,st) |
---|
| 5482 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,st) |
---|
| 5483 | |
---|
[2963] | 5484 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,st) ) |
---|
| 5485 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,st) ) |
---|
| 5486 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,st) ) |
---|
[2737] | 5487 | |
---|
| 5488 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
| 5489 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
| 5490 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
| 5491 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
| 5492 | |
---|
| 5493 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
| 5494 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
| 5495 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
| 5496 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
| 5497 | |
---|
[3418] | 5498 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,st) |
---|
| 5499 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,st) |
---|
| 5500 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,st) |
---|
| 5501 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,st) |
---|
[2737] | 5502 | |
---|
[3418] | 5503 | surf_usm_v(l)%c_surface(m) = building_pars(0,st) |
---|
| 5504 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,st) |
---|
| 5505 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,st) |
---|
| 5506 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,st) |
---|
| 5507 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,st) |
---|
| 5508 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,st) |
---|
[2737] | 5509 | |
---|
| 5510 | |
---|
| 5511 | ENDIF |
---|
| 5512 | ENDDO |
---|
| 5513 | ENDDO |
---|
| 5514 | ENDIF |
---|
[3222] | 5515 | |
---|
[2737] | 5516 | ! |
---|
| 5517 | !-- Level 3 - initialization via building_pars read from file |
---|
| 5518 | IF ( building_pars_f%from_file ) THEN |
---|
| 5519 | DO m = 1, surf_usm_h%ns |
---|
| 5520 | i = surf_usm_h%i(m) |
---|
| 5521 | j = surf_usm_h%j(m) |
---|
| 5522 | |
---|
| 5523 | ! |
---|
| 5524 | !-- In order to distinguish between ground floor level and |
---|
[3418] | 5525 | !-- above-ground-floor level surfaces, set input indices. |
---|
[2737] | 5526 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
| 5527 | surf_usm_h%ground_level(m) ) |
---|
| 5528 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
| 5529 | surf_usm_h%ground_level(m) ) |
---|
| 5530 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
| 5531 | surf_usm_h%ground_level(m) ) |
---|
| 5532 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
| 5533 | surf_usm_h%ground_level(m) ) |
---|
| 5534 | |
---|
| 5535 | ! |
---|
| 5536 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
[3418] | 5537 | IF ( building_pars_f%pars_xy(ind_wall_frac_r,j,i) /= building_pars_f%fill ) & |
---|
| 5538 | surf_usm_h%frac(ind_veg_wall,m) = building_pars_f%pars_xy(ind_wall_frac_r,j,i) |
---|
[2737] | 5539 | IF ( building_pars_f%pars_xy(ind_green_frac_r,j,i) /= building_pars_f%fill ) & |
---|
[2963] | 5540 | surf_usm_h%frac(ind_pav_green,m) = building_pars_f%pars_xy(ind_green_frac_r,j,i) |
---|
[3418] | 5541 | IF ( building_pars_f%pars_xy(ind_win_frac_r,j,i) /= building_pars_f%fill ) & |
---|
| 5542 | surf_usm_h%frac(ind_wat_win,m) = building_pars_f%pars_xy(ind_win_frac_r,j,i) |
---|
[2737] | 5543 | |
---|
| 5544 | |
---|
| 5545 | IF ( building_pars_f%pars_xy(ind_lai_r,j,i) /= building_pars_f%fill ) & |
---|
| 5546 | surf_usm_h%lai(m) = building_pars_f%pars_xy(ind_lai_r,j,i) |
---|
| 5547 | |
---|
[3418] | 5548 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
| 5549 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
| 5550 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
[2737] | 5551 | ENDIF |
---|
[3418] | 5552 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5553 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
| 5554 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5555 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
| 5556 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
| 5557 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
| 5558 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
[2737] | 5559 | ENDIF |
---|
[3418] | 5560 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5561 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
| 5562 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5563 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
| 5564 | IF ( building_pars_f%pars_xy(ind_hc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
| 5565 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
| 5566 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
[2737] | 5567 | ENDIF |
---|
[3418] | 5568 | IF ( building_pars_f%pars_xy(ind_hc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5569 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win_r,j,i) |
---|
| 5570 | IF ( building_pars_f%pars_xy(ind_hc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5571 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win_r,j,i) |
---|
[2737] | 5572 | |
---|
[3418] | 5573 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
| 5574 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
| 5575 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
[2737] | 5576 | ENDIF |
---|
[3418] | 5577 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5578 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_wall_r,j,i) |
---|
| 5579 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5580 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_wall_r,j,i) |
---|
| 5581 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
| 5582 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
| 5583 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
[2737] | 5584 | ENDIF |
---|
[3418] | 5585 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5586 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc2_wall_r,j,i) |
---|
| 5587 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5588 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc3_wall_r,j,i) |
---|
| 5589 | IF ( building_pars_f%pars_xy(ind_tc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
| 5590 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
| 5591 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
[2737] | 5592 | ENDIF |
---|
[3418] | 5593 | IF ( building_pars_f%pars_xy(ind_tc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5594 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win_r,j,i) |
---|
| 5595 | IF ( building_pars_f%pars_xy(ind_tc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5596 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win_r,j,i) |
---|
[2737] | 5597 | |
---|
[3418] | 5598 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
| 5599 | surf_usm_h%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
| 5600 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
| 5601 | surf_usm_h%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
[2737] | 5602 | |
---|
[3418] | 5603 | IF ( building_pars_f%pars_xy(ind_emis_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5604 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall_r,j,i) |
---|
| 5605 | IF ( building_pars_f%pars_xy(ind_emis_green_r,j,i) /= building_pars_f%fill )& |
---|
| 5606 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green_r,j,i) |
---|
| 5607 | IF ( building_pars_f%pars_xy(ind_emis_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5608 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win_r,j,i) |
---|
[2737] | 5609 | |
---|
[3418] | 5610 | IF ( building_pars_f%pars_xy(ind_trans_r,j,i) /= building_pars_f%fill ) & |
---|
| 5611 | surf_usm_h%transmissivity(m) = building_pars_f%pars_xy(ind_trans_r,j,i) |
---|
[2737] | 5612 | |
---|
| 5613 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
| 5614 | surf_usm_h%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
| 5615 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
| 5616 | surf_usm_h%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
| 5617 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
| 5618 | surf_usm_h%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
| 5619 | |
---|
[3418] | 5620 | IF ( building_pars_f%pars_xy(ind_alb_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5621 | surf_usm_h%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall_r,j,i) |
---|
| 5622 | IF ( building_pars_f%pars_xy(ind_alb_green_r,j,i) /= building_pars_f%fill ) & |
---|
| 5623 | surf_usm_h%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green_r,j,i) |
---|
| 5624 | IF ( building_pars_f%pars_xy(ind_alb_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5625 | surf_usm_h%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win_r,j,i) |
---|
[2737] | 5626 | |
---|
[3418] | 5627 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5628 | surf_usm_h%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
| 5629 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5630 | surf_usm_h%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
| 5631 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5632 | surf_usm_h%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
| 5633 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5634 | surf_usm_h%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
| 5635 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5636 | surf_usm_h%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
| 5637 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5638 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
| 5639 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5640 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
| 5641 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
| 5642 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
| 5643 | IF ( building_pars_f%pars_xy(ind_thick_1_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5644 | surf_usm_h%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win_r,j,i) |
---|
| 5645 | IF ( building_pars_f%pars_xy(ind_thick_2_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5646 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win_r,j,i) |
---|
| 5647 | IF ( building_pars_f%pars_xy(ind_thick_3_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5648 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win_r,j,i) |
---|
| 5649 | IF ( building_pars_f%pars_xy(ind_thick_4_win_r,j,i) /= building_pars_f%fill ) & |
---|
| 5650 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win_r,j,i) |
---|
[2737] | 5651 | |
---|
[3418] | 5652 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
| 5653 | surf_usm_h%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
| 5654 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
| 5655 | surf_usm_h%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
| 5656 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
| 5657 | surf_usm_h%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
| 5658 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
| 5659 | surf_usm_h%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
| 5660 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
| 5661 | surf_usm_h%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
| 5662 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
| 5663 | surf_usm_h%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
| 5664 | |
---|
| 5665 | IF ( building_pars_f%pars_xy(ind_green_type_roof,j,i) /= building_pars_f%fill ) & |
---|
| 5666 | surf_usm_h%green_type_roof(m) = building_pars_f%pars_xy(ind_green_type_roof,j,i) |
---|
[2737] | 5667 | ENDDO |
---|
| 5668 | |
---|
| 5669 | |
---|
| 5670 | |
---|
| 5671 | DO l = 0, 3 |
---|
| 5672 | DO m = 1, surf_usm_v(l)%ns |
---|
| 5673 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
| 5674 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
| 5675 | |
---|
| 5676 | ! |
---|
| 5677 | !-- In order to distinguish between ground floor level and |
---|
[3418] | 5678 | !-- above-ground-floor level surfaces, set input indices. |
---|
| 5679 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
| 5680 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5681 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
| 5682 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5683 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
| 5684 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5685 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
| 5686 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5687 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
| 5688 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5689 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
| 5690 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5691 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
| 5692 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5693 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
| 5694 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5695 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
| 5696 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5697 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
| 5698 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5699 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
| 5700 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5701 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
| 5702 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5703 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
| 5704 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5705 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
| 5706 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5707 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
| 5708 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5709 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
| 5710 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5711 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
| 5712 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5713 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
| 5714 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5715 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
| 5716 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5717 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
| 5718 | surf_usm_v(l)%ground_level(m) ) |
---|
[3418] | 5719 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
| 5720 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5721 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
| 5722 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5723 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
| 5724 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5725 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
| 5726 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5727 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
| 5728 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5729 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
| 5730 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5731 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
| 5732 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5733 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
| 5734 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5735 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
| 5736 | surf_usm_v(l)%ground_level(m) ) |
---|
[2737] | 5737 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
| 5738 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5739 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
| 5740 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5741 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
| 5742 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5743 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
| 5744 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5745 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
| 5746 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5747 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
| 5748 | surf_usm_v(l)%ground_level(m) ) |
---|
| 5749 | |
---|
| 5750 | ! |
---|
| 5751 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
| 5752 | IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= & |
---|
| 5753 | building_pars_f%fill ) & |
---|
[2963] | 5754 | surf_usm_v(l)%frac(ind_veg_wall,m) = & |
---|
| 5755 | building_pars_f%pars_xy(ind_wall_frac,j,i) |
---|
[2737] | 5756 | IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /= & |
---|
| 5757 | building_pars_f%fill ) & |
---|
[2963] | 5758 | surf_usm_v(l)%frac(ind_pav_green,m) = & |
---|
| 5759 | building_pars_f%pars_xy(ind_green_frac_w,j,i) |
---|
[2737] | 5760 | IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= & |
---|
| 5761 | building_pars_f%fill ) & |
---|
[2963] | 5762 | surf_usm_v(l)%frac(ind_wat_win,m) = & |
---|
| 5763 | building_pars_f%pars_xy(ind_win_frac,j,i) |
---|
[2737] | 5764 | |
---|
| 5765 | IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill ) & |
---|
| 5766 | surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i) |
---|
| 5767 | |
---|
| 5768 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) & |
---|
| 5769 | THEN |
---|
| 5770 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = & |
---|
| 5771 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
| 5772 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = & |
---|
| 5773 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
| 5774 | ENDIF |
---|
| 5775 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
| 5776 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = & |
---|
| 5777 | building_pars_f%pars_xy(ind_hc2,j,i) |
---|
| 5778 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
| 5779 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = & |
---|
| 5780 | building_pars_f%pars_xy(ind_hc3,j,i) |
---|
| 5781 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
| 5782 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = & |
---|
[3418] | 5783 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
[2737] | 5784 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = & |
---|
[3418] | 5785 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
[2737] | 5786 | ENDIF |
---|
| 5787 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
[3418] | 5788 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2,j,i) |
---|
[2737] | 5789 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
[3418] | 5790 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3,j,i) |
---|
| 5791 | IF ( building_pars_f%pars_xy(ind_hc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
| 5792 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
| 5793 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
[2737] | 5794 | ENDIF |
---|
[3418] | 5795 | IF ( building_pars_f%pars_xy(ind_hc2_win,j,i) /= building_pars_f%fill ) & |
---|
| 5796 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win,j,i) |
---|
| 5797 | IF ( building_pars_f%pars_xy(ind_hc3_win,j,i) /= building_pars_f%fill ) & |
---|
| 5798 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win,j,i) |
---|
[2737] | 5799 | |
---|
| 5800 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
| 5801 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
| 5802 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
| 5803 | ENDIF |
---|
| 5804 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
| 5805 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
| 5806 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
| 5807 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
| 5808 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
[3418] | 5809 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
| 5810 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
[2737] | 5811 | ENDIF |
---|
| 5812 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
[3418] | 5813 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc2,j,i) |
---|
[2737] | 5814 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
[3418] | 5815 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc3,j,i) |
---|
| 5816 | IF ( building_pars_f%pars_xy(ind_tc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
| 5817 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
| 5818 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
[2737] | 5819 | ENDIF |
---|
[3418] | 5820 | IF ( building_pars_f%pars_xy(ind_tc2_win,j,i) /= building_pars_f%fill ) & |
---|
| 5821 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win,j,i) |
---|
| 5822 | IF ( building_pars_f%pars_xy(ind_tc3_win,j,i) /= building_pars_f%fill ) & |
---|
| 5823 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win,j,i) |
---|
[2737] | 5824 | |
---|
[3418] | 5825 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
| 5826 | surf_usm_v(l)%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
| 5827 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
| 5828 | surf_usm_v(l)%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
[2737] | 5829 | |
---|
| 5830 | IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill ) & |
---|
[2963] | 5831 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall,j,i) |
---|
[2737] | 5832 | IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )& |
---|
[2963] | 5833 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green,j,i) |
---|
[2737] | 5834 | IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill ) & |
---|
[2963] | 5835 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win,j,i) |
---|
[2737] | 5836 | |
---|
| 5837 | IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill ) & |
---|
| 5838 | surf_usm_v(l)%transmissivity(m) = building_pars_f%pars_xy(ind_trans,j,i) |
---|
| 5839 | |
---|
| 5840 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
| 5841 | surf_usm_v(l)%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
| 5842 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
| 5843 | surf_usm_v(l)%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
| 5844 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
| 5845 | surf_usm_v(l)%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
| 5846 | |
---|
| 5847 | IF ( building_pars_f%pars_xy(ind_alb_wall,j,i) /= building_pars_f%fill ) & |
---|
[2963] | 5848 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall,j,i) |
---|
[2737] | 5849 | IF ( building_pars_f%pars_xy(ind_alb_green,j,i) /= building_pars_f%fill ) & |
---|
[2963] | 5850 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green,j,i) |
---|
[2737] | 5851 | IF ( building_pars_f%pars_xy(ind_alb_win,j,i) /= building_pars_f%fill ) & |
---|
[2963] | 5852 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win,j,i) |
---|
[2737] | 5853 | |
---|
| 5854 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
| 5855 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
| 5856 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
| 5857 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
| 5858 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
| 5859 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
| 5860 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
| 5861 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
| 5862 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
| 5863 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
| 5864 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
| 5865 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
| 5866 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
| 5867 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
| 5868 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
| 5869 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
[3418] | 5870 | IF ( building_pars_f%pars_xy(ind_thick_1_win,j,i) /= building_pars_f%fill ) & |
---|
| 5871 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win,j,i) |
---|
| 5872 | IF ( building_pars_f%pars_xy(ind_thick_2_win,j,i) /= building_pars_f%fill ) & |
---|
| 5873 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win,j,i) |
---|
| 5874 | IF ( building_pars_f%pars_xy(ind_thick_3_win,j,i) /= building_pars_f%fill ) & |
---|
| 5875 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win,j,i) |
---|
| 5876 | IF ( building_pars_f%pars_xy(ind_thick_4_win,j,i) /= building_pars_f%fill ) & |
---|
| 5877 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win,j,i) |
---|
[2737] | 5878 | |
---|
[3418] | 5879 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
| 5880 | surf_usm_v(l)%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
| 5881 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
| 5882 | surf_usm_v(l)%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
| 5883 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
| 5884 | surf_usm_v(l)%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
| 5885 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
| 5886 | surf_usm_v(l)%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
| 5887 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
| 5888 | surf_usm_v(l)%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
| 5889 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
| 5890 | surf_usm_v(l)%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
[2737] | 5891 | |
---|
| 5892 | ENDDO |
---|
| 5893 | ENDDO |
---|
| 5894 | ENDIF |
---|
| 5895 | ! |
---|
| 5896 | !-- Read the surface_types array. |
---|
| 5897 | !-- Please note, here also initialization of surface attributes is done as |
---|
| 5898 | !-- long as _urbsurf and _surfpar files are available. Values from above |
---|
| 5899 | !-- will be overwritten. This might be removed later, but is still in the |
---|
| 5900 | !-- code to enable compatibility with older model version. |
---|
| 5901 | CALL usm_read_urban_surface_types() |
---|
| 5902 | |
---|
| 5903 | !-- init material heat model |
---|
| 5904 | CALL usm_init_material_model() |
---|
| 5905 | |
---|
| 5906 | !-- init anthropogenic sources of heat |
---|
| 5907 | IF ( usm_anthropogenic_heat ) THEN |
---|
| 5908 | !-- init anthropogenic sources of heat (from transportation for now) |
---|
| 5909 | CALL usm_read_anthropogenic_heat() |
---|
| 5910 | ENDIF |
---|
[2920] | 5911 | |
---|
[2737] | 5912 | IF ( plant_canopy ) THEN |
---|
| 5913 | |
---|
| 5914 | IF ( .NOT. ALLOCATED( pc_heating_rate) ) THEN |
---|
| 5915 | !-- then pc_heating_rate is allocated in init_plant_canopy |
---|
| 5916 | !-- in case of cthf /= 0 => we need to allocate it for our use here |
---|
| 5917 | ALLOCATE( pc_heating_rate(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[3014] | 5918 | |
---|
| 5919 | pc_heating_rate = 0.0_wp |
---|
| 5920 | |
---|
[2737] | 5921 | ENDIF |
---|
[3014] | 5922 | |
---|
| 5923 | IF ( .NOT. ALLOCATED( pc_transpiration_rate) ) THEN |
---|
| 5924 | !-- then pc_heating_rate is allocated in init_plant_canopy |
---|
| 5925 | !-- in case of cthf /= 0 => we need to allocate it for our use here |
---|
| 5926 | ALLOCATE( pc_transpiration_rate(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 5927 | |
---|
| 5928 | pc_transpiration_rate = 0.0_wp |
---|
| 5929 | |
---|
| 5930 | |
---|
| 5931 | ENDIF |
---|
[2737] | 5932 | ENDIF |
---|
[3091] | 5933 | ! |
---|
| 5934 | !-- Check for consistent initialization. |
---|
[3136] | 5935 | !-- Check if roughness length for momentum, or heat, exceed surface-layer |
---|
| 5936 | !-- height and decrease local roughness length where necessary. |
---|
[3091] | 5937 | DO m = 1, surf_usm_h%ns |
---|
| 5938 | IF ( surf_usm_h%z0(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
| 5939 | |
---|
| 5940 | surf_usm_h%z0(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
| 5941 | |
---|
| 5942 | WRITE( message_string, * ) 'z0 exceeds surface-layer height ' // & |
---|
| 5943 | 'at horizontal urban surface and is ' // & |
---|
| 5944 | 'decreased appropriately at grid point (i,j) = ', & |
---|
| 5945 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
| 5946 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
| 5947 | 0, 0, 0, 6, 0 ) |
---|
| 5948 | ENDIF |
---|
[3136] | 5949 | IF ( surf_usm_h%z0h(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
| 5950 | |
---|
| 5951 | surf_usm_h%z0h(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
| 5952 | surf_usm_h%z0q(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
| 5953 | |
---|
| 5954 | WRITE( message_string, * ) 'z0h exceeds surface-layer height ' // & |
---|
| 5955 | 'at horizontal urban surface and is ' // & |
---|
| 5956 | 'decreased appropriately at grid point (i,j) = ', & |
---|
| 5957 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
| 5958 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
| 5959 | 0, 0, 0, 6, 0 ) |
---|
| 5960 | ENDIF |
---|
[3091] | 5961 | ENDDO |
---|
| 5962 | |
---|
| 5963 | DO l = 0, 3 |
---|
| 5964 | DO m = 1, surf_usm_v(l)%ns |
---|
| 5965 | IF ( surf_usm_v(l)%z0(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
| 5966 | |
---|
| 5967 | surf_usm_v(l)%z0(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
| 5968 | |
---|
| 5969 | WRITE( message_string, * ) 'z0 exceeds surface-layer height '//& |
---|
| 5970 | 'at vertical urban surface and is ' // & |
---|
| 5971 | 'decreased appropriately at grid point (i,j) = ', & |
---|
| 5972 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
| 5973 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
| 5974 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
| 5975 | 0, 0, 0, 6, 0 ) |
---|
| 5976 | ENDIF |
---|
[3136] | 5977 | IF ( surf_usm_v(l)%z0h(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
| 5978 | |
---|
| 5979 | surf_usm_v(l)%z0h(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
| 5980 | surf_usm_v(l)%z0q(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
| 5981 | |
---|
| 5982 | WRITE( message_string, * ) 'z0h exceeds surface-layer height '//& |
---|
| 5983 | 'at vertical urban surface and is ' // & |
---|
| 5984 | 'decreased appropriately at grid point (i,j) = ', & |
---|
| 5985 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
| 5986 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
| 5987 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
| 5988 | 0, 0, 0, 6, 0 ) |
---|
| 5989 | ENDIF |
---|
[3091] | 5990 | ENDDO |
---|
| 5991 | ENDDO |
---|
[2737] | 5992 | |
---|
| 5993 | !-- Intitialization of the surface and wall/ground/roof temperature |
---|
| 5994 | |
---|
| 5995 | !-- Initialization for restart runs |
---|
| 5996 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. & |
---|
| 5997 | TRIM( initializing_actions ) /= 'cyclic_fill' ) THEN |
---|
| 5998 | |
---|
| 5999 | ! |
---|
[3418] | 6000 | !-- At horizontal surfaces. Please note, t_surf_wall_h is defined on a |
---|
[2737] | 6001 | !-- different data type, but with the same dimension. |
---|
| 6002 | #if ! defined( __nopointer ) |
---|
| 6003 | DO m = 1, surf_usm_h%ns |
---|
| 6004 | i = surf_usm_h%i(m) |
---|
| 6005 | j = surf_usm_h%j(m) |
---|
| 6006 | k = surf_usm_h%k(m) |
---|
| 6007 | |
---|
[3418] | 6008 | t_surf_wall_h(m) = pt(k,j,i) * exner(k) |
---|
[3274] | 6009 | t_surf_window_h(m) = pt(k,j,i) * exner(k) |
---|
| 6010 | t_surf_green_h(m) = pt(k,j,i) * exner(k) |
---|
| 6011 | surf_usm_h%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
[2737] | 6012 | ENDDO |
---|
| 6013 | ! |
---|
| 6014 | !-- At vertical surfaces. |
---|
| 6015 | DO l = 0, 3 |
---|
| 6016 | DO m = 1, surf_usm_v(l)%ns |
---|
| 6017 | i = surf_usm_v(l)%i(m) |
---|
| 6018 | j = surf_usm_v(l)%j(m) |
---|
| 6019 | k = surf_usm_v(l)%k(m) |
---|
| 6020 | |
---|
[3418] | 6021 | t_surf_wall_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
[3274] | 6022 | t_surf_window_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
| 6023 | t_surf_green_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
| 6024 | surf_usm_v(l)%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
[2737] | 6025 | ENDDO |
---|
| 6026 | ENDDO |
---|
| 6027 | #endif |
---|
[3152] | 6028 | ! |
---|
| 6029 | !-- For the sake of correct initialization, set also q_surface. |
---|
| 6030 | !-- Note, at urban surfaces q_surface is initialized with 0. |
---|
| 6031 | IF ( humidity ) THEN |
---|
| 6032 | DO m = 1, surf_usm_h%ns |
---|
| 6033 | surf_usm_h%q_surface(m) = 0.0_wp |
---|
| 6034 | ENDDO |
---|
| 6035 | DO l = 0, 3 |
---|
| 6036 | DO m = 1, surf_usm_v(l)%ns |
---|
| 6037 | surf_usm_v(l)%q_surface(m) = 0.0_wp |
---|
| 6038 | ENDDO |
---|
| 6039 | ENDDO |
---|
| 6040 | ENDIF |
---|
[2737] | 6041 | |
---|
| 6042 | !-- initial values for t_wall |
---|
| 6043 | !-- outer value is set to surface temperature |
---|
| 6044 | !-- inner value is set to wall_inner_temperature |
---|
| 6045 | !-- and profile is logaritmic (linear in nz). |
---|
| 6046 | !-- Horizontal surfaces |
---|
| 6047 | DO m = 1, surf_usm_h%ns |
---|
| 6048 | ! |
---|
| 6049 | !-- Roof |
---|
| 6050 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
| 6051 | tin = roof_inner_temperature |
---|
| 6052 | twin = window_inner_temperature |
---|
| 6053 | ! |
---|
| 6054 | !-- Normal land surface |
---|
| 6055 | ELSE |
---|
| 6056 | tin = soil_inner_temperature |
---|
| 6057 | twin = window_inner_temperature |
---|
| 6058 | ENDIF |
---|
| 6059 | |
---|
| 6060 | DO k = nzb_wall, nzt_wall+1 |
---|
| 6061 | c = REAL( k - nzb_wall, wp ) / & |
---|
| 6062 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
| 6063 | |
---|
[3418] | 6064 | t_wall_h(k,m) = ( 1.0_wp - c ) * t_surf_wall_h(m) + c * tin |
---|
[2737] | 6065 | t_window_h(k,m) = ( 1.0_wp - c ) * t_surf_window_h(m) + c * twin |
---|
[3418] | 6066 | t_green_h(k,m) = t_surf_wall_h(m) |
---|
| 6067 | swc_h(k,m) = 0.5_wp |
---|
| 6068 | swc_sat_h(k,m) = 0.95_wp |
---|
| 6069 | swc_res_h(k,m) = 0.05_wp |
---|
| 6070 | rootfr_h(k,m) = 0.1_wp |
---|
| 6071 | wilt_h(k,m) = 0.1_wp |
---|
| 6072 | fc_h(k,m) = 0.9_wp |
---|
[2737] | 6073 | ENDDO |
---|
| 6074 | ENDDO |
---|
| 6075 | ! |
---|
| 6076 | !-- Vertical surfaces |
---|
| 6077 | DO l = 0, 3 |
---|
| 6078 | DO m = 1, surf_usm_v(l)%ns |
---|
| 6079 | ! |
---|
| 6080 | !-- Inner wall |
---|
| 6081 | tin = wall_inner_temperature |
---|
| 6082 | twin = window_inner_temperature |
---|
| 6083 | |
---|
| 6084 | DO k = nzb_wall, nzt_wall+1 |
---|
| 6085 | c = REAL( k - nzb_wall, wp ) / & |
---|
| 6086 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
[3418] | 6087 | t_wall_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_wall_v(l)%t(m) + c * tin |
---|
[2737] | 6088 | t_window_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_window_v(l)%t(m) + c * twin |
---|
[3418] | 6089 | t_green_v(l)%t(k,m) = t_surf_wall_v(l)%t(m) |
---|
| 6090 | swc_v(l)%t(k,m) = 0.5_wp |
---|
[2737] | 6091 | ENDDO |
---|
| 6092 | ENDDO |
---|
| 6093 | ENDDO |
---|
[2920] | 6094 | ELSE |
---|
| 6095 | !-- If specified, replace constant wall temperatures with fully 3D values from file |
---|
| 6096 | IF ( read_wall_temp_3d ) CALL usm_read_wall_temperature() |
---|
| 6097 | ! |
---|
[2737] | 6098 | ENDIF |
---|
| 6099 | |
---|
| 6100 | !-- |
---|
| 6101 | !-- Possibly DO user-defined actions (e.g. define heterogeneous wall surface) |
---|
| 6102 | CALL user_init_urban_surface |
---|
| 6103 | |
---|
| 6104 | !-- initialize prognostic values for the first timestep |
---|
[3418] | 6105 | t_surf_wall_h_p = t_surf_wall_h |
---|
| 6106 | t_surf_wall_v_p = t_surf_wall_v |
---|
[2737] | 6107 | t_surf_window_h_p = t_surf_window_h |
---|
| 6108 | t_surf_window_v_p = t_surf_window_v |
---|
| 6109 | t_surf_green_h_p = t_surf_green_h |
---|
| 6110 | t_surf_green_v_p = t_surf_green_v |
---|
| 6111 | t_surf_10cm_h_p = t_surf_10cm_h |
---|
| 6112 | t_surf_10cm_v_p = t_surf_10cm_v |
---|
| 6113 | |
---|
| 6114 | t_wall_h_p = t_wall_h |
---|
| 6115 | t_wall_v_p = t_wall_v |
---|
| 6116 | t_window_h_p = t_window_h |
---|
| 6117 | t_window_v_p = t_window_v |
---|
| 6118 | t_green_h_p = t_green_h |
---|
| 6119 | t_green_v_p = t_green_v |
---|
[2920] | 6120 | |
---|
| 6121 | !-- Adjust radiative fluxes for urban surface at model start |
---|
| 6122 | !CALL radiation_interaction |
---|
| 6123 | !-- TODO: interaction should be called once before first output, |
---|
| 6124 | !-- that is not yet possible. |
---|
[2737] | 6125 | |
---|
[3418] | 6126 | m_liq_usm_h_p = m_liq_usm_h |
---|
| 6127 | m_liq_usm_v_p = m_liq_usm_v |
---|
| 6128 | !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
| 6129 | ! |
---|
| 6130 | !-- Set initial values for prognostic quantities |
---|
| 6131 | !-- Horizontal surfaces |
---|
| 6132 | tm_liq_usm_h_m%var_usm_1d = 0.0_wp |
---|
| 6133 | surf_usm_h%c_liq = 0.0_wp |
---|
| 6134 | |
---|
| 6135 | surf_usm_h%qsws_liq_eb = 0.0_wp |
---|
| 6136 | surf_usm_h%qsws_veg_eb = 0.0_wp |
---|
| 6137 | |
---|
| 6138 | ! |
---|
| 6139 | !-- Do the same for vertical surfaces |
---|
| 6140 | DO l = 0, 3 |
---|
| 6141 | tm_liq_usm_v_m(l)%var_usm_1d = 0.0_wp |
---|
| 6142 | surf_usm_v(l)%c_liq = 0.0_wp |
---|
| 6143 | |
---|
| 6144 | surf_usm_v(l)%qsws_liq_eb = 0.0_wp |
---|
| 6145 | surf_usm_v(l)%qsws_veg_eb = 0.0_wp |
---|
| 6146 | ENDDO |
---|
| 6147 | |
---|
| 6148 | ! |
---|
| 6149 | !-- Set initial values for prognostic soil quantities |
---|
| 6150 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN |
---|
| 6151 | m_liq_usm_h%var_usm_1d = 0.0_wp |
---|
| 6152 | |
---|
| 6153 | DO l = 0, 3 |
---|
| 6154 | m_liq_usm_v(l)%var_usm_1d = 0.0_wp |
---|
| 6155 | ENDDO |
---|
| 6156 | ENDIF |
---|
| 6157 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
| 6158 | |
---|
[2737] | 6159 | CALL cpu_log( log_point_s(78), 'usm_init', 'stop' ) |
---|
| 6160 | |
---|
| 6161 | END SUBROUTINE usm_init_urban_surface |
---|
| 6162 | |
---|
| 6163 | |
---|
| 6164 | !------------------------------------------------------------------------------! |
---|
| 6165 | ! Description: |
---|
| 6166 | ! ------------ |
---|
| 6167 | ! |
---|
| 6168 | !> Wall model as part of the urban surface model. The model predicts wall |
---|
| 6169 | !> temperature. |
---|
| 6170 | !------------------------------------------------------------------------------! |
---|
[3418] | 6171 | SUBROUTINE usm_material_heat_model( spinup ) |
---|
[2737] | 6172 | |
---|
| 6173 | |
---|
| 6174 | IMPLICIT NONE |
---|
| 6175 | |
---|
| 6176 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
| 6177 | |
---|
| 6178 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wtend, wintend !< tendency |
---|
[3418] | 6179 | REAL(wp) :: win_absorp !absorption coefficient from transmissivity |
---|
| 6180 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wall_mod |
---|
[2737] | 6181 | |
---|
[3418] | 6182 | LOGICAL :: spinup !if true, no calculation of window temperatures |
---|
| 6183 | |
---|
| 6184 | wall_mod=1.0_wp |
---|
| 6185 | if (usm_wall_mod .AND. spinup) then |
---|
| 6186 | do kw=nzb_wall,nzb_wall+1 |
---|
| 6187 | wall_mod(kw)=0.1_wp |
---|
| 6188 | enddo |
---|
| 6189 | endif |
---|
| 6190 | |
---|
[2737] | 6191 | ! |
---|
| 6192 | !-- For horizontal surfaces |
---|
| 6193 | DO m = 1, surf_usm_h%ns |
---|
| 6194 | ! |
---|
| 6195 | !-- Obtain indices |
---|
| 6196 | i = surf_usm_h%i(m) |
---|
| 6197 | j = surf_usm_h%j(m) |
---|
| 6198 | k = surf_usm_h%k(m) |
---|
| 6199 | ! |
---|
| 6200 | !-- prognostic equation for ground/roof temperature t_wall_h |
---|
| 6201 | wtend(:) = 0.0_wp |
---|
| 6202 | wtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzb_wall,m)) * & |
---|
[3418] | 6203 | ( surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
[2737] | 6204 | ( t_wall_h(nzb_wall+1,m) & |
---|
| 6205 | - t_wall_h(nzb_wall,m) ) * & |
---|
| 6206 | surf_usm_h%ddz_wall(nzb_wall+1,m) & |
---|
[2963] | 6207 | + surf_usm_h%frac(ind_veg_wall,m) & |
---|
| 6208 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
| 6209 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
[2737] | 6210 | * surf_usm_h%wghf_eb(m) & |
---|
[2963] | 6211 | - surf_usm_h%frac(ind_pav_green,m) & |
---|
| 6212 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
| 6213 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
[3418] | 6214 | * ( surf_usm_h%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
[2737] | 6215 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
[3418] | 6216 | + surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) & |
---|
[2737] | 6217 | * surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
| 6218 | / ( surf_usm_h%ddz_green(nzt_wall,m) & |
---|
| 6219 | + surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
| 6220 | * ( t_wall_h(nzb_wall,m) & |
---|
| 6221 | - t_green_h(nzt_wall,m) ) ) * & |
---|
| 6222 | surf_usm_h%ddz_wall_stag(nzb_wall,m) |
---|
| 6223 | |
---|
| 6224 | IF ( indoor_model ) then |
---|
| 6225 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
| 6226 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
[3418] | 6227 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
[2737] | 6228 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
| 6229 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
[3418] | 6230 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
[2737] | 6231 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
| 6232 | * surf_usm_h%ddz_wall(kw,m) & |
---|
| 6233 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
| 6234 | ENDDO |
---|
| 6235 | wtend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzt_wall,m)) * & |
---|
[3418] | 6236 | ( -surf_usm_h%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1) * & |
---|
[2737] | 6237 | ( t_wall_h(nzt_wall,m) & |
---|
| 6238 | - t_wall_h(nzt_wall-1,m) ) * & |
---|
| 6239 | surf_usm_h%ddz_wall(nzt_wall,m) & |
---|
| 6240 | + surf_usm_h%iwghf_eb(m) ) * & |
---|
| 6241 | surf_usm_h%ddz_wall_stag(nzt_wall,m) |
---|
| 6242 | ELSE |
---|
| 6243 | DO kw = nzb_wall+1, nzt_wall |
---|
| 6244 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
[3418] | 6245 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
[2737] | 6246 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
| 6247 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
[3418] | 6248 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
[2737] | 6249 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
| 6250 | * surf_usm_h%ddz_wall(kw,m) & |
---|
| 6251 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
| 6252 | ENDDO |
---|
| 6253 | ENDIF |
---|
| 6254 | |
---|
| 6255 | t_wall_h_p(nzb_wall:nzt_wall,m) = t_wall_h(nzb_wall:nzt_wall,m) & |
---|
| 6256 | + dt_3d * ( tsc(2) & |
---|
| 6257 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
| 6258 | * surf_usm_h%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
| 6259 | |
---|
[3418] | 6260 | if (.NOT. spinup) then |
---|
| 6261 | win_absorp = -log(surf_usm_h%transmissivity(m)) / surf_usm_h%zw_window(nzt_wall,m) |
---|
[2737] | 6262 | !-- prognostic equation for ground/roof window temperature t_window_h |
---|
| 6263 | wintend(:) = 0.0_wp |
---|
| 6264 | wintend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzb_wall,m)) * & |
---|
| 6265 | ( surf_usm_h%lambda_h_window(nzb_wall,m) * & |
---|
| 6266 | ( t_window_h(nzb_wall+1,m) & |
---|
| 6267 | - t_window_h(nzb_wall,m) ) * & |
---|
| 6268 | surf_usm_h%ddz_window(nzb_wall+1,m) & |
---|
| 6269 | + surf_usm_h%wghf_eb_window(m) & |
---|
| 6270 | + surf_usm_h%rad_sw_in(m) & |
---|
[3418] | 6271 | * (1.0_wp - exp(-win_absorp & |
---|
[2737] | 6272 | * surf_usm_h%zw_window(nzb_wall,m) ) ) & |
---|
| 6273 | ) * surf_usm_h%ddz_window_stag(nzb_wall,m) |
---|
| 6274 | |
---|
| 6275 | IF ( indoor_model ) then |
---|
| 6276 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
| 6277 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
| 6278 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
| 6279 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
| 6280 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
| 6281 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
| 6282 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
| 6283 | * surf_usm_h%ddz_window(kw,m) & |
---|
| 6284 | + surf_usm_h%rad_sw_in(m) & |
---|
[3418] | 6285 | * (exp(-win_absorp & |
---|
[2737] | 6286 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
[3418] | 6287 | - exp(-win_absorp & |
---|
[2737] | 6288 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
| 6289 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
| 6290 | |
---|
| 6291 | ENDDO |
---|
[3418] | 6292 | wintend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzt_wall,m)) * & |
---|
| 6293 | ( -surf_usm_h%lambda_h_window(nzt_wall-1,m) * & |
---|
| 6294 | ( t_window_h(nzt_wall,m) & |
---|
| 6295 | - t_window_h(nzt_wall-1,m) ) * & |
---|
| 6296 | surf_usm_h%ddz_window(nzt_wall,m) & |
---|
| 6297 | + surf_usm_h%iwghf_eb_window(m) & |
---|
| 6298 | + surf_usm_h%rad_sw_in(m) & |
---|
| 6299 | * (exp(-win_absorp & |
---|
| 6300 | * surf_usm_h%zw_window(nzt_wall-1,m) ) & |
---|
| 6301 | - exp(-win_absorp & |
---|
| 6302 | * surf_usm_h%zw_window(nzt_wall,m) ) ) & |
---|
[2737] | 6303 | ) * surf_usm_h%ddz_window_stag(nzt_wall,m) |
---|
| 6304 | ELSE |
---|
| 6305 | DO kw = nzb_wall+1, nzt_wall |
---|
| 6306 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
| 6307 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
| 6308 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
| 6309 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
| 6310 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
| 6311 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
| 6312 | * surf_usm_h%ddz_window(kw,m) & |
---|
| 6313 | + surf_usm_h%rad_sw_in(m) & |
---|
[3418] | 6314 | * (exp(-win_absorp & |
---|
[2737] | 6315 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
[3418] | 6316 | - exp(-win_absorp & |
---|
[2737] | 6317 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
| 6318 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
| 6319 | |
---|
| 6320 | ENDDO |
---|
| 6321 | ENDIF |
---|
| 6322 | |
---|
| 6323 | t_window_h_p(nzb_wall:nzt_wall,m) = t_window_h(nzb_wall:nzt_wall,m) & |
---|
| 6324 | + dt_3d * ( tsc(2) & |
---|
| 6325 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
| 6326 | * surf_usm_h%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
[3337] | 6327 | |
---|
[3418] | 6328 | endif |
---|
| 6329 | |
---|
[2737] | 6330 | ! |
---|
| 6331 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
| 6332 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 6333 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
| 6334 | DO kw = nzb_wall, nzt_wall |
---|
| 6335 | surf_usm_h%tt_wall_m(kw,m) = wtend(kw) |
---|
| 6336 | ENDDO |
---|
| 6337 | ELSEIF ( intermediate_timestep_count < & |
---|
| 6338 | intermediate_timestep_count_max ) THEN |
---|
| 6339 | DO kw = nzb_wall, nzt_wall |
---|
| 6340 | surf_usm_h%tt_wall_m(kw,m) = -9.5625_wp * wtend(kw) + & |
---|
| 6341 | 5.3125_wp * surf_usm_h%tt_wall_m(kw,m) |
---|
| 6342 | ENDDO |
---|
| 6343 | ENDIF |
---|
| 6344 | ENDIF |
---|
| 6345 | |
---|
[3418] | 6346 | if (.NOT. spinup) then |
---|
[2737] | 6347 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
| 6348 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 6349 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
| 6350 | DO kw = nzb_wall, nzt_wall |
---|
| 6351 | surf_usm_h%tt_window_m(kw,m) = wintend(kw) |
---|
| 6352 | ENDDO |
---|
| 6353 | ELSEIF ( intermediate_timestep_count < & |
---|
| 6354 | intermediate_timestep_count_max ) THEN |
---|
| 6355 | DO kw = nzb_wall, nzt_wall |
---|
| 6356 | surf_usm_h%tt_window_m(kw,m) = -9.5625_wp * wintend(kw) + & |
---|
| 6357 | 5.3125_wp * surf_usm_h%tt_window_m(kw,m) |
---|
| 6358 | ENDDO |
---|
| 6359 | ENDIF |
---|
| 6360 | ENDIF |
---|
[3418] | 6361 | |
---|
| 6362 | endif |
---|
| 6363 | |
---|
[2737] | 6364 | ENDDO |
---|
| 6365 | |
---|
| 6366 | ! |
---|
| 6367 | !-- For vertical surfaces |
---|
| 6368 | DO l = 0, 3 |
---|
| 6369 | DO m = 1, surf_usm_v(l)%ns |
---|
| 6370 | ! |
---|
| 6371 | !-- Obtain indices |
---|
| 6372 | i = surf_usm_v(l)%i(m) |
---|
| 6373 | j = surf_usm_v(l)%j(m) |
---|
| 6374 | k = surf_usm_v(l)%k(m) |
---|
| 6375 | ! |
---|
| 6376 | !-- prognostic equation for wall temperature t_wall_v |
---|
| 6377 | wtend(:) = 0.0_wp |
---|
| 6378 | |
---|
| 6379 | wtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzb_wall,m)) * & |
---|
[3418] | 6380 | ( surf_usm_v(l)%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
[2737] | 6381 | ( t_wall_v(l)%t(nzb_wall+1,m) & |
---|
| 6382 | - t_wall_v(l)%t(nzb_wall,m) ) * & |
---|
| 6383 | surf_usm_v(l)%ddz_wall(nzb_wall+1,m) & |
---|
[2963] | 6384 | + surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
| 6385 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
| 6386 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
[2737] | 6387 | * surf_usm_v(l)%wghf_eb(m) & |
---|
[2963] | 6388 | - surf_usm_v(l)%frac(ind_pav_green,m) & |
---|
| 6389 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
| 6390 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
[3418] | 6391 | * ( surf_usm_v(l)%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
[2737] | 6392 | * surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
[3418] | 6393 | + surf_usm_v(l)%lambda_h(nzb_wall,m)* wall_mod(nzb_wall) & |
---|
[2737] | 6394 | * surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
| 6395 | / ( surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
| 6396 | + surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
| 6397 | * ( t_wall_v(l)%t(nzb_wall,m) & |
---|
| 6398 | - t_green_v(l)%t(nzt_wall,m) ) ) * & |
---|
| 6399 | surf_usm_v(l)%ddz_wall_stag(nzb_wall,m) |
---|
| 6400 | |
---|
| 6401 | IF ( indoor_model ) then |
---|
| 6402 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
| 6403 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
[3418] | 6404 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
[2737] | 6405 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
| 6406 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
[3418] | 6407 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
[2737] | 6408 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
| 6409 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
| 6410 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
| 6411 | ENDDO |
---|
| 6412 | wtend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzt_wall,m)) * & |
---|
[3418] | 6413 | ( -surf_usm_v(l)%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1)* & |
---|
[2737] | 6414 | ( t_wall_v(l)%t(nzt_wall,m) & |
---|
| 6415 | - t_wall_v(l)%t(nzt_wall-1,m) ) * & |
---|
| 6416 | surf_usm_v(l)%ddz_wall(nzt_wall,m) & |
---|
| 6417 | + surf_usm_v(l)%iwghf_eb(m) ) * & |
---|
| 6418 | surf_usm_v(l)%ddz_wall_stag(nzt_wall,m) |
---|
| 6419 | ELSE |
---|
| 6420 | DO kw = nzb_wall+1, nzt_wall |
---|
| 6421 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
[3418] | 6422 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
[2737] | 6423 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
| 6424 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
[3418] | 6425 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
[2737] | 6426 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
| 6427 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
| 6428 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
| 6429 | ENDDO |
---|
| 6430 | ENDIF |
---|
| 6431 | |
---|
| 6432 | t_wall_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
| 6433 | t_wall_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
| 6434 | + dt_3d * ( tsc(2) & |
---|
| 6435 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
| 6436 | * surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
| 6437 | |
---|
[3418] | 6438 | if (.NOT. spinup) then |
---|
| 6439 | win_absorp = -log(surf_usm_v(l)%transmissivity(m)) / surf_usm_v(l)%zw_window(nzt_wall,m) |
---|
[2737] | 6440 | !-- prognostic equation for window temperature t_window_v |
---|
| 6441 | wintend(:) = 0.0_wp |
---|
| 6442 | wintend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzb_wall,m)) * & |
---|
| 6443 | ( surf_usm_v(l)%lambda_h_window(nzb_wall,m) * & |
---|
| 6444 | ( t_window_v(l)%t(nzb_wall+1,m) & |
---|
| 6445 | - t_window_v(l)%t(nzb_wall,m) ) * & |
---|
| 6446 | surf_usm_v(l)%ddz_window(nzb_wall+1,m) & |
---|
| 6447 | + surf_usm_v(l)%wghf_eb_window(m) & |
---|
| 6448 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
[3418] | 6449 | * (1.0_wp - exp(-win_absorp & |
---|
[2737] | 6450 | * surf_usm_v(l)%zw_window(nzb_wall,m) ) ) & |
---|
| 6451 | ) * surf_usm_v(l)%ddz_window_stag(nzb_wall,m) |
---|
| 6452 | |
---|
| 6453 | IF ( indoor_model ) then |
---|
| 6454 | DO kw = nzb_wall+1, nzt_wall -1 |
---|
| 6455 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
| 6456 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
| 6457 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
| 6458 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
| 6459 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
| 6460 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
| 6461 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
| 6462 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
[3418] | 6463 | * (exp(-win_absorp & |
---|
[2737] | 6464 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
[3418] | 6465 | - exp(-win_absorp & |
---|
[2737] | 6466 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
| 6467 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
| 6468 | ENDDO |
---|
[3418] | 6469 | wintend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzt_wall,m)) * & |
---|
| 6470 | ( -surf_usm_v(l)%lambda_h_window(nzt_wall-1,m) * & |
---|
| 6471 | ( t_window_v(l)%t(nzt_wall,m) & |
---|
| 6472 | - t_window_v(l)%t(nzt_wall-1,m) ) * & |
---|
| 6473 | surf_usm_v(l)%ddz_window(nzt_wall,m) & |
---|
| 6474 | + surf_usm_v(l)%iwghf_eb_window(m) & |
---|
| 6475 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
| 6476 | * (exp(-win_absorp & |
---|
| 6477 | * surf_usm_v(l)%zw_window(nzt_wall-1,m) ) & |
---|
| 6478 | - exp(-win_absorp & |
---|
| 6479 | * surf_usm_v(l)%zw_window(nzt_wall,m) ) ) & |
---|
[2737] | 6480 | ) * surf_usm_v(l)%ddz_window_stag(nzt_wall,m) |
---|
| 6481 | ELSE |
---|
| 6482 | DO kw = nzb_wall+1, nzt_wall |
---|
| 6483 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
| 6484 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
| 6485 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
| 6486 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
| 6487 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
| 6488 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
| 6489 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
| 6490 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
[3418] | 6491 | * (exp(-win_absorp & |
---|
[2737] | 6492 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
[3418] | 6493 | - exp(-win_absorp & |
---|
[2737] | 6494 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
| 6495 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
| 6496 | ENDDO |
---|
| 6497 | ENDIF |
---|
| 6498 | |
---|
| 6499 | t_window_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
| 6500 | t_window_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
| 6501 | + dt_3d * ( tsc(2) & |
---|
| 6502 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
| 6503 | * surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
[3418] | 6504 | endif |
---|
[2737] | 6505 | |
---|
| 6506 | ! |
---|
| 6507 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
| 6508 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 6509 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
| 6510 | DO kw = nzb_wall, nzt_wall |
---|
| 6511 | surf_usm_v(l)%tt_wall_m(kw,m) = wtend(kw) |
---|
| 6512 | ENDDO |
---|
| 6513 | ELSEIF ( intermediate_timestep_count < & |
---|
| 6514 | intermediate_timestep_count_max ) THEN |
---|
| 6515 | DO kw = nzb_wall, nzt_wall |
---|
| 6516 | surf_usm_v(l)%tt_wall_m(kw,m) = & |
---|
| 6517 | - 9.5625_wp * wtend(kw) + & |
---|
| 6518 | 5.3125_wp * surf_usm_v(l)%tt_wall_m(kw,m) |
---|
| 6519 | ENDDO |
---|
| 6520 | ENDIF |
---|
| 6521 | ENDIF |
---|
[3418] | 6522 | |
---|
| 6523 | |
---|
| 6524 | if (.NOT. spinup) then |
---|
[2737] | 6525 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
| 6526 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 6527 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
| 6528 | DO kw = nzb_wall, nzt_wall |
---|
| 6529 | surf_usm_v(l)%tt_window_m(kw,m) = wintend(kw) |
---|
| 6530 | ENDDO |
---|
| 6531 | ELSEIF ( intermediate_timestep_count < & |
---|
| 6532 | intermediate_timestep_count_max ) THEN |
---|
| 6533 | DO kw = nzb_wall, nzt_wall |
---|
| 6534 | surf_usm_v(l)%tt_window_m(kw,m) = & |
---|
| 6535 | - 9.5625_wp * wintend(kw) + & |
---|
| 6536 | 5.3125_wp * surf_usm_v(l)%tt_window_m(kw,m) |
---|
| 6537 | ENDDO |
---|
| 6538 | ENDIF |
---|
| 6539 | ENDIF |
---|
[3418] | 6540 | endif |
---|
| 6541 | |
---|
[2737] | 6542 | ENDDO |
---|
| 6543 | ENDDO |
---|
| 6544 | |
---|
| 6545 | END SUBROUTINE usm_material_heat_model |
---|
| 6546 | |
---|
| 6547 | !------------------------------------------------------------------------------! |
---|
| 6548 | ! Description: |
---|
| 6549 | ! ------------ |
---|
| 6550 | ! |
---|
| 6551 | !> Green and substrate model as part of the urban surface model. The model predicts ground |
---|
| 6552 | !> temperatures. |
---|
| 6553 | !------------------------------------------------------------------------------! |
---|
| 6554 | SUBROUTINE usm_green_heat_model |
---|
| 6555 | |
---|
| 6556 | |
---|
| 6557 | IMPLICIT NONE |
---|
| 6558 | |
---|
| 6559 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
| 6560 | |
---|
[3418] | 6561 | REAL(wp) :: ke, lambda_h_green_sat |
---|
| 6562 | REAL(wp) :: h_vg !< Van Genuchten coef. h |
---|
| 6563 | REAL(wp) :: drho_l_lv |
---|
[2737] | 6564 | |
---|
[3418] | 6565 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: gtend,tend !< tendency |
---|
| 6566 | |
---|
| 6567 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: root_extr_green |
---|
| 6568 | |
---|
| 6569 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: lambda_green_temp !< temp. lambda |
---|
| 6570 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: gamma_green_temp !< temp. gamma |
---|
| 6571 | |
---|
| 6572 | LOGICAL :: conserve_water_content = .true. |
---|
| 6573 | |
---|
| 6574 | |
---|
| 6575 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
| 6576 | |
---|
[2737] | 6577 | ! |
---|
| 6578 | !-- For horizontal surfaces |
---|
| 6579 | DO m = 1, surf_usm_h%ns |
---|
[3418] | 6580 | |
---|
| 6581 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
[2737] | 6582 | ! |
---|
| 6583 | !-- Obtain indices |
---|
| 6584 | i = surf_usm_h%i(m) |
---|
| 6585 | j = surf_usm_h%j(m) |
---|
| 6586 | k = surf_usm_h%k(m) |
---|
| 6587 | |
---|
[3418] | 6588 | DO kw = nzb_wall, nzt_wall |
---|
| 6589 | ! |
---|
| 6590 | !-- Calculate volumetric heat capacity of the soil, taking |
---|
| 6591 | !-- into account water content |
---|
| 6592 | surf_usm_h%rho_c_total_green(kw,m) = (surf_usm_h%rho_c_green(kw,m) * (1.0_wp - swc_sat_h(kw,m)) & |
---|
| 6593 | + rho_c_water * swc_h(kw,m)) |
---|
| 6594 | |
---|
| 6595 | ! |
---|
| 6596 | !-- Calculate soil heat conductivity at the center of the soil |
---|
| 6597 | !-- layers |
---|
| 6598 | lambda_h_green_sat = lambda_h_green_sm ** (1.0_wp - swc_sat_h(kw,m)) * & |
---|
| 6599 | lambda_h_water ** swc_h(kw,m) |
---|
| 6600 | |
---|
| 6601 | ke = 1.0_wp + LOG10(MAX(0.1_wp,swc_h(kw,m) & |
---|
| 6602 | / swc_sat_h(kw,m))) |
---|
| 6603 | |
---|
| 6604 | lambda_green_temp(kw) = ke * (lambda_h_green_sat - lambda_h_green_dry) + & |
---|
| 6605 | lambda_h_green_dry |
---|
| 6606 | |
---|
| 6607 | ENDDO |
---|
| 6608 | |
---|
| 6609 | |
---|
| 6610 | ! |
---|
| 6611 | !-- Calculate soil heat conductivity (lambda_h) at the _stag level |
---|
| 6612 | !-- using linear interpolation. For pavement surface, the |
---|
| 6613 | !-- true pavement depth is considered |
---|
| 6614 | DO kw = nzb_wall, nzt_wall |
---|
| 6615 | surf_usm_h%lambda_h_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
| 6616 | * 0.5_wp |
---|
| 6617 | ENDDO |
---|
| 6618 | ! surf_usm_h%lambda_h_green(nzt_wall+1,m) = lambda_green_temp(nzt_wall+1) |
---|
| 6619 | !-------------------------------------------------------------------------- |
---|
| 6620 | |
---|
[2737] | 6621 | t_green_h(nzt_wall+1,m) = t_wall_h(nzb_wall,m) |
---|
| 6622 | ! |
---|
| 6623 | !-- prognostic equation for ground/roof temperature t_green_h |
---|
| 6624 | gtend(:) = 0.0_wp |
---|
[3418] | 6625 | gtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_total_green(nzb_wall,m)) * & |
---|
[2737] | 6626 | ( surf_usm_h%lambda_h_green(nzb_wall,m) * & |
---|
| 6627 | ( t_green_h(nzb_wall+1,m) & |
---|
| 6628 | - t_green_h(nzb_wall,m) ) * & |
---|
| 6629 | surf_usm_h%ddz_green(nzb_wall+1,m) & |
---|
| 6630 | + surf_usm_h%wghf_eb_green(m) ) * & |
---|
| 6631 | surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
| 6632 | |
---|
| 6633 | DO kw = nzb_wall+1, nzt_wall |
---|
[3418] | 6634 | gtend(kw) = (1.0_wp / surf_usm_h%rho_c_total_green(kw,m)) & |
---|
[2737] | 6635 | * ( surf_usm_h%lambda_h_green(kw,m) & |
---|
| 6636 | * ( t_green_h(kw+1,m) - t_green_h(kw,m) ) & |
---|
| 6637 | * surf_usm_h%ddz_green(kw+1,m) & |
---|
| 6638 | - surf_usm_h%lambda_h_green(kw-1,m) & |
---|
| 6639 | * ( t_green_h(kw,m) - t_green_h(kw-1,m) ) & |
---|
| 6640 | * surf_usm_h%ddz_green(kw,m) & |
---|
| 6641 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
| 6642 | ENDDO |
---|
| 6643 | |
---|
| 6644 | t_green_h_p(nzb_wall:nzt_wall,m) = t_green_h(nzb_wall:nzt_wall,m) & |
---|
| 6645 | + dt_3d * ( tsc(2) & |
---|
| 6646 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
| 6647 | * surf_usm_h%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
| 6648 | |
---|
| 6649 | |
---|
| 6650 | ! |
---|
| 6651 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
| 6652 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 6653 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
| 6654 | DO kw = nzb_wall, nzt_wall |
---|
| 6655 | surf_usm_h%tt_green_m(kw,m) = gtend(kw) |
---|
| 6656 | ENDDO |
---|
| 6657 | ELSEIF ( intermediate_timestep_count < & |
---|
| 6658 | intermediate_timestep_count_max ) THEN |
---|
| 6659 | DO kw = nzb_wall, nzt_wall |
---|
| 6660 | surf_usm_h%tt_green_m(kw,m) = -9.5625_wp * gtend(kw) + & |
---|
| 6661 | 5.3125_wp * surf_usm_h%tt_green_m(kw,m) |
---|
| 6662 | ENDDO |
---|
| 6663 | ENDIF |
---|
| 6664 | ENDIF |
---|
[3418] | 6665 | |
---|
| 6666 | !-------------------------------------------------------------- |
---|
| 6667 | DO kw = nzb_wall, nzt_wall |
---|
| 6668 | |
---|
| 6669 | ! |
---|
| 6670 | !-- Calculate soil diffusivity at the center of the soil layers |
---|
| 6671 | lambda_green_temp(kw) = (- b_ch * surf_usm_h%gamma_w_green_sat(kw,m) * psi_sat & |
---|
| 6672 | / swc_sat_h(kw,m) ) * ( MAX( swc_h(kw,m), & |
---|
| 6673 | wilt_h(kw,m) ) / swc_sat_h(kw,m) )**( & |
---|
| 6674 | b_ch + 2.0_wp ) |
---|
| 6675 | |
---|
| 6676 | ! |
---|
| 6677 | !-- Parametrization of Van Genuchten |
---|
| 6678 | IF ( soil_type /= 7 ) THEN |
---|
| 6679 | ! |
---|
| 6680 | !-- Calculate the hydraulic conductivity after Van Genuchten |
---|
| 6681 | !-- (1980) |
---|
| 6682 | h_vg = ( ( (swc_res_h(kw,m) - swc_sat_h(kw,m)) / ( swc_res_h(kw,m) - & |
---|
| 6683 | MAX( swc_h(kw,m), wilt_h(kw,m) ) ) )**( & |
---|
| 6684 | surf_usm_h%n_vg_green(m) / (surf_usm_h%n_vg_green(m) - 1.0_wp ) ) - 1.0_wp & |
---|
| 6685 | )**( 1.0_wp / surf_usm_h%n_vg_green(m) ) / surf_usm_h%alpha_vg_green(m) |
---|
| 6686 | |
---|
| 6687 | |
---|
| 6688 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( ( (1.0_wp + & |
---|
| 6689 | ( surf_usm_h%alpha_vg_green(m) * h_vg )**surf_usm_h%n_vg_green(m))**( & |
---|
| 6690 | 1.0_wp - 1.0_wp / surf_usm_h%n_vg_green(m) ) - ( & |
---|
| 6691 | surf_usm_h%alpha_vg_green(m) * h_vg )**( surf_usm_h%n_vg_green(m) & |
---|
| 6692 | - 1.0_wp) )**2 ) & |
---|
| 6693 | / ( ( 1.0_wp + ( surf_usm_h%alpha_vg_green(m) * h_vg & |
---|
| 6694 | )**surf_usm_h%n_vg_green(m) )**( ( 1.0_wp - 1.0_wp & |
---|
| 6695 | / surf_usm_h%n_vg_green(m) ) *( surf_usm_h%l_vg_green(m) + 2.0_wp) ) ) |
---|
| 6696 | |
---|
| 6697 | ! |
---|
| 6698 | !-- Parametrization of Clapp & Hornberger |
---|
| 6699 | ELSE |
---|
| 6700 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( swc_h(kw,m) & |
---|
| 6701 | / swc_sat_h(kw,m) )**(2.0_wp * b_ch + 3.0_wp) |
---|
| 6702 | ENDIF |
---|
| 6703 | |
---|
| 6704 | ENDDO |
---|
| 6705 | |
---|
| 6706 | ! |
---|
| 6707 | !-- Prognostic equation for soil moisture content. Only performed, |
---|
| 6708 | !-- when humidity is enabled in the atmosphere |
---|
| 6709 | IF ( humidity ) THEN |
---|
| 6710 | ! |
---|
| 6711 | !-- Calculate soil diffusivity (lambda_w) at the _stag level |
---|
| 6712 | !-- using linear interpolation. To do: replace this with |
---|
| 6713 | !-- ECMWF-IFS Eq. 8.81 |
---|
| 6714 | DO kw = nzb_wall, nzt_wall-1 |
---|
| 6715 | |
---|
| 6716 | surf_usm_h%lambda_w_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
| 6717 | * 0.5_wp |
---|
| 6718 | surf_usm_h%gamma_w_green(kw,m) = ( gamma_green_temp(kw+1) + gamma_green_temp(kw) ) & |
---|
| 6719 | * 0.5_wp |
---|
| 6720 | |
---|
| 6721 | ENDDO |
---|
| 6722 | |
---|
| 6723 | ! |
---|
| 6724 | ! |
---|
| 6725 | !-- In case of a closed bottom (= water content is conserved), |
---|
| 6726 | !-- set hydraulic conductivity to zero to that no water will be |
---|
| 6727 | !-- lost in the bottom layer. |
---|
| 6728 | IF ( conserve_water_content ) THEN |
---|
| 6729 | surf_usm_h%gamma_w_green(kw,m) = 0.0_wp |
---|
| 6730 | ELSE |
---|
| 6731 | surf_usm_h%gamma_w_green(kw,m) = gamma_green_temp(nzt_wall) |
---|
| 6732 | ENDIF |
---|
| 6733 | |
---|
| 6734 | !-- The root extraction (= root_extr * qsws_veg_eb / (rho_l |
---|
| 6735 | !-- * l_v)) ensures the mass conservation for water. The |
---|
| 6736 | !-- transpiration of plants equals the cumulative withdrawals by |
---|
| 6737 | !-- the roots in the soil. The scheme takes into account the |
---|
| 6738 | !-- availability of water in the soil layers as well as the root |
---|
| 6739 | !-- fraction in the respective layer. Layer with moisture below |
---|
| 6740 | !-- wilting point will not contribute, which reflects the |
---|
| 6741 | !-- preference of plants to take water from moister layers. |
---|
| 6742 | |
---|
| 6743 | ! |
---|
| 6744 | !-- Calculate the root extraction (ECMWF 7.69, the sum of |
---|
| 6745 | !-- root_extr = 1). The energy balance solver guarantees a |
---|
| 6746 | !-- positive transpiration, so that there is no need for an |
---|
| 6747 | !-- additional check. |
---|
| 6748 | m_total = 0.0_wp |
---|
| 6749 | DO kw = nzb_wall, nzt_wall |
---|
| 6750 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
| 6751 | m_total = m_total + rootfr_h(kw,m) * swc_h(kw,m) |
---|
| 6752 | ENDIF |
---|
| 6753 | ENDDO |
---|
| 6754 | |
---|
| 6755 | IF ( m_total > 0.0_wp ) THEN |
---|
| 6756 | DO kw = nzb_wall, nzt_wall |
---|
| 6757 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
| 6758 | root_extr_green(kw) = rootfr_h(kw,m) * swc_h(kw,m) & |
---|
| 6759 | / m_total |
---|
| 6760 | ELSE |
---|
| 6761 | root_extr_green(kw) = 0.0_wp |
---|
| 6762 | ENDIF |
---|
| 6763 | ENDDO |
---|
| 6764 | ENDIF |
---|
| 6765 | |
---|
| 6766 | ! |
---|
| 6767 | !-- Prognostic equation for soil water content m_soil. |
---|
| 6768 | tend(:) = 0.0_wp |
---|
| 6769 | |
---|
| 6770 | tend(nzb_wall) = ( surf_usm_h%lambda_w_green(nzb_wall,m) * ( & |
---|
| 6771 | swc_h(nzb_wall+1,m) - swc_h(nzb_wall,m) ) & |
---|
| 6772 | * surf_usm_h%ddz_green(nzb_wall+1,m) - surf_usm_h%gamma_w_green(nzb_wall,m) - ( & |
---|
| 6773 | root_extr_green(nzb_wall) * surf_usm_h%qsws_veg_eb(m) & |
---|
| 6774 | ! + surf_usm_h%qsws_soil_eb_green(m) |
---|
| 6775 | ) * drho_l_lv ) & |
---|
| 6776 | * surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
| 6777 | |
---|
| 6778 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
| 6779 | tend(kw) = ( surf_usm_h%lambda_w_green(kw,m) * ( swc_h(kw+1,m) & |
---|
| 6780 | - swc_h(kw,m) ) * surf_usm_h%ddz_green(kw+1,m) & |
---|
| 6781 | - surf_usm_h%gamma_w_green(kw,m) & |
---|
| 6782 | - surf_usm_h%lambda_w_green(kw-1,m) * (swc_h(kw,m) - & |
---|
| 6783 | swc_h(kw-1,m)) * surf_usm_h%ddz_green(kw,m) & |
---|
| 6784 | + surf_usm_h%gamma_w_green(kw-1,m) - (root_extr_green(kw) & |
---|
| 6785 | * surf_usm_h%qsws_veg_eb(m) * drho_l_lv) & |
---|
| 6786 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
| 6787 | |
---|
| 6788 | ENDDO |
---|
| 6789 | tend(nzt_wall) = ( - surf_usm_h%gamma_w_green(nzt_wall,m) & |
---|
| 6790 | - surf_usm_h%lambda_w_green(nzt_wall-1,m) & |
---|
| 6791 | * (swc_h(nzt_wall,m) & |
---|
| 6792 | - swc_h(nzt_wall-1,m)) & |
---|
| 6793 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
| 6794 | + surf_usm_h%gamma_w_green(nzt_wall-1,m) - ( & |
---|
| 6795 | root_extr_green(nzt_wall) & |
---|
| 6796 | * surf_usm_h%qsws_veg_eb(m) * drho_l_lv ) & |
---|
| 6797 | ) * surf_usm_h%ddz_green_stag(nzt_wall,m) |
---|
| 6798 | |
---|
| 6799 | swc_h_p(nzb_wall:nzt_wall,m) = swc_h(nzb_wall:nzt_wall,m)& |
---|
| 6800 | + dt_3d * ( tsc(2) * tend(:) & |
---|
| 6801 | + tsc(3) * surf_usm_h%tswc_h_m(:,m) ) |
---|
| 6802 | |
---|
| 6803 | ! |
---|
| 6804 | !-- Account for dry soils (find a better solution here!) |
---|
| 6805 | DO kw = nzb_wall, nzt_wall |
---|
| 6806 | IF ( swc_h_p(kw,m) < 0.0_wp ) swc_h_p(kw,m) = 0.0_wp |
---|
| 6807 | ENDDO |
---|
| 6808 | |
---|
| 6809 | ! |
---|
| 6810 | !-- Calculate m_soil tendencies for the next Runge-Kutta step |
---|
| 6811 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 6812 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
| 6813 | DO kw = nzb_wall, nzt_wall |
---|
| 6814 | surf_usm_h%tswc_h_m(kw,m) = tend(kw) |
---|
| 6815 | ENDDO |
---|
| 6816 | ELSEIF ( intermediate_timestep_count < & |
---|
| 6817 | intermediate_timestep_count_max ) THEN |
---|
| 6818 | DO kw = nzb_wall, nzt_wall |
---|
| 6819 | surf_usm_h%tswc_h_m(kw,m) = -9.5625_wp * tend(kw) + 5.3125_wp& |
---|
| 6820 | * surf_usm_h%tswc_h_m(kw,m) |
---|
| 6821 | ENDDO |
---|
| 6822 | ENDIF |
---|
| 6823 | ENDIF |
---|
| 6824 | ENDIF |
---|
| 6825 | !-------------------------------------------------------------- |
---|
| 6826 | ENDIF |
---|
| 6827 | |
---|
[2737] | 6828 | ENDDO |
---|
| 6829 | |
---|
| 6830 | ! |
---|
| 6831 | !-- For vertical surfaces |
---|
| 6832 | DO l = 0, 3 |
---|
| 6833 | DO m = 1, surf_usm_v(l)%ns |
---|
[3418] | 6834 | |
---|
| 6835 | if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
| 6836 | if (1.gt.2) then |
---|
[2737] | 6837 | ! |
---|
| 6838 | !-- Obtain indices |
---|
| 6839 | i = surf_usm_v(l)%i(m) |
---|
| 6840 | j = surf_usm_v(l)%j(m) |
---|
| 6841 | k = surf_usm_v(l)%k(m) |
---|
| 6842 | |
---|
| 6843 | t_green_v(l)%t(nzt_wall+1,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
| 6844 | ! |
---|
| 6845 | !-- prognostic equation for green temperature t_green_v |
---|
| 6846 | gtend(:) = 0.0_wp |
---|
| 6847 | gtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_green(nzb_wall,m)) * & |
---|
| 6848 | ( surf_usm_v(l)%lambda_h_green(nzb_wall,m) * & |
---|
| 6849 | ( t_green_v(l)%t(nzb_wall+1,m) & |
---|
| 6850 | - t_green_v(l)%t(nzb_wall,m) ) * & |
---|
| 6851 | surf_usm_v(l)%ddz_green(nzb_wall+1,m) & |
---|
| 6852 | + surf_usm_v(l)%wghf_eb(m) ) * & |
---|
| 6853 | surf_usm_v(l)%ddz_green_stag(nzb_wall,m) |
---|
| 6854 | |
---|
| 6855 | DO kw = nzb_wall+1, nzt_wall |
---|
| 6856 | gtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_green(kw,m)) & |
---|
| 6857 | * ( surf_usm_v(l)%lambda_h_green(kw,m) & |
---|
| 6858 | * ( t_green_v(l)%t(kw+1,m) - t_green_v(l)%t(kw,m) ) & |
---|
| 6859 | * surf_usm_v(l)%ddz_green(kw+1,m) & |
---|
| 6860 | - surf_usm_v(l)%lambda_h(kw-1,m) & |
---|
| 6861 | * ( t_green_v(l)%t(kw,m) - t_green_v(l)%t(kw-1,m) ) & |
---|
| 6862 | * surf_usm_v(l)%ddz_green(kw,m) ) & |
---|
| 6863 | * surf_usm_v(l)%ddz_green_stag(kw,m) |
---|
| 6864 | ENDDO |
---|
| 6865 | |
---|
| 6866 | t_green_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
| 6867 | t_green_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
| 6868 | + dt_3d * ( tsc(2) & |
---|
| 6869 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
| 6870 | * surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
| 6871 | |
---|
| 6872 | ! |
---|
| 6873 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
| 6874 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 6875 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
| 6876 | DO kw = nzb_wall, nzt_wall |
---|
| 6877 | surf_usm_v(l)%tt_green_m(kw,m) = gtend(kw) |
---|
| 6878 | ENDDO |
---|
| 6879 | ELSEIF ( intermediate_timestep_count < & |
---|
| 6880 | intermediate_timestep_count_max ) THEN |
---|
| 6881 | DO kw = nzb_wall, nzt_wall |
---|
| 6882 | surf_usm_v(l)%tt_green_m(kw,m) = & |
---|
| 6883 | - 9.5625_wp * gtend(kw) + & |
---|
| 6884 | 5.3125_wp * surf_usm_v(l)%tt_green_m(kw,m) |
---|
| 6885 | ENDDO |
---|
| 6886 | ENDIF |
---|
| 6887 | ENDIF |
---|
[3418] | 6888 | endif |
---|
[2737] | 6889 | |
---|
[3418] | 6890 | DO kw = nzb_wall, nzt_wall+1 |
---|
| 6891 | t_green_v(l)%t(kw,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
| 6892 | ENDDO |
---|
| 6893 | |
---|
| 6894 | ENDIF |
---|
| 6895 | |
---|
[2737] | 6896 | ENDDO |
---|
| 6897 | ENDDO |
---|
| 6898 | |
---|
| 6899 | END SUBROUTINE usm_green_heat_model |
---|
| 6900 | |
---|
| 6901 | !------------------------------------------------------------------------------! |
---|
| 6902 | ! Description: |
---|
| 6903 | ! ------------ |
---|
| 6904 | !> Parin for &usm_par for urban surface model |
---|
| 6905 | !------------------------------------------------------------------------------! |
---|
| 6906 | SUBROUTINE usm_parin |
---|
| 6907 | |
---|
| 6908 | IMPLICIT NONE |
---|
| 6909 | |
---|
| 6910 | CHARACTER (LEN=80) :: line !< string containing current line of file PARIN |
---|
| 6911 | |
---|
| 6912 | NAMELIST /urban_surface_par/ & |
---|
| 6913 | building_type, & |
---|
| 6914 | land_category, & |
---|
[2920] | 6915 | naheatlayers, & |
---|
| 6916 | pedestrian_category, & |
---|
[3337] | 6917 | roughness_concrete, & |
---|
[2920] | 6918 | read_wall_temp_3d, & |
---|
[2737] | 6919 | roof_category, & |
---|
| 6920 | urban_surface, & |
---|
| 6921 | usm_anthropogenic_heat, & |
---|
| 6922 | usm_material_model, & |
---|
| 6923 | wall_category, & |
---|
[2920] | 6924 | indoor_model, & |
---|
| 6925 | wall_inner_temperature, & |
---|
| 6926 | roof_inner_temperature, & |
---|
| 6927 | soil_inner_temperature, & |
---|
[3418] | 6928 | window_inner_temperature, & |
---|
| 6929 | usm_wall_mod |
---|
[2737] | 6930 | |
---|
[2932] | 6931 | NAMELIST /urban_surface_parameters/ & |
---|
| 6932 | building_type, & |
---|
| 6933 | land_category, & |
---|
| 6934 | naheatlayers, & |
---|
| 6935 | pedestrian_category, & |
---|
[3337] | 6936 | roughness_concrete, & |
---|
[2932] | 6937 | read_wall_temp_3d, & |
---|
| 6938 | roof_category, & |
---|
| 6939 | urban_surface, & |
---|
| 6940 | usm_anthropogenic_heat, & |
---|
| 6941 | usm_material_model, & |
---|
| 6942 | wall_category, & |
---|
| 6943 | indoor_model, & |
---|
| 6944 | wall_inner_temperature, & |
---|
| 6945 | roof_inner_temperature, & |
---|
| 6946 | soil_inner_temperature, & |
---|
[3418] | 6947 | window_inner_temperature, & |
---|
| 6948 | usm_wall_mod |
---|
[3246] | 6949 | |
---|
| 6950 | |
---|
| 6951 | |
---|
[2737] | 6952 | ! |
---|
| 6953 | !-- Try to find urban surface model package |
---|
| 6954 | REWIND ( 11 ) |
---|
| 6955 | line = ' ' |
---|
[3248] | 6956 | DO WHILE ( INDEX( line, '&urban_surface_parameters' ) == 0 ) |
---|
[3246] | 6957 | READ ( 11, '(A)', END=12 ) line |
---|
[2737] | 6958 | ENDDO |
---|
| 6959 | BACKSPACE ( 11 ) |
---|
| 6960 | |
---|
| 6961 | ! |
---|
| 6962 | !-- Read user-defined namelist |
---|
[3246] | 6963 | READ ( 11, urban_surface_parameters, ERR = 10 ) |
---|
| 6964 | |
---|
[2932] | 6965 | ! |
---|
[3246] | 6966 | !-- Set flag that indicates that the urban surface model is switched on |
---|
[2932] | 6967 | urban_surface = .TRUE. |
---|
| 6968 | |
---|
[3246] | 6969 | GOTO 14 |
---|
| 6970 | |
---|
| 6971 | 10 BACKSPACE( 11 ) |
---|
[3248] | 6972 | READ( 11 , '(A)') line |
---|
| 6973 | CALL parin_fail_message( 'urban_surface_parameters', line ) |
---|
[2932] | 6974 | ! |
---|
| 6975 | !-- Try to find old namelist |
---|
[3246] | 6976 | 12 REWIND ( 11 ) |
---|
[2932] | 6977 | line = ' ' |
---|
[3248] | 6978 | DO WHILE ( INDEX( line, '&urban_surface_par' ) == 0 ) |
---|
[3246] | 6979 | READ ( 11, '(A)', END=14 ) line |
---|
[2932] | 6980 | ENDDO |
---|
| 6981 | BACKSPACE ( 11 ) |
---|
| 6982 | |
---|
| 6983 | ! |
---|
| 6984 | !-- Read user-defined namelist |
---|
[3246] | 6985 | READ ( 11, urban_surface_par, ERR = 13, END = 14 ) |
---|
[2932] | 6986 | |
---|
| 6987 | message_string = 'namelist urban_surface_par is deprecated and will be ' // & |
---|
[3246] | 6988 | 'removed in near future. Please use namelist ' // & |
---|
| 6989 | 'urban_surface_parameters instead' |
---|
[2932] | 6990 | CALL message( 'usm_parin', 'PA0487', 0, 1, 0, 6, 0 ) |
---|
[3246] | 6991 | |
---|
[2737] | 6992 | ! |
---|
[3246] | 6993 | !-- Set flag that indicates that the urban surface model is switched on |
---|
[2737] | 6994 | urban_surface = .TRUE. |
---|
| 6995 | |
---|
[3246] | 6996 | GOTO 14 |
---|
[2737] | 6997 | |
---|
[3246] | 6998 | 13 BACKSPACE( 11 ) |
---|
[3248] | 6999 | READ( 11 , '(A)') line |
---|
| 7000 | CALL parin_fail_message( 'urban_surface_par', line ) |
---|
[2737] | 7001 | |
---|
[3246] | 7002 | |
---|
| 7003 | 14 CONTINUE |
---|
| 7004 | |
---|
| 7005 | |
---|
[2737] | 7006 | END SUBROUTINE usm_parin |
---|
| 7007 | |
---|
| 7008 | !------------------------------------------------------------------------------! |
---|
| 7009 | ! Description: |
---|
| 7010 | ! ------------ |
---|
| 7011 | !> Calculates temperature near surface (10 cm) for indoor model |
---|
| 7012 | !------------------------------------------------------------------------------! |
---|
| 7013 | SUBROUTINE usm_temperature_near_surface |
---|
| 7014 | |
---|
| 7015 | IMPLICIT NONE |
---|
| 7016 | |
---|
| 7017 | INTEGER(iwp) :: i, j, k, l, m !< running indices |
---|
| 7018 | |
---|
| 7019 | ! |
---|
| 7020 | !-- First, treat horizontal surface elements |
---|
| 7021 | DO m = 1, surf_usm_h%ns |
---|
| 7022 | |
---|
| 7023 | !-- Get indices of respective grid point |
---|
| 7024 | i = surf_usm_h%i(m) |
---|
| 7025 | j = surf_usm_h%j(m) |
---|
| 7026 | k = surf_usm_h%k(m) |
---|
| 7027 | |
---|
| 7028 | t_surf_10cm_h(m) = surf_usm_h%pt_surface(m) + surf_usm_h%ts(m) / kappa & |
---|
| 7029 | * ( log( 0.1_wp / surf_usm_h%z0h(m) ) & |
---|
| 7030 | - psi_h( 0.1_wp / surf_usm_h%ol(m) ) & |
---|
| 7031 | + psi_h( surf_usm_h%z0h(m) / surf_usm_h%ol(m) ) ) |
---|
| 7032 | |
---|
| 7033 | ENDDO |
---|
| 7034 | ! |
---|
| 7035 | !-- Now, treat vertical surface elements |
---|
| 7036 | DO l = 0, 3 |
---|
| 7037 | DO m = 1, surf_usm_v(l)%ns |
---|
| 7038 | |
---|
| 7039 | !-- Get indices of respective grid point |
---|
| 7040 | i = surf_usm_v(l)%i(m) |
---|
| 7041 | j = surf_usm_v(l)%j(m) |
---|
| 7042 | k = surf_usm_v(l)%k(m) |
---|
| 7043 | |
---|
| 7044 | t_surf_10cm_v(l)%t(m) =surf_usm_v(l)%pt_surface(m) + surf_usm_v(l)%ts(m) / kappa & |
---|
| 7045 | * ( log( 0.1_wp / surf_usm_v(l)%z0h(m) ) & |
---|
| 7046 | - psi_h( 0.1_wp / surf_usm_v(l)%ol(m) ) & |
---|
| 7047 | + psi_h( surf_usm_v(l)%z0h(m) / surf_usm_v(l)%ol(m) ) ) |
---|
| 7048 | |
---|
| 7049 | ENDDO |
---|
| 7050 | |
---|
| 7051 | ENDDO |
---|
| 7052 | |
---|
| 7053 | |
---|
| 7054 | END SUBROUTINE usm_temperature_near_surface |
---|
| 7055 | |
---|
| 7056 | |
---|
| 7057 | |
---|
| 7058 | !------------------------------------------------------------------------------! |
---|
| 7059 | ! Description: |
---|
| 7060 | ! ------------ |
---|
| 7061 | ! |
---|
| 7062 | !> This subroutine is part of the urban surface model. |
---|
| 7063 | !> It reads daily heat produced by anthropogenic sources |
---|
| 7064 | !> and the diurnal cycle of the heat. |
---|
| 7065 | !------------------------------------------------------------------------------! |
---|
| 7066 | SUBROUTINE usm_read_anthropogenic_heat |
---|
| 7067 | |
---|
[2920] | 7068 | INTEGER(iwp) :: i,j,k,ii |
---|
[2737] | 7069 | REAL(wp) :: heat |
---|
[2920] | 7070 | |
---|
[2737] | 7071 | !-- allocation of array of sources of anthropogenic heat and their diural profile |
---|
[2920] | 7072 | ALLOCATE( aheat(naheatlayers,nys:nyn,nxl:nxr) ) |
---|
| 7073 | ALLOCATE( aheatprof(naheatlayers,0:24) ) |
---|
[2737] | 7074 | |
---|
| 7075 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 7076 | !-- read daily amount of heat and its daily cycle |
---|
| 7077 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 7078 | aheat = 0.0_wp |
---|
| 7079 | DO ii = 0, io_blocks-1 |
---|
| 7080 | IF ( ii == io_group ) THEN |
---|
| 7081 | |
---|
| 7082 | !-- open anthropogenic heat file |
---|
| 7083 | OPEN( 151, file='ANTHROPOGENIC_HEAT'//TRIM(coupling_char), action='read', & |
---|
| 7084 | status='old', form='formatted', err=11 ) |
---|
| 7085 | i = 0 |
---|
| 7086 | j = 0 |
---|
| 7087 | DO |
---|
[2920] | 7088 | READ( 151, *, err=12, end=13 ) i, j, k, heat |
---|
[2737] | 7089 | IF ( i >= nxl .AND. i <= nxr .AND. j >= nys .AND. j <= nyn ) THEN |
---|
[2920] | 7090 | IF ( k <= naheatlayers .AND. k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
| 7091 | !-- write heat into the array |
---|
| 7092 | aheat(k,j,i) = heat |
---|
| 7093 | ENDIF |
---|
[2737] | 7094 | ENDIF |
---|
| 7095 | CYCLE |
---|
| 7096 | 12 WRITE(message_string,'(a,2i4)') 'error in file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' after line ',i,j |
---|
| 7097 | CALL message( 'usm_read_anthropogenic_heat', 'PA0515', 0, 1, 0, 6, 0 ) |
---|
| 7098 | ENDDO |
---|
| 7099 | 13 CLOSE(151) |
---|
| 7100 | CYCLE |
---|
| 7101 | 11 message_string = 'file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' does not exist' |
---|
| 7102 | CALL message( 'usm_read_anthropogenic_heat', 'PA0516', 1, 2, 0, 6, 0 ) |
---|
| 7103 | ENDIF |
---|
| 7104 | |
---|
[3151] | 7105 | #if defined( __parallel ) |
---|
[2737] | 7106 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
| 7107 | #endif |
---|
| 7108 | ENDDO |
---|
| 7109 | |
---|
| 7110 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 7111 | !-- read diurnal profiles of heat sources |
---|
| 7112 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 7113 | aheatprof = 0.0_wp |
---|
| 7114 | DO ii = 0, io_blocks-1 |
---|
| 7115 | IF ( ii == io_group ) THEN |
---|
| 7116 | |
---|
| 7117 | !-- open anthropogenic heat profile file |
---|
| 7118 | OPEN( 151, file='ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char), action='read', & |
---|
| 7119 | status='old', form='formatted', err=21 ) |
---|
| 7120 | i = 0 |
---|
| 7121 | DO |
---|
[2920] | 7122 | READ( 151, *, err=22, end=23 ) i, k, heat |
---|
| 7123 | IF ( i >= 0 .AND. i <= 24 .AND. k <= naheatlayers ) THEN |
---|
[2737] | 7124 | !-- write heat into the array |
---|
[2920] | 7125 | aheatprof(k,i) = heat |
---|
[2737] | 7126 | ENDIF |
---|
| 7127 | CYCLE |
---|
| 7128 | 22 WRITE(message_string,'(a,i4)') 'error in file ANTHROPOGENIC_HEAT_PROFILE'// & |
---|
| 7129 | TRIM(coupling_char)//' after line ',i |
---|
| 7130 | CALL message( 'usm_read_anthropogenic_heat', 'PA0517', 0, 1, 0, 6, 0 ) |
---|
| 7131 | ENDDO |
---|
[2920] | 7132 | aheatprof(:,24) = aheatprof(:,0) |
---|
[2737] | 7133 | 23 CLOSE(151) |
---|
| 7134 | CYCLE |
---|
| 7135 | 21 message_string = 'file ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char)//' does not exist' |
---|
| 7136 | CALL message( 'usm_read_anthropogenic_heat', 'PA0518', 1, 2, 0, 6, 0 ) |
---|
| 7137 | ENDIF |
---|
| 7138 | |
---|
[3151] | 7139 | #if defined( __parallel ) |
---|
[2737] | 7140 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
| 7141 | #endif |
---|
| 7142 | ENDDO |
---|
| 7143 | |
---|
| 7144 | END SUBROUTINE usm_read_anthropogenic_heat |
---|
| 7145 | |
---|
| 7146 | |
---|
| 7147 | !------------------------------------------------------------------------------! |
---|
| 7148 | ! Description: |
---|
| 7149 | ! ------------ |
---|
[2920] | 7150 | !> Soubroutine reads t_surf and t_wall data from restart files |
---|
[2737] | 7151 | !------------------------------------------------------------------------------! |
---|
[2894] | 7152 | SUBROUTINE usm_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & |
---|
| 7153 | nxr_on_file, nynf, nync, nyn_on_file, nysf, nysc,& |
---|
| 7154 | nys_on_file, found ) |
---|
[2737] | 7155 | |
---|
| 7156 | |
---|
[2894] | 7157 | USE control_parameters, & |
---|
| 7158 | ONLY: length, restart_string |
---|
[2737] | 7159 | |
---|
| 7160 | IMPLICIT NONE |
---|
| 7161 | |
---|
| 7162 | INTEGER(iwp) :: l !< index variable for surface type |
---|
[2894] | 7163 | INTEGER(iwp) :: i !< running index over input files |
---|
| 7164 | INTEGER(iwp) :: k !< running index over previous input files covering current local domain |
---|
[2737] | 7165 | INTEGER(iwp) :: ns_h_on_file_usm !< number of horizontal surface elements (urban type) on file |
---|
| 7166 | INTEGER(iwp) :: nxlc !< index of left boundary on current subdomain |
---|
| 7167 | INTEGER(iwp) :: nxlf !< index of left boundary on former subdomain |
---|
| 7168 | INTEGER(iwp) :: nxl_on_file !< index of left boundary on former local domain |
---|
| 7169 | INTEGER(iwp) :: nxrc !< index of right boundary on current subdomain |
---|
| 7170 | INTEGER(iwp) :: nxrf !< index of right boundary on former subdomain |
---|
[2894] | 7171 | INTEGER(iwp) :: nxr_on_file !< index of right boundary on former local domain |
---|
[2737] | 7172 | INTEGER(iwp) :: nync !< index of north boundary on current subdomain |
---|
| 7173 | INTEGER(iwp) :: nynf !< index of north boundary on former subdomain |
---|
[2894] | 7174 | INTEGER(iwp) :: nyn_on_file !< index of north boundary on former local domain |
---|
[2737] | 7175 | INTEGER(iwp) :: nysc !< index of south boundary on current subdomain |
---|
| 7176 | INTEGER(iwp) :: nysf !< index of south boundary on former subdomain |
---|
[2894] | 7177 | INTEGER(iwp) :: nys_on_file !< index of south boundary on former local domain |
---|
[2737] | 7178 | |
---|
| 7179 | INTEGER(iwp) :: ns_v_on_file_usm(0:3) !< number of vertical surface elements (urban type) on file |
---|
| 7180 | |
---|
[2894] | 7181 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: start_index_on_file |
---|
| 7182 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: end_index_on_file |
---|
| 7183 | |
---|
| 7184 | LOGICAL, INTENT(OUT) :: found |
---|
[2737] | 7185 | |
---|
[3418] | 7186 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_wall_h, tmp_surf_window_h, tmp_surf_green_h |
---|
[2894] | 7187 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_wall_h, tmp_window_h, tmp_green_h |
---|
[2737] | 7188 | |
---|
[3418] | 7189 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_wall_v, tmp_surf_window_v, tmp_surf_green_v |
---|
[2894] | 7190 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_wall_v, tmp_window_v, tmp_green_v |
---|
[2737] | 7191 | |
---|
[2894] | 7192 | |
---|
| 7193 | found = .TRUE. |
---|
| 7194 | |
---|
| 7195 | |
---|
| 7196 | SELECT CASE ( restart_string(1:length) ) |
---|
| 7197 | |
---|
| 7198 | CASE ( 'ns_h_on_file_usm') |
---|
| 7199 | IF ( k == 1 ) THEN |
---|
| 7200 | READ ( 13 ) ns_h_on_file_usm |
---|
| 7201 | |
---|
[3418] | 7202 | IF ( ALLOCATED( tmp_surf_wall_h ) ) DEALLOCATE( tmp_surf_wall_h ) |
---|
[2894] | 7203 | IF ( ALLOCATED( tmp_wall_h ) ) DEALLOCATE( tmp_wall_h ) |
---|
| 7204 | IF ( ALLOCATED( tmp_surf_window_h ) ) & |
---|
| 7205 | DEALLOCATE( tmp_surf_window_h ) |
---|
| 7206 | IF ( ALLOCATED( tmp_window_h) ) DEALLOCATE( tmp_window_h ) |
---|
| 7207 | IF ( ALLOCATED( tmp_surf_green_h) ) & |
---|
| 7208 | DEALLOCATE( tmp_surf_green_h ) |
---|
| 7209 | IF ( ALLOCATED( tmp_green_h) ) DEALLOCATE( tmp_green_h ) |
---|
| 7210 | |
---|
[2737] | 7211 | ! |
---|
[2894] | 7212 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
| 7213 | !-- the size of allocated surface elements do not necessarily |
---|
| 7214 | !-- need to match the size of present surface elements on |
---|
| 7215 | !-- current processor, as the number of processors between |
---|
| 7216 | !-- restarts can change. |
---|
[3418] | 7217 | ALLOCATE( tmp_surf_wall_h(1:ns_h_on_file_usm) ) |
---|
[2894] | 7218 | ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1, & |
---|
| 7219 | 1:ns_h_on_file_usm) ) |
---|
| 7220 | ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) ) |
---|
| 7221 | ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1, & |
---|
| 7222 | 1:ns_h_on_file_usm) ) |
---|
| 7223 | ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) ) |
---|
| 7224 | ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1, & |
---|
| 7225 | 1:ns_h_on_file_usm) ) |
---|
| 7226 | |
---|
| 7227 | ENDIF |
---|
| 7228 | |
---|
| 7229 | CASE ( 'ns_v_on_file_usm') |
---|
| 7230 | IF ( k == 1 ) THEN |
---|
| 7231 | READ ( 13 ) ns_v_on_file_usm |
---|
| 7232 | |
---|
| 7233 | DO l = 0, 3 |
---|
[3418] | 7234 | IF ( ALLOCATED( tmp_surf_wall_v(l)%t ) ) & |
---|
| 7235 | DEALLOCATE( tmp_surf_wall_v(l)%t ) |
---|
[2894] | 7236 | IF ( ALLOCATED( tmp_wall_v(l)%t ) ) & |
---|
| 7237 | DEALLOCATE( tmp_wall_v(l)%t ) |
---|
| 7238 | IF ( ALLOCATED( tmp_surf_window_v(l)%t ) ) & |
---|
| 7239 | DEALLOCATE( tmp_surf_window_v(l)%t ) |
---|
| 7240 | IF ( ALLOCATED( tmp_window_v(l)%t ) ) & |
---|
| 7241 | DEALLOCATE( tmp_window_v(l)%t ) |
---|
| 7242 | IF ( ALLOCATED( tmp_surf_green_v(l)%t ) ) & |
---|
| 7243 | DEALLOCATE( tmp_surf_green_v(l)%t ) |
---|
| 7244 | IF ( ALLOCATED( tmp_green_v(l)%t ) ) & |
---|
| 7245 | DEALLOCATE( tmp_green_v(l)%t ) |
---|
| 7246 | ENDDO |
---|
| 7247 | |
---|
[2737] | 7248 | ! |
---|
[2894] | 7249 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
| 7250 | !-- the size of allocated surface elements do not necessarily |
---|
| 7251 | !-- need to match the size of present surface elements on |
---|
| 7252 | !-- current processor, as the number of processors between |
---|
| 7253 | !-- restarts can change. |
---|
| 7254 | DO l = 0, 3 |
---|
[3418] | 7255 | ALLOCATE( tmp_surf_wall_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
[2894] | 7256 | ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
| 7257 | 1:ns_v_on_file_usm(l) ) ) |
---|
| 7258 | ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
| 7259 | ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
| 7260 | 1:ns_v_on_file_usm(l) ) ) |
---|
| 7261 | ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
| 7262 | ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
| 7263 | 1:ns_v_on_file_usm(l) ) ) |
---|
| 7264 | ENDDO |
---|
[2737] | 7265 | |
---|
[2894] | 7266 | ENDIF |
---|
[2737] | 7267 | |
---|
[2894] | 7268 | CASE ( 'usm_start_index_h', 'usm_start_index_v' ) |
---|
| 7269 | IF ( k == 1 ) THEN |
---|
[2737] | 7270 | |
---|
[2894] | 7271 | IF ( ALLOCATED( start_index_on_file ) ) & |
---|
| 7272 | DEALLOCATE( start_index_on_file ) |
---|
[2737] | 7273 | |
---|
[2894] | 7274 | ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file, & |
---|
| 7275 | nxl_on_file:nxr_on_file) ) |
---|
| 7276 | |
---|
| 7277 | READ ( 13 ) start_index_on_file |
---|
| 7278 | |
---|
| 7279 | ENDIF |
---|
[2737] | 7280 | |
---|
[2894] | 7281 | CASE ( 'usm_end_index_h', 'usm_end_index_v' ) |
---|
| 7282 | IF ( k == 1 ) THEN |
---|
| 7283 | |
---|
| 7284 | IF ( ALLOCATED( end_index_on_file ) ) & |
---|
| 7285 | DEALLOCATE( end_index_on_file ) |
---|
| 7286 | |
---|
| 7287 | ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file, & |
---|
| 7288 | nxl_on_file:nxr_on_file) ) |
---|
| 7289 | |
---|
| 7290 | READ ( 13 ) end_index_on_file |
---|
| 7291 | |
---|
| 7292 | ENDIF |
---|
| 7293 | |
---|
[3418] | 7294 | CASE ( 't_surf_wall_h' ) |
---|
[2737] | 7295 | #if defined( __nopointer ) |
---|
[2894] | 7296 | IF ( k == 1 ) THEN |
---|
[3418] | 7297 | IF ( .NOT. ALLOCATED( t_surf_wall_h ) ) & |
---|
| 7298 | ALLOCATE( t_surf_wall_h(1:surf_usm_h%ns) ) |
---|
| 7299 | READ ( 13 ) tmp_surf_wall_h |
---|
[2894] | 7300 | ENDIF |
---|
| 7301 | CALL surface_restore_elements( & |
---|
[3418] | 7302 | t_surf_wall_h, tmp_surf_wall_h, & |
---|
[2894] | 7303 | surf_usm_h%start_index, & |
---|
| 7304 | start_index_on_file, & |
---|
| 7305 | end_index_on_file, & |
---|
| 7306 | nxlc, nysc, & |
---|
| 7307 | nxlf, nxrf, nysf, nynf, & |
---|
| 7308 | nys_on_file, nyn_on_file, & |
---|
| 7309 | nxl_on_file,nxr_on_file ) |
---|
| 7310 | #else |
---|
| 7311 | IF ( k == 1 ) THEN |
---|
[3418] | 7312 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
| 7313 | ALLOCATE( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
| 7314 | READ ( 13 ) tmp_surf_wall_h |
---|
[2894] | 7315 | ENDIF |
---|
| 7316 | CALL surface_restore_elements( & |
---|
[3418] | 7317 | t_surf_wall_h_1, tmp_surf_wall_h, & |
---|
| 7318 | surf_usm_h%start_index, & |
---|
[2894] | 7319 | start_index_on_file, & |
---|
| 7320 | end_index_on_file, & |
---|
| 7321 | nxlc, nysc, & |
---|
| 7322 | nxlf, nxrf, nysf, nynf, & |
---|
| 7323 | nys_on_file, nyn_on_file, & |
---|
| 7324 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7325 | #endif |
---|
| 7326 | |
---|
[3418] | 7327 | CASE ( 't_surf_wall_v(0)' ) |
---|
[2737] | 7328 | #if defined( __nopointer ) |
---|
[2894] | 7329 | IF ( k == 1 ) THEN |
---|
[3418] | 7330 | IF ( .NOT. ALLOCATED( t_surf_wall_v(0)%t ) ) & |
---|
[2894] | 7331 | ALLOCATE( t_surf_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
[3418] | 7332 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
[2894] | 7333 | ENDIF |
---|
| 7334 | CALL surface_restore_elements( & |
---|
[3418] | 7335 | t_surf_wall_v(0)%t, tmp_surf_wall_v(0)%t, & |
---|
[2894] | 7336 | surf_usm_v(0)%start_index, & |
---|
| 7337 | start_index_on_file, & |
---|
| 7338 | end_index_on_file, & |
---|
| 7339 | nxlc, nysc, & |
---|
| 7340 | nxlf, nxrf, nysf, nynf, & |
---|
| 7341 | nys_on_file, nyn_on_file, & |
---|
| 7342 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7343 | #else |
---|
[2894] | 7344 | IF ( k == 1 ) THEN |
---|
[3418] | 7345 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(0)%t ) ) & |
---|
| 7346 | ALLOCATE( t_surf_wall_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
| 7347 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
[2894] | 7348 | ENDIF |
---|
| 7349 | CALL surface_restore_elements( & |
---|
[3418] | 7350 | t_surf_wall_v_1(0)%t, tmp_surf_wall_v(0)%t, & |
---|
[2894] | 7351 | surf_usm_v(0)%start_index, & |
---|
| 7352 | start_index_on_file, & |
---|
| 7353 | end_index_on_file, & |
---|
| 7354 | nxlc, nysc, & |
---|
| 7355 | nxlf, nxrf, nysf, nynf, & |
---|
| 7356 | nys_on_file, nyn_on_file, & |
---|
| 7357 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7358 | #endif |
---|
[2894] | 7359 | |
---|
[3418] | 7360 | CASE ( 't_surf_wall_v(1)' ) |
---|
[2737] | 7361 | #if defined( __nopointer ) |
---|
[2894] | 7362 | IF ( k == 1 ) THEN |
---|
[3418] | 7363 | IF ( .NOT. ALLOCATED( t_surf_wall_v(1)%t ) ) & |
---|
| 7364 | ALLOCATE( t_surf_wall_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
| 7365 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
[2894] | 7366 | ENDIF |
---|
| 7367 | CALL surface_restore_elements( & |
---|
[3418] | 7368 | t_surf_wall_v(1)%t, tmp_surf_wall_v(1)%t, & |
---|
[2894] | 7369 | surf_usm_v(1)%start_index, & |
---|
| 7370 | start_index_on_file, & |
---|
| 7371 | end_index_on_file, & |
---|
| 7372 | nxlc, nysc, & |
---|
| 7373 | nxlf, nxrf, nysf, nynf, & |
---|
| 7374 | nys_on_file, nyn_on_file, & |
---|
| 7375 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7376 | #else |
---|
[2894] | 7377 | IF ( k == 1 ) THEN |
---|
[3418] | 7378 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(1)%t ) ) & |
---|
| 7379 | ALLOCATE( t_surf_wall_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
| 7380 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
[2894] | 7381 | ENDIF |
---|
| 7382 | CALL surface_restore_elements( & |
---|
[3418] | 7383 | t_surf_wall_v_1(1)%t, tmp_surf_wall_v(1)%t, & |
---|
[2894] | 7384 | surf_usm_v(1)%start_index, & |
---|
| 7385 | start_index_on_file, & |
---|
| 7386 | end_index_on_file, & |
---|
| 7387 | nxlc, nysc, & |
---|
| 7388 | nxlf, nxrf, nysf, nynf, & |
---|
| 7389 | nys_on_file, nyn_on_file, & |
---|
| 7390 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7391 | #endif |
---|
| 7392 | |
---|
[3418] | 7393 | CASE ( 't_surf_wall_v(2)' ) |
---|
[2737] | 7394 | #if defined( __nopointer ) |
---|
[2894] | 7395 | IF ( k == 1 ) THEN |
---|
[3418] | 7396 | IF ( .NOT. ALLOCATED( t_surf_wall_v(2)%t ) ) & |
---|
| 7397 | ALLOCATE( t_surf_wall_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
| 7398 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
[2894] | 7399 | ENDIF |
---|
| 7400 | CALL surface_restore_elements( & |
---|
[3418] | 7401 | t_surf_wall_v(2)%t, tmp_surf_wall_v(2)%t, & |
---|
[2894] | 7402 | surf_usm_v(2)%start_index, & |
---|
| 7403 | start_index_on_file, & |
---|
| 7404 | end_index_on_file, & |
---|
| 7405 | nxlc, nysc, & |
---|
| 7406 | nxlf, nxrf, nysf, nynf, & |
---|
| 7407 | nys_on_file, nyn_on_file, & |
---|
| 7408 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7409 | #else |
---|
[2894] | 7410 | IF ( k == 1 ) THEN |
---|
[3418] | 7411 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(2)%t ) ) & |
---|
| 7412 | ALLOCATE( t_surf_wall_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
| 7413 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
[2894] | 7414 | ENDIF |
---|
| 7415 | CALL surface_restore_elements( & |
---|
[3418] | 7416 | t_surf_wall_v_1(2)%t, tmp_surf_wall_v(2)%t, & |
---|
[2894] | 7417 | surf_usm_v(2)%start_index, & |
---|
| 7418 | start_index_on_file, & |
---|
| 7419 | end_index_on_file, & |
---|
| 7420 | nxlc, nysc, & |
---|
| 7421 | nxlf, nxrf, nysf, nynf, & |
---|
| 7422 | nys_on_file, nyn_on_file, & |
---|
| 7423 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7424 | #endif |
---|
[2894] | 7425 | |
---|
[3418] | 7426 | CASE ( 't_surf_wall_v(3)' ) |
---|
[2737] | 7427 | #if defined( __nopointer ) |
---|
[2894] | 7428 | IF ( k == 1 ) THEN |
---|
[3418] | 7429 | IF ( .NOT. ALLOCATED( t_surf_wall_v(3)%t ) ) & |
---|
| 7430 | ALLOCATE( t_surf_wall_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
| 7431 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
[2894] | 7432 | ENDIF |
---|
| 7433 | CALL surface_restore_elements( & |
---|
[3418] | 7434 | t_surf_wall_v(3)%t, tmp_surf_wall_v(3)%t, & |
---|
[2894] | 7435 | surf_usm_v(3)%start_index, & |
---|
| 7436 | start_index_on_file, & |
---|
| 7437 | end_index_on_file, & |
---|
| 7438 | nxlc, nysc, & |
---|
| 7439 | nxlf, nxrf, nysf, nynf, & |
---|
| 7440 | nys_on_file, nyn_on_file, & |
---|
| 7441 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7442 | #else |
---|
[2894] | 7443 | IF ( k == 1 ) THEN |
---|
[3418] | 7444 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(3)%t ) ) & |
---|
| 7445 | ALLOCATE( t_surf_wall_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
| 7446 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
[2894] | 7447 | ENDIF |
---|
| 7448 | CALL surface_restore_elements( & |
---|
[3418] | 7449 | t_surf_wall_v_1(3)%t, tmp_surf_wall_v(3)%t, & |
---|
[2894] | 7450 | surf_usm_v(3)%start_index, & |
---|
| 7451 | start_index_on_file, & |
---|
| 7452 | end_index_on_file, & |
---|
| 7453 | nxlc, nysc, & |
---|
| 7454 | nxlf, nxrf, nysf, nynf, & |
---|
| 7455 | nys_on_file, nyn_on_file, & |
---|
| 7456 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7457 | #endif |
---|
[2894] | 7458 | CASE ( 't_surf_green_h' ) |
---|
[2737] | 7459 | #if defined( __nopointer ) |
---|
[2894] | 7460 | IF ( k == 1 ) THEN |
---|
| 7461 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
| 7462 | ALLOCATE( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
| 7463 | READ ( 13 ) tmp_surf_green_h |
---|
| 7464 | ENDIF |
---|
| 7465 | CALL surface_restore_elements( & |
---|
| 7466 | t_surf_green_h, tmp_surf_green_h, & |
---|
| 7467 | surf_usm_h%start_index, & |
---|
| 7468 | start_index_on_file, & |
---|
| 7469 | end_index_on_file, & |
---|
| 7470 | nxlc, nysc, & |
---|
| 7471 | nxlf, nxrf, nysf, nynf, & |
---|
| 7472 | nys_on_file, nyn_on_file, & |
---|
| 7473 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7474 | #else |
---|
[2894] | 7475 | IF ( k == 1 ) THEN |
---|
| 7476 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
| 7477 | ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
| 7478 | READ ( 13 ) tmp_surf_green_h |
---|
| 7479 | ENDIF |
---|
| 7480 | CALL surface_restore_elements( & |
---|
| 7481 | t_surf_green_h_1, tmp_surf_green_h, & |
---|
| 7482 | surf_usm_h%start_index, & |
---|
| 7483 | start_index_on_file, & |
---|
| 7484 | end_index_on_file, & |
---|
| 7485 | nxlc, nysc, & |
---|
| 7486 | nxlf, nxrf, nysf, nynf, & |
---|
| 7487 | nys_on_file, nyn_on_file, & |
---|
| 7488 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7489 | #endif |
---|
| 7490 | |
---|
[2894] | 7491 | CASE ( 't_surf_green_v(0)' ) |
---|
[2737] | 7492 | #if defined( __nopointer ) |
---|
[2894] | 7493 | IF ( k == 1 ) THEN |
---|
| 7494 | IF ( .NOT. ALLOCATED( t_surf_green_v(0)%t ) ) & |
---|
| 7495 | ALLOCATE( t_surf_green_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
| 7496 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
| 7497 | ENDIF |
---|
| 7498 | CALL surface_restore_elements( & |
---|
| 7499 | t_surf_green_v(0)%t, & |
---|
| 7500 | tmp_surf_green_v(0)%t, & |
---|
| 7501 | surf_usm_v(0)%start_index, & |
---|
| 7502 | start_index_on_file, & |
---|
| 7503 | end_index_on_file, & |
---|
| 7504 | nxlc, nysc, & |
---|
| 7505 | nxlf, nxrf, nysf, nynf, & |
---|
| 7506 | nys_on_file, nyn_on_file, & |
---|
| 7507 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7508 | #else |
---|
[2894] | 7509 | IF ( k == 1 ) THEN |
---|
| 7510 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(0)%t ) ) & |
---|
| 7511 | ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
| 7512 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
| 7513 | ENDIF |
---|
| 7514 | CALL surface_restore_elements( & |
---|
| 7515 | t_surf_green_v_1(0)%t, & |
---|
| 7516 | tmp_surf_green_v(0)%t, & |
---|
| 7517 | surf_usm_v(0)%start_index, & |
---|
| 7518 | start_index_on_file, & |
---|
| 7519 | end_index_on_file, & |
---|
| 7520 | nxlc, nysc, & |
---|
| 7521 | nxlf, nxrf, nysf, nynf, & |
---|
| 7522 | nys_on_file, nyn_on_file, & |
---|
| 7523 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7524 | #endif |
---|
[2894] | 7525 | |
---|
| 7526 | CASE ( 't_surf_green_v(1)' ) |
---|
[2737] | 7527 | #if defined( __nopointer ) |
---|
[2894] | 7528 | IF ( k == 1 ) THEN |
---|
| 7529 | IF ( .NOT. ALLOCATED( t_surf_green_v(1)%t ) ) & |
---|
| 7530 | ALLOCATE( t_surf_green_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
| 7531 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
| 7532 | ENDIF |
---|
| 7533 | CALL surface_restore_elements( & |
---|
| 7534 | t_surf_green_v(1)%t, & |
---|
| 7535 | tmp_surf_green_v(1)%t, & |
---|
| 7536 | surf_usm_v(1)%start_index, & |
---|
| 7537 | start_index_on_file, & |
---|
| 7538 | end_index_on_file, & |
---|
| 7539 | nxlc, nysc, & |
---|
| 7540 | nxlf, nxrf, nysf, nynf, & |
---|
| 7541 | nys_on_file, nyn_on_file, & |
---|
| 7542 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7543 | #else |
---|
[2894] | 7544 | IF ( k == 1 ) THEN |
---|
| 7545 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(1)%t ) ) & |
---|
| 7546 | ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
| 7547 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
| 7548 | ENDIF |
---|
| 7549 | CALL surface_restore_elements( & |
---|
| 7550 | t_surf_green_v_1(1)%t, & |
---|
| 7551 | tmp_surf_green_v(1)%t, & |
---|
| 7552 | surf_usm_v(1)%start_index, & |
---|
| 7553 | start_index_on_file, & |
---|
| 7554 | end_index_on_file, & |
---|
| 7555 | nxlc, nysc, & |
---|
| 7556 | nxlf, nxrf, nysf, nynf, & |
---|
| 7557 | nys_on_file, nyn_on_file, & |
---|
| 7558 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7559 | #endif |
---|
| 7560 | |
---|
[2894] | 7561 | CASE ( 't_surf_green_v(2)' ) |
---|
[2737] | 7562 | #if defined( __nopointer ) |
---|
[2894] | 7563 | IF ( k == 1 ) THEN |
---|
| 7564 | IF ( .NOT. ALLOCATED( t_surf_green_v(2)%t ) ) & |
---|
| 7565 | ALLOCATE( t_surf_green_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
| 7566 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
| 7567 | ENDIF |
---|
| 7568 | CALL surface_restore_elements( & |
---|
| 7569 | t_surf_green_v(2)%t, & |
---|
| 7570 | tmp_surf_green_v(2)%t, & |
---|
| 7571 | surf_usm_v(2)%start_index, & |
---|
| 7572 | start_index_on_file, & |
---|
| 7573 | end_index_on_file, & |
---|
| 7574 | nxlc, nysc, & |
---|
| 7575 | nxlf, nxrf, nysf, nynf, & |
---|
| 7576 | nys_on_file, nyn_on_file, & |
---|
| 7577 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7578 | #else |
---|
[2894] | 7579 | IF ( k == 1 ) THEN |
---|
| 7580 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(2)%t ) ) & |
---|
| 7581 | ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
| 7582 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
| 7583 | ENDIF |
---|
| 7584 | CALL surface_restore_elements( & |
---|
| 7585 | t_surf_green_v_1(2)%t, & |
---|
| 7586 | tmp_surf_green_v(2)%t, & |
---|
| 7587 | surf_usm_v(2)%start_index, & |
---|
| 7588 | start_index_on_file, & |
---|
| 7589 | end_index_on_file, & |
---|
| 7590 | nxlc, nysc, & |
---|
| 7591 | nxlf, nxrf, nysf, nynf, & |
---|
| 7592 | nys_on_file, nyn_on_file, & |
---|
| 7593 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7594 | #endif |
---|
[2894] | 7595 | |
---|
| 7596 | CASE ( 't_surf_green_v(3)' ) |
---|
[2737] | 7597 | #if defined( __nopointer ) |
---|
[2894] | 7598 | IF ( k == 1 ) THEN |
---|
| 7599 | IF ( .NOT. ALLOCATED( t_surf_green_v(3)%t ) ) & |
---|
| 7600 | ALLOCATE( t_surf_green_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
| 7601 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
| 7602 | ENDIF |
---|
| 7603 | CALL surface_restore_elements( & |
---|
| 7604 | t_surf_green_v(3)%t, & |
---|
| 7605 | tmp_surf_green_v(3)%t, & |
---|
| 7606 | surf_usm_v(3)%start_index, & |
---|
| 7607 | start_index_on_file, & |
---|
| 7608 | end_index_on_file, & |
---|
| 7609 | nxlc, nysc, & |
---|
| 7610 | nxlf, nxrf, nysf, nynf, & |
---|
| 7611 | nys_on_file, nyn_on_file, & |
---|
| 7612 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7613 | #else |
---|
[2894] | 7614 | IF ( k == 1 ) THEN |
---|
| 7615 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(3)%t ) ) & |
---|
| 7616 | ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
| 7617 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
| 7618 | ENDIF |
---|
| 7619 | CALL surface_restore_elements( & |
---|
| 7620 | t_surf_green_v_1(3)%t, & |
---|
| 7621 | tmp_surf_green_v(3)%t, & |
---|
| 7622 | surf_usm_v(3)%start_index, & |
---|
| 7623 | start_index_on_file, & |
---|
| 7624 | end_index_on_file, & |
---|
| 7625 | nxlc, nysc, & |
---|
| 7626 | nxlf, nxrf, nysf, nynf, & |
---|
| 7627 | nys_on_file, nyn_on_file, & |
---|
| 7628 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7629 | #endif |
---|
[2894] | 7630 | CASE ( 't_surf_window_h' ) |
---|
[2737] | 7631 | #if defined( __nopointer ) |
---|
[2894] | 7632 | IF ( k == 1 ) THEN |
---|
| 7633 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
| 7634 | ALLOCATE( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
| 7635 | READ ( 13 ) tmp_surf_window_h |
---|
| 7636 | ENDIF |
---|
| 7637 | CALL surface_restore_elements( & |
---|
| 7638 | t_surf_window_h, tmp_surf_window_h, & |
---|
| 7639 | surf_usm_h%start_index, & |
---|
| 7640 | start_index_on_file, & |
---|
| 7641 | end_index_on_file, & |
---|
| 7642 | nxlc, nysc, & |
---|
| 7643 | nxlf, nxrf, nysf, nynf, & |
---|
| 7644 | nys_on_file, nyn_on_file, & |
---|
| 7645 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7646 | #else |
---|
[2894] | 7647 | IF ( k == 1 ) THEN |
---|
| 7648 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
| 7649 | ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
| 7650 | READ ( 13 ) tmp_surf_window_h |
---|
| 7651 | ENDIF |
---|
| 7652 | CALL surface_restore_elements( & |
---|
| 7653 | t_surf_window_h_1, & |
---|
| 7654 | tmp_surf_window_h, & |
---|
| 7655 | surf_usm_h%start_index, & |
---|
| 7656 | start_index_on_file, & |
---|
| 7657 | end_index_on_file, & |
---|
| 7658 | nxlc, nysc, & |
---|
| 7659 | nxlf, nxrf, nysf, nynf, & |
---|
| 7660 | nys_on_file, nyn_on_file, & |
---|
| 7661 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7662 | #endif |
---|
| 7663 | |
---|
[2894] | 7664 | CASE ( 't_surf_window_v(0)' ) |
---|
[2737] | 7665 | #if defined( __nopointer ) |
---|
[2894] | 7666 | IF ( k == 1 ) THEN |
---|
| 7667 | IF ( .NOT. ALLOCATED( t_surf_window_v(0)%t ) ) & |
---|
| 7668 | ALLOCATE( t_surf_window_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
| 7669 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
| 7670 | ENDIF |
---|
| 7671 | CALL surface_restore_elements( & |
---|
| 7672 | t_surf_window_v(0)%t, & |
---|
| 7673 | tmp_surf_window_v(0)%t, & |
---|
| 7674 | surf_usm_v(0)%start_index, & |
---|
| 7675 | start_index_on_file, & |
---|
| 7676 | end_index_on_file, & |
---|
| 7677 | nxlc, nysc, & |
---|
| 7678 | nxlf, nxrf, nysf, nynf, & |
---|
| 7679 | nys_on_file, nyn_on_file, & |
---|
| 7680 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7681 | #else |
---|
[2894] | 7682 | IF ( k == 1 ) THEN |
---|
| 7683 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(0)%t ) ) & |
---|
| 7684 | ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
| 7685 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
| 7686 | ENDIF |
---|
| 7687 | CALL surface_restore_elements( & |
---|
| 7688 | t_surf_window_v_1(0)%t, & |
---|
| 7689 | tmp_surf_window_v(0)%t, & |
---|
| 7690 | surf_usm_v(0)%start_index, & |
---|
| 7691 | start_index_on_file, & |
---|
| 7692 | end_index_on_file, & |
---|
| 7693 | nxlc, nysc, & |
---|
| 7694 | nxlf, nxrf, nysf, nynf, & |
---|
| 7695 | nys_on_file, nyn_on_file, & |
---|
| 7696 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7697 | #endif |
---|
[2894] | 7698 | |
---|
| 7699 | CASE ( 't_surf_window_v(1)' ) |
---|
[2737] | 7700 | #if defined( __nopointer ) |
---|
[2894] | 7701 | IF ( k == 1 ) THEN |
---|
| 7702 | IF ( .NOT. ALLOCATED( t_surf_window_v(1)%t ) ) & |
---|
| 7703 | ALLOCATE( t_surf_window_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
| 7704 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
| 7705 | ENDIF |
---|
| 7706 | CALL surface_restore_elements( & |
---|
| 7707 | t_surf_window_v(1)%t, & |
---|
| 7708 | tmp_surf_window_v(1)%t, & |
---|
| 7709 | surf_usm_v(1)%start_index, & |
---|
| 7710 | start_index_on_file, & |
---|
| 7711 | end_index_on_file, & |
---|
| 7712 | nxlc, nysc, & |
---|
| 7713 | nxlf, nxrf, nysf, nynf, & |
---|
| 7714 | nys_on_file, nyn_on_file, & |
---|
| 7715 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7716 | #else |
---|
[2894] | 7717 | IF ( k == 1 ) THEN |
---|
| 7718 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(1)%t ) ) & |
---|
| 7719 | ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
| 7720 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
| 7721 | ENDIF |
---|
| 7722 | CALL surface_restore_elements( & |
---|
| 7723 | t_surf_window_v_1(1)%t, & |
---|
| 7724 | tmp_surf_window_v(1)%t, & |
---|
| 7725 | surf_usm_v(1)%start_index, & |
---|
| 7726 | start_index_on_file, & |
---|
| 7727 | end_index_on_file, & |
---|
| 7728 | nxlc, nysc, & |
---|
| 7729 | nxlf, nxrf, nysf, nynf, & |
---|
| 7730 | nys_on_file, nyn_on_file, & |
---|
| 7731 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7732 | #endif |
---|
| 7733 | |
---|
[2894] | 7734 | CASE ( 't_surf_window_v(2)' ) |
---|
[2737] | 7735 | #if defined( __nopointer ) |
---|
[2894] | 7736 | IF ( k == 1 ) THEN |
---|
| 7737 | IF ( .NOT. ALLOCATED( t_surf_window_v(2)%t ) ) & |
---|
| 7738 | ALLOCATE( t_surf_window_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
| 7739 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
| 7740 | ENDIF |
---|
| 7741 | CALL surface_restore_elements( & |
---|
| 7742 | t_surf_window_v(2)%t, & |
---|
| 7743 | tmp_surf_window_v(2)%t, & |
---|
| 7744 | surf_usm_v(2)%start_index, & |
---|
| 7745 | start_index_on_file, & |
---|
| 7746 | end_index_on_file, & |
---|
| 7747 | nxlc, nysc, & |
---|
| 7748 | nxlf, nxrf, nysf, nynf, & |
---|
| 7749 | nys_on_file, nyn_on_file, & |
---|
| 7750 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7751 | #else |
---|
[2894] | 7752 | IF ( k == 1 ) THEN |
---|
| 7753 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(2)%t ) ) & |
---|
| 7754 | ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
| 7755 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
| 7756 | ENDIF |
---|
| 7757 | CALL surface_restore_elements( & |
---|
| 7758 | t_surf_window_v_1(2)%t, & |
---|
| 7759 | tmp_surf_window_v(2)%t, & |
---|
| 7760 | surf_usm_v(2)%start_index, & |
---|
| 7761 | start_index_on_file, & |
---|
| 7762 | end_index_on_file, & |
---|
| 7763 | nxlc, nysc, & |
---|
| 7764 | nxlf, nxrf, nysf, nynf, & |
---|
| 7765 | nys_on_file, nyn_on_file, & |
---|
| 7766 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7767 | #endif |
---|
[2894] | 7768 | |
---|
| 7769 | CASE ( 't_surf_window_v(3)' ) |
---|
[2737] | 7770 | #if defined( __nopointer ) |
---|
[2894] | 7771 | IF ( k == 1 ) THEN |
---|
| 7772 | IF ( .NOT. ALLOCATED( t_surf_window_v(3)%t ) ) & |
---|
| 7773 | ALLOCATE( t_surf_window_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
| 7774 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
| 7775 | ENDIF |
---|
| 7776 | CALL surface_restore_elements( & |
---|
| 7777 | t_surf_window_v(3)%t, & |
---|
| 7778 | tmp_surf_window_v(3)%t, & |
---|
| 7779 | surf_usm_v(3)%start_index, & |
---|
| 7780 | start_index_on_file, & |
---|
| 7781 | end_index_on_file, & |
---|
| 7782 | nxlc, nysc, & |
---|
| 7783 | nxlf, nxrf, nysf, nynf, & |
---|
| 7784 | nys_on_file, nyn_on_file, & |
---|
| 7785 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7786 | #else |
---|
[2894] | 7787 | IF ( k == 1 ) THEN |
---|
| 7788 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(3)%t ) ) & |
---|
| 7789 | ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
| 7790 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
| 7791 | ENDIF |
---|
| 7792 | CALL surface_restore_elements( & |
---|
| 7793 | t_surf_window_v_1(3)%t, & |
---|
| 7794 | tmp_surf_window_v(3)%t, & |
---|
| 7795 | surf_usm_v(3)%start_index, & |
---|
| 7796 | start_index_on_file, & |
---|
| 7797 | end_index_on_file, & |
---|
| 7798 | nxlc, nysc, & |
---|
| 7799 | nxlf, nxrf, nysf, nynf, & |
---|
| 7800 | nys_on_file, nyn_on_file, & |
---|
| 7801 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7802 | #endif |
---|
[2894] | 7803 | CASE ( 't_wall_h' ) |
---|
[2737] | 7804 | #if defined( __nopointer ) |
---|
[2894] | 7805 | IF ( k == 1 ) THEN |
---|
| 7806 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
| 7807 | ALLOCATE( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
| 7808 | READ ( 13 ) tmp_wall_h |
---|
| 7809 | ENDIF |
---|
| 7810 | CALL surface_restore_elements( & |
---|
| 7811 | t_wall_h, tmp_wall_h, & |
---|
| 7812 | surf_usm_h%start_index, & |
---|
| 7813 | start_index_on_file, & |
---|
| 7814 | end_index_on_file, & |
---|
| 7815 | nxlc, nysc, & |
---|
| 7816 | nxlf, nxrf, nysf, nynf, & |
---|
| 7817 | nys_on_file, nyn_on_file, & |
---|
| 7818 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7819 | #else |
---|
[2894] | 7820 | IF ( k == 1 ) THEN |
---|
| 7821 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
| 7822 | ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1, & |
---|
| 7823 | 1:surf_usm_h%ns) ) |
---|
| 7824 | READ ( 13 ) tmp_wall_h |
---|
| 7825 | ENDIF |
---|
| 7826 | CALL surface_restore_elements( & |
---|
| 7827 | t_wall_h_1, tmp_wall_h, & |
---|
| 7828 | surf_usm_h%start_index, & |
---|
| 7829 | start_index_on_file, & |
---|
| 7830 | end_index_on_file, & |
---|
| 7831 | nxlc, nysc, & |
---|
| 7832 | nxlf, nxrf, nysf, nynf, & |
---|
| 7833 | nys_on_file, nyn_on_file, & |
---|
| 7834 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7835 | #endif |
---|
[2894] | 7836 | CASE ( 't_wall_v(0)' ) |
---|
[2737] | 7837 | #if defined( __nopointer ) |
---|
[2894] | 7838 | IF ( k == 1 ) THEN |
---|
| 7839 | IF ( .NOT. ALLOCATED( t_wall_v(0)%t ) ) & |
---|
| 7840 | ALLOCATE( t_wall_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
| 7841 | 1:surf_usm_v(0)%ns) ) |
---|
| 7842 | READ ( 13 ) tmp_wall_v(0)%t |
---|
| 7843 | ENDIF |
---|
| 7844 | CALL surface_restore_elements( & |
---|
| 7845 | t_wall_v(0)%t, tmp_wall_v(0)%t, & |
---|
| 7846 | surf_usm_v(0)%start_index, & |
---|
| 7847 | start_index_on_file, & |
---|
| 7848 | end_index_on_file, & |
---|
| 7849 | nxlc, nysc, & |
---|
| 7850 | nxlf, nxrf, nysf, nynf, & |
---|
| 7851 | nys_on_file, nyn_on_file, & |
---|
| 7852 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7853 | #else |
---|
[2894] | 7854 | IF ( k == 1 ) THEN |
---|
| 7855 | IF ( .NOT. ALLOCATED( t_wall_v_1(0)%t ) ) & |
---|
| 7856 | ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
| 7857 | 1:surf_usm_v(0)%ns) ) |
---|
| 7858 | READ ( 13 ) tmp_wall_v(0)%t |
---|
| 7859 | ENDIF |
---|
| 7860 | CALL surface_restore_elements( & |
---|
| 7861 | t_wall_v_1(0)%t, tmp_wall_v(0)%t, & |
---|
| 7862 | surf_usm_v(0)%start_index, & |
---|
| 7863 | start_index_on_file, & |
---|
| 7864 | end_index_on_file, & |
---|
| 7865 | nxlc, nysc, & |
---|
| 7866 | nxlf, nxrf, nysf, nynf, & |
---|
| 7867 | nys_on_file, nyn_on_file, & |
---|
| 7868 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7869 | #endif |
---|
[2894] | 7870 | CASE ( 't_wall_v(1)' ) |
---|
[2737] | 7871 | #if defined( __nopointer ) |
---|
[2894] | 7872 | IF ( k == 1 ) THEN |
---|
| 7873 | IF ( .NOT. ALLOCATED( t_wall_v(1)%t ) ) & |
---|
| 7874 | ALLOCATE( t_wall_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
| 7875 | 1:surf_usm_v(1)%ns) ) |
---|
| 7876 | READ ( 13 ) tmp_wall_v(1)%t |
---|
| 7877 | ENDIF |
---|
| 7878 | CALL surface_restore_elements( & |
---|
| 7879 | t_wall_v(1)%t, tmp_wall_v(1)%t, & |
---|
| 7880 | surf_usm_v(1)%start_index, & |
---|
| 7881 | start_index_on_file, & |
---|
| 7882 | end_index_on_file , & |
---|
| 7883 | nxlc, nysc, & |
---|
[3371] | 7884 | nxlf, nxrf, nysf, nynf, & |
---|
[2894] | 7885 | nys_on_file, nyn_on_file, & |
---|
| 7886 | nxl_on_file, nxr_on_file ) |
---|
[2737] | 7887 | #else |
---|
[2894] | 7888 | IF ( k == 1 ) THEN |
---|
| 7889 | IF ( .NOT. ALLOCATED( t_wall_v_1(1)%t ) ) & |
---|
| 7890 | ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
| 7891 | 1:surf_usm_v(1)%ns) ) |
---|
| 7892 | READ ( 13 ) tmp_wall_v(1)%t |
---|
| 7893 | ENDIF |
---|
| 7894 | CALL surface_restore_elements( & |
---|
| 7895 | t_wall_v_1(1)%t, tmp_wall_v(1)%t, & |
---|
| 7896 | surf_usm_v(1)%start_index, & |
---|
| 7897 | start_index_on_file, & |
---|
| 7898 | end_index_on_file, & |
---|
| 7899 | nxlc, nysc, & |
---|
| 7900 | nxlf, nxrf, nysf, nynf, & |
---|
| 7901 | nys_on_file, nyn_on_file, & |
---|
| 7902 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7903 | #endif |
---|
[2894] | 7904 | CASE ( 't_wall_v(2)' ) |
---|
[2737] | 7905 | #if defined( __nopointer ) |
---|
[2894] | 7906 | IF ( k == 1 ) THEN |
---|
| 7907 | IF ( .NOT. ALLOCATED( t_wall_v(2)%t ) ) & |
---|
| 7908 | ALLOCATE( t_wall_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
| 7909 | 1:surf_usm_v(2)%ns) ) |
---|
| 7910 | READ ( 13 ) tmp_wall_v(2)%t |
---|
| 7911 | ENDIF |
---|
| 7912 | CALL surface_restore_elements( & |
---|
| 7913 | t_wall_v(2)%t, tmp_wall_v(2)%t, & |
---|
| 7914 | surf_usm_v(2)%start_index, & |
---|
| 7915 | start_index_on_file, & |
---|
| 7916 | end_index_on_file, & |
---|
| 7917 | nxlc, nysc, & |
---|
| 7918 | nxlf, nxrf, nysf, nynf, & |
---|
| 7919 | nys_on_file, nyn_on_file, & |
---|
| 7920 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7921 | #else |
---|
[2894] | 7922 | IF ( k == 1 ) THEN |
---|
| 7923 | IF ( .NOT. ALLOCATED( t_wall_v_1(2)%t ) ) & |
---|
| 7924 | ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
| 7925 | 1:surf_usm_v(2)%ns) ) |
---|
| 7926 | READ ( 13 ) tmp_wall_v(2)%t |
---|
| 7927 | ENDIF |
---|
| 7928 | CALL surface_restore_elements( & |
---|
| 7929 | t_wall_v_1(2)%t, tmp_wall_v(2)%t, & |
---|
| 7930 | surf_usm_v(2)%start_index, & |
---|
| 7931 | start_index_on_file, & |
---|
| 7932 | end_index_on_file , & |
---|
| 7933 | nxlc, nysc, & |
---|
| 7934 | nxlf, nxrf, nysf, nynf, & |
---|
| 7935 | nys_on_file, nyn_on_file, & |
---|
| 7936 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7937 | #endif |
---|
[2894] | 7938 | CASE ( 't_wall_v(3)' ) |
---|
[2737] | 7939 | #if defined( __nopointer ) |
---|
[2894] | 7940 | IF ( k == 1 ) THEN |
---|
| 7941 | IF ( .NOT. ALLOCATED( t_wall_v(3)%t ) ) & |
---|
| 7942 | ALLOCATE( t_wall_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
| 7943 | 1:surf_usm_v(3)%ns) ) |
---|
| 7944 | READ ( 13 ) tmp_wall_v(3)%t |
---|
| 7945 | ENDIF |
---|
| 7946 | CALL surface_restore_elements( & |
---|
| 7947 | t_wall_v(3)%t, tmp_wall_v(3)%t, & |
---|
| 7948 | surf_usm_v(3)%start_index, & |
---|
| 7949 | start_index_on_file, & |
---|
| 7950 | end_index_on_file, & |
---|
| 7951 | nxlc, nysc, & |
---|
| 7952 | nxlf, nxrf, nysf, nynf, & |
---|
| 7953 | nys_on_file, nyn_on_file, & |
---|
| 7954 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7955 | #else |
---|
[2894] | 7956 | IF ( k == 1 ) THEN |
---|
| 7957 | IF ( .NOT. ALLOCATED( t_wall_v_1(3)%t ) ) & |
---|
| 7958 | ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
| 7959 | 1:surf_usm_v(3)%ns) ) |
---|
| 7960 | READ ( 13 ) tmp_wall_v(3)%t |
---|
| 7961 | ENDIF |
---|
| 7962 | CALL surface_restore_elements( & |
---|
| 7963 | t_wall_v_1(3)%t, tmp_wall_v(3)%t, & |
---|
| 7964 | surf_usm_v(3)%start_index, & |
---|
| 7965 | start_index_on_file, & |
---|
| 7966 | end_index_on_file, & |
---|
| 7967 | nxlc, nysc, & |
---|
| 7968 | nxlf, nxrf, nysf, nynf, & |
---|
| 7969 | nys_on_file, nyn_on_file, & |
---|
| 7970 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7971 | #endif |
---|
[2894] | 7972 | CASE ( 't_green_h' ) |
---|
[2737] | 7973 | #if defined( __nopointer ) |
---|
[2894] | 7974 | IF ( k == 1 ) THEN |
---|
| 7975 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
| 7976 | ALLOCATE( t_green_h(nzb_wall:nzt_wall+1, & |
---|
| 7977 | 1:surf_usm_h%ns) ) |
---|
| 7978 | READ ( 13 ) tmp_green_h |
---|
| 7979 | ENDIF |
---|
| 7980 | CALL surface_restore_elements( & |
---|
| 7981 | t_green_h, tmp_green_h, & |
---|
| 7982 | surf_usm_h%start_index, & |
---|
| 7983 | start_index_on_file, & |
---|
| 7984 | end_index_on_file, & |
---|
| 7985 | nxlc, nysc, & |
---|
| 7986 | nxlf, nxrf, nysf, nynf, & |
---|
| 7987 | nys_on_file, nyn_on_file, & |
---|
| 7988 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 7989 | #else |
---|
[2894] | 7990 | IF ( k == 1 ) THEN |
---|
| 7991 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
| 7992 | ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1, & |
---|
| 7993 | 1:surf_usm_h%ns) ) |
---|
| 7994 | READ ( 13 ) tmp_green_h |
---|
| 7995 | ENDIF |
---|
| 7996 | CALL surface_restore_elements( & |
---|
| 7997 | t_green_h_1, tmp_green_h, & |
---|
| 7998 | surf_usm_h%start_index, & |
---|
| 7999 | start_index_on_file, & |
---|
| 8000 | end_index_on_file, & |
---|
| 8001 | nxlc, nysc, & |
---|
| 8002 | nxlf, nxrf, nysf, nynf, & |
---|
| 8003 | nys_on_file, nyn_on_file, & |
---|
| 8004 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8005 | #endif |
---|
[2894] | 8006 | CASE ( 't_green_v(0)' ) |
---|
[2737] | 8007 | #if defined( __nopointer ) |
---|
[2894] | 8008 | IF ( k == 1 ) THEN |
---|
| 8009 | IF ( .NOT. ALLOCATED( t_green_v(0)%t ) ) & |
---|
| 8010 | ALLOCATE( t_green_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
| 8011 | 1:surf_usm_v(0)%ns) ) |
---|
| 8012 | READ ( 13 ) tmp_green_v(0)%t |
---|
| 8013 | ENDIF |
---|
| 8014 | CALL surface_restore_elements( & |
---|
| 8015 | t_green_v(0)%t, tmp_green_v(0)%t, & |
---|
| 8016 | surf_usm_v(0)%start_index, & |
---|
| 8017 | start_index_on_file, & |
---|
| 8018 | end_index_on_file, & |
---|
| 8019 | nxlc, nysc, & |
---|
| 8020 | nxlf, nxrf, nysf, nynf, & |
---|
| 8021 | nys_on_file, nyn_on_file, & |
---|
| 8022 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8023 | #else |
---|
[2894] | 8024 | IF ( k == 1 ) THEN |
---|
| 8025 | IF ( .NOT. ALLOCATED( t_green_v_1(0)%t ) ) & |
---|
| 8026 | ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
| 8027 | 1:surf_usm_v(0)%ns) ) |
---|
| 8028 | READ ( 13 ) tmp_green_v(0)%t |
---|
| 8029 | ENDIF |
---|
| 8030 | CALL surface_restore_elements( & |
---|
| 8031 | t_green_v_1(0)%t, tmp_green_v(0)%t, & |
---|
| 8032 | surf_usm_v(0)%start_index, & |
---|
| 8033 | start_index_on_file, & |
---|
| 8034 | end_index_on_file, & |
---|
| 8035 | nxlc, nysc, & |
---|
| 8036 | nxlf, nxrf, nysf, nynf, & |
---|
| 8037 | nys_on_file, nyn_on_file, & |
---|
| 8038 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8039 | #endif |
---|
[2894] | 8040 | CASE ( 't_green_v(1)' ) |
---|
[2737] | 8041 | #if defined( __nopointer ) |
---|
[2894] | 8042 | IF ( k == 1 ) THEN |
---|
| 8043 | IF ( .NOT. ALLOCATED( t_green_v(1)%t ) ) & |
---|
| 8044 | ALLOCATE( t_green_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
| 8045 | 1:surf_usm_v(1)%ns) ) |
---|
| 8046 | READ ( 13 ) tmp_green_v(1)%t |
---|
| 8047 | ENDIF |
---|
| 8048 | CALL surface_restore_elements( & |
---|
| 8049 | t_green_v(1)%t, tmp_green_v(1)%t, & |
---|
[3418] | 8050 | surf_usm_v(1)%start_index, & |
---|
[2894] | 8051 | start_index_on_file, & |
---|
[3418] | 8052 | end_index_on_file , & |
---|
[2894] | 8053 | nxlc, nysc, & |
---|
[3371] | 8054 | nxlf, nxrf, nysf, nynf, & |
---|
[2894] | 8055 | nys_on_file, nyn_on_file, & |
---|
| 8056 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8057 | #else |
---|
[2894] | 8058 | IF ( k == 1 ) THEN |
---|
| 8059 | IF ( .NOT. ALLOCATED( t_green_v_1(1)%t ) ) & |
---|
| 8060 | ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
| 8061 | 1:surf_usm_v(1)%ns) ) |
---|
| 8062 | READ ( 13 ) tmp_green_v(1)%t |
---|
| 8063 | ENDIF |
---|
| 8064 | CALL surface_restore_elements( & |
---|
| 8065 | t_green_v_1(1)%t, tmp_green_v(1)%t, & |
---|
[3418] | 8066 | surf_usm_v(1)%start_index, & |
---|
[2894] | 8067 | start_index_on_file, & |
---|
| 8068 | end_index_on_file, & |
---|
| 8069 | nxlc, nysc, & |
---|
| 8070 | nxlf, nxrf, nysf, nynf, & |
---|
| 8071 | nys_on_file, nyn_on_file, & |
---|
| 8072 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8073 | #endif |
---|
[2894] | 8074 | CASE ( 't_green_v(2)' ) |
---|
[2737] | 8075 | #if defined( __nopointer ) |
---|
[2894] | 8076 | IF ( k == 1 ) THEN |
---|
| 8077 | IF ( .NOT. ALLOCATED( t_green_v(2)%t ) ) & |
---|
| 8078 | ALLOCATE( t_green_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
| 8079 | 1:surf_usm_v(2)%ns) ) |
---|
| 8080 | READ ( 13 ) tmp_green_v(2)%t |
---|
| 8081 | ENDIF |
---|
| 8082 | CALL surface_restore_elements( & |
---|
| 8083 | t_green_v(2)%t, tmp_green_v(2)%t, & |
---|
| 8084 | surf_usm_v(2)%start_index, & |
---|
| 8085 | start_index_on_file, & |
---|
| 8086 | end_index_on_file, & |
---|
| 8087 | nxlc, nysc, & |
---|
| 8088 | nxlf, nxrf, nysf, nynf, & |
---|
| 8089 | nys_on_file, nyn_on_file, & |
---|
| 8090 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8091 | #else |
---|
[2894] | 8092 | IF ( k == 1 ) THEN |
---|
| 8093 | IF ( .NOT. ALLOCATED( t_green_v_1(2)%t ) ) & |
---|
| 8094 | ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
| 8095 | 1:surf_usm_v(2)%ns) ) |
---|
| 8096 | READ ( 13 ) tmp_green_v(2)%t |
---|
| 8097 | ENDIF |
---|
| 8098 | CALL surface_restore_elements( & |
---|
| 8099 | t_green_v_1(2)%t, tmp_green_v(2)%t, & |
---|
| 8100 | surf_usm_v(2)%start_index, & |
---|
| 8101 | start_index_on_file, & |
---|
| 8102 | end_index_on_file , & |
---|
| 8103 | nxlc, nysc, & |
---|
| 8104 | nxlf, nxrf, nysf, nynf, & |
---|
| 8105 | nys_on_file, nyn_on_file, & |
---|
| 8106 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8107 | #endif |
---|
[2894] | 8108 | CASE ( 't_green_v(3)' ) |
---|
[2737] | 8109 | #if defined( __nopointer ) |
---|
[2894] | 8110 | IF ( k == 1 ) THEN |
---|
| 8111 | IF ( .NOT. ALLOCATED( t_green_v(3)%t ) ) & |
---|
| 8112 | ALLOCATE( t_green_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
| 8113 | 1:surf_usm_v(3)%ns) ) |
---|
| 8114 | READ ( 13 ) tmp_green_v(3)%t |
---|
| 8115 | ENDIF |
---|
| 8116 | CALL surface_restore_elements( & |
---|
| 8117 | t_green_v(3)%t, tmp_green_v(3)%t, & |
---|
| 8118 | surf_usm_v(3)%start_index, & |
---|
| 8119 | start_index_on_file, & |
---|
| 8120 | end_index_on_file, & |
---|
| 8121 | nxlc, nysc, & |
---|
| 8122 | nxlf, nxrf, nysf, nynf, & |
---|
| 8123 | nys_on_file, nyn_on_file, & |
---|
| 8124 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8125 | #else |
---|
[2894] | 8126 | IF ( k == 1 ) THEN |
---|
| 8127 | IF ( .NOT. ALLOCATED( t_green_v_1(3)%t ) ) & |
---|
| 8128 | ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
| 8129 | 1:surf_usm_v(3)%ns) ) |
---|
| 8130 | READ ( 13 ) tmp_green_v(3)%t |
---|
| 8131 | ENDIF |
---|
| 8132 | CALL surface_restore_elements( & |
---|
| 8133 | t_green_v_1(3)%t, tmp_green_v(3)%t, & |
---|
| 8134 | surf_usm_v(3)%start_index, & |
---|
| 8135 | start_index_on_file, & |
---|
| 8136 | end_index_on_file, & |
---|
| 8137 | nxlc, nysc, & |
---|
| 8138 | nxlf, nxrf, nysf, nynf, & |
---|
| 8139 | nys_on_file, nyn_on_file, & |
---|
| 8140 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8141 | #endif |
---|
[2894] | 8142 | CASE ( 't_window_h' ) |
---|
[2737] | 8143 | #if defined( __nopointer ) |
---|
[2894] | 8144 | IF ( k == 1 ) THEN |
---|
| 8145 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
| 8146 | ALLOCATE( t_window_h(nzb_wall:nzt_wall+1, & |
---|
| 8147 | 1:surf_usm_h%ns) ) |
---|
| 8148 | READ ( 13 ) tmp_window_h |
---|
| 8149 | ENDIF |
---|
| 8150 | CALL surface_restore_elements( & |
---|
| 8151 | t_window_h, tmp_window_h, & |
---|
| 8152 | surf_usm_h%start_index, & |
---|
| 8153 | start_index_on_file, & |
---|
| 8154 | end_index_on_file, & |
---|
| 8155 | nxlc, nysc, & |
---|
| 8156 | nxlf, nxrf, nysf, nynf, & |
---|
| 8157 | nys_on_file, nyn_on_file, & |
---|
| 8158 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8159 | #else |
---|
[2894] | 8160 | IF ( k == 1 ) THEN |
---|
| 8161 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
| 8162 | ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1, & |
---|
| 8163 | 1:surf_usm_h%ns) ) |
---|
| 8164 | READ ( 13 ) tmp_window_h |
---|
| 8165 | ENDIF |
---|
| 8166 | CALL surface_restore_elements( & |
---|
| 8167 | t_window_h_1, tmp_window_h, & |
---|
| 8168 | surf_usm_h%start_index, & |
---|
| 8169 | start_index_on_file, & |
---|
| 8170 | end_index_on_file, & |
---|
| 8171 | nxlc, nysc, & |
---|
| 8172 | nxlf, nxrf, nysf, nynf, & |
---|
| 8173 | nys_on_file, nyn_on_file, & |
---|
| 8174 | nxl_on_file, nxr_on_file ) |
---|
[2737] | 8175 | #endif |
---|
[2894] | 8176 | CASE ( 't_window_v(0)' ) |
---|
[2737] | 8177 | #if defined( __nopointer ) |
---|
[2894] | 8178 | IF ( k == 1 ) THEN |
---|
| 8179 | IF ( .NOT. ALLOCATED( t_window_v(0)%t ) ) & |
---|
| 8180 | ALLOCATE( t_window_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
| 8181 | 1:surf_usm_v(0)%ns) ) |
---|
| 8182 | READ ( 13 ) tmp_window_v(0)%t |
---|
| 8183 | ENDIF |
---|
| 8184 | CALL surface_restore_elements( & |
---|
| 8185 | t_window_v(0)%t, tmp_window_v(0)%t, & |
---|
| 8186 | surf_usm_v(0)%start_index, & |
---|
| 8187 | start_index_on_file, & |
---|
| 8188 | end_index_on_file, & |
---|
| 8189 | nxlc, nysc, & |
---|
| 8190 | nxlf, nxrf, nysf, nynf, & |
---|
| 8191 | nys_on_file, nyn_on_file, & |
---|
| 8192 | nxl_on_file, nxr_on_file ) |
---|
[2737] | 8193 | #else |
---|
[2894] | 8194 | IF ( k == 1 ) THEN |
---|
| 8195 | IF ( .NOT. ALLOCATED( t_window_v_1(0)%t ) ) & |
---|
| 8196 | ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
| 8197 | 1:surf_usm_v(0)%ns) ) |
---|
| 8198 | READ ( 13 ) tmp_window_v(0)%t |
---|
| 8199 | ENDIF |
---|
| 8200 | CALL surface_restore_elements( & |
---|
| 8201 | t_window_v_1(0)%t, & |
---|
| 8202 | tmp_window_v(0)%t, & |
---|
| 8203 | surf_usm_v(0)%start_index, & |
---|
| 8204 | start_index_on_file, & |
---|
| 8205 | end_index_on_file, & |
---|
| 8206 | nxlc, nysc, & |
---|
| 8207 | nxlf, nxrf, nysf, nynf, & |
---|
| 8208 | nys_on_file, nyn_on_file, & |
---|
| 8209 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8210 | #endif |
---|
[2894] | 8211 | CASE ( 't_window_v(1)' ) |
---|
[2737] | 8212 | #if defined( __nopointer ) |
---|
[2894] | 8213 | IF ( k == 1 ) THEN |
---|
| 8214 | IF ( .NOT. ALLOCATED( t_window_v(1)%t ) ) & |
---|
| 8215 | ALLOCATE( t_window_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
| 8216 | 1:surf_usm_v(1)%ns) ) |
---|
| 8217 | READ ( 13 ) tmp_window_v(1)%t |
---|
| 8218 | ENDIF |
---|
| 8219 | CALL surface_restore_elements( & |
---|
| 8220 | t_window_v(1)%t, tmp_window_v(1)%t, & |
---|
| 8221 | surf_usm_v(1)%start_index, & |
---|
| 8222 | start_index_on_file, & |
---|
[3418] | 8223 | end_index_on_file , & |
---|
[2894] | 8224 | nxlc, nysc, & |
---|
[3371] | 8225 | nxlf, nxrf, nysf, nynf, & |
---|
[2894] | 8226 | nys_on_file, nyn_on_file, & |
---|
| 8227 | nxl_on_file, nxr_on_file ) |
---|
[2737] | 8228 | #else |
---|
[2894] | 8229 | IF ( k == 1 ) THEN |
---|
| 8230 | IF ( .NOT. ALLOCATED( t_window_v_1(1)%t ) ) & |
---|
| 8231 | ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
| 8232 | 1:surf_usm_v(1)%ns) ) |
---|
| 8233 | READ ( 13 ) tmp_window_v(1)%t |
---|
| 8234 | ENDIF |
---|
| 8235 | CALL surface_restore_elements( & |
---|
| 8236 | t_window_v_1(1)%t, & |
---|
| 8237 | tmp_window_v(1)%t, & |
---|
| 8238 | surf_usm_v(1)%start_index, & |
---|
| 8239 | start_index_on_file, & |
---|
| 8240 | end_index_on_file, & |
---|
| 8241 | nxlc, nysc, & |
---|
| 8242 | nxlf, nxrf, nysf, nynf, & |
---|
| 8243 | nys_on_file, nyn_on_file, & |
---|
| 8244 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8245 | #endif |
---|
[2894] | 8246 | CASE ( 't_window_v(2)' ) |
---|
[2737] | 8247 | #if defined( __nopointer ) |
---|
[2894] | 8248 | IF ( k == 1 ) THEN |
---|
| 8249 | IF ( .NOT. ALLOCATED( t_window_v(2)%t ) ) & |
---|
| 8250 | ALLOCATE( t_window_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
| 8251 | 1:surf_usm_v(2)%ns) ) |
---|
| 8252 | READ ( 13 ) tmp_window_v(2)%t |
---|
| 8253 | ENDIF |
---|
| 8254 | CALL surface_restore_elements( & |
---|
| 8255 | t_window_v(2)%t, tmp_window_v(2)%t, & |
---|
| 8256 | surf_usm_v(2)%start_index, & |
---|
| 8257 | start_index_on_file, & |
---|
| 8258 | end_index_on_file, & |
---|
| 8259 | nxlc, nysc, & |
---|
| 8260 | nxlf, nxrf, nysf, nynf, & |
---|
| 8261 | nys_on_file, nyn_on_file, & |
---|
| 8262 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8263 | #else |
---|
[2894] | 8264 | IF ( k == 1 ) THEN |
---|
| 8265 | IF ( .NOT. ALLOCATED( t_window_v_1(2)%t ) ) & |
---|
| 8266 | ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
| 8267 | 1:surf_usm_v(2)%ns) ) |
---|
| 8268 | READ ( 13 ) tmp_window_v(2)%t |
---|
| 8269 | ENDIF |
---|
| 8270 | CALL surface_restore_elements( & |
---|
| 8271 | t_window_v_1(2)%t, & |
---|
| 8272 | tmp_window_v(2)%t, & |
---|
| 8273 | surf_usm_v(2)%start_index, & |
---|
| 8274 | start_index_on_file, & |
---|
| 8275 | end_index_on_file , & |
---|
| 8276 | nxlc, nysc, & |
---|
| 8277 | nxlf, nxrf, nysf, nynf, & |
---|
| 8278 | nys_on_file, nyn_on_file, & |
---|
| 8279 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8280 | #endif |
---|
[2894] | 8281 | CASE ( 't_window_v(3)' ) |
---|
[2737] | 8282 | #if defined( __nopointer ) |
---|
[2894] | 8283 | IF ( k == 1 ) THEN |
---|
| 8284 | IF ( .NOT. ALLOCATED( t_window_v(3)%t ) ) & |
---|
| 8285 | ALLOCATE( t_window_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
| 8286 | 1:surf_usm_v(3)%ns) ) |
---|
| 8287 | READ ( 13 ) tmp_window_v(3)%t |
---|
| 8288 | ENDIF |
---|
| 8289 | CALL surface_restore_elements( & |
---|
| 8290 | t_window_v(3)%t, tmp_window_v(3)%t, & |
---|
| 8291 | surf_usm_v(3)%start_index, & |
---|
| 8292 | start_index_on_file, & |
---|
| 8293 | end_index_on_file, & |
---|
| 8294 | nxlc, nysc, & |
---|
| 8295 | nxlf, nxrf, nysf, nynf, & |
---|
| 8296 | nys_on_file, nyn_on_file, & |
---|
| 8297 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8298 | #else |
---|
[2894] | 8299 | IF ( k == 1 ) THEN |
---|
| 8300 | IF ( .NOT. ALLOCATED( t_window_v_1(3)%t ) ) & |
---|
| 8301 | ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) ) |
---|
| 8302 | READ ( 13 ) tmp_window_v(3)%t |
---|
| 8303 | ENDIF |
---|
| 8304 | CALL surface_restore_elements( & |
---|
| 8305 | t_window_v_1(3)%t, & |
---|
| 8306 | tmp_window_v(3)%t, & |
---|
| 8307 | surf_usm_v(3)%start_index, & |
---|
| 8308 | start_index_on_file, & |
---|
| 8309 | end_index_on_file, & |
---|
| 8310 | nxlc, nysc, & |
---|
| 8311 | nxlf, nxrf, nysf, nynf, & |
---|
| 8312 | nys_on_file, nyn_on_file, & |
---|
| 8313 | nxl_on_file,nxr_on_file ) |
---|
[2737] | 8314 | #endif |
---|
[2894] | 8315 | CASE DEFAULT |
---|
[2737] | 8316 | |
---|
[2894] | 8317 | found = .FALSE. |
---|
[2737] | 8318 | |
---|
[2894] | 8319 | END SELECT |
---|
[2737] | 8320 | |
---|
| 8321 | |
---|
[2894] | 8322 | END SUBROUTINE usm_rrd_local |
---|
[2737] | 8323 | |
---|
| 8324 | |
---|
| 8325 | |
---|
| 8326 | !------------------------------------------------------------------------------! |
---|
| 8327 | ! Description: |
---|
| 8328 | ! ------------ |
---|
| 8329 | ! |
---|
| 8330 | !> This subroutine reads walls, roofs and land categories and it parameters |
---|
| 8331 | !> from input files. |
---|
| 8332 | !------------------------------------------------------------------------------! |
---|
| 8333 | SUBROUTINE usm_read_urban_surface_types |
---|
| 8334 | |
---|
| 8335 | USE netcdf_data_input_mod, & |
---|
| 8336 | ONLY: building_pars_f, building_type_f |
---|
| 8337 | |
---|
| 8338 | IMPLICIT NONE |
---|
| 8339 | |
---|
| 8340 | CHARACTER(12) :: wtn |
---|
| 8341 | INTEGER(iwp) :: wtc |
---|
| 8342 | REAL(wp), DIMENSION(n_surface_params) :: wtp |
---|
[3347] | 8343 | LOGICAL :: ascii_file = .FALSE. |
---|
[2737] | 8344 | INTEGER(iwp), DIMENSION(0:17, nysg:nyng, nxlg:nxrg) :: usm_par |
---|
| 8345 | REAL(wp), DIMENSION(1:14, nysg:nyng, nxlg:nxrg) :: usm_val |
---|
[3418] | 8346 | INTEGER(iwp) :: k, l, d, iw, jw, kw, it, ip, ii, ij, m |
---|
[2737] | 8347 | INTEGER(iwp) :: i, j |
---|
| 8348 | INTEGER(iwp) :: nz, roof, dirwe, dirsn |
---|
| 8349 | INTEGER(iwp) :: category |
---|
| 8350 | INTEGER(iwp) :: weheight1, wecat1, snheight1, sncat1 |
---|
| 8351 | INTEGER(iwp) :: weheight2, wecat2, snheight2, sncat2 |
---|
| 8352 | INTEGER(iwp) :: weheight3, wecat3, snheight3, sncat3 |
---|
| 8353 | REAL(wp) :: height, albedo, thick |
---|
| 8354 | REAL(wp) :: wealbedo1, wethick1, snalbedo1, snthick1 |
---|
| 8355 | REAL(wp) :: wealbedo2, wethick2, snalbedo2, snthick2 |
---|
| 8356 | REAL(wp) :: wealbedo3, wethick3, snalbedo3, snthick3 |
---|
| 8357 | |
---|
| 8358 | ! |
---|
| 8359 | !-- If building_pars or building_type are already read from static input |
---|
| 8360 | !-- file, skip reading ASCII file. |
---|
| 8361 | IF ( building_type_f%from_file .OR. building_pars_f%from_file ) & |
---|
| 8362 | RETURN |
---|
[3347] | 8363 | ! |
---|
| 8364 | !-- Check if ASCII input file exists. If not, return and initialize USM |
---|
| 8365 | !-- with default settings. |
---|
| 8366 | INQUIRE( FILE = 'SURFACE_PARAMETERS' // coupling_char, & |
---|
| 8367 | EXIST = ascii_file ) |
---|
| 8368 | |
---|
| 8369 | IF ( .NOT. ascii_file ) RETURN |
---|
[2737] | 8370 | |
---|
| 8371 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 8372 | !-- read categories of walls and their parameters |
---|
| 8373 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 8374 | DO ii = 0, io_blocks-1 |
---|
| 8375 | IF ( ii == io_group ) THEN |
---|
| 8376 | |
---|
| 8377 | !-- open urban surface file |
---|
| 8378 | OPEN( 151, file='SURFACE_PARAMETERS'//coupling_char, action='read', & |
---|
| 8379 | status='old', form='formatted', err=15 ) |
---|
| 8380 | !-- first test and get n_surface_types |
---|
| 8381 | k = 0 |
---|
| 8382 | l = 0 |
---|
| 8383 | DO |
---|
| 8384 | l = l+1 |
---|
| 8385 | READ( 151, *, err=11, end=12 ) wtc, wtp, wtn |
---|
| 8386 | k = k+1 |
---|
| 8387 | CYCLE |
---|
| 8388 | 11 CONTINUE |
---|
| 8389 | ENDDO |
---|
| 8390 | 12 n_surface_types = k |
---|
| 8391 | ALLOCATE( surface_type_names(n_surface_types) ) |
---|
| 8392 | ALLOCATE( surface_type_codes(n_surface_types) ) |
---|
| 8393 | ALLOCATE( surface_params(n_surface_params, n_surface_types) ) |
---|
| 8394 | !-- real reading |
---|
| 8395 | rewind( 151 ) |
---|
| 8396 | k = 0 |
---|
| 8397 | DO |
---|
| 8398 | READ( 151, *, err=13, end=14 ) wtc, wtp, wtn |
---|
| 8399 | k = k+1 |
---|
| 8400 | surface_type_codes(k) = wtc |
---|
| 8401 | surface_params(:,k) = wtp |
---|
| 8402 | surface_type_names(k) = wtn |
---|
| 8403 | CYCLE |
---|
| 8404 | 13 WRITE(6,'(i3,a,2i5)') myid, 'readparams2 error k=', k |
---|
| 8405 | FLUSH(6) |
---|
| 8406 | CONTINUE |
---|
| 8407 | ENDDO |
---|
| 8408 | 14 CLOSE(151) |
---|
| 8409 | CYCLE |
---|
| 8410 | 15 message_string = 'file SURFACE_PARAMETERS'//TRIM(coupling_char)//' does not exist' |
---|
| 8411 | CALL message( 'usm_read_urban_surface_types', 'PA0513', 1, 2, 0, 6, 0 ) |
---|
| 8412 | ENDIF |
---|
| 8413 | ENDDO |
---|
| 8414 | |
---|
| 8415 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 8416 | !-- read types of surfaces |
---|
| 8417 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 8418 | usm_par = 0 |
---|
| 8419 | DO ii = 0, io_blocks-1 |
---|
| 8420 | IF ( ii == io_group ) THEN |
---|
| 8421 | |
---|
| 8422 | ! |
---|
| 8423 | !-- open csv urban surface file |
---|
| 8424 | OPEN( 151, file='URBAN_SURFACE'//TRIM(coupling_char), action='read', & |
---|
| 8425 | status='old', form='formatted', err=23 ) |
---|
| 8426 | |
---|
| 8427 | l = 0 |
---|
| 8428 | DO |
---|
| 8429 | l = l+1 |
---|
| 8430 | !-- i, j, height, nz, roof, dirwe, dirsn, category, soilcat, |
---|
| 8431 | !-- weheight1, wecat1, snheight1, sncat1, weheight2, wecat2, snheight2, sncat2, |
---|
| 8432 | !-- weheight3, wecat3, snheight3, sncat3 |
---|
| 8433 | READ( 151, *, err=21, end=25 ) i, j, height, nz, roof, dirwe, dirsn, & |
---|
| 8434 | category, albedo, thick, & |
---|
| 8435 | weheight1, wecat1, wealbedo1, wethick1, & |
---|
| 8436 | weheight2, wecat2, wealbedo2, wethick2, & |
---|
| 8437 | weheight3, wecat3, wealbedo3, wethick3, & |
---|
| 8438 | snheight1, sncat1, snalbedo1, snthick1, & |
---|
| 8439 | snheight2, sncat2, snalbedo2, snthick2, & |
---|
| 8440 | snheight3, sncat3, snalbedo3, snthick3 |
---|
| 8441 | |
---|
| 8442 | IF ( i >= nxlg .AND. i <= nxrg .AND. j >= nysg .AND. j <= nyng ) THEN |
---|
| 8443 | !-- write integer variables into array |
---|
| 8444 | usm_par(:,j,i) = (/1, nz, roof, dirwe, dirsn, category, & |
---|
| 8445 | weheight1, wecat1, weheight2, wecat2, weheight3, wecat3, & |
---|
| 8446 | snheight1, sncat1, snheight2, sncat2, snheight3, sncat3 /) |
---|
| 8447 | !-- write real values into array |
---|
| 8448 | usm_val(:,j,i) = (/ albedo, thick, & |
---|
| 8449 | wealbedo1, wethick1, wealbedo2, wethick2, & |
---|
| 8450 | wealbedo3, wethick3, snalbedo1, snthick1, & |
---|
| 8451 | snalbedo2, snthick2, snalbedo3, snthick3 /) |
---|
| 8452 | ENDIF |
---|
| 8453 | CYCLE |
---|
| 8454 | 21 WRITE (message_string, "(A,I5)") 'errors in file URBAN_SURFACE'//TRIM(coupling_char)//' on line ', l |
---|
| 8455 | CALL message( 'usm_read_urban_surface_types', 'PA0512', 0, 1, 0, 6, 0 ) |
---|
| 8456 | ENDDO |
---|
| 8457 | |
---|
| 8458 | 23 message_string = 'file URBAN_SURFACE'//TRIM(coupling_char)//' does not exist' |
---|
| 8459 | CALL message( 'usm_read_urban_surface_types', 'PA0514', 1, 2, 0, 6, 0 ) |
---|
| 8460 | |
---|
[3029] | 8461 | 25 CLOSE( 151 ) |
---|
[2737] | 8462 | |
---|
| 8463 | ENDIF |
---|
[3151] | 8464 | #if defined( __parallel ) |
---|
[2737] | 8465 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
| 8466 | #endif |
---|
| 8467 | ENDDO |
---|
| 8468 | |
---|
[3151] | 8469 | ! |
---|
[2737] | 8470 | !-- check completeness and formal correctness of the data |
---|
| 8471 | DO i = nxlg, nxrg |
---|
| 8472 | DO j = nysg, nyng |
---|
| 8473 | IF ( usm_par(0,j,i) /= 0 .AND. ( & !< incomplete data,supply default values later |
---|
| 8474 | usm_par(1,j,i) < nzb .OR. & |
---|
| 8475 | usm_par(1,j,i) > nzt .OR. & !< incorrect height (nz < nzb .OR. nz > nzt) |
---|
| 8476 | usm_par(2,j,i) < 0 .OR. & |
---|
| 8477 | usm_par(2,j,i) > 1 .OR. & !< incorrect roof sign |
---|
| 8478 | usm_par(3,j,i) < nzb-nzt .OR. & |
---|
| 8479 | usm_par(3,j,i) > nzt-nzb .OR. & !< incorrect west-east wall direction sign |
---|
| 8480 | usm_par(4,j,i) < nzb-nzt .OR. & |
---|
| 8481 | usm_par(4,j,i) > nzt-nzb .OR. & !< incorrect south-north wall direction sign |
---|
| 8482 | usm_par(6,j,i) < nzb .OR. & |
---|
| 8483 | usm_par(6,j,i) > nzt .OR. & !< incorrect pedestrian level height for west-east wall |
---|
| 8484 | usm_par(8,j,i) > nzt .OR. & |
---|
| 8485 | usm_par(10,j,i) > nzt .OR. & !< incorrect wall or roof level height for west-east wall |
---|
| 8486 | usm_par(12,j,i) < nzb .OR. & |
---|
| 8487 | usm_par(12,j,i) > nzt .OR. & !< incorrect pedestrian level height for south-north wall |
---|
| 8488 | usm_par(14,j,i) > nzt .OR. & |
---|
| 8489 | usm_par(16,j,i) > nzt & !< incorrect wall or roof level height for south-north wall |
---|
| 8490 | ) ) THEN |
---|
| 8491 | !-- incorrect input data |
---|
| 8492 | WRITE (message_string, "(A,2I5)") 'missing or incorrect data in file URBAN_SURFACE'// & |
---|
| 8493 | TRIM(coupling_char)//' for i,j=', i,j |
---|
| 8494 | CALL message( 'usm_read_urban_surface', 'PA0504', 1, 2, 0, 6, 0 ) |
---|
| 8495 | ENDIF |
---|
| 8496 | |
---|
| 8497 | ENDDO |
---|
| 8498 | ENDDO |
---|
| 8499 | ! |
---|
| 8500 | !-- Assign the surface types to the respective data type. |
---|
| 8501 | !-- First, for horizontal upward-facing surfaces. |
---|
[3351] | 8502 | !-- Further, set flag indicating that albedo is initialized via ASCII |
---|
| 8503 | !-- format, else it would be overwritten in the radiation model. |
---|
| 8504 | surf_usm_h%albedo_from_ascii = .TRUE. |
---|
[2737] | 8505 | DO m = 1, surf_usm_h%ns |
---|
| 8506 | iw = surf_usm_h%i(m) |
---|
| 8507 | jw = surf_usm_h%j(m) |
---|
| 8508 | kw = surf_usm_h%k(m) |
---|
| 8509 | |
---|
| 8510 | IF ( usm_par(5,jw,iw) == 0 ) THEN |
---|
| 8511 | #if ! defined( __nopointer ) |
---|
| 8512 | IF ( zu(kw) >= roof_height_limit ) THEN |
---|
| 8513 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
| 8514 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
| 8515 | ELSE |
---|
| 8516 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
| 8517 | surf_usm_h%surface_types(m) = land_category !< default category for land surface |
---|
| 8518 | ENDIF |
---|
| 8519 | #endif |
---|
| 8520 | surf_usm_h%albedo(:,m) = -1.0_wp |
---|
| 8521 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
| 8522 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
| 8523 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
| 8524 | ELSE |
---|
| 8525 | IF ( usm_par(2,jw,iw)==0 ) THEN |
---|
| 8526 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
| 8527 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
| 8528 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
| 8529 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
| 8530 | ELSE |
---|
| 8531 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
| 8532 | surf_usm_h%thickness_wall(m) = usm_val(2,jw,iw) |
---|
| 8533 | surf_usm_h%thickness_window(m) = usm_val(2,jw,iw) |
---|
| 8534 | surf_usm_h%thickness_green(m) = usm_val(2,jw,iw) |
---|
| 8535 | ENDIF |
---|
| 8536 | surf_usm_h%surface_types(m) = usm_par(5,jw,iw) |
---|
| 8537 | surf_usm_h%albedo(:,m) = usm_val(1,jw,iw) |
---|
| 8538 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
| 8539 | ENDIF |
---|
| 8540 | ! |
---|
| 8541 | !-- Find the type position |
---|
| 8542 | it = surf_usm_h%surface_types(m) |
---|
| 8543 | ip = -99999 |
---|
| 8544 | DO k = 1, n_surface_types |
---|
| 8545 | IF ( surface_type_codes(k) == it ) THEN |
---|
| 8546 | ip = k |
---|
| 8547 | EXIT |
---|
| 8548 | ENDIF |
---|
| 8549 | ENDDO |
---|
| 8550 | IF ( ip == -99999 ) THEN |
---|
[3337] | 8551 | !-- land/roof category not found |
---|
| 8552 | WRITE (9,"(A,I5,A,3I5)") 'land/roof category ', it, & |
---|
| 8553 | ' not found for i,j,k=', iw,jw,kw |
---|
| 8554 | FLUSH(9) |
---|
| 8555 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
| 8556 | category = roof_category |
---|
| 8557 | ELSE |
---|
| 8558 | category = land_category |
---|
| 8559 | ENDIF |
---|
| 8560 | DO k = 1, n_surface_types |
---|
| 8561 | IF ( surface_type_codes(k) == roof_category ) THEN |
---|
| 8562 | ip = k |
---|
| 8563 | EXIT |
---|
| 8564 | ENDIF |
---|
| 8565 | ENDDO |
---|
| 8566 | IF ( ip == -99999 ) THEN |
---|
| 8567 | !-- default land/roof category not found |
---|
| 8568 | WRITE (9,"(A,I5,A,3I5)") 'Default land/roof category', category, ' not found!' |
---|
| 8569 | FLUSH(9) |
---|
| 8570 | ip = 1 |
---|
| 8571 | ENDIF |
---|
[2737] | 8572 | ENDIF |
---|
| 8573 | ! |
---|
| 8574 | !-- Albedo |
---|
[2963] | 8575 | IF ( surf_usm_h%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
[2737] | 8576 | surf_usm_h%albedo(:,m) = surface_params(ialbedo,ip) |
---|
| 8577 | ENDIF |
---|
[2920] | 8578 | !-- Albedo type is 0 (custom), others are replaced later |
---|
| 8579 | surf_usm_h%albedo_type(:,m) = 0 |
---|
[2737] | 8580 | !-- Transmissivity |
---|
| 8581 | IF ( surf_usm_h%transmissivity(m) < 0.0_wp ) THEN |
---|
| 8582 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
| 8583 | ENDIF |
---|
| 8584 | ! |
---|
| 8585 | !-- emissivity of the wall |
---|
| 8586 | surf_usm_h%emissivity(:,m) = surface_params(iemiss,ip) |
---|
| 8587 | ! |
---|
| 8588 | !-- heat conductivity λS between air and wall ( W mâ2 Kâ1 ) |
---|
| 8589 | surf_usm_h%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
| 8590 | surf_usm_h%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
| 8591 | surf_usm_h%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
| 8592 | ! |
---|
[2920] | 8593 | !-- roughness length for momentum, heat and humidity |
---|
[2737] | 8594 | surf_usm_h%z0(m) = surface_params(irough,ip) |
---|
[2920] | 8595 | surf_usm_h%z0h(m) = surface_params(iroughh,ip) |
---|
| 8596 | surf_usm_h%z0q(m) = surface_params(iroughh,ip) |
---|
| 8597 | ! |
---|
[2737] | 8598 | !-- Surface skin layer heat capacity (J mâ2 Kâ1 ) |
---|
| 8599 | surf_usm_h%c_surface(m) = surface_params(icsurf,ip) |
---|
| 8600 | surf_usm_h%c_surface_window(m) = surface_params(icsurf,ip) |
---|
| 8601 | surf_usm_h%c_surface_green(m) = surface_params(icsurf,ip) |
---|
| 8602 | ! |
---|
| 8603 | !-- wall material parameters: |
---|
| 8604 | !-- thickness of the wall (m) |
---|
| 8605 | !-- missing values are replaced by default value for category |
---|
| 8606 | IF ( surf_usm_h%thickness_wall(m) <= 0.001_wp ) THEN |
---|
| 8607 | surf_usm_h%thickness_wall(m) = surface_params(ithick,ip) |
---|
| 8608 | ENDIF |
---|
| 8609 | IF ( surf_usm_h%thickness_window(m) <= 0.001_wp ) THEN |
---|
| 8610 | surf_usm_h%thickness_window(m) = surface_params(ithick,ip) |
---|
| 8611 | ENDIF |
---|
| 8612 | IF ( surf_usm_h%thickness_green(m) <= 0.001_wp ) THEN |
---|
| 8613 | surf_usm_h%thickness_green(m) = surface_params(ithick,ip) |
---|
| 8614 | ENDIF |
---|
| 8615 | ! |
---|
| 8616 | !-- volumetric heat capacity rho*C of the wall ( J mâ3 Kâ1 ) |
---|
| 8617 | surf_usm_h%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
| 8618 | surf_usm_h%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
| 8619 | surf_usm_h%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
| 8620 | ! |
---|
| 8621 | !-- thermal conductivity λH of the wall (W mâ1 Kâ1 ) |
---|
| 8622 | surf_usm_h%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
| 8623 | surf_usm_h%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
| 8624 | surf_usm_h%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
| 8625 | |
---|
| 8626 | ENDDO |
---|
| 8627 | ! |
---|
| 8628 | !-- For vertical surface elements ( 0 -- northward-facing, 1 -- southward-facing, |
---|
| 8629 | !-- 2 -- eastward-facing, 3 -- westward-facing ) |
---|
| 8630 | DO l = 0, 3 |
---|
[3351] | 8631 | ! |
---|
| 8632 | !-- Set flag indicating that albedo is initialized via ASCII format. |
---|
| 8633 | !-- Else it would be overwritten in the radiation model. |
---|
| 8634 | surf_usm_v(l)%albedo_from_ascii = .TRUE. |
---|
[2737] | 8635 | DO m = 1, surf_usm_v(l)%ns |
---|
| 8636 | i = surf_usm_v(l)%i(m) |
---|
| 8637 | j = surf_usm_v(l)%j(m) |
---|
| 8638 | kw = surf_usm_v(l)%k(m) |
---|
[2920] | 8639 | |
---|
[2737] | 8640 | IF ( l == 3 ) THEN ! westward facing |
---|
| 8641 | iw = i |
---|
| 8642 | jw = j |
---|
| 8643 | ii = 6 |
---|
| 8644 | ij = 3 |
---|
| 8645 | ELSEIF ( l == 2 ) THEN |
---|
| 8646 | iw = i-1 |
---|
| 8647 | jw = j |
---|
| 8648 | ii = 6 |
---|
| 8649 | ij = 3 |
---|
| 8650 | ELSEIF ( l == 1 ) THEN |
---|
| 8651 | iw = i |
---|
| 8652 | jw = j |
---|
| 8653 | ii = 12 |
---|
| 8654 | ij = 9 |
---|
| 8655 | ELSEIF ( l == 0 ) THEN |
---|
| 8656 | iw = i |
---|
| 8657 | jw = j-1 |
---|
| 8658 | ii = 12 |
---|
| 8659 | ij = 9 |
---|
| 8660 | ENDIF |
---|
| 8661 | |
---|
[2920] | 8662 | IF ( iw < 0 .OR. jw < 0 ) THEN |
---|
| 8663 | !-- wall on west or south border of the domain - assign default category |
---|
| 8664 | IF ( kw <= roof_height_limit ) THEN |
---|
| 8665 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
| 8666 | ELSE |
---|
| 8667 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
| 8668 | END IF |
---|
| 8669 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
| 8670 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
[3337] | 8671 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
| 8672 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
| 8673 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
[2920] | 8674 | ELSE IF ( kw <= usm_par(ii,jw,iw) ) THEN |
---|
| 8675 | !-- pedestrian zone |
---|
[2737] | 8676 | IF ( usm_par(ii+1,jw,iw) == 0 ) THEN |
---|
[2920] | 8677 | surf_usm_v(l)%surface_types(m) = pedestrian_category !< default category for wall surface in pedestrian zone |
---|
[2737] | 8678 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
| 8679 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
| 8680 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
| 8681 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
| 8682 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
| 8683 | ELSE |
---|
| 8684 | surf_usm_v(l)%surface_types(m) = usm_par(ii+1,jw,iw) |
---|
| 8685 | surf_usm_v(l)%albedo(:,m) = usm_val(ij,jw,iw) |
---|
| 8686 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+1,jw,iw) |
---|
| 8687 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+1,jw,iw) |
---|
| 8688 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+1,jw,iw) |
---|
| 8689 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
| 8690 | ENDIF |
---|
| 8691 | ELSE IF ( kw <= usm_par(ii+2,jw,iw) ) THEN |
---|
| 8692 | !-- wall zone |
---|
| 8693 | IF ( usm_par(ii+3,jw,iw) == 0 ) THEN |
---|
| 8694 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface |
---|
| 8695 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
| 8696 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
| 8697 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
| 8698 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
| 8699 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
| 8700 | ELSE |
---|
| 8701 | surf_usm_v(l)%surface_types(m) = usm_par(ii+3,jw,iw) |
---|
| 8702 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+2,jw,iw) |
---|
| 8703 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+3,jw,iw) |
---|
| 8704 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+3,jw,iw) |
---|
| 8705 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+3,jw,iw) |
---|
| 8706 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
| 8707 | ENDIF |
---|
| 8708 | ELSE IF ( kw <= usm_par(ii+4,jw,iw) ) THEN |
---|
| 8709 | !-- roof zone |
---|
| 8710 | IF ( usm_par(ii+5,jw,iw) == 0 ) THEN |
---|
| 8711 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for roof surface |
---|
| 8712 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
| 8713 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
| 8714 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
| 8715 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
| 8716 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
| 8717 | ELSE |
---|
| 8718 | surf_usm_v(l)%surface_types(m) = usm_par(ii+5,jw,iw) |
---|
| 8719 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+4,jw,iw) |
---|
| 8720 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+5,jw,iw) |
---|
| 8721 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+5,jw,iw) |
---|
| 8722 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+5,jw,iw) |
---|
| 8723 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
| 8724 | ENDIF |
---|
| 8725 | ELSE |
---|
[2920] | 8726 | ! |
---|
[3337] | 8727 | WRITE(9,*) 'Problem reading USM data:' |
---|
| 8728 | WRITE(9,*) l,i,j,kw,get_topography_top_index_ji( j, i, 's' ) |
---|
| 8729 | WRITE(9,*) ii,iw,jw,kw,get_topography_top_index_ji( jw, iw, 's' ) |
---|
| 8730 | WRITE(9,*) usm_par(ii,jw,iw),usm_par(ii+1,jw,iw) |
---|
| 8731 | WRITE(9,*) usm_par(ii+2,jw,iw),usm_par(ii+3,jw,iw) |
---|
| 8732 | WRITE(9,*) usm_par(ii+4,jw,iw),usm_par(ii+5,jw,iw) |
---|
| 8733 | WRITE(9,*) kw,roof_height_limit,wall_category,roof_category |
---|
| 8734 | FLUSH(9) |
---|
[2920] | 8735 | !-- supply the default category |
---|
| 8736 | IF ( kw <= roof_height_limit ) THEN |
---|
| 8737 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
| 8738 | ELSE |
---|
| 8739 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
| 8740 | END IF |
---|
| 8741 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
| 8742 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
[3337] | 8743 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
| 8744 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
| 8745 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
[2737] | 8746 | ENDIF |
---|
| 8747 | ! |
---|
| 8748 | !-- Find the type position |
---|
| 8749 | it = surf_usm_v(l)%surface_types(m) |
---|
| 8750 | ip = -99999 |
---|
| 8751 | DO k = 1, n_surface_types |
---|
| 8752 | IF ( surface_type_codes(k) == it ) THEN |
---|
| 8753 | ip = k |
---|
| 8754 | EXIT |
---|
| 8755 | ENDIF |
---|
| 8756 | ENDDO |
---|
| 8757 | IF ( ip == -99999 ) THEN |
---|
| 8758 | !-- wall category not found |
---|
[3337] | 8759 | WRITE (9, "(A,I7,A,3I5)") 'wall category ', it, & |
---|
| 8760 | ' not found for i,j,k=', iw,jw,kw |
---|
| 8761 | FLUSH(9) |
---|
| 8762 | category = wall_category |
---|
| 8763 | DO k = 1, n_surface_types |
---|
| 8764 | IF ( surface_type_codes(k) == category ) THEN |
---|
| 8765 | ip = k |
---|
| 8766 | EXIT |
---|
| 8767 | ENDIF |
---|
| 8768 | ENDDO |
---|
| 8769 | IF ( ip == -99999 ) THEN |
---|
| 8770 | !-- default wall category not found |
---|
| 8771 | WRITE (9, "(A,I5,A,3I5)") 'Default wall category', category, ' not found!' |
---|
| 8772 | FLUSH(9) |
---|
| 8773 | ip = 1 |
---|
| 8774 | ENDIF |
---|
[2737] | 8775 | ENDIF |
---|
[3337] | 8776 | |
---|
[2737] | 8777 | ! |
---|
| 8778 | !-- Albedo |
---|
[2963] | 8779 | IF ( surf_usm_v(l)%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
[2737] | 8780 | surf_usm_v(l)%albedo(:,m) = surface_params(ialbedo,ip) |
---|
| 8781 | ENDIF |
---|
[2920] | 8782 | !-- Albedo type is 0 (custom), others are replaced later |
---|
| 8783 | surf_usm_v(l)%albedo_type(:,m) = 0 |
---|
[2737] | 8784 | !-- Transmissivity of the windows |
---|
| 8785 | IF ( surf_usm_v(l)%transmissivity(m) < 0.0_wp ) THEN |
---|
| 8786 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
| 8787 | ENDIF |
---|
| 8788 | ! |
---|
| 8789 | !-- emissivity of the wall |
---|
| 8790 | surf_usm_v(l)%emissivity(:,m) = surface_params(iemiss,ip) |
---|
| 8791 | ! |
---|
[2920] | 8792 | !-- heat conductivity lambda S between air and wall ( W m-2 K-1 ) |
---|
[2737] | 8793 | surf_usm_v(l)%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
| 8794 | surf_usm_v(l)%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
| 8795 | surf_usm_v(l)%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
| 8796 | ! |
---|
[2920] | 8797 | !-- roughness length |
---|
[2737] | 8798 | surf_usm_v(l)%z0(m) = surface_params(irough,ip) |
---|
[2920] | 8799 | surf_usm_v(l)%z0h(m) = surface_params(iroughh,ip) |
---|
| 8800 | surf_usm_v(l)%z0q(m) = surface_params(iroughh,ip) |
---|
[2737] | 8801 | ! |
---|
[2920] | 8802 | !-- Surface skin layer heat capacity (J m-2 K-1 ) |
---|
[2737] | 8803 | surf_usm_v(l)%c_surface(m) = surface_params(icsurf,ip) |
---|
| 8804 | surf_usm_v(l)%c_surface_window(m) = surface_params(icsurf,ip) |
---|
| 8805 | surf_usm_v(l)%c_surface_green(m) = surface_params(icsurf,ip) |
---|
| 8806 | ! |
---|
| 8807 | !-- wall material parameters: |
---|
| 8808 | !-- thickness of the wall (m) |
---|
| 8809 | !-- missing values are replaced by default value for category |
---|
| 8810 | IF ( surf_usm_v(l)%thickness_wall(m) <= 0.001_wp ) THEN |
---|
| 8811 | surf_usm_v(l)%thickness_wall(m) = surface_params(ithick,ip) |
---|
| 8812 | ENDIF |
---|
| 8813 | IF ( surf_usm_v(l)%thickness_window(m) <= 0.001_wp ) THEN |
---|
| 8814 | surf_usm_v(l)%thickness_window(m) = surface_params(ithick,ip) |
---|
| 8815 | ENDIF |
---|
| 8816 | IF ( surf_usm_v(l)%thickness_green(m) <= 0.001_wp ) THEN |
---|
| 8817 | surf_usm_v(l)%thickness_green(m) = surface_params(ithick,ip) |
---|
| 8818 | ENDIF |
---|
[2920] | 8819 | ! |
---|
| 8820 | !-- volumetric heat capacity rho*C of the wall ( J m-3 K-1 ) |
---|
[2737] | 8821 | surf_usm_v(l)%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
| 8822 | surf_usm_v(l)%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
| 8823 | surf_usm_v(l)%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
| 8824 | ! |
---|
[2920] | 8825 | !-- thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
[2737] | 8826 | surf_usm_v(l)%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
| 8827 | surf_usm_v(l)%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
| 8828 | surf_usm_v(l)%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
| 8829 | |
---|
| 8830 | ENDDO |
---|
| 8831 | ENDDO |
---|
[3351] | 8832 | |
---|
[2737] | 8833 | ! |
---|
| 8834 | !-- Initialize wall layer thicknesses. Please note, this will be removed |
---|
| 8835 | !-- after migration to Palm input data standard. |
---|
| 8836 | DO k = nzb_wall, nzt_wall |
---|
| 8837 | zwn(k) = zwn_default(k) |
---|
| 8838 | zwn_green(k) = zwn_default_green(k) |
---|
| 8839 | zwn_window(k) = zwn_default_window(k) |
---|
| 8840 | ENDDO |
---|
| 8841 | ! |
---|
| 8842 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
| 8843 | DO m = 1, surf_usm_h%ns |
---|
| 8844 | surf_usm_h%zw(:,m) = zwn(:) * surf_usm_h%thickness_wall(m) |
---|
| 8845 | surf_usm_h%zw_green(:,m) = zwn_green(:) * surf_usm_h%thickness_green(m) |
---|
| 8846 | surf_usm_h%zw_window(:,m) = zwn_window(:) * surf_usm_h%thickness_window(m) |
---|
| 8847 | ENDDO |
---|
| 8848 | DO l = 0, 3 |
---|
| 8849 | DO m = 1, surf_usm_v(l)%ns |
---|
| 8850 | surf_usm_v(l)%zw(:,m) = zwn(:) * surf_usm_v(l)%thickness_wall(m) |
---|
| 8851 | surf_usm_v(l)%zw_green(:,m) = zwn_green(:) * surf_usm_v(l)%thickness_green(m) |
---|
| 8852 | surf_usm_v(l)%zw_window(:,m) = zwn_window(:) * surf_usm_v(l)%thickness_window(m) |
---|
| 8853 | ENDDO |
---|
| 8854 | ENDDO |
---|
| 8855 | |
---|
[3337] | 8856 | |
---|
| 8857 | WRITE(9,*) 'Urban surfaces read' |
---|
| 8858 | FLUSH(9) |
---|
| 8859 | |
---|
[2737] | 8860 | CALL location_message( ' types and parameters of urban surfaces read', .TRUE. ) |
---|
| 8861 | |
---|
| 8862 | END SUBROUTINE usm_read_urban_surface_types |
---|
| 8863 | |
---|
| 8864 | |
---|
| 8865 | !------------------------------------------------------------------------------! |
---|
| 8866 | ! Description: |
---|
| 8867 | ! ------------ |
---|
[2920] | 8868 | ! |
---|
| 8869 | !> This function advances through the list of local surfaces to find given |
---|
| 8870 | !> x, y, d, z coordinates |
---|
| 8871 | !------------------------------------------------------------------------------! |
---|
| 8872 | PURE FUNCTION advance_surface(isurfl_start, isurfl_stop, x, y, z, d) & |
---|
| 8873 | result(isurfl) |
---|
| 8874 | |
---|
| 8875 | INTEGER(iwp), INTENT(in) :: isurfl_start, isurfl_stop |
---|
| 8876 | INTEGER(iwp), INTENT(in) :: x, y, z, d |
---|
| 8877 | INTEGER(iwp) :: isx, isy, isz, isd |
---|
| 8878 | INTEGER(iwp) :: isurfl |
---|
| 8879 | |
---|
| 8880 | DO isurfl = isurfl_start, isurfl_stop |
---|
| 8881 | isx = surfl(ix, isurfl) |
---|
| 8882 | isy = surfl(iy, isurfl) |
---|
| 8883 | isz = surfl(iz, isurfl) |
---|
| 8884 | isd = surfl(id, isurfl) |
---|
| 8885 | IF ( isx==x .and. isy==y .and. isz==z .and. isd==d ) RETURN |
---|
| 8886 | ENDDO |
---|
| 8887 | |
---|
| 8888 | !-- coordinate not found |
---|
| 8889 | isurfl = -1 |
---|
| 8890 | |
---|
| 8891 | END FUNCTION |
---|
| 8892 | |
---|
| 8893 | |
---|
| 8894 | !------------------------------------------------------------------------------! |
---|
| 8895 | ! Description: |
---|
| 8896 | ! ------------ |
---|
| 8897 | ! |
---|
| 8898 | !> This subroutine reads temperatures of respective material layers in walls, |
---|
| 8899 | !> roofs and ground from input files. Data in the input file must be in |
---|
| 8900 | !> standard order, i.e. horizontal surfaces first ordered by x, y and then |
---|
| 8901 | !> vertical surfaces ordered by x, y, direction, z |
---|
| 8902 | !------------------------------------------------------------------------------! |
---|
| 8903 | SUBROUTINE usm_read_wall_temperature |
---|
| 8904 | |
---|
| 8905 | INTEGER(iwp) :: i, j, k, d, ii, iline |
---|
| 8906 | INTEGER(iwp) :: isurfl |
---|
| 8907 | REAL(wp) :: rtsurf |
---|
| 8908 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: rtwall |
---|
| 8909 | |
---|
| 8910 | |
---|
| 8911 | |
---|
| 8912 | |
---|
| 8913 | DO ii = 0, io_blocks-1 |
---|
| 8914 | IF ( ii == io_group ) THEN |
---|
| 8915 | |
---|
| 8916 | !-- open wall temperature file |
---|
| 8917 | OPEN( 152, file='WALL_TEMPERATURE'//coupling_char, action='read', & |
---|
| 8918 | status='old', form='formatted', err=15 ) |
---|
| 8919 | |
---|
| 8920 | isurfl = 0 |
---|
| 8921 | iline = 1 |
---|
| 8922 | DO |
---|
| 8923 | rtwall = -9999.0_wp !< for incomplete lines |
---|
| 8924 | READ( 152, *, err=13, end=14 ) i, j, k, d, rtsurf, rtwall |
---|
| 8925 | |
---|
| 8926 | IF ( nxl <= i .and. i <= nxr .and. & |
---|
| 8927 | nys <= j .and. j <= nyn) THEN !< local processor |
---|
| 8928 | !-- identify surface id |
---|
| 8929 | isurfl = advance_surface(isurfl+1, nsurfl, i, j, k, d) |
---|
| 8930 | IF ( isurfl == -1 ) THEN |
---|
| 8931 | WRITE(message_string, '(a,4i5,a,i5,a)') 'Coordinates (xyzd) ', i, j, k, d, & |
---|
| 8932 | ' on line ', iline, & |
---|
| 8933 | ' in file WALL_TEMPERATURE are either not present or out of standard order of surfaces.' |
---|
| 8934 | CALL message( 'usm_read_wall_temperature', 'PA0521', 1, 2, 0, 6, 0 ) |
---|
| 8935 | ENDIF |
---|
| 8936 | |
---|
| 8937 | !-- assign temperatures |
---|
| 8938 | IF ( d == 0 ) THEN |
---|
[3418] | 8939 | t_surf_wall_h(isurfl) = rtsurf |
---|
[2920] | 8940 | t_wall_h(:,isurfl) = rtwall(:) |
---|
| 8941 | ELSE |
---|
[3418] | 8942 | t_surf_wall_v(d-1)%t(isurfl) = rtsurf |
---|
[2920] | 8943 | t_wall_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
| 8944 | ENDIF |
---|
| 8945 | ENDIF |
---|
| 8946 | |
---|
| 8947 | iline = iline + 1 |
---|
| 8948 | CYCLE |
---|
| 8949 | 13 WRITE(message_string, '(a,i5,a)') 'Error reading line ', iline, & |
---|
| 8950 | ' in file WALL_TEMPERATURE.' |
---|
| 8951 | CALL message( 'usm_read_wall_temperature', 'PA0522', 1, 2, 0, 6, 0 ) |
---|
| 8952 | ENDDO |
---|
| 8953 | 14 CLOSE(152) |
---|
| 8954 | CYCLE |
---|
| 8955 | 15 message_string = 'file WALL_TEMPERATURE'//TRIM(coupling_char)//' does not exist' |
---|
| 8956 | CALL message( 'usm_read_wall_temperature', 'PA0523', 1, 2, 0, 6, 0 ) |
---|
| 8957 | ENDIF |
---|
[3151] | 8958 | #if defined( __parallel ) |
---|
[2920] | 8959 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
| 8960 | #endif |
---|
| 8961 | ENDDO |
---|
| 8962 | |
---|
| 8963 | CALL location_message( ' wall layer temperatures read', .TRUE. ) |
---|
| 8964 | |
---|
| 8965 | END SUBROUTINE usm_read_wall_temperature |
---|
| 8966 | |
---|
| 8967 | |
---|
| 8968 | |
---|
| 8969 | !------------------------------------------------------------------------------! |
---|
| 8970 | ! Description: |
---|
| 8971 | ! ------------ |
---|
[2737] | 8972 | !> Solver for the energy balance at the ground/roof/wall surface. |
---|
| 8973 | !> It follows basic ideas and structure of lsm_energy_balance |
---|
| 8974 | !> with many simplifications and adjustments. |
---|
| 8975 | !> TODO better description |
---|
| 8976 | !------------------------------------------------------------------------------! |
---|
[3418] | 8977 | SUBROUTINE usm_surface_energy_balance( spinup ) |
---|
[2737] | 8978 | |
---|
[3418] | 8979 | |
---|
[2737] | 8980 | IMPLICIT NONE |
---|
| 8981 | |
---|
[3418] | 8982 | INTEGER(iwp) :: i, j, k, l, d, m !< running indices |
---|
[2737] | 8983 | |
---|
[3418] | 8984 | INTEGER(iwp) :: i_off !< offset to determine index of surface element, seen from atmospheric grid point, for x |
---|
| 8985 | INTEGER(iwp) :: j_off !< offset to determine index of surface element, seen from atmospheric grid point, for y |
---|
| 8986 | INTEGER(iwp) :: k_off !< offset to determine index of surface element, seen from atmospheric grid point, for z |
---|
| 8987 | |
---|
| 8988 | LOGICAL :: spinup !true during spinup |
---|
| 8989 | |
---|
| 8990 | REAL(wp) :: u1,v1,w1 !< near wall u,v,w |
---|
| 8991 | REAL(wp) :: stend_wall !< surface tendency |
---|
| 8992 | |
---|
[2737] | 8993 | REAL(wp) :: stend_window !< surface tendency |
---|
| 8994 | REAL(wp) :: stend_green !< surface tendency |
---|
| 8995 | REAL(wp) :: coef_1 !< first coeficient for prognostic equation |
---|
| 8996 | REAL(wp) :: coef_window_1 !< first coeficient for prognostic window equation |
---|
| 8997 | REAL(wp) :: coef_green_1 !< first coeficient for prognostic green wall equation |
---|
| 8998 | REAL(wp) :: coef_2 !< second coeficient for prognostic equation |
---|
| 8999 | REAL(wp) :: coef_window_2 !< second coeficient for prognostic window equation |
---|
| 9000 | REAL(wp) :: coef_green_2 !< second coeficient for prognostic green wall equation |
---|
[3418] | 9001 | REAL(wp) :: rho_cp !< rho_wall_surface * c_p |
---|
[2737] | 9002 | REAL(wp) :: f_shf !< factor for shf_eb |
---|
| 9003 | REAL(wp) :: f_shf_window !< factor for shf_eb window |
---|
| 9004 | REAL(wp) :: f_shf_green !< factor for shf_eb green wall |
---|
| 9005 | REAL(wp) :: lambda_surface !< current value of lambda_surface (heat conductivity between air and wall) |
---|
| 9006 | REAL(wp) :: lambda_surface_window !< current value of lambda_surface (heat conductivity between air and window) |
---|
| 9007 | REAL(wp) :: lambda_surface_green !< current value of lambda_surface (heat conductivity between air and greeb wall) |
---|
| 9008 | |
---|
| 9009 | REAL(wp) :: dtime !< simulated time of day (in UTC) |
---|
| 9010 | INTEGER(iwp) :: dhour !< simulated hour of day (in UTC) |
---|
| 9011 | REAL(wp) :: acoef !< actual coefficient of diurnal profile of anthropogenic heat |
---|
[3418] | 9012 | REAL(wp) :: f1, & !< resistance correction term 1 |
---|
| 9013 | f2, & !< resistance correction term 2 |
---|
| 9014 | f3, & !< resistance correction term 3 |
---|
| 9015 | e, & !< water vapour pressure |
---|
| 9016 | e_s, & !< water vapour saturation pressure |
---|
| 9017 | e_s_dt, & !< derivate of e_s with respect to T |
---|
| 9018 | tend, & !< tendency |
---|
| 9019 | dq_s_dt, & !< derivate of q_s with respect to T |
---|
| 9020 | f_qsws, & !< factor for qsws |
---|
| 9021 | f_qsws_veg, & !< factor for qsws_veg |
---|
| 9022 | f_qsws_liq, & !< factor for qsws_liq |
---|
| 9023 | m_liq_max, & !< maxmimum value of the liq. water reservoir |
---|
| 9024 | qv1, & !< specific humidity at first grid level |
---|
| 9025 | m_max_depth = 0.0002_wp, & ! Maximum capacity of the water reservoir (m) |
---|
| 9026 | rho_lv, & |
---|
| 9027 | drho_l_lv, & |
---|
| 9028 | q_s |
---|
[2737] | 9029 | |
---|
[3418] | 9030 | ! |
---|
| 9031 | !-- Index offset of surface element point with respect to adjoining |
---|
| 9032 | !-- atmospheric grid point |
---|
| 9033 | k_off = surf_usm_h%koff |
---|
| 9034 | j_off = surf_usm_h%joff |
---|
| 9035 | i_off = surf_usm_h%ioff |
---|
[2737] | 9036 | |
---|
| 9037 | ! |
---|
| 9038 | !-- First, treat horizontal surface elements |
---|
| 9039 | DO m = 1, surf_usm_h%ns |
---|
| 9040 | ! |
---|
| 9041 | !-- Get indices of respective grid point |
---|
| 9042 | i = surf_usm_h%i(m) |
---|
| 9043 | j = surf_usm_h%j(m) |
---|
| 9044 | k = surf_usm_h%k(m) |
---|
| 9045 | ! |
---|
| 9046 | !-- TODO - how to calculate lambda_surface for horizontal surfaces |
---|
| 9047 | !-- (lambda_surface is set according to stratification in land surface model) |
---|
| 9048 | !-- MS: ??? |
---|
| 9049 | IF ( surf_usm_h%ol(m) >= 0.0_wp ) THEN |
---|
| 9050 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
| 9051 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
| 9052 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
| 9053 | ELSE |
---|
| 9054 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
| 9055 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
| 9056 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
| 9057 | ENDIF |
---|
| 9058 | #if ! defined( __nopointer ) |
---|
[3418] | 9059 | ! pt1 = pt(k,j,i) |
---|
| 9060 | IF ( humidity ) THEN |
---|
| 9061 | qv1 = q(k,j,i) |
---|
| 9062 | ELSE |
---|
| 9063 | qv1 = 0.0_wp |
---|
| 9064 | ENDIF |
---|
[2737] | 9065 | ! |
---|
[3274] | 9066 | !-- calculate rho * c_p coefficient at surface layer |
---|
| 9067 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_h%pt1(m) * exner(k) ) |
---|
[3418] | 9068 | |
---|
| 9069 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
| 9070 | ! |
---|
| 9071 | !-- Calculate frequently used parameters |
---|
| 9072 | rho_lv = rho_cp / c_p * l_v |
---|
| 9073 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
| 9074 | endif |
---|
[2737] | 9075 | #endif |
---|
| 9076 | ! |
---|
| 9077 | !-- Calculate aerodyamic resistance. |
---|
| 9078 | !-- Calculation for horizontal surfaces follows LSM formulation |
---|
| 9079 | !-- pt, us, ts are not available for the prognostic time step, |
---|
| 9080 | !-- data from the last time step is used here. |
---|
| 9081 | |
---|
| 9082 | !-- Workaround: use single r_a as stability is only treated for the |
---|
| 9083 | !-- average temperature |
---|
| 9084 | surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /& |
---|
| 9085 | ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
| 9086 | surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m) |
---|
| 9087 | surf_usm_h%r_a_green(m) = surf_usm_h%r_a(m) |
---|
| 9088 | |
---|
[3274] | 9089 | ! r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exner(k) ) / & |
---|
[2737] | 9090 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
[3274] | 9091 | ! r_a_window = ( surf_usm_h%pt1(m) - t_surf_window_h(m) / exner(k) ) / & |
---|
[2737] | 9092 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
[3274] | 9093 | ! r_a_green = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
[2737] | 9094 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
| 9095 | |
---|
[3196] | 9096 | !-- Make sure that the resistance does not drop to zero |
---|
[2737] | 9097 | IF ( surf_usm_h%r_a(m) < 1.0_wp ) & |
---|
| 9098 | surf_usm_h%r_a(m) = 1.0_wp |
---|
| 9099 | IF ( surf_usm_h%r_a_green(m) < 1.0_wp ) & |
---|
| 9100 | surf_usm_h%r_a_green(m) = 1.0_wp |
---|
| 9101 | IF ( surf_usm_h%r_a_window(m) < 1.0_wp ) & |
---|
| 9102 | surf_usm_h%r_a_window(m) = 1.0_wp |
---|
[3196] | 9103 | |
---|
| 9104 | ! |
---|
| 9105 | !-- Make sure that the resistacne does not exceed a maxmium value in case |
---|
| 9106 | !-- of zero velocities |
---|
| 9107 | IF ( surf_usm_h%r_a(m) > 300.0_wp ) & |
---|
| 9108 | surf_usm_h%r_a(m) = 300.0_wp |
---|
| 9109 | IF ( surf_usm_h%r_a_green(m) > 300.0_wp ) & |
---|
| 9110 | surf_usm_h%r_a_green(m) = 300.0_wp |
---|
| 9111 | IF ( surf_usm_h%r_a_window(m) > 300.0_wp ) & |
---|
| 9112 | surf_usm_h%r_a_window(m) = 300.0_wp |
---|
[2737] | 9113 | |
---|
[3196] | 9114 | |
---|
[2737] | 9115 | !-- factor for shf_eb |
---|
| 9116 | f_shf = rho_cp / surf_usm_h%r_a(m) |
---|
| 9117 | f_shf_window = rho_cp / surf_usm_h%r_a_window(m) |
---|
| 9118 | f_shf_green = rho_cp / surf_usm_h%r_a_green(m) |
---|
| 9119 | |
---|
[3418] | 9120 | !*************************************************************************************** |
---|
| 9121 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
| 9122 | !-- Adapted from LSM: |
---|
| 9123 | !-- Second step: calculate canopy resistance r_canopy |
---|
| 9124 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
| 9125 | |
---|
| 9126 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
| 9127 | !-- night) |
---|
| 9128 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_h%rad_sw_in(m) + 0.05_wp ) / & |
---|
| 9129 | (0.81_wp * (0.004_wp * surf_usm_h%rad_sw_in(m) & |
---|
| 9130 | + 1.0_wp)) ) |
---|
| 9131 | ! |
---|
| 9132 | !-- f2: correction for soil moisture availability to plants (the |
---|
| 9133 | !-- integrated soil moisture must thus be considered here) |
---|
| 9134 | !-- f2 = 0 for very dry soils |
---|
| 9135 | m_total = 0.0_wp |
---|
| 9136 | DO k = nzb_wall, nzt_wall+1 |
---|
| 9137 | m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
| 9138 | * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
| 9139 | ENDDO |
---|
| 9140 | |
---|
| 9141 | IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
| 9142 | f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
| 9143 | ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
| 9144 | f2 = 1.0_wp |
---|
| 9145 | ELSE |
---|
| 9146 | f2 = 1.0E-20_wp |
---|
| 9147 | ENDIF |
---|
| 9148 | |
---|
| 9149 | ! |
---|
| 9150 | !-- Calculate water vapour pressure at saturation |
---|
| 9151 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_h(m) & |
---|
| 9152 | - 273.16_wp ) / ( t_surf_green_h(m) - 35.86_wp ) ) |
---|
| 9153 | ! |
---|
| 9154 | !-- f3: correction for vapour pressure deficit |
---|
| 9155 | IF ( surf_usm_h%g_d(m) /= 0.0_wp ) THEN |
---|
| 9156 | ! |
---|
| 9157 | !-- Calculate vapour pressure |
---|
| 9158 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
| 9159 | f3 = EXP ( - surf_usm_h%g_d(m) * (e_s - e) ) |
---|
| 9160 | ELSE |
---|
| 9161 | f3 = 1.0_wp |
---|
| 9162 | ENDIF |
---|
| 9163 | |
---|
| 9164 | ! |
---|
| 9165 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
| 9166 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
| 9167 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
| 9168 | surf_usm_h%r_canopy(m) = surf_usm_h%r_canopy_min(m) / & |
---|
| 9169 | ( surf_usm_h%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
| 9170 | |
---|
| 9171 | ! |
---|
| 9172 | !-- Calculate the maximum possible liquid water amount on plants and |
---|
| 9173 | !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
| 9174 | !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
| 9175 | !-- liquid water fraction for paved surfaces is calculated after |
---|
| 9176 | !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
| 9177 | !-- vegetated surfaces and bare soils. |
---|
| 9178 | m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
| 9179 | surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
| 9180 | ! |
---|
| 9181 | !-- Calculate saturation specific humidity |
---|
| 9182 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
| 9183 | ! |
---|
| 9184 | !-- In case of dewfall, set evapotranspiration to zero |
---|
| 9185 | !-- All super-saturated water is then removed from the air |
---|
| 9186 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
| 9187 | surf_usm_h%r_canopy(m) = 0.0_wp |
---|
| 9188 | ENDIF |
---|
| 9189 | |
---|
| 9190 | ! |
---|
| 9191 | !-- Calculate coefficients for the total evapotranspiration |
---|
| 9192 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
| 9193 | !-- For pavements, only evaporation of liquid water is possible. |
---|
| 9194 | f_qsws_veg = rho_lv * & |
---|
| 9195 | ( 1.0_wp - surf_usm_h%c_liq(m) ) / & |
---|
| 9196 | ( surf_usm_h%r_a_green(m) + surf_usm_h%r_canopy(m) ) |
---|
| 9197 | f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
| 9198 | surf_usm_h%r_a_green(m) |
---|
| 9199 | |
---|
| 9200 | f_qsws = f_qsws_veg + f_qsws_liq |
---|
| 9201 | ! |
---|
| 9202 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
| 9203 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_h(m) - 35.86_wp) - & |
---|
| 9204 | 17.269_wp*( t_surf_green_h(m) - 273.16_wp) & |
---|
| 9205 | / ( t_surf_green_h(m) - 35.86_wp)**2 ) |
---|
| 9206 | |
---|
| 9207 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
| 9208 | endif |
---|
| 9209 | !*********************************************************************************** |
---|
[2737] | 9210 | !-- add LW up so that it can be removed in prognostic equation |
---|
| 9211 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_sw_in(m) - & |
---|
| 9212 | surf_usm_h%rad_sw_out(m) + & |
---|
| 9213 | surf_usm_h%rad_lw_in(m) - & |
---|
| 9214 | surf_usm_h%rad_lw_out(m) |
---|
| 9215 | |
---|
| 9216 | !-- numerator of the prognostic equation |
---|
| 9217 | !-- Todo: Adjust to tile approach. So far, emissivity for wall (element 0) |
---|
| 9218 | !-- is used |
---|
| 9219 | coef_1 = surf_usm_h%rad_net_l(m) + & |
---|
[2963] | 9220 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
[3418] | 9221 | sigma_sb * t_surf_wall_h(m) ** 4 + & |
---|
[2963] | 9222 | f_shf * surf_usm_h%pt1(m) + & |
---|
[2737] | 9223 | lambda_surface * t_wall_h(nzb_wall,m) |
---|
[3418] | 9224 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
[2963] | 9225 | coef_window_1 = surf_usm_h%rad_net_l(m) + & |
---|
| 9226 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_wat_win,m) & |
---|
| 9227 | * sigma_sb * t_surf_window_h(m) ** 4 + & |
---|
| 9228 | f_shf_window * surf_usm_h%pt1(m) + & |
---|
[2737] | 9229 | lambda_surface_window * t_window_h(nzb_wall,m) |
---|
[3418] | 9230 | endif |
---|
| 9231 | IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
| 9232 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
| 9233 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
| 9234 | t_surf_green_h(m) ** 4 + & |
---|
| 9235 | f_shf_green * surf_usm_h%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
| 9236 | + dq_s_dt * t_surf_green_h(m) ) & |
---|
| 9237 | +lambda_surface_green * t_green_h(nzb_wall,m) |
---|
| 9238 | ELSE |
---|
[2963] | 9239 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
| 9240 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) *& |
---|
| 9241 | sigma_sb * t_surf_green_h(m) ** 4 + & |
---|
| 9242 | f_shf_green * surf_usm_h%pt1(m) + & |
---|
[3418] | 9243 | lambda_surface_green * t_green_h(nzb_wall,m) |
---|
| 9244 | ENDIF |
---|
[2737] | 9245 | |
---|
| 9246 | !-- denominator of the prognostic equation |
---|
[2963] | 9247 | coef_2 = 4.0_wp * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
[3418] | 9248 | sigma_sb * t_surf_wall_h(m) ** 3 & |
---|
[3274] | 9249 | + lambda_surface + f_shf / exner(k) |
---|
[3418] | 9250 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
[2963] | 9251 | coef_window_2 = 4.0_wp * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
| 9252 | sigma_sb * t_surf_window_h(m) ** 3 & |
---|
[3274] | 9253 | + lambda_surface_window + f_shf_window / exner(k) |
---|
[3418] | 9254 | endif |
---|
| 9255 | IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
| 9256 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
| 9257 | t_surf_green_h(m) ** 3 + f_qsws * dq_s_dt & |
---|
| 9258 | + lambda_surface_green + f_shf_green / exner(k) |
---|
| 9259 | ELSE |
---|
| 9260 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
| 9261 | t_surf_green_h(m) ** 3 & |
---|
[3274] | 9262 | + lambda_surface_green + f_shf_green / exner(k) |
---|
[3418] | 9263 | ENDIF |
---|
[2737] | 9264 | |
---|
| 9265 | !-- implicit solution when the surface layer has no heat capacity, |
---|
| 9266 | !-- otherwise use RK3 scheme. |
---|
[3418] | 9267 | t_surf_wall_h_p(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
| 9268 | surf_usm_h%c_surface(m) * t_surf_wall_h(m) ) / & |
---|
[2737] | 9269 | ( surf_usm_h%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
[3418] | 9270 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
[2737] | 9271 | t_surf_window_h_p(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
| 9272 | surf_usm_h%c_surface_window(m) * t_surf_window_h(m) ) / & |
---|
[3418] | 9273 | ( surf_usm_h%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
| 9274 | endif |
---|
[2737] | 9275 | t_surf_green_h_p(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
| 9276 | surf_usm_h%c_surface_green(m) * t_surf_green_h(m) ) / & |
---|
| 9277 | ( surf_usm_h%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
| 9278 | |
---|
| 9279 | !-- add RK3 term |
---|
[3418] | 9280 | t_surf_wall_h_p(m) = t_surf_wall_h_p(m) + dt_3d * tsc(3) * & |
---|
| 9281 | surf_usm_h%tt_surface_wall_m(m) |
---|
| 9282 | |
---|
[2737] | 9283 | t_surf_window_h_p(m) = t_surf_window_h_p(m) + dt_3d * tsc(3) * & |
---|
| 9284 | surf_usm_h%tt_surface_window_m(m) |
---|
[3418] | 9285 | |
---|
[2737] | 9286 | t_surf_green_h_p(m) = t_surf_green_h_p(m) + dt_3d * tsc(3) * & |
---|
| 9287 | surf_usm_h%tt_surface_green_m(m) |
---|
| 9288 | ! |
---|
[3176] | 9289 | !-- Store surface temperature on pt_surface. Further, in case humidity is used |
---|
| 9290 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
| 9291 | !-- assumed to be the surface temperature. |
---|
[3418] | 9292 | surf_usm_h%pt_surface(m) = ( surf_usm_h%frac(ind_veg_wall,m) * t_surf_wall_h_p(m) & |
---|
[2963] | 9293 | + surf_usm_h%frac(ind_wat_win,m) * t_surf_window_h_p(m) & |
---|
| 9294 | + surf_usm_h%frac(ind_pav_green,m) * t_surf_green_h_p(m) ) & |
---|
[3274] | 9295 | / exner(k) |
---|
[3176] | 9296 | |
---|
| 9297 | IF ( humidity ) surf_usm_h%vpt_surface(m) = & |
---|
| 9298 | surf_usm_h%pt_surface(m) |
---|
[3337] | 9299 | |
---|
[2737] | 9300 | !-- calculate true tendency |
---|
[3418] | 9301 | stend_wall = ( t_surf_wall_h_p(m) - t_surf_wall_h(m) - dt_3d * tsc(3) * & |
---|
| 9302 | surf_usm_h%tt_surface_wall_m(m)) / ( dt_3d * tsc(2) ) |
---|
[2737] | 9303 | stend_window = ( t_surf_window_h_p(m) - t_surf_window_h(m) - dt_3d * tsc(3) * & |
---|
| 9304 | surf_usm_h%tt_surface_window_m(m)) / ( dt_3d * tsc(2) ) |
---|
| 9305 | stend_green = ( t_surf_green_h_p(m) - t_surf_green_h(m) - dt_3d * tsc(3) * & |
---|
| 9306 | surf_usm_h%tt_surface_green_m(m)) / ( dt_3d * tsc(2) ) |
---|
| 9307 | |
---|
| 9308 | !-- calculate t_surf tendencies for the next Runge-Kutta step |
---|
| 9309 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 9310 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
[3418] | 9311 | surf_usm_h%tt_surface_wall_m(m) = stend_wall |
---|
[2737] | 9312 | surf_usm_h%tt_surface_window_m(m) = stend_window |
---|
| 9313 | surf_usm_h%tt_surface_green_m(m) = stend_green |
---|
| 9314 | ELSEIF ( intermediate_timestep_count < & |
---|
| 9315 | intermediate_timestep_count_max ) THEN |
---|
[3418] | 9316 | surf_usm_h%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
| 9317 | 5.3125_wp * surf_usm_h%tt_surface_wall_m(m) |
---|
[2737] | 9318 | surf_usm_h%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
| 9319 | 5.3125_wp * surf_usm_h%tt_surface_window_m(m) |
---|
| 9320 | surf_usm_h%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
| 9321 | 5.3125_wp * surf_usm_h%tt_surface_green_m(m) |
---|
| 9322 | ENDIF |
---|
| 9323 | ENDIF |
---|
| 9324 | |
---|
| 9325 | !-- in case of fast changes in the skin temperature, it is required to |
---|
| 9326 | !-- update the radiative fluxes in order to keep the solution stable |
---|
[3418] | 9327 | IF ( ( ( ABS( t_surf_wall_h_p(m) - t_surf_wall_h(m) ) > 1.0_wp ) .OR. & |
---|
| 9328 | ( ABS( t_surf_green_h_p(m) - t_surf_green_h(m) ) > 1.0_wp ) .OR. & |
---|
| 9329 | ( ABS( t_surf_window_h_p(m) - t_surf_window_h(m) ) > 1.0_wp ) ) & |
---|
| 9330 | .AND. unscheduled_radiation_calls ) THEN |
---|
[2737] | 9331 | force_radiation_call_l = .TRUE. |
---|
| 9332 | ENDIF |
---|
[2943] | 9333 | ! |
---|
[2737] | 9334 | !-- calculate fluxes |
---|
[3337] | 9335 | !-- rad_net_l is never used! |
---|
[2920] | 9336 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_net_l(m) + & |
---|
[2963] | 9337 | surf_usm_h%frac(ind_veg_wall,m) * & |
---|
| 9338 | sigma_sb * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
[3418] | 9339 | ( t_surf_wall_h_p(m)**4 - t_surf_wall_h(m)**4 ) & |
---|
[2963] | 9340 | + surf_usm_h%frac(ind_wat_win,m) * & |
---|
| 9341 | sigma_sb * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
[2920] | 9342 | ( t_surf_window_h_p(m)**4 - t_surf_window_h(m)**4 ) & |
---|
[2963] | 9343 | + surf_usm_h%frac(ind_pav_green,m) * & |
---|
| 9344 | sigma_sb * surf_usm_h%emissivity(ind_pav_green,m) * & |
---|
[2920] | 9345 | ( t_surf_green_h_p(m)**4 - t_surf_green_h(m)**4 ) |
---|
| 9346 | |
---|
[2737] | 9347 | surf_usm_h%wghf_eb(m) = lambda_surface * & |
---|
[3418] | 9348 | ( t_surf_wall_h_p(m) - t_wall_h(nzb_wall,m) ) |
---|
[3337] | 9349 | surf_usm_h%wghf_eb_green(m) = lambda_surface_green * & |
---|
[2737] | 9350 | ( t_surf_green_h_p(m) - t_green_h(nzb_wall,m) ) |
---|
[3337] | 9351 | surf_usm_h%wghf_eb_window(m) = lambda_surface_window * & |
---|
[2737] | 9352 | ( t_surf_window_h_p(m) - t_window_h(nzb_wall,m) ) |
---|
| 9353 | |
---|
| 9354 | ! |
---|
| 9355 | !-- ground/wall/roof surface heat flux |
---|
[3418] | 9356 | surf_usm_h%wshf_eb(m) = - f_shf * ( surf_usm_h%pt1(m) - t_surf_wall_h_p(m) / exner(k) ) * & |
---|
[2963] | 9357 | surf_usm_h%frac(ind_veg_wall,m) & |
---|
[3274] | 9358 | - f_shf_window * ( surf_usm_h%pt1(m) - t_surf_window_h_p(m) / exner(k) ) * & |
---|
[2963] | 9359 | surf_usm_h%frac(ind_wat_win,m) & |
---|
[3274] | 9360 | - f_shf_green * ( surf_usm_h%pt1(m) - t_surf_green_h_p(m) / exner(k) ) * & |
---|
[2963] | 9361 | surf_usm_h%frac(ind_pav_green,m) |
---|
[2737] | 9362 | ! |
---|
| 9363 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
| 9364 | !-- diffusion_s, surface_layer_fluxes,... |
---|
[3274] | 9365 | surf_usm_h%shf(m) = surf_usm_h%wshf_eb(m) / c_p |
---|
[3337] | 9366 | |
---|
[3418] | 9367 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
| 9368 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
| 9369 | |
---|
| 9370 | ! print*, "tsurfroofgreen",m,t_surf_green_h_p(m),i,j,k,surf_usm_h%wghf_eb_green(m),surf_usm_h%rad_net_l(m),& |
---|
| 9371 | ! surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt |
---|
| 9372 | ! print*, "B",surf_usm_h%rad_sw_in(m),surf_usm_h%rad_sw_out(m),surf_usm_h%rad_lw_in(m),surf_usm_h%rad_lw_out(m) |
---|
| 9373 | ! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k |
---|
| 9374 | ! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m) |
---|
| 9375 | if ((t_surf_green_h_p(m).gt.370.0_wp).or.(t_surf_green_h_p(m).lt.250.0_wp)) then |
---|
| 9376 | print*, t_surf_green_h_p(m),m,i,j,k |
---|
| 9377 | stop |
---|
| 9378 | endif |
---|
| 9379 | |
---|
| 9380 | IF ( humidity ) THEN |
---|
| 9381 | surf_usm_h%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
| 9382 | * t_surf_green_h(m) - dq_s_dt * & |
---|
| 9383 | t_surf_green_h_p(m) ) |
---|
| 9384 | |
---|
| 9385 | surf_usm_h%qsws(m) = surf_usm_h%qsws_eb(m) / rho_lv |
---|
| 9386 | |
---|
| 9387 | surf_usm_h%qsws_veg_eb(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
| 9388 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
| 9389 | * t_surf_green_h_p(m) ) |
---|
| 9390 | |
---|
| 9391 | surf_usm_h%qsws_liq_eb(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
| 9392 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
| 9393 | * t_surf_green_h_p(m) ) |
---|
| 9394 | ENDIF |
---|
| 9395 | |
---|
| 9396 | ! |
---|
| 9397 | !-- Calculate the true surface resistance |
---|
| 9398 | IF ( .NOT. humidity ) THEN |
---|
| 9399 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
| 9400 | ELSE |
---|
| 9401 | surf_usm_h%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
| 9402 | * t_surf_green_h(m) - dq_s_dt * & |
---|
| 9403 | t_surf_green_h_p(m) ) / & |
---|
| 9404 | (surf_usm_h%qsws(m) + 1.0E-20) - surf_usm_h%r_a_green(m) |
---|
| 9405 | ENDIF |
---|
| 9406 | |
---|
| 9407 | ! |
---|
| 9408 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
| 9409 | !-- evaporation of liquid water |
---|
| 9410 | IF ( humidity ) THEN |
---|
| 9411 | ! |
---|
| 9412 | !-- If precipitation is activated, add rain water to qsws_liq |
---|
| 9413 | !-- and qsws_soil according the the vegetation coverage. |
---|
| 9414 | !-- precipitation_rate is given in mm. |
---|
| 9415 | IF ( precipitation ) THEN |
---|
| 9416 | |
---|
| 9417 | ! |
---|
| 9418 | !-- Add precipitation to liquid water reservoir, if possible. |
---|
| 9419 | !-- Otherwise, add the water to soil. In case of |
---|
| 9420 | !-- pavements, the exceeding water amount is implicitely removed |
---|
| 9421 | !-- as runoff as qsws_soil is then not used in the soil model |
---|
| 9422 | IF ( m_liq_usm_h%var_usm_1d(m) /= m_liq_max ) THEN |
---|
| 9423 | surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) & |
---|
| 9424 | + surf_usm_h%frac(ind_pav_green,m) * prr(k+k_off,j+j_off,i+i_off)& |
---|
| 9425 | * hyrho(k+k_off) & |
---|
| 9426 | * 0.001_wp * rho_l * l_v |
---|
| 9427 | ENDIF |
---|
| 9428 | |
---|
| 9429 | ENDIF |
---|
| 9430 | |
---|
| 9431 | ! |
---|
| 9432 | !-- If the air is saturated, check the reservoir water level |
---|
| 9433 | IF ( surf_usm_h%qsws(m) < 0.0_wp ) THEN |
---|
| 9434 | ! |
---|
| 9435 | !-- Check if reservoir is full (avoid values > m_liq_max) |
---|
| 9436 | !-- In that case, qsws_liq goes to qsws_soil. In this |
---|
| 9437 | !-- case qsws_veg is zero anyway (because c_liq = 1), |
---|
| 9438 | !-- so that tend is zero and no further check is needed |
---|
| 9439 | IF ( m_liq_usm_h%var_usm_1d(m) == m_liq_max ) THEN |
---|
| 9440 | ! surf_usm_h%qsws_soil(m) = surf_usm_h%qsws_soil(m) + surf_usm_h%qsws_liq(m) |
---|
| 9441 | |
---|
| 9442 | surf_usm_h%qsws_liq_eb(m) = 0.0_wp |
---|
| 9443 | ENDIF |
---|
| 9444 | |
---|
| 9445 | ! |
---|
| 9446 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
| 9447 | !-- let the water enter the liquid water reservoir as dew on the |
---|
| 9448 | !-- plant |
---|
| 9449 | IF ( surf_usm_h%qsws_veg_eb(m) < 0.0_wp ) THEN |
---|
| 9450 | surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m) |
---|
| 9451 | surf_usm_h%qsws_veg_eb(m) = 0.0_wp |
---|
| 9452 | ENDIF |
---|
| 9453 | ENDIF |
---|
| 9454 | |
---|
| 9455 | surf_usm_h%qsws(m) = surf_usm_h%qsws(m) / l_v |
---|
| 9456 | |
---|
| 9457 | tend = - surf_usm_h%qsws_liq_eb(m) * drho_l_lv |
---|
| 9458 | m_liq_usm_h_p%var_usm_1d(m) = m_liq_usm_h%var_usm_1d(m) + dt_3d * & |
---|
| 9459 | ( tsc(2) * tend + & |
---|
| 9460 | tsc(3) * tm_liq_usm_h_m%var_usm_1d(m) ) |
---|
| 9461 | ! |
---|
| 9462 | !-- Check if reservoir is overfull -> reduce to maximum |
---|
| 9463 | !-- (conservation of water is violated here) |
---|
| 9464 | m_liq_usm_h_p%var_usm_1d(m) = MIN( m_liq_usm_h_p%var_usm_1d(m),m_liq_max ) |
---|
| 9465 | |
---|
| 9466 | ! |
---|
| 9467 | !-- Check if reservoir is empty (avoid values < 0.0) |
---|
| 9468 | !-- (conservation of water is violated here) |
---|
| 9469 | m_liq_usm_h_p%var_usm_1d(m) = MAX( m_liq_usm_h_p%var_usm_1d(m), 0.0_wp ) |
---|
| 9470 | ! |
---|
| 9471 | !-- Calculate m_liq tendencies for the next Runge-Kutta step |
---|
| 9472 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 9473 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
| 9474 | tm_liq_usm_h_m%var_usm_1d(m) = tend |
---|
| 9475 | ELSEIF ( intermediate_timestep_count < & |
---|
| 9476 | intermediate_timestep_count_max ) THEN |
---|
| 9477 | tm_liq_usm_h_m%var_usm_1d(m) = -9.5625_wp * tend + & |
---|
| 9478 | 5.3125_wp * tm_liq_usm_h_m%var_usm_1d(m) |
---|
| 9479 | ENDIF |
---|
| 9480 | ENDIF |
---|
| 9481 | |
---|
| 9482 | ENDIF |
---|
| 9483 | else |
---|
| 9484 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
| 9485 | endif |
---|
| 9486 | |
---|
[2737] | 9487 | ENDDO |
---|
| 9488 | ! |
---|
| 9489 | !-- Now, treat vertical surface elements |
---|
| 9490 | DO l = 0, 3 |
---|
| 9491 | DO m = 1, surf_usm_v(l)%ns |
---|
| 9492 | ! |
---|
| 9493 | !-- Get indices of respective grid point |
---|
| 9494 | i = surf_usm_v(l)%i(m) |
---|
| 9495 | j = surf_usm_v(l)%j(m) |
---|
| 9496 | k = surf_usm_v(l)%k(m) |
---|
| 9497 | |
---|
| 9498 | ! |
---|
| 9499 | !-- TODO - how to calculate lambda_surface for horizontal (??? do you mean verical ???) surfaces |
---|
| 9500 | !-- (lambda_surface is set according to stratification in land surface model). |
---|
| 9501 | !-- Please note, for vertical surfaces no ol is defined, since |
---|
| 9502 | !-- stratification is not considered in this case. |
---|
| 9503 | lambda_surface = surf_usm_v(l)%lambda_surf(m) |
---|
| 9504 | lambda_surface_window = surf_usm_v(l)%lambda_surf_window(m) |
---|
| 9505 | lambda_surface_green = surf_usm_v(l)%lambda_surf_green(m) |
---|
| 9506 | |
---|
| 9507 | #if ! defined( __nopointer ) |
---|
[3418] | 9508 | ! pt1 = pt(k,j,i) |
---|
| 9509 | IF ( humidity ) THEN |
---|
| 9510 | qv1 = q(k,j,i) |
---|
| 9511 | ELSE |
---|
| 9512 | qv1 = 0.0_wp |
---|
| 9513 | ENDIF |
---|
[2737] | 9514 | ! |
---|
[3337] | 9515 | !-- calculate rho * c_p coefficient at wall layer |
---|
[3274] | 9516 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_v(l)%pt1(m) * exner(k) ) |
---|
[3418] | 9517 | |
---|
| 9518 | if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then |
---|
| 9519 | ! |
---|
| 9520 | !-- Calculate frequently used parameters |
---|
| 9521 | rho_lv = rho_cp / c_p * l_v |
---|
| 9522 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
| 9523 | endif |
---|
[2737] | 9524 | #endif |
---|
| 9525 | |
---|
| 9526 | !-- Calculation of r_a for vertical surfaces |
---|
| 9527 | !-- |
---|
| 9528 | !-- heat transfer coefficient for forced convection along vertical walls |
---|
| 9529 | !-- follows formulation in TUF3d model (Krayenhoff & Voogt, 2006) |
---|
| 9530 | !-- |
---|
| 9531 | !-- H = httc (Tsfc - Tair) |
---|
| 9532 | !-- httc = rw * (11.8 + 4.2 * Ueff) - 4.0 |
---|
| 9533 | !-- |
---|
| 9534 | !-- rw: wall patch roughness relative to 1.0 for concrete |
---|
| 9535 | !-- Ueff: effective wind speed |
---|
| 9536 | !-- - 4.0 is a reduction of Rowley et al (1930) formulation based on |
---|
| 9537 | !-- Cole and Sturrock (1977) |
---|
| 9538 | !-- |
---|
| 9539 | !-- Ucan: Canyon wind speed |
---|
| 9540 | !-- wstar: convective velocity |
---|
| 9541 | !-- Qs: surface heat flux |
---|
| 9542 | !-- zH: height of the convective layer |
---|
| 9543 | !-- wstar = (g/Tcan*Qs*zH)**(1./3.) |
---|
| 9544 | |
---|
| 9545 | !-- Effective velocity components must always |
---|
| 9546 | !-- be defined at scalar grid point. The wall normal component is |
---|
| 9547 | !-- obtained by simple linear interpolation. ( An alternative would |
---|
| 9548 | !-- be an logarithmic interpolation. ) |
---|
[3337] | 9549 | !-- Parameter roughness_concrete (default value = 0.001) is used |
---|
| 9550 | !-- to calculation of roughness relative to concrete |
---|
| 9551 | surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) / & |
---|
| 9552 | roughness_concrete * ( 11.8_wp + 4.2_wp * & |
---|
[2765] | 9553 | SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & |
---|
| 9554 | ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & |
---|
| 9555 | ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2, & |
---|
| 9556 | 0.01_wp ) ) & |
---|
| 9557 | ) - 4.0_wp ) |
---|
[3091] | 9558 | ! |
---|
| 9559 | !-- Limit aerodynamic resistance |
---|
[3196] | 9560 | IF ( surf_usm_v(l)%r_a(m) < 1.0_wp ) surf_usm_v(l)%r_a(m) = 1.0_wp |
---|
| 9561 | |
---|
[3091] | 9562 | |
---|
[2765] | 9563 | f_shf = rho_cp / surf_usm_v(l)%r_a(m) |
---|
| 9564 | f_shf_window = rho_cp / surf_usm_v(l)%r_a(m) |
---|
| 9565 | f_shf_green = rho_cp / surf_usm_v(l)%r_a(m) |
---|
| 9566 | |
---|
[3418] | 9567 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 9568 | if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then |
---|
| 9569 | !-- Adapted from LSM: |
---|
| 9570 | !-- Second step: calculate canopy resistance r_canopy |
---|
| 9571 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
| 9572 | |
---|
| 9573 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
| 9574 | !-- night) |
---|
| 9575 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_v(l)%rad_sw_in(m) + 0.05_wp ) / & |
---|
| 9576 | (0.81_wp * (0.004_wp * surf_usm_v(l)%rad_sw_in(m) & |
---|
| 9577 | + 1.0_wp)) ) |
---|
| 9578 | ! |
---|
| 9579 | !-- f2: correction for soil moisture availability to plants (the |
---|
| 9580 | !-- integrated soil moisture must thus be considered here) |
---|
| 9581 | !-- f2 = 0 for very dry soils |
---|
| 9582 | |
---|
| 9583 | f2=1.0_wp |
---|
| 9584 | ! m_total = 0.0_wp |
---|
| 9585 | ! DO k = nzb_wall, nzt_wall+1 |
---|
| 9586 | ! m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
| 9587 | ! * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
| 9588 | ! ENDDO |
---|
| 9589 | ! |
---|
| 9590 | ! IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
| 9591 | ! f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
| 9592 | ! ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
| 9593 | ! f2 = 1.0_wp |
---|
| 9594 | ! ELSE |
---|
| 9595 | ! f2 = 1.0E-20_wp |
---|
| 9596 | ! ENDIF |
---|
| 9597 | |
---|
| 9598 | ! |
---|
| 9599 | !-- Calculate water vapour pressure at saturation |
---|
| 9600 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_v_p(l)%t(m) & |
---|
| 9601 | - 273.16_wp ) / ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) ) |
---|
| 9602 | ! |
---|
| 9603 | !-- f3: correction for vapour pressure deficit |
---|
| 9604 | IF ( surf_usm_v(l)%g_d(m) /= 0.0_wp ) THEN |
---|
| 9605 | ! |
---|
| 9606 | !-- Calculate vapour pressure |
---|
| 9607 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
| 9608 | f3 = EXP ( - surf_usm_v(l)%g_d(m) * (e_s - e) ) |
---|
| 9609 | ELSE |
---|
| 9610 | f3 = 1.0_wp |
---|
| 9611 | ENDIF |
---|
| 9612 | ! |
---|
| 9613 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
| 9614 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
| 9615 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
| 9616 | surf_usm_v(l)%r_canopy(m) = surf_usm_v(l)%r_canopy_min(m) / & |
---|
| 9617 | ( surf_usm_v(l)%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
| 9618 | |
---|
| 9619 | ! !-- Calculate the maximum possible liquid water amount on plants and |
---|
| 9620 | ! !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
| 9621 | ! !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
| 9622 | ! !-- liquid water fraction for paved surfaces is calculated after |
---|
| 9623 | ! !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
| 9624 | ! !-- vegetated surfaces and bare soils. |
---|
| 9625 | ! ! surf_usm_h%lai(m)=4.0_wp |
---|
| 9626 | ! m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
| 9627 | ! surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
| 9628 | ! |
---|
| 9629 | !-- Calculate saturation specific humidity |
---|
| 9630 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
| 9631 | ! |
---|
| 9632 | !-- In case of dewfall, set evapotranspiration to zero |
---|
| 9633 | !-- All super-saturated water is then removed from the air |
---|
| 9634 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
| 9635 | surf_usm_v(l)%r_canopy(m) = 0.0_wp |
---|
| 9636 | ENDIF |
---|
| 9637 | |
---|
| 9638 | ! |
---|
| 9639 | !-- Calculate coefficients for the total evapotranspiration |
---|
| 9640 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
| 9641 | !-- For pavements, only evaporation of liquid water is possible. |
---|
| 9642 | f_qsws_veg = rho_lv * & |
---|
| 9643 | ( 1.0_wp - 0.0_wp ) / & !surf_usm_h%c_liq(m) ) / & |
---|
| 9644 | ( surf_usm_v(l)%r_a(m) + surf_usm_v(l)%r_canopy(m) ) |
---|
| 9645 | ! f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
| 9646 | ! surf_usm_h%r_a_green(m) |
---|
| 9647 | |
---|
| 9648 | f_qsws = f_qsws_veg! + f_qsws_liq |
---|
| 9649 | ! |
---|
| 9650 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
| 9651 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_v_p(l)%t(m) - 35.86_wp) - & |
---|
| 9652 | 17.269_wp*( t_surf_green_v_p(l)%t(m) - 273.16_wp) & |
---|
| 9653 | / ( t_surf_green_v_p(l)%t(m) - 35.86_wp)**2 ) |
---|
| 9654 | |
---|
| 9655 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
| 9656 | endif |
---|
| 9657 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 9658 | |
---|
[2737] | 9659 | !-- add LW up so that it can be removed in prognostic equation |
---|
| 9660 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%rad_sw_in(m) - & |
---|
| 9661 | surf_usm_v(l)%rad_sw_out(m) + & |
---|
| 9662 | surf_usm_v(l)%rad_lw_in(m) - & |
---|
| 9663 | surf_usm_v(l)%rad_lw_out(m) |
---|
| 9664 | |
---|
[3418] | 9665 | if ((abs(t_surf_wall_v(l)%t(m)-276.).gt.100.).or.(abs(t_surf_window_v(l)%t(m)-276.).gt.300.) & |
---|
| 9666 | .or.(abs(t_surf_green_v(l)%t(m)-276.).gt.100)) then |
---|
| 9667 | print*, "tsurfvvvv",m,t_surf_wall_v(l)%t(m),t_surf_window_v(l)%t(m),t_surf_green_v(l)%t(m) |
---|
| 9668 | print*, "params", surf_usm_v(l)%emissivity(ind_veg_wall,m),lambda_surface, t_wall_v(l)%t(nzb_wall:nzt_wall,m), & |
---|
| 9669 | surf_usm_v(l)%emissivity(ind_wat_win,m),lambda_surface_window,t_window_v(l)%t(nzb_wall:nzt_wall,m),t_green_v(l)%t(nzb_wall:nzt_wall,m) |
---|
| 9670 | print*, "dicken",surf_usm_v(l)%zw(nzb_wall:nzt_wall,m),surf_usm_v(l)%zw_window(nzb_wall:nzt_wall,m),surf_usm_v(l)%zw_green(nzb_wall:nzt_wall,m) |
---|
| 9671 | print*, "c",surf_usm_v(l)%c_surface_window(m),surf_usm_v(l)%c_surface(m) |
---|
| 9672 | !if ((abs(t_surf_v(l)%t(m)-276.).gt.10.).or.(abs(t_surf_window_v(l)%t(m)-276.).gt.10.)) then |
---|
| 9673 | stop |
---|
| 9674 | endif |
---|
[2737] | 9675 | !-- numerator of the prognostic equation |
---|
| 9676 | coef_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
[2963] | 9677 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_veg_wall,m) * & |
---|
[3418] | 9678 | sigma_sb * t_surf_wall_v(l)%t(m) ** 4 + & |
---|
[2963] | 9679 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
[2737] | 9680 | lambda_surface * t_wall_v(l)%t(nzb_wall,m) |
---|
[3418] | 9681 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
[2963] | 9682 | coef_window_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
| 9683 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_wat_win,m) * & |
---|
| 9684 | sigma_sb * t_surf_window_v(l)%t(m) ** 4 + & |
---|
| 9685 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
[2737] | 9686 | lambda_surface_window * t_window_v(l)%t(nzb_wall,m) |
---|
[3418] | 9687 | endif |
---|
| 9688 | IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
[3091] | 9689 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
[3418] | 9690 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
| 9691 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
| 9692 | f_shf * surf_usm_v(l)%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
| 9693 | + dq_s_dt * t_surf_green_v(l)%t(m) ) + & |
---|
| 9694 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
| 9695 | ELSE |
---|
| 9696 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
| 9697 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
| 9698 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
[2963] | 9699 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
[2737] | 9700 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
[3418] | 9701 | ENDIF |
---|
| 9702 | |
---|
[2737] | 9703 | |
---|
| 9704 | !-- denominator of the prognostic equation |
---|
[3418] | 9705 | coef_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_veg_wall,m) * sigma_sb * & |
---|
| 9706 | t_surf_wall_v(l)%t(m) ** 3 & |
---|
| 9707 | + lambda_surface + f_shf / exner(k) |
---|
| 9708 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
| 9709 | coef_window_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_wat_win,m) * sigma_sb * & |
---|
| 9710 | t_surf_window_v(l)%t(m) ** 3 & |
---|
[3274] | 9711 | + lambda_surface_window + f_shf / exner(k) |
---|
[3418] | 9712 | endif |
---|
| 9713 | IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
| 9714 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
| 9715 | t_surf_green_v(l)%t(m) ** 3 + f_qsws * dq_s_dt & |
---|
[3274] | 9716 | + lambda_surface_green + f_shf / exner(k) |
---|
[3418] | 9717 | ELSE |
---|
| 9718 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
| 9719 | t_surf_green_v(l)%t(m) ** 3 & |
---|
| 9720 | + lambda_surface_green + f_shf / exner(k) |
---|
| 9721 | ENDIF |
---|
[2737] | 9722 | |
---|
| 9723 | !-- implicit solution when the surface layer has no heat capacity, |
---|
| 9724 | !-- otherwise use RK3 scheme. |
---|
[3418] | 9725 | t_surf_wall_v_p(l)%t(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
| 9726 | surf_usm_v(l)%c_surface(m) * t_surf_wall_v(l)%t(m) ) / & |
---|
[2737] | 9727 | ( surf_usm_v(l)%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
[3418] | 9728 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
[2737] | 9729 | t_surf_window_v_p(l)%t(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
| 9730 | surf_usm_v(l)%c_surface_window(m) * t_surf_window_v(l)%t(m) ) / & |
---|
| 9731 | ( surf_usm_v(l)%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
[3418] | 9732 | endif |
---|
[2737] | 9733 | t_surf_green_v_p(l)%t(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
| 9734 | surf_usm_v(l)%c_surface_green(m) * t_surf_green_v(l)%t(m) ) / & |
---|
| 9735 | ( surf_usm_v(l)%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
| 9736 | |
---|
| 9737 | !-- add RK3 term |
---|
[3418] | 9738 | t_surf_wall_v_p(l)%t(m) = t_surf_wall_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
| 9739 | surf_usm_v(l)%tt_surface_wall_m(m) |
---|
[2737] | 9740 | t_surf_window_v_p(l)%t(m) = t_surf_window_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
| 9741 | surf_usm_v(l)%tt_surface_window_m(m) |
---|
| 9742 | t_surf_green_v_p(l)%t(m) = t_surf_green_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
| 9743 | surf_usm_v(l)%tt_surface_green_m(m) |
---|
| 9744 | ! |
---|
[3176] | 9745 | !-- Store surface temperature. Further, in case humidity is used |
---|
| 9746 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
| 9747 | !-- assumed to be the surface temperature. |
---|
[3418] | 9748 | surf_usm_v(l)%pt_surface(m) = ( surf_usm_v(l)%frac(ind_veg_wall,m) * t_surf_wall_v_p(l)%t(m) & |
---|
| 9749 | + surf_usm_v(l)%frac(ind_wat_win,m) * t_surf_window_v_p(l)%t(m) & |
---|
[2963] | 9750 | + surf_usm_v(l)%frac(ind_pav_green,m) * t_surf_green_v_p(l)%t(m) ) & |
---|
[3274] | 9751 | / exner(k) |
---|
[3176] | 9752 | |
---|
| 9753 | IF ( humidity ) surf_usm_v(l)%vpt_surface(m) = & |
---|
| 9754 | surf_usm_v(l)%pt_surface(m) |
---|
[3337] | 9755 | |
---|
[2737] | 9756 | !-- calculate true tendency |
---|
[3418] | 9757 | stend_wall = ( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
| 9758 | surf_usm_v(l)%tt_surface_wall_m(m) ) / ( dt_3d * tsc(2) ) |
---|
[2737] | 9759 | stend_window = ( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
| 9760 | surf_usm_v(l)%tt_surface_window_m(m) ) / ( dt_3d * tsc(2) ) |
---|
[3378] | 9761 | stend_green = ( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) - dt_3d * tsc(3) * & |
---|
[2737] | 9762 | surf_usm_v(l)%tt_surface_green_m(m) ) / ( dt_3d * tsc(2) ) |
---|
| 9763 | |
---|
[3418] | 9764 | !-- calculate t_surf_* tendencies for the next Runge-Kutta step |
---|
[2737] | 9765 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 9766 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
[3418] | 9767 | surf_usm_v(l)%tt_surface_wall_m(m) = stend_wall |
---|
[2737] | 9768 | surf_usm_v(l)%tt_surface_window_m(m) = stend_window |
---|
| 9769 | surf_usm_v(l)%tt_surface_green_m(m) = stend_green |
---|
[3378] | 9770 | ELSEIF ( intermediate_timestep_count < & |
---|
[2737] | 9771 | intermediate_timestep_count_max ) THEN |
---|
[3418] | 9772 | surf_usm_v(l)%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
| 9773 | 5.3125_wp * surf_usm_v(l)%tt_surface_wall_m(m) |
---|
[3378] | 9774 | surf_usm_v(l)%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
[2737] | 9775 | 5.3125_wp * surf_usm_v(l)%tt_surface_green_m(m) |
---|
[3378] | 9776 | surf_usm_v(l)%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
[2737] | 9777 | 5.3125_wp * surf_usm_v(l)%tt_surface_window_m(m) |
---|
| 9778 | ENDIF |
---|
| 9779 | ENDIF |
---|
| 9780 | |
---|
| 9781 | !-- in case of fast changes in the skin temperature, it is required to |
---|
| 9782 | !-- update the radiative fluxes in order to keep the solution stable |
---|
| 9783 | |
---|
[3418] | 9784 | IF ( ( ( ABS( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
| 9785 | ( ABS( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
| 9786 | ( ABS( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) ) > 1.0_wp ) ) & |
---|
| 9787 | .AND. unscheduled_radiation_calls ) THEN |
---|
[2737] | 9788 | force_radiation_call_l = .TRUE. |
---|
| 9789 | ENDIF |
---|
| 9790 | |
---|
| 9791 | !-- calculate fluxes |
---|
[2920] | 9792 | !-- prognostic rad_net_l is used just for output! |
---|
[2963] | 9793 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
[2737] | 9794 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
| 9795 | 3.0_wp * sigma_sb * & |
---|
[3418] | 9796 | t_surf_wall_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
| 9797 | t_surf_wall_v(l)%t(m)**3 * t_surf_wall_v_p(l)%t(m) ) & |
---|
[2963] | 9798 | + surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
[2737] | 9799 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
| 9800 | 3.0_wp * sigma_sb * & |
---|
| 9801 | t_surf_window_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
| 9802 | t_surf_window_v(l)%t(m)**3 * t_surf_window_v_p(l)%t(m) ) & |
---|
[2963] | 9803 | + surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
[2737] | 9804 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
| 9805 | 3.0_wp * sigma_sb * & |
---|
| 9806 | t_surf_green_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
| 9807 | t_surf_green_v(l)%t(m)**3 * t_surf_green_v_p(l)%t(m) ) |
---|
| 9808 | |
---|
| 9809 | surf_usm_v(l)%wghf_eb_window(m) = lambda_surface_window * & |
---|
| 9810 | ( t_surf_window_v_p(l)%t(m) - t_window_v(l)%t(nzb_wall,m) ) |
---|
| 9811 | surf_usm_v(l)%wghf_eb(m) = lambda_surface * & |
---|
[3418] | 9812 | ( t_surf_wall_v_p(l)%t(m) - t_wall_v(l)%t(nzb_wall,m) ) |
---|
[2737] | 9813 | surf_usm_v(l)%wghf_eb_green(m) = lambda_surface_green * & |
---|
| 9814 | ( t_surf_green_v_p(l)%t(m) - t_green_v(l)%t(nzb_wall,m) ) |
---|
| 9815 | |
---|
| 9816 | !-- ground/wall/roof surface heat flux |
---|
[2750] | 9817 | surf_usm_v(l)%wshf_eb(m) = & |
---|
| 9818 | - f_shf * ( surf_usm_v(l)%pt1(m) - & |
---|
[3418] | 9819 | t_surf_wall_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
[2750] | 9820 | - f_shf_window * ( surf_usm_v(l)%pt1(m) - & |
---|
[3274] | 9821 | t_surf_window_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_wat_win,m)& |
---|
[2750] | 9822 | - f_shf_green * ( surf_usm_v(l)%pt1(m) - & |
---|
[3274] | 9823 | t_surf_green_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_pav_green,m) |
---|
[2737] | 9824 | |
---|
| 9825 | ! |
---|
| 9826 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
| 9827 | !-- diffusion_s, surface_layer_fluxes,... |
---|
[3274] | 9828 | surf_usm_v(l)%shf(m) = surf_usm_v(l)%wshf_eb(m) / c_p |
---|
[2737] | 9829 | |
---|
[3418] | 9830 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 9831 | if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then !111 |
---|
| 9832 | |
---|
| 9833 | ! print*, "tsurfroofgreen",m,t_surf_green_h_p(m),i,j,k,surf_usm_h%wghf_eb_green(m),surf_usm_h%rad_net_l(m),& |
---|
| 9834 | ! surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt |
---|
| 9835 | ! print*, "B",surf_usm_h%rad_sw_in(m),surf_usm_h%rad_sw_out(m),surf_usm_h%rad_lw_in(m),surf_usm_h%rad_lw_out(m) |
---|
| 9836 | ! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k |
---|
| 9837 | ! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m) |
---|
| 9838 | if ((t_surf_green_v_p(l)%t(m).gt.370.0_wp).or.(t_surf_green_v_p(l)%t(m).lt.250.0_wp)) then |
---|
| 9839 | print*, t_surf_green_v_p(l)%t(m),m,i,j,k |
---|
| 9840 | stop |
---|
| 9841 | endif |
---|
| 9842 | |
---|
| 9843 | IF ( humidity ) THEN |
---|
| 9844 | surf_usm_v(l)%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
| 9845 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
| 9846 | t_surf_green_v_p(l)%t(m) ) |
---|
| 9847 | |
---|
| 9848 | surf_usm_v(l)%qsws(m) = surf_usm_v(l)%qsws_eb(m) / rho_lv |
---|
| 9849 | |
---|
| 9850 | surf_usm_v(l)%qsws_veg_eb(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
| 9851 | + dq_s_dt * t_surf_green_v(l)%t(m) - dq_s_dt & |
---|
| 9852 | * t_surf_green_v_p(l)%t(m) ) |
---|
| 9853 | |
---|
| 9854 | ! surf_usm_h%qsws_liq_eb(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
| 9855 | ! + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
| 9856 | ! * t_surf_green_h_p(m) ) |
---|
| 9857 | ENDIF |
---|
| 9858 | |
---|
| 9859 | ! |
---|
| 9860 | !-- Calculate the true surface resistance |
---|
| 9861 | IF ( .NOT. humidity ) THEN |
---|
| 9862 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
| 9863 | ELSE |
---|
| 9864 | surf_usm_v(l)%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
| 9865 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
| 9866 | t_surf_green_v_p(l)%t(m) ) / & |
---|
| 9867 | (surf_usm_v(l)%qsws(m) + 1.0E-20) - surf_usm_v(l)%r_a(m) |
---|
| 9868 | ENDIF |
---|
| 9869 | |
---|
| 9870 | |
---|
| 9871 | ! |
---|
| 9872 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
| 9873 | !-- evaporation of liquid water |
---|
| 9874 | IF ( humidity ) THEN |
---|
| 9875 | ! |
---|
| 9876 | !-- If the air is saturated, check the reservoir water level |
---|
| 9877 | IF ( surf_usm_v(l)%qsws(m) < 0.0_wp ) THEN |
---|
| 9878 | |
---|
| 9879 | ! |
---|
| 9880 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
| 9881 | !-- let the water enter the liquid water reservoir as dew on the |
---|
| 9882 | !-- plant |
---|
| 9883 | IF ( surf_usm_v(l)%qsws_veg_eb(m) < 0.0_wp ) THEN |
---|
| 9884 | ! surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m) |
---|
| 9885 | surf_usm_v(l)%qsws_veg_eb(m) = 0.0_wp |
---|
| 9886 | ENDIF |
---|
| 9887 | ENDIF |
---|
| 9888 | ENDIF |
---|
| 9889 | else |
---|
| 9890 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
| 9891 | endif !111 |
---|
| 9892 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 9893 | |
---|
| 9894 | |
---|
[2737] | 9895 | ENDDO |
---|
| 9896 | |
---|
| 9897 | ENDDO |
---|
| 9898 | ! |
---|
| 9899 | !-- Add-up anthropogenic heat, for now only at upward-facing surfaces |
---|
| 9900 | IF ( usm_anthropogenic_heat .AND. & |
---|
| 9901 | intermediate_timestep_count == intermediate_timestep_count_max ) THEN |
---|
| 9902 | !-- application of the additional anthropogenic heat sources |
---|
| 9903 | !-- we considere the traffic for now so all heat is absorbed |
---|
| 9904 | !-- to the first layer, generalization would be worth. |
---|
| 9905 | |
---|
| 9906 | !-- calculation of actual profile coefficient |
---|
| 9907 | !-- ??? check time_since_reference_point ??? |
---|
| 9908 | dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp) |
---|
| 9909 | dhour = INT(dtime/3600.0_wp) |
---|
[3337] | 9910 | DO i = nxl, nxr |
---|
| 9911 | DO j = nys, nyn |
---|
| 9912 | DO k = nzub, min(nzut,naheatlayers) |
---|
| 9913 | IF ( k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
| 9914 | !-- increase of pt in box i,j,k in time dt_3d |
---|
| 9915 | !-- given to anthropogenic heat aheat*acoef (W*m-2) |
---|
| 9916 | !-- linear interpolation of coeficient |
---|
| 9917 | acoef = (REAL(dhour+1,wp)-dtime/3600.0_wp)*aheatprof(k,dhour) + & |
---|
| 9918 | (dtime/3600.0_wp-REAL(dhour,wp))*aheatprof(k,dhour+1) |
---|
| 9919 | IF ( aheat(k,j,i) > 0.0_wp ) THEN |
---|
| 9920 | !-- calculate rho * c_p coefficient at layer k |
---|
| 9921 | rho_cp = c_p * hyp(k) / ( r_d * pt(k+1,j,i) * exner(k) ) |
---|
| 9922 | pt(k,j,i) = pt(k,j,i) + aheat(k,j,i)*acoef*dt_3d/(exner(k)*rho_cp*dz(1)) |
---|
| 9923 | ENDIF |
---|
| 9924 | ENDIF |
---|
| 9925 | ENDDO |
---|
| 9926 | ENDDO |
---|
[2737] | 9927 | ENDDO |
---|
| 9928 | |
---|
| 9929 | ENDIF |
---|
| 9930 | |
---|
| 9931 | !-- pt and shf are defined on nxlg:nxrg,nysg:nyng |
---|
| 9932 | !-- get the borders from neighbours |
---|
| 9933 | #if ! defined( __nopointer ) |
---|
| 9934 | CALL exchange_horiz( pt, nbgp ) |
---|
| 9935 | #endif |
---|
| 9936 | |
---|
| 9937 | !-- calculation of force_radiation_call: |
---|
| 9938 | !-- Make logical OR for all processes. |
---|
| 9939 | !-- Force radiation call if at least one processor forces it. |
---|
| 9940 | IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )& |
---|
| 9941 | THEN |
---|
| 9942 | #if defined( __parallel ) |
---|
| 9943 | IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) |
---|
| 9944 | CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call, & |
---|
| 9945 | 1, MPI_LOGICAL, MPI_LOR, comm2d, ierr ) |
---|
| 9946 | #else |
---|
| 9947 | force_radiation_call = force_radiation_call_l |
---|
| 9948 | #endif |
---|
| 9949 | force_radiation_call_l = .FALSE. |
---|
| 9950 | ENDIF |
---|
| 9951 | |
---|
[3418] | 9952 | ! ! |
---|
| 9953 | ! !-- Calculate surface specific humidity |
---|
| 9954 | ! IF ( humidity ) THEN |
---|
| 9955 | ! CALL calc_q_surface_usm |
---|
| 9956 | ! ENDIF |
---|
| 9957 | |
---|
| 9958 | |
---|
| 9959 | CONTAINS |
---|
| 9960 | !------------------------------------------------------------------------------! |
---|
| 9961 | ! Description: |
---|
| 9962 | ! ------------ |
---|
| 9963 | !> Calculation of specific humidity of the skin layer (surface). It is assumend |
---|
| 9964 | !> that the skin is always saturated. |
---|
| 9965 | !------------------------------------------------------------------------------! |
---|
| 9966 | SUBROUTINE calc_q_surface_usm |
---|
| 9967 | |
---|
| 9968 | IMPLICIT NONE |
---|
| 9969 | |
---|
| 9970 | REAL(wp) :: resistance !< aerodynamic and soil resistance term |
---|
| 9971 | |
---|
| 9972 | DO m = 1, surf_usm_h%ns |
---|
| 9973 | |
---|
| 9974 | i = surf_usm_h%i(m) |
---|
| 9975 | j = surf_usm_h%j(m) |
---|
| 9976 | k = surf_usm_h%k(m) |
---|
| 9977 | |
---|
| 9978 | ! |
---|
| 9979 | !-- Calculate water vapour pressure at saturation |
---|
| 9980 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
| 9981 | ( t_surf_green_h_p(m) - 273.16_wp ) / & |
---|
| 9982 | ( t_surf_green_h_p(m) - 35.86_wp ) & |
---|
| 9983 | ) |
---|
| 9984 | |
---|
| 9985 | ! |
---|
| 9986 | !-- Calculate specific humidity at saturation |
---|
| 9987 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
| 9988 | |
---|
| 9989 | ! surf_usm_h%r_a_green(m) = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
| 9990 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-10_wp ) |
---|
| 9991 | ! |
---|
| 9992 | ! !-- make sure that the resistance does not drop to zero |
---|
| 9993 | ! IF ( ABS(surf_usm_h%r_a_green(m)) < 1.0E-10_wp ) surf_usm_h%r_a_green(m) = 1.0E-10_wp |
---|
| 9994 | |
---|
| 9995 | resistance = surf_usm_h%r_a_green(m) / ( surf_usm_h%r_a_green(m) + surf_usm_h%r_s(m) + 1E-5_wp ) |
---|
| 9996 | |
---|
| 9997 | ! |
---|
| 9998 | !-- Calculate specific humidity at surface |
---|
| 9999 | IF ( bulk_cloud_model ) THEN |
---|
| 10000 | q(k,j,i) = resistance * q_s + & |
---|
| 10001 | ( 1.0_wp - resistance ) * & |
---|
| 10002 | ( q(k,j,i) - ql(k,j,i) ) |
---|
| 10003 | ELSE |
---|
| 10004 | q(k,j,i) = resistance * q_s + & |
---|
| 10005 | ( 1.0_wp - resistance ) * & |
---|
| 10006 | q(k,j,i) |
---|
| 10007 | ENDIF |
---|
| 10008 | |
---|
| 10009 | ! |
---|
| 10010 | !-- Update virtual potential temperature |
---|
| 10011 | vpt(k,j,i) = pt(k,j,i) * & |
---|
| 10012 | ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
| 10013 | |
---|
| 10014 | ENDDO |
---|
| 10015 | |
---|
| 10016 | !-- Now, treat vertical surface elements |
---|
| 10017 | DO l = 0, 3 |
---|
| 10018 | DO m = 1, surf_usm_v(l)%ns |
---|
| 10019 | ! |
---|
| 10020 | !-- Get indices of respective grid point |
---|
| 10021 | i = surf_usm_v(l)%i(m) |
---|
| 10022 | j = surf_usm_v(l)%j(m) |
---|
| 10023 | k = surf_usm_v(l)%k(m) |
---|
| 10024 | |
---|
| 10025 | ! |
---|
| 10026 | !-- Calculate water vapour pressure at saturation |
---|
| 10027 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
| 10028 | ( t_surf_green_v_p(l)%t(m) - 273.16_wp ) / & |
---|
| 10029 | ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) & |
---|
| 10030 | ) |
---|
| 10031 | |
---|
| 10032 | ! |
---|
| 10033 | !-- Calculate specific humidity at saturation |
---|
| 10034 | q_s = 0.622_wp * e_s / ( surface_pressure -e_s ) |
---|
| 10035 | |
---|
| 10036 | ! |
---|
| 10037 | !-- Calculate specific humidity at surface |
---|
| 10038 | IF ( bulk_cloud_model ) THEN |
---|
| 10039 | q(k,j,i) = ( q(k,j,i) - ql(k,j,i) ) |
---|
| 10040 | ELSE |
---|
| 10041 | q(k,j,i) = q(k,j,i) |
---|
| 10042 | ENDIF |
---|
| 10043 | ! |
---|
| 10044 | !-- Update virtual potential temperature |
---|
| 10045 | vpt(k,j,i) = pt(k,j,i) * & |
---|
| 10046 | ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
| 10047 | |
---|
| 10048 | ENDDO |
---|
| 10049 | |
---|
| 10050 | ENDDO |
---|
| 10051 | |
---|
| 10052 | END SUBROUTINE calc_q_surface_usm |
---|
| 10053 | |
---|
[2737] | 10054 | END SUBROUTINE usm_surface_energy_balance |
---|
| 10055 | |
---|
| 10056 | |
---|
| 10057 | !------------------------------------------------------------------------------! |
---|
| 10058 | ! Description: |
---|
| 10059 | ! ------------ |
---|
| 10060 | !> Swapping of timelevels for t_surf and t_wall |
---|
| 10061 | !> called out from subroutine swap_timelevel |
---|
| 10062 | !------------------------------------------------------------------------------! |
---|
[3241] | 10063 | SUBROUTINE usm_swap_timelevel( mod_count ) |
---|
[2737] | 10064 | |
---|
| 10065 | IMPLICIT NONE |
---|
| 10066 | |
---|
[3241] | 10067 | INTEGER(iwp), INTENT(IN) :: mod_count |
---|
[2737] | 10068 | |
---|
| 10069 | #if defined( __nopointer ) |
---|
[3418] | 10070 | t_surf_wall_h = t_surf_wall_h_p |
---|
[2737] | 10071 | t_wall_h = t_wall_h_p |
---|
[3418] | 10072 | t_surf_wall_v = t_surf_wall_v_p |
---|
[2737] | 10073 | t_wall_v = t_wall_v_p |
---|
| 10074 | t_surf_window_h = t_surf_window_h_p |
---|
| 10075 | t_window_h = t_window_h_p |
---|
| 10076 | t_surf_window_v = t_surf_window_v_p |
---|
| 10077 | t_window_v = t_window_v_p |
---|
| 10078 | t_surf_green_h = t_surf_green_h_p |
---|
| 10079 | t_surf_green_v = t_surf_green_v_p |
---|
| 10080 | t_green_h = t_green_h_p |
---|
| 10081 | t_green_v = t_green_v_p |
---|
| 10082 | #else |
---|
| 10083 | SELECT CASE ( mod_count ) |
---|
| 10084 | CASE ( 0 ) |
---|
| 10085 | ! |
---|
| 10086 | !-- Horizontal surfaces |
---|
[3418] | 10087 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
[2737] | 10088 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
| 10089 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
| 10090 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
| 10091 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
| 10092 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
| 10093 | ! |
---|
| 10094 | !-- Vertical surfaces |
---|
[3418] | 10095 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
[2737] | 10096 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
| 10097 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
| 10098 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
| 10099 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
| 10100 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
| 10101 | CASE ( 1 ) |
---|
| 10102 | ! |
---|
| 10103 | !-- Horizontal surfaces |
---|
[3418] | 10104 | t_surf_wall_h => t_surf_wall_h_2; t_surf_wall_h_p => t_surf_wall_h_1 |
---|
[2737] | 10105 | t_wall_h => t_wall_h_2; t_wall_h_p => t_wall_h_1 |
---|
| 10106 | t_surf_window_h => t_surf_window_h_2; t_surf_window_h_p => t_surf_window_h_1 |
---|
| 10107 | t_window_h => t_window_h_2; t_window_h_p => t_window_h_1 |
---|
| 10108 | t_surf_green_h => t_surf_green_h_2; t_surf_green_h_p => t_surf_green_h_1 |
---|
| 10109 | t_green_h => t_green_h_2; t_green_h_p => t_green_h_1 |
---|
| 10110 | ! |
---|
| 10111 | !-- Vertical surfaces |
---|
[3418] | 10112 | t_surf_wall_v => t_surf_wall_v_2; t_surf_wall_v_p => t_surf_wall_v_1 |
---|
[2737] | 10113 | t_wall_v => t_wall_v_2; t_wall_v_p => t_wall_v_1 |
---|
| 10114 | t_surf_window_v => t_surf_window_v_2; t_surf_window_v_p => t_surf_window_v_1 |
---|
| 10115 | t_window_v => t_window_v_2; t_window_v_p => t_window_v_1 |
---|
| 10116 | t_surf_green_v => t_surf_green_v_2; t_surf_green_v_p => t_surf_green_v_1 |
---|
| 10117 | t_green_v => t_green_v_2; t_green_v_p => t_green_v_1 |
---|
| 10118 | END SELECT |
---|
| 10119 | #endif |
---|
| 10120 | |
---|
| 10121 | END SUBROUTINE usm_swap_timelevel |
---|
| 10122 | |
---|
| 10123 | !------------------------------------------------------------------------------! |
---|
| 10124 | ! Description: |
---|
| 10125 | ! ------------ |
---|
[2920] | 10126 | !> Subroutine writes t_surf and t_wall data into restart files |
---|
[2737] | 10127 | !------------------------------------------------------------------------------! |
---|
[2894] | 10128 | SUBROUTINE usm_wrd_local |
---|
| 10129 | |
---|
[2737] | 10130 | |
---|
| 10131 | IMPLICIT NONE |
---|
| 10132 | |
---|
| 10133 | CHARACTER(LEN=1) :: dum !< dummy string to create output-variable name |
---|
| 10134 | INTEGER(iwp) :: l !< index surface type orientation |
---|
[2894] | 10135 | |
---|
| 10136 | CALL wrd_write_string( 'ns_h_on_file_usm' ) |
---|
| 10137 | WRITE ( 14 ) surf_usm_h%ns |
---|
| 10138 | |
---|
| 10139 | CALL wrd_write_string( 'ns_v_on_file_usm' ) |
---|
| 10140 | WRITE ( 14 ) surf_usm_v(0:3)%ns |
---|
| 10141 | |
---|
| 10142 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
| 10143 | WRITE ( 14 ) surf_usm_h%start_index |
---|
| 10144 | |
---|
| 10145 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
| 10146 | WRITE ( 14 ) surf_usm_h%end_index |
---|
| 10147 | |
---|
[3418] | 10148 | CALL wrd_write_string( 't_surf_wall_h' ) |
---|
| 10149 | WRITE ( 14 ) t_surf_wall_h |
---|
[2894] | 10150 | |
---|
| 10151 | CALL wrd_write_string( 't_surf_window_h' ) |
---|
| 10152 | WRITE ( 14 ) t_surf_window_h |
---|
| 10153 | |
---|
| 10154 | CALL wrd_write_string( 't_surf_green_h' ) |
---|
| 10155 | WRITE ( 14 ) t_surf_green_h |
---|
| 10156 | |
---|
[2737] | 10157 | DO l = 0, 3 |
---|
[2894] | 10158 | |
---|
| 10159 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
| 10160 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
| 10161 | |
---|
| 10162 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
| 10163 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
| 10164 | |
---|
[2737] | 10165 | WRITE( dum, '(I1)') l |
---|
[2894] | 10166 | |
---|
[3418] | 10167 | CALL wrd_write_string( 't_surf_wall_v(' // dum // ')' ) |
---|
| 10168 | WRITE ( 14 ) t_surf_wall_v(l)%t |
---|
[2894] | 10169 | |
---|
| 10170 | CALL wrd_write_string( 't_surf_window_v(' // dum // ')' ) |
---|
| 10171 | WRITE ( 14 ) t_surf_window_v(l)%t |
---|
| 10172 | |
---|
| 10173 | CALL wrd_write_string( 't_surf_green_v(' // dum // ')' ) |
---|
| 10174 | WRITE ( 14 ) t_surf_green_v(l)%t |
---|
| 10175 | |
---|
[2737] | 10176 | ENDDO |
---|
| 10177 | |
---|
[2894] | 10178 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
| 10179 | WRITE ( 14 ) surf_usm_h%start_index |
---|
| 10180 | |
---|
| 10181 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
| 10182 | WRITE ( 14 ) surf_usm_h%end_index |
---|
| 10183 | |
---|
| 10184 | CALL wrd_write_string( 't_wall_h' ) |
---|
| 10185 | WRITE ( 14 ) t_wall_h |
---|
| 10186 | |
---|
| 10187 | CALL wrd_write_string( 't_window_h' ) |
---|
| 10188 | WRITE ( 14 ) t_window_h |
---|
| 10189 | |
---|
| 10190 | CALL wrd_write_string( 't_green_h' ) |
---|
| 10191 | WRITE ( 14 ) t_green_h |
---|
| 10192 | |
---|
[2737] | 10193 | DO l = 0, 3 |
---|
[2894] | 10194 | |
---|
| 10195 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
| 10196 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
| 10197 | |
---|
| 10198 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
| 10199 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
| 10200 | |
---|
| 10201 | WRITE( dum, '(I1)') l |
---|
| 10202 | |
---|
| 10203 | CALL wrd_write_string( 't_wall_v(' // dum // ')' ) |
---|
| 10204 | WRITE ( 14 ) t_wall_v(l)%t |
---|
| 10205 | |
---|
| 10206 | CALL wrd_write_string( 't_window_v(' // dum // ')' ) |
---|
| 10207 | WRITE ( 14 ) t_window_v(l)%t |
---|
| 10208 | |
---|
| 10209 | CALL wrd_write_string( 't_green_v(' // dum // ')' ) |
---|
| 10210 | WRITE ( 14 ) t_green_v(l)%t |
---|
| 10211 | |
---|
[2737] | 10212 | ENDDO |
---|
| 10213 | |
---|
| 10214 | |
---|
[2894] | 10215 | END SUBROUTINE usm_wrd_local |
---|
[2737] | 10216 | |
---|
| 10217 | ! |
---|
| 10218 | !-- Integrated stability function for heat and moisture |
---|
| 10219 | FUNCTION psi_h( zeta ) |
---|
| 10220 | |
---|
| 10221 | USE kinds |
---|
| 10222 | |
---|
| 10223 | IMPLICIT NONE |
---|
| 10224 | |
---|
| 10225 | REAL(wp) :: psi_h !< Integrated similarity function result |
---|
| 10226 | REAL(wp) :: zeta !< Stability parameter z/L |
---|
| 10227 | REAL(wp) :: x !< dummy variable |
---|
| 10228 | |
---|
| 10229 | REAL(wp), PARAMETER :: a = 1.0_wp !< constant |
---|
| 10230 | REAL(wp), PARAMETER :: b = 0.66666666666_wp !< constant |
---|
| 10231 | REAL(wp), PARAMETER :: c = 5.0_wp !< constant |
---|
| 10232 | REAL(wp), PARAMETER :: d = 0.35_wp !< constant |
---|
| 10233 | REAL(wp), PARAMETER :: c_d_d = c / d !< constant |
---|
| 10234 | REAL(wp), PARAMETER :: bc_d_d = b * c / d !< constant |
---|
| 10235 | |
---|
| 10236 | |
---|
| 10237 | IF ( zeta < 0.0_wp ) THEN |
---|
| 10238 | x = SQRT( 1.0_wp - 16.0_wp * zeta ) |
---|
| 10239 | psi_h = 2.0_wp * LOG( (1.0_wp + x ) / 2.0_wp ) |
---|
| 10240 | ELSE |
---|
| 10241 | psi_h = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - (1.0_wp & |
---|
| 10242 | + 0.66666666666_wp * a * zeta )**1.5_wp - bc_d_d & |
---|
| 10243 | + 1.0_wp |
---|
| 10244 | ! |
---|
| 10245 | !-- Old version for stable conditions (only valid for z/L < 0.5) |
---|
| 10246 | !-- psi_h = - 5.0_wp * zeta |
---|
| 10247 | ENDIF |
---|
| 10248 | |
---|
| 10249 | END FUNCTION psi_h |
---|
| 10250 | |
---|
| 10251 | END MODULE urban_surface_mod |
---|