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-2019 Czech Technical University in Prague |
---|
18 | ! Copyright 2015-2019 Institute of Computer Science of the |
---|
19 | ! Czech Academy of Sciences, Prague |
---|
20 | ! Copyright 1997-2019 Leibniz Universitaet Hannover |
---|
21 | !------------------------------------------------------------------------------! |
---|
22 | ! |
---|
23 | ! Current revisions: |
---|
24 | ! ------------------ |
---|
25 | ! |
---|
26 | ! |
---|
27 | ! Former revisions: |
---|
28 | ! ----------------- |
---|
29 | ! $Id: urban_surface_mod.f90 3802 2019-03-17 13:33:42Z raasch $ |
---|
30 | ! unused subroutine commented out |
---|
31 | ! |
---|
32 | ! 3769 2019-02-28 10:16:49Z moh.hefny |
---|
33 | ! removed unused variables |
---|
34 | ! |
---|
35 | ! 3767 2019-02-27 08:18:02Z raasch |
---|
36 | ! unused variables removed from rrd-subroutines parameter list |
---|
37 | ! |
---|
38 | ! 3748 2019-02-18 10:38:31Z suehring |
---|
39 | ! Revise conversion of waste-heat flux (do not divide by air density, will |
---|
40 | ! be done in diffusion_s) |
---|
41 | ! |
---|
42 | ! 3745 2019-02-15 18:57:56Z suehring |
---|
43 | ! - Remove internal flag indoor_model (is a global control parameter) |
---|
44 | ! - add waste heat from buildings to the kinmatic heat flux |
---|
45 | ! - consider waste heat in restart data |
---|
46 | ! - remove unused USE statements |
---|
47 | ! |
---|
48 | ! 3744 2019-02-15 18:38:58Z suehring |
---|
49 | ! fixed surface heat capacity in the building parameters |
---|
50 | ! convert the file back to unix format |
---|
51 | ! |
---|
52 | ! 3730 2019-02-11 11:26:47Z moh.hefny |
---|
53 | ! Formatting and clean-up (rvtils) |
---|
54 | ! |
---|
55 | ! 3710 2019-01-30 18:11:19Z suehring |
---|
56 | ! Check if building type is set within a valid range. |
---|
57 | ! |
---|
58 | ! 3705 2019-01-29 19:56:39Z suehring |
---|
59 | ! make nzb_wall public, required for virtual-measurements |
---|
60 | ! |
---|
61 | ! 3704 2019-01-29 19:51:41Z suehring |
---|
62 | ! Some interface calls moved to module_interface + cleanup |
---|
63 | ! |
---|
64 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
65 | ! Implementation of the PALM module interface |
---|
66 | ! |
---|
67 | ! 3636 2018-12-19 13:48:34Z raasch |
---|
68 | ! nopointer option removed |
---|
69 | ! |
---|
70 | ! 3614 2018-12-10 07:05:46Z raasch |
---|
71 | ! unused variables removed |
---|
72 | ! |
---|
73 | ! 3607 2018-12-07 11:56:58Z suehring |
---|
74 | ! Output of radiation-related quantities migrated to radiation_model_mod. |
---|
75 | ! |
---|
76 | ! 3597 2018-12-04 08:40:18Z maronga |
---|
77 | ! Fixed calculation method of near surface air potential temperature at 10 cm |
---|
78 | ! and moved to surface_layer_fluxes. Removed unnecessary _eb strings. |
---|
79 | ! |
---|
80 | ! 3524 2018-11-14 13:36:44Z raasch |
---|
81 | ! bugfix concerning allocation of t_surf_wall_v |
---|
82 | ! |
---|
83 | ! 3502 2018-11-07 14:45:23Z suehring |
---|
84 | ! Disable initialization of building roofs with ground-floor-level properties, |
---|
85 | ! since this causes strong oscillations of surface temperature during the |
---|
86 | ! spinup. |
---|
87 | ! |
---|
88 | ! 3469 2018-10-30 20:05:07Z kanani |
---|
89 | ! Add missing PUBLIC variables for new indoor model |
---|
90 | ! |
---|
91 | ! 3449 2018-10-29 19:36:56Z suehring |
---|
92 | ! Bugfix: Fix average arrays allocations in usm_3d_data_averaging (J.Resler) |
---|
93 | ! Bugfix: Fix reading wall temperatures (J.Resler) |
---|
94 | ! Bugfix: Fix treating of outputs for wall temperature and sky view factors (J.Resler) |
---|
95 | ! |
---|
96 | ! |
---|
97 | ! 3435 2018-10-26 18:25:44Z gronemeier |
---|
98 | ! Bugfix: allocate gamma_w_green_sat until nzt_wall+1 |
---|
99 | ! |
---|
100 | ! 3418 2018-10-24 16:07:39Z kanani |
---|
101 | ! (rvtils, srissman) |
---|
102 | ! -Updated building databse, two green roof types (ind_green_type_roof) |
---|
103 | ! -Latent heat flux for green walls and roofs, new output of latent heatflux |
---|
104 | ! and soil water content of green roof substrate |
---|
105 | ! -t_surf changed to t_surf_wall |
---|
106 | ! -Added namelist parameter usm_wall_mod for lower wall tendency |
---|
107 | ! of first two wall layers during spinup |
---|
108 | ! -Window calculations deactivated during spinup |
---|
109 | ! |
---|
110 | ! 3382 2018-10-19 13:10:32Z knoop |
---|
111 | ! Bugix: made array declaration Fortran Standard conform |
---|
112 | ! |
---|
113 | ! 3378 2018-10-19 12:34:59Z kanani |
---|
114 | ! merge from radiation branch (r3362) into trunk |
---|
115 | ! (moh.hefny): |
---|
116 | ! - check the requested output variables if they are correct |
---|
117 | ! - added unscheduled_radiation_calls switch to control force_radiation_call |
---|
118 | ! - minor formate changes |
---|
119 | ! |
---|
120 | ! 3371 2018-10-18 13:40:12Z knoop |
---|
121 | ! Set flag indicating that albedo at urban surfaces is already initialized |
---|
122 | ! |
---|
123 | ! 3347 2018-10-15 14:21:08Z suehring |
---|
124 | ! Enable USM initialization with default building parameters in case no static |
---|
125 | ! input file exist. |
---|
126 | ! |
---|
127 | ! 3343 2018-10-15 10:38:52Z suehring |
---|
128 | ! Add output variables usm_rad_pc_inlw, usm_rad_pc_insw* |
---|
129 | ! |
---|
130 | ! 3274 2018-09-24 15:42:55Z knoop |
---|
131 | ! Modularization of all bulk cloud physics code components |
---|
132 | ! |
---|
133 | ! 3248 2018-09-14 09:42:06Z sward |
---|
134 | ! Minor formating changes |
---|
135 | ! |
---|
136 | ! 3246 2018-09-13 15:14:50Z sward |
---|
137 | ! Added error handling for input namelist via parin_fail_message |
---|
138 | ! |
---|
139 | ! 3241 2018-09-12 15:02:00Z raasch |
---|
140 | ! unused variables removed |
---|
141 | ! |
---|
142 | ! 3223 2018-08-30 13:48:17Z suehring |
---|
143 | ! Bugfix for commit 3222 |
---|
144 | ! |
---|
145 | ! 3222 2018-08-30 13:35:35Z suehring |
---|
146 | ! Introduction of surface array for type and its name |
---|
147 | ! |
---|
148 | ! 3203 2018-08-23 10:48:36Z suehring |
---|
149 | ! Revise bulk parameter for emissivity at ground-floor level |
---|
150 | ! |
---|
151 | ! 3196 2018-08-13 12:26:14Z maronga |
---|
152 | ! Added maximum aerodynamic resistance of 300 for horiztonal surfaces. |
---|
153 | ! |
---|
154 | ! 3176 2018-07-26 17:12:48Z suehring |
---|
155 | ! Bugfix, update virtual potential surface temparture, else heat fluxes on |
---|
156 | ! roofs might become unphysical |
---|
157 | ! |
---|
158 | ! 3152 2018-07-19 13:26:52Z suehring |
---|
159 | ! Initialize q_surface, which might be used in surface_layer_fluxes |
---|
160 | ! |
---|
161 | ! 3151 2018-07-19 08:45:38Z raasch |
---|
162 | ! remaining preprocessor define strings __check removed |
---|
163 | ! |
---|
164 | ! 3136 2018-07-16 14:48:21Z suehring |
---|
165 | ! Limit also roughness length for heat and moisture where necessary |
---|
166 | ! |
---|
167 | ! 3123 2018-07-12 16:21:53Z suehring |
---|
168 | ! Correct working precision for INTEGER number |
---|
169 | ! |
---|
170 | ! 3115 2018-07-10 12:49:26Z suehring |
---|
171 | ! Additional building type to represent bridges |
---|
172 | ! |
---|
173 | ! 3091 2018-06-28 16:20:35Z suehring |
---|
174 | ! - Limit aerodynamic resistance at vertical walls. |
---|
175 | ! - Add check for local roughness length not exceeding surface-layer height and |
---|
176 | ! limit roughness length where necessary. |
---|
177 | ! |
---|
178 | ! 3065 2018-06-12 07:03:02Z Giersch |
---|
179 | ! Unused array dxdir was removed, dz was replaced by dzu to consider vertical |
---|
180 | ! grid stretching |
---|
181 | ! |
---|
182 | ! 3049 2018-05-29 13:52:36Z Giersch |
---|
183 | ! Error messages revised |
---|
184 | ! |
---|
185 | ! 3045 2018-05-28 07:55:41Z Giersch |
---|
186 | ! Error message added |
---|
187 | ! |
---|
188 | ! 3029 2018-05-23 12:19:17Z raasch |
---|
189 | ! bugfix: close unit 151 instead of 90 |
---|
190 | ! |
---|
191 | ! 3014 2018-05-09 08:42:38Z maronga |
---|
192 | ! Added pc_transpiration_rate |
---|
193 | ! |
---|
194 | ! 2977 2018-04-17 10:27:57Z kanani |
---|
195 | ! Implement changes from branch radiation (r2948-2971) with minor modifications. |
---|
196 | ! (moh.hefny): |
---|
197 | ! Extended exn for all model domain height to avoid the need to get nzut. |
---|
198 | ! |
---|
199 | ! 2963 2018-04-12 14:47:44Z suehring |
---|
200 | ! Introduce index for vegetation/wall, pavement/green-wall and water/window |
---|
201 | ! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. . |
---|
202 | ! |
---|
203 | ! 2943 2018-04-03 16:17:10Z suehring |
---|
204 | ! Calculate exner function at all height levels and remove some un-used |
---|
205 | ! variables. |
---|
206 | ! |
---|
207 | ! 2932 2018-03-26 09:39:22Z maronga |
---|
208 | ! renamed urban_surface_par to urban_surface_parameters |
---|
209 | ! |
---|
210 | ! 2921 2018-03-22 15:05:23Z Giersch |
---|
211 | ! The activation of spinup has been moved to parin |
---|
212 | ! |
---|
213 | ! 2920 2018-03-22 11:22:01Z kanani |
---|
214 | ! Remove unused pcbl, npcbl from ONLY list |
---|
215 | ! moh.hefny: |
---|
216 | ! Fixed bugs introduced by new structures and by moving radiation interaction |
---|
217 | ! into radiation_model_mod.f90. |
---|
218 | ! Bugfix: usm data output 3D didn't respect directions |
---|
219 | ! |
---|
220 | ! 2906 2018-03-19 08:56:40Z Giersch |
---|
221 | ! Local variable ids has to be initialized with a value of -1 in |
---|
222 | ! usm_3d_data_averaging |
---|
223 | ! |
---|
224 | ! 2894 2018-03-15 09:17:58Z Giersch |
---|
225 | ! Calculations of the index range of the subdomain on file which overlaps with |
---|
226 | ! the current subdomain are already done in read_restart_data_mod, |
---|
227 | ! usm_read/write_restart_data have been renamed to usm_r/wrd_local, variable |
---|
228 | ! named found has been introduced for checking if restart data was found, |
---|
229 | ! reading of restart strings has been moved completely to |
---|
230 | ! read_restart_data_mod, usm_rrd_local is already inside the overlap loop |
---|
231 | ! programmed in read_restart_data_mod, SAVE attribute added where necessary, |
---|
232 | ! deallocation and allocation of some arrays have been changed to take care of |
---|
233 | ! different restart files that can be opened (index i), the marker *** end usm |
---|
234 | ! *** is not necessary anymore, strings and their respective lengths are |
---|
235 | ! written out and read now in case of restart runs to get rid of prescribed |
---|
236 | ! character lengths |
---|
237 | ! |
---|
238 | ! 2805 2018-02-14 17:00:09Z suehring |
---|
239 | ! Initialization of resistances. |
---|
240 | ! |
---|
241 | ! 2797 2018-02-08 13:24:35Z suehring |
---|
242 | ! Comment concerning output of ground-heat flux added. |
---|
243 | ! |
---|
244 | ! 2766 2018-01-22 17:17:47Z kanani |
---|
245 | ! Removed redundant commas, added some blanks |
---|
246 | ! |
---|
247 | ! 2765 2018-01-22 11:34:58Z maronga |
---|
248 | ! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in |
---|
249 | ! building_pars |
---|
250 | ! |
---|
251 | ! 2750 2018-01-15 16:26:51Z knoop |
---|
252 | ! Move flag plant canopy to modules |
---|
253 | ! |
---|
254 | ! 2737 2018-01-11 14:58:11Z kanani |
---|
255 | ! Removed unused variables t_surf_whole... |
---|
256 | ! |
---|
257 | ! 2735 2018-01-11 12:01:27Z suehring |
---|
258 | ! resistances are saved in surface attributes |
---|
259 | ! |
---|
260 | ! 2723 2018-01-05 09:27:03Z maronga |
---|
261 | ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) |
---|
262 | ! |
---|
263 | ! 2720 2018-01-02 16:27:15Z kanani |
---|
264 | ! Correction of comment |
---|
265 | ! |
---|
266 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
267 | ! Corrected "Former revisions" section |
---|
268 | ! |
---|
269 | ! 2705 2017-12-18 11:26:23Z maronga |
---|
270 | ! Changes from last commit documented |
---|
271 | ! |
---|
272 | ! 2703 2017-12-15 20:12:38Z maronga |
---|
273 | ! Workaround for calculation of r_a |
---|
274 | ! |
---|
275 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
276 | ! - Change in file header (GPL part) |
---|
277 | ! - Bugfix in calculation of pt_surface and related fluxes. (BM) |
---|
278 | ! - Do not write surface temperatures onto pt array as this might cause |
---|
279 | ! problems with nesting. (MS) |
---|
280 | ! - Revised calculation of pt1 (now done in surface_layer_fluxes). |
---|
281 | ! Bugfix, f_shf_window and f_shf_green were not set at vertical surface |
---|
282 | ! elements. (MS) |
---|
283 | ! - merged with branch ebsolver |
---|
284 | ! green building surfaces do not evaporate yet |
---|
285 | ! properties of green wall layers and window layers are taken from wall layers |
---|
286 | ! this input data is missing. (RvT) |
---|
287 | ! - Merged with branch radiation (developed by Mohamed Salim) |
---|
288 | ! - Revised initialization. (MS) |
---|
289 | ! - Rename emiss_surf into emissivity, roughness_wall into z0, albedo_surf into |
---|
290 | ! albedo. (MS) |
---|
291 | ! - Move first call of usm_radiatin from usm_init to init_3d_model |
---|
292 | ! - fixed problem with near surface temperature |
---|
293 | ! - added near surface temperature pt_10cm_h(m), pt_10cm_v(l)%t(m) |
---|
294 | ! - does not work with temp profile including stability, ol |
---|
295 | ! pt_10cm = pt1 now |
---|
296 | ! - merged with 2357 bugfix, error message for nopointer version |
---|
297 | ! - added indoor model coupling with wall heat flux |
---|
298 | ! - added green substrate/ dry vegetation layer for buildings |
---|
299 | ! - merged with 2232 new surface-type structure |
---|
300 | ! - added transmissivity of window tiles |
---|
301 | ! - added MOSAIK tile approach for 3 different surfaces (RvT) |
---|
302 | ! |
---|
303 | ! 2583 2017-10-26 13:58:38Z knoop |
---|
304 | ! Bugfix: reverted MPI_Win_allocate_cptr introduction in last commit |
---|
305 | ! |
---|
306 | ! 2582 2017-10-26 13:19:46Z hellstea |
---|
307 | ! Workaround for gnufortran compiler added in usm_calc_svf. CALL MPI_Win_allocate is |
---|
308 | ! replaced by CALL MPI_Win_allocate_cptr if defined ( __gnufortran ). |
---|
309 | ! |
---|
310 | ! 2544 2017-10-13 18:09:32Z maronga |
---|
311 | ! Date and time quantities are now read from date_and_time_mod. Solar constant is |
---|
312 | ! read from radiation_model_mod |
---|
313 | ! |
---|
314 | ! 2516 2017-10-04 11:03:04Z suehring |
---|
315 | ! Remove tabs |
---|
316 | ! |
---|
317 | ! 2514 2017-10-04 09:52:37Z suehring |
---|
318 | ! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny |
---|
319 | ! no output of ghost layer data |
---|
320 | ! |
---|
321 | ! 2350 2017-08-15 11:48:26Z kanani |
---|
322 | ! Bugfix and error message for nopointer version. |
---|
323 | ! Additional "! defined(__nopointer)" as workaround to enable compilation of |
---|
324 | ! nopointer version. |
---|
325 | ! |
---|
326 | ! 2318 2017-07-20 17:27:44Z suehring |
---|
327 | ! Get topography top index via Function call |
---|
328 | ! |
---|
329 | ! 2317 2017-07-20 17:27:19Z suehring |
---|
330 | ! Bugfix: adjust output of shf. Added support for spinups |
---|
331 | ! |
---|
332 | ! 2287 2017-06-15 16:46:30Z suehring |
---|
333 | ! Bugfix in determination topography-top index |
---|
334 | ! |
---|
335 | ! 2269 2017-06-09 11:57:32Z suehring |
---|
336 | ! Enable restart runs with different number of PEs |
---|
337 | ! Bugfixes nopointer branch |
---|
338 | ! |
---|
339 | ! 2258 2017-06-08 07:55:13Z suehring |
---|
340 | ! Bugfix, add pre-preprocessor directives to enable non-parrallel mode |
---|
341 | ! |
---|
342 | ! 2233 2017-05-30 18:08:54Z suehring |
---|
343 | ! |
---|
344 | ! 2232 2017-05-30 17:47:52Z suehring |
---|
345 | ! Adjustments according to new surface-type structure. Remove usm_wall_heat_flux; |
---|
346 | ! insteat, heat fluxes are directly applied in diffusion_s. |
---|
347 | ! |
---|
348 | ! 2213 2017-04-24 15:10:35Z kanani |
---|
349 | ! Removal of output quantities usm_lad and usm_canopy_hr |
---|
350 | ! |
---|
351 | ! 2209 2017-04-19 09:34:46Z kanani |
---|
352 | ! cpp switch __mpi3 removed, |
---|
353 | ! minor formatting, |
---|
354 | ! small bugfix for division by zero (Krc) |
---|
355 | ! |
---|
356 | ! 2113 2017-01-12 13:40:46Z kanani |
---|
357 | ! cpp switch __mpi3 added for MPI-3 standard code (Ketelsen) |
---|
358 | ! |
---|
359 | ! 2071 2016-11-17 11:22:14Z maronga |
---|
360 | ! Small bugfix (Resler) |
---|
361 | ! |
---|
362 | ! 2031 2016-10-21 15:11:58Z knoop |
---|
363 | ! renamed variable rho to rho_ocean |
---|
364 | ! |
---|
365 | ! 2024 2016-10-12 16:42:37Z kanani |
---|
366 | ! Bugfixes in deallocation of array plantt and reading of csf/csfsurf, |
---|
367 | ! optimization of MPI-RMA operations, |
---|
368 | ! declaration of pcbl as integer, |
---|
369 | ! renamed usm_radnet -> usm_rad_net, usm_canopy_khf -> usm_canopy_hr, |
---|
370 | ! splitted arrays svf -> svf & csf, svfsurf -> svfsurf & csfsurf, |
---|
371 | ! use of new control parameter varnamelength, |
---|
372 | ! added output variables usm_rad_ressw, usm_rad_reslw, |
---|
373 | ! minor formatting changes, |
---|
374 | ! minor optimizations. |
---|
375 | ! |
---|
376 | ! 2011 2016-09-19 17:29:57Z kanani |
---|
377 | ! Major reformatting according to PALM coding standard (comments, blanks, |
---|
378 | ! alphabetical ordering, etc.), |
---|
379 | ! removed debug_prints, |
---|
380 | ! removed auxiliary SUBROUTINE get_usm_info, instead, USM flag urban_surface is |
---|
381 | ! defined in MODULE control_parameters (modules.f90) to avoid circular |
---|
382 | ! dependencies, |
---|
383 | ! renamed canopy_heat_flux to pc_heating_rate, as meaning of quantity changed. |
---|
384 | ! |
---|
385 | ! 2007 2016-08-24 15:47:17Z kanani |
---|
386 | ! Initial revision |
---|
387 | ! |
---|
388 | ! |
---|
389 | ! Description: |
---|
390 | ! ------------ |
---|
391 | ! 2016/6/9 - Initial version of the USM (Urban Surface Model) |
---|
392 | ! authors: Jaroslav Resler, Pavel Krc |
---|
393 | ! (Czech Technical University in Prague and Institute of |
---|
394 | ! Computer Science of the Czech Academy of Sciences, Prague) |
---|
395 | ! with contributions: Michal Belda, Nina Benesova, Ondrej Vlcek |
---|
396 | ! partly inspired by PALM LSM (B. Maronga) |
---|
397 | ! parameterizations of Ra checked with TUF3D (E. S. Krayenhoff) |
---|
398 | !> Module for Urban Surface Model (USM) |
---|
399 | !> The module includes: |
---|
400 | !> 1. radiation model with direct/diffuse radiation, shading, reflections |
---|
401 | !> and integration with plant canopy |
---|
402 | !> 2. wall and wall surface model |
---|
403 | !> 3. surface layer energy balance |
---|
404 | !> 4. anthropogenic heat (only from transportation so far) |
---|
405 | !> 5. necessary auxiliary subroutines (reading inputs, writing outputs, |
---|
406 | !> restart simulations, ...) |
---|
407 | !> It also make use of standard radiation and integrates it into |
---|
408 | !> urban surface model. |
---|
409 | !> |
---|
410 | !> Further work: |
---|
411 | !> ------------- |
---|
412 | !> 1. Remove global arrays surfouts, surfoutl and only keep track of radiosity |
---|
413 | !> from surfaces that are visible from local surfaces (i.e. there is a SVF |
---|
414 | !> where target is local). To do that, radiosity will be exchanged after each |
---|
415 | !> reflection step using MPI_Alltoall instead of current MPI_Allgather. |
---|
416 | !> |
---|
417 | !> 2. Temporarily large values of surface heat flux can be observed, up to |
---|
418 | !> 1.2 Km/s, which seem to be not realistic. |
---|
419 | !> |
---|
420 | !> @todo Output of _av variables in case of restarts |
---|
421 | !> @todo Revise flux conversion in energy-balance solver |
---|
422 | !> @todo Check optimizations for RMA operations |
---|
423 | !> @todo Alternatives for MPI_WIN_ALLOCATE? (causes problems with openmpi) |
---|
424 | !> @todo Check for load imbalances in CPU measures, e.g. for exchange_horiz_prog |
---|
425 | !> factor 3 between min and max time |
---|
426 | !> @todo Check divisions in wtend (etc.) calculations for possible division |
---|
427 | !> by zero, e.g. in case fraq(0,m) + fraq(1,m) = 0?! |
---|
428 | !> @todo Use unit 90 for OPEN/CLOSE of input files (FK) |
---|
429 | !> @todo Move plant canopy stuff into plant canopy code |
---|
430 | !------------------------------------------------------------------------------! |
---|
431 | MODULE urban_surface_mod |
---|
432 | |
---|
433 | USE arrays_3d, & |
---|
434 | ONLY: hyp, zu, pt, p, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
435 | |
---|
436 | USE calc_mean_profile_mod, & |
---|
437 | ONLY: calc_mean_profile |
---|
438 | |
---|
439 | USE basic_constants_and_equations_mod, & |
---|
440 | ONLY: c_p, g, kappa, pi, r_d, rho_l, l_v |
---|
441 | |
---|
442 | USE control_parameters, & |
---|
443 | ONLY: coupling_start_time, topography, dt_3d, humidity, indoor_model, & |
---|
444 | intermediate_timestep_count, initializing_actions, & |
---|
445 | intermediate_timestep_count_max, simulated_time, end_time, & |
---|
446 | timestep_scheme, tsc, coupling_char, io_blocks, io_group, & |
---|
447 | message_string, time_since_reference_point, surface_pressure, & |
---|
448 | pt_surface, large_scale_forcing, lsf_surf, spinup, & |
---|
449 | spinup_pt_mean, spinup_time, time_do3d, dt_do3d, & |
---|
450 | average_count_3d, varnamelength, urban_surface, dz |
---|
451 | |
---|
452 | USE bulk_cloud_model_mod, & |
---|
453 | ONLY: bulk_cloud_model, precipitation |
---|
454 | |
---|
455 | USE cpulog, & |
---|
456 | ONLY: cpu_log, log_point, log_point_s |
---|
457 | |
---|
458 | USE date_and_time_mod, & |
---|
459 | ONLY: time_utc_init |
---|
460 | |
---|
461 | USE grid_variables, & |
---|
462 | ONLY: dx, dy, ddx, ddy, ddx2, ddy2 |
---|
463 | |
---|
464 | USE indices, & |
---|
465 | ONLY: nx, ny, nnx, nny, nnz, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, & |
---|
466 | nysg, nzb, nzt, nbgp, wall_flags_0 |
---|
467 | |
---|
468 | USE, INTRINSIC :: iso_c_binding |
---|
469 | |
---|
470 | USE kinds |
---|
471 | |
---|
472 | USE pegrid |
---|
473 | |
---|
474 | USE radiation_model_mod, & |
---|
475 | ONLY: albedo_type, radiation_interaction, calc_zenith, zenith, & |
---|
476 | radiation, rad_sw_in, rad_lw_in, rad_sw_out, rad_lw_out, & |
---|
477 | sigma_sb, sun_direction, sun_dir_lat, sun_dir_lon, & |
---|
478 | force_radiation_call, iup_u, inorth_u, isouth_u, ieast_u, & |
---|
479 | iwest_u, iup_l, inorth_l, isouth_l, ieast_l, iwest_l, id, & |
---|
480 | iz, iy, ix, nsurf, idsvf, ndsvf, & |
---|
481 | idcsf, ndcsf, kdcsf, pct, & |
---|
482 | nzub, nzut, unscheduled_radiation_calls |
---|
483 | |
---|
484 | USE statistics, & |
---|
485 | ONLY: hom, statistic_regions |
---|
486 | |
---|
487 | USE surface_mod, & |
---|
488 | ONLY: get_topography_top_index_ji, get_topography_top_index, & |
---|
489 | ind_pav_green, ind_veg_wall, ind_wat_win, surf_usm_h, & |
---|
490 | surf_usm_v, surface_restore_elements |
---|
491 | |
---|
492 | |
---|
493 | IMPLICIT NONE |
---|
494 | |
---|
495 | ! |
---|
496 | !-- USM model constants |
---|
497 | |
---|
498 | REAL(wp), PARAMETER :: & |
---|
499 | b_ch = 6.04_wp, & !< Clapp & Hornberger exponent |
---|
500 | lambda_h_green_dry = 0.19_wp, & !< heat conductivity for dry soil |
---|
501 | lambda_h_green_sm = 3.44_wp, & !< heat conductivity of the soil matrix |
---|
502 | lambda_h_water = 0.57_wp, & !< heat conductivity of water |
---|
503 | psi_sat = -0.388_wp, & !< soil matrix potential at saturation |
---|
504 | rho_c_soil = 2.19E6_wp, & !< volumetric heat capacity of soil |
---|
505 | rho_c_water = 4.20E6_wp !< volumetric heat capacity of water |
---|
506 | ! m_max_depth = 0.0002_wp ! Maximum capacity of the water reservoir (m) |
---|
507 | |
---|
508 | ! |
---|
509 | !-- Soil parameters I alpha_vg, l_vg_green, n_vg, gamma_w_green_sat |
---|
510 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: soil_pars = RESHAPE( (/ & |
---|
511 | 3.83_wp, 1.250_wp, 1.38_wp, 6.94E-6_wp, & !< soil 1 |
---|
512 | 3.14_wp, -2.342_wp, 1.28_wp, 1.16E-6_wp, & !< soil 2 |
---|
513 | 0.83_wp, -0.588_wp, 1.25_wp, 0.26E-6_wp, & !< soil 3 |
---|
514 | 3.67_wp, -1.977_wp, 1.10_wp, 2.87E-6_wp, & !< soil 4 |
---|
515 | 2.65_wp, 2.500_wp, 1.10_wp, 1.74E-6_wp, & !< soil 5 |
---|
516 | 1.30_wp, 0.400_wp, 1.20_wp, 0.93E-6_wp, & !< soil 6 |
---|
517 | 0.00_wp, 0.00_wp, 0.00_wp, 0.57E-6_wp & !< soil 7 |
---|
518 | /), (/ 4, 7 /) ) |
---|
519 | |
---|
520 | ! |
---|
521 | !-- Soil parameters II swc_sat, fc, wilt, swc_res |
---|
522 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: m_soil_pars = RESHAPE( (/ & |
---|
523 | 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp, & !< soil 1 |
---|
524 | 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp, & !< soil 2 |
---|
525 | 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp, & !< soil 3 |
---|
526 | 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp, & !< soil 4 |
---|
527 | 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp, & !< soil 5 |
---|
528 | 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp, & !< soil 6 |
---|
529 | 0.472_wp, 0.323_wp, 0.171_wp, 0.000_wp & !< soil 7 |
---|
530 | /), (/ 4, 7 /) ) |
---|
531 | ! |
---|
532 | !-- value 9999999.9_wp -> generic available or user-defined value must be set |
---|
533 | !-- otherwise -> no generic variable and user setting is optional |
---|
534 | REAL(wp) :: alpha_vangenuchten = 9999999.9_wp, & !< NAMELIST alpha_vg |
---|
535 | field_capacity = 9999999.9_wp, & !< NAMELIST fc |
---|
536 | hydraulic_conductivity = 9999999.9_wp, & !< NAMELIST gamma_w_green_sat |
---|
537 | l_vangenuchten = 9999999.9_wp, & !< NAMELIST l_vg |
---|
538 | n_vangenuchten = 9999999.9_wp, & !< NAMELIST n_vg |
---|
539 | residual_moisture = 9999999.9_wp, & !< NAMELIST m_res |
---|
540 | saturation_moisture = 9999999.9_wp, & !< NAMELIST m_sat |
---|
541 | wilting_point = 9999999.9_wp !< NAMELIST m_wilt |
---|
542 | |
---|
543 | ! |
---|
544 | !-- configuration parameters (they can be setup in PALM config) |
---|
545 | LOGICAL :: usm_material_model = .TRUE. !< flag parameter indicating wheather the model of heat in materials is used |
---|
546 | LOGICAL :: usm_anthropogenic_heat = .FALSE. !< flag parameter indicating wheather the anthropogenic heat sources |
---|
547 | !< (e.g.transportation) are used |
---|
548 | LOGICAL :: force_radiation_call_l = .FALSE. !< flag parameter for unscheduled radiation model calls |
---|
549 | LOGICAL :: read_wall_temp_3d = .FALSE. |
---|
550 | LOGICAL :: usm_wall_mod = .FALSE. !< reduces conductivity of the first 2 wall layers by factor 0.1 |
---|
551 | |
---|
552 | |
---|
553 | INTEGER(iwp) :: building_type = 1 !< default building type (preleminary setting) |
---|
554 | INTEGER(iwp) :: land_category = 2 !< default category for land surface |
---|
555 | INTEGER(iwp) :: wall_category = 2 !< default category for wall surface over pedestrian zone |
---|
556 | INTEGER(iwp) :: pedestrian_category = 2 !< default category for wall surface in pedestrian zone |
---|
557 | INTEGER(iwp) :: roof_category = 2 !< default category for root surface |
---|
558 | REAL(wp) :: roughness_concrete = 0.001_wp !< roughness length of average concrete surface |
---|
559 | ! |
---|
560 | !-- Indices of input attributes for (above) ground floor level |
---|
561 | INTEGER(iwp) :: ind_alb_wall_agfl = 65 !< index in input list for albedo_type of wall above ground floor level |
---|
562 | INTEGER(iwp) :: ind_alb_wall_gfl = 32 !< index in input list for albedo_type of wall ground floor level |
---|
563 | INTEGER(iwp) :: ind_alb_wall_r = 96 !< index in input list for albedo_type of wall roof |
---|
564 | INTEGER(iwp) :: ind_alb_green_agfl = 83 !< index in input list for albedo_type of green above ground floor level |
---|
565 | INTEGER(iwp) :: ind_alb_green_gfl = 50 !< index in input list for albedo_type of green ground floor level |
---|
566 | INTEGER(iwp) :: ind_alb_green_r = 115 !< index in input list for albedo_type of green roof |
---|
567 | INTEGER(iwp) :: ind_alb_win_agfl = 79 !< index in input list for albedo_type of window fraction |
---|
568 | !< above ground floor level |
---|
569 | INTEGER(iwp) :: ind_alb_win_gfl = 46 !< index in input list for albedo_type of window fraction ground floor level |
---|
570 | INTEGER(iwp) :: ind_alb_win_r = 110 !< index in input list for albedo_type of window fraction roof |
---|
571 | INTEGER(iwp) :: ind_emis_wall_agfl = 64 !< index in input list for wall emissivity, above ground floor level |
---|
572 | INTEGER(iwp) :: ind_emis_wall_gfl = 31 !< index in input list for wall emissivity, ground floor level |
---|
573 | INTEGER(iwp) :: ind_emis_wall_r = 95 !< index in input list for wall emissivity, roof |
---|
574 | INTEGER(iwp) :: ind_emis_green_agfl = 82 !< index in input list for green emissivity, above ground floor level |
---|
575 | INTEGER(iwp) :: ind_emis_green_gfl = 49 !< index in input list for green emissivity, ground floor level |
---|
576 | INTEGER(iwp) :: ind_emis_green_r = 114 !< index in input list for green emissivity, roof |
---|
577 | INTEGER(iwp) :: ind_emis_win_agfl = 77 !< index in input list for window emissivity, above ground floor level |
---|
578 | INTEGER(iwp) :: ind_emis_win_gfl = 44 !< index in input list for window emissivity, ground floor level |
---|
579 | INTEGER(iwp) :: ind_emis_win_r = 108 !< index in input list for window emissivity, roof |
---|
580 | INTEGER(iwp) :: ind_green_frac_w_agfl = 80 !< index in input list for green fraction on wall, above ground floor level |
---|
581 | INTEGER(iwp) :: ind_green_frac_w_gfl = 47 !< index in input list for green fraction on wall, ground floor level |
---|
582 | INTEGER(iwp) :: ind_green_frac_r_agfl = 112 !< index in input list for green fraction on roof, above ground floor level |
---|
583 | INTEGER(iwp) :: ind_green_frac_r_gfl = 111 !< index in input list for green fraction on roof, ground floor level |
---|
584 | INTEGER(iwp) :: ind_hc1_agfl = 58 !< index in input list for heat capacity at first wall layer, |
---|
585 | !< above ground floor level |
---|
586 | INTEGER(iwp) :: ind_hc1_gfl = 25 !< index in input list for heat capacity at first wall layer, ground floor level |
---|
587 | INTEGER(iwp) :: ind_hc1_wall_r = 89 !< index in input list for heat capacity at first wall layer, roof |
---|
588 | INTEGER(iwp) :: ind_hc1_win_agfl = 71 !< index in input list for heat capacity at first window layer, |
---|
589 | !< above ground floor level |
---|
590 | INTEGER(iwp) :: ind_hc1_win_gfl = 38 !< index in input list for heat capacity at first window layer, |
---|
591 | !< ground floor level |
---|
592 | INTEGER(iwp) :: ind_hc1_win_r = 102 !< index in input list for heat capacity at first window layer, roof |
---|
593 | INTEGER(iwp) :: ind_hc2_agfl = 59 !< index in input list for heat capacity at second wall layer, |
---|
594 | !< above ground floor level |
---|
595 | INTEGER(iwp) :: ind_hc2_gfl = 26 !< index in input list for heat capacity at second wall layer, ground floor level |
---|
596 | INTEGER(iwp) :: ind_hc2_wall_r = 90 !< index in input list for heat capacity at second wall layer, roof |
---|
597 | INTEGER(iwp) :: ind_hc2_win_agfl = 72 !< index in input list for heat capacity at second window layer, |
---|
598 | !< above ground floor level |
---|
599 | INTEGER(iwp) :: ind_hc2_win_gfl = 39 !< index in input list for heat capacity at second window layer, |
---|
600 | !< ground floor level |
---|
601 | INTEGER(iwp) :: ind_hc2_win_r = 103 !< index in input list for heat capacity at second window layer, roof |
---|
602 | INTEGER(iwp) :: ind_hc3_agfl = 60 !< index in input list for heat capacity at third wall layer, |
---|
603 | !< above ground floor level |
---|
604 | INTEGER(iwp) :: ind_hc3_gfl = 27 !< index in input list for heat capacity at third wall layer, ground floor level |
---|
605 | INTEGER(iwp) :: ind_hc3_wall_r = 91 !< index in input list for heat capacity at third wall layer, roof |
---|
606 | INTEGER(iwp) :: ind_hc3_win_agfl = 73 !< index in input list for heat capacity at third window layer, |
---|
607 | !< above ground floor level |
---|
608 | INTEGER(iwp) :: ind_hc3_win_gfl = 40 !< index in input list for heat capacity at third window layer, |
---|
609 | !< ground floor level |
---|
610 | INTEGER(iwp) :: ind_hc3_win_r = 104 !< index in input list for heat capacity at third window layer, roof |
---|
611 | INTEGER(iwp) :: ind_gflh = 17 !< index in input list for ground floor level height |
---|
612 | INTEGER(iwp) :: ind_lai_r_agfl = 113 !< index in input list for LAI on roof, above ground floor level |
---|
613 | INTEGER(iwp) :: ind_lai_r_gfl = 113 !< index in input list for LAI on roof, ground floor level |
---|
614 | INTEGER(iwp) :: ind_lai_w_agfl = 81 !< index in input list for LAI on wall, above ground floor level |
---|
615 | INTEGER(iwp) :: ind_lai_w_gfl = 48 !< index in input list for LAI on wall, ground floor level |
---|
616 | INTEGER(iwp) :: ind_tc1_agfl = 61 !< index in input list for thermal conductivity at first wall layer, |
---|
617 | !< above ground floor level |
---|
618 | INTEGER(iwp) :: ind_tc1_gfl = 28 !< index in input list for thermal conductivity at first wall layer, |
---|
619 | !< ground floor level |
---|
620 | INTEGER(iwp) :: ind_tc1_wall_r = 92 !< index in input list for thermal conductivity at first wall layer, roof |
---|
621 | INTEGER(iwp) :: ind_tc1_win_agfl = 74 !< index in input list for thermal conductivity at first window layer, |
---|
622 | !< above ground floor level |
---|
623 | INTEGER(iwp) :: ind_tc1_win_gfl = 41 !< index in input list for thermal conductivity at first window layer, |
---|
624 | !< ground floor level |
---|
625 | INTEGER(iwp) :: ind_tc1_win_r = 105 !< index in input list for thermal conductivity at first window layer, roof |
---|
626 | INTEGER(iwp) :: ind_tc2_agfl = 62 !< index in input list for thermal conductivity at second wall layer, |
---|
627 | !< above ground floor level |
---|
628 | INTEGER(iwp) :: ind_tc2_gfl = 29 !< index in input list for thermal conductivity at second wall layer, |
---|
629 | !< ground floor level |
---|
630 | INTEGER(iwp) :: ind_tc2_wall_r = 93 !< index in input list for thermal conductivity at second wall layer, roof |
---|
631 | INTEGER(iwp) :: ind_tc2_win_agfl = 75 !< index in input list for thermal conductivity at second window layer, |
---|
632 | !< above ground floor level |
---|
633 | INTEGER(iwp) :: ind_tc2_win_gfl = 42 !< index in input list for thermal conductivity at second window layer, |
---|
634 | !< ground floor level |
---|
635 | INTEGER(iwp) :: ind_tc2_win_r = 106 !< index in input list for thermal conductivity at second window layer, |
---|
636 | !< ground floor level |
---|
637 | INTEGER(iwp) :: ind_tc3_agfl = 63 !< index in input list for thermal conductivity at third wall layer, |
---|
638 | !< above ground floor level |
---|
639 | INTEGER(iwp) :: ind_tc3_gfl = 30 !< index in input list for thermal conductivity at third wall layer, |
---|
640 | !< ground floor level |
---|
641 | INTEGER(iwp) :: ind_tc3_wall_r = 94 !< index in input list for thermal conductivity at third wall layer, roof |
---|
642 | INTEGER(iwp) :: ind_tc3_win_agfl = 76 !< index in input list for thermal conductivity at third window layer, |
---|
643 | !< above ground floor level |
---|
644 | INTEGER(iwp) :: ind_tc3_win_gfl = 43 !< index in input list for thermal conductivity at third window layer, |
---|
645 | !< ground floor level |
---|
646 | INTEGER(iwp) :: ind_tc3_win_r = 107 !< index in input list for thermal conductivity at third window layer, roof |
---|
647 | INTEGER(iwp) :: ind_thick_1_agfl = 54 !< index for wall layer thickness - 1st layer above ground floor level |
---|
648 | INTEGER(iwp) :: ind_thick_1_gfl = 21 !< index for wall layer thickness - 1st layer ground floor level |
---|
649 | INTEGER(iwp) :: ind_thick_1_wall_r = 85 !< index for wall layer thickness - 1st layer roof |
---|
650 | INTEGER(iwp) :: ind_thick_1_win_agfl = 67 !< index for window layer thickness - 1st layer above ground floor level |
---|
651 | INTEGER(iwp) :: ind_thick_1_win_gfl = 34 !< index for window layer thickness - 1st layer ground floor level |
---|
652 | INTEGER(iwp) :: ind_thick_1_win_r = 98 !< index for window layer thickness - 1st layer roof |
---|
653 | INTEGER(iwp) :: ind_thick_2_agfl = 55 !< index for wall layer thickness - 2nd layer above ground floor level |
---|
654 | INTEGER(iwp) :: ind_thick_2_gfl = 22 !< index for wall layer thickness - 2nd layer ground floor level |
---|
655 | INTEGER(iwp) :: ind_thick_2_wall_r = 86 !< index for wall layer thickness - 2nd layer roof |
---|
656 | INTEGER(iwp) :: ind_thick_2_win_agfl = 68 !< index for window layer thickness - 2nd layer above ground floor level |
---|
657 | INTEGER(iwp) :: ind_thick_2_win_gfl = 35 !< index for window layer thickness - 2nd layer ground floor level |
---|
658 | INTEGER(iwp) :: ind_thick_2_win_r = 99 !< index for window layer thickness - 2nd layer roof |
---|
659 | INTEGER(iwp) :: ind_thick_3_agfl = 56 !< index for wall layer thickness - 3rd layer above ground floor level |
---|
660 | INTEGER(iwp) :: ind_thick_3_gfl = 23 !< index for wall layer thickness - 3rd layer ground floor level |
---|
661 | INTEGER(iwp) :: ind_thick_3_wall_r = 87 !< index for wall layer thickness - 3rd layer roof |
---|
662 | INTEGER(iwp) :: ind_thick_3_win_agfl = 69 !< index for window layer thickness - 3rd layer above ground floor level |
---|
663 | INTEGER(iwp) :: ind_thick_3_win_gfl = 36 !< index for window layer thickness - 3rd layer ground floor level |
---|
664 | INTEGER(iwp) :: ind_thick_3_win_r = 100 !< index for window layer thickness - 3rd layer roof |
---|
665 | INTEGER(iwp) :: ind_thick_4_agfl = 57 !< index for wall layer thickness - 4th layer above ground floor level |
---|
666 | INTEGER(iwp) :: ind_thick_4_gfl = 24 !< index for wall layer thickness - 4th layer ground floor level |
---|
667 | INTEGER(iwp) :: ind_thick_4_wall_r = 88 !< index for wall layer thickness - 4st layer roof |
---|
668 | INTEGER(iwp) :: ind_thick_4_win_agfl = 70 !< index for window layer thickness - 4th layer above ground floor level |
---|
669 | INTEGER(iwp) :: ind_thick_4_win_gfl = 37 !< index for window layer thickness - 4th layer ground floor level |
---|
670 | INTEGER(iwp) :: ind_thick_4_win_r = 101 !< index for window layer thickness - 4th layer roof |
---|
671 | INTEGER(iwp) :: ind_trans_agfl = 78 !< index in input list for window transmissivity, above ground floor level |
---|
672 | INTEGER(iwp) :: ind_trans_gfl = 45 !< index in input list for window transmissivity, ground floor level |
---|
673 | INTEGER(iwp) :: ind_trans_r = 109 !< index in input list for window transmissivity, roof |
---|
674 | INTEGER(iwp) :: ind_wall_frac_agfl = 53 !< index in input list for wall fraction, above ground floor level |
---|
675 | INTEGER(iwp) :: ind_wall_frac_gfl = 20 !< index in input list for wall fraction, ground floor level |
---|
676 | INTEGER(iwp) :: ind_wall_frac_r = 84 !< index in input list for wall fraction, roof |
---|
677 | INTEGER(iwp) :: ind_win_frac_agfl = 66 !< index in input list for window fraction, above ground floor level |
---|
678 | INTEGER(iwp) :: ind_win_frac_gfl = 33 !< index in input list for window fraction, ground floor level |
---|
679 | INTEGER(iwp) :: ind_win_frac_r = 97 !< index in input list for window fraction, roof |
---|
680 | INTEGER(iwp) :: ind_z0_agfl = 51 !< index in input list for z0, above ground floor level |
---|
681 | INTEGER(iwp) :: ind_z0_gfl = 18 !< index in input list for z0, ground floor level |
---|
682 | INTEGER(iwp) :: ind_z0qh_agfl = 52 !< index in input list for z0h / z0q, above ground floor level |
---|
683 | INTEGER(iwp) :: ind_z0qh_gfl = 19 !< index in input list for z0h / z0q, ground floor level |
---|
684 | INTEGER(iwp) :: ind_green_type_roof = 116 !< index in input list for type of green roof |
---|
685 | |
---|
686 | |
---|
687 | REAL(wp) :: roof_height_limit = 4.0_wp !< height for distinguish between land surfaces and roofs |
---|
688 | REAL(wp) :: ground_floor_level = 4.0_wp !< default ground floor level |
---|
689 | |
---|
690 | |
---|
691 | CHARACTER(37), DIMENSION(0:7), PARAMETER :: building_type_name = (/ & |
---|
692 | 'user-defined ', & !< type 0 |
---|
693 | 'residential - 1950 ', & !< type 1 |
---|
694 | 'residential 1951 - 2000 ', & !< type 2 |
---|
695 | 'residential 2001 - ', & !< type 3 |
---|
696 | 'office - 1950 ', & !< type 4 |
---|
697 | 'office 1951 - 2000 ', & !< type 5 |
---|
698 | 'office 2001 - ', & !< type 6 |
---|
699 | 'bridges ' & !< type 7 |
---|
700 | /) |
---|
701 | ! |
---|
702 | !-- building parameters, 6 different types |
---|
703 | !-- Parameter for urban surface model |
---|
704 | !-- 0 - heat capacity wall surface, 1 - heat capacity of window surface, 2 - heat capacity of green surface |
---|
705 | !-- 3 - thermal conductivity of wall surface, 4 - thermal conductivity of window surface, |
---|
706 | !-- 5 - thermal conductivty of green surface, 6 - wall fraction ground plate, |
---|
707 | !-- 7 - 1st wall layer thickness ground plate, 8 - 2nd wall layer thickness ground plate |
---|
708 | !-- 9 - 3rd wall layer thickness ground plate, 10 - 4th wall layer thickness ground plate, |
---|
709 | !-- 11 - heat capacity 1st/2nd wall layer ground plate, 12 - heat capacity 3rd wall layer ground plate |
---|
710 | !-- 13 - heat capacity 4th wall layer ground plate, 14 - thermal conductivity 1st/2nd wall layer ground plate, |
---|
711 | !-- 15 - thermal conductivity 3rd wall layer ground plate, 16 - thermal conductivity 4th wall layer ground plate |
---|
712 | !-- 17 - ground floor level height, 18 - z0 roughness ground floor level, 19 - z0h/z0g roughness heaat/humidity, |
---|
713 | !-- 20 - wall fraction ground floor level, 21 - 1st wall layer thickness ground floor level, |
---|
714 | !-- 22 - 2nd wall layer thickness ground floor level, 23 - 3rd wall layer thickness ground floor level, |
---|
715 | !-- 24 - 4th wall layer thickness ground floor level, 25 - heat capacity 1st/2nd wall layer ground floor level, |
---|
716 | !-- 26 - heat capacity 3rd wall layer ground floor level, 27 - heat capacity 4th wall layer ground floor level, |
---|
717 | !-- 28 - thermal conductivity 1st/2nd wall layer ground floor level, |
---|
718 | !-- 29 - thermal conductivity 3rd wall layer ground floor level, 30 - thermal conductivity 4th wall layer ground floor level |
---|
719 | !-- 31 - wall emissivity ground floor level, 32 - wall albedo ground floor level, 33 - window fraction ground floor level, |
---|
720 | !-- 34 - 1st window layer thickness ground floor level, 35 - 2nd window layer thickness ground floor level, |
---|
721 | !-- 36 - 3rd window layer thickness ground floor level, 37 - 4th window layer thickness ground floor level, |
---|
722 | !-- 38 - heat capacity 1st/2nd window layer ground floor level, 39 - heat capacity 3rd window layer ground floor level, |
---|
723 | !-- 40 - heat capacity 4th window layer ground floor level, |
---|
724 | !-- 41 - thermal conductivity 1st/2nd window layer ground floor level, |
---|
725 | !-- 42 - thermal conductivity 3rd window layer ground floor level, |
---|
726 | !-- 43 - thermal conductivity 4th window layer ground floor level, 44 - window emissivity ground floor level, |
---|
727 | !-- 45 - window transmissivity ground floor level, 46 - window albedo ground floor level, |
---|
728 | !-- 47 - green fraction ground floor level, 48 - LAI on wall ground floor level, 49 - green emissivity ground floor level, |
---|
729 | !-- 50 - green albedo ground floor level, 51 - z0 roughness above ground floor level, |
---|
730 | !-- 52 - z0h/z0g roughness heat/humidity above ground floor level, 53 - wall fraction above ground floor level |
---|
731 | !-- 54 - 1st wall layer thickness above ground floor level, 55 - 2nd wall layer thickness above ground floor level |
---|
732 | !-- 56 - 3rd wall layer thickness above ground floor level, 57 - 4th wall layer thickness above ground floor level |
---|
733 | !-- 58 - heat capacity 1st/2nd wall layer above ground floor level, |
---|
734 | !-- 59 - heat capacity 3rd wall layer above ground floor level, |
---|
735 | !-- 60 - heat capacity 4th wall layer above ground floor level, |
---|
736 | !-- 61 - thermal conductivity 1st/2nd wall layer above ground floor level, |
---|
737 | !-- 62 - thermal conductivity 3rd wall layer above ground floor level, |
---|
738 | !-- 63 - thermal conductivity 4th wall layer above ground floor level, |
---|
739 | !-- 64 - wall emissivity above ground floor level, 65 - wall albedo above ground floor level, |
---|
740 | !-- 66 - window fraction above ground floor level, 67 - 1st window layer thickness above ground floor level, |
---|
741 | !-- 68 - 2nd thickness window layer above ground floor level, 69 - 3rd window layer thickness above ground floor level, |
---|
742 | !-- 70 - 4th window layer thickness above ground floor level, |
---|
743 | !-- 71 - heat capacity 1st/2nd window layer above ground floor level, |
---|
744 | !-- 72 - heat capacity 3rd window layer above ground floor level, |
---|
745 | !-- 73 - heat capacity 4th window layer above ground floor level, |
---|
746 | !-- 74 - conductivity 1st/2nd window layer above ground floor level, |
---|
747 | !-- 75 - thermal conductivity 3rd window layer above ground floor level, |
---|
748 | !-- 76 - thermal conductivity 4th window layer above ground floor level, 77 - window emissivity above ground floor level, |
---|
749 | !-- 78 - window transmissivity above ground floor level, 79 - window albedo above ground floor level, |
---|
750 | !-- 80 - green fraction above ground floor level, 81 - LAI on wall above ground floor level, |
---|
751 | !-- 82 - green emissivity above ground floor level, 83 - green albedo above ground floor level, |
---|
752 | !-- 84 - wall fraction roof, 85 - 1st wall layer thickness roof, 86 - 2nd wall layer thickness roof, |
---|
753 | !-- 87 - 3rd wall layer thickness roof, 88 - 4th wall layer thickness roof, |
---|
754 | !-- 89 - heat capacity 1st/2nd wall layer roof, 90 - heat capacity 3rd wall layer roof, |
---|
755 | !-- 91 - heat capacity 4th wall layer roof, 92 - thermal conductivity 1st/2nd wall layer roof, |
---|
756 | !-- 93 - thermal conductivity 3rd wall layer roof, 94 - thermal conductivity 4th wall layer roof, |
---|
757 | !-- 95 - wall emissivity roof, 96 - wall albedo roof, 97 - window fraction roof, |
---|
758 | !-- 98 - window 1st layer thickness roof, 99 - window 2nd layer thickness roof, 100 - window 3rd layer thickness roof, |
---|
759 | !-- 101 - window 4th layer thickness, 102 - heat capacity 1st/2nd window layer roof, |
---|
760 | !-- 103 - heat capacity 3rd window layer roof, 104 - heat capacity 4th window layer roof, |
---|
761 | !-- 105 - thermal conductivity 1st/2nd window layer roof, 106 - thermal conductivity 3rd window layer roof, |
---|
762 | !-- 107 - thermal conductivity 4th window layer roof, 108 - window emissivity roof, 109 - window transmissivity roof, |
---|
763 | !-- 110 - window albedo roof, 111 - green fraction roof ground floor level, |
---|
764 | !-- 112 - green fraction roof above ground floor level, 113 - LAI roof, 114 - green emissivity roof, |
---|
765 | !-- 115 - green albedo roof, 116 - green type roof, |
---|
766 | !-- Parameter for indoor model |
---|
767 | !-- 117 - indoor target summer temperature, 118 - indoor target winter temperature, |
---|
768 | !-- 119 - shading factor, 120 - g-value windows, 121 - u-value windows, 122 - basical airflow without occupancy of the room, |
---|
769 | !-- 123 - additional airflow depend of occupancy of the room, 124 - heat recovery efficiency, |
---|
770 | !-- 125 - dynamic parameter specific effective surface, 126 - dynamic parameter innner heatstorage, |
---|
771 | !-- 127 - ratio internal surface/floor area, 128 - maximal heating capacity, 129 - maximal cooling capacity, |
---|
772 | !-- 130 - additional internal heat gains dependent on occupancy of the room, |
---|
773 | !-- 131 - basic internal heat gains without occupancy of the room, 132 - storey height, 133 - ceiling construction height |
---|
774 | |
---|
775 | |
---|
776 | REAL(wp), DIMENSION(0:133,1:7), PARAMETER :: building_pars = RESHAPE( (/ & |
---|
777 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
778 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
779 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
780 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
781 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
782 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
783 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
784 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
785 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
786 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
787 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
788 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
789 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
790 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
791 | 2.1_wp, 0.93_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
792 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
793 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
794 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
795 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
796 | 0.005_wp, 0.01_wp, 0.31_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
797 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
798 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
799 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
800 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
801 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
802 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
803 | 0.1_wp, 0.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
804 | 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 |
---|
805 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
806 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.42_wp, 2000000.0_wp, & !parameter 6-11 |
---|
807 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
808 | 0.01_wp, 0.001_wp, 0.78_wp, & !parameter 18-20 |
---|
809 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
810 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
811 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
812 | 27.0_wp, 0.22_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
813 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
814 | 0.11_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 41-44 |
---|
815 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
816 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.73_wp, 0.005_wp, & !parameter 50-54 |
---|
817 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
818 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
819 | 0.04_wp, 0.92_wp, 27.0_wp, 0.27_wp, & !parameter 63-66 |
---|
820 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
821 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
822 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
823 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
824 | 0.005_wp, 0.01_wp, 0.5_wp, 0.79_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
825 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
826 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
827 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
828 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
829 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
830 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
831 | 0.1_wp, 0.5_wp, 0.0_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
832 | 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 |
---|
833 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
834 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
835 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
836 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
837 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
838 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
839 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
840 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
841 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
842 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
843 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
844 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
845 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
846 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
847 | 0.035_wp, 0.92_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
848 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
849 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
850 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
851 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
852 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
853 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
854 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
855 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
856 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
857 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
858 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
859 | 0.1_wp, 0.5_wp, 0.8_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
860 | 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 |
---|
861 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
862 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
863 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
864 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
865 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
866 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
867 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
868 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
869 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
870 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
871 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
872 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
873 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
874 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
875 | 2.1_wp, 0.93_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
876 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
877 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
878 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
879 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
880 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
881 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
882 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
883 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
884 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
885 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
886 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
887 | 0.1_wp, 1.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
888 | 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 |
---|
889 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
890 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 6-11 |
---|
891 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
892 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
893 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
894 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
895 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
896 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
897 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
898 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, & !parameter 41-44 |
---|
899 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
900 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
901 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
902 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
903 | 0.04_wp, 0.92_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
904 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
905 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
906 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
907 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
908 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
909 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
910 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
911 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
912 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
913 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
914 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
915 | 0.1_wp, 1.5_wp, 0.65_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
916 | 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 |
---|
917 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
918 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
919 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
920 | 0.01_wp, 0.001_wp, 0.475_wp, & !parameter 18-20 |
---|
921 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
922 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
923 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
924 | 27.0_wp, 0.525_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
925 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
926 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
927 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
928 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.425_wp, 0.005_wp, & !parameter 50-54 |
---|
929 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
930 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
931 | 0.035_wp, 0.92_wp, 27.0_wp, 0.575_wp, & !parameter 63-66 |
---|
932 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
933 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
934 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
935 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
936 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
937 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
938 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
939 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
940 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
941 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
942 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
943 | 0.1_wp, 1.5_wp, 0.9_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
944 | 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 |
---|
945 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
946 | 1.0_wp, 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 6-11 |
---|
947 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 4.0_wp, & !parameter 12-17 |
---|
948 | 0.01_wp, 0.001_wp, 1.0_wp, & !parameter 18-20 |
---|
949 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 21-25 |
---|
950 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, & !parameter 26-28 |
---|
951 | 1.0_wp, 1.0_wp, 0.9_wp, & !parameter 29-31 |
---|
952 | 27.0_wp, 0.0_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
953 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
954 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, & !parameter 41-44 |
---|
955 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
956 | 5.0_wp, 0.001_wp, 0.0001_wp, 1.0_wp, 0.29_wp, & !parameter 50-54 |
---|
957 | 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 55-58 |
---|
958 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, & !parameter 59-62 |
---|
959 | 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 63-66 |
---|
960 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
961 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
962 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
963 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
964 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, 1848000.0_wp, & !parameter 85-90 |
---|
965 | 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
966 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
967 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
968 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
969 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
970 | 299.15_wp, 293.15_wp, 0.8_wp, 100.0_wp, 100.0_wp, & !parameter 117-121 |
---|
971 | 20.0_wp, 20.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 4.5_wp, & !parameter 122-127 |
---|
972 | 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) |
---|
973 | /), & |
---|
974 | (/134, 7/) ) |
---|
975 | |
---|
976 | ! |
---|
977 | !-- Type for surface temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
978 | TYPE t_surf_vertical |
---|
979 | REAL(wp), DIMENSION(:), ALLOCATABLE :: t |
---|
980 | END TYPE t_surf_vertical |
---|
981 | ! |
---|
982 | !-- Type for wall temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
983 | TYPE t_wall_vertical |
---|
984 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t |
---|
985 | END TYPE t_wall_vertical |
---|
986 | |
---|
987 | TYPE surf_type_usm |
---|
988 | REAL(wp), DIMENSION(:), ALLOCATABLE :: var_usm_1d !< 1D prognostic variable |
---|
989 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: var_usm_2d !< 2D prognostic variable |
---|
990 | END TYPE surf_type_usm |
---|
991 | |
---|
992 | TYPE(surf_type_usm), POINTER :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
993 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
994 | |
---|
995 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h_1, & !< |
---|
996 | m_liq_usm_h_2 !< |
---|
997 | |
---|
998 | TYPE(surf_type_usm), DIMENSION(:), POINTER :: & |
---|
999 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
1000 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
1001 | |
---|
1002 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
1003 | m_liq_usm_v_1, & !< |
---|
1004 | m_liq_usm_v_2 !< |
---|
1005 | |
---|
1006 | TYPE(surf_type_usm), TARGET :: tm_liq_usm_h_m !< liquid water reservoir tendency (m), horizontal surface elements |
---|
1007 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: tm_liq_usm_v_m !< liquid water reservoir tendency (m), |
---|
1008 | !< vertical surface elements |
---|
1009 | |
---|
1010 | ! |
---|
1011 | !-- anthropogenic heat sources |
---|
1012 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: aheat !< daily average of anthropogenic heat (W/m2) |
---|
1013 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: aheatprof !< diurnal profiles of anthropogenic heat |
---|
1014 | !< for particular layers |
---|
1015 | INTEGER(iwp) :: naheatlayers = 1 !< number of layers of anthropogenic heat |
---|
1016 | |
---|
1017 | ! |
---|
1018 | !-- wall surface model |
---|
1019 | !-- wall surface model constants |
---|
1020 | INTEGER(iwp), PARAMETER :: nzb_wall = 0 !< inner side of the wall model (to be switched) |
---|
1021 | INTEGER(iwp), PARAMETER :: nzt_wall = 3 !< outer side of the wall model (to be switched) |
---|
1022 | INTEGER(iwp), PARAMETER :: nzw = 4 !< number of wall layers (fixed for now) |
---|
1023 | |
---|
1024 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
1025 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
1026 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
1027 | !< normalized soil, wall and roof, window and |
---|
1028 | !<green layer depths (m/m) |
---|
1029 | |
---|
1030 | REAL(wp) :: wall_inner_temperature = 295.0_wp !< temperature of the inner wall |
---|
1031 | !< surface (~22 degrees C) (K) |
---|
1032 | REAL(wp) :: roof_inner_temperature = 295.0_wp !< temperature of the inner roof |
---|
1033 | !< surface (~22 degrees C) (K) |
---|
1034 | REAL(wp) :: soil_inner_temperature = 288.0_wp !< temperature of the deep soil |
---|
1035 | !< (~15 degrees C) (K) |
---|
1036 | REAL(wp) :: window_inner_temperature = 295.0_wp !< temperature of the inner window |
---|
1037 | !< surface (~22 degrees C) (K) |
---|
1038 | |
---|
1039 | REAL(wp) :: m_total = 0.0_wp !< weighted total water content of the soil (m3/m3) |
---|
1040 | INTEGER(iwp) :: soil_type |
---|
1041 | |
---|
1042 | ! |
---|
1043 | !-- surface and material model variables for walls, ground, roofs |
---|
1044 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn !< normalized wall layer depths (m) |
---|
1045 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_window !< normalized window layer depths (m) |
---|
1046 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_green !< normalized green layer depths (m) |
---|
1047 | |
---|
1048 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h |
---|
1049 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h_p |
---|
1050 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h |
---|
1051 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h_p |
---|
1052 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h |
---|
1053 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h_p |
---|
1054 | |
---|
1055 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_1 |
---|
1056 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_2 |
---|
1057 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_1 |
---|
1058 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_2 |
---|
1059 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_1 |
---|
1060 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_2 |
---|
1061 | |
---|
1062 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v |
---|
1063 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v_p |
---|
1064 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v |
---|
1065 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v_p |
---|
1066 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v |
---|
1067 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v_p |
---|
1068 | |
---|
1069 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_1 |
---|
1070 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_2 |
---|
1071 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_1 |
---|
1072 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_2 |
---|
1073 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_1 |
---|
1074 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_2 |
---|
1075 | |
---|
1076 | ! |
---|
1077 | !-- Energy balance variables |
---|
1078 | !-- parameters of the land, roof and wall surfaces |
---|
1079 | |
---|
1080 | REAL(wp), DIMENSION(:,:), POINTER :: t_wall_h, t_wall_h_p |
---|
1081 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_1, t_wall_h_2 |
---|
1082 | REAL(wp), DIMENSION(:,:), POINTER :: t_window_h, t_window_h_p |
---|
1083 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_1, t_window_h_2 |
---|
1084 | REAL(wp), DIMENSION(:,:), POINTER :: t_green_h, t_green_h_p |
---|
1085 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_1, t_green_h_2 |
---|
1086 | REAL(wp), DIMENSION(:,:), POINTER :: swc_h, rootfr_h, wilt_h, fc_h, swc_sat_h, swc_h_p, swc_res_h |
---|
1087 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_1, rootfr_h_1, & |
---|
1088 | wilt_h_1, fc_h_1, swc_sat_h_1, swc_h_2, swc_res_h_1 |
---|
1089 | |
---|
1090 | |
---|
1091 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_wall_v, t_wall_v_p |
---|
1092 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_1, t_wall_v_2 |
---|
1093 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_window_v, t_window_v_p |
---|
1094 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_1, t_window_v_2 |
---|
1095 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_green_v, t_green_v_p |
---|
1096 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_1, t_green_v_2 |
---|
1097 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: swc_v, swc_v_p |
---|
1098 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_1, swc_v_2 |
---|
1099 | |
---|
1100 | ! |
---|
1101 | !-- Surface and material parameters classes (surface_type) |
---|
1102 | !-- albedo, emissivity, lambda_surf, roughness, thickness, volumetric heat capacity, thermal conductivity |
---|
1103 | INTEGER(iwp) :: n_surface_types !< number of the wall type categories |
---|
1104 | INTEGER(iwp), PARAMETER :: n_surface_params = 9 !< number of parameters for each type of the wall |
---|
1105 | INTEGER(iwp), PARAMETER :: ialbedo = 1 !< albedo of the surface |
---|
1106 | INTEGER(iwp), PARAMETER :: iemiss = 2 !< emissivity of the surface |
---|
1107 | INTEGER(iwp), PARAMETER :: ilambdas = 3 !< heat conductivity lambda S between surface |
---|
1108 | !< and material ( W m-2 K-1 ) |
---|
1109 | INTEGER(iwp), PARAMETER :: irough = 4 !< roughness length z0 for movements |
---|
1110 | INTEGER(iwp), PARAMETER :: iroughh = 5 !< roughness length z0h for scalars |
---|
1111 | !< (heat, humidity,...) |
---|
1112 | INTEGER(iwp), PARAMETER :: icsurf = 6 !< Surface skin layer heat capacity (J m-2 K-1 ) |
---|
1113 | INTEGER(iwp), PARAMETER :: ithick = 7 !< thickness of the surface (wall, roof, land) ( m ) |
---|
1114 | INTEGER(iwp), PARAMETER :: irhoC = 8 !< volumetric heat capacity rho*C of |
---|
1115 | !< the material ( J m-3 K-1 ) |
---|
1116 | INTEGER(iwp), PARAMETER :: ilambdah = 9 !< thermal conductivity lambda H |
---|
1117 | !< of the wall (W m-1 K-1 ) |
---|
1118 | CHARACTER(12), DIMENSION(:), ALLOCATABLE :: surface_type_names !< names of wall types (used only for reports) |
---|
1119 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: surface_type_codes !< codes of wall types |
---|
1120 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: surface_params !< parameters of wall types |
---|
1121 | |
---|
1122 | ! |
---|
1123 | !-- interfaces of subroutines accessed from outside of this module |
---|
1124 | INTERFACE usm_3d_data_averaging |
---|
1125 | MODULE PROCEDURE usm_3d_data_averaging |
---|
1126 | END INTERFACE usm_3d_data_averaging |
---|
1127 | |
---|
1128 | INTERFACE usm_boundary_condition |
---|
1129 | MODULE PROCEDURE usm_boundary_condition |
---|
1130 | END INTERFACE usm_boundary_condition |
---|
1131 | |
---|
1132 | INTERFACE usm_check_data_output |
---|
1133 | MODULE PROCEDURE usm_check_data_output |
---|
1134 | END INTERFACE usm_check_data_output |
---|
1135 | |
---|
1136 | INTERFACE usm_check_parameters |
---|
1137 | MODULE PROCEDURE usm_check_parameters |
---|
1138 | END INTERFACE usm_check_parameters |
---|
1139 | |
---|
1140 | INTERFACE usm_data_output_3d |
---|
1141 | MODULE PROCEDURE usm_data_output_3d |
---|
1142 | END INTERFACE usm_data_output_3d |
---|
1143 | |
---|
1144 | INTERFACE usm_define_netcdf_grid |
---|
1145 | MODULE PROCEDURE usm_define_netcdf_grid |
---|
1146 | END INTERFACE usm_define_netcdf_grid |
---|
1147 | |
---|
1148 | INTERFACE usm_init |
---|
1149 | MODULE PROCEDURE usm_init |
---|
1150 | END INTERFACE usm_init |
---|
1151 | |
---|
1152 | INTERFACE usm_init_arrays |
---|
1153 | MODULE PROCEDURE usm_init_arrays |
---|
1154 | END INTERFACE usm_init_arrays |
---|
1155 | |
---|
1156 | INTERFACE usm_material_heat_model |
---|
1157 | MODULE PROCEDURE usm_material_heat_model |
---|
1158 | END INTERFACE usm_material_heat_model |
---|
1159 | |
---|
1160 | INTERFACE usm_green_heat_model |
---|
1161 | MODULE PROCEDURE usm_green_heat_model |
---|
1162 | END INTERFACE usm_green_heat_model |
---|
1163 | |
---|
1164 | INTERFACE usm_parin |
---|
1165 | MODULE PROCEDURE usm_parin |
---|
1166 | END INTERFACE usm_parin |
---|
1167 | |
---|
1168 | INTERFACE usm_rrd_local |
---|
1169 | MODULE PROCEDURE usm_rrd_local |
---|
1170 | END INTERFACE usm_rrd_local |
---|
1171 | |
---|
1172 | INTERFACE usm_surface_energy_balance |
---|
1173 | MODULE PROCEDURE usm_surface_energy_balance |
---|
1174 | END INTERFACE usm_surface_energy_balance |
---|
1175 | |
---|
1176 | INTERFACE usm_swap_timelevel |
---|
1177 | MODULE PROCEDURE usm_swap_timelevel |
---|
1178 | END INTERFACE usm_swap_timelevel |
---|
1179 | |
---|
1180 | INTERFACE usm_wrd_local |
---|
1181 | MODULE PROCEDURE usm_wrd_local |
---|
1182 | END INTERFACE usm_wrd_local |
---|
1183 | |
---|
1184 | |
---|
1185 | SAVE |
---|
1186 | |
---|
1187 | PRIVATE |
---|
1188 | |
---|
1189 | ! |
---|
1190 | !-- Public functions |
---|
1191 | PUBLIC usm_boundary_condition, usm_check_parameters, usm_init, & |
---|
1192 | usm_rrd_local, & |
---|
1193 | usm_surface_energy_balance, usm_material_heat_model, & |
---|
1194 | usm_swap_timelevel, usm_check_data_output, usm_3d_data_averaging, & |
---|
1195 | usm_data_output_3d, usm_define_netcdf_grid, usm_parin, & |
---|
1196 | usm_wrd_local, usm_init_arrays |
---|
1197 | |
---|
1198 | ! |
---|
1199 | !-- Public parameters, constants and initial values |
---|
1200 | PUBLIC usm_anthropogenic_heat, usm_material_model, usm_wall_mod, & |
---|
1201 | usm_green_heat_model, building_pars, & |
---|
1202 | nzb_wall, nzt_wall, t_wall_h, t_wall_v, & |
---|
1203 | t_window_h, t_window_v, building_type |
---|
1204 | |
---|
1205 | |
---|
1206 | |
---|
1207 | CONTAINS |
---|
1208 | |
---|
1209 | !------------------------------------------------------------------------------! |
---|
1210 | ! Description: |
---|
1211 | ! ------------ |
---|
1212 | !> This subroutine creates the necessary indices of the urban surfaces |
---|
1213 | !> and plant canopy and it allocates the needed arrays for USM |
---|
1214 | !------------------------------------------------------------------------------! |
---|
1215 | SUBROUTINE usm_init_arrays |
---|
1216 | |
---|
1217 | IMPLICIT NONE |
---|
1218 | |
---|
1219 | INTEGER(iwp) :: l |
---|
1220 | |
---|
1221 | CALL location_message( 'initializing and allocating urban surfaces', .FALSE. ) |
---|
1222 | |
---|
1223 | ! |
---|
1224 | !-- Allocate radiation arrays which are part of the new data type. |
---|
1225 | !-- For horizontal surfaces. |
---|
1226 | ALLOCATE ( surf_usm_h%surfhf(1:surf_usm_h%ns) ) |
---|
1227 | ALLOCATE ( surf_usm_h%rad_net_l(1:surf_usm_h%ns) ) |
---|
1228 | ! |
---|
1229 | !-- For vertical surfaces |
---|
1230 | DO l = 0, 3 |
---|
1231 | ALLOCATE ( surf_usm_v(l)%surfhf(1:surf_usm_v(l)%ns) ) |
---|
1232 | ALLOCATE ( surf_usm_v(l)%rad_net_l(1:surf_usm_v(l)%ns) ) |
---|
1233 | ENDDO |
---|
1234 | |
---|
1235 | ! |
---|
1236 | !-- Wall surface model |
---|
1237 | !-- allocate arrays for wall surface model and define pointers |
---|
1238 | !-- allocate array of wall types and wall parameters |
---|
1239 | ALLOCATE ( surf_usm_h%surface_types(1:surf_usm_h%ns) ) |
---|
1240 | ALLOCATE ( surf_usm_h%building_type(1:surf_usm_h%ns) ) |
---|
1241 | ALLOCATE ( surf_usm_h%building_type_name(1:surf_usm_h%ns) ) |
---|
1242 | surf_usm_h%building_type = 0 |
---|
1243 | surf_usm_h%building_type_name = 'none' |
---|
1244 | DO l = 0, 3 |
---|
1245 | ALLOCATE ( surf_usm_v(l)%surface_types(1:surf_usm_v(l)%ns) ) |
---|
1246 | ALLOCATE ( surf_usm_v(l)%building_type(1:surf_usm_v(l)%ns) ) |
---|
1247 | ALLOCATE ( surf_usm_v(l)%building_type_name(1:surf_usm_v(l)%ns) ) |
---|
1248 | surf_usm_v(l)%building_type = 0 |
---|
1249 | surf_usm_v(l)%building_type_name = 'none' |
---|
1250 | ENDDO |
---|
1251 | ! |
---|
1252 | !-- Allocate albedo_type and albedo. Each surface element |
---|
1253 | !-- has 3 values, 0: wall fraction, 1: green fraction, 2: window fraction. |
---|
1254 | ALLOCATE ( surf_usm_h%albedo_type(0:2,1:surf_usm_h%ns) ) |
---|
1255 | ALLOCATE ( surf_usm_h%albedo(0:2,1:surf_usm_h%ns) ) |
---|
1256 | surf_usm_h%albedo_type = albedo_type |
---|
1257 | DO l = 0, 3 |
---|
1258 | ALLOCATE ( surf_usm_v(l)%albedo_type(0:2,1:surf_usm_v(l)%ns) ) |
---|
1259 | ALLOCATE ( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns) ) |
---|
1260 | surf_usm_v(l)%albedo_type = albedo_type |
---|
1261 | ENDDO |
---|
1262 | |
---|
1263 | ! |
---|
1264 | !-- Allocate indoor target temperature for summer and winter |
---|
1265 | ALLOCATE ( surf_usm_h%target_temp_summer(1:surf_usm_h%ns) ) |
---|
1266 | ALLOCATE ( surf_usm_h%target_temp_winter(1:surf_usm_h%ns) ) |
---|
1267 | DO l = 0, 3 |
---|
1268 | ALLOCATE ( surf_usm_v(l)%target_temp_summer(1:surf_usm_v(l)%ns) ) |
---|
1269 | ALLOCATE ( surf_usm_v(l)%target_temp_winter(1:surf_usm_v(l)%ns) ) |
---|
1270 | ENDDO |
---|
1271 | ! |
---|
1272 | !-- In case the indoor model is applied, allocate memory for waste heat |
---|
1273 | !-- and indoor temperature. |
---|
1274 | IF ( indoor_model ) THEN |
---|
1275 | ALLOCATE ( surf_usm_h%waste_heat(1:surf_usm_h%ns) ) |
---|
1276 | surf_usm_h%waste_heat = 0.0_wp |
---|
1277 | DO l = 0, 3 |
---|
1278 | ALLOCATE ( surf_usm_v(l)%waste_heat(1:surf_usm_v(l)%ns) ) |
---|
1279 | surf_usm_v(l)%waste_heat = 0.0_wp |
---|
1280 | ENDDO |
---|
1281 | ENDIF |
---|
1282 | ! |
---|
1283 | !-- Allocate flag indicating ground floor level surface elements |
---|
1284 | ALLOCATE ( surf_usm_h%ground_level(1:surf_usm_h%ns) ) |
---|
1285 | DO l = 0, 3 |
---|
1286 | ALLOCATE ( surf_usm_v(l)%ground_level(1:surf_usm_v(l)%ns) ) |
---|
1287 | ENDDO |
---|
1288 | ! |
---|
1289 | !-- Allocate arrays for relative surface fraction. |
---|
1290 | !-- 0 - wall fraction, 1 - green fraction, 2 - window fraction |
---|
1291 | ALLOCATE ( surf_usm_h%frac(0:2,1:surf_usm_h%ns) ) |
---|
1292 | surf_usm_h%frac = 0.0_wp |
---|
1293 | DO l = 0, 3 |
---|
1294 | ALLOCATE ( surf_usm_v(l)%frac(0:2,1:surf_usm_v(l)%ns) ) |
---|
1295 | surf_usm_v(l)%frac = 0.0_wp |
---|
1296 | ENDDO |
---|
1297 | |
---|
1298 | ! |
---|
1299 | !-- wall and roof surface parameters. First for horizontal surfaces |
---|
1300 | ALLOCATE ( surf_usm_h%isroof_surf(1:surf_usm_h%ns) ) |
---|
1301 | ALLOCATE ( surf_usm_h%lambda_surf(1:surf_usm_h%ns) ) |
---|
1302 | ALLOCATE ( surf_usm_h%lambda_surf_window(1:surf_usm_h%ns) ) |
---|
1303 | ALLOCATE ( surf_usm_h%lambda_surf_green(1:surf_usm_h%ns) ) |
---|
1304 | ALLOCATE ( surf_usm_h%c_surface(1:surf_usm_h%ns) ) |
---|
1305 | ALLOCATE ( surf_usm_h%c_surface_window(1:surf_usm_h%ns) ) |
---|
1306 | ALLOCATE ( surf_usm_h%c_surface_green(1:surf_usm_h%ns) ) |
---|
1307 | ALLOCATE ( surf_usm_h%transmissivity(1:surf_usm_h%ns) ) |
---|
1308 | ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns) ) |
---|
1309 | ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns) ) |
---|
1310 | ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns) ) |
---|
1311 | ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns) ) |
---|
1312 | ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns) ) |
---|
1313 | ALLOCATE ( surf_usm_h%green_type_roof(1:surf_usm_h%ns) ) |
---|
1314 | ALLOCATE ( surf_usm_h%r_s(1:surf_usm_h%ns) ) |
---|
1315 | |
---|
1316 | ! |
---|
1317 | !-- For vertical surfaces. |
---|
1318 | DO l = 0, 3 |
---|
1319 | ALLOCATE ( surf_usm_v(l)%lambda_surf(1:surf_usm_v(l)%ns) ) |
---|
1320 | ALLOCATE ( surf_usm_v(l)%c_surface(1:surf_usm_v(l)%ns) ) |
---|
1321 | ALLOCATE ( surf_usm_v(l)%lambda_surf_window(1:surf_usm_v(l)%ns) ) |
---|
1322 | ALLOCATE ( surf_usm_v(l)%c_surface_window(1:surf_usm_v(l)%ns) ) |
---|
1323 | ALLOCATE ( surf_usm_v(l)%lambda_surf_green(1:surf_usm_v(l)%ns) ) |
---|
1324 | ALLOCATE ( surf_usm_v(l)%c_surface_green(1:surf_usm_v(l)%ns) ) |
---|
1325 | ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns) ) |
---|
1326 | ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns) ) |
---|
1327 | ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns) ) |
---|
1328 | ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) |
---|
1329 | ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) |
---|
1330 | ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) |
---|
1331 | ALLOCATE ( surf_usm_v(l)%r_s(1:surf_usm_v(l)%ns) ) |
---|
1332 | ENDDO |
---|
1333 | |
---|
1334 | ! |
---|
1335 | !-- allocate wall and roof material parameters. First for horizontal surfaces |
---|
1336 | ALLOCATE ( surf_usm_h%thickness_wall(1:surf_usm_h%ns) ) |
---|
1337 | ALLOCATE ( surf_usm_h%thickness_window(1:surf_usm_h%ns) ) |
---|
1338 | ALLOCATE ( surf_usm_h%thickness_green(1:surf_usm_h%ns) ) |
---|
1339 | ALLOCATE ( surf_usm_h%lambda_h(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1340 | ALLOCATE ( surf_usm_h%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1341 | ALLOCATE ( surf_usm_h%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1342 | ALLOCATE ( surf_usm_h%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1343 | ALLOCATE ( surf_usm_h%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1344 | ALLOCATE ( surf_usm_h%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1345 | |
---|
1346 | ALLOCATE ( surf_usm_h%rho_c_total_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1347 | ALLOCATE ( surf_usm_h%n_vg_green(1:surf_usm_h%ns) ) |
---|
1348 | ALLOCATE ( surf_usm_h%alpha_vg_green(1:surf_usm_h%ns) ) |
---|
1349 | ALLOCATE ( surf_usm_h%l_vg_green(1:surf_usm_h%ns) ) |
---|
1350 | ALLOCATE ( surf_usm_h%gamma_w_green_sat(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1351 | ALLOCATE ( surf_usm_h%lambda_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1352 | ALLOCATE ( surf_usm_h%gamma_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1353 | ALLOCATE ( surf_usm_h%tswc_h_m(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1354 | |
---|
1355 | ! |
---|
1356 | !-- For vertical surfaces. |
---|
1357 | DO l = 0, 3 |
---|
1358 | ALLOCATE ( surf_usm_v(l)%thickness_wall(1:surf_usm_v(l)%ns) ) |
---|
1359 | ALLOCATE ( surf_usm_v(l)%thickness_window(1:surf_usm_v(l)%ns) ) |
---|
1360 | ALLOCATE ( surf_usm_v(l)%thickness_green(1:surf_usm_v(l)%ns) ) |
---|
1361 | ALLOCATE ( surf_usm_v(l)%lambda_h(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1362 | ALLOCATE ( surf_usm_v(l)%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1363 | ALLOCATE ( surf_usm_v(l)%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1364 | ALLOCATE ( surf_usm_v(l)%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1365 | ALLOCATE ( surf_usm_v(l)%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1366 | ALLOCATE ( surf_usm_v(l)%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1367 | ENDDO |
---|
1368 | |
---|
1369 | ! |
---|
1370 | !-- allocate green wall and roof vegetation and soil parameters. First horizontal surfaces |
---|
1371 | ALLOCATE ( surf_usm_h%g_d(1:surf_usm_h%ns) ) |
---|
1372 | ALLOCATE ( surf_usm_h%c_liq(1:surf_usm_h%ns) ) |
---|
1373 | ALLOCATE ( surf_usm_h%qsws_liq(1:surf_usm_h%ns) ) |
---|
1374 | ALLOCATE ( surf_usm_h%qsws_veg(1:surf_usm_h%ns) ) |
---|
1375 | ALLOCATE ( surf_usm_h%r_canopy(1:surf_usm_h%ns) ) |
---|
1376 | ALLOCATE ( surf_usm_h%r_canopy_min(1:surf_usm_h%ns) ) |
---|
1377 | ALLOCATE ( surf_usm_h%qsws_eb(1:surf_usm_h%ns) ) |
---|
1378 | ALLOCATE ( surf_usm_h%pt_10cm(1:surf_usm_h%ns) ) |
---|
1379 | ALLOCATE ( surf_usm_h%pt_2m(1:surf_usm_h%ns) ) |
---|
1380 | |
---|
1381 | ! |
---|
1382 | !-- For vertical surfaces. |
---|
1383 | DO l = 0, 3 |
---|
1384 | ALLOCATE ( surf_usm_v(l)%g_d(1:surf_usm_v(l)%ns) ) |
---|
1385 | ALLOCATE ( surf_usm_v(l)%c_liq(1:surf_usm_v(l)%ns) ) |
---|
1386 | ALLOCATE ( surf_usm_v(l)%qsws_liq(1:surf_usm_v(l)%ns) ) |
---|
1387 | ALLOCATE ( surf_usm_v(l)%qsws_veg(1:surf_usm_v(l)%ns) ) |
---|
1388 | ALLOCATE ( surf_usm_v(l)%qsws_eb(1:surf_usm_v(l)%ns) ) |
---|
1389 | ALLOCATE ( surf_usm_v(l)%r_canopy(1:surf_usm_v(l)%ns) ) |
---|
1390 | ALLOCATE ( surf_usm_v(l)%r_canopy_min(1:surf_usm_v(l)%ns) ) |
---|
1391 | ALLOCATE ( surf_usm_v(l)%pt_10cm(1:surf_usm_v(l)%ns) ) |
---|
1392 | ENDDO |
---|
1393 | |
---|
1394 | ! |
---|
1395 | !-- allocate wall and roof layers sizes. For horizontal surfaces. |
---|
1396 | ALLOCATE ( zwn(nzb_wall:nzt_wall) ) |
---|
1397 | ALLOCATE ( surf_usm_h%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1398 | ALLOCATE ( zwn_window(nzb_wall:nzt_wall) ) |
---|
1399 | ALLOCATE ( surf_usm_h%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1400 | ALLOCATE ( zwn_green(nzb_wall:nzt_wall) ) |
---|
1401 | ALLOCATE ( surf_usm_h%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1402 | ALLOCATE ( surf_usm_h%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1403 | ALLOCATE ( surf_usm_h%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1404 | ALLOCATE ( surf_usm_h%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1405 | ALLOCATE ( surf_usm_h%zw(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1406 | ALLOCATE ( surf_usm_h%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1407 | ALLOCATE ( surf_usm_h%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1408 | ALLOCATE ( surf_usm_h%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1409 | ALLOCATE ( surf_usm_h%zw_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1410 | ALLOCATE ( surf_usm_h%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1411 | ALLOCATE ( surf_usm_h%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1412 | ALLOCATE ( surf_usm_h%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1413 | ALLOCATE ( surf_usm_h%zw_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1414 | |
---|
1415 | ! |
---|
1416 | !-- For vertical surfaces. |
---|
1417 | DO l = 0, 3 |
---|
1418 | ALLOCATE ( surf_usm_v(l)%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1419 | ALLOCATE ( surf_usm_v(l)%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1420 | ALLOCATE ( surf_usm_v(l)%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1421 | ALLOCATE ( surf_usm_v(l)%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1422 | ALLOCATE ( surf_usm_v(l)%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1423 | ALLOCATE ( surf_usm_v(l)%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1424 | ALLOCATE ( surf_usm_v(l)%zw(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1425 | ALLOCATE ( surf_usm_v(l)%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1426 | ALLOCATE ( surf_usm_v(l)%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1427 | ALLOCATE ( surf_usm_v(l)%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1428 | ALLOCATE ( surf_usm_v(l)%zw_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1429 | ALLOCATE ( surf_usm_v(l)%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1430 | ALLOCATE ( surf_usm_v(l)%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1431 | ALLOCATE ( surf_usm_v(l)%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1432 | ALLOCATE ( surf_usm_v(l)%zw_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1433 | ENDDO |
---|
1434 | |
---|
1435 | ! |
---|
1436 | !-- allocate wall and roof temperature arrays, for horizontal walls |
---|
1437 | ! |
---|
1438 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1439 | !-- might be already allocated. |
---|
1440 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
1441 | ALLOCATE ( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
1442 | IF ( .NOT. ALLOCATED( t_surf_wall_h_2 ) ) & |
---|
1443 | ALLOCATE ( t_surf_wall_h_2(1:surf_usm_h%ns) ) |
---|
1444 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
1445 | ALLOCATE ( t_wall_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1446 | IF ( .NOT. ALLOCATED( t_wall_h_2 ) ) & |
---|
1447 | ALLOCATE ( t_wall_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1448 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
1449 | ALLOCATE ( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
1450 | IF ( .NOT. ALLOCATED( t_surf_window_h_2 ) ) & |
---|
1451 | ALLOCATE ( t_surf_window_h_2(1:surf_usm_h%ns) ) |
---|
1452 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
1453 | ALLOCATE ( t_window_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1454 | IF ( .NOT. ALLOCATED( t_window_h_2 ) ) & |
---|
1455 | ALLOCATE ( t_window_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1456 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
1457 | ALLOCATE ( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
1458 | IF ( .NOT. ALLOCATED( t_surf_green_h_2 ) ) & |
---|
1459 | ALLOCATE ( t_surf_green_h_2(1:surf_usm_h%ns) ) |
---|
1460 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
1461 | ALLOCATE ( t_green_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1462 | IF ( .NOT. ALLOCATED( t_green_h_2 ) ) & |
---|
1463 | ALLOCATE ( t_green_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1464 | IF ( .NOT. ALLOCATED( swc_h_1 ) ) & |
---|
1465 | ALLOCATE ( swc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1466 | IF ( .NOT. ALLOCATED( swc_sat_h_1 ) ) & |
---|
1467 | ALLOCATE ( swc_sat_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1468 | IF ( .NOT. ALLOCATED( swc_res_h_1 ) ) & |
---|
1469 | ALLOCATE ( swc_res_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1470 | IF ( .NOT. ALLOCATED( swc_h_2 ) ) & |
---|
1471 | ALLOCATE ( swc_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1472 | IF ( .NOT. ALLOCATED( rootfr_h_1 ) ) & |
---|
1473 | ALLOCATE ( rootfr_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1474 | IF ( .NOT. ALLOCATED( wilt_h_1 ) ) & |
---|
1475 | ALLOCATE ( wilt_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1476 | IF ( .NOT. ALLOCATED( fc_h_1 ) ) & |
---|
1477 | ALLOCATE ( fc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1478 | |
---|
1479 | IF ( .NOT. ALLOCATED( m_liq_usm_h_1%var_usm_1d ) ) & |
---|
1480 | ALLOCATE ( m_liq_usm_h_1%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1481 | IF ( .NOT. ALLOCATED( m_liq_usm_h_2%var_usm_1d ) ) & |
---|
1482 | ALLOCATE ( m_liq_usm_h_2%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1483 | |
---|
1484 | ! |
---|
1485 | !-- initial assignment of the pointers |
---|
1486 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
1487 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
1488 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
1489 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
1490 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
1491 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
1492 | m_liq_usm_h => m_liq_usm_h_1; m_liq_usm_h_p => m_liq_usm_h_2 |
---|
1493 | swc_h => swc_h_1; swc_h_p => swc_h_2 |
---|
1494 | swc_sat_h => swc_sat_h_1 |
---|
1495 | swc_res_h => swc_res_h_1 |
---|
1496 | rootfr_h => rootfr_h_1 |
---|
1497 | wilt_h => wilt_h_1 |
---|
1498 | fc_h => fc_h_1 |
---|
1499 | |
---|
1500 | ! |
---|
1501 | !-- allocate wall and roof temperature arrays, for vertical walls if required |
---|
1502 | ! |
---|
1503 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1504 | !-- might be already allocated. |
---|
1505 | DO l = 0, 3 |
---|
1506 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(l)%t ) ) & |
---|
1507 | ALLOCATE ( t_surf_wall_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1508 | IF ( .NOT. ALLOCATED( t_surf_wall_v_2(l)%t ) ) & |
---|
1509 | ALLOCATE ( t_surf_wall_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1510 | IF ( .NOT. ALLOCATED( t_wall_v_1(l)%t ) ) & |
---|
1511 | ALLOCATE ( t_wall_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1512 | IF ( .NOT. ALLOCATED( t_wall_v_2(l)%t ) ) & |
---|
1513 | ALLOCATE ( t_wall_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1514 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(l)%t ) ) & |
---|
1515 | ALLOCATE ( t_surf_window_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1516 | IF ( .NOT. ALLOCATED( t_surf_window_v_2(l)%t ) ) & |
---|
1517 | ALLOCATE ( t_surf_window_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1518 | IF ( .NOT. ALLOCATED( t_window_v_1(l)%t ) ) & |
---|
1519 | ALLOCATE ( t_window_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1520 | IF ( .NOT. ALLOCATED( t_window_v_2(l)%t ) ) & |
---|
1521 | ALLOCATE ( t_window_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1522 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(l)%t ) ) & |
---|
1523 | ALLOCATE ( t_surf_green_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1524 | IF ( .NOT. ALLOCATED( t_surf_green_v_2(l)%t ) ) & |
---|
1525 | ALLOCATE ( t_surf_green_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1526 | IF ( .NOT. ALLOCATED( t_green_v_1(l)%t ) ) & |
---|
1527 | ALLOCATE ( t_green_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1528 | IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) ) & |
---|
1529 | ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1530 | IF ( .NOT. ALLOCATED( m_liq_usm_v_1(l)%var_usm_1d ) ) & |
---|
1531 | ALLOCATE ( m_liq_usm_v_1(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1532 | IF ( .NOT. ALLOCATED( m_liq_usm_v_2(l)%var_usm_1d ) ) & |
---|
1533 | ALLOCATE ( m_liq_usm_v_2(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1534 | IF ( .NOT. ALLOCATED( swc_v_1(l)%t ) ) & |
---|
1535 | ALLOCATE ( swc_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1536 | IF ( .NOT. ALLOCATED( swc_v_2(l)%t ) ) & |
---|
1537 | ALLOCATE ( swc_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1538 | ENDDO |
---|
1539 | ! |
---|
1540 | !-- initial assignment of the pointers |
---|
1541 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
1542 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
1543 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
1544 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
1545 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
1546 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
1547 | m_liq_usm_v => m_liq_usm_v_1; m_liq_usm_v_p => m_liq_usm_v_2 |
---|
1548 | swc_v => swc_v_1; swc_v_p => swc_v_2 |
---|
1549 | |
---|
1550 | ! |
---|
1551 | !-- Allocate intermediate timestep arrays. For horizontal surfaces. |
---|
1552 | ALLOCATE ( surf_usm_h%tt_surface_wall_m(1:surf_usm_h%ns) ) |
---|
1553 | ALLOCATE ( surf_usm_h%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1554 | ALLOCATE ( surf_usm_h%tt_surface_window_m(1:surf_usm_h%ns) ) |
---|
1555 | ALLOCATE ( surf_usm_h%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1556 | ALLOCATE ( surf_usm_h%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1557 | ALLOCATE ( surf_usm_h%tt_surface_green_m(1:surf_usm_h%ns) ) |
---|
1558 | |
---|
1559 | ! |
---|
1560 | !-- Allocate intermediate timestep arrays |
---|
1561 | !-- Horizontal surfaces |
---|
1562 | ALLOCATE ( tm_liq_usm_h_m%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1563 | ! |
---|
1564 | !-- Horizontal surfaces |
---|
1565 | DO l = 0, 3 |
---|
1566 | ALLOCATE ( tm_liq_usm_v_m(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1567 | ENDDO |
---|
1568 | |
---|
1569 | ! |
---|
1570 | !-- Set inital values for prognostic quantities |
---|
1571 | IF ( ALLOCATED( surf_usm_h%tt_surface_wall_m ) ) surf_usm_h%tt_surface_wall_m = 0.0_wp |
---|
1572 | IF ( ALLOCATED( surf_usm_h%tt_wall_m ) ) surf_usm_h%tt_wall_m = 0.0_wp |
---|
1573 | IF ( ALLOCATED( surf_usm_h%tt_surface_window_m ) ) surf_usm_h%tt_surface_window_m = 0.0_wp |
---|
1574 | IF ( ALLOCATED( surf_usm_h%tt_window_m ) ) surf_usm_h%tt_window_m = 0.0_wp |
---|
1575 | IF ( ALLOCATED( surf_usm_h%tt_green_m ) ) surf_usm_h%tt_green_m = 0.0_wp |
---|
1576 | IF ( ALLOCATED( surf_usm_h%tt_surface_green_m ) ) surf_usm_h%tt_surface_green_m = 0.0_wp |
---|
1577 | ! |
---|
1578 | !-- Now, for vertical surfaces |
---|
1579 | DO l = 0, 3 |
---|
1580 | ALLOCATE ( surf_usm_v(l)%tt_surface_wall_m(1:surf_usm_v(l)%ns) ) |
---|
1581 | ALLOCATE ( surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1582 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_wall_m ) ) surf_usm_v(l)%tt_surface_wall_m = 0.0_wp |
---|
1583 | IF ( ALLOCATED( surf_usm_v(l)%tt_wall_m ) ) surf_usm_v(l)%tt_wall_m = 0.0_wp |
---|
1584 | ALLOCATE ( surf_usm_v(l)%tt_surface_window_m(1:surf_usm_v(l)%ns) ) |
---|
1585 | ALLOCATE ( surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1586 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_window_m ) ) surf_usm_v(l)%tt_surface_window_m = 0.0_wp |
---|
1587 | IF ( ALLOCATED( surf_usm_v(l)%tt_window_m ) ) surf_usm_v(l)%tt_window_m = 0.0_wp |
---|
1588 | ALLOCATE ( surf_usm_v(l)%tt_surface_green_m(1:surf_usm_v(l)%ns) ) |
---|
1589 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_green_m ) ) surf_usm_v(l)%tt_surface_green_m = 0.0_wp |
---|
1590 | ALLOCATE ( surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1591 | IF ( ALLOCATED( surf_usm_v(l)%tt_green_m ) ) surf_usm_v(l)%tt_green_m = 0.0_wp |
---|
1592 | ENDDO |
---|
1593 | ! |
---|
1594 | !-- allocate wall heat flux output array and set initial values. For horizontal surfaces |
---|
1595 | ! ALLOCATE ( surf_usm_h%wshf(1:surf_usm_h%ns) ) !can be removed |
---|
1596 | ALLOCATE ( surf_usm_h%wshf_eb(1:surf_usm_h%ns) ) |
---|
1597 | ALLOCATE ( surf_usm_h%wghf_eb(1:surf_usm_h%ns) ) |
---|
1598 | ALLOCATE ( surf_usm_h%wghf_eb_window(1:surf_usm_h%ns) ) |
---|
1599 | ALLOCATE ( surf_usm_h%wghf_eb_green(1:surf_usm_h%ns) ) |
---|
1600 | ALLOCATE ( surf_usm_h%iwghf_eb(1:surf_usm_h%ns) ) |
---|
1601 | ALLOCATE ( surf_usm_h%iwghf_eb_window(1:surf_usm_h%ns) ) |
---|
1602 | IF ( ALLOCATED( surf_usm_h%wshf ) ) surf_usm_h%wshf = 0.0_wp |
---|
1603 | IF ( ALLOCATED( surf_usm_h%wshf_eb ) ) surf_usm_h%wshf_eb = 0.0_wp |
---|
1604 | IF ( ALLOCATED( surf_usm_h%wghf_eb ) ) surf_usm_h%wghf_eb = 0.0_wp |
---|
1605 | IF ( ALLOCATED( surf_usm_h%wghf_eb_window ) ) surf_usm_h%wghf_eb_window = 0.0_wp |
---|
1606 | IF ( ALLOCATED( surf_usm_h%wghf_eb_green ) ) surf_usm_h%wghf_eb_green = 0.0_wp |
---|
1607 | IF ( ALLOCATED( surf_usm_h%iwghf_eb ) ) surf_usm_h%iwghf_eb = 0.0_wp |
---|
1608 | IF ( ALLOCATED( surf_usm_h%iwghf_eb_window ) ) surf_usm_h%iwghf_eb_window = 0.0_wp |
---|
1609 | ! |
---|
1610 | !-- Now, for vertical surfaces |
---|
1611 | DO l = 0, 3 |
---|
1612 | ! ALLOCATE ( surf_usm_v(l)%wshf(1:surf_usm_v(l)%ns) ) ! can be removed |
---|
1613 | ALLOCATE ( surf_usm_v(l)%wshf_eb(1:surf_usm_v(l)%ns) ) |
---|
1614 | ALLOCATE ( surf_usm_v(l)%wghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1615 | ALLOCATE ( surf_usm_v(l)%wghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1616 | ALLOCATE ( surf_usm_v(l)%wghf_eb_green(1:surf_usm_v(l)%ns) ) |
---|
1617 | ALLOCATE ( surf_usm_v(l)%iwghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1618 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1619 | IF ( ALLOCATED( surf_usm_v(l)%wshf ) ) surf_usm_v(l)%wshf = 0.0_wp |
---|
1620 | IF ( ALLOCATED( surf_usm_v(l)%wshf_eb ) ) surf_usm_v(l)%wshf_eb = 0.0_wp |
---|
1621 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb ) ) surf_usm_v(l)%wghf_eb = 0.0_wp |
---|
1622 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_window ) ) surf_usm_v(l)%wghf_eb_window = 0.0_wp |
---|
1623 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_green ) ) surf_usm_v(l)%wghf_eb_green = 0.0_wp |
---|
1624 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb ) ) surf_usm_v(l)%iwghf_eb = 0.0_wp |
---|
1625 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) ) surf_usm_v(l)%iwghf_eb_window = 0.0_wp |
---|
1626 | ENDDO |
---|
1627 | |
---|
1628 | CALL location_message( 'finished', .TRUE. ) |
---|
1629 | |
---|
1630 | END SUBROUTINE usm_init_arrays |
---|
1631 | |
---|
1632 | |
---|
1633 | !------------------------------------------------------------------------------! |
---|
1634 | ! Description: |
---|
1635 | ! ------------ |
---|
1636 | !> Sum up and time-average urban surface output quantities as well as allocate |
---|
1637 | !> the array necessary for storing the average. |
---|
1638 | !------------------------------------------------------------------------------! |
---|
1639 | SUBROUTINE usm_3d_data_averaging( mode, variable ) |
---|
1640 | |
---|
1641 | IMPLICIT NONE |
---|
1642 | |
---|
1643 | CHARACTER(LEN=*), INTENT(IN) :: mode |
---|
1644 | CHARACTER(LEN=*), INTENT(IN) :: variable |
---|
1645 | |
---|
1646 | INTEGER(iwp) :: i, j, k, l, m, ids, idsint, iwl, istat !< runnin indices |
---|
1647 | CHARACTER(LEN=varnamelength) :: var !< trimmed variable |
---|
1648 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
1649 | CHARACTER(LEN=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
1650 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
1651 | |
---|
1652 | IF ( variable(1:4) == 'usm_' ) THEN ! is such a check really rquired? |
---|
1653 | |
---|
1654 | ! |
---|
1655 | !-- find the real name of the variable |
---|
1656 | ids = -1 |
---|
1657 | l = -1 |
---|
1658 | var = TRIM(variable) |
---|
1659 | DO i = 0, nd-1 |
---|
1660 | k = len(TRIM(var)) |
---|
1661 | j = len(TRIM(dirname(i))) |
---|
1662 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
1663 | ids = i |
---|
1664 | idsint = dirint(ids) |
---|
1665 | var = var(:k-j) |
---|
1666 | EXIT |
---|
1667 | ENDIF |
---|
1668 | ENDDO |
---|
1669 | l = idsint - 2 ! horisontal direction index - terible hack ! |
---|
1670 | IF ( l < 0 .OR. l > 3 ) THEN |
---|
1671 | l = -1 |
---|
1672 | END IF |
---|
1673 | IF ( ids == -1 ) THEN |
---|
1674 | var = TRIM(variable) |
---|
1675 | ENDIF |
---|
1676 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
1677 | ! |
---|
1678 | !-- wall layers |
---|
1679 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
1680 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1681 | var = var(1:10) |
---|
1682 | ELSE |
---|
1683 | ! |
---|
1684 | !-- wrong wall layer index |
---|
1685 | RETURN |
---|
1686 | ENDIF |
---|
1687 | ENDIF |
---|
1688 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
1689 | ! |
---|
1690 | !-- wall layers |
---|
1691 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
1692 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1693 | var = var(1:12) |
---|
1694 | ELSE |
---|
1695 | ! |
---|
1696 | !-- wrong window layer index |
---|
1697 | RETURN |
---|
1698 | ENDIF |
---|
1699 | ENDIF |
---|
1700 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
1701 | ! |
---|
1702 | !-- wall layers |
---|
1703 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
1704 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1705 | var = var(1:11) |
---|
1706 | ELSE |
---|
1707 | ! |
---|
1708 | !-- wrong green layer index |
---|
1709 | RETURN |
---|
1710 | ENDIF |
---|
1711 | ENDIF |
---|
1712 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
1713 | ! |
---|
1714 | !-- swc layers |
---|
1715 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
1716 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1717 | var = var(1:7) |
---|
1718 | ELSE |
---|
1719 | ! |
---|
1720 | !-- wrong swc layer index |
---|
1721 | RETURN |
---|
1722 | ENDIF |
---|
1723 | ENDIF |
---|
1724 | |
---|
1725 | IF ( mode == 'allocate' ) THEN |
---|
1726 | |
---|
1727 | SELECT CASE ( TRIM( var ) ) |
---|
1728 | |
---|
1729 | CASE ( 'usm_wshf' ) |
---|
1730 | ! |
---|
1731 | !-- array of sensible heat flux from surfaces |
---|
1732 | !-- land surfaces |
---|
1733 | IF ( l == -1 ) THEN |
---|
1734 | IF ( .NOT. ALLOCATED(surf_usm_h%wshf_eb_av) ) THEN |
---|
1735 | ALLOCATE ( surf_usm_h%wshf_eb_av(1:surf_usm_h%ns) ) |
---|
1736 | surf_usm_h%wshf_eb_av = 0.0_wp |
---|
1737 | ENDIF |
---|
1738 | ELSE |
---|
1739 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wshf_eb_av) ) THEN |
---|
1740 | ALLOCATE ( surf_usm_v(l)%wshf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1741 | surf_usm_v(l)%wshf_eb_av = 0.0_wp |
---|
1742 | ENDIF |
---|
1743 | ENDIF |
---|
1744 | |
---|
1745 | CASE ( 'usm_qsws' ) |
---|
1746 | ! |
---|
1747 | !-- array of latent heat flux from surfaces |
---|
1748 | !-- land surfaces |
---|
1749 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_eb_av) ) THEN |
---|
1750 | ALLOCATE ( surf_usm_h%qsws_eb_av(1:surf_usm_h%ns) ) |
---|
1751 | surf_usm_h%qsws_eb_av = 0.0_wp |
---|
1752 | ELSE |
---|
1753 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_eb_av) ) THEN |
---|
1754 | ALLOCATE ( surf_usm_v(l)%qsws_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1755 | surf_usm_v(l)%qsws_eb_av = 0.0_wp |
---|
1756 | ENDIF |
---|
1757 | ENDIF |
---|
1758 | |
---|
1759 | CASE ( 'usm_qsws_veg' ) |
---|
1760 | ! |
---|
1761 | !-- array of latent heat flux from vegetation surfaces |
---|
1762 | !-- land surfaces |
---|
1763 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_veg_av) ) THEN |
---|
1764 | ALLOCATE ( surf_usm_h%qsws_veg_av(1:surf_usm_h%ns) ) |
---|
1765 | surf_usm_h%qsws_veg_av = 0.0_wp |
---|
1766 | ELSE |
---|
1767 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_veg_av) ) THEN |
---|
1768 | ALLOCATE ( surf_usm_v(l)%qsws_veg_av(1:surf_usm_v(l)%ns) ) |
---|
1769 | surf_usm_v(l)%qsws_veg_av = 0.0_wp |
---|
1770 | ENDIF |
---|
1771 | ENDIF |
---|
1772 | |
---|
1773 | CASE ( 'usm_qsws_liq' ) |
---|
1774 | ! |
---|
1775 | !-- array of latent heat flux from surfaces with liquid |
---|
1776 | !-- land surfaces |
---|
1777 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_liq_av) ) THEN |
---|
1778 | ALLOCATE ( surf_usm_h%qsws_liq_av(1:surf_usm_h%ns) ) |
---|
1779 | surf_usm_h%qsws_liq_av = 0.0_wp |
---|
1780 | ELSE |
---|
1781 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_liq_av) ) THEN |
---|
1782 | ALLOCATE ( surf_usm_v(l)%qsws_liq_av(1:surf_usm_v(l)%ns) ) |
---|
1783 | surf_usm_v(l)%qsws_liq_av = 0.0_wp |
---|
1784 | ENDIF |
---|
1785 | ENDIF |
---|
1786 | ! |
---|
1787 | !-- Please note, the following output quantities belongs to the |
---|
1788 | !-- individual tile fractions - ground heat flux at wall-, window-, |
---|
1789 | !-- and green fraction. Aggregated ground-heat flux is treated |
---|
1790 | !-- accordingly in average_3d_data, sum_up_3d_data, etc.. |
---|
1791 | CASE ( 'usm_wghf' ) |
---|
1792 | ! |
---|
1793 | !-- array of heat flux from ground (wall, roof, land) |
---|
1794 | IF ( l == -1 ) THEN |
---|
1795 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_av) ) THEN |
---|
1796 | ALLOCATE ( surf_usm_h%wghf_eb_av(1:surf_usm_h%ns) ) |
---|
1797 | surf_usm_h%wghf_eb_av = 0.0_wp |
---|
1798 | ENDIF |
---|
1799 | ELSE |
---|
1800 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_av) ) THEN |
---|
1801 | ALLOCATE ( surf_usm_v(l)%wghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1802 | surf_usm_v(l)%wghf_eb_av = 0.0_wp |
---|
1803 | ENDIF |
---|
1804 | ENDIF |
---|
1805 | |
---|
1806 | CASE ( 'usm_wghf_window' ) |
---|
1807 | ! |
---|
1808 | !-- array of heat flux from window ground (wall, roof, land) |
---|
1809 | IF ( l == -1 ) THEN |
---|
1810 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_window_av) ) THEN |
---|
1811 | ALLOCATE ( surf_usm_h%wghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
1812 | surf_usm_h%wghf_eb_window_av = 0.0_wp |
---|
1813 | ENDIF |
---|
1814 | ELSE |
---|
1815 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_window_av) ) THEN |
---|
1816 | ALLOCATE ( surf_usm_v(l)%wghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
1817 | surf_usm_v(l)%wghf_eb_window_av = 0.0_wp |
---|
1818 | ENDIF |
---|
1819 | ENDIF |
---|
1820 | |
---|
1821 | CASE ( 'usm_wghf_green' ) |
---|
1822 | ! |
---|
1823 | !-- array of heat flux from green ground (wall, roof, land) |
---|
1824 | IF ( l == -1 ) THEN |
---|
1825 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_green_av) ) THEN |
---|
1826 | ALLOCATE ( surf_usm_h%wghf_eb_green_av(1:surf_usm_h%ns) ) |
---|
1827 | surf_usm_h%wghf_eb_green_av = 0.0_wp |
---|
1828 | ENDIF |
---|
1829 | ELSE |
---|
1830 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_green_av) ) THEN |
---|
1831 | ALLOCATE ( surf_usm_v(l)%wghf_eb_green_av(1:surf_usm_v(l)%ns) ) |
---|
1832 | surf_usm_v(l)%wghf_eb_green_av = 0.0_wp |
---|
1833 | ENDIF |
---|
1834 | ENDIF |
---|
1835 | |
---|
1836 | CASE ( 'usm_iwghf' ) |
---|
1837 | ! |
---|
1838 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
1839 | IF ( l == -1 ) THEN |
---|
1840 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_av) ) THEN |
---|
1841 | ALLOCATE ( surf_usm_h%iwghf_eb_av(1:surf_usm_h%ns) ) |
---|
1842 | surf_usm_h%iwghf_eb_av = 0.0_wp |
---|
1843 | ENDIF |
---|
1844 | ELSE |
---|
1845 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_av) ) THEN |
---|
1846 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1847 | surf_usm_v(l)%iwghf_eb_av = 0.0_wp |
---|
1848 | ENDIF |
---|
1849 | ENDIF |
---|
1850 | |
---|
1851 | CASE ( 'usm_iwghf_window' ) |
---|
1852 | ! |
---|
1853 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
1854 | IF ( l == -1 ) THEN |
---|
1855 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_window_av) ) THEN |
---|
1856 | ALLOCATE ( surf_usm_h%iwghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
1857 | surf_usm_h%iwghf_eb_window_av = 0.0_wp |
---|
1858 | ENDIF |
---|
1859 | ELSE |
---|
1860 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_window_av) ) THEN |
---|
1861 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
1862 | surf_usm_v(l)%iwghf_eb_window_av = 0.0_wp |
---|
1863 | ENDIF |
---|
1864 | ENDIF |
---|
1865 | |
---|
1866 | CASE ( 'usm_t_surf_wall' ) |
---|
1867 | ! |
---|
1868 | !-- surface temperature for surfaces |
---|
1869 | IF ( l == -1 ) THEN |
---|
1870 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_wall_av) ) THEN |
---|
1871 | ALLOCATE ( surf_usm_h%t_surf_wall_av(1:surf_usm_h%ns) ) |
---|
1872 | surf_usm_h%t_surf_wall_av = 0.0_wp |
---|
1873 | ENDIF |
---|
1874 | ELSE |
---|
1875 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_wall_av) ) THEN |
---|
1876 | ALLOCATE ( surf_usm_v(l)%t_surf_wall_av(1:surf_usm_v(l)%ns) ) |
---|
1877 | surf_usm_v(l)%t_surf_wall_av = 0.0_wp |
---|
1878 | ENDIF |
---|
1879 | ENDIF |
---|
1880 | |
---|
1881 | CASE ( 'usm_t_surf_window' ) |
---|
1882 | ! |
---|
1883 | !-- surface temperature for window surfaces |
---|
1884 | IF ( l == -1 ) THEN |
---|
1885 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_window_av) ) THEN |
---|
1886 | ALLOCATE ( surf_usm_h%t_surf_window_av(1:surf_usm_h%ns) ) |
---|
1887 | surf_usm_h%t_surf_window_av = 0.0_wp |
---|
1888 | ENDIF |
---|
1889 | ELSE |
---|
1890 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_window_av) ) THEN |
---|
1891 | ALLOCATE ( surf_usm_v(l)%t_surf_window_av(1:surf_usm_v(l)%ns) ) |
---|
1892 | surf_usm_v(l)%t_surf_window_av = 0.0_wp |
---|
1893 | ENDIF |
---|
1894 | ENDIF |
---|
1895 | |
---|
1896 | CASE ( 'usm_t_surf_green' ) |
---|
1897 | ! |
---|
1898 | !-- surface temperature for green surfaces |
---|
1899 | IF ( l == -1 ) THEN |
---|
1900 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_green_av) ) THEN |
---|
1901 | ALLOCATE ( surf_usm_h%t_surf_green_av(1:surf_usm_h%ns) ) |
---|
1902 | surf_usm_h%t_surf_green_av = 0.0_wp |
---|
1903 | ENDIF |
---|
1904 | ELSE |
---|
1905 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_green_av) ) THEN |
---|
1906 | ALLOCATE ( surf_usm_v(l)%t_surf_green_av(1:surf_usm_v(l)%ns) ) |
---|
1907 | surf_usm_v(l)%t_surf_green_av = 0.0_wp |
---|
1908 | ENDIF |
---|
1909 | ENDIF |
---|
1910 | |
---|
1911 | CASE ( 'usm_theta_10cm' ) |
---|
1912 | ! |
---|
1913 | !-- near surface (10cm) temperature for whole surfaces |
---|
1914 | IF ( l == -1 ) THEN |
---|
1915 | IF ( .NOT. ALLOCATED(surf_usm_h%pt_10cm_av) ) THEN |
---|
1916 | ALLOCATE ( surf_usm_h%pt_10cm_av(1:surf_usm_h%ns) ) |
---|
1917 | surf_usm_h%pt_10cm_av = 0.0_wp |
---|
1918 | ENDIF |
---|
1919 | ELSE |
---|
1920 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%pt_10cm_av) ) THEN |
---|
1921 | ALLOCATE ( surf_usm_v(l)%pt_10cm_av(1:surf_usm_v(l)%ns) ) |
---|
1922 | surf_usm_v(l)%pt_10cm_av = 0.0_wp |
---|
1923 | ENDIF |
---|
1924 | ENDIF |
---|
1925 | |
---|
1926 | CASE ( 'usm_t_wall' ) |
---|
1927 | ! |
---|
1928 | !-- wall temperature for iwl layer of walls and land |
---|
1929 | IF ( l == -1 ) THEN |
---|
1930 | IF ( .NOT. ALLOCATED(surf_usm_h%t_wall_av) ) THEN |
---|
1931 | ALLOCATE ( surf_usm_h%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1932 | surf_usm_h%t_wall_av = 0.0_wp |
---|
1933 | ENDIF |
---|
1934 | ELSE |
---|
1935 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_wall_av) ) THEN |
---|
1936 | ALLOCATE ( surf_usm_v(l)%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1937 | surf_usm_v(l)%t_wall_av = 0.0_wp |
---|
1938 | ENDIF |
---|
1939 | ENDIF |
---|
1940 | |
---|
1941 | CASE ( 'usm_t_window' ) |
---|
1942 | ! |
---|
1943 | !-- window temperature for iwl layer of walls and land |
---|
1944 | IF ( l == -1 ) THEN |
---|
1945 | IF ( .NOT. ALLOCATED(surf_usm_h%t_window_av) ) THEN |
---|
1946 | ALLOCATE ( surf_usm_h%t_window_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1947 | surf_usm_h%t_window_av = 0.0_wp |
---|
1948 | ENDIF |
---|
1949 | ELSE |
---|
1950 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_window_av) ) THEN |
---|
1951 | ALLOCATE ( surf_usm_v(l)%t_window_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1952 | surf_usm_v(l)%t_window_av = 0.0_wp |
---|
1953 | ENDIF |
---|
1954 | ENDIF |
---|
1955 | |
---|
1956 | CASE ( 'usm_t_green' ) |
---|
1957 | ! |
---|
1958 | !-- green temperature for iwl layer of walls and land |
---|
1959 | IF ( l == -1 ) THEN |
---|
1960 | IF ( .NOT. ALLOCATED(surf_usm_h%t_green_av) ) THEN |
---|
1961 | ALLOCATE ( surf_usm_h%t_green_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1962 | surf_usm_h%t_green_av = 0.0_wp |
---|
1963 | ENDIF |
---|
1964 | ELSE |
---|
1965 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_green_av) ) THEN |
---|
1966 | ALLOCATE ( surf_usm_v(l)%t_green_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1967 | surf_usm_v(l)%t_green_av = 0.0_wp |
---|
1968 | ENDIF |
---|
1969 | ENDIF |
---|
1970 | CASE ( 'usm_swc' ) |
---|
1971 | ! |
---|
1972 | !-- soil water content for iwl layer of walls and land |
---|
1973 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%swc_av) ) THEN |
---|
1974 | ALLOCATE ( surf_usm_h%swc_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1975 | surf_usm_h%swc_av = 0.0_wp |
---|
1976 | ELSE |
---|
1977 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%swc_av) ) THEN |
---|
1978 | ALLOCATE ( surf_usm_v(l)%swc_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1979 | surf_usm_v(l)%swc_av = 0.0_wp |
---|
1980 | ENDIF |
---|
1981 | ENDIF |
---|
1982 | |
---|
1983 | CASE DEFAULT |
---|
1984 | CONTINUE |
---|
1985 | |
---|
1986 | END SELECT |
---|
1987 | |
---|
1988 | ELSEIF ( mode == 'sum' ) THEN |
---|
1989 | |
---|
1990 | SELECT CASE ( TRIM( var ) ) |
---|
1991 | |
---|
1992 | CASE ( 'usm_wshf' ) |
---|
1993 | ! |
---|
1994 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
1995 | IF ( l == -1 ) THEN |
---|
1996 | DO m = 1, surf_usm_h%ns |
---|
1997 | surf_usm_h%wshf_eb_av(m) = & |
---|
1998 | surf_usm_h%wshf_eb_av(m) + & |
---|
1999 | surf_usm_h%wshf_eb(m) |
---|
2000 | ENDDO |
---|
2001 | ELSE |
---|
2002 | DO m = 1, surf_usm_v(l)%ns |
---|
2003 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2004 | surf_usm_v(l)%wshf_eb_av(m) + & |
---|
2005 | surf_usm_v(l)%wshf_eb(m) |
---|
2006 | ENDDO |
---|
2007 | ENDIF |
---|
2008 | |
---|
2009 | CASE ( 'usm_qsws' ) |
---|
2010 | ! |
---|
2011 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2012 | IF ( l == -1 ) THEN |
---|
2013 | DO m = 1, surf_usm_h%ns |
---|
2014 | surf_usm_h%qsws_eb_av(m) = & |
---|
2015 | surf_usm_h%qsws_eb_av(m) + & |
---|
2016 | surf_usm_h%qsws_eb(m) |
---|
2017 | ENDDO |
---|
2018 | ELSE |
---|
2019 | DO m = 1, surf_usm_v(l)%ns |
---|
2020 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2021 | surf_usm_v(l)%qsws_eb_av(m) + & |
---|
2022 | surf_usm_v(l)%qsws_eb(m) |
---|
2023 | ENDDO |
---|
2024 | ENDIF |
---|
2025 | |
---|
2026 | CASE ( 'usm_qsws_veg' ) |
---|
2027 | ! |
---|
2028 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2029 | IF ( l == -1 ) THEN |
---|
2030 | DO m = 1, surf_usm_h%ns |
---|
2031 | surf_usm_h%qsws_veg_av(m) = & |
---|
2032 | surf_usm_h%qsws_veg_av(m) + & |
---|
2033 | surf_usm_h%qsws_veg(m) |
---|
2034 | ENDDO |
---|
2035 | ELSE |
---|
2036 | DO m = 1, surf_usm_v(l)%ns |
---|
2037 | surf_usm_v(l)%qsws_veg_av(m) = & |
---|
2038 | surf_usm_v(l)%qsws_veg_av(m) + & |
---|
2039 | surf_usm_v(l)%qsws_veg(m) |
---|
2040 | ENDDO |
---|
2041 | ENDIF |
---|
2042 | |
---|
2043 | CASE ( 'usm_qsws_liq' ) |
---|
2044 | ! |
---|
2045 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2046 | IF ( l == -1 ) THEN |
---|
2047 | DO m = 1, surf_usm_h%ns |
---|
2048 | surf_usm_h%qsws_liq_av(m) = & |
---|
2049 | surf_usm_h%qsws_liq_av(m) + & |
---|
2050 | surf_usm_h%qsws_liq(m) |
---|
2051 | ENDDO |
---|
2052 | ELSE |
---|
2053 | DO m = 1, surf_usm_v(l)%ns |
---|
2054 | surf_usm_v(l)%qsws_liq_av(m) = & |
---|
2055 | surf_usm_v(l)%qsws_liq_av(m) + & |
---|
2056 | surf_usm_v(l)%qsws_liq(m) |
---|
2057 | ENDDO |
---|
2058 | ENDIF |
---|
2059 | |
---|
2060 | CASE ( 'usm_wghf' ) |
---|
2061 | ! |
---|
2062 | !-- array of heat flux from ground (wall, roof, land) |
---|
2063 | IF ( l == -1 ) THEN |
---|
2064 | DO m = 1, surf_usm_h%ns |
---|
2065 | surf_usm_h%wghf_eb_av(m) = & |
---|
2066 | surf_usm_h%wghf_eb_av(m) + & |
---|
2067 | surf_usm_h%wghf_eb(m) |
---|
2068 | ENDDO |
---|
2069 | ELSE |
---|
2070 | DO m = 1, surf_usm_v(l)%ns |
---|
2071 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2072 | surf_usm_v(l)%wghf_eb_av(m) + & |
---|
2073 | surf_usm_v(l)%wghf_eb(m) |
---|
2074 | ENDDO |
---|
2075 | ENDIF |
---|
2076 | |
---|
2077 | CASE ( 'usm_wghf_window' ) |
---|
2078 | ! |
---|
2079 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2080 | IF ( l == -1 ) THEN |
---|
2081 | DO m = 1, surf_usm_h%ns |
---|
2082 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2083 | surf_usm_h%wghf_eb_window_av(m) + & |
---|
2084 | surf_usm_h%wghf_eb_window(m) |
---|
2085 | ENDDO |
---|
2086 | ELSE |
---|
2087 | DO m = 1, surf_usm_v(l)%ns |
---|
2088 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2089 | surf_usm_v(l)%wghf_eb_window_av(m) + & |
---|
2090 | surf_usm_v(l)%wghf_eb_window(m) |
---|
2091 | ENDDO |
---|
2092 | ENDIF |
---|
2093 | |
---|
2094 | CASE ( 'usm_wghf_green' ) |
---|
2095 | ! |
---|
2096 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2097 | IF ( l == -1 ) THEN |
---|
2098 | DO m = 1, surf_usm_h%ns |
---|
2099 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2100 | surf_usm_h%wghf_eb_green_av(m) + & |
---|
2101 | surf_usm_h%wghf_eb_green(m) |
---|
2102 | ENDDO |
---|
2103 | ELSE |
---|
2104 | DO m = 1, surf_usm_v(l)%ns |
---|
2105 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2106 | surf_usm_v(l)%wghf_eb_green_av(m) + & |
---|
2107 | surf_usm_v(l)%wghf_eb_green(m) |
---|
2108 | ENDDO |
---|
2109 | ENDIF |
---|
2110 | |
---|
2111 | CASE ( 'usm_iwghf' ) |
---|
2112 | ! |
---|
2113 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2114 | IF ( l == -1 ) THEN |
---|
2115 | DO m = 1, surf_usm_h%ns |
---|
2116 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2117 | surf_usm_h%iwghf_eb_av(m) + & |
---|
2118 | surf_usm_h%iwghf_eb(m) |
---|
2119 | ENDDO |
---|
2120 | ELSE |
---|
2121 | DO m = 1, surf_usm_v(l)%ns |
---|
2122 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2123 | surf_usm_v(l)%iwghf_eb_av(m) + & |
---|
2124 | surf_usm_v(l)%iwghf_eb(m) |
---|
2125 | ENDDO |
---|
2126 | ENDIF |
---|
2127 | |
---|
2128 | CASE ( 'usm_iwghf_window' ) |
---|
2129 | ! |
---|
2130 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2131 | IF ( l == -1 ) THEN |
---|
2132 | DO m = 1, surf_usm_h%ns |
---|
2133 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2134 | surf_usm_h%iwghf_eb_window_av(m) + & |
---|
2135 | surf_usm_h%iwghf_eb_window(m) |
---|
2136 | ENDDO |
---|
2137 | ELSE |
---|
2138 | DO m = 1, surf_usm_v(l)%ns |
---|
2139 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2140 | surf_usm_v(l)%iwghf_eb_window_av(m) + & |
---|
2141 | surf_usm_v(l)%iwghf_eb_window(m) |
---|
2142 | ENDDO |
---|
2143 | ENDIF |
---|
2144 | |
---|
2145 | CASE ( 'usm_t_surf_wall' ) |
---|
2146 | ! |
---|
2147 | !-- surface temperature for surfaces |
---|
2148 | IF ( l == -1 ) THEN |
---|
2149 | DO m = 1, surf_usm_h%ns |
---|
2150 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2151 | surf_usm_h%t_surf_wall_av(m) + & |
---|
2152 | t_surf_wall_h(m) |
---|
2153 | ENDDO |
---|
2154 | ELSE |
---|
2155 | DO m = 1, surf_usm_v(l)%ns |
---|
2156 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2157 | surf_usm_v(l)%t_surf_wall_av(m) + & |
---|
2158 | t_surf_wall_v(l)%t(m) |
---|
2159 | ENDDO |
---|
2160 | ENDIF |
---|
2161 | |
---|
2162 | CASE ( 'usm_t_surf_window' ) |
---|
2163 | ! |
---|
2164 | !-- surface temperature for window surfaces |
---|
2165 | IF ( l == -1 ) THEN |
---|
2166 | DO m = 1, surf_usm_h%ns |
---|
2167 | surf_usm_h%t_surf_window_av(m) = & |
---|
2168 | surf_usm_h%t_surf_window_av(m) + & |
---|
2169 | t_surf_window_h(m) |
---|
2170 | ENDDO |
---|
2171 | ELSE |
---|
2172 | DO m = 1, surf_usm_v(l)%ns |
---|
2173 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2174 | surf_usm_v(l)%t_surf_window_av(m) + & |
---|
2175 | t_surf_window_v(l)%t(m) |
---|
2176 | ENDDO |
---|
2177 | ENDIF |
---|
2178 | |
---|
2179 | CASE ( 'usm_t_surf_green' ) |
---|
2180 | ! |
---|
2181 | !-- surface temperature for green surfaces |
---|
2182 | IF ( l == -1 ) THEN |
---|
2183 | DO m = 1, surf_usm_h%ns |
---|
2184 | surf_usm_h%t_surf_green_av(m) = & |
---|
2185 | surf_usm_h%t_surf_green_av(m) + & |
---|
2186 | t_surf_green_h(m) |
---|
2187 | ENDDO |
---|
2188 | ELSE |
---|
2189 | DO m = 1, surf_usm_v(l)%ns |
---|
2190 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2191 | surf_usm_v(l)%t_surf_green_av(m) + & |
---|
2192 | t_surf_green_v(l)%t(m) |
---|
2193 | ENDDO |
---|
2194 | ENDIF |
---|
2195 | |
---|
2196 | CASE ( 'usm_theta_10cm' ) |
---|
2197 | ! |
---|
2198 | !-- near surface temperature for whole surfaces |
---|
2199 | IF ( l == -1 ) THEN |
---|
2200 | DO m = 1, surf_usm_h%ns |
---|
2201 | surf_usm_h%pt_10cm_av(m) = & |
---|
2202 | surf_usm_h%pt_10cm_av(m) + & |
---|
2203 | surf_usm_h%pt_10cm(m) |
---|
2204 | ENDDO |
---|
2205 | ELSE |
---|
2206 | DO m = 1, surf_usm_v(l)%ns |
---|
2207 | surf_usm_v(l)%pt_10cm_av(m) = & |
---|
2208 | surf_usm_v(l)%pt_10cm_av(m) + & |
---|
2209 | surf_usm_v(l)%pt_10cm(m) |
---|
2210 | ENDDO |
---|
2211 | ENDIF |
---|
2212 | |
---|
2213 | CASE ( 'usm_t_wall' ) |
---|
2214 | ! |
---|
2215 | !-- wall temperature for iwl layer of walls and land |
---|
2216 | IF ( l == -1 ) THEN |
---|
2217 | DO m = 1, surf_usm_h%ns |
---|
2218 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
2219 | surf_usm_h%t_wall_av(iwl,m) + & |
---|
2220 | t_wall_h(iwl,m) |
---|
2221 | ENDDO |
---|
2222 | ELSE |
---|
2223 | DO m = 1, surf_usm_v(l)%ns |
---|
2224 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
2225 | surf_usm_v(l)%t_wall_av(iwl,m) + & |
---|
2226 | t_wall_v(l)%t(iwl,m) |
---|
2227 | ENDDO |
---|
2228 | ENDIF |
---|
2229 | |
---|
2230 | CASE ( 'usm_t_window' ) |
---|
2231 | ! |
---|
2232 | !-- window temperature for iwl layer of walls and land |
---|
2233 | IF ( l == -1 ) THEN |
---|
2234 | DO m = 1, surf_usm_h%ns |
---|
2235 | surf_usm_h%t_window_av(iwl,m) = & |
---|
2236 | surf_usm_h%t_window_av(iwl,m) + & |
---|
2237 | t_window_h(iwl,m) |
---|
2238 | ENDDO |
---|
2239 | ELSE |
---|
2240 | DO m = 1, surf_usm_v(l)%ns |
---|
2241 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
2242 | surf_usm_v(l)%t_window_av(iwl,m) + & |
---|
2243 | t_window_v(l)%t(iwl,m) |
---|
2244 | ENDDO |
---|
2245 | ENDIF |
---|
2246 | |
---|
2247 | CASE ( 'usm_t_green' ) |
---|
2248 | ! |
---|
2249 | !-- green temperature for iwl layer of walls and land |
---|
2250 | IF ( l == -1 ) THEN |
---|
2251 | DO m = 1, surf_usm_h%ns |
---|
2252 | surf_usm_h%t_green_av(iwl,m) = & |
---|
2253 | surf_usm_h%t_green_av(iwl,m) + & |
---|
2254 | t_green_h(iwl,m) |
---|
2255 | ENDDO |
---|
2256 | ELSE |
---|
2257 | DO m = 1, surf_usm_v(l)%ns |
---|
2258 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
2259 | surf_usm_v(l)%t_green_av(iwl,m) + & |
---|
2260 | t_green_v(l)%t(iwl,m) |
---|
2261 | ENDDO |
---|
2262 | ENDIF |
---|
2263 | |
---|
2264 | CASE ( 'usm_swc' ) |
---|
2265 | ! |
---|
2266 | !-- soil water content for iwl layer of walls and land |
---|
2267 | IF ( l == -1 ) THEN |
---|
2268 | DO m = 1, surf_usm_h%ns |
---|
2269 | surf_usm_h%swc_av(iwl,m) = & |
---|
2270 | surf_usm_h%swc_av(iwl,m) + & |
---|
2271 | swc_h(iwl,m) |
---|
2272 | ENDDO |
---|
2273 | ELSE |
---|
2274 | DO m = 1, surf_usm_v(l)%ns |
---|
2275 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
2276 | surf_usm_v(l)%swc_av(iwl,m) + & |
---|
2277 | swc_v(l)%t(iwl,m) |
---|
2278 | ENDDO |
---|
2279 | ENDIF |
---|
2280 | |
---|
2281 | CASE DEFAULT |
---|
2282 | CONTINUE |
---|
2283 | |
---|
2284 | END SELECT |
---|
2285 | |
---|
2286 | ELSEIF ( mode == 'average' ) THEN |
---|
2287 | |
---|
2288 | SELECT CASE ( TRIM( var ) ) |
---|
2289 | |
---|
2290 | CASE ( 'usm_wshf' ) |
---|
2291 | ! |
---|
2292 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2293 | IF ( l == -1 ) THEN |
---|
2294 | DO m = 1, surf_usm_h%ns |
---|
2295 | surf_usm_h%wshf_eb_av(m) = & |
---|
2296 | surf_usm_h%wshf_eb_av(m) / & |
---|
2297 | REAL( average_count_3d, kind=wp ) |
---|
2298 | ENDDO |
---|
2299 | ELSE |
---|
2300 | DO m = 1, surf_usm_v(l)%ns |
---|
2301 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2302 | surf_usm_v(l)%wshf_eb_av(m) / & |
---|
2303 | REAL( average_count_3d, kind=wp ) |
---|
2304 | ENDDO |
---|
2305 | ENDIF |
---|
2306 | |
---|
2307 | CASE ( 'usm_qsws' ) |
---|
2308 | ! |
---|
2309 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2310 | IF ( l == -1 ) THEN |
---|
2311 | DO m = 1, surf_usm_h%ns |
---|
2312 | surf_usm_h%qsws_eb_av(m) = & |
---|
2313 | surf_usm_h%qsws_eb_av(m) / & |
---|
2314 | REAL( average_count_3d, kind=wp ) |
---|
2315 | ENDDO |
---|
2316 | ELSE |
---|
2317 | DO m = 1, surf_usm_v(l)%ns |
---|
2318 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2319 | surf_usm_v(l)%qsws_eb_av(m) / & |
---|
2320 | REAL( average_count_3d, kind=wp ) |
---|
2321 | ENDDO |
---|
2322 | ENDIF |
---|
2323 | |
---|
2324 | CASE ( 'usm_qsws_veg' ) |
---|
2325 | ! |
---|
2326 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2327 | IF ( l == -1 ) THEN |
---|
2328 | DO m = 1, surf_usm_h%ns |
---|
2329 | surf_usm_h%qsws_veg_av(m) = & |
---|
2330 | surf_usm_h%qsws_veg_av(m) / & |
---|
2331 | REAL( average_count_3d, kind=wp ) |
---|
2332 | ENDDO |
---|
2333 | ELSE |
---|
2334 | DO m = 1, surf_usm_v(l)%ns |
---|
2335 | surf_usm_v(l)%qsws_veg_av(m) = & |
---|
2336 | surf_usm_v(l)%qsws_veg_av(m) / & |
---|
2337 | REAL( average_count_3d, kind=wp ) |
---|
2338 | ENDDO |
---|
2339 | ENDIF |
---|
2340 | |
---|
2341 | CASE ( 'usm_qsws_liq' ) |
---|
2342 | ! |
---|
2343 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2344 | IF ( l == -1 ) THEN |
---|
2345 | DO m = 1, surf_usm_h%ns |
---|
2346 | surf_usm_h%qsws_liq_av(m) = & |
---|
2347 | surf_usm_h%qsws_liq_av(m) / & |
---|
2348 | REAL( average_count_3d, kind=wp ) |
---|
2349 | ENDDO |
---|
2350 | ELSE |
---|
2351 | DO m = 1, surf_usm_v(l)%ns |
---|
2352 | surf_usm_v(l)%qsws_liq_av(m) = & |
---|
2353 | surf_usm_v(l)%qsws_liq_av(m) / & |
---|
2354 | REAL( average_count_3d, kind=wp ) |
---|
2355 | ENDDO |
---|
2356 | ENDIF |
---|
2357 | |
---|
2358 | CASE ( 'usm_wghf' ) |
---|
2359 | ! |
---|
2360 | !-- array of heat flux from ground (wall, roof, land) |
---|
2361 | IF ( l == -1 ) THEN |
---|
2362 | DO m = 1, surf_usm_h%ns |
---|
2363 | surf_usm_h%wghf_eb_av(m) = & |
---|
2364 | surf_usm_h%wghf_eb_av(m) / & |
---|
2365 | REAL( average_count_3d, kind=wp ) |
---|
2366 | ENDDO |
---|
2367 | ELSE |
---|
2368 | DO m = 1, surf_usm_v(l)%ns |
---|
2369 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2370 | surf_usm_v(l)%wghf_eb_av(m) / & |
---|
2371 | REAL( average_count_3d, kind=wp ) |
---|
2372 | ENDDO |
---|
2373 | ENDIF |
---|
2374 | |
---|
2375 | CASE ( 'usm_wghf_window' ) |
---|
2376 | ! |
---|
2377 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2378 | IF ( l == -1 ) THEN |
---|
2379 | DO m = 1, surf_usm_h%ns |
---|
2380 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2381 | surf_usm_h%wghf_eb_window_av(m) / & |
---|
2382 | REAL( average_count_3d, kind=wp ) |
---|
2383 | ENDDO |
---|
2384 | ELSE |
---|
2385 | DO m = 1, surf_usm_v(l)%ns |
---|
2386 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2387 | surf_usm_v(l)%wghf_eb_window_av(m) / & |
---|
2388 | REAL( average_count_3d, kind=wp ) |
---|
2389 | ENDDO |
---|
2390 | ENDIF |
---|
2391 | |
---|
2392 | CASE ( 'usm_wghf_green' ) |
---|
2393 | ! |
---|
2394 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2395 | IF ( l == -1 ) THEN |
---|
2396 | DO m = 1, surf_usm_h%ns |
---|
2397 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2398 | surf_usm_h%wghf_eb_green_av(m) / & |
---|
2399 | REAL( average_count_3d, kind=wp ) |
---|
2400 | ENDDO |
---|
2401 | ELSE |
---|
2402 | DO m = 1, surf_usm_v(l)%ns |
---|
2403 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2404 | surf_usm_v(l)%wghf_eb_green_av(m) / & |
---|
2405 | REAL( average_count_3d, kind=wp ) |
---|
2406 | ENDDO |
---|
2407 | ENDIF |
---|
2408 | |
---|
2409 | CASE ( 'usm_iwghf' ) |
---|
2410 | ! |
---|
2411 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2412 | IF ( l == -1 ) THEN |
---|
2413 | DO m = 1, surf_usm_h%ns |
---|
2414 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2415 | surf_usm_h%iwghf_eb_av(m) / & |
---|
2416 | REAL( average_count_3d, kind=wp ) |
---|
2417 | ENDDO |
---|
2418 | ELSE |
---|
2419 | DO m = 1, surf_usm_v(l)%ns |
---|
2420 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2421 | surf_usm_v(l)%iwghf_eb_av(m) / & |
---|
2422 | REAL( average_count_3d, kind=wp ) |
---|
2423 | ENDDO |
---|
2424 | ENDIF |
---|
2425 | |
---|
2426 | CASE ( 'usm_iwghf_window' ) |
---|
2427 | ! |
---|
2428 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2429 | IF ( l == -1 ) THEN |
---|
2430 | DO m = 1, surf_usm_h%ns |
---|
2431 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2432 | surf_usm_h%iwghf_eb_window_av(m) / & |
---|
2433 | REAL( average_count_3d, kind=wp ) |
---|
2434 | ENDDO |
---|
2435 | ELSE |
---|
2436 | DO m = 1, surf_usm_v(l)%ns |
---|
2437 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2438 | surf_usm_v(l)%iwghf_eb_window_av(m) / & |
---|
2439 | REAL( average_count_3d, kind=wp ) |
---|
2440 | ENDDO |
---|
2441 | ENDIF |
---|
2442 | |
---|
2443 | CASE ( 'usm_t_surf_wall' ) |
---|
2444 | ! |
---|
2445 | !-- surface temperature for surfaces |
---|
2446 | IF ( l == -1 ) THEN |
---|
2447 | DO m = 1, surf_usm_h%ns |
---|
2448 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2449 | surf_usm_h%t_surf_wall_av(m) / & |
---|
2450 | REAL( average_count_3d, kind=wp ) |
---|
2451 | ENDDO |
---|
2452 | ELSE |
---|
2453 | DO m = 1, surf_usm_v(l)%ns |
---|
2454 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2455 | surf_usm_v(l)%t_surf_wall_av(m) / & |
---|
2456 | REAL( average_count_3d, kind=wp ) |
---|
2457 | ENDDO |
---|
2458 | ENDIF |
---|
2459 | |
---|
2460 | CASE ( 'usm_t_surf_window' ) |
---|
2461 | ! |
---|
2462 | !-- surface temperature for window surfaces |
---|
2463 | IF ( l == -1 ) THEN |
---|
2464 | DO m = 1, surf_usm_h%ns |
---|
2465 | surf_usm_h%t_surf_window_av(m) = & |
---|
2466 | surf_usm_h%t_surf_window_av(m) / & |
---|
2467 | REAL( average_count_3d, kind=wp ) |
---|
2468 | ENDDO |
---|
2469 | ELSE |
---|
2470 | DO m = 1, surf_usm_v(l)%ns |
---|
2471 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2472 | surf_usm_v(l)%t_surf_window_av(m) / & |
---|
2473 | REAL( average_count_3d, kind=wp ) |
---|
2474 | ENDDO |
---|
2475 | ENDIF |
---|
2476 | |
---|
2477 | CASE ( 'usm_t_surf_green' ) |
---|
2478 | ! |
---|
2479 | !-- surface temperature for green surfaces |
---|
2480 | IF ( l == -1 ) THEN |
---|
2481 | DO m = 1, surf_usm_h%ns |
---|
2482 | surf_usm_h%t_surf_green_av(m) = & |
---|
2483 | surf_usm_h%t_surf_green_av(m) / & |
---|
2484 | REAL( average_count_3d, kind=wp ) |
---|
2485 | ENDDO |
---|
2486 | ELSE |
---|
2487 | DO m = 1, surf_usm_v(l)%ns |
---|
2488 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2489 | surf_usm_v(l)%t_surf_green_av(m) / & |
---|
2490 | REAL( average_count_3d, kind=wp ) |
---|
2491 | ENDDO |
---|
2492 | ENDIF |
---|
2493 | |
---|
2494 | CASE ( 'usm_theta_10cm' ) |
---|
2495 | ! |
---|
2496 | !-- near surface temperature for whole surfaces |
---|
2497 | IF ( l == -1 ) THEN |
---|
2498 | DO m = 1, surf_usm_h%ns |
---|
2499 | surf_usm_h%pt_10cm_av(m) = & |
---|
2500 | surf_usm_h%pt_10cm_av(m) / & |
---|
2501 | REAL( average_count_3d, kind=wp ) |
---|
2502 | ENDDO |
---|
2503 | ELSE |
---|
2504 | DO m = 1, surf_usm_v(l)%ns |
---|
2505 | surf_usm_v(l)%pt_10cm_av(m) = & |
---|
2506 | surf_usm_v(l)%pt_10cm_av(m) / & |
---|
2507 | REAL( average_count_3d, kind=wp ) |
---|
2508 | ENDDO |
---|
2509 | ENDIF |
---|
2510 | |
---|
2511 | |
---|
2512 | CASE ( 'usm_t_wall' ) |
---|
2513 | ! |
---|
2514 | !-- wall temperature for iwl layer of walls and land |
---|
2515 | IF ( l == -1 ) THEN |
---|
2516 | DO m = 1, surf_usm_h%ns |
---|
2517 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
2518 | surf_usm_h%t_wall_av(iwl,m) / & |
---|
2519 | REAL( average_count_3d, kind=wp ) |
---|
2520 | ENDDO |
---|
2521 | ELSE |
---|
2522 | DO m = 1, surf_usm_v(l)%ns |
---|
2523 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
2524 | surf_usm_v(l)%t_wall_av(iwl,m) / & |
---|
2525 | REAL( average_count_3d, kind=wp ) |
---|
2526 | ENDDO |
---|
2527 | ENDIF |
---|
2528 | |
---|
2529 | CASE ( 'usm_t_window' ) |
---|
2530 | ! |
---|
2531 | !-- window temperature for iwl layer of walls and land |
---|
2532 | IF ( l == -1 ) THEN |
---|
2533 | DO m = 1, surf_usm_h%ns |
---|
2534 | surf_usm_h%t_window_av(iwl,m) = & |
---|
2535 | surf_usm_h%t_window_av(iwl,m) / & |
---|
2536 | REAL( average_count_3d, kind=wp ) |
---|
2537 | ENDDO |
---|
2538 | ELSE |
---|
2539 | DO m = 1, surf_usm_v(l)%ns |
---|
2540 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
2541 | surf_usm_v(l)%t_window_av(iwl,m) / & |
---|
2542 | REAL( average_count_3d, kind=wp ) |
---|
2543 | ENDDO |
---|
2544 | ENDIF |
---|
2545 | |
---|
2546 | CASE ( 'usm_t_green' ) |
---|
2547 | ! |
---|
2548 | !-- green temperature for iwl layer of walls and land |
---|
2549 | IF ( l == -1 ) THEN |
---|
2550 | DO m = 1, surf_usm_h%ns |
---|
2551 | surf_usm_h%t_green_av(iwl,m) = & |
---|
2552 | surf_usm_h%t_green_av(iwl,m) / & |
---|
2553 | REAL( average_count_3d, kind=wp ) |
---|
2554 | ENDDO |
---|
2555 | ELSE |
---|
2556 | DO m = 1, surf_usm_v(l)%ns |
---|
2557 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
2558 | surf_usm_v(l)%t_green_av(iwl,m) / & |
---|
2559 | REAL( average_count_3d, kind=wp ) |
---|
2560 | ENDDO |
---|
2561 | ENDIF |
---|
2562 | |
---|
2563 | CASE ( 'usm_swc' ) |
---|
2564 | ! |
---|
2565 | !-- soil water content for iwl layer of walls and land |
---|
2566 | IF ( l == -1 ) THEN |
---|
2567 | DO m = 1, surf_usm_h%ns |
---|
2568 | surf_usm_h%swc_av(iwl,m) = & |
---|
2569 | surf_usm_h%swc_av(iwl,m) / & |
---|
2570 | REAL( average_count_3d, kind=wp ) |
---|
2571 | ENDDO |
---|
2572 | ELSE |
---|
2573 | DO m = 1, surf_usm_v(l)%ns |
---|
2574 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
2575 | surf_usm_v(l)%swc_av(iwl,m) / & |
---|
2576 | REAL( average_count_3d, kind=wp ) |
---|
2577 | ENDDO |
---|
2578 | ENDIF |
---|
2579 | |
---|
2580 | |
---|
2581 | END SELECT |
---|
2582 | |
---|
2583 | ENDIF |
---|
2584 | |
---|
2585 | ENDIF |
---|
2586 | |
---|
2587 | END SUBROUTINE usm_3d_data_averaging |
---|
2588 | |
---|
2589 | |
---|
2590 | |
---|
2591 | !------------------------------------------------------------------------------! |
---|
2592 | ! Description: |
---|
2593 | ! ------------ |
---|
2594 | !> Set internal Neumann boundary condition at outer soil grid points |
---|
2595 | !> for temperature and humidity. |
---|
2596 | !------------------------------------------------------------------------------! |
---|
2597 | SUBROUTINE usm_boundary_condition |
---|
2598 | |
---|
2599 | IMPLICIT NONE |
---|
2600 | |
---|
2601 | INTEGER(iwp) :: i !< grid index x-direction |
---|
2602 | INTEGER(iwp) :: ioff !< offset index x-direction indicating location of soil grid point |
---|
2603 | INTEGER(iwp) :: j !< grid index y-direction |
---|
2604 | INTEGER(iwp) :: joff !< offset index x-direction indicating location of soil grid point |
---|
2605 | INTEGER(iwp) :: k !< grid index z-direction |
---|
2606 | INTEGER(iwp) :: koff !< offset index x-direction indicating location of soil grid point |
---|
2607 | INTEGER(iwp) :: l !< running index surface-orientation |
---|
2608 | INTEGER(iwp) :: m !< running index surface elements |
---|
2609 | |
---|
2610 | koff = surf_usm_h%koff |
---|
2611 | DO m = 1, surf_usm_h%ns |
---|
2612 | i = surf_usm_h%i(m) |
---|
2613 | j = surf_usm_h%j(m) |
---|
2614 | k = surf_usm_h%k(m) |
---|
2615 | pt(k+koff,j,i) = pt(k,j,i) |
---|
2616 | ENDDO |
---|
2617 | |
---|
2618 | DO l = 0, 3 |
---|
2619 | ioff = surf_usm_v(l)%ioff |
---|
2620 | joff = surf_usm_v(l)%joff |
---|
2621 | DO m = 1, surf_usm_v(l)%ns |
---|
2622 | i = surf_usm_v(l)%i(m) |
---|
2623 | j = surf_usm_v(l)%j(m) |
---|
2624 | k = surf_usm_v(l)%k(m) |
---|
2625 | pt(k,j+joff,i+ioff) = pt(k,j,i) |
---|
2626 | ENDDO |
---|
2627 | ENDDO |
---|
2628 | |
---|
2629 | END SUBROUTINE usm_boundary_condition |
---|
2630 | |
---|
2631 | |
---|
2632 | !------------------------------------------------------------------------------! |
---|
2633 | ! |
---|
2634 | ! Description: |
---|
2635 | ! ------------ |
---|
2636 | !> Subroutine checks variables and assigns units. |
---|
2637 | !> It is called out from subroutine check_parameters. |
---|
2638 | !------------------------------------------------------------------------------! |
---|
2639 | SUBROUTINE usm_check_data_output( variable, unit ) |
---|
2640 | |
---|
2641 | IMPLICIT NONE |
---|
2642 | |
---|
2643 | CHARACTER(LEN=*),INTENT(IN) :: variable !< |
---|
2644 | CHARACTER(LEN=*),INTENT(OUT) :: unit !< |
---|
2645 | |
---|
2646 | INTEGER(iwp) :: i,j,l !< index |
---|
2647 | CHARACTER(LEN=2) :: ls |
---|
2648 | CHARACTER(LEN=varnamelength) :: var !< TRIM(variable) |
---|
2649 | INTEGER(iwp), PARAMETER :: nl1 = 16 !< number of directional usm variables |
---|
2650 | CHARACTER(LEN=varnamelength), DIMENSION(nl1) :: varlist1 = & !< list of directional usm variables |
---|
2651 | (/'usm_wshf ', & |
---|
2652 | 'usm_wghf ', & |
---|
2653 | 'usm_wghf_window ', & |
---|
2654 | 'usm_wghf_green ', & |
---|
2655 | 'usm_iwghf ', & |
---|
2656 | 'usm_iwghf_window ', & |
---|
2657 | 'usm_surfz ', & |
---|
2658 | 'usm_surfwintrans ', & |
---|
2659 | 'usm_surfcat ', & |
---|
2660 | 'usm_surfalb ', & |
---|
2661 | 'usm_surfemis ', & |
---|
2662 | 'usm_t_surf_wall ', & |
---|
2663 | 'usm_t_surf_window ', & |
---|
2664 | 'usm_t_surf_green ', & |
---|
2665 | 'usm_t_green ', & |
---|
2666 | 'usm_theta_10cm '/) |
---|
2667 | |
---|
2668 | INTEGER(iwp), PARAMETER :: nl2 = 3 !< number of directional layer usm variables |
---|
2669 | CHARACTER(LEN=varnamelength), DIMENSION(nl2) :: varlist2 = & !< list of directional layer usm variables |
---|
2670 | (/'usm_t_wall ', & |
---|
2671 | 'usm_t_window ', & |
---|
2672 | 'usm_t_green '/) |
---|
2673 | |
---|
2674 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
2675 | CHARACTER(LEN=6), DIMENSION(nd), PARAMETER :: dirname = & !< direction names |
---|
2676 | (/'_roof ','_south','_north','_west ','_east '/) |
---|
2677 | LOGICAL :: lfound !< flag if the variable is found |
---|
2678 | |
---|
2679 | |
---|
2680 | lfound = .FALSE. |
---|
2681 | |
---|
2682 | var = TRIM(variable) |
---|
2683 | |
---|
2684 | ! |
---|
2685 | !-- check if variable exists |
---|
2686 | !-- directional variables |
---|
2687 | DO i = 1, nl1 |
---|
2688 | DO j = 1, nd |
---|
2689 | IF ( TRIM(var) == TRIM(varlist1(i))//TRIM(dirname(j)) ) THEN |
---|
2690 | lfound = .TRUE. |
---|
2691 | EXIT |
---|
2692 | ENDIF |
---|
2693 | IF ( lfound ) EXIT |
---|
2694 | ENDDO |
---|
2695 | ENDDO |
---|
2696 | IF ( lfound ) GOTO 10 |
---|
2697 | ! |
---|
2698 | !-- directional layer variables |
---|
2699 | DO i = 1, nl2 |
---|
2700 | DO j = 1, nd |
---|
2701 | DO l = nzb_wall, nzt_wall |
---|
2702 | WRITE(ls,'(A1,I1)') '_',l |
---|
2703 | IF ( TRIM(var) == TRIM(varlist2(i))//TRIM(ls)//TRIM(dirname(j)) ) THEN |
---|
2704 | lfound = .TRUE. |
---|
2705 | EXIT |
---|
2706 | ENDIF |
---|
2707 | ENDDO |
---|
2708 | IF ( lfound ) EXIT |
---|
2709 | ENDDO |
---|
2710 | ENDDO |
---|
2711 | IF ( .NOT. lfound ) THEN |
---|
2712 | unit = 'illegal' |
---|
2713 | RETURN |
---|
2714 | ENDIF |
---|
2715 | 10 CONTINUE |
---|
2716 | |
---|
2717 | IF ( var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
2718 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
2719 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
2720 | var(1:17) == 'usm_surfwintrans_' .OR. & |
---|
2721 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
2722 | var(1:13) == 'usm_qsws_liq_' ) THEN |
---|
2723 | unit = 'W/m2' |
---|
2724 | ELSE IF ( var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
2725 | var(1:12) == 'usm_t_window' .OR. var(1:17) == 'usm_t_surf_window' .OR. & |
---|
2726 | var(1:16) == 'usm_t_surf_green' .OR. & |
---|
2727 | var(1:11) == 'usm_t_green' .OR. var(1:7) == 'usm_swc' .OR. & |
---|
2728 | var(1:14) == 'usm_theta_10cm' ) THEN |
---|
2729 | unit = 'K' |
---|
2730 | ELSE IF ( var(1:9) == 'usm_surfz' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
2731 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' ) THEN |
---|
2732 | unit = '1' |
---|
2733 | ELSE |
---|
2734 | unit = 'illegal' |
---|
2735 | ENDIF |
---|
2736 | |
---|
2737 | END SUBROUTINE usm_check_data_output |
---|
2738 | |
---|
2739 | |
---|
2740 | !------------------------------------------------------------------------------! |
---|
2741 | ! Description: |
---|
2742 | ! ------------ |
---|
2743 | !> Check parameters routine for urban surface model |
---|
2744 | !------------------------------------------------------------------------------! |
---|
2745 | SUBROUTINE usm_check_parameters |
---|
2746 | |
---|
2747 | USE control_parameters, & |
---|
2748 | ONLY: bc_pt_b, bc_q_b, constant_flux_layer, large_scale_forcing, & |
---|
2749 | lsf_surf, topography |
---|
2750 | |
---|
2751 | USE netcdf_data_input_mod, & |
---|
2752 | ONLY: building_type_f |
---|
2753 | |
---|
2754 | IMPLICIT NONE |
---|
2755 | |
---|
2756 | INTEGER(iwp) :: i !< running index, x-dimension |
---|
2757 | INTEGER(iwp) :: j !< running index, y-dimension |
---|
2758 | |
---|
2759 | ! |
---|
2760 | !-- Dirichlet boundary conditions are required as the surface fluxes are |
---|
2761 | !-- calculated from the temperature/humidity gradients in the urban surface |
---|
2762 | !-- model |
---|
2763 | IF ( bc_pt_b == 'neumann' .OR. bc_q_b == 'neumann' ) THEN |
---|
2764 | message_string = 'urban surface model requires setting of '// & |
---|
2765 | 'bc_pt_b = "dirichlet" and '// & |
---|
2766 | 'bc_q_b = "dirichlet"' |
---|
2767 | CALL message( 'usm_check_parameters', 'PA0590', 1, 2, 0, 6, 0 ) |
---|
2768 | ENDIF |
---|
2769 | |
---|
2770 | IF ( .NOT. constant_flux_layer ) THEN |
---|
2771 | message_string = 'urban surface model requires '// & |
---|
2772 | 'constant_flux_layer = .T.' |
---|
2773 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
2774 | ENDIF |
---|
2775 | |
---|
2776 | IF ( .NOT. radiation ) THEN |
---|
2777 | message_string = 'urban surface model requires '// & |
---|
2778 | 'the radiation model to be switched on' |
---|
2779 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
2780 | ENDIF |
---|
2781 | ! |
---|
2782 | !-- Surface forcing has to be disabled for LSF in case of enabled |
---|
2783 | !-- urban surface module |
---|
2784 | IF ( large_scale_forcing ) THEN |
---|
2785 | lsf_surf = .FALSE. |
---|
2786 | ENDIF |
---|
2787 | ! |
---|
2788 | !-- Topography |
---|
2789 | IF ( topography == 'flat' ) THEN |
---|
2790 | message_string = 'topography /= "flat" is required '// & |
---|
2791 | 'when using the urban surface model' |
---|
2792 | CALL message( 'usm_check_parameters', 'PA0592', 1, 2, 0, 6, 0 ) |
---|
2793 | ENDIF |
---|
2794 | ! |
---|
2795 | !-- naheatlayers |
---|
2796 | IF ( naheatlayers > nzt ) THEN |
---|
2797 | message_string = 'number of anthropogenic heat layers '// & |
---|
2798 | '"naheatlayers" can not be larger than'// & |
---|
2799 | ' number of domain layers "nzt"' |
---|
2800 | CALL message( 'usm_check_parameters', 'PA0593', 1, 2, 0, 6, 0 ) |
---|
2801 | ENDIF |
---|
2802 | ! |
---|
2803 | !-- Check if building types are set within a valid range. |
---|
2804 | IF ( building_type < LBOUND( building_pars, 2 ) .AND. & |
---|
2805 | building_type > UBOUND( building_pars, 2 ) ) THEN |
---|
2806 | WRITE( message_string, * ) 'building_type = ', building_type, & |
---|
2807 | ' is out of the valid range' |
---|
2808 | CALL message( 'usm_check_parameters', 'PA0529', 2, 2, 0, 6, 0 ) |
---|
2809 | ENDIF |
---|
2810 | IF ( building_type_f%from_file ) THEN |
---|
2811 | DO i = nxl, nxr |
---|
2812 | DO j = nys, nyn |
---|
2813 | IF ( building_type_f%var(j,i) /= building_type_f%fill .AND. & |
---|
2814 | ( building_type_f%var(j,i) < LBOUND( building_pars, 2 ) .OR. & |
---|
2815 | building_type_f%var(j,i) > UBOUND( building_pars, 2 ) ) ) & |
---|
2816 | THEN |
---|
2817 | WRITE( message_string, * ) 'building_type = is out of ' // & |
---|
2818 | 'the valid range at (j,i) = ', j, i |
---|
2819 | CALL message( 'usm_check_parameters', 'PA0529', 2, 2, 0, 6, 0 ) |
---|
2820 | ENDIF |
---|
2821 | ENDDO |
---|
2822 | ENDDO |
---|
2823 | ENDIF |
---|
2824 | END SUBROUTINE usm_check_parameters |
---|
2825 | |
---|
2826 | |
---|
2827 | !------------------------------------------------------------------------------! |
---|
2828 | ! |
---|
2829 | ! Description: |
---|
2830 | ! ------------ |
---|
2831 | !> Output of the 3D-arrays in netCDF and/or AVS format |
---|
2832 | !> for variables of urban_surface model. |
---|
2833 | !> It resorts the urban surface module output quantities from surf style |
---|
2834 | !> indexing into temporary 3D array with indices (i,j,k). |
---|
2835 | !> It is called from subroutine data_output_3d. |
---|
2836 | !------------------------------------------------------------------------------! |
---|
2837 | SUBROUTINE usm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
2838 | |
---|
2839 | IMPLICIT NONE |
---|
2840 | |
---|
2841 | INTEGER(iwp), INTENT(IN) :: av !< flag if averaged |
---|
2842 | CHARACTER (len=*), INTENT(IN) :: variable !< variable name |
---|
2843 | INTEGER(iwp), INTENT(IN) :: nzb_do !< lower limit of the data output (usually 0) |
---|
2844 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) |
---|
2845 | LOGICAL, INTENT(OUT) :: found !< |
---|
2846 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< sp - it has to correspond to module data_output_3d |
---|
2847 | REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: temp_pf !< temp array for urban surface output procedure |
---|
2848 | |
---|
2849 | CHARACTER (len=varnamelength) :: var !< trimmed variable name |
---|
2850 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
2851 | CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
2852 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
2853 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: diridx = (/ -1, 1, 0, 3, 2 /) |
---|
2854 | !< index for surf_*_v: 0:3 = (North, South, East, West) |
---|
2855 | INTEGER(iwp) :: ids,idsint,idsidx |
---|
2856 | INTEGER(iwp) :: i,j,k,iwl,istat, l, m !< running indices |
---|
2857 | |
---|
2858 | found = .TRUE. |
---|
2859 | temp_pf = -1._wp |
---|
2860 | |
---|
2861 | ids = -1 |
---|
2862 | var = TRIM(variable) |
---|
2863 | DO i = 0, nd-1 |
---|
2864 | k = len(TRIM(var)) |
---|
2865 | j = len(TRIM(dirname(i))) |
---|
2866 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
2867 | ids = i |
---|
2868 | idsint = dirint(ids) |
---|
2869 | idsidx = diridx(ids) |
---|
2870 | var = var(:k-j) |
---|
2871 | EXIT |
---|
2872 | ENDIF |
---|
2873 | ENDDO |
---|
2874 | IF ( ids == -1 ) THEN |
---|
2875 | var = TRIM(variable) |
---|
2876 | ENDIF |
---|
2877 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
2878 | ! |
---|
2879 | !-- wall layers |
---|
2880 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
2881 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2882 | var = var(1:10) |
---|
2883 | ENDIF |
---|
2884 | ENDIF |
---|
2885 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
2886 | ! |
---|
2887 | !-- window layers |
---|
2888 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
2889 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2890 | var = var(1:12) |
---|
2891 | ENDIF |
---|
2892 | ENDIF |
---|
2893 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
2894 | ! |
---|
2895 | !-- green layers |
---|
2896 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
2897 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2898 | var = var(1:11) |
---|
2899 | ENDIF |
---|
2900 | ENDIF |
---|
2901 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
2902 | ! |
---|
2903 | !-- green layers soil water content |
---|
2904 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
2905 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2906 | var = var(1:7) |
---|
2907 | ENDIF |
---|
2908 | ENDIF |
---|
2909 | |
---|
2910 | SELECT CASE ( TRIM(var) ) |
---|
2911 | |
---|
2912 | CASE ( 'usm_surfz' ) |
---|
2913 | ! |
---|
2914 | !-- array of surface height (z) |
---|
2915 | IF ( idsint == iup_u ) THEN |
---|
2916 | DO m = 1, surf_usm_h%ns |
---|
2917 | i = surf_usm_h%i(m) |
---|
2918 | j = surf_usm_h%j(m) |
---|
2919 | k = surf_usm_h%k(m) |
---|
2920 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) ) |
---|
2921 | ENDDO |
---|
2922 | ELSE |
---|
2923 | l = idsidx |
---|
2924 | DO m = 1, surf_usm_v(l)%ns |
---|
2925 | i = surf_usm_v(l)%i(m) |
---|
2926 | j = surf_usm_v(l)%j(m) |
---|
2927 | k = surf_usm_v(l)%k(m) |
---|
2928 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) + 1.0_wp ) |
---|
2929 | ENDDO |
---|
2930 | ENDIF |
---|
2931 | |
---|
2932 | CASE ( 'usm_surfcat' ) |
---|
2933 | ! |
---|
2934 | !-- surface category |
---|
2935 | IF ( idsint == iup_u ) THEN |
---|
2936 | DO m = 1, surf_usm_h%ns |
---|
2937 | i = surf_usm_h%i(m) |
---|
2938 | j = surf_usm_h%j(m) |
---|
2939 | k = surf_usm_h%k(m) |
---|
2940 | temp_pf(k,j,i) = surf_usm_h%surface_types(m) |
---|
2941 | ENDDO |
---|
2942 | ELSE |
---|
2943 | l = idsidx |
---|
2944 | DO m = 1, surf_usm_v(l)%ns |
---|
2945 | i = surf_usm_v(l)%i(m) |
---|
2946 | j = surf_usm_v(l)%j(m) |
---|
2947 | k = surf_usm_v(l)%k(m) |
---|
2948 | temp_pf(k,j,i) = surf_usm_v(l)%surface_types(m) |
---|
2949 | ENDDO |
---|
2950 | ENDIF |
---|
2951 | |
---|
2952 | CASE ( 'usm_surfalb' ) |
---|
2953 | ! |
---|
2954 | !-- surface albedo, weighted average |
---|
2955 | IF ( idsint == iup_u ) THEN |
---|
2956 | DO m = 1, surf_usm_h%ns |
---|
2957 | i = surf_usm_h%i(m) |
---|
2958 | j = surf_usm_h%j(m) |
---|
2959 | k = surf_usm_h%k(m) |
---|
2960 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
2961 | surf_usm_h%albedo(ind_veg_wall,m) + & |
---|
2962 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
2963 | surf_usm_h%albedo(ind_pav_green,m) + & |
---|
2964 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
2965 | surf_usm_h%albedo(ind_wat_win,m) |
---|
2966 | ENDDO |
---|
2967 | ELSE |
---|
2968 | l = idsidx |
---|
2969 | DO m = 1, surf_usm_v(l)%ns |
---|
2970 | i = surf_usm_v(l)%i(m) |
---|
2971 | j = surf_usm_v(l)%j(m) |
---|
2972 | k = surf_usm_v(l)%k(m) |
---|
2973 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
2974 | surf_usm_v(l)%albedo(ind_veg_wall,m) + & |
---|
2975 | surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
2976 | surf_usm_v(l)%albedo(ind_pav_green,m) + & |
---|
2977 | surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
2978 | surf_usm_v(l)%albedo(ind_wat_win,m) |
---|
2979 | ENDDO |
---|
2980 | ENDIF |
---|
2981 | |
---|
2982 | CASE ( 'usm_surfemis' ) |
---|
2983 | ! |
---|
2984 | !-- surface emissivity, weighted average |
---|
2985 | IF ( idsint == iup_u ) THEN |
---|
2986 | DO m = 1, surf_usm_h%ns |
---|
2987 | i = surf_usm_h%i(m) |
---|
2988 | j = surf_usm_h%j(m) |
---|
2989 | k = surf_usm_h%k(m) |
---|
2990 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
2991 | surf_usm_h%emissivity(ind_veg_wall,m) + & |
---|
2992 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
2993 | surf_usm_h%emissivity(ind_pav_green,m) + & |
---|
2994 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
2995 | surf_usm_h%emissivity(ind_wat_win,m) |
---|
2996 | ENDDO |
---|
2997 | ELSE |
---|
2998 | l = idsidx |
---|
2999 | DO m = 1, surf_usm_v(l)%ns |
---|
3000 | i = surf_usm_v(l)%i(m) |
---|
3001 | j = surf_usm_v(l)%j(m) |
---|
3002 | k = surf_usm_v(l)%k(m) |
---|
3003 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) *& |
---|
3004 | surf_usm_v(l)%emissivity(ind_veg_wall,m) +& |
---|
3005 | surf_usm_v(l)%frac(ind_pav_green,m) *& |
---|
3006 | surf_usm_v(l)%emissivity(ind_pav_green,m)+& |
---|
3007 | surf_usm_v(l)%frac(ind_wat_win,m) *& |
---|
3008 | surf_usm_v(l)%emissivity(ind_wat_win,m) |
---|
3009 | ENDDO |
---|
3010 | ENDIF |
---|
3011 | |
---|
3012 | CASE ( 'usm_surfwintrans' ) |
---|
3013 | ! |
---|
3014 | !-- transmissivity window tiles |
---|
3015 | IF ( idsint == iup_u ) THEN |
---|
3016 | DO m = 1, surf_usm_h%ns |
---|
3017 | i = surf_usm_h%i(m) |
---|
3018 | j = surf_usm_h%j(m) |
---|
3019 | k = surf_usm_h%k(m) |
---|
3020 | temp_pf(k,j,i) = surf_usm_h%transmissivity(m) |
---|
3021 | ENDDO |
---|
3022 | ELSE |
---|
3023 | l = idsidx |
---|
3024 | DO m = 1, surf_usm_v(l)%ns |
---|
3025 | i = surf_usm_v(l)%i(m) |
---|
3026 | j = surf_usm_v(l)%j(m) |
---|
3027 | k = surf_usm_v(l)%k(m) |
---|
3028 | temp_pf(k,j,i) = surf_usm_v(l)%transmissivity(m) |
---|
3029 | ENDDO |
---|
3030 | ENDIF |
---|
3031 | |
---|
3032 | CASE ( 'usm_wshf' ) |
---|
3033 | ! |
---|
3034 | !-- array of sensible heat flux from surfaces |
---|
3035 | IF ( av == 0 ) THEN |
---|
3036 | IF ( idsint == iup_u ) THEN |
---|
3037 | DO m = 1, surf_usm_h%ns |
---|
3038 | i = surf_usm_h%i(m) |
---|
3039 | j = surf_usm_h%j(m) |
---|
3040 | k = surf_usm_h%k(m) |
---|
3041 | temp_pf(k,j,i) = surf_usm_h%wshf_eb(m) |
---|
3042 | ENDDO |
---|
3043 | ELSE |
---|
3044 | l = idsidx |
---|
3045 | DO m = 1, surf_usm_v(l)%ns |
---|
3046 | i = surf_usm_v(l)%i(m) |
---|
3047 | j = surf_usm_v(l)%j(m) |
---|
3048 | k = surf_usm_v(l)%k(m) |
---|
3049 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb(m) |
---|
3050 | ENDDO |
---|
3051 | ENDIF |
---|
3052 | ELSE |
---|
3053 | IF ( idsint == iup_u ) THEN |
---|
3054 | DO m = 1, surf_usm_h%ns |
---|
3055 | i = surf_usm_h%i(m) |
---|
3056 | j = surf_usm_h%j(m) |
---|
3057 | k = surf_usm_h%k(m) |
---|
3058 | temp_pf(k,j,i) = surf_usm_h%wshf_eb_av(m) |
---|
3059 | ENDDO |
---|
3060 | ELSE |
---|
3061 | l = idsidx |
---|
3062 | DO m = 1, surf_usm_v(l)%ns |
---|
3063 | i = surf_usm_v(l)%i(m) |
---|
3064 | j = surf_usm_v(l)%j(m) |
---|
3065 | k = surf_usm_v(l)%k(m) |
---|
3066 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb_av(m) |
---|
3067 | ENDDO |
---|
3068 | ENDIF |
---|
3069 | ENDIF |
---|
3070 | |
---|
3071 | |
---|
3072 | CASE ( 'usm_qsws' ) |
---|
3073 | ! |
---|
3074 | !-- array of latent heat flux from surfaces |
---|
3075 | IF ( av == 0 ) THEN |
---|
3076 | IF ( idsint == iup_u ) THEN |
---|
3077 | DO m = 1, surf_usm_h%ns |
---|
3078 | i = surf_usm_h%i(m) |
---|
3079 | j = surf_usm_h%j(m) |
---|
3080 | k = surf_usm_h%k(m) |
---|
3081 | temp_pf(k,j,i) = surf_usm_h%qsws_eb(m) |
---|
3082 | ENDDO |
---|
3083 | ELSE |
---|
3084 | l = idsidx |
---|
3085 | DO m = 1, surf_usm_v(l)%ns |
---|
3086 | i = surf_usm_v(l)%i(m) |
---|
3087 | j = surf_usm_v(l)%j(m) |
---|
3088 | k = surf_usm_v(l)%k(m) |
---|
3089 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb(m) |
---|
3090 | ENDDO |
---|
3091 | ENDIF |
---|
3092 | ELSE |
---|
3093 | IF ( idsint == iup_u ) THEN |
---|
3094 | DO m = 1, surf_usm_h%ns |
---|
3095 | i = surf_usm_h%i(m) |
---|
3096 | j = surf_usm_h%j(m) |
---|
3097 | k = surf_usm_h%k(m) |
---|
3098 | temp_pf(k,j,i) = surf_usm_h%qsws_eb_av(m) |
---|
3099 | ENDDO |
---|
3100 | ELSE |
---|
3101 | l = idsidx |
---|
3102 | DO m = 1, surf_usm_v(l)%ns |
---|
3103 | i = surf_usm_v(l)%i(m) |
---|
3104 | j = surf_usm_v(l)%j(m) |
---|
3105 | k = surf_usm_v(l)%k(m) |
---|
3106 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb_av(m) |
---|
3107 | ENDDO |
---|
3108 | ENDIF |
---|
3109 | ENDIF |
---|
3110 | |
---|
3111 | CASE ( 'usm_qsws_veg' ) |
---|
3112 | ! |
---|
3113 | !-- array of latent heat flux from vegetation surfaces |
---|
3114 | IF ( av == 0 ) THEN |
---|
3115 | IF ( idsint == iup_u ) THEN |
---|
3116 | DO m = 1, surf_usm_h%ns |
---|
3117 | i = surf_usm_h%i(m) |
---|
3118 | j = surf_usm_h%j(m) |
---|
3119 | k = surf_usm_h%k(m) |
---|
3120 | temp_pf(k,j,i) = surf_usm_h%qsws_veg(m) |
---|
3121 | ENDDO |
---|
3122 | ELSE |
---|
3123 | l = idsidx |
---|
3124 | DO m = 1, surf_usm_v(l)%ns |
---|
3125 | i = surf_usm_v(l)%i(m) |
---|
3126 | j = surf_usm_v(l)%j(m) |
---|
3127 | k = surf_usm_v(l)%k(m) |
---|
3128 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg(m) |
---|
3129 | ENDDO |
---|
3130 | ENDIF |
---|
3131 | ELSE |
---|
3132 | IF ( idsint == iup_u ) THEN |
---|
3133 | DO m = 1, surf_usm_h%ns |
---|
3134 | i = surf_usm_h%i(m) |
---|
3135 | j = surf_usm_h%j(m) |
---|
3136 | k = surf_usm_h%k(m) |
---|
3137 | temp_pf(k,j,i) = surf_usm_h%qsws_veg_av(m) |
---|
3138 | ENDDO |
---|
3139 | ELSE |
---|
3140 | l = idsidx |
---|
3141 | DO m = 1, surf_usm_v(l)%ns |
---|
3142 | i = surf_usm_v(l)%i(m) |
---|
3143 | j = surf_usm_v(l)%j(m) |
---|
3144 | k = surf_usm_v(l)%k(m) |
---|
3145 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_av(m) |
---|
3146 | ENDDO |
---|
3147 | ENDIF |
---|
3148 | ENDIF |
---|
3149 | |
---|
3150 | CASE ( 'usm_qsws_liq' ) |
---|
3151 | ! |
---|
3152 | !-- array of latent heat flux from surfaces with liquid |
---|
3153 | IF ( av == 0 ) THEN |
---|
3154 | IF ( idsint == iup_u ) THEN |
---|
3155 | DO m = 1, surf_usm_h%ns |
---|
3156 | i = surf_usm_h%i(m) |
---|
3157 | j = surf_usm_h%j(m) |
---|
3158 | k = surf_usm_h%k(m) |
---|
3159 | temp_pf(k,j,i) = surf_usm_h%qsws_liq(m) |
---|
3160 | ENDDO |
---|
3161 | ELSE |
---|
3162 | l = idsidx |
---|
3163 | DO m = 1, surf_usm_v(l)%ns |
---|
3164 | i = surf_usm_v(l)%i(m) |
---|
3165 | j = surf_usm_v(l)%j(m) |
---|
3166 | k = surf_usm_v(l)%k(m) |
---|
3167 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq(m) |
---|
3168 | ENDDO |
---|
3169 | ENDIF |
---|
3170 | ELSE |
---|
3171 | IF ( idsint == iup_u ) THEN |
---|
3172 | DO m = 1, surf_usm_h%ns |
---|
3173 | i = surf_usm_h%i(m) |
---|
3174 | j = surf_usm_h%j(m) |
---|
3175 | k = surf_usm_h%k(m) |
---|
3176 | temp_pf(k,j,i) = surf_usm_h%qsws_liq_av(m) |
---|
3177 | ENDDO |
---|
3178 | ELSE |
---|
3179 | l = idsidx |
---|
3180 | DO m = 1, surf_usm_v(l)%ns |
---|
3181 | i = surf_usm_v(l)%i(m) |
---|
3182 | j = surf_usm_v(l)%j(m) |
---|
3183 | k = surf_usm_v(l)%k(m) |
---|
3184 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_av(m) |
---|
3185 | ENDDO |
---|
3186 | ENDIF |
---|
3187 | ENDIF |
---|
3188 | |
---|
3189 | CASE ( 'usm_wghf' ) |
---|
3190 | ! |
---|
3191 | !-- array of heat flux from ground (land, wall, roof) |
---|
3192 | IF ( av == 0 ) THEN |
---|
3193 | IF ( idsint == iup_u ) THEN |
---|
3194 | DO m = 1, surf_usm_h%ns |
---|
3195 | i = surf_usm_h%i(m) |
---|
3196 | j = surf_usm_h%j(m) |
---|
3197 | k = surf_usm_h%k(m) |
---|
3198 | temp_pf(k,j,i) = surf_usm_h%wghf_eb(m) |
---|
3199 | ENDDO |
---|
3200 | ELSE |
---|
3201 | l = idsidx |
---|
3202 | DO m = 1, surf_usm_v(l)%ns |
---|
3203 | i = surf_usm_v(l)%i(m) |
---|
3204 | j = surf_usm_v(l)%j(m) |
---|
3205 | k = surf_usm_v(l)%k(m) |
---|
3206 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb(m) |
---|
3207 | ENDDO |
---|
3208 | ENDIF |
---|
3209 | ELSE |
---|
3210 | IF ( idsint == iup_u ) THEN |
---|
3211 | DO m = 1, surf_usm_h%ns |
---|
3212 | i = surf_usm_h%i(m) |
---|
3213 | j = surf_usm_h%j(m) |
---|
3214 | k = surf_usm_h%k(m) |
---|
3215 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_av(m) |
---|
3216 | ENDDO |
---|
3217 | ELSE |
---|
3218 | l = idsidx |
---|
3219 | DO m = 1, surf_usm_v(l)%ns |
---|
3220 | i = surf_usm_v(l)%i(m) |
---|
3221 | j = surf_usm_v(l)%j(m) |
---|
3222 | k = surf_usm_v(l)%k(m) |
---|
3223 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_av(m) |
---|
3224 | ENDDO |
---|
3225 | ENDIF |
---|
3226 | ENDIF |
---|
3227 | |
---|
3228 | CASE ( 'usm_wghf_window' ) |
---|
3229 | ! |
---|
3230 | !-- array of heat flux from window ground (land, wall, roof) |
---|
3231 | IF ( av == 0 ) THEN |
---|
3232 | IF ( idsint == iup_u ) THEN |
---|
3233 | DO m = 1, surf_usm_h%ns |
---|
3234 | i = surf_usm_h%i(m) |
---|
3235 | j = surf_usm_h%j(m) |
---|
3236 | k = surf_usm_h%k(m) |
---|
3237 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window(m) |
---|
3238 | ENDDO |
---|
3239 | ELSE |
---|
3240 | l = idsidx |
---|
3241 | DO m = 1, surf_usm_v(l)%ns |
---|
3242 | i = surf_usm_v(l)%i(m) |
---|
3243 | j = surf_usm_v(l)%j(m) |
---|
3244 | k = surf_usm_v(l)%k(m) |
---|
3245 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window(m) |
---|
3246 | ENDDO |
---|
3247 | ENDIF |
---|
3248 | ELSE |
---|
3249 | IF ( idsint == iup_u ) THEN |
---|
3250 | DO m = 1, surf_usm_h%ns |
---|
3251 | i = surf_usm_h%i(m) |
---|
3252 | j = surf_usm_h%j(m) |
---|
3253 | k = surf_usm_h%k(m) |
---|
3254 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window_av(m) |
---|
3255 | ENDDO |
---|
3256 | ELSE |
---|
3257 | l = idsidx |
---|
3258 | DO m = 1, surf_usm_v(l)%ns |
---|
3259 | i = surf_usm_v(l)%i(m) |
---|
3260 | j = surf_usm_v(l)%j(m) |
---|
3261 | k = surf_usm_v(l)%k(m) |
---|
3262 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window_av(m) |
---|
3263 | ENDDO |
---|
3264 | ENDIF |
---|
3265 | ENDIF |
---|
3266 | |
---|
3267 | CASE ( 'usm_wghf_green' ) |
---|
3268 | ! |
---|
3269 | !-- array of heat flux from green ground (land, wall, roof) |
---|
3270 | IF ( av == 0 ) THEN |
---|
3271 | IF ( idsint == iup_u ) THEN |
---|
3272 | DO m = 1, surf_usm_h%ns |
---|
3273 | i = surf_usm_h%i(m) |
---|
3274 | j = surf_usm_h%j(m) |
---|
3275 | k = surf_usm_h%k(m) |
---|
3276 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green(m) |
---|
3277 | ENDDO |
---|
3278 | ELSE |
---|
3279 | l = idsidx |
---|
3280 | DO m = 1, surf_usm_v(l)%ns |
---|
3281 | i = surf_usm_v(l)%i(m) |
---|
3282 | j = surf_usm_v(l)%j(m) |
---|
3283 | k = surf_usm_v(l)%k(m) |
---|
3284 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green(m) |
---|
3285 | ENDDO |
---|
3286 | ENDIF |
---|
3287 | ELSE |
---|
3288 | IF ( idsint == iup_u ) THEN |
---|
3289 | DO m = 1, surf_usm_h%ns |
---|
3290 | i = surf_usm_h%i(m) |
---|
3291 | j = surf_usm_h%j(m) |
---|
3292 | k = surf_usm_h%k(m) |
---|
3293 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green_av(m) |
---|
3294 | ENDDO |
---|
3295 | ELSE |
---|
3296 | l = idsidx |
---|
3297 | DO m = 1, surf_usm_v(l)%ns |
---|
3298 | i = surf_usm_v(l)%i(m) |
---|
3299 | j = surf_usm_v(l)%j(m) |
---|
3300 | k = surf_usm_v(l)%k(m) |
---|
3301 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green_av(m) |
---|
3302 | ENDDO |
---|
3303 | ENDIF |
---|
3304 | ENDIF |
---|
3305 | |
---|
3306 | CASE ( 'usm_iwghf' ) |
---|
3307 | ! |
---|
3308 | !-- array of heat flux from indoor ground (land, wall, roof) |
---|
3309 | IF ( av == 0 ) THEN |
---|
3310 | IF ( idsint == iup_u ) THEN |
---|
3311 | DO m = 1, surf_usm_h%ns |
---|
3312 | i = surf_usm_h%i(m) |
---|
3313 | j = surf_usm_h%j(m) |
---|
3314 | k = surf_usm_h%k(m) |
---|
3315 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb(m) |
---|
3316 | ENDDO |
---|
3317 | ELSE |
---|
3318 | l = idsidx |
---|
3319 | DO m = 1, surf_usm_v(l)%ns |
---|
3320 | i = surf_usm_v(l)%i(m) |
---|
3321 | j = surf_usm_v(l)%j(m) |
---|
3322 | k = surf_usm_v(l)%k(m) |
---|
3323 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb(m) |
---|
3324 | ENDDO |
---|
3325 | ENDIF |
---|
3326 | ELSE |
---|
3327 | IF ( idsint == iup_u ) THEN |
---|
3328 | DO m = 1, surf_usm_h%ns |
---|
3329 | i = surf_usm_h%i(m) |
---|
3330 | j = surf_usm_h%j(m) |
---|
3331 | k = surf_usm_h%k(m) |
---|
3332 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_av(m) |
---|
3333 | ENDDO |
---|
3334 | ELSE |
---|
3335 | l = idsidx |
---|
3336 | DO m = 1, surf_usm_v(l)%ns |
---|
3337 | i = surf_usm_v(l)%i(m) |
---|
3338 | j = surf_usm_v(l)%j(m) |
---|
3339 | k = surf_usm_v(l)%k(m) |
---|
3340 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_av(m) |
---|
3341 | ENDDO |
---|
3342 | ENDIF |
---|
3343 | ENDIF |
---|
3344 | |
---|
3345 | CASE ( 'usm_iwghf_window' ) |
---|
3346 | ! |
---|
3347 | !-- array of heat flux from indoor window ground (land, wall, roof) |
---|
3348 | IF ( av == 0 ) THEN |
---|
3349 | IF ( idsint == iup_u ) THEN |
---|
3350 | DO m = 1, surf_usm_h%ns |
---|
3351 | i = surf_usm_h%i(m) |
---|
3352 | j = surf_usm_h%j(m) |
---|
3353 | k = surf_usm_h%k(m) |
---|
3354 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window(m) |
---|
3355 | ENDDO |
---|
3356 | ELSE |
---|
3357 | l = idsidx |
---|
3358 | DO m = 1, surf_usm_v(l)%ns |
---|
3359 | i = surf_usm_v(l)%i(m) |
---|
3360 | j = surf_usm_v(l)%j(m) |
---|
3361 | k = surf_usm_v(l)%k(m) |
---|
3362 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window(m) |
---|
3363 | ENDDO |
---|
3364 | ENDIF |
---|
3365 | ELSE |
---|
3366 | IF ( idsint == iup_u ) THEN |
---|
3367 | DO m = 1, surf_usm_h%ns |
---|
3368 | i = surf_usm_h%i(m) |
---|
3369 | j = surf_usm_h%j(m) |
---|
3370 | k = surf_usm_h%k(m) |
---|
3371 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window_av(m) |
---|
3372 | ENDDO |
---|
3373 | ELSE |
---|
3374 | l = idsidx |
---|
3375 | DO m = 1, surf_usm_v(l)%ns |
---|
3376 | i = surf_usm_v(l)%i(m) |
---|
3377 | j = surf_usm_v(l)%j(m) |
---|
3378 | k = surf_usm_v(l)%k(m) |
---|
3379 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window_av(m) |
---|
3380 | ENDDO |
---|
3381 | ENDIF |
---|
3382 | ENDIF |
---|
3383 | |
---|
3384 | CASE ( 'usm_t_surf_wall' ) |
---|
3385 | ! |
---|
3386 | !-- surface temperature for surfaces |
---|
3387 | IF ( av == 0 ) THEN |
---|
3388 | IF ( idsint == iup_u ) THEN |
---|
3389 | DO m = 1, surf_usm_h%ns |
---|
3390 | i = surf_usm_h%i(m) |
---|
3391 | j = surf_usm_h%j(m) |
---|
3392 | k = surf_usm_h%k(m) |
---|
3393 | temp_pf(k,j,i) = t_surf_wall_h(m) |
---|
3394 | ENDDO |
---|
3395 | ELSE |
---|
3396 | l = idsidx |
---|
3397 | DO m = 1, surf_usm_v(l)%ns |
---|
3398 | i = surf_usm_v(l)%i(m) |
---|
3399 | j = surf_usm_v(l)%j(m) |
---|
3400 | k = surf_usm_v(l)%k(m) |
---|
3401 | temp_pf(k,j,i) = t_surf_wall_v(l)%t(m) |
---|
3402 | ENDDO |
---|
3403 | ENDIF |
---|
3404 | ELSE |
---|
3405 | IF ( idsint == iup_u ) THEN |
---|
3406 | DO m = 1, surf_usm_h%ns |
---|
3407 | i = surf_usm_h%i(m) |
---|
3408 | j = surf_usm_h%j(m) |
---|
3409 | k = surf_usm_h%k(m) |
---|
3410 | temp_pf(k,j,i) = surf_usm_h%t_surf_wall_av(m) |
---|
3411 | ENDDO |
---|
3412 | ELSE |
---|
3413 | l = idsidx |
---|
3414 | DO m = 1, surf_usm_v(l)%ns |
---|
3415 | i = surf_usm_v(l)%i(m) |
---|
3416 | j = surf_usm_v(l)%j(m) |
---|
3417 | k = surf_usm_v(l)%k(m) |
---|
3418 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_wall_av(m) |
---|
3419 | ENDDO |
---|
3420 | ENDIF |
---|
3421 | ENDIF |
---|
3422 | |
---|
3423 | CASE ( 'usm_t_surf_window' ) |
---|
3424 | ! |
---|
3425 | !-- surface temperature for window surfaces |
---|
3426 | IF ( av == 0 ) THEN |
---|
3427 | IF ( idsint == iup_u ) THEN |
---|
3428 | DO m = 1, surf_usm_h%ns |
---|
3429 | i = surf_usm_h%i(m) |
---|
3430 | j = surf_usm_h%j(m) |
---|
3431 | k = surf_usm_h%k(m) |
---|
3432 | temp_pf(k,j,i) = t_surf_window_h(m) |
---|
3433 | ENDDO |
---|
3434 | ELSE |
---|
3435 | l = idsidx |
---|
3436 | DO m = 1, surf_usm_v(l)%ns |
---|
3437 | i = surf_usm_v(l)%i(m) |
---|
3438 | j = surf_usm_v(l)%j(m) |
---|
3439 | k = surf_usm_v(l)%k(m) |
---|
3440 | temp_pf(k,j,i) = t_surf_window_v(l)%t(m) |
---|
3441 | ENDDO |
---|
3442 | ENDIF |
---|
3443 | |
---|
3444 | ELSE |
---|
3445 | IF ( idsint == iup_u ) THEN |
---|
3446 | DO m = 1, surf_usm_h%ns |
---|
3447 | i = surf_usm_h%i(m) |
---|
3448 | j = surf_usm_h%j(m) |
---|
3449 | k = surf_usm_h%k(m) |
---|
3450 | temp_pf(k,j,i) = surf_usm_h%t_surf_window_av(m) |
---|
3451 | ENDDO |
---|
3452 | ELSE |
---|
3453 | l = idsidx |
---|
3454 | DO m = 1, surf_usm_v(l)%ns |
---|
3455 | i = surf_usm_v(l)%i(m) |
---|
3456 | j = surf_usm_v(l)%j(m) |
---|
3457 | k = surf_usm_v(l)%k(m) |
---|
3458 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_window_av(m) |
---|
3459 | ENDDO |
---|
3460 | |
---|
3461 | ENDIF |
---|
3462 | |
---|
3463 | ENDIF |
---|
3464 | |
---|
3465 | CASE ( 'usm_t_surf_green' ) |
---|
3466 | ! |
---|
3467 | !-- surface temperature for green surfaces |
---|
3468 | IF ( av == 0 ) THEN |
---|
3469 | IF ( idsint == iup_u ) THEN |
---|
3470 | DO m = 1, surf_usm_h%ns |
---|
3471 | i = surf_usm_h%i(m) |
---|
3472 | j = surf_usm_h%j(m) |
---|
3473 | k = surf_usm_h%k(m) |
---|
3474 | temp_pf(k,j,i) = t_surf_green_h(m) |
---|
3475 | ENDDO |
---|
3476 | ELSE |
---|
3477 | l = idsidx |
---|
3478 | DO m = 1, surf_usm_v(l)%ns |
---|
3479 | i = surf_usm_v(l)%i(m) |
---|
3480 | j = surf_usm_v(l)%j(m) |
---|
3481 | k = surf_usm_v(l)%k(m) |
---|
3482 | temp_pf(k,j,i) = t_surf_green_v(l)%t(m) |
---|
3483 | ENDDO |
---|
3484 | ENDIF |
---|
3485 | |
---|
3486 | ELSE |
---|
3487 | IF ( idsint == iup_u ) THEN |
---|
3488 | DO m = 1, surf_usm_h%ns |
---|
3489 | i = surf_usm_h%i(m) |
---|
3490 | j = surf_usm_h%j(m) |
---|
3491 | k = surf_usm_h%k(m) |
---|
3492 | temp_pf(k,j,i) = surf_usm_h%t_surf_green_av(m) |
---|
3493 | ENDDO |
---|
3494 | ELSE |
---|
3495 | l = idsidx |
---|
3496 | DO m = 1, surf_usm_v(l)%ns |
---|
3497 | i = surf_usm_v(l)%i(m) |
---|
3498 | j = surf_usm_v(l)%j(m) |
---|
3499 | k = surf_usm_v(l)%k(m) |
---|
3500 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_green_av(m) |
---|
3501 | ENDDO |
---|
3502 | |
---|
3503 | ENDIF |
---|
3504 | |
---|
3505 | ENDIF |
---|
3506 | |
---|
3507 | CASE ( 'usm_theta_10cm' ) |
---|
3508 | ! |
---|
3509 | !-- near surface temperature for whole surfaces |
---|
3510 | IF ( av == 0 ) THEN |
---|
3511 | IF ( idsint == iup_u ) THEN |
---|
3512 | DO m = 1, surf_usm_h%ns |
---|
3513 | i = surf_usm_h%i(m) |
---|
3514 | j = surf_usm_h%j(m) |
---|
3515 | k = surf_usm_h%k(m) |
---|
3516 | temp_pf(k,j,i) = surf_usm_h%pt_10cm(m) |
---|
3517 | ENDDO |
---|
3518 | ELSE |
---|
3519 | l = idsidx |
---|
3520 | DO m = 1, surf_usm_v(l)%ns |
---|
3521 | i = surf_usm_v(l)%i(m) |
---|
3522 | j = surf_usm_v(l)%j(m) |
---|
3523 | k = surf_usm_v(l)%k(m) |
---|
3524 | temp_pf(k,j,i) = surf_usm_v(l)%pt_10cm(m) |
---|
3525 | ENDDO |
---|
3526 | ENDIF |
---|
3527 | |
---|
3528 | |
---|
3529 | ELSE |
---|
3530 | IF ( idsint == iup_u ) THEN |
---|
3531 | DO m = 1, surf_usm_h%ns |
---|
3532 | i = surf_usm_h%i(m) |
---|
3533 | j = surf_usm_h%j(m) |
---|
3534 | k = surf_usm_h%k(m) |
---|
3535 | temp_pf(k,j,i) = surf_usm_h%pt_10cm_av(m) |
---|
3536 | ENDDO |
---|
3537 | ELSE |
---|
3538 | l = idsidx |
---|
3539 | DO m = 1, surf_usm_v(l)%ns |
---|
3540 | i = surf_usm_v(l)%i(m) |
---|
3541 | j = surf_usm_v(l)%j(m) |
---|
3542 | k = surf_usm_v(l)%k(m) |
---|
3543 | temp_pf(k,j,i) = surf_usm_v(l)%pt_10cm_av(m) |
---|
3544 | ENDDO |
---|
3545 | |
---|
3546 | ENDIF |
---|
3547 | ENDIF |
---|
3548 | |
---|
3549 | CASE ( 'usm_t_wall' ) |
---|
3550 | ! |
---|
3551 | !-- wall temperature for iwl layer of walls and land |
---|
3552 | IF ( av == 0 ) THEN |
---|
3553 | IF ( idsint == iup_u ) THEN |
---|
3554 | DO m = 1, surf_usm_h%ns |
---|
3555 | i = surf_usm_h%i(m) |
---|
3556 | j = surf_usm_h%j(m) |
---|
3557 | k = surf_usm_h%k(m) |
---|
3558 | temp_pf(k,j,i) = t_wall_h(iwl,m) |
---|
3559 | ENDDO |
---|
3560 | ELSE |
---|
3561 | l = idsidx |
---|
3562 | DO m = 1, surf_usm_v(l)%ns |
---|
3563 | i = surf_usm_v(l)%i(m) |
---|
3564 | j = surf_usm_v(l)%j(m) |
---|
3565 | k = surf_usm_v(l)%k(m) |
---|
3566 | temp_pf(k,j,i) = t_wall_v(l)%t(iwl,m) |
---|
3567 | ENDDO |
---|
3568 | ENDIF |
---|
3569 | ELSE |
---|
3570 | IF ( idsint == iup_u ) THEN |
---|
3571 | DO m = 1, surf_usm_h%ns |
---|
3572 | i = surf_usm_h%i(m) |
---|
3573 | j = surf_usm_h%j(m) |
---|
3574 | k = surf_usm_h%k(m) |
---|
3575 | temp_pf(k,j,i) = surf_usm_h%t_wall_av(iwl,m) |
---|
3576 | ENDDO |
---|
3577 | ELSE |
---|
3578 | l = idsidx |
---|
3579 | DO m = 1, surf_usm_v(l)%ns |
---|
3580 | i = surf_usm_v(l)%i(m) |
---|
3581 | j = surf_usm_v(l)%j(m) |
---|
3582 | k = surf_usm_v(l)%k(m) |
---|
3583 | temp_pf(k,j,i) = surf_usm_v(l)%t_wall_av(iwl,m) |
---|
3584 | ENDDO |
---|
3585 | ENDIF |
---|
3586 | ENDIF |
---|
3587 | |
---|
3588 | CASE ( 'usm_t_window' ) |
---|
3589 | ! |
---|
3590 | !-- window temperature for iwl layer of walls and land |
---|
3591 | IF ( av == 0 ) THEN |
---|
3592 | IF ( idsint == iup_u ) THEN |
---|
3593 | DO m = 1, surf_usm_h%ns |
---|
3594 | i = surf_usm_h%i(m) |
---|
3595 | j = surf_usm_h%j(m) |
---|
3596 | k = surf_usm_h%k(m) |
---|
3597 | temp_pf(k,j,i) = t_window_h(iwl,m) |
---|
3598 | ENDDO |
---|
3599 | ELSE |
---|
3600 | l = idsidx |
---|
3601 | DO m = 1, surf_usm_v(l)%ns |
---|
3602 | i = surf_usm_v(l)%i(m) |
---|
3603 | j = surf_usm_v(l)%j(m) |
---|
3604 | k = surf_usm_v(l)%k(m) |
---|
3605 | temp_pf(k,j,i) = t_window_v(l)%t(iwl,m) |
---|
3606 | ENDDO |
---|
3607 | ENDIF |
---|
3608 | ELSE |
---|
3609 | IF ( idsint == iup_u ) THEN |
---|
3610 | DO m = 1, surf_usm_h%ns |
---|
3611 | i = surf_usm_h%i(m) |
---|
3612 | j = surf_usm_h%j(m) |
---|
3613 | k = surf_usm_h%k(m) |
---|
3614 | temp_pf(k,j,i) = surf_usm_h%t_window_av(iwl,m) |
---|
3615 | ENDDO |
---|
3616 | ELSE |
---|
3617 | l = idsidx |
---|
3618 | DO m = 1, surf_usm_v(l)%ns |
---|
3619 | i = surf_usm_v(l)%i(m) |
---|
3620 | j = surf_usm_v(l)%j(m) |
---|
3621 | k = surf_usm_v(l)%k(m) |
---|
3622 | temp_pf(k,j,i) = surf_usm_v(l)%t_window_av(iwl,m) |
---|
3623 | ENDDO |
---|
3624 | ENDIF |
---|
3625 | ENDIF |
---|
3626 | |
---|
3627 | CASE ( 'usm_t_green' ) |
---|
3628 | ! |
---|
3629 | !-- green temperature for iwl layer of walls and land |
---|
3630 | IF ( av == 0 ) THEN |
---|
3631 | IF ( idsint == iup_u ) THEN |
---|
3632 | DO m = 1, surf_usm_h%ns |
---|
3633 | i = surf_usm_h%i(m) |
---|
3634 | j = surf_usm_h%j(m) |
---|
3635 | k = surf_usm_h%k(m) |
---|
3636 | temp_pf(k,j,i) = t_green_h(iwl,m) |
---|
3637 | ENDDO |
---|
3638 | ELSE |
---|
3639 | l = idsidx |
---|
3640 | DO m = 1, surf_usm_v(l)%ns |
---|
3641 | i = surf_usm_v(l)%i(m) |
---|
3642 | j = surf_usm_v(l)%j(m) |
---|
3643 | k = surf_usm_v(l)%k(m) |
---|
3644 | temp_pf(k,j,i) = t_green_v(l)%t(iwl,m) |
---|
3645 | ENDDO |
---|
3646 | ENDIF |
---|
3647 | ELSE |
---|
3648 | IF ( idsint == iup_u ) THEN |
---|
3649 | DO m = 1, surf_usm_h%ns |
---|
3650 | i = surf_usm_h%i(m) |
---|
3651 | j = surf_usm_h%j(m) |
---|
3652 | k = surf_usm_h%k(m) |
---|
3653 | temp_pf(k,j,i) = surf_usm_h%t_green_av(iwl,m) |
---|
3654 | ENDDO |
---|
3655 | ELSE |
---|
3656 | l = idsidx |
---|
3657 | DO m = 1, surf_usm_v(l)%ns |
---|
3658 | i = surf_usm_v(l)%i(m) |
---|
3659 | j = surf_usm_v(l)%j(m) |
---|
3660 | k = surf_usm_v(l)%k(m) |
---|
3661 | temp_pf(k,j,i) = surf_usm_v(l)%t_green_av(iwl,m) |
---|
3662 | ENDDO |
---|
3663 | ENDIF |
---|
3664 | ENDIF |
---|
3665 | |
---|
3666 | CASE ( 'usm_swc' ) |
---|
3667 | ! |
---|
3668 | !-- soil water content for iwl layer of walls and land |
---|
3669 | IF ( av == 0 ) THEN |
---|
3670 | IF ( idsint == iup_u ) THEN |
---|
3671 | DO m = 1, surf_usm_h%ns |
---|
3672 | i = surf_usm_h%i(m) |
---|
3673 | j = surf_usm_h%j(m) |
---|
3674 | k = surf_usm_h%k(m) |
---|
3675 | temp_pf(k,j,i) = swc_h(iwl,m) |
---|
3676 | ENDDO |
---|
3677 | ELSE |
---|
3678 | l = idsidx |
---|
3679 | DO m = 1, surf_usm_v(l)%ns |
---|
3680 | i = surf_usm_v(l)%i(m) |
---|
3681 | j = surf_usm_v(l)%j(m) |
---|
3682 | k = surf_usm_v(l)%k(m) |
---|
3683 | temp_pf(k,j,i) = swc_v(l)%t(iwl,m) |
---|
3684 | ENDDO |
---|
3685 | ENDIF |
---|
3686 | ELSE |
---|
3687 | IF ( idsint == iup_u ) THEN |
---|
3688 | DO m = 1, surf_usm_h%ns |
---|
3689 | i = surf_usm_h%i(m) |
---|
3690 | j = surf_usm_h%j(m) |
---|
3691 | k = surf_usm_h%k(m) |
---|
3692 | temp_pf(k,j,i) = surf_usm_h%swc_av(iwl,m) |
---|
3693 | ENDDO |
---|
3694 | ELSE |
---|
3695 | l = idsidx |
---|
3696 | DO m = 1, surf_usm_v(l)%ns |
---|
3697 | i = surf_usm_v(l)%i(m) |
---|
3698 | j = surf_usm_v(l)%j(m) |
---|
3699 | k = surf_usm_v(l)%k(m) |
---|
3700 | temp_pf(k,j,i) = surf_usm_v(l)%swc_av(iwl,m) |
---|
3701 | ENDDO |
---|
3702 | ENDIF |
---|
3703 | ENDIF |
---|
3704 | |
---|
3705 | |
---|
3706 | CASE DEFAULT |
---|
3707 | found = .FALSE. |
---|
3708 | RETURN |
---|
3709 | END SELECT |
---|
3710 | |
---|
3711 | ! |
---|
3712 | !-- Rearrange dimensions for NetCDF output |
---|
3713 | !-- FIXME: this may generate FPE overflow upon conversion from DP to SP |
---|
3714 | DO j = nys, nyn |
---|
3715 | DO i = nxl, nxr |
---|
3716 | DO k = nzb_do, nzt_do |
---|
3717 | local_pf(i,j,k) = temp_pf(k,j,i) |
---|
3718 | ENDDO |
---|
3719 | ENDDO |
---|
3720 | ENDDO |
---|
3721 | |
---|
3722 | END SUBROUTINE usm_data_output_3d |
---|
3723 | |
---|
3724 | |
---|
3725 | !------------------------------------------------------------------------------! |
---|
3726 | ! |
---|
3727 | ! Description: |
---|
3728 | ! ------------ |
---|
3729 | !> Soubroutine defines appropriate grid for netcdf variables. |
---|
3730 | !> It is called out from subroutine netcdf. |
---|
3731 | !------------------------------------------------------------------------------! |
---|
3732 | SUBROUTINE usm_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) |
---|
3733 | |
---|
3734 | IMPLICIT NONE |
---|
3735 | |
---|
3736 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
3737 | LOGICAL, INTENT(OUT) :: found !< |
---|
3738 | CHARACTER (len=*), INTENT(OUT) :: grid_x !< |
---|
3739 | CHARACTER (len=*), INTENT(OUT) :: grid_y !< |
---|
3740 | CHARACTER (len=*), INTENT(OUT) :: grid_z !< |
---|
3741 | |
---|
3742 | CHARACTER (len=varnamelength) :: var |
---|
3743 | |
---|
3744 | var = TRIM(variable) |
---|
3745 | IF ( var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
3746 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
3747 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
3748 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
3749 | var(1:13) == 'usm_qsws_liq_' .OR. & |
---|
3750 | var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
3751 | var(1:17) == 'usm_t_surf_window' .OR. var(1:12) == 'usm_t_window' .OR. & |
---|
3752 | var(1:16) == 'usm_t_surf_green' .OR. var(1:11) == 'usm_t_green' .OR. & |
---|
3753 | var(1:15) == 'usm_theta_10cm' .OR. & |
---|
3754 | var(1:9) == 'usm_surfz' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
3755 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
3756 | var(1:16) == 'usm_surfwintrans' .OR. var(1:7) == 'usm_swc' ) THEN |
---|
3757 | |
---|
3758 | found = .TRUE. |
---|
3759 | grid_x = 'x' |
---|
3760 | grid_y = 'y' |
---|
3761 | grid_z = 'zu' |
---|
3762 | ELSE |
---|
3763 | found = .FALSE. |
---|
3764 | grid_x = 'none' |
---|
3765 | grid_y = 'none' |
---|
3766 | grid_z = 'none' |
---|
3767 | ENDIF |
---|
3768 | |
---|
3769 | END SUBROUTINE usm_define_netcdf_grid |
---|
3770 | |
---|
3771 | |
---|
3772 | !------------------------------------------------------------------------------! |
---|
3773 | ! Description: |
---|
3774 | ! ------------ |
---|
3775 | !> Initialization of the wall surface model |
---|
3776 | !------------------------------------------------------------------------------! |
---|
3777 | SUBROUTINE usm_init_material_model |
---|
3778 | |
---|
3779 | IMPLICIT NONE |
---|
3780 | |
---|
3781 | INTEGER(iwp) :: k, l, m !< running indices |
---|
3782 | |
---|
3783 | CALL location_message( ' initialization of wall surface model', .TRUE. ) |
---|
3784 | |
---|
3785 | ! |
---|
3786 | !-- Calculate wall grid spacings. |
---|
3787 | !-- Temperature is defined at the center of the wall layers, |
---|
3788 | !-- whereas gradients/fluxes are defined at the edges (_stag) |
---|
3789 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
3790 | DO m = 1, surf_usm_h%ns |
---|
3791 | |
---|
3792 | surf_usm_h%dz_wall(nzb_wall,m) = surf_usm_h%zw(nzb_wall,m) |
---|
3793 | DO k = nzb_wall+1, nzt_wall |
---|
3794 | surf_usm_h%dz_wall(k,m) = surf_usm_h%zw(k,m) - & |
---|
3795 | surf_usm_h%zw(k-1,m) |
---|
3796 | ENDDO |
---|
3797 | surf_usm_h%dz_window(nzb_wall,m) = surf_usm_h%zw_window(nzb_wall,m) |
---|
3798 | DO k = nzb_wall+1, nzt_wall |
---|
3799 | surf_usm_h%dz_window(k,m) = surf_usm_h%zw_window(k,m) - & |
---|
3800 | surf_usm_h%zw_window(k-1,m) |
---|
3801 | ENDDO |
---|
3802 | |
---|
3803 | surf_usm_h%dz_wall(nzt_wall+1,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
3804 | |
---|
3805 | DO k = nzb_wall, nzt_wall-1 |
---|
3806 | surf_usm_h%dz_wall_stag(k,m) = 0.5 * ( & |
---|
3807 | surf_usm_h%dz_wall(k+1,m) + surf_usm_h%dz_wall(k,m) ) |
---|
3808 | ENDDO |
---|
3809 | surf_usm_h%dz_wall_stag(nzt_wall,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
3810 | |
---|
3811 | surf_usm_h%dz_window(nzt_wall+1,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
3812 | |
---|
3813 | DO k = nzb_wall, nzt_wall-1 |
---|
3814 | surf_usm_h%dz_window_stag(k,m) = 0.5 * ( & |
---|
3815 | surf_usm_h%dz_window(k+1,m) + surf_usm_h%dz_window(k,m) ) |
---|
3816 | ENDDO |
---|
3817 | surf_usm_h%dz_window_stag(nzt_wall,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
3818 | |
---|
3819 | IF (surf_usm_h%green_type_roof(m) == 2.0_wp ) THEN |
---|
3820 | ! |
---|
3821 | !-- extensive green roof |
---|
3822 | !-- set ratio of substrate layer thickness, soil-type and LAI |
---|
3823 | soil_type = 3 |
---|
3824 | surf_usm_h%lai(m) = 2.0_wp |
---|
3825 | |
---|
3826 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
3827 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
3828 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.15_wp |
---|
3829 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.20_wp |
---|
3830 | ELSE |
---|
3831 | ! |
---|
3832 | !-- intensiv green roof |
---|
3833 | !-- set ratio of substrate layer thickness, soil-type and LAI |
---|
3834 | soil_type = 6 |
---|
3835 | surf_usm_h%lai(m) = 4.0_wp |
---|
3836 | |
---|
3837 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
3838 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
3839 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.40_wp |
---|
3840 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.80_wp |
---|
3841 | ENDIF |
---|
3842 | |
---|
3843 | surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
3844 | DO k = nzb_wall+1, nzt_wall |
---|
3845 | surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
3846 | surf_usm_h%zw_green(k-1,m) |
---|
3847 | ENDDO |
---|
3848 | surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3849 | |
---|
3850 | DO k = nzb_wall, nzt_wall-1 |
---|
3851 | surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
3852 | surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
3853 | ENDDO |
---|
3854 | surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3855 | |
---|
3856 | IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
3857 | alpha_vangenuchten = soil_pars(0,soil_type) |
---|
3858 | ENDIF |
---|
3859 | |
---|
3860 | IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
3861 | l_vangenuchten = soil_pars(1,soil_type) |
---|
3862 | ENDIF |
---|
3863 | |
---|
3864 | IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
3865 | n_vangenuchten = soil_pars(2,soil_type) |
---|
3866 | ENDIF |
---|
3867 | |
---|
3868 | IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
3869 | hydraulic_conductivity = soil_pars(3,soil_type) |
---|
3870 | ENDIF |
---|
3871 | |
---|
3872 | IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
3873 | saturation_moisture = m_soil_pars(0,soil_type) |
---|
3874 | ENDIF |
---|
3875 | |
---|
3876 | IF ( field_capacity == 9999999.9_wp ) THEN |
---|
3877 | field_capacity = m_soil_pars(1,soil_type) |
---|
3878 | ENDIF |
---|
3879 | |
---|
3880 | IF ( wilting_point == 9999999.9_wp ) THEN |
---|
3881 | wilting_point = m_soil_pars(2,soil_type) |
---|
3882 | ENDIF |
---|
3883 | |
---|
3884 | IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
3885 | residual_moisture = m_soil_pars(3,soil_type) |
---|
3886 | ENDIF |
---|
3887 | |
---|
3888 | DO k = nzb_wall, nzt_wall+1 |
---|
3889 | swc_h(k,m) = field_capacity |
---|
3890 | rootfr_h(k,m) = 0.5_wp |
---|
3891 | surf_usm_h%alpha_vg_green(m) = alpha_vangenuchten |
---|
3892 | surf_usm_h%l_vg_green(m) = l_vangenuchten |
---|
3893 | surf_usm_h%n_vg_green(m) = n_vangenuchten |
---|
3894 | surf_usm_h%gamma_w_green_sat(k,m) = hydraulic_conductivity |
---|
3895 | swc_sat_h(k,m) = saturation_moisture |
---|
3896 | fc_h(k,m) = field_capacity |
---|
3897 | wilt_h(k,m) = wilting_point |
---|
3898 | swc_res_h(k,m) = residual_moisture |
---|
3899 | ENDDO |
---|
3900 | |
---|
3901 | ENDDO |
---|
3902 | |
---|
3903 | surf_usm_h%ddz_wall = 1.0_wp / surf_usm_h%dz_wall |
---|
3904 | surf_usm_h%ddz_wall_stag = 1.0_wp / surf_usm_h%dz_wall_stag |
---|
3905 | surf_usm_h%ddz_window = 1.0_wp / surf_usm_h%dz_window |
---|
3906 | surf_usm_h%ddz_window_stag = 1.0_wp / surf_usm_h%dz_window_stag |
---|
3907 | surf_usm_h%ddz_green = 1.0_wp / surf_usm_h%dz_green |
---|
3908 | surf_usm_h%ddz_green_stag = 1.0_wp / surf_usm_h%dz_green_stag |
---|
3909 | ! |
---|
3910 | !-- For vertical surfaces |
---|
3911 | DO l = 0, 3 |
---|
3912 | DO m = 1, surf_usm_v(l)%ns |
---|
3913 | surf_usm_v(l)%dz_wall(nzb_wall,m) = surf_usm_v(l)%zw(nzb_wall,m) |
---|
3914 | DO k = nzb_wall+1, nzt_wall |
---|
3915 | surf_usm_v(l)%dz_wall(k,m) = surf_usm_v(l)%zw(k,m) - & |
---|
3916 | surf_usm_v(l)%zw(k-1,m) |
---|
3917 | ENDDO |
---|
3918 | surf_usm_v(l)%dz_window(nzb_wall,m) = surf_usm_v(l)%zw_window(nzb_wall,m) |
---|
3919 | DO k = nzb_wall+1, nzt_wall |
---|
3920 | surf_usm_v(l)%dz_window(k,m) = surf_usm_v(l)%zw_window(k,m) - & |
---|
3921 | surf_usm_v(l)%zw_window(k-1,m) |
---|
3922 | ENDDO |
---|
3923 | surf_usm_v(l)%dz_green(nzb_wall,m) = surf_usm_v(l)%zw_green(nzb_wall,m) |
---|
3924 | DO k = nzb_wall+1, nzt_wall |
---|
3925 | surf_usm_v(l)%dz_green(k,m) = surf_usm_v(l)%zw_green(k,m) - & |
---|
3926 | surf_usm_v(l)%zw_green(k-1,m) |
---|
3927 | ENDDO |
---|
3928 | |
---|
3929 | surf_usm_v(l)%dz_wall(nzt_wall+1,m) = & |
---|
3930 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
3931 | |
---|
3932 | DO k = nzb_wall, nzt_wall-1 |
---|
3933 | surf_usm_v(l)%dz_wall_stag(k,m) = 0.5 * ( & |
---|
3934 | surf_usm_v(l)%dz_wall(k+1,m) + & |
---|
3935 | surf_usm_v(l)%dz_wall(k,m) ) |
---|
3936 | ENDDO |
---|
3937 | surf_usm_v(l)%dz_wall_stag(nzt_wall,m) = & |
---|
3938 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
3939 | surf_usm_v(l)%dz_window(nzt_wall+1,m) = & |
---|
3940 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
3941 | |
---|
3942 | DO k = nzb_wall, nzt_wall-1 |
---|
3943 | surf_usm_v(l)%dz_window_stag(k,m) = 0.5 * ( & |
---|
3944 | surf_usm_v(l)%dz_window(k+1,m) + & |
---|
3945 | surf_usm_v(l)%dz_window(k,m) ) |
---|
3946 | ENDDO |
---|
3947 | surf_usm_v(l)%dz_window_stag(nzt_wall,m) = & |
---|
3948 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
3949 | surf_usm_v(l)%dz_green(nzt_wall+1,m) = & |
---|
3950 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
3951 | |
---|
3952 | DO k = nzb_wall, nzt_wall-1 |
---|
3953 | surf_usm_v(l)%dz_green_stag(k,m) = 0.5 * ( & |
---|
3954 | surf_usm_v(l)%dz_green(k+1,m) + & |
---|
3955 | surf_usm_v(l)%dz_green(k,m) ) |
---|
3956 | ENDDO |
---|
3957 | surf_usm_v(l)%dz_green_stag(nzt_wall,m) = & |
---|
3958 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
3959 | ENDDO |
---|
3960 | surf_usm_v(l)%ddz_wall = 1.0_wp / surf_usm_v(l)%dz_wall |
---|
3961 | surf_usm_v(l)%ddz_wall_stag = 1.0_wp / surf_usm_v(l)%dz_wall_stag |
---|
3962 | surf_usm_v(l)%ddz_window = 1.0_wp / surf_usm_v(l)%dz_window |
---|
3963 | surf_usm_v(l)%ddz_window_stag = 1.0_wp / surf_usm_v(l)%dz_window_stag |
---|
3964 | surf_usm_v(l)%ddz_green = 1.0_wp / surf_usm_v(l)%dz_green |
---|
3965 | surf_usm_v(l)%ddz_green_stag = 1.0_wp / surf_usm_v(l)%dz_green_stag |
---|
3966 | ENDDO |
---|
3967 | |
---|
3968 | |
---|
3969 | CALL location_message( ' wall structures filed out', .TRUE. ) |
---|
3970 | |
---|
3971 | CALL location_message( ' initialization of wall surface model finished', .TRUE. ) |
---|
3972 | |
---|
3973 | END SUBROUTINE usm_init_material_model |
---|
3974 | |
---|
3975 | |
---|
3976 | !------------------------------------------------------------------------------! |
---|
3977 | ! Description: |
---|
3978 | ! ------------ |
---|
3979 | !> Initialization of the urban surface model |
---|
3980 | !------------------------------------------------------------------------------! |
---|
3981 | SUBROUTINE usm_init |
---|
3982 | |
---|
3983 | USE arrays_3d, & |
---|
3984 | ONLY: zw |
---|
3985 | |
---|
3986 | USE netcdf_data_input_mod, & |
---|
3987 | ONLY: building_pars_f, building_type_f, terrain_height_f |
---|
3988 | |
---|
3989 | IMPLICIT NONE |
---|
3990 | |
---|
3991 | INTEGER(iwp) :: i !< loop index x-dirction |
---|
3992 | INTEGER(iwp) :: ind_alb_green !< index in input list for green albedo |
---|
3993 | INTEGER(iwp) :: ind_alb_wall !< index in input list for wall albedo |
---|
3994 | INTEGER(iwp) :: ind_alb_win !< index in input list for window albedo |
---|
3995 | INTEGER(iwp) :: ind_emis_wall !< index in input list for wall emissivity |
---|
3996 | INTEGER(iwp) :: ind_emis_green !< index in input list for green emissivity |
---|
3997 | INTEGER(iwp) :: ind_emis_win !< index in input list for window emissivity |
---|
3998 | INTEGER(iwp) :: ind_green_frac_w !< index in input list for green fraction on wall |
---|
3999 | INTEGER(iwp) :: ind_green_frac_r !< index in input list for green fraction on roof |
---|
4000 | INTEGER(iwp) :: ind_hc1 !< index in input list for heat capacity at first wall layer |
---|
4001 | INTEGER(iwp) :: ind_hc1_win !< index in input list for heat capacity at first window layer |
---|
4002 | INTEGER(iwp) :: ind_hc2 !< index in input list for heat capacity at second wall layer |
---|
4003 | INTEGER(iwp) :: ind_hc2_win !< index in input list for heat capacity at second window layer |
---|
4004 | INTEGER(iwp) :: ind_hc3 !< index in input list for heat capacity at third wall layer |
---|
4005 | INTEGER(iwp) :: ind_hc3_win !< index in input list for heat capacity at third window layer |
---|
4006 | INTEGER(iwp) :: ind_lai_r !< index in input list for LAI on roof |
---|
4007 | INTEGER(iwp) :: ind_lai_w !< index in input list for LAI on wall |
---|
4008 | INTEGER(iwp) :: ind_tc1 !< index in input list for thermal conductivity at first wall layer |
---|
4009 | INTEGER(iwp) :: ind_tc1_win !< index in input list for thermal conductivity at first window layer |
---|
4010 | INTEGER(iwp) :: ind_tc2 !< index in input list for thermal conductivity at second wall layer |
---|
4011 | INTEGER(iwp) :: ind_tc2_win !< index in input list for thermal conductivity at second window layer |
---|
4012 | INTEGER(iwp) :: ind_tc3 !< index in input list for thermal conductivity at third wall layer |
---|
4013 | INTEGER(iwp) :: ind_tc3_win !< index in input list for thermal conductivity at third window layer |
---|
4014 | INTEGER(iwp) :: ind_thick_1 !< index in input list for thickness of first wall layer |
---|
4015 | INTEGER(iwp) :: ind_thick_1_win !< index in input list for thickness of first window layer |
---|
4016 | INTEGER(iwp) :: ind_thick_2 !< index in input list for thickness of second wall layer |
---|
4017 | INTEGER(iwp) :: ind_thick_2_win !< index in input list for thickness of second window layer |
---|
4018 | INTEGER(iwp) :: ind_thick_3 !< index in input list for thickness of third wall layer |
---|
4019 | INTEGER(iwp) :: ind_thick_3_win !< index in input list for thickness of third window layer |
---|
4020 | INTEGER(iwp) :: ind_thick_4 !< index in input list for thickness of fourth wall layer |
---|
4021 | INTEGER(iwp) :: ind_thick_4_win !< index in input list for thickness of fourth window layer |
---|
4022 | INTEGER(iwp) :: ind_trans !< index in input list for window transmissivity |
---|
4023 | INTEGER(iwp) :: ind_wall_frac !< index in input list for wall fraction |
---|
4024 | INTEGER(iwp) :: ind_win_frac !< index in input list for window fraction |
---|
4025 | INTEGER(iwp) :: ind_z0 !< index in input list for z0 |
---|
4026 | INTEGER(iwp) :: ind_z0qh !< index in input list for z0h / z0q |
---|
4027 | INTEGER(iwp) :: j !< loop index y-dirction |
---|
4028 | INTEGER(iwp) :: k !< loop index z-dirction |
---|
4029 | INTEGER(iwp) :: l !< loop index surface orientation |
---|
4030 | INTEGER(iwp) :: m !< loop index surface element |
---|
4031 | INTEGER(iwp) :: st !< dummy |
---|
4032 | |
---|
4033 | REAL(wp) :: c, tin, twin |
---|
4034 | REAL(wp) :: ground_floor_level_l !< local height of ground floor level |
---|
4035 | REAL(wp) :: z_agl !< height above ground |
---|
4036 | |
---|
4037 | CALL location_message( 'initializing urban surface model', .FALSE. ) |
---|
4038 | |
---|
4039 | CALL cpu_log( log_point_s(78), 'usm_init', 'start' ) |
---|
4040 | ! |
---|
4041 | !-- surface forcing have to be disabled for LSF |
---|
4042 | !-- in case of enabled urban surface module |
---|
4043 | IF ( large_scale_forcing ) THEN |
---|
4044 | lsf_surf = .FALSE. |
---|
4045 | ENDIF |
---|
4046 | |
---|
4047 | ! |
---|
4048 | !-- Flag surface elements belonging to the ground floor level. Therefore, |
---|
4049 | !-- use terrain height array from file, if available. This flag is later used |
---|
4050 | !-- to control initialization of surface attributes. |
---|
4051 | !-- Todo: for the moment disable initialization of building roofs with |
---|
4052 | !-- ground-floor-level properties. |
---|
4053 | surf_usm_h%ground_level = .FALSE. |
---|
4054 | ! DO m = 1, surf_usm_h%ns |
---|
4055 | ! i = surf_usm_h%i(m) |
---|
4056 | ! j = surf_usm_h%j(m) |
---|
4057 | ! k = surf_usm_h%k(m) |
---|
4058 | ! ! |
---|
4059 | ! !-- Get local ground level. If no ground level is given in input file, |
---|
4060 | ! !-- use default value. |
---|
4061 | ! ground_floor_level_l = ground_floor_level |
---|
4062 | ! IF ( building_pars_f%from_file ) THEN |
---|
4063 | ! IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4064 | ! building_pars_f%fill ) & |
---|
4065 | ! ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4066 | ! ENDIF |
---|
4067 | ! ! |
---|
4068 | ! !-- Determine height of surface element above ground level |
---|
4069 | ! IF ( terrain_height_f%from_file ) THEN |
---|
4070 | ! z_agl = zw(k) - terrain_height_f%var(j,i) |
---|
4071 | ! ELSE |
---|
4072 | ! z_agl = zw(k) |
---|
4073 | ! ENDIF |
---|
4074 | ! ! |
---|
4075 | ! !-- Set flag for ground level |
---|
4076 | ! IF ( z_agl <= ground_floor_level_l ) & |
---|
4077 | ! surf_usm_h%ground_level(m) = .TRUE. |
---|
4078 | ! ENDDO |
---|
4079 | |
---|
4080 | DO l = 0, 3 |
---|
4081 | surf_usm_v(l)%ground_level = .FALSE. |
---|
4082 | DO m = 1, surf_usm_v(l)%ns |
---|
4083 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4084 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4085 | k = surf_usm_v(l)%k(m) |
---|
4086 | ! |
---|
4087 | !-- Get local ground level. If no ground level is given in input file, |
---|
4088 | !-- use default value. |
---|
4089 | ground_floor_level_l = ground_floor_level |
---|
4090 | IF ( building_pars_f%from_file ) THEN |
---|
4091 | IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4092 | building_pars_f%fill ) & |
---|
4093 | ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4094 | ENDIF |
---|
4095 | ! |
---|
4096 | !-- Determine height of surface element above ground level. Please |
---|
4097 | !-- note, height of surface element is determined with respect to |
---|
4098 | !-- its height of the adjoing atmospheric grid point. |
---|
4099 | IF ( terrain_height_f%from_file ) THEN |
---|
4100 | z_agl = zw(k) - terrain_height_f%var(j-surf_usm_v(l)%joff, & |
---|
4101 | i-surf_usm_v(l)%ioff) |
---|
4102 | ELSE |
---|
4103 | z_agl = zw(k) |
---|
4104 | ENDIF |
---|
4105 | ! |
---|
4106 | !-- Set flag for ground level |
---|
4107 | IF ( z_agl <= ground_floor_level_l ) & |
---|
4108 | surf_usm_v(l)%ground_level(m) = .TRUE. |
---|
4109 | |
---|
4110 | ENDDO |
---|
4111 | ENDDO |
---|
4112 | ! |
---|
4113 | !-- Initialization of resistances. |
---|
4114 | DO m = 1, surf_usm_h%ns |
---|
4115 | surf_usm_h%r_a(m) = 50.0_wp |
---|
4116 | surf_usm_h%r_a_green(m) = 50.0_wp |
---|
4117 | surf_usm_h%r_a_window(m) = 50.0_wp |
---|
4118 | ENDDO |
---|
4119 | DO l = 0, 3 |
---|
4120 | DO m = 1, surf_usm_v(l)%ns |
---|
4121 | surf_usm_v(l)%r_a(m) = 50.0_wp |
---|
4122 | surf_usm_v(l)%r_a_green(m) = 50.0_wp |
---|
4123 | surf_usm_v(l)%r_a_window(m) = 50.0_wp |
---|
4124 | ENDDO |
---|
4125 | ENDDO |
---|
4126 | |
---|
4127 | ! |
---|
4128 | !-- Map values onto horizontal elemements |
---|
4129 | DO m = 1, surf_usm_h%ns |
---|
4130 | surf_usm_h%r_canopy_min(m) = 200.0_wp !< min_canopy_resistance |
---|
4131 | surf_usm_h%g_d(m) = 0.0_wp !< canopy_resistance_coefficient |
---|
4132 | ENDDO |
---|
4133 | ! |
---|
4134 | !-- Map values onto vertical elements, even though this does not make |
---|
4135 | !-- much sense. |
---|
4136 | DO l = 0, 3 |
---|
4137 | DO m = 1, surf_usm_v(l)%ns |
---|
4138 | surf_usm_v(l)%r_canopy_min(m) = 200.0_wp !< min_canopy_resistance |
---|
4139 | surf_usm_v(l)%g_d(m) = 0.0_wp !< canopy_resistance_coefficient |
---|
4140 | ENDDO |
---|
4141 | ENDDO |
---|
4142 | |
---|
4143 | ! |
---|
4144 | !-- Initialize urban-type surface attribute. According to initialization in |
---|
4145 | !-- land-surface model, follow a 3-level approach. |
---|
4146 | !-- Level 1 - initialization via default attributes |
---|
4147 | DO m = 1, surf_usm_h%ns |
---|
4148 | ! |
---|
4149 | !-- Now, all horizontal surfaces are roof surfaces (?) |
---|
4150 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
4151 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
4152 | ! |
---|
4153 | !-- In order to distinguish between ground floor level and |
---|
4154 | !-- above-ground-floor level surfaces, set input indices. |
---|
4155 | |
---|
4156 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4157 | surf_usm_h%ground_level(m) ) |
---|
4158 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4159 | surf_usm_h%ground_level(m) ) |
---|
4160 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4161 | surf_usm_h%ground_level(m) ) |
---|
4162 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4163 | surf_usm_h%ground_level(m) ) |
---|
4164 | ! |
---|
4165 | !-- Store building type and its name on each surface element |
---|
4166 | surf_usm_h%building_type(m) = building_type |
---|
4167 | surf_usm_h%building_type_name(m) = building_type_name(building_type) |
---|
4168 | ! |
---|
4169 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4170 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,building_type) |
---|
4171 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,building_type) |
---|
4172 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,building_type) |
---|
4173 | surf_usm_h%lai(m) = building_pars(ind_lai_r,building_type) |
---|
4174 | |
---|
4175 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
4176 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
4177 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,building_type) |
---|
4178 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,building_type) |
---|
4179 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
4180 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
4181 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,building_type) |
---|
4182 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,building_type) |
---|
4183 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
4184 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
4185 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,building_type) |
---|
4186 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,building_type) |
---|
4187 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
4188 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
4189 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,building_type) |
---|
4190 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,building_type) |
---|
4191 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,building_type) |
---|
4192 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,building_type) |
---|
4193 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,building_type) |
---|
4194 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,building_type) |
---|
4195 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,building_type) |
---|
4196 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,building_type) |
---|
4197 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,building_type) |
---|
4198 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,building_type) |
---|
4199 | |
---|
4200 | surf_usm_h%target_temp_summer(m) = building_pars(117,building_type) |
---|
4201 | surf_usm_h%target_temp_winter(m) = building_pars(118,building_type) |
---|
4202 | ! |
---|
4203 | !-- emissivity of wall-, green- and window fraction |
---|
4204 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,building_type) |
---|
4205 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,building_type) |
---|
4206 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,building_type) |
---|
4207 | |
---|
4208 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,building_type) |
---|
4209 | |
---|
4210 | surf_usm_h%z0(m) = building_pars(ind_z0,building_type) |
---|
4211 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
4212 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
4213 | ! |
---|
4214 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
4215 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,building_type) ) |
---|
4216 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,building_type) ) |
---|
4217 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,building_type) ) |
---|
4218 | |
---|
4219 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
4220 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
4221 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
4222 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
4223 | |
---|
4224 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
4225 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
4226 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
4227 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
4228 | |
---|
4229 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,building_type) |
---|
4230 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,building_type) |
---|
4231 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,building_type) |
---|
4232 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,building_type) |
---|
4233 | |
---|
4234 | surf_usm_h%c_surface(m) = building_pars(0,building_type) |
---|
4235 | surf_usm_h%lambda_surf(m) = building_pars(3,building_type) |
---|
4236 | surf_usm_h%c_surface_green(m) = building_pars(2,building_type) |
---|
4237 | surf_usm_h%lambda_surf_green(m) = building_pars(5,building_type) |
---|
4238 | surf_usm_h%c_surface_window(m) = building_pars(1,building_type) |
---|
4239 | surf_usm_h%lambda_surf_window(m) = building_pars(4,building_type) |
---|
4240 | |
---|
4241 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,building_type) |
---|
4242 | |
---|
4243 | ENDDO |
---|
4244 | |
---|
4245 | DO l = 0, 3 |
---|
4246 | DO m = 1, surf_usm_v(l)%ns |
---|
4247 | |
---|
4248 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for root surface |
---|
4249 | ! |
---|
4250 | !-- In order to distinguish between ground floor level and |
---|
4251 | !-- above-ground-floor level surfaces, set input indices. |
---|
4252 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
4253 | surf_usm_v(l)%ground_level(m) ) |
---|
4254 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
4255 | surf_usm_v(l)%ground_level(m) ) |
---|
4256 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
4257 | surf_usm_v(l)%ground_level(m) ) |
---|
4258 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4259 | surf_usm_v(l)%ground_level(m) ) |
---|
4260 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4261 | surf_usm_v(l)%ground_level(m) ) |
---|
4262 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4263 | surf_usm_v(l)%ground_level(m) ) |
---|
4264 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4265 | surf_usm_v(l)%ground_level(m) ) |
---|
4266 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4267 | surf_usm_v(l)%ground_level(m) ) |
---|
4268 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4269 | surf_usm_v(l)%ground_level(m) ) |
---|
4270 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4271 | surf_usm_v(l)%ground_level(m) ) |
---|
4272 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
4273 | surf_usm_v(l)%ground_level(m) ) |
---|
4274 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4275 | surf_usm_v(l)%ground_level(m) ) |
---|
4276 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
4277 | surf_usm_v(l)%ground_level(m) ) |
---|
4278 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4279 | surf_usm_v(l)%ground_level(m) ) |
---|
4280 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
4281 | surf_usm_v(l)%ground_level(m) ) |
---|
4282 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4283 | surf_usm_v(l)%ground_level(m) ) |
---|
4284 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
4285 | surf_usm_v(l)%ground_level(m) ) |
---|
4286 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4287 | surf_usm_v(l)%ground_level(m) ) |
---|
4288 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
4289 | surf_usm_v(l)%ground_level(m) ) |
---|
4290 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4291 | surf_usm_v(l)%ground_level(m) ) |
---|
4292 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
4293 | surf_usm_v(l)%ground_level(m) ) |
---|
4294 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
4295 | surf_usm_v(l)%ground_level(m) ) |
---|
4296 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
4297 | surf_usm_v(l)%ground_level(m) ) |
---|
4298 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
4299 | surf_usm_v(l)%ground_level(m) ) |
---|
4300 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
4301 | surf_usm_v(l)%ground_level(m) ) |
---|
4302 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
4303 | surf_usm_v(l)%ground_level(m) ) |
---|
4304 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
4305 | surf_usm_v(l)%ground_level(m) ) |
---|
4306 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
4307 | surf_usm_v(l)%ground_level(m) ) |
---|
4308 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
4309 | surf_usm_v(l)%ground_level(m) ) |
---|
4310 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4311 | surf_usm_v(l)%ground_level(m) ) |
---|
4312 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4313 | surf_usm_v(l)%ground_level(m) ) |
---|
4314 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4315 | surf_usm_v(l)%ground_level(m) ) |
---|
4316 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4317 | surf_usm_v(l)%ground_level(m) ) |
---|
4318 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4319 | surf_usm_v(l)%ground_level(m) ) |
---|
4320 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4321 | surf_usm_v(l)%ground_level(m) ) |
---|
4322 | ! |
---|
4323 | !-- Store building type and its name on each surface element |
---|
4324 | surf_usm_v(l)%building_type(m) = building_type |
---|
4325 | surf_usm_v(l)%building_type_name(m) = building_type_name(building_type) |
---|
4326 | ! |
---|
4327 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4328 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,building_type) |
---|
4329 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,building_type) |
---|
4330 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,building_type) |
---|
4331 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,building_type) |
---|
4332 | |
---|
4333 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
4334 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
4335 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
4336 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
4337 | |
---|
4338 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
4339 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
4340 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,building_type) |
---|
4341 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,building_type) |
---|
4342 | |
---|
4343 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,building_type) |
---|
4344 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,building_type) |
---|
4345 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,building_type) |
---|
4346 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,building_type) |
---|
4347 | |
---|
4348 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
4349 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
4350 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
4351 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
4352 | |
---|
4353 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
4354 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
4355 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,building_type) |
---|
4356 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,building_type) |
---|
4357 | |
---|
4358 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,building_type) |
---|
4359 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,building_type) |
---|
4360 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,building_type) |
---|
4361 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,building_type) |
---|
4362 | |
---|
4363 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,building_type) |
---|
4364 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,building_type) |
---|
4365 | ! |
---|
4366 | !-- emissivity of wall-, green- and window fraction |
---|
4367 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,building_type) |
---|
4368 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,building_type) |
---|
4369 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,building_type) |
---|
4370 | |
---|
4371 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,building_type) |
---|
4372 | |
---|
4373 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,building_type) |
---|
4374 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
4375 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
4376 | |
---|
4377 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,building_type) ) |
---|
4378 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,building_type) ) |
---|
4379 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,building_type) ) |
---|
4380 | |
---|
4381 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
4382 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
4383 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
4384 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
4385 | |
---|
4386 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
4387 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
4388 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
4389 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
4390 | |
---|
4391 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,building_type) |
---|
4392 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,building_type) |
---|
4393 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,building_type) |
---|
4394 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,building_type) |
---|
4395 | |
---|
4396 | surf_usm_v(l)%c_surface(m) = building_pars(0,building_type) |
---|
4397 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,building_type) |
---|
4398 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,building_type) |
---|
4399 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,building_type) |
---|
4400 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,building_type) |
---|
4401 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,building_type) |
---|
4402 | |
---|
4403 | ENDDO |
---|
4404 | ENDDO |
---|
4405 | ! |
---|
4406 | !-- Level 2 - initialization via building type read from file |
---|
4407 | IF ( building_type_f%from_file ) THEN |
---|
4408 | DO m = 1, surf_usm_h%ns |
---|
4409 | i = surf_usm_h%i(m) |
---|
4410 | j = surf_usm_h%j(m) |
---|
4411 | ! |
---|
4412 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
4413 | st = building_type_f%var(j,i) |
---|
4414 | IF ( st /= building_type_f%fill ) THEN |
---|
4415 | |
---|
4416 | ! |
---|
4417 | !-- In order to distinguish between ground floor level and |
---|
4418 | !-- above-ground-floor level surfaces, set input indices. |
---|
4419 | |
---|
4420 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4421 | surf_usm_h%ground_level(m) ) |
---|
4422 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4423 | surf_usm_h%ground_level(m) ) |
---|
4424 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4425 | surf_usm_h%ground_level(m) ) |
---|
4426 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4427 | surf_usm_h%ground_level(m) ) |
---|
4428 | ! |
---|
4429 | !-- Store building type and its name on each surface element |
---|
4430 | surf_usm_h%building_type(m) = st |
---|
4431 | surf_usm_h%building_type_name(m) = building_type_name(st) |
---|
4432 | ! |
---|
4433 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4434 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,st) |
---|
4435 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,st) |
---|
4436 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,st) |
---|
4437 | surf_usm_h%lai(m) = building_pars(ind_lai_r,st) |
---|
4438 | |
---|
4439 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,st) |
---|
4440 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,st) |
---|
4441 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,st) |
---|
4442 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,st) |
---|
4443 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,st) |
---|
4444 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,st) |
---|
4445 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,st) |
---|
4446 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,st) |
---|
4447 | |
---|
4448 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
4449 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
4450 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,st) |
---|
4451 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,st) |
---|
4452 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
4453 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
4454 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,st) |
---|
4455 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,st) |
---|
4456 | |
---|
4457 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,st) |
---|
4458 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,st) |
---|
4459 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,st) |
---|
4460 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,st) |
---|
4461 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,st) |
---|
4462 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,st) |
---|
4463 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,st) |
---|
4464 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,st) |
---|
4465 | |
---|
4466 | surf_usm_h%target_temp_summer(m) = building_pars(117,st) |
---|
4467 | surf_usm_h%target_temp_winter(m) = building_pars(118,st) |
---|
4468 | ! |
---|
4469 | !-- emissivity of wall-, green- and window fraction |
---|
4470 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,st) |
---|
4471 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,st) |
---|
4472 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,st) |
---|
4473 | |
---|
4474 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,st) |
---|
4475 | |
---|
4476 | surf_usm_h%z0(m) = building_pars(ind_z0,st) |
---|
4477 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,st) |
---|
4478 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,st) |
---|
4479 | ! |
---|
4480 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
4481 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,st) ) |
---|
4482 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,st) ) |
---|
4483 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,st) ) |
---|
4484 | |
---|
4485 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
4486 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
4487 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
4488 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
4489 | |
---|
4490 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
4491 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
4492 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
4493 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
4494 | |
---|
4495 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,st) |
---|
4496 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,st) |
---|
4497 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,st) |
---|
4498 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,st) |
---|
4499 | |
---|
4500 | surf_usm_h%c_surface(m) = building_pars(0,st) |
---|
4501 | surf_usm_h%lambda_surf(m) = building_pars(3,st) |
---|
4502 | surf_usm_h%c_surface_green(m) = building_pars(2,st) |
---|
4503 | surf_usm_h%lambda_surf_green(m) = building_pars(5,st) |
---|
4504 | surf_usm_h%c_surface_window(m) = building_pars(1,st) |
---|
4505 | surf_usm_h%lambda_surf_window(m) = building_pars(4,st) |
---|
4506 | |
---|
4507 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,st) |
---|
4508 | |
---|
4509 | ENDIF |
---|
4510 | ENDDO |
---|
4511 | |
---|
4512 | DO l = 0, 3 |
---|
4513 | DO m = 1, surf_usm_v(l)%ns |
---|
4514 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4515 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4516 | ! |
---|
4517 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
4518 | |
---|
4519 | st = building_type_f%var(j,i) |
---|
4520 | IF ( st /= building_type_f%fill ) THEN |
---|
4521 | |
---|
4522 | ! |
---|
4523 | !-- In order to distinguish between ground floor level and |
---|
4524 | !-- above-ground-floor level surfaces, set input indices. |
---|
4525 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
4526 | surf_usm_v(l)%ground_level(m) ) |
---|
4527 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
4528 | surf_usm_v(l)%ground_level(m) ) |
---|
4529 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
4530 | surf_usm_v(l)%ground_level(m) ) |
---|
4531 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4532 | surf_usm_v(l)%ground_level(m) ) |
---|
4533 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4534 | surf_usm_v(l)%ground_level(m) ) |
---|
4535 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4536 | surf_usm_v(l)%ground_level(m) ) |
---|
4537 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4538 | surf_usm_v(l)%ground_level(m) ) |
---|
4539 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4540 | surf_usm_v(l)%ground_level(m) ) |
---|
4541 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4542 | surf_usm_v(l)%ground_level(m) ) |
---|
4543 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4544 | surf_usm_v(l)%ground_level(m) ) |
---|
4545 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
4546 | surf_usm_v(l)%ground_level(m) ) |
---|
4547 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4548 | surf_usm_v(l)%ground_level(m) ) |
---|
4549 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
4550 | surf_usm_v(l)%ground_level(m) ) |
---|
4551 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4552 | surf_usm_v(l)%ground_level(m) ) |
---|
4553 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
4554 | surf_usm_v(l)%ground_level(m) ) |
---|
4555 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4556 | surf_usm_v(l)%ground_level(m) ) |
---|
4557 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
4558 | surf_usm_v(l)%ground_level(m) ) |
---|
4559 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4560 | surf_usm_v(l)%ground_level(m) ) |
---|
4561 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
4562 | surf_usm_v(l)%ground_level(m) ) |
---|
4563 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4564 | surf_usm_v(l)%ground_level(m) ) |
---|
4565 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
4566 | surf_usm_v(l)%ground_level(m) ) |
---|
4567 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
4568 | surf_usm_v(l)%ground_level(m) ) |
---|
4569 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
4570 | surf_usm_v(l)%ground_level(m) ) |
---|
4571 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
4572 | surf_usm_v(l)%ground_level(m) ) |
---|
4573 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
4574 | surf_usm_v(l)%ground_level(m) ) |
---|
4575 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
4576 | surf_usm_v(l)%ground_level(m) ) |
---|
4577 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
4578 | surf_usm_v(l)%ground_level(m) ) |
---|
4579 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
4580 | surf_usm_v(l)%ground_level(m) ) |
---|
4581 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
4582 | surf_usm_v(l)%ground_level(m) ) |
---|
4583 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4584 | surf_usm_v(l)%ground_level(m) ) |
---|
4585 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4586 | surf_usm_v(l)%ground_level(m) ) |
---|
4587 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4588 | surf_usm_v(l)%ground_level(m) ) |
---|
4589 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4590 | surf_usm_v(l)%ground_level(m) ) |
---|
4591 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4592 | surf_usm_v(l)%ground_level(m) ) |
---|
4593 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4594 | surf_usm_v(l)%ground_level(m) ) |
---|
4595 | ! |
---|
4596 | !-- Store building type and its name on each surface element |
---|
4597 | surf_usm_v(l)%building_type(m) = st |
---|
4598 | surf_usm_v(l)%building_type_name(m) = building_type_name(st) |
---|
4599 | ! |
---|
4600 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4601 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,st) |
---|
4602 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,st) |
---|
4603 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,st) |
---|
4604 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,st) |
---|
4605 | |
---|
4606 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
4607 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
4608 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
4609 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
4610 | |
---|
4611 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
4612 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
4613 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,st) |
---|
4614 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,st) |
---|
4615 | |
---|
4616 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,st) |
---|
4617 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,st) |
---|
4618 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,st) |
---|
4619 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,st) |
---|
4620 | |
---|
4621 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
4622 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
4623 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
4624 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
4625 | |
---|
4626 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
4627 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
4628 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,st) |
---|
4629 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,st) |
---|
4630 | |
---|
4631 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,st) |
---|
4632 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,st) |
---|
4633 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,st) |
---|
4634 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,st) |
---|
4635 | |
---|
4636 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,st) |
---|
4637 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,st) |
---|
4638 | ! |
---|
4639 | !-- emissivity of wall-, green- and window fraction |
---|
4640 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,st) |
---|
4641 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,st) |
---|
4642 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,st) |
---|
4643 | |
---|
4644 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,st) |
---|
4645 | |
---|
4646 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,st) |
---|
4647 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,st) |
---|
4648 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,st) |
---|
4649 | |
---|
4650 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,st) ) |
---|
4651 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,st) ) |
---|
4652 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,st) ) |
---|
4653 | |
---|
4654 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4655 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4656 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4657 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4658 | |
---|
4659 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4660 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4661 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4662 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4663 | |
---|
4664 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,st) |
---|
4665 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,st) |
---|
4666 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,st) |
---|
4667 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,st) |
---|
4668 | |
---|
4669 | surf_usm_v(l)%c_surface(m) = building_pars(0,st) |
---|
4670 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,st) |
---|
4671 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,st) |
---|
4672 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,st) |
---|
4673 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,st) |
---|
4674 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,st) |
---|
4675 | |
---|
4676 | |
---|
4677 | ENDIF |
---|
4678 | ENDDO |
---|
4679 | ENDDO |
---|
4680 | ENDIF |
---|
4681 | |
---|
4682 | ! |
---|
4683 | !-- Level 3 - initialization via building_pars read from file |
---|
4684 | IF ( building_pars_f%from_file ) THEN |
---|
4685 | DO m = 1, surf_usm_h%ns |
---|
4686 | i = surf_usm_h%i(m) |
---|
4687 | j = surf_usm_h%j(m) |
---|
4688 | |
---|
4689 | ! |
---|
4690 | !-- In order to distinguish between ground floor level and |
---|
4691 | !-- above-ground-floor level surfaces, set input indices. |
---|
4692 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4693 | surf_usm_h%ground_level(m) ) |
---|
4694 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4695 | surf_usm_h%ground_level(m) ) |
---|
4696 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4697 | surf_usm_h%ground_level(m) ) |
---|
4698 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4699 | surf_usm_h%ground_level(m) ) |
---|
4700 | |
---|
4701 | ! |
---|
4702 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4703 | IF ( building_pars_f%pars_xy(ind_wall_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4704 | surf_usm_h%frac(ind_veg_wall,m) = building_pars_f%pars_xy(ind_wall_frac_r,j,i) |
---|
4705 | IF ( building_pars_f%pars_xy(ind_green_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4706 | surf_usm_h%frac(ind_pav_green,m) = building_pars_f%pars_xy(ind_green_frac_r,j,i) |
---|
4707 | IF ( building_pars_f%pars_xy(ind_win_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4708 | surf_usm_h%frac(ind_wat_win,m) = building_pars_f%pars_xy(ind_win_frac_r,j,i) |
---|
4709 | |
---|
4710 | |
---|
4711 | IF ( building_pars_f%pars_xy(ind_lai_r,j,i) /= building_pars_f%fill ) & |
---|
4712 | surf_usm_h%lai(m) = building_pars_f%pars_xy(ind_lai_r,j,i) |
---|
4713 | |
---|
4714 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4715 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4716 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4717 | ENDIF |
---|
4718 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4719 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
4720 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4721 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
4722 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4723 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4724 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4725 | ENDIF |
---|
4726 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4727 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
4728 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4729 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
4730 | IF ( building_pars_f%pars_xy(ind_hc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
4731 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
4732 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
4733 | ENDIF |
---|
4734 | IF ( building_pars_f%pars_xy(ind_hc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
4735 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win_r,j,i) |
---|
4736 | IF ( building_pars_f%pars_xy(ind_hc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
4737 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win_r,j,i) |
---|
4738 | |
---|
4739 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4740 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
4741 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
4742 | ENDIF |
---|
4743 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4744 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_wall_r,j,i) |
---|
4745 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4746 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_wall_r,j,i) |
---|
4747 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4748 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
4749 | 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) |
---|
4750 | ENDIF |
---|
4751 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4752 | 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) |
---|
4753 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4754 | 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) |
---|
4755 | IF ( building_pars_f%pars_xy(ind_tc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
4756 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
4757 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
4758 | ENDIF |
---|
4759 | IF ( building_pars_f%pars_xy(ind_tc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
4760 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win_r,j,i) |
---|
4761 | IF ( building_pars_f%pars_xy(ind_tc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
4762 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win_r,j,i) |
---|
4763 | |
---|
4764 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
4765 | surf_usm_h%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
4766 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
4767 | surf_usm_h%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
4768 | |
---|
4769 | IF ( building_pars_f%pars_xy(ind_emis_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4770 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall_r,j,i) |
---|
4771 | IF ( building_pars_f%pars_xy(ind_emis_green_r,j,i) /= building_pars_f%fill )& |
---|
4772 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green_r,j,i) |
---|
4773 | IF ( building_pars_f%pars_xy(ind_emis_win_r,j,i) /= building_pars_f%fill ) & |
---|
4774 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win_r,j,i) |
---|
4775 | |
---|
4776 | IF ( building_pars_f%pars_xy(ind_trans_r,j,i) /= building_pars_f%fill ) & |
---|
4777 | surf_usm_h%transmissivity(m) = building_pars_f%pars_xy(ind_trans_r,j,i) |
---|
4778 | |
---|
4779 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
4780 | surf_usm_h%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
4781 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4782 | surf_usm_h%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4783 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4784 | surf_usm_h%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4785 | |
---|
4786 | IF ( building_pars_f%pars_xy(ind_alb_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4787 | surf_usm_h%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall_r,j,i) |
---|
4788 | IF ( building_pars_f%pars_xy(ind_alb_green_r,j,i) /= building_pars_f%fill ) & |
---|
4789 | surf_usm_h%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green_r,j,i) |
---|
4790 | IF ( building_pars_f%pars_xy(ind_alb_win_r,j,i) /= building_pars_f%fill ) & |
---|
4791 | surf_usm_h%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win_r,j,i) |
---|
4792 | |
---|
4793 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4794 | surf_usm_h%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
4795 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4796 | surf_usm_h%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
4797 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4798 | surf_usm_h%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
4799 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4800 | surf_usm_h%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
4801 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4802 | surf_usm_h%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
4803 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4804 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
4805 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4806 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
4807 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4808 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
4809 | IF ( building_pars_f%pars_xy(ind_thick_1_win_r,j,i) /= building_pars_f%fill ) & |
---|
4810 | surf_usm_h%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win_r,j,i) |
---|
4811 | IF ( building_pars_f%pars_xy(ind_thick_2_win_r,j,i) /= building_pars_f%fill ) & |
---|
4812 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win_r,j,i) |
---|
4813 | IF ( building_pars_f%pars_xy(ind_thick_3_win_r,j,i) /= building_pars_f%fill ) & |
---|
4814 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win_r,j,i) |
---|
4815 | IF ( building_pars_f%pars_xy(ind_thick_4_win_r,j,i) /= building_pars_f%fill ) & |
---|
4816 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win_r,j,i) |
---|
4817 | |
---|
4818 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
4819 | surf_usm_h%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
4820 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
4821 | surf_usm_h%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
4822 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
4823 | surf_usm_h%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
4824 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
4825 | surf_usm_h%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
4826 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
4827 | surf_usm_h%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
4828 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
4829 | surf_usm_h%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
4830 | |
---|
4831 | IF ( building_pars_f%pars_xy(ind_green_type_roof,j,i) /= building_pars_f%fill ) & |
---|
4832 | surf_usm_h%green_type_roof(m) = building_pars_f%pars_xy(ind_green_type_roof,j,i) |
---|
4833 | ENDDO |
---|
4834 | |
---|
4835 | |
---|
4836 | |
---|
4837 | DO l = 0, 3 |
---|
4838 | DO m = 1, surf_usm_v(l)%ns |
---|
4839 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4840 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4841 | |
---|
4842 | ! |
---|
4843 | !-- In order to distinguish between ground floor level and |
---|
4844 | !-- above-ground-floor level surfaces, set input indices. |
---|
4845 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
4846 | surf_usm_v(l)%ground_level(m) ) |
---|
4847 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
4848 | surf_usm_v(l)%ground_level(m) ) |
---|
4849 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
4850 | surf_usm_v(l)%ground_level(m) ) |
---|
4851 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4852 | surf_usm_v(l)%ground_level(m) ) |
---|
4853 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4854 | surf_usm_v(l)%ground_level(m) ) |
---|
4855 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4856 | surf_usm_v(l)%ground_level(m) ) |
---|
4857 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4858 | surf_usm_v(l)%ground_level(m) ) |
---|
4859 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4860 | surf_usm_v(l)%ground_level(m) ) |
---|
4861 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4862 | surf_usm_v(l)%ground_level(m) ) |
---|
4863 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4864 | surf_usm_v(l)%ground_level(m) ) |
---|
4865 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
4866 | surf_usm_v(l)%ground_level(m) ) |
---|
4867 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4868 | surf_usm_v(l)%ground_level(m) ) |
---|
4869 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
4870 | surf_usm_v(l)%ground_level(m) ) |
---|
4871 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4872 | surf_usm_v(l)%ground_level(m) ) |
---|
4873 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
4874 | surf_usm_v(l)%ground_level(m) ) |
---|
4875 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4876 | surf_usm_v(l)%ground_level(m) ) |
---|
4877 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
4878 | surf_usm_v(l)%ground_level(m) ) |
---|
4879 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4880 | surf_usm_v(l)%ground_level(m) ) |
---|
4881 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
4882 | surf_usm_v(l)%ground_level(m) ) |
---|
4883 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4884 | surf_usm_v(l)%ground_level(m) ) |
---|
4885 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
4886 | surf_usm_v(l)%ground_level(m) ) |
---|
4887 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
4888 | surf_usm_v(l)%ground_level(m) ) |
---|
4889 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
4890 | surf_usm_v(l)%ground_level(m) ) |
---|
4891 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
4892 | surf_usm_v(l)%ground_level(m) ) |
---|
4893 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
4894 | surf_usm_v(l)%ground_level(m) ) |
---|
4895 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
4896 | surf_usm_v(l)%ground_level(m) ) |
---|
4897 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
4898 | surf_usm_v(l)%ground_level(m) ) |
---|
4899 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
4900 | surf_usm_v(l)%ground_level(m) ) |
---|
4901 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
4902 | surf_usm_v(l)%ground_level(m) ) |
---|
4903 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4904 | surf_usm_v(l)%ground_level(m) ) |
---|
4905 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4906 | surf_usm_v(l)%ground_level(m) ) |
---|
4907 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4908 | surf_usm_v(l)%ground_level(m) ) |
---|
4909 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4910 | surf_usm_v(l)%ground_level(m) ) |
---|
4911 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4912 | surf_usm_v(l)%ground_level(m) ) |
---|
4913 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4914 | surf_usm_v(l)%ground_level(m) ) |
---|
4915 | |
---|
4916 | ! |
---|
4917 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4918 | IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= & |
---|
4919 | building_pars_f%fill ) & |
---|
4920 | surf_usm_v(l)%frac(ind_veg_wall,m) = & |
---|
4921 | building_pars_f%pars_xy(ind_wall_frac,j,i) |
---|
4922 | IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /= & |
---|
4923 | building_pars_f%fill ) & |
---|
4924 | surf_usm_v(l)%frac(ind_pav_green,m) = & |
---|
4925 | building_pars_f%pars_xy(ind_green_frac_w,j,i) |
---|
4926 | IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= & |
---|
4927 | building_pars_f%fill ) & |
---|
4928 | surf_usm_v(l)%frac(ind_wat_win,m) = & |
---|
4929 | building_pars_f%pars_xy(ind_win_frac,j,i) |
---|
4930 | |
---|
4931 | IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill ) & |
---|
4932 | surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i) |
---|
4933 | |
---|
4934 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) & |
---|
4935 | THEN |
---|
4936 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = & |
---|
4937 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4938 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = & |
---|
4939 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4940 | ENDIF |
---|
4941 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4942 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = & |
---|
4943 | building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4944 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4945 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = & |
---|
4946 | building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4947 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
4948 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = & |
---|
4949 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4950 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = & |
---|
4951 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4952 | ENDIF |
---|
4953 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4954 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4955 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4956 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4957 | IF ( building_pars_f%pars_xy(ind_hc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
4958 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
4959 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
4960 | ENDIF |
---|
4961 | IF ( building_pars_f%pars_xy(ind_hc2_win,j,i) /= building_pars_f%fill ) & |
---|
4962 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win,j,i) |
---|
4963 | IF ( building_pars_f%pars_xy(ind_hc3_win,j,i) /= building_pars_f%fill ) & |
---|
4964 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win,j,i) |
---|
4965 | |
---|
4966 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4967 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4968 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4969 | ENDIF |
---|
4970 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4971 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4972 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4973 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4974 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4975 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4976 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4977 | ENDIF |
---|
4978 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4979 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4980 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4981 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4982 | IF ( building_pars_f%pars_xy(ind_tc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
4983 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
4984 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
4985 | ENDIF |
---|
4986 | IF ( building_pars_f%pars_xy(ind_tc2_win,j,i) /= building_pars_f%fill ) & |
---|
4987 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win,j,i) |
---|
4988 | IF ( building_pars_f%pars_xy(ind_tc3_win,j,i) /= building_pars_f%fill ) & |
---|
4989 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win,j,i) |
---|
4990 | |
---|
4991 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
4992 | surf_usm_v(l)%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
4993 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
4994 | surf_usm_v(l)%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
4995 | |
---|
4996 | IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill ) & |
---|
4997 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall,j,i) |
---|
4998 | IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )& |
---|
4999 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green,j,i) |
---|
5000 | IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill ) & |
---|
5001 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win,j,i) |
---|
5002 | |
---|
5003 | IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill ) & |
---|
5004 | surf_usm_v(l)%transmissivity(m) = building_pars_f%pars_xy(ind_trans,j,i) |
---|
5005 | |
---|
5006 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
5007 | surf_usm_v(l)%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
5008 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5009 | surf_usm_v(l)%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5010 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5011 | surf_usm_v(l)%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5012 | |
---|
5013 | IF ( building_pars_f%pars_xy(ind_alb_wall,j,i) /= building_pars_f%fill ) & |
---|
5014 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall,j,i) |
---|
5015 | IF ( building_pars_f%pars_xy(ind_alb_green,j,i) /= building_pars_f%fill ) & |
---|
5016 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green,j,i) |
---|
5017 | IF ( building_pars_f%pars_xy(ind_alb_win,j,i) /= building_pars_f%fill ) & |
---|
5018 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win,j,i) |
---|
5019 | |
---|
5020 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5021 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5022 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5023 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5024 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5025 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5026 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5027 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5028 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5029 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5030 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5031 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5032 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5033 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5034 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5035 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5036 | IF ( building_pars_f%pars_xy(ind_thick_1_win,j,i) /= building_pars_f%fill ) & |
---|
5037 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win,j,i) |
---|
5038 | IF ( building_pars_f%pars_xy(ind_thick_2_win,j,i) /= building_pars_f%fill ) & |
---|
5039 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win,j,i) |
---|
5040 | IF ( building_pars_f%pars_xy(ind_thick_3_win,j,i) /= building_pars_f%fill ) & |
---|
5041 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win,j,i) |
---|
5042 | IF ( building_pars_f%pars_xy(ind_thick_4_win,j,i) /= building_pars_f%fill ) & |
---|
5043 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win,j,i) |
---|
5044 | |
---|
5045 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
5046 | surf_usm_v(l)%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
5047 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
5048 | surf_usm_v(l)%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
5049 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
5050 | surf_usm_v(l)%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
5051 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
5052 | surf_usm_v(l)%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
5053 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
5054 | surf_usm_v(l)%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
5055 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
5056 | surf_usm_v(l)%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
5057 | |
---|
5058 | ENDDO |
---|
5059 | ENDDO |
---|
5060 | ENDIF |
---|
5061 | ! |
---|
5062 | !-- Read the surface_types array. |
---|
5063 | !-- Please note, here also initialization of surface attributes is done as |
---|
5064 | !-- long as _urbsurf and _surfpar files are available. Values from above |
---|
5065 | !-- will be overwritten. This might be removed later, but is still in the |
---|
5066 | !-- code to enable compatibility with older model version. |
---|
5067 | CALL usm_read_urban_surface_types() |
---|
5068 | |
---|
5069 | CALL usm_init_material_model() |
---|
5070 | ! |
---|
5071 | !-- init anthropogenic sources of heat |
---|
5072 | IF ( usm_anthropogenic_heat ) THEN |
---|
5073 | ! |
---|
5074 | !-- init anthropogenic sources of heat (from transportation for now) |
---|
5075 | CALL usm_read_anthropogenic_heat() |
---|
5076 | ENDIF |
---|
5077 | |
---|
5078 | ! |
---|
5079 | !-- Check for consistent initialization. |
---|
5080 | !-- Check if roughness length for momentum, or heat, exceed surface-layer |
---|
5081 | !-- height and decrease local roughness length where necessary. |
---|
5082 | DO m = 1, surf_usm_h%ns |
---|
5083 | IF ( surf_usm_h%z0(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5084 | |
---|
5085 | surf_usm_h%z0(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5086 | |
---|
5087 | WRITE( message_string, * ) 'z0 exceeds surface-layer height ' // & |
---|
5088 | 'at horizontal urban surface and is ' // & |
---|
5089 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5090 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
5091 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
5092 | 0, 0, 0, 6, 0 ) |
---|
5093 | ENDIF |
---|
5094 | IF ( surf_usm_h%z0h(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5095 | |
---|
5096 | surf_usm_h%z0h(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5097 | surf_usm_h%z0q(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5098 | |
---|
5099 | WRITE( message_string, * ) 'z0h exceeds surface-layer height ' // & |
---|
5100 | 'at horizontal urban surface and is ' // & |
---|
5101 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5102 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
5103 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
5104 | 0, 0, 0, 6, 0 ) |
---|
5105 | ENDIF |
---|
5106 | ENDDO |
---|
5107 | |
---|
5108 | DO l = 0, 3 |
---|
5109 | DO m = 1, surf_usm_v(l)%ns |
---|
5110 | IF ( surf_usm_v(l)%z0(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
5111 | |
---|
5112 | surf_usm_v(l)%z0(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
5113 | |
---|
5114 | WRITE( message_string, * ) 'z0 exceeds surface-layer height '// & |
---|
5115 | 'at vertical urban surface and is ' // & |
---|
5116 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5117 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
5118 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
5119 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
5120 | 0, 0, 0, 6, 0 ) |
---|
5121 | ENDIF |
---|
5122 | IF ( surf_usm_v(l)%z0h(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
5123 | |
---|
5124 | surf_usm_v(l)%z0h(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
5125 | surf_usm_v(l)%z0q(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
5126 | |
---|
5127 | WRITE( message_string, * ) 'z0h exceeds surface-layer height '// & |
---|
5128 | 'at vertical urban surface and is ' // & |
---|
5129 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5130 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
5131 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
5132 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
5133 | 0, 0, 0, 6, 0 ) |
---|
5134 | ENDIF |
---|
5135 | ENDDO |
---|
5136 | ENDDO |
---|
5137 | |
---|
5138 | ! |
---|
5139 | !-- Intitialization of the surface and wall/ground/roof temperature |
---|
5140 | ! |
---|
5141 | !-- Initialization for restart runs |
---|
5142 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. & |
---|
5143 | TRIM( initializing_actions ) /= 'cyclic_fill' ) THEN |
---|
5144 | |
---|
5145 | ! |
---|
5146 | !-- At horizontal surfaces. Please note, t_surf_wall_h is defined on a |
---|
5147 | !-- different data type, but with the same dimension. |
---|
5148 | DO m = 1, surf_usm_h%ns |
---|
5149 | i = surf_usm_h%i(m) |
---|
5150 | j = surf_usm_h%j(m) |
---|
5151 | k = surf_usm_h%k(m) |
---|
5152 | |
---|
5153 | t_surf_wall_h(m) = pt(k,j,i) * exner(k) |
---|
5154 | t_surf_window_h(m) = pt(k,j,i) * exner(k) |
---|
5155 | t_surf_green_h(m) = pt(k,j,i) * exner(k) |
---|
5156 | surf_usm_h%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
5157 | ENDDO |
---|
5158 | ! |
---|
5159 | !-- At vertical surfaces. |
---|
5160 | DO l = 0, 3 |
---|
5161 | DO m = 1, surf_usm_v(l)%ns |
---|
5162 | i = surf_usm_v(l)%i(m) |
---|
5163 | j = surf_usm_v(l)%j(m) |
---|
5164 | k = surf_usm_v(l)%k(m) |
---|
5165 | |
---|
5166 | t_surf_wall_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
5167 | t_surf_window_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
5168 | t_surf_green_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
5169 | surf_usm_v(l)%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
5170 | ENDDO |
---|
5171 | ENDDO |
---|
5172 | |
---|
5173 | ! |
---|
5174 | !-- For the sake of correct initialization, set also q_surface. |
---|
5175 | !-- Note, at urban surfaces q_surface is initialized with 0. |
---|
5176 | IF ( humidity ) THEN |
---|
5177 | DO m = 1, surf_usm_h%ns |
---|
5178 | surf_usm_h%q_surface(m) = 0.0_wp |
---|
5179 | ENDDO |
---|
5180 | DO l = 0, 3 |
---|
5181 | DO m = 1, surf_usm_v(l)%ns |
---|
5182 | surf_usm_v(l)%q_surface(m) = 0.0_wp |
---|
5183 | ENDDO |
---|
5184 | ENDDO |
---|
5185 | ENDIF |
---|
5186 | ! |
---|
5187 | !-- initial values for t_wall |
---|
5188 | !-- outer value is set to surface temperature |
---|
5189 | !-- inner value is set to wall_inner_temperature |
---|
5190 | !-- and profile is logaritmic (linear in nz). |
---|
5191 | !-- Horizontal surfaces |
---|
5192 | DO m = 1, surf_usm_h%ns |
---|
5193 | ! |
---|
5194 | !-- Roof |
---|
5195 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
5196 | tin = roof_inner_temperature |
---|
5197 | twin = window_inner_temperature |
---|
5198 | ! |
---|
5199 | !-- Normal land surface |
---|
5200 | ELSE |
---|
5201 | tin = soil_inner_temperature |
---|
5202 | twin = window_inner_temperature |
---|
5203 | ENDIF |
---|
5204 | |
---|
5205 | DO k = nzb_wall, nzt_wall+1 |
---|
5206 | c = REAL( k - nzb_wall, wp ) / & |
---|
5207 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
5208 | |
---|
5209 | t_wall_h(k,m) = ( 1.0_wp - c ) * t_surf_wall_h(m) + c * tin |
---|
5210 | t_window_h(k,m) = ( 1.0_wp - c ) * t_surf_window_h(m) + c * twin |
---|
5211 | t_green_h(k,m) = t_surf_wall_h(m) |
---|
5212 | swc_h(k,m) = 0.5_wp |
---|
5213 | swc_sat_h(k,m) = 0.95_wp |
---|
5214 | swc_res_h(k,m) = 0.05_wp |
---|
5215 | rootfr_h(k,m) = 0.1_wp |
---|
5216 | wilt_h(k,m) = 0.1_wp |
---|
5217 | fc_h(k,m) = 0.9_wp |
---|
5218 | ENDDO |
---|
5219 | ENDDO |
---|
5220 | ! |
---|
5221 | !-- Vertical surfaces |
---|
5222 | DO l = 0, 3 |
---|
5223 | DO m = 1, surf_usm_v(l)%ns |
---|
5224 | ! |
---|
5225 | !-- Inner wall |
---|
5226 | tin = wall_inner_temperature |
---|
5227 | twin = window_inner_temperature |
---|
5228 | |
---|
5229 | DO k = nzb_wall, nzt_wall+1 |
---|
5230 | c = REAL( k - nzb_wall, wp ) / & |
---|
5231 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
5232 | t_wall_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_wall_v(l)%t(m) + c * tin |
---|
5233 | t_window_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_window_v(l)%t(m) + c * twin |
---|
5234 | t_green_v(l)%t(k,m) = t_surf_wall_v(l)%t(m) |
---|
5235 | swc_v(l)%t(k,m) = 0.5_wp |
---|
5236 | ENDDO |
---|
5237 | ENDDO |
---|
5238 | ENDDO |
---|
5239 | ENDIF |
---|
5240 | |
---|
5241 | ! |
---|
5242 | !-- If specified, replace constant wall temperatures with fully 3D values from file |
---|
5243 | IF ( read_wall_temp_3d ) CALL usm_read_wall_temperature() |
---|
5244 | |
---|
5245 | !-- |
---|
5246 | !-- Possibly DO user-defined actions (e.g. define heterogeneous wall surface) |
---|
5247 | CALL user_init_urban_surface |
---|
5248 | |
---|
5249 | ! |
---|
5250 | !-- initialize prognostic values for the first timestep |
---|
5251 | t_surf_wall_h_p = t_surf_wall_h |
---|
5252 | t_surf_wall_v_p = t_surf_wall_v |
---|
5253 | t_surf_window_h_p = t_surf_window_h |
---|
5254 | t_surf_window_v_p = t_surf_window_v |
---|
5255 | t_surf_green_h_p = t_surf_green_h |
---|
5256 | t_surf_green_v_p = t_surf_green_v |
---|
5257 | |
---|
5258 | t_wall_h_p = t_wall_h |
---|
5259 | t_wall_v_p = t_wall_v |
---|
5260 | t_window_h_p = t_window_h |
---|
5261 | t_window_v_p = t_window_v |
---|
5262 | t_green_h_p = t_green_h |
---|
5263 | t_green_v_p = t_green_v |
---|
5264 | |
---|
5265 | ! |
---|
5266 | !-- Adjust radiative fluxes for urban surface at model start |
---|
5267 | !CALL radiation_interaction |
---|
5268 | !-- TODO: interaction should be called once before first output, |
---|
5269 | !-- that is not yet possible. |
---|
5270 | |
---|
5271 | m_liq_usm_h_p = m_liq_usm_h |
---|
5272 | m_liq_usm_v_p = m_liq_usm_v |
---|
5273 | ! |
---|
5274 | !-- Set initial values for prognostic quantities |
---|
5275 | !-- Horizontal surfaces |
---|
5276 | tm_liq_usm_h_m%var_usm_1d = 0.0_wp |
---|
5277 | surf_usm_h%c_liq = 0.0_wp |
---|
5278 | |
---|
5279 | surf_usm_h%qsws_liq = 0.0_wp |
---|
5280 | surf_usm_h%qsws_veg = 0.0_wp |
---|
5281 | |
---|
5282 | ! |
---|
5283 | !-- Do the same for vertical surfaces |
---|
5284 | DO l = 0, 3 |
---|
5285 | tm_liq_usm_v_m(l)%var_usm_1d = 0.0_wp |
---|
5286 | surf_usm_v(l)%c_liq = 0.0_wp |
---|
5287 | |
---|
5288 | surf_usm_v(l)%qsws_liq = 0.0_wp |
---|
5289 | surf_usm_v(l)%qsws_veg = 0.0_wp |
---|
5290 | ENDDO |
---|
5291 | |
---|
5292 | ! |
---|
5293 | !-- Set initial values for prognostic soil quantities |
---|
5294 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN |
---|
5295 | m_liq_usm_h%var_usm_1d = 0.0_wp |
---|
5296 | |
---|
5297 | DO l = 0, 3 |
---|
5298 | m_liq_usm_v(l)%var_usm_1d = 0.0_wp |
---|
5299 | ENDDO |
---|
5300 | ENDIF |
---|
5301 | |
---|
5302 | CALL cpu_log( log_point_s(78), 'usm_init', 'stop' ) |
---|
5303 | |
---|
5304 | CALL location_message( 'finished', .TRUE. ) |
---|
5305 | |
---|
5306 | END SUBROUTINE usm_init |
---|
5307 | |
---|
5308 | |
---|
5309 | !------------------------------------------------------------------------------! |
---|
5310 | ! Description: |
---|
5311 | ! ------------ |
---|
5312 | ! |
---|
5313 | !> Wall model as part of the urban surface model. The model predicts vertical |
---|
5314 | !> and horizontal wall / roof temperatures and window layer temperatures. |
---|
5315 | !> No window layer temperature calculactions during spinup to increase |
---|
5316 | !> possible timestep. |
---|
5317 | !------------------------------------------------------------------------------! |
---|
5318 | SUBROUTINE usm_material_heat_model( spinup ) |
---|
5319 | |
---|
5320 | |
---|
5321 | IMPLICIT NONE |
---|
5322 | |
---|
5323 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
5324 | |
---|
5325 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wtend, wintend !< tendency |
---|
5326 | REAL(wp) :: win_absorp !< absorption coefficient from transmissivity |
---|
5327 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wall_mod |
---|
5328 | |
---|
5329 | LOGICAL :: spinup !< if true, no calculation of window temperatures |
---|
5330 | |
---|
5331 | wall_mod=1.0_wp |
---|
5332 | IF (usm_wall_mod .AND. spinup) THEN |
---|
5333 | DO kw=nzb_wall,nzb_wall+1 |
---|
5334 | wall_mod(kw)=0.1_wp |
---|
5335 | ENDDO |
---|
5336 | ENDIF |
---|
5337 | |
---|
5338 | ! |
---|
5339 | !-- For horizontal surfaces |
---|
5340 | DO m = 1, surf_usm_h%ns |
---|
5341 | ! |
---|
5342 | !-- Obtain indices |
---|
5343 | i = surf_usm_h%i(m) |
---|
5344 | j = surf_usm_h%j(m) |
---|
5345 | k = surf_usm_h%k(m) |
---|
5346 | ! |
---|
5347 | !-- prognostic equation for ground/roof temperature t_wall_h |
---|
5348 | wtend(:) = 0.0_wp |
---|
5349 | wtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzb_wall,m)) * & |
---|
5350 | ( surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
5351 | ( t_wall_h(nzb_wall+1,m) & |
---|
5352 | - t_wall_h(nzb_wall,m) ) * & |
---|
5353 | surf_usm_h%ddz_wall(nzb_wall+1,m) & |
---|
5354 | + surf_usm_h%frac(ind_veg_wall,m) & |
---|
5355 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
5356 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
5357 | * surf_usm_h%wghf_eb(m) & |
---|
5358 | - surf_usm_h%frac(ind_pav_green,m) & |
---|
5359 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
5360 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
5361 | * ( surf_usm_h%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
5362 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
5363 | + surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) & |
---|
5364 | * surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
5365 | / ( surf_usm_h%ddz_green(nzt_wall,m) & |
---|
5366 | + surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
5367 | * ( t_wall_h(nzb_wall,m) & |
---|
5368 | - t_green_h(nzt_wall,m) ) ) * & |
---|
5369 | surf_usm_h%ddz_wall_stag(nzb_wall,m) |
---|
5370 | ! |
---|
5371 | !-- if indoor model ist used inner wall layer is calculated by using iwghf (indoor wall ground heat flux) |
---|
5372 | IF ( indoor_model ) THEN |
---|
5373 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5374 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
5375 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
5376 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
5377 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
5378 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5379 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
5380 | * surf_usm_h%ddz_wall(kw,m) & |
---|
5381 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
5382 | ENDDO |
---|
5383 | wtend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzt_wall,m)) * & |
---|
5384 | ( -surf_usm_h%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1) * & |
---|
5385 | ( t_wall_h(nzt_wall,m) & |
---|
5386 | - t_wall_h(nzt_wall-1,m) ) * & |
---|
5387 | surf_usm_h%ddz_wall(nzt_wall,m) & |
---|
5388 | + surf_usm_h%iwghf_eb(m) ) * & |
---|
5389 | surf_usm_h%ddz_wall_stag(nzt_wall,m) |
---|
5390 | ELSE |
---|
5391 | DO kw = nzb_wall+1, nzt_wall |
---|
5392 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
5393 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
5394 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
5395 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
5396 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5397 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
5398 | * surf_usm_h%ddz_wall(kw,m) & |
---|
5399 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
5400 | ENDDO |
---|
5401 | ENDIF |
---|
5402 | |
---|
5403 | t_wall_h_p(nzb_wall:nzt_wall,m) = t_wall_h(nzb_wall:nzt_wall,m) & |
---|
5404 | + dt_3d * ( tsc(2) & |
---|
5405 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5406 | * surf_usm_h%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
5407 | |
---|
5408 | ! |
---|
5409 | !-- during spinup the tempeature inside window layers is not calculated to make larger timesteps possible |
---|
5410 | IF ( .NOT. spinup) THEN |
---|
5411 | win_absorp = -log(surf_usm_h%transmissivity(m)) / surf_usm_h%zw_window(nzt_wall,m) |
---|
5412 | ! |
---|
5413 | !-- prognostic equation for ground/roof window temperature t_window_h |
---|
5414 | !-- takes absorption of shortwave radiation into account |
---|
5415 | wintend(:) = 0.0_wp |
---|
5416 | wintend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzb_wall,m)) * & |
---|
5417 | ( surf_usm_h%lambda_h_window(nzb_wall,m) * & |
---|
5418 | ( t_window_h(nzb_wall+1,m) & |
---|
5419 | - t_window_h(nzb_wall,m) ) * & |
---|
5420 | surf_usm_h%ddz_window(nzb_wall+1,m) & |
---|
5421 | + surf_usm_h%wghf_eb_window(m) & |
---|
5422 | + surf_usm_h%rad_sw_in(m) & |
---|
5423 | * (1.0_wp - exp(-win_absorp & |
---|
5424 | * surf_usm_h%zw_window(nzb_wall,m) ) ) & |
---|
5425 | ) * surf_usm_h%ddz_window_stag(nzb_wall,m) |
---|
5426 | |
---|
5427 | IF ( indoor_model ) THEN |
---|
5428 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5429 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
5430 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
5431 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
5432 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
5433 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
5434 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
5435 | * surf_usm_h%ddz_window(kw,m) & |
---|
5436 | + surf_usm_h%rad_sw_in(m) & |
---|
5437 | * (exp(-win_absorp & |
---|
5438 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
5439 | - exp(-win_absorp & |
---|
5440 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
5441 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
5442 | |
---|
5443 | ENDDO |
---|
5444 | wintend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzt_wall,m)) * & |
---|
5445 | ( -surf_usm_h%lambda_h_window(nzt_wall-1,m) * & |
---|
5446 | ( t_window_h(nzt_wall,m) & |
---|
5447 | - t_window_h(nzt_wall-1,m) ) * & |
---|
5448 | surf_usm_h%ddz_window(nzt_wall,m) & |
---|
5449 | + surf_usm_h%iwghf_eb_window(m) & |
---|
5450 | + surf_usm_h%rad_sw_in(m) & |
---|
5451 | * (exp(-win_absorp & |
---|
5452 | * surf_usm_h%zw_window(nzt_wall-1,m) ) & |
---|
5453 | - exp(-win_absorp & |
---|
5454 | * surf_usm_h%zw_window(nzt_wall,m) ) ) & |
---|
5455 | ) * surf_usm_h%ddz_window_stag(nzt_wall,m) |
---|
5456 | ELSE |
---|
5457 | DO kw = nzb_wall+1, nzt_wall |
---|
5458 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
5459 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
5460 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
5461 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
5462 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
5463 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
5464 | * surf_usm_h%ddz_window(kw,m) & |
---|
5465 | + surf_usm_h%rad_sw_in(m) & |
---|
5466 | * (exp(-win_absorp & |
---|
5467 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
5468 | - exp(-win_absorp & |
---|
5469 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
5470 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
5471 | |
---|
5472 | ENDDO |
---|
5473 | ENDIF |
---|
5474 | |
---|
5475 | t_window_h_p(nzb_wall:nzt_wall,m) = t_window_h(nzb_wall:nzt_wall,m) & |
---|
5476 | + dt_3d * ( tsc(2) & |
---|
5477 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5478 | * surf_usm_h%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
5479 | |
---|
5480 | ENDIF |
---|
5481 | |
---|
5482 | ! |
---|
5483 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
5484 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5485 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5486 | DO kw = nzb_wall, nzt_wall |
---|
5487 | surf_usm_h%tt_wall_m(kw,m) = wtend(kw) |
---|
5488 | ENDDO |
---|
5489 | ELSEIF ( intermediate_timestep_count < & |
---|
5490 | intermediate_timestep_count_max ) THEN |
---|
5491 | DO kw = nzb_wall, nzt_wall |
---|
5492 | surf_usm_h%tt_wall_m(kw,m) = -9.5625_wp * wtend(kw) + & |
---|
5493 | 5.3125_wp * surf_usm_h%tt_wall_m(kw,m) |
---|
5494 | ENDDO |
---|
5495 | ENDIF |
---|
5496 | ENDIF |
---|
5497 | |
---|
5498 | IF (.NOT. spinup) THEN |
---|
5499 | ! |
---|
5500 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
5501 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5502 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5503 | DO kw = nzb_wall, nzt_wall |
---|
5504 | surf_usm_h%tt_window_m(kw,m) = wintend(kw) |
---|
5505 | ENDDO |
---|
5506 | ELSEIF ( intermediate_timestep_count < & |
---|
5507 | intermediate_timestep_count_max ) THEN |
---|
5508 | DO kw = nzb_wall, nzt_wall |
---|
5509 | surf_usm_h%tt_window_m(kw,m) = -9.5625_wp * wintend(kw) + & |
---|
5510 | 5.3125_wp * surf_usm_h%tt_window_m(kw,m) |
---|
5511 | ENDDO |
---|
5512 | ENDIF |
---|
5513 | ENDIF |
---|
5514 | ENDIF |
---|
5515 | |
---|
5516 | ENDDO |
---|
5517 | |
---|
5518 | ! |
---|
5519 | !-- For vertical surfaces |
---|
5520 | DO l = 0, 3 |
---|
5521 | DO m = 1, surf_usm_v(l)%ns |
---|
5522 | ! |
---|
5523 | !-- Obtain indices |
---|
5524 | i = surf_usm_v(l)%i(m) |
---|
5525 | j = surf_usm_v(l)%j(m) |
---|
5526 | k = surf_usm_v(l)%k(m) |
---|
5527 | ! |
---|
5528 | !-- prognostic equation for wall temperature t_wall_v |
---|
5529 | wtend(:) = 0.0_wp |
---|
5530 | |
---|
5531 | wtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzb_wall,m)) * & |
---|
5532 | ( surf_usm_v(l)%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
5533 | ( t_wall_v(l)%t(nzb_wall+1,m) & |
---|
5534 | - t_wall_v(l)%t(nzb_wall,m) ) * & |
---|
5535 | surf_usm_v(l)%ddz_wall(nzb_wall+1,m) & |
---|
5536 | + surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5537 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5538 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
5539 | * surf_usm_v(l)%wghf_eb(m) & |
---|
5540 | - surf_usm_v(l)%frac(ind_pav_green,m) & |
---|
5541 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5542 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
5543 | * ( surf_usm_v(l)%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
5544 | * surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
5545 | + surf_usm_v(l)%lambda_h(nzb_wall,m)* wall_mod(nzb_wall) & |
---|
5546 | * surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
5547 | / ( surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
5548 | + surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
5549 | * ( t_wall_v(l)%t(nzb_wall,m) & |
---|
5550 | - t_green_v(l)%t(nzt_wall,m) ) ) * & |
---|
5551 | surf_usm_v(l)%ddz_wall_stag(nzb_wall,m) |
---|
5552 | |
---|
5553 | IF ( indoor_model ) THEN |
---|
5554 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5555 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
5556 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
5557 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
5558 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
5559 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5560 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
5561 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
5562 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
5563 | ENDDO |
---|
5564 | wtend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzt_wall,m)) * & |
---|
5565 | ( -surf_usm_v(l)%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1)* & |
---|
5566 | ( t_wall_v(l)%t(nzt_wall,m) & |
---|
5567 | - t_wall_v(l)%t(nzt_wall-1,m) ) * & |
---|
5568 | surf_usm_v(l)%ddz_wall(nzt_wall,m) & |
---|
5569 | + surf_usm_v(l)%iwghf_eb(m) ) * & |
---|
5570 | surf_usm_v(l)%ddz_wall_stag(nzt_wall,m) |
---|
5571 | ELSE |
---|
5572 | DO kw = nzb_wall+1, nzt_wall |
---|
5573 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
5574 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
5575 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
5576 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
5577 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5578 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
5579 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
5580 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
5581 | ENDDO |
---|
5582 | ENDIF |
---|
5583 | |
---|
5584 | t_wall_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
5585 | t_wall_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
5586 | + dt_3d * ( tsc(2) & |
---|
5587 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5588 | * surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
5589 | |
---|
5590 | IF (.NOT. spinup) THEN |
---|
5591 | win_absorp = -log(surf_usm_v(l)%transmissivity(m)) / surf_usm_v(l)%zw_window(nzt_wall,m) |
---|
5592 | ! |
---|
5593 | !-- prognostic equation for window temperature t_window_v |
---|
5594 | wintend(:) = 0.0_wp |
---|
5595 | wintend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzb_wall,m)) * & |
---|
5596 | ( surf_usm_v(l)%lambda_h_window(nzb_wall,m) * & |
---|
5597 | ( t_window_v(l)%t(nzb_wall+1,m) & |
---|
5598 | - t_window_v(l)%t(nzb_wall,m) ) * & |
---|
5599 | surf_usm_v(l)%ddz_window(nzb_wall+1,m) & |
---|
5600 | + surf_usm_v(l)%wghf_eb_window(m) & |
---|
5601 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5602 | * (1.0_wp - exp(-win_absorp & |
---|
5603 | * surf_usm_v(l)%zw_window(nzb_wall,m) ) ) & |
---|
5604 | ) * surf_usm_v(l)%ddz_window_stag(nzb_wall,m) |
---|
5605 | |
---|
5606 | IF ( indoor_model ) THEN |
---|
5607 | DO kw = nzb_wall+1, nzt_wall -1 |
---|
5608 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
5609 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
5610 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
5611 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
5612 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
5613 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
5614 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
5615 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5616 | * (exp(-win_absorp & |
---|
5617 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
5618 | - exp(-win_absorp & |
---|
5619 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
5620 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
5621 | ENDDO |
---|
5622 | wintend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzt_wall,m)) * & |
---|
5623 | ( -surf_usm_v(l)%lambda_h_window(nzt_wall-1,m) * & |
---|
5624 | ( t_window_v(l)%t(nzt_wall,m) & |
---|
5625 | - t_window_v(l)%t(nzt_wall-1,m) ) * & |
---|
5626 | surf_usm_v(l)%ddz_window(nzt_wall,m) & |
---|
5627 | + surf_usm_v(l)%iwghf_eb_window(m) & |
---|
5628 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5629 | * (exp(-win_absorp & |
---|
5630 | * surf_usm_v(l)%zw_window(nzt_wall-1,m) ) & |
---|
5631 | - exp(-win_absorp & |
---|
5632 | * surf_usm_v(l)%zw_window(nzt_wall,m) ) ) & |
---|
5633 | ) * surf_usm_v(l)%ddz_window_stag(nzt_wall,m) |
---|
5634 | ELSE |
---|
5635 | DO kw = nzb_wall+1, nzt_wall |
---|
5636 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
5637 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
5638 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
5639 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
5640 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
5641 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
5642 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
5643 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5644 | * (exp(-win_absorp & |
---|
5645 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
5646 | - exp(-win_absorp & |
---|
5647 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
5648 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
5649 | ENDDO |
---|
5650 | ENDIF |
---|
5651 | |
---|
5652 | t_window_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
5653 | t_window_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
5654 | + dt_3d * ( tsc(2) & |
---|
5655 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5656 | * surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
5657 | ENDIF |
---|
5658 | |
---|
5659 | ! |
---|
5660 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
5661 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5662 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5663 | DO kw = nzb_wall, nzt_wall |
---|
5664 | surf_usm_v(l)%tt_wall_m(kw,m) = wtend(kw) |
---|
5665 | ENDDO |
---|
5666 | ELSEIF ( intermediate_timestep_count < & |
---|
5667 | intermediate_timestep_count_max ) THEN |
---|
5668 | DO kw = nzb_wall, nzt_wall |
---|
5669 | surf_usm_v(l)%tt_wall_m(kw,m) = & |
---|
5670 | - 9.5625_wp * wtend(kw) + & |
---|
5671 | 5.3125_wp * surf_usm_v(l)%tt_wall_m(kw,m) |
---|
5672 | ENDDO |
---|
5673 | ENDIF |
---|
5674 | ENDIF |
---|
5675 | |
---|
5676 | |
---|
5677 | IF (.NOT. spinup) THEN |
---|
5678 | ! |
---|
5679 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
5680 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5681 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5682 | DO kw = nzb_wall, nzt_wall |
---|
5683 | surf_usm_v(l)%tt_window_m(kw,m) = wintend(kw) |
---|
5684 | ENDDO |
---|
5685 | ELSEIF ( intermediate_timestep_count < & |
---|
5686 | intermediate_timestep_count_max ) THEN |
---|
5687 | DO kw = nzb_wall, nzt_wall |
---|
5688 | surf_usm_v(l)%tt_window_m(kw,m) = & |
---|
5689 | - 9.5625_wp * wintend(kw) + & |
---|
5690 | 5.3125_wp * surf_usm_v(l)%tt_window_m(kw,m) |
---|
5691 | ENDDO |
---|
5692 | ENDIF |
---|
5693 | ENDIF |
---|
5694 | ENDIF |
---|
5695 | |
---|
5696 | ENDDO |
---|
5697 | ENDDO |
---|
5698 | |
---|
5699 | END SUBROUTINE usm_material_heat_model |
---|
5700 | |
---|
5701 | !------------------------------------------------------------------------------! |
---|
5702 | ! Description: |
---|
5703 | ! ------------ |
---|
5704 | ! |
---|
5705 | !> Green and substrate model as part of the urban surface model. The model predicts ground |
---|
5706 | !> temperatures. |
---|
5707 | !------------------------------------------------------------------------------! |
---|
5708 | SUBROUTINE usm_green_heat_model |
---|
5709 | |
---|
5710 | |
---|
5711 | IMPLICIT NONE |
---|
5712 | |
---|
5713 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
5714 | |
---|
5715 | REAL(wp) :: ke, lambda_h_green_sat !< heat conductivity for saturated soil |
---|
5716 | REAL(wp) :: h_vg !< Van Genuchten coef. h |
---|
5717 | REAL(wp) :: drho_l_lv !< frequently used parameter |
---|
5718 | |
---|
5719 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: gtend,tend !< tendency |
---|
5720 | |
---|
5721 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: root_extr_green |
---|
5722 | |
---|
5723 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: lambda_green_temp !< temp. lambda |
---|
5724 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: gamma_green_temp !< temp. gamma |
---|
5725 | |
---|
5726 | LOGICAL :: conserve_water_content = .true. |
---|
5727 | |
---|
5728 | |
---|
5729 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
5730 | |
---|
5731 | ! |
---|
5732 | !-- For horizontal surfaces |
---|
5733 | DO m = 1, surf_usm_h%ns |
---|
5734 | |
---|
5735 | IF (surf_usm_h%frac(ind_pav_green,m) > 0.0_wp) THEN |
---|
5736 | ! |
---|
5737 | !-- Obtain indices |
---|
5738 | i = surf_usm_h%i(m) |
---|
5739 | j = surf_usm_h%j(m) |
---|
5740 | k = surf_usm_h%k(m) |
---|
5741 | |
---|
5742 | DO kw = nzb_wall, nzt_wall |
---|
5743 | ! |
---|
5744 | !-- Calculate volumetric heat capacity of the soil, taking |
---|
5745 | !-- into account water content |
---|
5746 | 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)) & |
---|
5747 | + rho_c_water * swc_h(kw,m)) |
---|
5748 | |
---|
5749 | ! |
---|
5750 | !-- Calculate soil heat conductivity at the center of the soil |
---|
5751 | !-- layers |
---|
5752 | lambda_h_green_sat = lambda_h_green_sm ** (1.0_wp - swc_sat_h(kw,m)) * & |
---|
5753 | lambda_h_water ** swc_h(kw,m) |
---|
5754 | |
---|
5755 | ke = 1.0_wp + LOG10(MAX(0.1_wp,swc_h(kw,m) & |
---|
5756 | / swc_sat_h(kw,m))) |
---|
5757 | |
---|
5758 | lambda_green_temp(kw) = ke * (lambda_h_green_sat - lambda_h_green_dry) + & |
---|
5759 | lambda_h_green_dry |
---|
5760 | |
---|
5761 | ENDDO |
---|
5762 | |
---|
5763 | |
---|
5764 | ! |
---|
5765 | !-- Calculate soil heat conductivity (lambda_h) at the _stag level |
---|
5766 | !-- using linear interpolation. For pavement surface, the |
---|
5767 | !-- true pavement depth is considered |
---|
5768 | DO kw = nzb_wall, nzt_wall |
---|
5769 | surf_usm_h%lambda_h_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
5770 | * 0.5_wp |
---|
5771 | ENDDO |
---|
5772 | |
---|
5773 | t_green_h(nzt_wall+1,m) = t_wall_h(nzb_wall,m) |
---|
5774 | ! |
---|
5775 | !-- prognostic equation for ground/roof temperature t_green_h |
---|
5776 | gtend(:) = 0.0_wp |
---|
5777 | gtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_total_green(nzb_wall,m)) * & |
---|
5778 | ( surf_usm_h%lambda_h_green(nzb_wall,m) * & |
---|
5779 | ( t_green_h(nzb_wall+1,m) & |
---|
5780 | - t_green_h(nzb_wall,m) ) * & |
---|
5781 | surf_usm_h%ddz_green(nzb_wall+1,m) & |
---|
5782 | + surf_usm_h%wghf_eb_green(m) ) * & |
---|
5783 | surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
5784 | |
---|
5785 | DO kw = nzb_wall+1, nzt_wall |
---|
5786 | gtend(kw) = (1.0_wp / surf_usm_h%rho_c_total_green(kw,m)) & |
---|
5787 | * ( surf_usm_h%lambda_h_green(kw,m) & |
---|
5788 | * ( t_green_h(kw+1,m) - t_green_h(kw,m) ) & |
---|
5789 | * surf_usm_h%ddz_green(kw+1,m) & |
---|
5790 | - surf_usm_h%lambda_h_green(kw-1,m) & |
---|
5791 | * ( t_green_h(kw,m) - t_green_h(kw-1,m) ) & |
---|
5792 | * surf_usm_h%ddz_green(kw,m) & |
---|
5793 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
5794 | ENDDO |
---|
5795 | |
---|
5796 | t_green_h_p(nzb_wall:nzt_wall,m) = t_green_h(nzb_wall:nzt_wall,m) & |
---|
5797 | + dt_3d * ( tsc(2) & |
---|
5798 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5799 | * surf_usm_h%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
5800 | |
---|
5801 | |
---|
5802 | ! |
---|
5803 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
5804 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5805 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5806 | DO kw = nzb_wall, nzt_wall |
---|
5807 | surf_usm_h%tt_green_m(kw,m) = gtend(kw) |
---|
5808 | ENDDO |
---|
5809 | ELSEIF ( intermediate_timestep_count < & |
---|
5810 | intermediate_timestep_count_max ) THEN |
---|
5811 | DO kw = nzb_wall, nzt_wall |
---|
5812 | surf_usm_h%tt_green_m(kw,m) = -9.5625_wp * gtend(kw) + & |
---|
5813 | 5.3125_wp * surf_usm_h%tt_green_m(kw,m) |
---|
5814 | ENDDO |
---|
5815 | ENDIF |
---|
5816 | ENDIF |
---|
5817 | |
---|
5818 | DO kw = nzb_wall, nzt_wall |
---|
5819 | |
---|
5820 | ! |
---|
5821 | !-- Calculate soil diffusivity at the center of the soil layers |
---|
5822 | lambda_green_temp(kw) = (- b_ch * surf_usm_h%gamma_w_green_sat(kw,m) * psi_sat & |
---|
5823 | / swc_sat_h(kw,m) ) * ( MAX( swc_h(kw,m), & |
---|
5824 | wilt_h(kw,m) ) / swc_sat_h(kw,m) )**( & |
---|
5825 | b_ch + 2.0_wp ) |
---|
5826 | |
---|
5827 | ! |
---|
5828 | !-- Parametrization of Van Genuchten |
---|
5829 | IF ( soil_type /= 7 ) THEN |
---|
5830 | ! |
---|
5831 | !-- Calculate the hydraulic conductivity after Van Genuchten |
---|
5832 | !-- (1980) |
---|
5833 | h_vg = ( ( (swc_res_h(kw,m) - swc_sat_h(kw,m)) / ( swc_res_h(kw,m) - & |
---|
5834 | MAX( swc_h(kw,m), wilt_h(kw,m) ) ) )**( & |
---|
5835 | surf_usm_h%n_vg_green(m) / (surf_usm_h%n_vg_green(m) - 1.0_wp ) ) - 1.0_wp & |
---|
5836 | )**( 1.0_wp / surf_usm_h%n_vg_green(m) ) / surf_usm_h%alpha_vg_green(m) |
---|
5837 | |
---|
5838 | |
---|
5839 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( ( (1.0_wp + & |
---|
5840 | ( surf_usm_h%alpha_vg_green(m) * h_vg )**surf_usm_h%n_vg_green(m))**( & |
---|
5841 | 1.0_wp - 1.0_wp / surf_usm_h%n_vg_green(m) ) - ( & |
---|
5842 | surf_usm_h%alpha_vg_green(m) * h_vg )**( surf_usm_h%n_vg_green(m) & |
---|
5843 | - 1.0_wp) )**2 ) & |
---|
5844 | / ( ( 1.0_wp + ( surf_usm_h%alpha_vg_green(m) * h_vg & |
---|
5845 | )**surf_usm_h%n_vg_green(m) )**( ( 1.0_wp - 1.0_wp & |
---|
5846 | / surf_usm_h%n_vg_green(m) ) *( surf_usm_h%l_vg_green(m) + 2.0_wp) ) ) |
---|
5847 | |
---|
5848 | ! |
---|
5849 | !-- Parametrization of Clapp & Hornberger |
---|
5850 | ELSE |
---|
5851 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( swc_h(kw,m) & |
---|
5852 | / swc_sat_h(kw,m) )**(2.0_wp * b_ch + 3.0_wp) |
---|
5853 | ENDIF |
---|
5854 | |
---|
5855 | ENDDO |
---|
5856 | |
---|
5857 | ! |
---|
5858 | !-- Prognostic equation for soil moisture content. Only performed, |
---|
5859 | !-- when humidity is enabled in the atmosphere |
---|
5860 | IF ( humidity ) THEN |
---|
5861 | ! |
---|
5862 | !-- Calculate soil diffusivity (lambda_w) at the _stag level |
---|
5863 | !-- using linear interpolation. To do: replace this with |
---|
5864 | !-- ECMWF-IFS Eq. 8.81 |
---|
5865 | DO kw = nzb_wall, nzt_wall-1 |
---|
5866 | |
---|
5867 | surf_usm_h%lambda_w_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
5868 | * 0.5_wp |
---|
5869 | surf_usm_h%gamma_w_green(kw,m) = ( gamma_green_temp(kw+1) + gamma_green_temp(kw) ) & |
---|
5870 | * 0.5_wp |
---|
5871 | |
---|
5872 | ENDDO |
---|
5873 | |
---|
5874 | ! |
---|
5875 | !-- In case of a closed bottom (= water content is conserved), |
---|
5876 | !-- set hydraulic conductivity to zero to that no water will be |
---|
5877 | !-- lost in the bottom layer. |
---|
5878 | IF ( conserve_water_content ) THEN |
---|
5879 | surf_usm_h%gamma_w_green(kw,m) = 0.0_wp |
---|
5880 | ELSE |
---|
5881 | surf_usm_h%gamma_w_green(kw,m) = gamma_green_temp(nzt_wall) |
---|
5882 | ENDIF |
---|
5883 | |
---|
5884 | !-- The root extraction (= root_extr * qsws_veg / (rho_l |
---|
5885 | !-- * l_v)) ensures the mass conservation for water. The |
---|
5886 | !-- transpiration of plants equals the cumulative withdrawals by |
---|
5887 | !-- the roots in the soil. The scheme takes into account the |
---|
5888 | !-- availability of water in the soil layers as well as the root |
---|
5889 | !-- fraction in the respective layer. Layer with moisture below |
---|
5890 | !-- wilting point will not contribute, which reflects the |
---|
5891 | !-- preference of plants to take water from moister layers. |
---|
5892 | |
---|
5893 | ! |
---|
5894 | !-- Calculate the root extraction (ECMWF 7.69, the sum of |
---|
5895 | !-- root_extr = 1). The energy balance solver guarantees a |
---|
5896 | !-- positive transpiration, so that there is no need for an |
---|
5897 | !-- additional check. |
---|
5898 | m_total = 0.0_wp |
---|
5899 | DO kw = nzb_wall, nzt_wall |
---|
5900 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
5901 | m_total = m_total + rootfr_h(kw,m) * swc_h(kw,m) |
---|
5902 | ENDIF |
---|
5903 | ENDDO |
---|
5904 | |
---|
5905 | IF ( m_total > 0.0_wp ) THEN |
---|
5906 | DO kw = nzb_wall, nzt_wall |
---|
5907 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
5908 | root_extr_green(kw) = rootfr_h(kw,m) * swc_h(kw,m) & |
---|
5909 | / m_total |
---|
5910 | ELSE |
---|
5911 | root_extr_green(kw) = 0.0_wp |
---|
5912 | ENDIF |
---|
5913 | ENDDO |
---|
5914 | ENDIF |
---|
5915 | |
---|
5916 | ! |
---|
5917 | !-- Prognostic equation for soil water content m_soil. |
---|
5918 | tend(:) = 0.0_wp |
---|
5919 | |
---|
5920 | tend(nzb_wall) = ( surf_usm_h%lambda_w_green(nzb_wall,m) * ( & |
---|
5921 | swc_h(nzb_wall+1,m) - swc_h(nzb_wall,m) ) & |
---|
5922 | * surf_usm_h%ddz_green(nzb_wall+1,m) - surf_usm_h%gamma_w_green(nzb_wall,m) - ( & |
---|
5923 | root_extr_green(nzb_wall) * surf_usm_h%qsws_veg(m) & |
---|
5924 | ! + surf_usm_h%qsws_soil_green(m) |
---|
5925 | ) * drho_l_lv ) & |
---|
5926 | * surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
5927 | |
---|
5928 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5929 | tend(kw) = ( surf_usm_h%lambda_w_green(kw,m) * ( swc_h(kw+1,m) & |
---|
5930 | - swc_h(kw,m) ) * surf_usm_h%ddz_green(kw+1,m) & |
---|
5931 | - surf_usm_h%gamma_w_green(kw,m) & |
---|
5932 | - surf_usm_h%lambda_w_green(kw-1,m) * (swc_h(kw,m) - & |
---|
5933 | swc_h(kw-1,m)) * surf_usm_h%ddz_green(kw,m) & |
---|
5934 | + surf_usm_h%gamma_w_green(kw-1,m) - (root_extr_green(kw) & |
---|
5935 | * surf_usm_h%qsws_veg(m) * drho_l_lv) & |
---|
5936 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
5937 | |
---|
5938 | ENDDO |
---|
5939 | tend(nzt_wall) = ( - surf_usm_h%gamma_w_green(nzt_wall,m) & |
---|
5940 | - surf_usm_h%lambda_w_green(nzt_wall-1,m) & |
---|
5941 | * (swc_h(nzt_wall,m) & |
---|
5942 | - swc_h(nzt_wall-1,m)) & |
---|
5943 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
5944 | + surf_usm_h%gamma_w_green(nzt_wall-1,m) - ( & |
---|
5945 | root_extr_green(nzt_wall) & |
---|
5946 | * surf_usm_h%qsws_veg(m) * drho_l_lv ) & |
---|
5947 | ) * surf_usm_h%ddz_green_stag(nzt_wall,m) |
---|
5948 | |
---|
5949 | swc_h_p(nzb_wall:nzt_wall,m) = swc_h(nzb_wall:nzt_wall,m)& |
---|
5950 | + dt_3d * ( tsc(2) * tend(:) & |
---|
5951 | + tsc(3) * surf_usm_h%tswc_h_m(:,m) ) |
---|
5952 | |
---|
5953 | ! |
---|
5954 | !-- Account for dry soils (find a better solution here!) |
---|
5955 | DO kw = nzb_wall, nzt_wall |
---|
5956 | IF ( swc_h_p(kw,m) < 0.0_wp ) swc_h_p(kw,m) = 0.0_wp |
---|
5957 | ENDDO |
---|
5958 | |
---|
5959 | ! |
---|
5960 | !-- Calculate m_soil tendencies for the next Runge-Kutta step |
---|
5961 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5962 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5963 | DO kw = nzb_wall, nzt_wall |
---|
5964 | surf_usm_h%tswc_h_m(kw,m) = tend(kw) |
---|
5965 | ENDDO |
---|
5966 | ELSEIF ( intermediate_timestep_count < & |
---|
5967 | intermediate_timestep_count_max ) THEN |
---|
5968 | DO kw = nzb_wall, nzt_wall |
---|
5969 | surf_usm_h%tswc_h_m(kw,m) = -9.5625_wp * tend(kw) + 5.3125_wp& |
---|
5970 | * surf_usm_h%tswc_h_m(kw,m) |
---|
5971 | ENDDO |
---|
5972 | ENDIF |
---|
5973 | ENDIF |
---|
5974 | ENDIF |
---|
5975 | |
---|
5976 | ENDIF |
---|
5977 | |
---|
5978 | ENDDO |
---|
5979 | |
---|
5980 | ! |
---|
5981 | !-- For vertical surfaces |
---|
5982 | DO l = 0, 3 |
---|
5983 | DO m = 1, surf_usm_v(l)%ns |
---|
5984 | |
---|
5985 | IF (surf_usm_v(l)%frac(ind_pav_green,m) > 0.0_wp) THEN |
---|
5986 | ! |
---|
5987 | !-- no substrate layer for green walls / only groundbase green walls (ivy i.e.) -> green layers get same |
---|
5988 | !-- temperature as first wall layer |
---|
5989 | !-- there fore no temperature calculations for vertical green substrate layers now |
---|
5990 | |
---|
5991 | ! |
---|
5992 | ! ! |
---|
5993 | ! !-- Obtain indices |
---|
5994 | ! i = surf_usm_v(l)%i(m) |
---|
5995 | ! j = surf_usm_v(l)%j(m) |
---|
5996 | ! k = surf_usm_v(l)%k(m) |
---|
5997 | ! |
---|
5998 | ! t_green_v(l)%t(nzt_wall+1,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
5999 | ! ! |
---|
6000 | ! !-- prognostic equation for green temperature t_green_v |
---|
6001 | ! gtend(:) = 0.0_wp |
---|
6002 | ! gtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_green(nzb_wall,m)) * & |
---|
6003 | ! ( surf_usm_v(l)%lambda_h_green(nzb_wall,m) * & |
---|
6004 | ! ( t_green_v(l)%t(nzb_wall+1,m) & |
---|
6005 | ! - t_green_v(l)%t(nzb_wall,m) ) * & |
---|
6006 | ! surf_usm_v(l)%ddz_green(nzb_wall+1,m) & |
---|
6007 | ! + surf_usm_v(l)%wghf_eb(m) ) * & |
---|
6008 | ! surf_usm_v(l)%ddz_green_stag(nzb_wall,m) |
---|
6009 | ! |
---|
6010 | ! DO kw = nzb_wall+1, nzt_wall |
---|
6011 | ! gtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_green(kw,m)) & |
---|
6012 | ! * ( surf_usm_v(l)%lambda_h_green(kw,m) & |
---|
6013 | ! * ( t_green_v(l)%t(kw+1,m) - t_green_v(l)%t(kw,m) ) & |
---|
6014 | ! * surf_usm_v(l)%ddz_green(kw+1,m) & |
---|
6015 | ! - surf_usm_v(l)%lambda_h(kw-1,m) & |
---|
6016 | ! * ( t_green_v(l)%t(kw,m) - t_green_v(l)%t(kw-1,m) ) & |
---|
6017 | ! * surf_usm_v(l)%ddz_green(kw,m) ) & |
---|
6018 | ! * surf_usm_v(l)%ddz_green_stag(kw,m) |
---|
6019 | ! ENDDO |
---|
6020 | ! |
---|
6021 | ! t_green_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
6022 | ! t_green_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
6023 | ! + dt_3d * ( tsc(2) & |
---|
6024 | ! * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6025 | ! * surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
6026 | ! |
---|
6027 | ! ! |
---|
6028 | ! !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
6029 | ! IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6030 | ! IF ( intermediate_timestep_count == 1 ) THEN |
---|
6031 | ! DO kw = nzb_wall, nzt_wall |
---|
6032 | ! surf_usm_v(l)%tt_green_m(kw,m) = gtend(kw) |
---|
6033 | ! ENDDO |
---|
6034 | ! ELSEIF ( intermediate_timestep_count < & |
---|
6035 | ! intermediate_timestep_count_max ) THEN |
---|
6036 | ! DO kw = nzb_wall, nzt_wall |
---|
6037 | ! surf_usm_v(l)%tt_green_m(kw,m) = & |
---|
6038 | ! - 9.5625_wp * gtend(kw) + & |
---|
6039 | ! 5.3125_wp * surf_usm_v(l)%tt_green_m(kw,m) |
---|
6040 | ! ENDDO |
---|
6041 | ! ENDIF |
---|
6042 | ! ENDIF |
---|
6043 | |
---|
6044 | DO kw = nzb_wall, nzt_wall+1 |
---|
6045 | t_green_v(l)%t(kw,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
6046 | ENDDO |
---|
6047 | |
---|
6048 | ENDIF |
---|
6049 | |
---|
6050 | ENDDO |
---|
6051 | ENDDO |
---|
6052 | |
---|
6053 | END SUBROUTINE usm_green_heat_model |
---|
6054 | |
---|
6055 | !------------------------------------------------------------------------------! |
---|
6056 | ! Description: |
---|
6057 | ! ------------ |
---|
6058 | !> Parin for &usm_par for urban surface model |
---|
6059 | !------------------------------------------------------------------------------! |
---|
6060 | SUBROUTINE usm_parin |
---|
6061 | |
---|
6062 | IMPLICIT NONE |
---|
6063 | |
---|
6064 | CHARACTER (LEN=80) :: line !< string containing current line of file PARIN |
---|
6065 | |
---|
6066 | NAMELIST /urban_surface_par/ & |
---|
6067 | building_type, & |
---|
6068 | land_category, & |
---|
6069 | naheatlayers, & |
---|
6070 | pedestrian_category, & |
---|
6071 | roughness_concrete, & |
---|
6072 | read_wall_temp_3d, & |
---|
6073 | roof_category, & |
---|
6074 | urban_surface, & |
---|
6075 | usm_anthropogenic_heat, & |
---|
6076 | usm_material_model, & |
---|
6077 | wall_category, & |
---|
6078 | wall_inner_temperature, & |
---|
6079 | roof_inner_temperature, & |
---|
6080 | soil_inner_temperature, & |
---|
6081 | window_inner_temperature, & |
---|
6082 | usm_wall_mod |
---|
6083 | |
---|
6084 | NAMELIST /urban_surface_parameters/ & |
---|
6085 | building_type, & |
---|
6086 | land_category, & |
---|
6087 | naheatlayers, & |
---|
6088 | pedestrian_category, & |
---|
6089 | roughness_concrete, & |
---|
6090 | read_wall_temp_3d, & |
---|
6091 | roof_category, & |
---|
6092 | urban_surface, & |
---|
6093 | usm_anthropogenic_heat, & |
---|
6094 | usm_material_model, & |
---|
6095 | wall_category, & |
---|
6096 | wall_inner_temperature, & |
---|
6097 | roof_inner_temperature, & |
---|
6098 | soil_inner_temperature, & |
---|
6099 | window_inner_temperature, & |
---|
6100 | usm_wall_mod |
---|
6101 | |
---|
6102 | |
---|
6103 | ! |
---|
6104 | !-- Try to find urban surface model package |
---|
6105 | REWIND ( 11 ) |
---|
6106 | line = ' ' |
---|
6107 | DO WHILE ( INDEX( line, '&urban_surface_parameters' ) == 0 ) |
---|
6108 | READ ( 11, '(A)', END=12 ) line |
---|
6109 | ENDDO |
---|
6110 | BACKSPACE ( 11 ) |
---|
6111 | |
---|
6112 | ! |
---|
6113 | !-- Read user-defined namelist |
---|
6114 | READ ( 11, urban_surface_parameters, ERR = 10 ) |
---|
6115 | |
---|
6116 | ! |
---|
6117 | !-- Set flag that indicates that the urban surface model is switched on |
---|
6118 | urban_surface = .TRUE. |
---|
6119 | |
---|
6120 | GOTO 14 |
---|
6121 | |
---|
6122 | 10 BACKSPACE( 11 ) |
---|
6123 | READ( 11 , '(A)') line |
---|
6124 | CALL parin_fail_message( 'urban_surface_parameters', line ) |
---|
6125 | ! |
---|
6126 | !-- Try to find old namelist |
---|
6127 | 12 REWIND ( 11 ) |
---|
6128 | line = ' ' |
---|
6129 | DO WHILE ( INDEX( line, '&urban_surface_par' ) == 0 ) |
---|
6130 | READ ( 11, '(A)', END=14 ) line |
---|
6131 | ENDDO |
---|
6132 | BACKSPACE ( 11 ) |
---|
6133 | |
---|
6134 | ! |
---|
6135 | !-- Read user-defined namelist |
---|
6136 | READ ( 11, urban_surface_par, ERR = 13, END = 14 ) |
---|
6137 | |
---|
6138 | message_string = 'namelist urban_surface_par is deprecated and will be ' // & |
---|
6139 | 'removed in near future. Please use namelist ' // & |
---|
6140 | 'urban_surface_parameters instead' |
---|
6141 | CALL message( 'usm_parin', 'PA0487', 0, 1, 0, 6, 0 ) |
---|
6142 | |
---|
6143 | ! |
---|
6144 | !-- Set flag that indicates that the urban surface model is switched on |
---|
6145 | urban_surface = .TRUE. |
---|
6146 | |
---|
6147 | GOTO 14 |
---|
6148 | |
---|
6149 | 13 BACKSPACE( 11 ) |
---|
6150 | READ( 11 , '(A)') line |
---|
6151 | CALL parin_fail_message( 'urban_surface_par', line ) |
---|
6152 | |
---|
6153 | |
---|
6154 | 14 CONTINUE |
---|
6155 | |
---|
6156 | |
---|
6157 | END SUBROUTINE usm_parin |
---|
6158 | |
---|
6159 | |
---|
6160 | !------------------------------------------------------------------------------! |
---|
6161 | ! Description: |
---|
6162 | ! ------------ |
---|
6163 | ! |
---|
6164 | !> This subroutine is part of the urban surface model. |
---|
6165 | !> It reads daily heat produced by anthropogenic sources |
---|
6166 | !> and the diurnal cycle of the heat. |
---|
6167 | !------------------------------------------------------------------------------! |
---|
6168 | SUBROUTINE usm_read_anthropogenic_heat |
---|
6169 | |
---|
6170 | INTEGER(iwp) :: i,j,k,ii !< running indices |
---|
6171 | REAL(wp) :: heat !< anthropogenic heat |
---|
6172 | |
---|
6173 | ! |
---|
6174 | !-- allocation of array of sources of anthropogenic heat and their diural profile |
---|
6175 | ALLOCATE( aheat(naheatlayers,nys:nyn,nxl:nxr) ) |
---|
6176 | ALLOCATE( aheatprof(naheatlayers,0:24) ) |
---|
6177 | |
---|
6178 | ! |
---|
6179 | !-- read daily amount of heat and its daily cycle |
---|
6180 | aheat = 0.0_wp |
---|
6181 | DO ii = 0, io_blocks-1 |
---|
6182 | IF ( ii == io_group ) THEN |
---|
6183 | |
---|
6184 | !-- open anthropogenic heat file |
---|
6185 | OPEN( 151, file='ANTHROPOGENIC_HEAT'//TRIM(coupling_char), action='read', & |
---|
6186 | status='old', form='formatted', err=11 ) |
---|
6187 | i = 0 |
---|
6188 | j = 0 |
---|
6189 | DO |
---|
6190 | READ( 151, *, err=12, end=13 ) i, j, k, heat |
---|
6191 | IF ( i >= nxl .AND. i <= nxr .AND. j >= nys .AND. j <= nyn ) THEN |
---|
6192 | IF ( k <= naheatlayers .AND. k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
6193 | !-- write heat into the array |
---|
6194 | aheat(k,j,i) = heat |
---|
6195 | ENDIF |
---|
6196 | ENDIF |
---|
6197 | CYCLE |
---|
6198 | 12 WRITE(message_string,'(a,2i4)') 'error in file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' after line ',i,j |
---|
6199 | CALL message( 'usm_read_anthropogenic_heat', 'PA0515', 0, 1, 0, 6, 0 ) |
---|
6200 | ENDDO |
---|
6201 | 13 CLOSE(151) |
---|
6202 | CYCLE |
---|
6203 | 11 message_string = 'file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' does not exist' |
---|
6204 | CALL message( 'usm_read_anthropogenic_heat', 'PA0516', 1, 2, 0, 6, 0 ) |
---|
6205 | ENDIF |
---|
6206 | |
---|
6207 | #if defined( __parallel ) |
---|
6208 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
6209 | #endif |
---|
6210 | ENDDO |
---|
6211 | |
---|
6212 | ! |
---|
6213 | !-- read diurnal profiles of heat sources |
---|
6214 | aheatprof = 0.0_wp |
---|
6215 | DO ii = 0, io_blocks-1 |
---|
6216 | IF ( ii == io_group ) THEN |
---|
6217 | ! |
---|
6218 | !-- open anthropogenic heat profile file |
---|
6219 | OPEN( 151, file='ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char), action='read', & |
---|
6220 | status='old', form='formatted', err=21 ) |
---|
6221 | i = 0 |
---|
6222 | DO |
---|
6223 | READ( 151, *, err=22, end=23 ) i, k, heat |
---|
6224 | IF ( i >= 0 .AND. i <= 24 .AND. k <= naheatlayers ) THEN |
---|
6225 | !-- write heat into the array |
---|
6226 | aheatprof(k,i) = heat |
---|
6227 | ENDIF |
---|
6228 | CYCLE |
---|
6229 | 22 WRITE(message_string,'(a,i4)') 'error in file ANTHROPOGENIC_HEAT_PROFILE'// & |
---|
6230 | TRIM(coupling_char)//' after line ',i |
---|
6231 | CALL message( 'usm_read_anthropogenic_heat', 'PA0517', 0, 1, 0, 6, 0 ) |
---|
6232 | ENDDO |
---|
6233 | aheatprof(:,24) = aheatprof(:,0) |
---|
6234 | 23 CLOSE(151) |
---|
6235 | CYCLE |
---|
6236 | 21 message_string = 'file ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char)//' does not exist' |
---|
6237 | CALL message( 'usm_read_anthropogenic_heat', 'PA0518', 1, 2, 0, 6, 0 ) |
---|
6238 | ENDIF |
---|
6239 | |
---|
6240 | #if defined( __parallel ) |
---|
6241 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
6242 | #endif |
---|
6243 | ENDDO |
---|
6244 | |
---|
6245 | END SUBROUTINE usm_read_anthropogenic_heat |
---|
6246 | |
---|
6247 | |
---|
6248 | !------------------------------------------------------------------------------! |
---|
6249 | ! Description: |
---|
6250 | ! ------------ |
---|
6251 | !> Soubroutine reads t_surf and t_wall data from restart files |
---|
6252 | !------------------------------------------------------------------------------! |
---|
6253 | SUBROUTINE usm_rrd_local( k, nxlf, nxlc, nxl_on_file, nxrf, nxr_on_file, nynf, nyn_on_file, & |
---|
6254 | nysf, nysc, nys_on_file, found ) |
---|
6255 | |
---|
6256 | |
---|
6257 | USE control_parameters, & |
---|
6258 | ONLY: length, restart_string |
---|
6259 | |
---|
6260 | IMPLICIT NONE |
---|
6261 | |
---|
6262 | INTEGER(iwp) :: k !< running index over previous input files covering current local domain |
---|
6263 | INTEGER(iwp) :: l !< index variable for surface type |
---|
6264 | INTEGER(iwp) :: ns_h_on_file_usm !< number of horizontal surface elements (urban type) on file |
---|
6265 | INTEGER(iwp) :: nxlc !< index of left boundary on current subdomain |
---|
6266 | INTEGER(iwp) :: nxlf !< index of left boundary on former subdomain |
---|
6267 | INTEGER(iwp) :: nxl_on_file !< index of left boundary on former local domain |
---|
6268 | INTEGER(iwp) :: nxrf !< index of right boundary on former subdomain |
---|
6269 | INTEGER(iwp) :: nxr_on_file !< index of right boundary on former local domain |
---|
6270 | INTEGER(iwp) :: nynf !< index of north boundary on former subdomain |
---|
6271 | INTEGER(iwp) :: nyn_on_file !< index of north boundary on former local domain |
---|
6272 | INTEGER(iwp) :: nysc !< index of south boundary on current subdomain |
---|
6273 | INTEGER(iwp) :: nysf !< index of south boundary on former subdomain |
---|
6274 | INTEGER(iwp) :: nys_on_file !< index of south boundary on former local domain |
---|
6275 | |
---|
6276 | INTEGER(iwp) :: ns_v_on_file_usm(0:3) !< number of vertical surface elements (urban type) on file |
---|
6277 | |
---|
6278 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: start_index_on_file |
---|
6279 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: end_index_on_file |
---|
6280 | |
---|
6281 | LOGICAL, INTENT(OUT) :: found |
---|
6282 | !!! suehring: Why the SAVE attribute? |
---|
6283 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_wall_h |
---|
6284 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_window_h |
---|
6285 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_green_h |
---|
6286 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_waste_h |
---|
6287 | |
---|
6288 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_wall_h |
---|
6289 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_window_h |
---|
6290 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_green_h |
---|
6291 | |
---|
6292 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_wall_v |
---|
6293 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_window_v |
---|
6294 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_green_v |
---|
6295 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_waste_v |
---|
6296 | |
---|
6297 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_wall_v |
---|
6298 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_window_v |
---|
6299 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_green_v |
---|
6300 | |
---|
6301 | |
---|
6302 | found = .TRUE. |
---|
6303 | |
---|
6304 | |
---|
6305 | SELECT CASE ( restart_string(1:length) ) |
---|
6306 | |
---|
6307 | CASE ( 'ns_h_on_file_usm') |
---|
6308 | IF ( k == 1 ) THEN |
---|
6309 | READ ( 13 ) ns_h_on_file_usm |
---|
6310 | |
---|
6311 | IF ( ALLOCATED( tmp_surf_wall_h ) ) DEALLOCATE( tmp_surf_wall_h ) |
---|
6312 | IF ( ALLOCATED( tmp_wall_h ) ) DEALLOCATE( tmp_wall_h ) |
---|
6313 | IF ( ALLOCATED( tmp_surf_window_h ) ) & |
---|
6314 | DEALLOCATE( tmp_surf_window_h ) |
---|
6315 | IF ( ALLOCATED( tmp_window_h) ) DEALLOCATE( tmp_window_h ) |
---|
6316 | IF ( ALLOCATED( tmp_surf_green_h) ) & |
---|
6317 | DEALLOCATE( tmp_surf_green_h ) |
---|
6318 | IF ( ALLOCATED( tmp_green_h) ) DEALLOCATE( tmp_green_h ) |
---|
6319 | IF ( ALLOCATED( tmp_surf_waste_h) ) & |
---|
6320 | DEALLOCATE( tmp_surf_waste_h ) |
---|
6321 | |
---|
6322 | ! |
---|
6323 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
6324 | !-- the size of allocated surface elements do not necessarily |
---|
6325 | !-- need to match the size of present surface elements on |
---|
6326 | !-- current processor, as the number of processors between |
---|
6327 | !-- restarts can change. |
---|
6328 | ALLOCATE( tmp_surf_wall_h(1:ns_h_on_file_usm) ) |
---|
6329 | ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1, & |
---|
6330 | 1:ns_h_on_file_usm) ) |
---|
6331 | ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) ) |
---|
6332 | ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1, & |
---|
6333 | 1:ns_h_on_file_usm) ) |
---|
6334 | ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) ) |
---|
6335 | ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1, & |
---|
6336 | 1:ns_h_on_file_usm) ) |
---|
6337 | ALLOCATE( tmp_surf_waste_h(1:ns_h_on_file_usm) ) |
---|
6338 | |
---|
6339 | ENDIF |
---|
6340 | |
---|
6341 | CASE ( 'ns_v_on_file_usm') |
---|
6342 | IF ( k == 1 ) THEN |
---|
6343 | READ ( 13 ) ns_v_on_file_usm |
---|
6344 | |
---|
6345 | DO l = 0, 3 |
---|
6346 | IF ( ALLOCATED( tmp_surf_wall_v(l)%t ) ) & |
---|
6347 | DEALLOCATE( tmp_surf_wall_v(l)%t ) |
---|
6348 | IF ( ALLOCATED( tmp_wall_v(l)%t ) ) & |
---|
6349 | DEALLOCATE( tmp_wall_v(l)%t ) |
---|
6350 | IF ( ALLOCATED( tmp_surf_window_v(l)%t ) ) & |
---|
6351 | DEALLOCATE( tmp_surf_window_v(l)%t ) |
---|
6352 | IF ( ALLOCATED( tmp_window_v(l)%t ) ) & |
---|
6353 | DEALLOCATE( tmp_window_v(l)%t ) |
---|
6354 | IF ( ALLOCATED( tmp_surf_green_v(l)%t ) ) & |
---|
6355 | DEALLOCATE( tmp_surf_green_v(l)%t ) |
---|
6356 | IF ( ALLOCATED( tmp_green_v(l)%t ) ) & |
---|
6357 | DEALLOCATE( tmp_green_v(l)%t ) |
---|
6358 | IF ( ALLOCATED( tmp_surf_waste_v(l)%t ) ) & |
---|
6359 | DEALLOCATE( tmp_surf_waste_v(l)%t ) |
---|
6360 | ENDDO |
---|
6361 | |
---|
6362 | ! |
---|
6363 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
6364 | !-- the size of allocated surface elements do not necessarily |
---|
6365 | !-- need to match the size of present surface elements on |
---|
6366 | !-- current processor, as the number of processors between |
---|
6367 | !-- restarts can change. |
---|
6368 | DO l = 0, 3 |
---|
6369 | ALLOCATE( tmp_surf_wall_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6370 | ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
6371 | 1:ns_v_on_file_usm(l) ) ) |
---|
6372 | ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6373 | ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
6374 | 1:ns_v_on_file_usm(l) ) ) |
---|
6375 | ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6376 | ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
6377 | 1:ns_v_on_file_usm(l) ) ) |
---|
6378 | ALLOCATE( tmp_surf_waste_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6379 | ENDDO |
---|
6380 | |
---|
6381 | ENDIF |
---|
6382 | |
---|
6383 | CASE ( 'usm_start_index_h', 'usm_start_index_v' ) |
---|
6384 | IF ( k == 1 ) THEN |
---|
6385 | |
---|
6386 | IF ( ALLOCATED( start_index_on_file ) ) & |
---|
6387 | DEALLOCATE( start_index_on_file ) |
---|
6388 | |
---|
6389 | ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file, & |
---|
6390 | nxl_on_file:nxr_on_file) ) |
---|
6391 | |
---|
6392 | READ ( 13 ) start_index_on_file |
---|
6393 | |
---|
6394 | ENDIF |
---|
6395 | |
---|
6396 | CASE ( 'usm_end_index_h', 'usm_end_index_v' ) |
---|
6397 | IF ( k == 1 ) THEN |
---|
6398 | |
---|
6399 | IF ( ALLOCATED( end_index_on_file ) ) & |
---|
6400 | DEALLOCATE( end_index_on_file ) |
---|
6401 | |
---|
6402 | ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file, & |
---|
6403 | nxl_on_file:nxr_on_file) ) |
---|
6404 | |
---|
6405 | READ ( 13 ) end_index_on_file |
---|
6406 | |
---|
6407 | ENDIF |
---|
6408 | |
---|
6409 | CASE ( 't_surf_wall_h' ) |
---|
6410 | IF ( k == 1 ) THEN |
---|
6411 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
6412 | ALLOCATE( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
6413 | READ ( 13 ) tmp_surf_wall_h |
---|
6414 | ENDIF |
---|
6415 | CALL surface_restore_elements( & |
---|
6416 | t_surf_wall_h_1, tmp_surf_wall_h, & |
---|
6417 | surf_usm_h%start_index, & |
---|
6418 | start_index_on_file, & |
---|
6419 | end_index_on_file, & |
---|
6420 | nxlc, nysc, & |
---|
6421 | nxlf, nxrf, nysf, nynf, & |
---|
6422 | nys_on_file, nyn_on_file, & |
---|
6423 | nxl_on_file,nxr_on_file ) |
---|
6424 | |
---|
6425 | CASE ( 't_surf_wall_v(0)' ) |
---|
6426 | IF ( k == 1 ) THEN |
---|
6427 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(0)%t ) ) & |
---|
6428 | ALLOCATE( t_surf_wall_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6429 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
6430 | ENDIF |
---|
6431 | CALL surface_restore_elements( & |
---|
6432 | t_surf_wall_v_1(0)%t, tmp_surf_wall_v(0)%t, & |
---|
6433 | surf_usm_v(0)%start_index, & |
---|
6434 | start_index_on_file, & |
---|
6435 | end_index_on_file, & |
---|
6436 | nxlc, nysc, & |
---|
6437 | nxlf, nxrf, nysf, nynf, & |
---|
6438 | nys_on_file, nyn_on_file, & |
---|
6439 | nxl_on_file,nxr_on_file ) |
---|
6440 | |
---|
6441 | CASE ( 't_surf_wall_v(1)' ) |
---|
6442 | IF ( k == 1 ) THEN |
---|
6443 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(1)%t ) ) & |
---|
6444 | ALLOCATE( t_surf_wall_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6445 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
6446 | ENDIF |
---|
6447 | CALL surface_restore_elements( & |
---|
6448 | t_surf_wall_v_1(1)%t, tmp_surf_wall_v(1)%t, & |
---|
6449 | surf_usm_v(1)%start_index, & |
---|
6450 | start_index_on_file, & |
---|
6451 | end_index_on_file, & |
---|
6452 | nxlc, nysc, & |
---|
6453 | nxlf, nxrf, nysf, nynf, & |
---|
6454 | nys_on_file, nyn_on_file, & |
---|
6455 | nxl_on_file,nxr_on_file ) |
---|
6456 | |
---|
6457 | CASE ( 't_surf_wall_v(2)' ) |
---|
6458 | IF ( k == 1 ) THEN |
---|
6459 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(2)%t ) ) & |
---|
6460 | ALLOCATE( t_surf_wall_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6461 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
6462 | ENDIF |
---|
6463 | CALL surface_restore_elements( & |
---|
6464 | t_surf_wall_v_1(2)%t, tmp_surf_wall_v(2)%t, & |
---|
6465 | surf_usm_v(2)%start_index, & |
---|
6466 | start_index_on_file, & |
---|
6467 | end_index_on_file, & |
---|
6468 | nxlc, nysc, & |
---|
6469 | nxlf, nxrf, nysf, nynf, & |
---|
6470 | nys_on_file, nyn_on_file, & |
---|
6471 | nxl_on_file,nxr_on_file ) |
---|
6472 | |
---|
6473 | CASE ( 't_surf_wall_v(3)' ) |
---|
6474 | IF ( k == 1 ) THEN |
---|
6475 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(3)%t ) ) & |
---|
6476 | ALLOCATE( t_surf_wall_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6477 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
6478 | ENDIF |
---|
6479 | CALL surface_restore_elements( & |
---|
6480 | t_surf_wall_v_1(3)%t, tmp_surf_wall_v(3)%t, & |
---|
6481 | surf_usm_v(3)%start_index, & |
---|
6482 | start_index_on_file, & |
---|
6483 | end_index_on_file, & |
---|
6484 | nxlc, nysc, & |
---|
6485 | nxlf, nxrf, nysf, nynf, & |
---|
6486 | nys_on_file, nyn_on_file, & |
---|
6487 | nxl_on_file,nxr_on_file ) |
---|
6488 | |
---|
6489 | CASE ( 't_surf_green_h' ) |
---|
6490 | IF ( k == 1 ) THEN |
---|
6491 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
6492 | ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
6493 | READ ( 13 ) tmp_surf_green_h |
---|
6494 | ENDIF |
---|
6495 | CALL surface_restore_elements( & |
---|
6496 | t_surf_green_h_1, tmp_surf_green_h, & |
---|
6497 | surf_usm_h%start_index, & |
---|
6498 | start_index_on_file, & |
---|
6499 | end_index_on_file, & |
---|
6500 | nxlc, nysc, & |
---|
6501 | nxlf, nxrf, nysf, nynf, & |
---|
6502 | nys_on_file, nyn_on_file, & |
---|
6503 | nxl_on_file,nxr_on_file ) |
---|
6504 | |
---|
6505 | CASE ( 't_surf_green_v(0)' ) |
---|
6506 | IF ( k == 1 ) THEN |
---|
6507 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(0)%t ) ) & |
---|
6508 | ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6509 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
6510 | ENDIF |
---|
6511 | CALL surface_restore_elements( & |
---|
6512 | t_surf_green_v_1(0)%t, & |
---|
6513 | tmp_surf_green_v(0)%t, & |
---|
6514 | surf_usm_v(0)%start_index, & |
---|
6515 | start_index_on_file, & |
---|
6516 | end_index_on_file, & |
---|
6517 | nxlc, nysc, & |
---|
6518 | nxlf, nxrf, nysf, nynf, & |
---|
6519 | nys_on_file, nyn_on_file, & |
---|
6520 | nxl_on_file,nxr_on_file ) |
---|
6521 | |
---|
6522 | CASE ( 't_surf_green_v(1)' ) |
---|
6523 | IF ( k == 1 ) THEN |
---|
6524 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(1)%t ) ) & |
---|
6525 | ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6526 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
6527 | ENDIF |
---|
6528 | CALL surface_restore_elements( & |
---|
6529 | t_surf_green_v_1(1)%t, & |
---|
6530 | tmp_surf_green_v(1)%t, & |
---|
6531 | surf_usm_v(1)%start_index, & |
---|
6532 | start_index_on_file, & |
---|
6533 | end_index_on_file, & |
---|
6534 | nxlc, nysc, & |
---|
6535 | nxlf, nxrf, nysf, nynf, & |
---|
6536 | nys_on_file, nyn_on_file, & |
---|
6537 | nxl_on_file,nxr_on_file ) |
---|
6538 | |
---|
6539 | CASE ( 't_surf_green_v(2)' ) |
---|
6540 | IF ( k == 1 ) THEN |
---|
6541 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(2)%t ) ) & |
---|
6542 | ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6543 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
6544 | ENDIF |
---|
6545 | CALL surface_restore_elements( & |
---|
6546 | t_surf_green_v_1(2)%t, & |
---|
6547 | tmp_surf_green_v(2)%t, & |
---|
6548 | surf_usm_v(2)%start_index, & |
---|
6549 | start_index_on_file, & |
---|
6550 | end_index_on_file, & |
---|
6551 | nxlc, nysc, & |
---|
6552 | nxlf, nxrf, nysf, nynf, & |
---|
6553 | nys_on_file, nyn_on_file, & |
---|
6554 | nxl_on_file,nxr_on_file ) |
---|
6555 | |
---|
6556 | CASE ( 't_surf_green_v(3)' ) |
---|
6557 | IF ( k == 1 ) THEN |
---|
6558 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(3)%t ) ) & |
---|
6559 | ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6560 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
6561 | ENDIF |
---|
6562 | CALL surface_restore_elements( & |
---|
6563 | t_surf_green_v_1(3)%t, & |
---|
6564 | tmp_surf_green_v(3)%t, & |
---|
6565 | surf_usm_v(3)%start_index, & |
---|
6566 | start_index_on_file, & |
---|
6567 | end_index_on_file, & |
---|
6568 | nxlc, nysc, & |
---|
6569 | nxlf, nxrf, nysf, nynf, & |
---|
6570 | nys_on_file, nyn_on_file, & |
---|
6571 | nxl_on_file,nxr_on_file ) |
---|
6572 | |
---|
6573 | CASE ( 't_surf_window_h' ) |
---|
6574 | IF ( k == 1 ) THEN |
---|
6575 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
6576 | ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
6577 | READ ( 13 ) tmp_surf_window_h |
---|
6578 | ENDIF |
---|
6579 | CALL surface_restore_elements( & |
---|
6580 | t_surf_window_h_1, & |
---|
6581 | tmp_surf_window_h, & |
---|
6582 | surf_usm_h%start_index, & |
---|
6583 | start_index_on_file, & |
---|
6584 | end_index_on_file, & |
---|
6585 | nxlc, nysc, & |
---|
6586 | nxlf, nxrf, nysf, nynf, & |
---|
6587 | nys_on_file, nyn_on_file, & |
---|
6588 | nxl_on_file,nxr_on_file ) |
---|
6589 | |
---|
6590 | CASE ( 't_surf_window_v(0)' ) |
---|
6591 | IF ( k == 1 ) THEN |
---|
6592 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(0)%t ) ) & |
---|
6593 | ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6594 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
6595 | ENDIF |
---|
6596 | CALL surface_restore_elements( & |
---|
6597 | t_surf_window_v_1(0)%t, & |
---|
6598 | tmp_surf_window_v(0)%t, & |
---|
6599 | surf_usm_v(0)%start_index, & |
---|
6600 | start_index_on_file, & |
---|
6601 | end_index_on_file, & |
---|
6602 | nxlc, nysc, & |
---|
6603 | nxlf, nxrf, nysf, nynf, & |
---|
6604 | nys_on_file, nyn_on_file, & |
---|
6605 | nxl_on_file,nxr_on_file ) |
---|
6606 | |
---|
6607 | CASE ( 't_surf_window_v(1)' ) |
---|
6608 | IF ( k == 1 ) THEN |
---|
6609 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(1)%t ) ) & |
---|
6610 | ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6611 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
6612 | ENDIF |
---|
6613 | CALL surface_restore_elements( & |
---|
6614 | t_surf_window_v_1(1)%t, & |
---|
6615 | tmp_surf_window_v(1)%t, & |
---|
6616 | surf_usm_v(1)%start_index, & |
---|
6617 | start_index_on_file, & |
---|
6618 | end_index_on_file, & |
---|
6619 | nxlc, nysc, & |
---|
6620 | nxlf, nxrf, nysf, nynf, & |
---|
6621 | nys_on_file, nyn_on_file, & |
---|
6622 | nxl_on_file,nxr_on_file ) |
---|
6623 | |
---|
6624 | CASE ( 't_surf_window_v(2)' ) |
---|
6625 | IF ( k == 1 ) THEN |
---|
6626 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(2)%t ) ) & |
---|
6627 | ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6628 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
6629 | ENDIF |
---|
6630 | CALL surface_restore_elements( & |
---|
6631 | t_surf_window_v_1(2)%t, & |
---|
6632 | tmp_surf_window_v(2)%t, & |
---|
6633 | surf_usm_v(2)%start_index, & |
---|
6634 | start_index_on_file, & |
---|
6635 | end_index_on_file, & |
---|
6636 | nxlc, nysc, & |
---|
6637 | nxlf, nxrf, nysf, nynf, & |
---|
6638 | nys_on_file, nyn_on_file, & |
---|
6639 | nxl_on_file,nxr_on_file ) |
---|
6640 | |
---|
6641 | CASE ( 't_surf_window_v(3)' ) |
---|
6642 | IF ( k == 1 ) THEN |
---|
6643 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(3)%t ) ) & |
---|
6644 | ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6645 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
6646 | ENDIF |
---|
6647 | CALL surface_restore_elements( & |
---|
6648 | t_surf_window_v_1(3)%t, & |
---|
6649 | tmp_surf_window_v(3)%t, & |
---|
6650 | surf_usm_v(3)%start_index, & |
---|
6651 | start_index_on_file, & |
---|
6652 | end_index_on_file, & |
---|
6653 | nxlc, nysc, & |
---|
6654 | nxlf, nxrf, nysf, nynf, & |
---|
6655 | nys_on_file, nyn_on_file, & |
---|
6656 | nxl_on_file,nxr_on_file ) |
---|
6657 | |
---|
6658 | CASE ( 'waste_heat_h' ) |
---|
6659 | IF ( k == 1 ) THEN |
---|
6660 | IF ( .NOT. ALLOCATED( surf_usm_h%waste_heat ) ) & |
---|
6661 | ALLOCATE( surf_usm_h%waste_heat(1:surf_usm_h%ns) ) |
---|
6662 | READ ( 13 ) tmp_surf_waste_h |
---|
6663 | ENDIF |
---|
6664 | CALL surface_restore_elements( & |
---|
6665 | surf_usm_h%waste_heat, & |
---|
6666 | tmp_surf_waste_h, & |
---|
6667 | surf_usm_h%start_index, & |
---|
6668 | start_index_on_file, & |
---|
6669 | end_index_on_file, & |
---|
6670 | nxlc, nysc, & |
---|
6671 | nxlf, nxrf, nysf, nynf, & |
---|
6672 | nys_on_file, nyn_on_file, & |
---|
6673 | nxl_on_file,nxr_on_file ) |
---|
6674 | |
---|
6675 | CASE ( 'waste_heat_v(0)' ) |
---|
6676 | IF ( k == 1 ) THEN |
---|
6677 | IF ( .NOT. ALLOCATED( surf_usm_v(0)%waste_heat ) ) & |
---|
6678 | ALLOCATE( surf_usm_v(0)%waste_heat(1:surf_usm_v(0)%ns) ) |
---|
6679 | READ ( 13 ) tmp_surf_waste_v(0)%t |
---|
6680 | ENDIF |
---|
6681 | CALL surface_restore_elements( & |
---|
6682 | surf_usm_v(0)%waste_heat, & |
---|
6683 | tmp_surf_waste_v(0)%t, & |
---|
6684 | surf_usm_v(0)%start_index, & |
---|
6685 | start_index_on_file, & |
---|
6686 | end_index_on_file, & |
---|
6687 | nxlc, nysc, & |
---|
6688 | nxlf, nxrf, nysf, nynf, & |
---|
6689 | nys_on_file, nyn_on_file, & |
---|
6690 | nxl_on_file,nxr_on_file ) |
---|
6691 | |
---|
6692 | CASE ( 'waste_heat_v(1)' ) |
---|
6693 | IF ( k == 1 ) THEN |
---|
6694 | IF ( .NOT. ALLOCATED( surf_usm_v(1)%waste_heat ) ) & |
---|
6695 | ALLOCATE( surf_usm_v(1)%waste_heat(1:surf_usm_v(1)%ns) ) |
---|
6696 | READ ( 13 ) tmp_surf_waste_v(1)%t |
---|
6697 | ENDIF |
---|
6698 | CALL surface_restore_elements( & |
---|
6699 | surf_usm_v(1)%waste_heat, & |
---|
6700 | tmp_surf_waste_v(1)%t, & |
---|
6701 | surf_usm_v(1)%start_index, & |
---|
6702 | start_index_on_file, & |
---|
6703 | end_index_on_file, & |
---|
6704 | nxlc, nysc, & |
---|
6705 | nxlf, nxrf, nysf, nynf, & |
---|
6706 | nys_on_file, nyn_on_file, & |
---|
6707 | nxl_on_file,nxr_on_file ) |
---|
6708 | |
---|
6709 | CASE ( 'waste_heat_v(2)' ) |
---|
6710 | IF ( k == 1 ) THEN |
---|
6711 | IF ( .NOT. ALLOCATED( surf_usm_v(2)%waste_heat ) ) & |
---|
6712 | ALLOCATE( surf_usm_v(2)%waste_heat(1:surf_usm_v(2)%ns) ) |
---|
6713 | READ ( 13 ) tmp_surf_waste_v(2)%t |
---|
6714 | ENDIF |
---|
6715 | CALL surface_restore_elements( & |
---|
6716 | surf_usm_v(2)%waste_heat, & |
---|
6717 | tmp_surf_waste_v(2)%t, & |
---|
6718 | surf_usm_v(2)%start_index, & |
---|
6719 | start_index_on_file, & |
---|
6720 | end_index_on_file, & |
---|
6721 | nxlc, nysc, & |
---|
6722 | nxlf, nxrf, nysf, nynf, & |
---|
6723 | nys_on_file, nyn_on_file, & |
---|
6724 | nxl_on_file,nxr_on_file ) |
---|
6725 | |
---|
6726 | CASE ( 'waste_heat_v(3)' ) |
---|
6727 | IF ( k == 1 ) THEN |
---|
6728 | IF ( .NOT. ALLOCATED( surf_usm_v(3)%waste_heat ) ) & |
---|
6729 | ALLOCATE( surf_usm_v(3)%waste_heat(1:surf_usm_v(3)%ns) ) |
---|
6730 | READ ( 13 ) tmp_surf_waste_v(3)%t |
---|
6731 | ENDIF |
---|
6732 | CALL surface_restore_elements( & |
---|
6733 | surf_usm_v(3)%waste_heat, & |
---|
6734 | tmp_surf_waste_v(3)%t, & |
---|
6735 | surf_usm_v(3)%start_index, & |
---|
6736 | start_index_on_file, & |
---|
6737 | end_index_on_file, & |
---|
6738 | nxlc, nysc, & |
---|
6739 | nxlf, nxrf, nysf, nynf, & |
---|
6740 | nys_on_file, nyn_on_file, & |
---|
6741 | nxl_on_file,nxr_on_file ) |
---|
6742 | |
---|
6743 | CASE ( 't_wall_h' ) |
---|
6744 | IF ( k == 1 ) THEN |
---|
6745 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
6746 | ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1, & |
---|
6747 | 1:surf_usm_h%ns) ) |
---|
6748 | READ ( 13 ) tmp_wall_h |
---|
6749 | ENDIF |
---|
6750 | CALL surface_restore_elements( & |
---|
6751 | t_wall_h_1, tmp_wall_h, & |
---|
6752 | surf_usm_h%start_index, & |
---|
6753 | start_index_on_file, & |
---|
6754 | end_index_on_file, & |
---|
6755 | nxlc, nysc, & |
---|
6756 | nxlf, nxrf, nysf, nynf, & |
---|
6757 | nys_on_file, nyn_on_file, & |
---|
6758 | nxl_on_file,nxr_on_file ) |
---|
6759 | |
---|
6760 | CASE ( 't_wall_v(0)' ) |
---|
6761 | IF ( k == 1 ) THEN |
---|
6762 | IF ( .NOT. ALLOCATED( t_wall_v_1(0)%t ) ) & |
---|
6763 | ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6764 | 1:surf_usm_v(0)%ns) ) |
---|
6765 | READ ( 13 ) tmp_wall_v(0)%t |
---|
6766 | ENDIF |
---|
6767 | CALL surface_restore_elements( & |
---|
6768 | t_wall_v_1(0)%t, tmp_wall_v(0)%t, & |
---|
6769 | surf_usm_v(0)%start_index, & |
---|
6770 | start_index_on_file, & |
---|
6771 | end_index_on_file, & |
---|
6772 | nxlc, nysc, & |
---|
6773 | nxlf, nxrf, nysf, nynf, & |
---|
6774 | nys_on_file, nyn_on_file, & |
---|
6775 | nxl_on_file,nxr_on_file ) |
---|
6776 | |
---|
6777 | CASE ( 't_wall_v(1)' ) |
---|
6778 | IF ( k == 1 ) THEN |
---|
6779 | IF ( .NOT. ALLOCATED( t_wall_v_1(1)%t ) ) & |
---|
6780 | ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
6781 | 1:surf_usm_v(1)%ns) ) |
---|
6782 | READ ( 13 ) tmp_wall_v(1)%t |
---|
6783 | ENDIF |
---|
6784 | CALL surface_restore_elements( & |
---|
6785 | t_wall_v_1(1)%t, tmp_wall_v(1)%t, & |
---|
6786 | surf_usm_v(1)%start_index, & |
---|
6787 | start_index_on_file, & |
---|
6788 | end_index_on_file, & |
---|
6789 | nxlc, nysc, & |
---|
6790 | nxlf, nxrf, nysf, nynf, & |
---|
6791 | nys_on_file, nyn_on_file, & |
---|
6792 | nxl_on_file,nxr_on_file ) |
---|
6793 | |
---|
6794 | CASE ( 't_wall_v(2)' ) |
---|
6795 | IF ( k == 1 ) THEN |
---|
6796 | IF ( .NOT. ALLOCATED( t_wall_v_1(2)%t ) ) & |
---|
6797 | ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
6798 | 1:surf_usm_v(2)%ns) ) |
---|
6799 | READ ( 13 ) tmp_wall_v(2)%t |
---|
6800 | ENDIF |
---|
6801 | CALL surface_restore_elements( & |
---|
6802 | t_wall_v_1(2)%t, tmp_wall_v(2)%t, & |
---|
6803 | surf_usm_v(2)%start_index, & |
---|
6804 | start_index_on_file, & |
---|
6805 | end_index_on_file , & |
---|
6806 | nxlc, nysc, & |
---|
6807 | nxlf, nxrf, nysf, nynf, & |
---|
6808 | nys_on_file, nyn_on_file, & |
---|
6809 | nxl_on_file,nxr_on_file ) |
---|
6810 | |
---|
6811 | CASE ( 't_wall_v(3)' ) |
---|
6812 | IF ( k == 1 ) THEN |
---|
6813 | IF ( .NOT. ALLOCATED( t_wall_v_1(3)%t ) ) & |
---|
6814 | ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
6815 | 1:surf_usm_v(3)%ns) ) |
---|
6816 | READ ( 13 ) tmp_wall_v(3)%t |
---|
6817 | ENDIF |
---|
6818 | CALL surface_restore_elements( & |
---|
6819 | t_wall_v_1(3)%t, tmp_wall_v(3)%t, & |
---|
6820 | surf_usm_v(3)%start_index, & |
---|
6821 | start_index_on_file, & |
---|
6822 | end_index_on_file, & |
---|
6823 | nxlc, nysc, & |
---|
6824 | nxlf, nxrf, nysf, nynf, & |
---|
6825 | nys_on_file, nyn_on_file, & |
---|
6826 | nxl_on_file,nxr_on_file ) |
---|
6827 | |
---|
6828 | CASE ( 't_green_h' ) |
---|
6829 | IF ( k == 1 ) THEN |
---|
6830 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
6831 | ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1, & |
---|
6832 | 1:surf_usm_h%ns) ) |
---|
6833 | READ ( 13 ) tmp_green_h |
---|
6834 | ENDIF |
---|
6835 | CALL surface_restore_elements( & |
---|
6836 | t_green_h_1, tmp_green_h, & |
---|
6837 | surf_usm_h%start_index, & |
---|
6838 | start_index_on_file, & |
---|
6839 | end_index_on_file, & |
---|
6840 | nxlc, nysc, & |
---|
6841 | nxlf, nxrf, nysf, nynf, & |
---|
6842 | nys_on_file, nyn_on_file, & |
---|
6843 | nxl_on_file,nxr_on_file ) |
---|
6844 | |
---|
6845 | CASE ( 't_green_v(0)' ) |
---|
6846 | IF ( k == 1 ) THEN |
---|
6847 | IF ( .NOT. ALLOCATED( t_green_v_1(0)%t ) ) & |
---|
6848 | ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6849 | 1:surf_usm_v(0)%ns) ) |
---|
6850 | READ ( 13 ) tmp_green_v(0)%t |
---|
6851 | ENDIF |
---|
6852 | CALL surface_restore_elements( & |
---|
6853 | t_green_v_1(0)%t, tmp_green_v(0)%t, & |
---|
6854 | surf_usm_v(0)%start_index, & |
---|
6855 | start_index_on_file, & |
---|
6856 | end_index_on_file, & |
---|
6857 | nxlc, nysc, & |
---|
6858 | nxlf, nxrf, nysf, nynf, & |
---|
6859 | nys_on_file, nyn_on_file, & |
---|
6860 | nxl_on_file,nxr_on_file ) |
---|
6861 | |
---|
6862 | CASE ( 't_green_v(1)' ) |
---|
6863 | IF ( k == 1 ) THEN |
---|
6864 | IF ( .NOT. ALLOCATED( t_green_v_1(1)%t ) ) & |
---|
6865 | ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
6866 | 1:surf_usm_v(1)%ns) ) |
---|
6867 | READ ( 13 ) tmp_green_v(1)%t |
---|
6868 | ENDIF |
---|
6869 | CALL surface_restore_elements( & |
---|
6870 | t_green_v_1(1)%t, tmp_green_v(1)%t, & |
---|
6871 | surf_usm_v(1)%start_index, & |
---|
6872 | start_index_on_file, & |
---|
6873 | end_index_on_file, & |
---|
6874 | nxlc, nysc, & |
---|
6875 | nxlf, nxrf, nysf, nynf, & |
---|
6876 | nys_on_file, nyn_on_file, & |
---|
6877 | nxl_on_file,nxr_on_file ) |
---|
6878 | |
---|
6879 | CASE ( 't_green_v(2)' ) |
---|
6880 | IF ( k == 1 ) THEN |
---|
6881 | IF ( .NOT. ALLOCATED( t_green_v_1(2)%t ) ) & |
---|
6882 | ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
6883 | 1:surf_usm_v(2)%ns) ) |
---|
6884 | READ ( 13 ) tmp_green_v(2)%t |
---|
6885 | ENDIF |
---|
6886 | CALL surface_restore_elements( & |
---|
6887 | t_green_v_1(2)%t, tmp_green_v(2)%t, & |
---|
6888 | surf_usm_v(2)%start_index, & |
---|
6889 | start_index_on_file, & |
---|
6890 | end_index_on_file , & |
---|
6891 | nxlc, nysc, & |
---|
6892 | nxlf, nxrf, nysf, nynf, & |
---|
6893 | nys_on_file, nyn_on_file, & |
---|
6894 | nxl_on_file,nxr_on_file ) |
---|
6895 | |
---|
6896 | CASE ( 't_green_v(3)' ) |
---|
6897 | IF ( k == 1 ) THEN |
---|
6898 | IF ( .NOT. ALLOCATED( t_green_v_1(3)%t ) ) & |
---|
6899 | ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
6900 | 1:surf_usm_v(3)%ns) ) |
---|
6901 | READ ( 13 ) tmp_green_v(3)%t |
---|
6902 | ENDIF |
---|
6903 | CALL surface_restore_elements( & |
---|
6904 | t_green_v_1(3)%t, tmp_green_v(3)%t, & |
---|
6905 | surf_usm_v(3)%start_index, & |
---|
6906 | start_index_on_file, & |
---|
6907 | end_index_on_file, & |
---|
6908 | nxlc, nysc, & |
---|
6909 | nxlf, nxrf, nysf, nynf, & |
---|
6910 | nys_on_file, nyn_on_file, & |
---|
6911 | nxl_on_file,nxr_on_file ) |
---|
6912 | |
---|
6913 | CASE ( 't_window_h' ) |
---|
6914 | IF ( k == 1 ) THEN |
---|
6915 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
6916 | ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1, & |
---|
6917 | 1:surf_usm_h%ns) ) |
---|
6918 | READ ( 13 ) tmp_window_h |
---|
6919 | ENDIF |
---|
6920 | CALL surface_restore_elements( & |
---|
6921 | t_window_h_1, tmp_window_h, & |
---|
6922 | surf_usm_h%start_index, & |
---|
6923 | start_index_on_file, & |
---|
6924 | end_index_on_file, & |
---|
6925 | nxlc, nysc, & |
---|
6926 | nxlf, nxrf, nysf, nynf, & |
---|
6927 | nys_on_file, nyn_on_file, & |
---|
6928 | nxl_on_file, nxr_on_file ) |
---|
6929 | |
---|
6930 | CASE ( 't_window_v(0)' ) |
---|
6931 | IF ( k == 1 ) THEN |
---|
6932 | IF ( .NOT. ALLOCATED( t_window_v_1(0)%t ) ) & |
---|
6933 | ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6934 | 1:surf_usm_v(0)%ns) ) |
---|
6935 | READ ( 13 ) tmp_window_v(0)%t |
---|
6936 | ENDIF |
---|
6937 | CALL surface_restore_elements( & |
---|
6938 | t_window_v_1(0)%t, & |
---|
6939 | tmp_window_v(0)%t, & |
---|
6940 | surf_usm_v(0)%start_index, & |
---|
6941 | start_index_on_file, & |
---|
6942 | end_index_on_file, & |
---|
6943 | nxlc, nysc, & |
---|
6944 | nxlf, nxrf, nysf, nynf, & |
---|
6945 | nys_on_file, nyn_on_file, & |
---|
6946 | nxl_on_file,nxr_on_file ) |
---|
6947 | |
---|
6948 | CASE ( 't_window_v(1)' ) |
---|
6949 | IF ( k == 1 ) THEN |
---|
6950 | IF ( .NOT. ALLOCATED( t_window_v_1(1)%t ) ) & |
---|
6951 | ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
6952 | 1:surf_usm_v(1)%ns) ) |
---|
6953 | READ ( 13 ) tmp_window_v(1)%t |
---|
6954 | ENDIF |
---|
6955 | CALL surface_restore_elements( & |
---|
6956 | t_window_v_1(1)%t, & |
---|
6957 | tmp_window_v(1)%t, & |
---|
6958 | surf_usm_v(1)%start_index, & |
---|
6959 | start_index_on_file, & |
---|
6960 | end_index_on_file, & |
---|
6961 | nxlc, nysc, & |
---|
6962 | nxlf, nxrf, nysf, nynf, & |
---|
6963 | nys_on_file, nyn_on_file, & |
---|
6964 | nxl_on_file,nxr_on_file ) |
---|
6965 | |
---|
6966 | CASE ( 't_window_v(2)' ) |
---|
6967 | IF ( k == 1 ) THEN |
---|
6968 | IF ( .NOT. ALLOCATED( t_window_v_1(2)%t ) ) & |
---|
6969 | ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
6970 | 1:surf_usm_v(2)%ns) ) |
---|
6971 | READ ( 13 ) tmp_window_v(2)%t |
---|
6972 | ENDIF |
---|
6973 | CALL surface_restore_elements( & |
---|
6974 | t_window_v_1(2)%t, & |
---|
6975 | tmp_window_v(2)%t, & |
---|
6976 | surf_usm_v(2)%start_index, & |
---|
6977 | start_index_on_file, & |
---|
6978 | end_index_on_file , & |
---|
6979 | nxlc, nysc, & |
---|
6980 | nxlf, nxrf, nysf, nynf, & |
---|
6981 | nys_on_file, nyn_on_file, & |
---|
6982 | nxl_on_file,nxr_on_file ) |
---|
6983 | |
---|
6984 | CASE ( 't_window_v(3)' ) |
---|
6985 | IF ( k == 1 ) THEN |
---|
6986 | IF ( .NOT. ALLOCATED( t_window_v_1(3)%t ) ) & |
---|
6987 | ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) ) |
---|
6988 | READ ( 13 ) tmp_window_v(3)%t |
---|
6989 | ENDIF |
---|
6990 | CALL surface_restore_elements( & |
---|
6991 | t_window_v_1(3)%t, & |
---|
6992 | tmp_window_v(3)%t, & |
---|
6993 | surf_usm_v(3)%start_index, & |
---|
6994 | start_index_on_file, & |
---|
6995 | end_index_on_file, & |
---|
6996 | nxlc, nysc, & |
---|
6997 | nxlf, nxrf, nysf, nynf, & |
---|
6998 | nys_on_file, nyn_on_file, & |
---|
6999 | nxl_on_file,nxr_on_file ) |
---|
7000 | |
---|
7001 | CASE DEFAULT |
---|
7002 | |
---|
7003 | found = .FALSE. |
---|
7004 | |
---|
7005 | END SELECT |
---|
7006 | |
---|
7007 | |
---|
7008 | END SUBROUTINE usm_rrd_local |
---|
7009 | |
---|
7010 | |
---|
7011 | !------------------------------------------------------------------------------! |
---|
7012 | ! Description: |
---|
7013 | ! ------------ |
---|
7014 | ! |
---|
7015 | !> This subroutine reads walls, roofs and land categories and it parameters |
---|
7016 | !> from input files. |
---|
7017 | !------------------------------------------------------------------------------! |
---|
7018 | SUBROUTINE usm_read_urban_surface_types |
---|
7019 | |
---|
7020 | USE netcdf_data_input_mod, & |
---|
7021 | ONLY: building_pars_f, building_type_f |
---|
7022 | |
---|
7023 | IMPLICIT NONE |
---|
7024 | |
---|
7025 | CHARACTER(12) :: wtn |
---|
7026 | INTEGER(iwp) :: wtc |
---|
7027 | REAL(wp), DIMENSION(n_surface_params) :: wtp |
---|
7028 | LOGICAL :: ascii_file = .FALSE. |
---|
7029 | INTEGER(iwp), DIMENSION(0:17, nysg:nyng, nxlg:nxrg) :: usm_par |
---|
7030 | REAL(wp), DIMENSION(1:14, nysg:nyng, nxlg:nxrg) :: usm_val |
---|
7031 | INTEGER(iwp) :: k, l, iw, jw, kw, it, ip, ii, ij, m |
---|
7032 | INTEGER(iwp) :: i, j |
---|
7033 | INTEGER(iwp) :: nz, roof, dirwe, dirsn |
---|
7034 | INTEGER(iwp) :: category |
---|
7035 | INTEGER(iwp) :: weheight1, wecat1, snheight1, sncat1 |
---|
7036 | INTEGER(iwp) :: weheight2, wecat2, snheight2, sncat2 |
---|
7037 | INTEGER(iwp) :: weheight3, wecat3, snheight3, sncat3 |
---|
7038 | REAL(wp) :: height, albedo, thick |
---|
7039 | REAL(wp) :: wealbedo1, wethick1, snalbedo1, snthick1 |
---|
7040 | REAL(wp) :: wealbedo2, wethick2, snalbedo2, snthick2 |
---|
7041 | REAL(wp) :: wealbedo3, wethick3, snalbedo3, snthick3 |
---|
7042 | |
---|
7043 | ! |
---|
7044 | !-- If building_pars or building_type are already read from static input |
---|
7045 | !-- file, skip reading ASCII file. |
---|
7046 | IF ( building_type_f%from_file .OR. building_pars_f%from_file ) & |
---|
7047 | RETURN |
---|
7048 | ! |
---|
7049 | !-- Check if ASCII input file exists. If not, return and initialize USM |
---|
7050 | !-- with default settings. |
---|
7051 | INQUIRE( FILE = 'SURFACE_PARAMETERS' // coupling_char, & |
---|
7052 | EXIST = ascii_file ) |
---|
7053 | |
---|
7054 | IF ( .NOT. ascii_file ) RETURN |
---|
7055 | |
---|
7056 | ! |
---|
7057 | !-- read categories of walls and their parameters |
---|
7058 | DO ii = 0, io_blocks-1 |
---|
7059 | IF ( ii == io_group ) THEN |
---|
7060 | ! |
---|
7061 | !-- open urban surface file |
---|
7062 | OPEN( 151, file='SURFACE_PARAMETERS'//coupling_char, action='read', & |
---|
7063 | status='old', form='formatted', err=15 ) |
---|
7064 | ! |
---|
7065 | !-- first test and get n_surface_types |
---|
7066 | k = 0 |
---|
7067 | l = 0 |
---|
7068 | DO |
---|
7069 | l = l+1 |
---|
7070 | READ( 151, *, err=11, end=12 ) wtc, wtp, wtn |
---|
7071 | k = k+1 |
---|
7072 | CYCLE |
---|
7073 | 11 CONTINUE |
---|
7074 | ENDDO |
---|
7075 | 12 n_surface_types = k |
---|
7076 | ALLOCATE( surface_type_names(n_surface_types) ) |
---|
7077 | ALLOCATE( surface_type_codes(n_surface_types) ) |
---|
7078 | ALLOCATE( surface_params(n_surface_params, n_surface_types) ) |
---|
7079 | ! |
---|
7080 | !-- real reading |
---|
7081 | rewind( 151 ) |
---|
7082 | k = 0 |
---|
7083 | DO |
---|
7084 | READ( 151, *, err=13, end=14 ) wtc, wtp, wtn |
---|
7085 | k = k+1 |
---|
7086 | surface_type_codes(k) = wtc |
---|
7087 | surface_params(:,k) = wtp |
---|
7088 | surface_type_names(k) = wtn |
---|
7089 | CYCLE |
---|
7090 | 13 WRITE(6,'(i3,a,2i5)') myid, 'readparams2 error k=', k |
---|
7091 | FLUSH(6) |
---|
7092 | CONTINUE |
---|
7093 | ENDDO |
---|
7094 | 14 CLOSE(151) |
---|
7095 | CYCLE |
---|
7096 | 15 message_string = 'file SURFACE_PARAMETERS'//TRIM(coupling_char)//' does not exist' |
---|
7097 | CALL message( 'usm_read_urban_surface_types', 'PA0513', 1, 2, 0, 6, 0 ) |
---|
7098 | ENDIF |
---|
7099 | ENDDO |
---|
7100 | |
---|
7101 | ! |
---|
7102 | !-- read types of surfaces |
---|
7103 | usm_par = 0 |
---|
7104 | DO ii = 0, io_blocks-1 |
---|
7105 | IF ( ii == io_group ) THEN |
---|
7106 | |
---|
7107 | ! |
---|
7108 | !-- open csv urban surface file |
---|
7109 | OPEN( 151, file='URBAN_SURFACE'//TRIM(coupling_char), action='read', & |
---|
7110 | status='old', form='formatted', err=23 ) |
---|
7111 | |
---|
7112 | l = 0 |
---|
7113 | DO |
---|
7114 | l = l+1 |
---|
7115 | ! |
---|
7116 | !-- i, j, height, nz, roof, dirwe, dirsn, category, soilcat, |
---|
7117 | !-- weheight1, wecat1, snheight1, sncat1, weheight2, wecat2, snheight2, sncat2, |
---|
7118 | !-- weheight3, wecat3, snheight3, sncat3 |
---|
7119 | READ( 151, *, err=21, end=25 ) i, j, height, nz, roof, dirwe, dirsn, & |
---|
7120 | category, albedo, thick, & |
---|
7121 | weheight1, wecat1, wealbedo1, wethick1, & |
---|
7122 | weheight2, wecat2, wealbedo2, wethick2, & |
---|
7123 | weheight3, wecat3, wealbedo3, wethick3, & |
---|
7124 | snheight1, sncat1, snalbedo1, snthick1, & |
---|
7125 | snheight2, sncat2, snalbedo2, snthick2, & |
---|
7126 | snheight3, sncat3, snalbedo3, snthick3 |
---|
7127 | |
---|
7128 | IF ( i >= nxlg .AND. i <= nxrg .AND. j >= nysg .AND. j <= nyng ) THEN |
---|
7129 | ! |
---|
7130 | !-- write integer variables into array |
---|
7131 | usm_par(:,j,i) = (/1, nz, roof, dirwe, dirsn, category, & |
---|
7132 | weheight1, wecat1, weheight2, wecat2, weheight3, wecat3, & |
---|
7133 | snheight1, sncat1, snheight2, sncat2, snheight3, sncat3 /) |
---|
7134 | ! |
---|
7135 | !-- write real values into array |
---|
7136 | usm_val(:,j,i) = (/ albedo, thick, & |
---|
7137 | wealbedo1, wethick1, wealbedo2, wethick2, & |
---|
7138 | wealbedo3, wethick3, snalbedo1, snthick1, & |
---|
7139 | snalbedo2, snthick2, snalbedo3, snthick3 /) |
---|
7140 | ENDIF |
---|
7141 | CYCLE |
---|
7142 | 21 WRITE (message_string, "(A,I5)") 'errors in file URBAN_SURFACE'//TRIM(coupling_char)//' on line ', l |
---|
7143 | CALL message( 'usm_read_urban_surface_types', 'PA0512', 0, 1, 0, 6, 0 ) |
---|
7144 | ENDDO |
---|
7145 | |
---|
7146 | 23 message_string = 'file URBAN_SURFACE'//TRIM(coupling_char)//' does not exist' |
---|
7147 | CALL message( 'usm_read_urban_surface_types', 'PA0514', 1, 2, 0, 6, 0 ) |
---|
7148 | |
---|
7149 | 25 CLOSE( 151 ) |
---|
7150 | |
---|
7151 | ENDIF |
---|
7152 | #if defined( __parallel ) |
---|
7153 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7154 | #endif |
---|
7155 | ENDDO |
---|
7156 | |
---|
7157 | ! |
---|
7158 | !-- check completeness and formal correctness of the data |
---|
7159 | DO i = nxlg, nxrg |
---|
7160 | DO j = nysg, nyng |
---|
7161 | IF ( usm_par(0,j,i) /= 0 .AND. ( & !< incomplete data,supply default values later |
---|
7162 | usm_par(1,j,i) < nzb .OR. & |
---|
7163 | usm_par(1,j,i) > nzt .OR. & !< incorrect height (nz < nzb .OR. nz > nzt) |
---|
7164 | usm_par(2,j,i) < 0 .OR. & |
---|
7165 | usm_par(2,j,i) > 1 .OR. & !< incorrect roof sign |
---|
7166 | usm_par(3,j,i) < nzb-nzt .OR. & |
---|
7167 | usm_par(3,j,i) > nzt-nzb .OR. & !< incorrect west-east wall direction sign |
---|
7168 | usm_par(4,j,i) < nzb-nzt .OR. & |
---|
7169 | usm_par(4,j,i) > nzt-nzb .OR. & !< incorrect south-north wall direction sign |
---|
7170 | usm_par(6,j,i) < nzb .OR. & |
---|
7171 | usm_par(6,j,i) > nzt .OR. & !< incorrect pedestrian level height for west-east wall |
---|
7172 | usm_par(8,j,i) > nzt .OR. & |
---|
7173 | usm_par(10,j,i) > nzt .OR. & !< incorrect wall or roof level height for west-east wall |
---|
7174 | usm_par(12,j,i) < nzb .OR. & |
---|
7175 | usm_par(12,j,i) > nzt .OR. & !< incorrect pedestrian level height for south-north wall |
---|
7176 | usm_par(14,j,i) > nzt .OR. & |
---|
7177 | usm_par(16,j,i) > nzt & !< incorrect wall or roof level height for south-north wall |
---|
7178 | ) ) THEN |
---|
7179 | ! |
---|
7180 | !-- incorrect input data |
---|
7181 | WRITE (message_string, "(A,2I5)") 'missing or incorrect data in file URBAN_SURFACE'// & |
---|
7182 | TRIM(coupling_char)//' for i,j=', i,j |
---|
7183 | CALL message( 'usm_read_urban_surface', 'PA0504', 1, 2, 0, 6, 0 ) |
---|
7184 | ENDIF |
---|
7185 | |
---|
7186 | ENDDO |
---|
7187 | ENDDO |
---|
7188 | ! |
---|
7189 | !-- Assign the surface types to the respective data type. |
---|
7190 | !-- First, for horizontal upward-facing surfaces. |
---|
7191 | !-- Further, set flag indicating that albedo is initialized via ASCII |
---|
7192 | !-- format, else it would be overwritten in the radiation model. |
---|
7193 | surf_usm_h%albedo_from_ascii = .TRUE. |
---|
7194 | DO m = 1, surf_usm_h%ns |
---|
7195 | iw = surf_usm_h%i(m) |
---|
7196 | jw = surf_usm_h%j(m) |
---|
7197 | kw = surf_usm_h%k(m) |
---|
7198 | |
---|
7199 | IF ( usm_par(5,jw,iw) == 0 ) THEN |
---|
7200 | |
---|
7201 | IF ( zu(kw) >= roof_height_limit ) THEN |
---|
7202 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
7203 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
7204 | ELSE |
---|
7205 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
7206 | surf_usm_h%surface_types(m) = land_category !< default category for land surface |
---|
7207 | ENDIF |
---|
7208 | |
---|
7209 | surf_usm_h%albedo(:,m) = -1.0_wp |
---|
7210 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
7211 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
7212 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
7213 | ELSE |
---|
7214 | IF ( usm_par(2,jw,iw)==0 ) THEN |
---|
7215 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
7216 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
7217 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
7218 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
7219 | ELSE |
---|
7220 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
7221 | surf_usm_h%thickness_wall(m) = usm_val(2,jw,iw) |
---|
7222 | surf_usm_h%thickness_window(m) = usm_val(2,jw,iw) |
---|
7223 | surf_usm_h%thickness_green(m) = usm_val(2,jw,iw) |
---|
7224 | ENDIF |
---|
7225 | surf_usm_h%surface_types(m) = usm_par(5,jw,iw) |
---|
7226 | surf_usm_h%albedo(:,m) = usm_val(1,jw,iw) |
---|
7227 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
7228 | ENDIF |
---|
7229 | ! |
---|
7230 | !-- Find the type position |
---|
7231 | it = surf_usm_h%surface_types(m) |
---|
7232 | ip = -99999 |
---|
7233 | DO k = 1, n_surface_types |
---|
7234 | IF ( surface_type_codes(k) == it ) THEN |
---|
7235 | ip = k |
---|
7236 | EXIT |
---|
7237 | ENDIF |
---|
7238 | ENDDO |
---|
7239 | IF ( ip == -99999 ) THEN |
---|
7240 | ! |
---|
7241 | !-- land/roof category not found |
---|
7242 | WRITE (9,"(A,I5,A,3I5)") 'land/roof category ', it, & |
---|
7243 | ' not found for i,j,k=', iw,jw,kw |
---|
7244 | FLUSH(9) |
---|
7245 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
7246 | category = roof_category |
---|
7247 | ELSE |
---|
7248 | category = land_category |
---|
7249 | ENDIF |
---|
7250 | DO k = 1, n_surface_types |
---|
7251 | IF ( surface_type_codes(k) == roof_category ) THEN |
---|
7252 | ip = k |
---|
7253 | EXIT |
---|
7254 | ENDIF |
---|
7255 | ENDDO |
---|
7256 | IF ( ip == -99999 ) THEN |
---|
7257 | ! |
---|
7258 | !-- default land/roof category not found |
---|
7259 | WRITE (9,"(A,I5,A,3I5)") 'Default land/roof category', category, ' not found!' |
---|
7260 | FLUSH(9) |
---|
7261 | ip = 1 |
---|
7262 | ENDIF |
---|
7263 | ENDIF |
---|
7264 | ! |
---|
7265 | !-- Albedo |
---|
7266 | IF ( surf_usm_h%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
7267 | surf_usm_h%albedo(:,m) = surface_params(ialbedo,ip) |
---|
7268 | ENDIF |
---|
7269 | ! |
---|
7270 | !-- Albedo type is 0 (custom), others are replaced later |
---|
7271 | surf_usm_h%albedo_type(:,m) = 0 |
---|
7272 | ! |
---|
7273 | !-- Transmissivity |
---|
7274 | IF ( surf_usm_h%transmissivity(m) < 0.0_wp ) THEN |
---|
7275 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
7276 | ENDIF |
---|
7277 | ! |
---|
7278 | !-- emissivity of the wall |
---|
7279 | surf_usm_h%emissivity(:,m) = surface_params(iemiss,ip) |
---|
7280 | ! |
---|
7281 | !-- heat conductivity λS between air and wall ( W mâ2 Kâ1 ) |
---|
7282 | surf_usm_h%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
7283 | surf_usm_h%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
7284 | surf_usm_h%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
7285 | ! |
---|
7286 | !-- roughness length for momentum, heat and humidity |
---|
7287 | surf_usm_h%z0(m) = surface_params(irough,ip) |
---|
7288 | surf_usm_h%z0h(m) = surface_params(iroughh,ip) |
---|
7289 | surf_usm_h%z0q(m) = surface_params(iroughh,ip) |
---|
7290 | ! |
---|
7291 | !-- Surface skin layer heat capacity (J mâ2 Kâ1 ) |
---|
7292 | surf_usm_h%c_surface(m) = surface_params(icsurf,ip) |
---|
7293 | surf_usm_h%c_surface_window(m) = surface_params(icsurf,ip) |
---|
7294 | surf_usm_h%c_surface_green(m) = surface_params(icsurf,ip) |
---|
7295 | ! |
---|
7296 | !-- wall material parameters: |
---|
7297 | !-- thickness of the wall (m) |
---|
7298 | !-- missing values are replaced by default value for category |
---|
7299 | IF ( surf_usm_h%thickness_wall(m) <= 0.001_wp ) THEN |
---|
7300 | surf_usm_h%thickness_wall(m) = surface_params(ithick,ip) |
---|
7301 | ENDIF |
---|
7302 | IF ( surf_usm_h%thickness_window(m) <= 0.001_wp ) THEN |
---|
7303 | surf_usm_h%thickness_window(m) = surface_params(ithick,ip) |
---|
7304 | ENDIF |
---|
7305 | IF ( surf_usm_h%thickness_green(m) <= 0.001_wp ) THEN |
---|
7306 | surf_usm_h%thickness_green(m) = surface_params(ithick,ip) |
---|
7307 | ENDIF |
---|
7308 | ! |
---|
7309 | !-- volumetric heat capacity rho*C of the wall ( J mâ3 Kâ1 ) |
---|
7310 | surf_usm_h%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
7311 | surf_usm_h%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
7312 | surf_usm_h%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
7313 | ! |
---|
7314 | !-- thermal conductivity λH of the wall (W mâ1 Kâ1 ) |
---|
7315 | surf_usm_h%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
7316 | surf_usm_h%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
7317 | surf_usm_h%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
7318 | |
---|
7319 | ENDDO |
---|
7320 | ! |
---|
7321 | !-- For vertical surface elements ( 0 -- northward-facing, 1 -- southward-facing, |
---|
7322 | !-- 2 -- eastward-facing, 3 -- westward-facing ) |
---|
7323 | DO l = 0, 3 |
---|
7324 | ! |
---|
7325 | !-- Set flag indicating that albedo is initialized via ASCII format. |
---|
7326 | !-- Else it would be overwritten in the radiation model. |
---|
7327 | surf_usm_v(l)%albedo_from_ascii = .TRUE. |
---|
7328 | DO m = 1, surf_usm_v(l)%ns |
---|
7329 | i = surf_usm_v(l)%i(m) |
---|
7330 | j = surf_usm_v(l)%j(m) |
---|
7331 | kw = surf_usm_v(l)%k(m) |
---|
7332 | |
---|
7333 | IF ( l == 3 ) THEN ! westward facing |
---|
7334 | iw = i |
---|
7335 | jw = j |
---|
7336 | ii = 6 |
---|
7337 | ij = 3 |
---|
7338 | ELSEIF ( l == 2 ) THEN |
---|
7339 | iw = i-1 |
---|
7340 | jw = j |
---|
7341 | ii = 6 |
---|
7342 | ij = 3 |
---|
7343 | ELSEIF ( l == 1 ) THEN |
---|
7344 | iw = i |
---|
7345 | jw = j |
---|
7346 | ii = 12 |
---|
7347 | ij = 9 |
---|
7348 | ELSEIF ( l == 0 ) THEN |
---|
7349 | iw = i |
---|
7350 | jw = j-1 |
---|
7351 | ii = 12 |
---|
7352 | ij = 9 |
---|
7353 | ENDIF |
---|
7354 | |
---|
7355 | IF ( iw < 0 .OR. jw < 0 ) THEN |
---|
7356 | ! |
---|
7357 | !-- wall on west or south border of the domain - assign default category |
---|
7358 | IF ( kw <= roof_height_limit ) THEN |
---|
7359 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
7360 | ELSE |
---|
7361 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
7362 | END IF |
---|
7363 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7364 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7365 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7366 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7367 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7368 | ELSE IF ( kw <= usm_par(ii,jw,iw) ) THEN |
---|
7369 | ! |
---|
7370 | !-- pedestrian zone |
---|
7371 | IF ( usm_par(ii+1,jw,iw) == 0 ) THEN |
---|
7372 | surf_usm_v(l)%surface_types(m) = pedestrian_category !< default category for wall surface in |
---|
7373 | !<pedestrian zone |
---|
7374 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7375 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7376 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7377 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7378 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7379 | ELSE |
---|
7380 | surf_usm_v(l)%surface_types(m) = usm_par(ii+1,jw,iw) |
---|
7381 | surf_usm_v(l)%albedo(:,m) = usm_val(ij,jw,iw) |
---|
7382 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+1,jw,iw) |
---|
7383 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+1,jw,iw) |
---|
7384 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+1,jw,iw) |
---|
7385 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7386 | ENDIF |
---|
7387 | ELSE IF ( kw <= usm_par(ii+2,jw,iw) ) THEN |
---|
7388 | ! |
---|
7389 | !-- wall zone |
---|
7390 | IF ( usm_par(ii+3,jw,iw) == 0 ) THEN |
---|
7391 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface |
---|
7392 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7393 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7394 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7395 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7396 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7397 | ELSE |
---|
7398 | surf_usm_v(l)%surface_types(m) = usm_par(ii+3,jw,iw) |
---|
7399 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+2,jw,iw) |
---|
7400 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+3,jw,iw) |
---|
7401 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+3,jw,iw) |
---|
7402 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+3,jw,iw) |
---|
7403 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7404 | ENDIF |
---|
7405 | ELSE IF ( kw <= usm_par(ii+4,jw,iw) ) THEN |
---|
7406 | ! |
---|
7407 | !-- roof zone |
---|
7408 | IF ( usm_par(ii+5,jw,iw) == 0 ) THEN |
---|
7409 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for roof surface |
---|
7410 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7411 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7412 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7413 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7414 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7415 | ELSE |
---|
7416 | surf_usm_v(l)%surface_types(m) = usm_par(ii+5,jw,iw) |
---|
7417 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+4,jw,iw) |
---|
7418 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+5,jw,iw) |
---|
7419 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+5,jw,iw) |
---|
7420 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+5,jw,iw) |
---|
7421 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7422 | ENDIF |
---|
7423 | ELSE |
---|
7424 | WRITE(9,*) 'Problem reading USM data:' |
---|
7425 | WRITE(9,*) l,i,j,kw,get_topography_top_index_ji( j, i, 's' ) |
---|
7426 | WRITE(9,*) ii,iw,jw,kw,get_topography_top_index_ji( jw, iw, 's' ) |
---|
7427 | WRITE(9,*) usm_par(ii,jw,iw),usm_par(ii+1,jw,iw) |
---|
7428 | WRITE(9,*) usm_par(ii+2,jw,iw),usm_par(ii+3,jw,iw) |
---|
7429 | WRITE(9,*) usm_par(ii+4,jw,iw),usm_par(ii+5,jw,iw) |
---|
7430 | WRITE(9,*) kw,roof_height_limit,wall_category,roof_category |
---|
7431 | FLUSH(9) |
---|
7432 | ! |
---|
7433 | !-- supply the default category |
---|
7434 | IF ( kw <= roof_height_limit ) THEN |
---|
7435 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
7436 | ELSE |
---|
7437 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
7438 | END IF |
---|
7439 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7440 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7441 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7442 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7443 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7444 | ENDIF |
---|
7445 | ! |
---|
7446 | !-- Find the type position |
---|
7447 | it = surf_usm_v(l)%surface_types(m) |
---|
7448 | ip = -99999 |
---|
7449 | DO k = 1, n_surface_types |
---|
7450 | IF ( surface_type_codes(k) == it ) THEN |
---|
7451 | ip = k |
---|
7452 | EXIT |
---|
7453 | ENDIF |
---|
7454 | ENDDO |
---|
7455 | IF ( ip == -99999 ) THEN |
---|
7456 | ! |
---|
7457 | !-- wall category not found |
---|
7458 | WRITE (9, "(A,I7,A,3I5)") 'wall category ', it, & |
---|
7459 | ' not found for i,j,k=', iw,jw,kw |
---|
7460 | FLUSH(9) |
---|
7461 | category = wall_category |
---|
7462 | DO k = 1, n_surface_types |
---|
7463 | IF ( surface_type_codes(k) == category ) THEN |
---|
7464 | ip = k |
---|
7465 | EXIT |
---|
7466 | ENDIF |
---|
7467 | ENDDO |
---|
7468 | IF ( ip == -99999 ) THEN |
---|
7469 | ! |
---|
7470 | !-- default wall category not found |
---|
7471 | WRITE (9, "(A,I5,A,3I5)") 'Default wall category', category, ' not found!' |
---|
7472 | FLUSH(9) |
---|
7473 | ip = 1 |
---|
7474 | ENDIF |
---|
7475 | ENDIF |
---|
7476 | |
---|
7477 | ! |
---|
7478 | !-- Albedo |
---|
7479 | IF ( surf_usm_v(l)%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
7480 | surf_usm_v(l)%albedo(:,m) = surface_params(ialbedo,ip) |
---|
7481 | ENDIF |
---|
7482 | !-- Albedo type is 0 (custom), others are replaced later |
---|
7483 | surf_usm_v(l)%albedo_type(:,m) = 0 |
---|
7484 | !-- Transmissivity of the windows |
---|
7485 | IF ( surf_usm_v(l)%transmissivity(m) < 0.0_wp ) THEN |
---|
7486 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7487 | ENDIF |
---|
7488 | ! |
---|
7489 | !-- emissivity of the wall |
---|
7490 | surf_usm_v(l)%emissivity(:,m) = surface_params(iemiss,ip) |
---|
7491 | ! |
---|
7492 | !-- heat conductivity lambda S between air and wall ( W m-2 K-1 ) |
---|
7493 | surf_usm_v(l)%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
7494 | surf_usm_v(l)%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
7495 | surf_usm_v(l)%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
7496 | ! |
---|
7497 | !-- roughness length |
---|
7498 | surf_usm_v(l)%z0(m) = surface_params(irough,ip) |
---|
7499 | surf_usm_v(l)%z0h(m) = surface_params(iroughh,ip) |
---|
7500 | surf_usm_v(l)%z0q(m) = surface_params(iroughh,ip) |
---|
7501 | ! |
---|
7502 | !-- Surface skin layer heat capacity (J m-2 K-1 ) |
---|
7503 | surf_usm_v(l)%c_surface(m) = surface_params(icsurf,ip) |
---|
7504 | surf_usm_v(l)%c_surface_window(m) = surface_params(icsurf,ip) |
---|
7505 | surf_usm_v(l)%c_surface_green(m) = surface_params(icsurf,ip) |
---|
7506 | ! |
---|
7507 | !-- wall material parameters: |
---|
7508 | !-- thickness of the wall (m) |
---|
7509 | !-- missing values are replaced by default value for category |
---|
7510 | IF ( surf_usm_v(l)%thickness_wall(m) <= 0.001_wp ) THEN |
---|
7511 | surf_usm_v(l)%thickness_wall(m) = surface_params(ithick,ip) |
---|
7512 | ENDIF |
---|
7513 | IF ( surf_usm_v(l)%thickness_window(m) <= 0.001_wp ) THEN |
---|
7514 | surf_usm_v(l)%thickness_window(m) = surface_params(ithick,ip) |
---|
7515 | ENDIF |
---|
7516 | IF ( surf_usm_v(l)%thickness_green(m) <= 0.001_wp ) THEN |
---|
7517 | surf_usm_v(l)%thickness_green(m) = surface_params(ithick,ip) |
---|
7518 | ENDIF |
---|
7519 | ! |
---|
7520 | !-- volumetric heat capacity rho*C of the wall ( J m-3 K-1 ) |
---|
7521 | surf_usm_v(l)%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
7522 | surf_usm_v(l)%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
7523 | surf_usm_v(l)%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
7524 | ! |
---|
7525 | !-- thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
7526 | surf_usm_v(l)%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
7527 | surf_usm_v(l)%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
7528 | surf_usm_v(l)%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
7529 | |
---|
7530 | ENDDO |
---|
7531 | ENDDO |
---|
7532 | |
---|
7533 | ! |
---|
7534 | !-- Initialize wall layer thicknesses. Please note, this will be removed |
---|
7535 | !-- after migration to Palm input data standard. |
---|
7536 | DO k = nzb_wall, nzt_wall |
---|
7537 | zwn(k) = zwn_default(k) |
---|
7538 | zwn_green(k) = zwn_default_green(k) |
---|
7539 | zwn_window(k) = zwn_default_window(k) |
---|
7540 | ENDDO |
---|
7541 | ! |
---|
7542 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
7543 | DO m = 1, surf_usm_h%ns |
---|
7544 | surf_usm_h%zw(:,m) = zwn(:) * surf_usm_h%thickness_wall(m) |
---|
7545 | surf_usm_h%zw_green(:,m) = zwn_green(:) * surf_usm_h%thickness_green(m) |
---|
7546 | surf_usm_h%zw_window(:,m) = zwn_window(:) * surf_usm_h%thickness_window(m) |
---|
7547 | ENDDO |
---|
7548 | DO l = 0, 3 |
---|
7549 | DO m = 1, surf_usm_v(l)%ns |
---|
7550 | surf_usm_v(l)%zw(:,m) = zwn(:) * surf_usm_v(l)%thickness_wall(m) |
---|
7551 | surf_usm_v(l)%zw_green(:,m) = zwn_green(:) * surf_usm_v(l)%thickness_green(m) |
---|
7552 | surf_usm_v(l)%zw_window(:,m) = zwn_window(:) * surf_usm_v(l)%thickness_window(m) |
---|
7553 | ENDDO |
---|
7554 | ENDDO |
---|
7555 | |
---|
7556 | |
---|
7557 | WRITE(9,*) 'Urban surfaces read' |
---|
7558 | FLUSH(9) |
---|
7559 | |
---|
7560 | CALL location_message( ' types and parameters of urban surfaces read', .TRUE. ) |
---|
7561 | |
---|
7562 | END SUBROUTINE usm_read_urban_surface_types |
---|
7563 | |
---|
7564 | |
---|
7565 | !------------------------------------------------------------------------------! |
---|
7566 | ! Description: |
---|
7567 | ! ------------ |
---|
7568 | ! |
---|
7569 | !> This function advances through the list of local surfaces to find given |
---|
7570 | !> x, y, d, z coordinates |
---|
7571 | !------------------------------------------------------------------------------! |
---|
7572 | PURE FUNCTION find_surface( x, y, z, d ) result(isurfl) |
---|
7573 | |
---|
7574 | INTEGER(iwp), INTENT(in) :: x, y, z, d |
---|
7575 | INTEGER(iwp) :: isurfl |
---|
7576 | INTEGER(iwp) :: isx, isy, isz |
---|
7577 | |
---|
7578 | IF ( d == 0 ) THEN |
---|
7579 | DO isurfl = 1, surf_usm_h%ns |
---|
7580 | isx = surf_usm_h%i(isurfl) |
---|
7581 | isy = surf_usm_h%j(isurfl) |
---|
7582 | isz = surf_usm_h%k(isurfl) |
---|
7583 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
7584 | ENDDO |
---|
7585 | ELSE |
---|
7586 | DO isurfl = 1, surf_usm_v(d-1)%ns |
---|
7587 | isx = surf_usm_v(d-1)%i(isurfl) |
---|
7588 | isy = surf_usm_v(d-1)%j(isurfl) |
---|
7589 | isz = surf_usm_v(d-1)%k(isurfl) |
---|
7590 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
7591 | ENDDO |
---|
7592 | ENDIF |
---|
7593 | ! |
---|
7594 | !-- coordinate not found |
---|
7595 | isurfl = -1 |
---|
7596 | |
---|
7597 | END FUNCTION |
---|
7598 | |
---|
7599 | |
---|
7600 | !------------------------------------------------------------------------------! |
---|
7601 | ! Description: |
---|
7602 | ! ------------ |
---|
7603 | ! |
---|
7604 | !> This subroutine reads temperatures of respective material layers in walls, |
---|
7605 | !> roofs and ground from input files. Data in the input file must be in |
---|
7606 | !> standard order, i.e. horizontal surfaces first ordered by x, y and then |
---|
7607 | !> vertical surfaces ordered by x, y, direction, z |
---|
7608 | !------------------------------------------------------------------------------! |
---|
7609 | SUBROUTINE usm_read_wall_temperature |
---|
7610 | |
---|
7611 | INTEGER(iwp) :: i, j, k, d, ii, iline !> running indices |
---|
7612 | INTEGER(iwp) :: isurfl |
---|
7613 | REAL(wp) :: rtsurf |
---|
7614 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: rtwall |
---|
7615 | |
---|
7616 | |
---|
7617 | DO ii = 0, io_blocks-1 |
---|
7618 | IF ( ii == io_group ) THEN |
---|
7619 | ! |
---|
7620 | !-- open wall temperature file |
---|
7621 | OPEN( 152, file='WALL_TEMPERATURE'//coupling_char, action='read', & |
---|
7622 | status='old', form='formatted', err=15 ) |
---|
7623 | |
---|
7624 | isurfl = 0 |
---|
7625 | iline = 1 |
---|
7626 | DO |
---|
7627 | rtwall = -9999.0_wp !< for incomplete lines |
---|
7628 | READ( 152, *, err=13, end=14 ) i, j, k, d, rtsurf, rtwall |
---|
7629 | |
---|
7630 | IF ( nxl <= i .and. i <= nxr .and. & |
---|
7631 | nys <= j .and. j <= nyn) THEN !< local processor |
---|
7632 | !-- identify surface id |
---|
7633 | isurfl = find_surface( i, j, k, d ) |
---|
7634 | IF ( isurfl == -1 ) THEN |
---|
7635 | WRITE(message_string, '(a,4i5,a,i5,a)') 'Coordinates (xyzd) ', i, j, k, d, & |
---|
7636 | ' on line ', iline, & |
---|
7637 | ' in file WALL_TEMPERATURE are either not present or out of standard order of surfaces.' |
---|
7638 | CALL message( 'usm_read_wall_temperature', 'PA0521', 1, 2, 0, 6, 0 ) |
---|
7639 | ENDIF |
---|
7640 | ! |
---|
7641 | !-- assign temperatures |
---|
7642 | IF ( d == 0 ) THEN |
---|
7643 | t_surf_wall_h(isurfl) = rtsurf |
---|
7644 | t_wall_h(:,isurfl) = rtwall(:) |
---|
7645 | t_window_h(:,isurfl) = rtwall(:) |
---|
7646 | t_green_h(:,isurfl) = rtwall(:) |
---|
7647 | ELSE |
---|
7648 | t_surf_wall_v(d-1)%t(isurfl) = rtsurf |
---|
7649 | t_wall_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
7650 | t_window_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
7651 | t_green_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
7652 | ENDIF |
---|
7653 | ENDIF |
---|
7654 | |
---|
7655 | iline = iline + 1 |
---|
7656 | CYCLE |
---|
7657 | 13 WRITE(message_string, '(a,i5,a)') 'Error reading line ', iline, & |
---|
7658 | ' in file WALL_TEMPERATURE.' |
---|
7659 | CALL message( 'usm_read_wall_temperature', 'PA0522', 1, 2, 0, 6, 0 ) |
---|
7660 | ENDDO |
---|
7661 | 14 CLOSE(152) |
---|
7662 | CYCLE |
---|
7663 | 15 message_string = 'file WALL_TEMPERATURE'//TRIM(coupling_char)//' does not exist' |
---|
7664 | CALL message( 'usm_read_wall_temperature', 'PA0523', 1, 2, 0, 6, 0 ) |
---|
7665 | ENDIF |
---|
7666 | #if defined( __parallel ) |
---|
7667 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7668 | #endif |
---|
7669 | ENDDO |
---|
7670 | |
---|
7671 | CALL location_message( ' wall layer temperatures read', .TRUE. ) |
---|
7672 | |
---|
7673 | END SUBROUTINE usm_read_wall_temperature |
---|
7674 | |
---|
7675 | |
---|
7676 | |
---|
7677 | !------------------------------------------------------------------------------! |
---|
7678 | ! Description: |
---|
7679 | ! ------------ |
---|
7680 | !> Solver for the energy balance at the ground/roof/wall surface. |
---|
7681 | !> It follows basic ideas and structure of lsm_energy_balance |
---|
7682 | !> with many simplifications and adjustments. |
---|
7683 | !> TODO better description |
---|
7684 | !> No calculation of window surface temperatures during spinup to increase |
---|
7685 | !> maximum possible timstep |
---|
7686 | !------------------------------------------------------------------------------! |
---|
7687 | SUBROUTINE usm_surface_energy_balance( spinup ) |
---|
7688 | |
---|
7689 | |
---|
7690 | IMPLICIT NONE |
---|
7691 | |
---|
7692 | INTEGER(iwp) :: i, j, k, l, m !< running indices |
---|
7693 | |
---|
7694 | INTEGER(iwp) :: i_off !< offset to determine index of surface element, seen from atmospheric grid point, for x |
---|
7695 | INTEGER(iwp) :: j_off !< offset to determine index of surface element, seen from atmospheric grid point, for y |
---|
7696 | INTEGER(iwp) :: k_off !< offset to determine index of surface element, seen from atmospheric grid point, for z |
---|
7697 | |
---|
7698 | LOGICAL :: spinup !true during spinup |
---|
7699 | |
---|
7700 | REAL(wp) :: stend_wall !< surface tendency |
---|
7701 | |
---|
7702 | REAL(wp) :: stend_window !< surface tendency |
---|
7703 | REAL(wp) :: stend_green !< surface tendency |
---|
7704 | REAL(wp) :: coef_1 !< first coeficient for prognostic equation |
---|
7705 | REAL(wp) :: coef_window_1 !< first coeficient for prognostic window equation |
---|
7706 | REAL(wp) :: coef_green_1 !< first coeficient for prognostic green wall equation |
---|
7707 | REAL(wp) :: coef_2 !< second coeficient for prognostic equation |
---|
7708 | REAL(wp) :: coef_window_2 !< second coeficient for prognostic window equation |
---|
7709 | REAL(wp) :: coef_green_2 !< second coeficient for prognostic green wall equation |
---|
7710 | REAL(wp) :: rho_cp !< rho_wall_surface * c_p |
---|
7711 | REAL(wp) :: f_shf !< factor for shf_eb |
---|
7712 | REAL(wp) :: f_shf_window !< factor for shf_eb window |
---|
7713 | REAL(wp) :: f_shf_green !< factor for shf_eb green wall |
---|
7714 | REAL(wp) :: lambda_surface !< current value of lambda_surface (heat conductivity |
---|
7715 | !<between air and wall) |
---|
7716 | REAL(wp) :: lambda_surface_window !< current value of lambda_surface (heat conductivity |
---|
7717 | !< between air and window) |
---|
7718 | REAL(wp) :: lambda_surface_green !< current value of lambda_surface (heat conductivity |
---|
7719 | !< between air and greeb wall) |
---|
7720 | |
---|
7721 | REAL(wp) :: dtime !< simulated time of day (in UTC) |
---|
7722 | INTEGER(iwp) :: dhour !< simulated hour of day (in UTC) |
---|
7723 | REAL(wp) :: acoef !< actual coefficient of diurnal profile of anthropogenic heat |
---|
7724 | REAL(wp) :: f1, & !< resistance correction term 1 |
---|
7725 | f2, & !< resistance correction term 2 |
---|
7726 | f3, & !< resistance correction term 3 |
---|
7727 | e, & !< water vapour pressure |
---|
7728 | e_s, & !< water vapour saturation pressure |
---|
7729 | e_s_dt, & !< derivate of e_s with respect to T |
---|
7730 | tend, & !< tendency |
---|
7731 | dq_s_dt, & !< derivate of q_s with respect to T |
---|
7732 | f_qsws, & !< factor for qsws |
---|
7733 | f_qsws_veg, & !< factor for qsws_veg |
---|
7734 | f_qsws_liq, & !< factor for qsws_liq |
---|
7735 | m_liq_max, & !< maxmimum value of the liq. water reservoir |
---|
7736 | qv1, & !< specific humidity at first grid level |
---|
7737 | m_max_depth = 0.0002_wp, & !< Maximum capacity of the water reservoir (m) |
---|
7738 | rho_lv, & !< frequently used parameter for green layers |
---|
7739 | drho_l_lv, & !< frequently used parameter for green layers |
---|
7740 | q_s !< saturation specific humidity |
---|
7741 | |
---|
7742 | ! |
---|
7743 | !-- Index offset of surface element point with respect to adjoining |
---|
7744 | !-- atmospheric grid point |
---|
7745 | k_off = surf_usm_h%koff |
---|
7746 | j_off = surf_usm_h%joff |
---|
7747 | i_off = surf_usm_h%ioff |
---|
7748 | |
---|
7749 | ! |
---|
7750 | !-- First, treat horizontal surface elements |
---|
7751 | DO m = 1, surf_usm_h%ns |
---|
7752 | ! |
---|
7753 | !-- Get indices of respective grid point |
---|
7754 | i = surf_usm_h%i(m) |
---|
7755 | j = surf_usm_h%j(m) |
---|
7756 | k = surf_usm_h%k(m) |
---|
7757 | ! |
---|
7758 | !-- TODO - how to calculate lambda_surface for horizontal surfaces |
---|
7759 | !-- (lambda_surface is set according to stratification in land surface model) |
---|
7760 | !-- MS: ??? |
---|
7761 | IF ( surf_usm_h%ol(m) >= 0.0_wp ) THEN |
---|
7762 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
7763 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
7764 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
7765 | ELSE |
---|
7766 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
7767 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
7768 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
7769 | ENDIF |
---|
7770 | |
---|
7771 | ! pt1 = pt(k,j,i) |
---|
7772 | IF ( humidity ) THEN |
---|
7773 | qv1 = q(k,j,i) |
---|
7774 | ELSE |
---|
7775 | qv1 = 0.0_wp |
---|
7776 | ENDIF |
---|
7777 | ! |
---|
7778 | !-- calculate rho * c_p coefficient at surface layer |
---|
7779 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_h%pt1(m) * exner(k) ) |
---|
7780 | |
---|
7781 | IF ( surf_usm_h%frac(ind_pav_green,m) > 0.0_wp ) THEN |
---|
7782 | ! |
---|
7783 | !-- Calculate frequently used parameters |
---|
7784 | rho_lv = rho_cp / c_p * l_v |
---|
7785 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
7786 | ENDIF |
---|
7787 | |
---|
7788 | ! |
---|
7789 | !-- Calculate aerodyamic resistance. |
---|
7790 | !-- Calculation for horizontal surfaces follows LSM formulation |
---|
7791 | !-- pt, us, ts are not available for the prognostic time step, |
---|
7792 | !-- data from the last time step is used here. |
---|
7793 | ! |
---|
7794 | !-- Workaround: use single r_a as stability is only treated for the |
---|
7795 | !-- average temperature |
---|
7796 | surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /& |
---|
7797 | ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7798 | surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m) |
---|
7799 | surf_usm_h%r_a_green(m) = surf_usm_h%r_a(m) |
---|
7800 | |
---|
7801 | ! r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exner(k) ) / & |
---|
7802 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7803 | ! r_a_window = ( surf_usm_h%pt1(m) - t_surf_window_h(m) / exner(k) ) / & |
---|
7804 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7805 | ! r_a_green = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
7806 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7807 | |
---|
7808 | !-- Make sure that the resistance does not drop to zero |
---|
7809 | IF ( surf_usm_h%r_a(m) < 1.0_wp ) & |
---|
7810 | surf_usm_h%r_a(m) = 1.0_wp |
---|
7811 | IF ( surf_usm_h%r_a_green(m) < 1.0_wp ) & |
---|
7812 | surf_usm_h%r_a_green(m) = 1.0_wp |
---|
7813 | IF ( surf_usm_h%r_a_window(m) < 1.0_wp ) & |
---|
7814 | surf_usm_h%r_a_window(m) = 1.0_wp |
---|
7815 | |
---|
7816 | ! |
---|
7817 | !-- Make sure that the resistacne does not exceed a maxmium value in case |
---|
7818 | !-- of zero velocities |
---|
7819 | IF ( surf_usm_h%r_a(m) > 300.0_wp ) & |
---|
7820 | surf_usm_h%r_a(m) = 300.0_wp |
---|
7821 | IF ( surf_usm_h%r_a_green(m) > 300.0_wp ) & |
---|
7822 | surf_usm_h%r_a_green(m) = 300.0_wp |
---|
7823 | IF ( surf_usm_h%r_a_window(m) > 300.0_wp ) & |
---|
7824 | surf_usm_h%r_a_window(m) = 300.0_wp |
---|
7825 | |
---|
7826 | ! |
---|
7827 | !-- factor for shf_eb |
---|
7828 | f_shf = rho_cp / surf_usm_h%r_a(m) |
---|
7829 | f_shf_window = rho_cp / surf_usm_h%r_a_window(m) |
---|
7830 | f_shf_green = rho_cp / surf_usm_h%r_a_green(m) |
---|
7831 | |
---|
7832 | |
---|
7833 | IF ( surf_usm_h%frac(ind_pav_green,m) > 0.0_wp ) THEN |
---|
7834 | !-- Adapted from LSM: |
---|
7835 | !-- Second step: calculate canopy resistance r_canopy |
---|
7836 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
7837 | |
---|
7838 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
7839 | !-- night) |
---|
7840 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_h%rad_sw_in(m) + 0.05_wp ) / & |
---|
7841 | (0.81_wp * (0.004_wp * surf_usm_h%rad_sw_in(m) & |
---|
7842 | + 1.0_wp)) ) |
---|
7843 | ! |
---|
7844 | !-- f2: correction for soil moisture availability to plants (the |
---|
7845 | !-- integrated soil moisture must thus be considered here) |
---|
7846 | !-- f2 = 0 for very dry soils |
---|
7847 | m_total = 0.0_wp |
---|
7848 | DO k = nzb_wall, nzt_wall+1 |
---|
7849 | m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
7850 | * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
7851 | ENDDO |
---|
7852 | |
---|
7853 | IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
7854 | f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
7855 | ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
7856 | f2 = 1.0_wp |
---|
7857 | ELSE |
---|
7858 | f2 = 1.0E-20_wp |
---|
7859 | ENDIF |
---|
7860 | |
---|
7861 | ! |
---|
7862 | !-- Calculate water vapour pressure at saturation |
---|
7863 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_h(m) & |
---|
7864 | - 273.16_wp ) / ( t_surf_green_h(m) - 35.86_wp ) ) |
---|
7865 | ! |
---|
7866 | !-- f3: correction for vapour pressure deficit |
---|
7867 | IF ( surf_usm_h%g_d(m) /= 0.0_wp ) THEN |
---|
7868 | ! |
---|
7869 | !-- Calculate vapour pressure |
---|
7870 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
7871 | f3 = EXP ( - surf_usm_h%g_d(m) * (e_s - e) ) |
---|
7872 | ELSE |
---|
7873 | f3 = 1.0_wp |
---|
7874 | ENDIF |
---|
7875 | |
---|
7876 | ! |
---|
7877 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
7878 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
7879 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
7880 | surf_usm_h%r_canopy(m) = surf_usm_h%r_canopy_min(m) / & |
---|
7881 | ( surf_usm_h%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
7882 | |
---|
7883 | ! |
---|
7884 | !-- Calculate the maximum possible liquid water amount on plants and |
---|
7885 | !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
7886 | !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
7887 | !-- liquid water fraction for paved surfaces is calculated after |
---|
7888 | !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
7889 | !-- vegetated surfaces and bare soils. |
---|
7890 | m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
7891 | surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
7892 | ! |
---|
7893 | !-- Calculate saturation specific humidity |
---|
7894 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
7895 | ! |
---|
7896 | !-- In case of dewfall, set evapotranspiration to zero |
---|
7897 | !-- All super-saturated water is then removed from the air |
---|
7898 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
7899 | surf_usm_h%r_canopy(m) = 0.0_wp |
---|
7900 | ENDIF |
---|
7901 | |
---|
7902 | ! |
---|
7903 | !-- Calculate coefficients for the total evapotranspiration |
---|
7904 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
7905 | !-- For pavements, only evaporation of liquid water is possible. |
---|
7906 | f_qsws_veg = rho_lv * & |
---|
7907 | ( 1.0_wp - surf_usm_h%c_liq(m) ) / & |
---|
7908 | ( surf_usm_h%r_a_green(m) + surf_usm_h%r_canopy(m) ) |
---|
7909 | f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
7910 | surf_usm_h%r_a_green(m) |
---|
7911 | |
---|
7912 | f_qsws = f_qsws_veg + f_qsws_liq |
---|
7913 | ! |
---|
7914 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
7915 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_h(m) - 35.86_wp) - & |
---|
7916 | 17.269_wp*( t_surf_green_h(m) - 273.16_wp) & |
---|
7917 | / ( t_surf_green_h(m) - 35.86_wp)**2 ) |
---|
7918 | |
---|
7919 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
7920 | ENDIF |
---|
7921 | ! |
---|
7922 | !-- add LW up so that it can be removed in prognostic equation |
---|
7923 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_sw_in(m) - & |
---|
7924 | surf_usm_h%rad_sw_out(m) + & |
---|
7925 | surf_usm_h%rad_lw_in(m) - & |
---|
7926 | surf_usm_h%rad_lw_out(m) |
---|
7927 | ! |
---|
7928 | !-- numerator of the prognostic equation |
---|
7929 | !-- Todo: Adjust to tile approach. So far, emissivity for wall (element 0) |
---|
7930 | !-- is used |
---|
7931 | coef_1 = surf_usm_h%rad_net_l(m) + & |
---|
7932 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
7933 | sigma_sb * t_surf_wall_h(m) ** 4 + & |
---|
7934 | f_shf * surf_usm_h%pt1(m) + & |
---|
7935 | lambda_surface * t_wall_h(nzb_wall,m) |
---|
7936 | IF ( ( .NOT. spinup ) .AND. (surf_usm_h%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
7937 | coef_window_1 = surf_usm_h%rad_net_l(m) + & |
---|
7938 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_wat_win,m) & |
---|
7939 | * sigma_sb * t_surf_window_h(m) ** 4 + & |
---|
7940 | f_shf_window * surf_usm_h%pt1(m) + & |
---|
7941 | lambda_surface_window * t_window_h(nzb_wall,m) |
---|
7942 | ENDIF |
---|
7943 | IF ( ( humidity ) .AND. ( surf_usm_h%frac(ind_pav_green,m) > 0.0_wp ) ) THEN |
---|
7944 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
7945 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
7946 | t_surf_green_h(m) ** 4 + & |
---|
7947 | f_shf_green * surf_usm_h%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
7948 | + dq_s_dt * t_surf_green_h(m) ) & |
---|
7949 | +lambda_surface_green * t_green_h(nzb_wall,m) |
---|
7950 | ELSE |
---|
7951 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
7952 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) *& |
---|
7953 | sigma_sb * t_surf_green_h(m) ** 4 + & |
---|
7954 | f_shf_green * surf_usm_h%pt1(m) + & |
---|
7955 | lambda_surface_green * t_green_h(nzb_wall,m) |
---|
7956 | ENDIF |
---|
7957 | ! |
---|
7958 | !-- denominator of the prognostic equation |
---|
7959 | coef_2 = 4.0_wp * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
7960 | sigma_sb * t_surf_wall_h(m) ** 3 & |
---|
7961 | + lambda_surface + f_shf / exner(k) |
---|
7962 | IF ( ( .NOT. spinup ) .AND. ( surf_usm_h%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
7963 | coef_window_2 = 4.0_wp * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
7964 | sigma_sb * t_surf_window_h(m) ** 3 & |
---|
7965 | + lambda_surface_window + f_shf_window / exner(k) |
---|
7966 | ENDIF |
---|
7967 | IF ( ( humidity ) .AND. ( surf_usm_h%frac(ind_pav_green,m) > 0.0_wp ) ) THEN |
---|
7968 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
7969 | t_surf_green_h(m) ** 3 + f_qsws * dq_s_dt & |
---|
7970 | + lambda_surface_green + f_shf_green / exner(k) |
---|
7971 | ELSE |
---|
7972 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
7973 | t_surf_green_h(m) ** 3 & |
---|
7974 | + lambda_surface_green + f_shf_green / exner(k) |
---|
7975 | ENDIF |
---|
7976 | ! |
---|
7977 | !-- implicit solution when the surface layer has no heat capacity, |
---|
7978 | !-- otherwise use RK3 scheme. |
---|
7979 | t_surf_wall_h_p(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
7980 | surf_usm_h%c_surface(m) * t_surf_wall_h(m) ) / & |
---|
7981 | ( surf_usm_h%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
7982 | IF ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m) > 0.0_wp)) THEN |
---|
7983 | t_surf_window_h_p(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
7984 | surf_usm_h%c_surface_window(m) * t_surf_window_h(m) ) / & |
---|
7985 | ( surf_usm_h%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
7986 | ENDIF |
---|
7987 | t_surf_green_h_p(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
7988 | surf_usm_h%c_surface_green(m) * t_surf_green_h(m) ) / & |
---|
7989 | ( surf_usm_h%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
7990 | ! |
---|
7991 | !-- add RK3 term |
---|
7992 | t_surf_wall_h_p(m) = t_surf_wall_h_p(m) + dt_3d * tsc(3) * & |
---|
7993 | surf_usm_h%tt_surface_wall_m(m) |
---|
7994 | |
---|
7995 | t_surf_window_h_p(m) = t_surf_window_h_p(m) + dt_3d * tsc(3) * & |
---|
7996 | surf_usm_h%tt_surface_window_m(m) |
---|
7997 | |
---|
7998 | t_surf_green_h_p(m) = t_surf_green_h_p(m) + dt_3d * tsc(3) * & |
---|
7999 | surf_usm_h%tt_surface_green_m(m) |
---|
8000 | ! |
---|
8001 | !-- Store surface temperature on pt_surface. Further, in case humidity is used |
---|
8002 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
8003 | !-- assumed to be the surface temperature. |
---|
8004 | surf_usm_h%pt_surface(m) = ( surf_usm_h%frac(ind_veg_wall,m) * t_surf_wall_h_p(m) & |
---|
8005 | + surf_usm_h%frac(ind_wat_win,m) * t_surf_window_h_p(m) & |
---|
8006 | + surf_usm_h%frac(ind_pav_green,m) * t_surf_green_h_p(m) ) & |
---|
8007 | / exner(k) |
---|
8008 | |
---|
8009 | IF ( humidity ) surf_usm_h%vpt_surface(m) = & |
---|
8010 | surf_usm_h%pt_surface(m) |
---|
8011 | ! |
---|
8012 | !-- calculate true tendency |
---|
8013 | stend_wall = ( t_surf_wall_h_p(m) - t_surf_wall_h(m) - dt_3d * tsc(3) * & |
---|
8014 | surf_usm_h%tt_surface_wall_m(m)) / ( dt_3d * tsc(2) ) |
---|
8015 | stend_window = ( t_surf_window_h_p(m) - t_surf_window_h(m) - dt_3d * tsc(3) * & |
---|
8016 | surf_usm_h%tt_surface_window_m(m)) / ( dt_3d * tsc(2) ) |
---|
8017 | stend_green = ( t_surf_green_h_p(m) - t_surf_green_h(m) - dt_3d * tsc(3) * & |
---|
8018 | surf_usm_h%tt_surface_green_m(m)) / ( dt_3d * tsc(2) ) |
---|
8019 | ! |
---|
8020 | !-- calculate t_surf tendencies for the next Runge-Kutta step |
---|
8021 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
8022 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
8023 | surf_usm_h%tt_surface_wall_m(m) = stend_wall |
---|
8024 | surf_usm_h%tt_surface_window_m(m) = stend_window |
---|
8025 | surf_usm_h%tt_surface_green_m(m) = stend_green |
---|
8026 | ELSEIF ( intermediate_timestep_count < & |
---|
8027 | intermediate_timestep_count_max ) THEN |
---|
8028 | surf_usm_h%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
8029 | 5.3125_wp * surf_usm_h%tt_surface_wall_m(m) |
---|
8030 | surf_usm_h%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
8031 | 5.3125_wp * surf_usm_h%tt_surface_window_m(m) |
---|
8032 | surf_usm_h%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
8033 | 5.3125_wp * surf_usm_h%tt_surface_green_m(m) |
---|
8034 | ENDIF |
---|
8035 | ENDIF |
---|
8036 | ! |
---|
8037 | !-- in case of fast changes in the skin temperature, it is required to |
---|
8038 | !-- update the radiative fluxes in order to keep the solution stable |
---|
8039 | IF ( ( ( ABS( t_surf_wall_h_p(m) - t_surf_wall_h(m) ) > 1.0_wp ) .OR. & |
---|
8040 | ( ABS( t_surf_green_h_p(m) - t_surf_green_h(m) ) > 1.0_wp ) .OR. & |
---|
8041 | ( ABS( t_surf_window_h_p(m) - t_surf_window_h(m) ) > 1.0_wp ) ) & |
---|
8042 | .AND. unscheduled_radiation_calls ) THEN |
---|
8043 | force_radiation_call_l = .TRUE. |
---|
8044 | ENDIF |
---|
8045 | ! |
---|
8046 | !-- calculate fluxes |
---|
8047 | !-- rad_net_l is never used! |
---|
8048 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_net_l(m) + & |
---|
8049 | surf_usm_h%frac(ind_veg_wall,m) * & |
---|
8050 | sigma_sb * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
8051 | ( t_surf_wall_h_p(m)**4 - t_surf_wall_h(m)**4 ) & |
---|
8052 | + surf_usm_h%frac(ind_wat_win,m) * & |
---|
8053 | sigma_sb * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
8054 | ( t_surf_window_h_p(m)**4 - t_surf_window_h(m)**4 ) & |
---|
8055 | + surf_usm_h%frac(ind_pav_green,m) * & |
---|
8056 | sigma_sb * surf_usm_h%emissivity(ind_pav_green,m) * & |
---|
8057 | ( t_surf_green_h_p(m)**4 - t_surf_green_h(m)**4 ) |
---|
8058 | |
---|
8059 | surf_usm_h%wghf_eb(m) = lambda_surface * & |
---|
8060 | ( t_surf_wall_h_p(m) - t_wall_h(nzb_wall,m) ) |
---|
8061 | surf_usm_h%wghf_eb_green(m) = lambda_surface_green * & |
---|
8062 | ( t_surf_green_h_p(m) - t_green_h(nzb_wall,m) ) |
---|
8063 | surf_usm_h%wghf_eb_window(m) = lambda_surface_window * & |
---|
8064 | ( t_surf_window_h_p(m) - t_window_h(nzb_wall,m) ) |
---|
8065 | |
---|
8066 | ! |
---|
8067 | !-- ground/wall/roof surface heat flux |
---|
8068 | surf_usm_h%wshf_eb(m) = - f_shf * ( surf_usm_h%pt1(m) - t_surf_wall_h_p(m) / exner(k) ) * & |
---|
8069 | surf_usm_h%frac(ind_veg_wall,m) & |
---|
8070 | - f_shf_window * ( surf_usm_h%pt1(m) - t_surf_window_h_p(m) / exner(k) ) * & |
---|
8071 | surf_usm_h%frac(ind_wat_win,m) & |
---|
8072 | - f_shf_green * ( surf_usm_h%pt1(m) - t_surf_green_h_p(m) / exner(k) ) * & |
---|
8073 | surf_usm_h%frac(ind_pav_green,m) |
---|
8074 | ! |
---|
8075 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
8076 | !-- diffusion_s, surface_layer_fluxes,... |
---|
8077 | surf_usm_h%shf(m) = surf_usm_h%wshf_eb(m) / c_p |
---|
8078 | ! |
---|
8079 | !-- If the indoor model is applied, further add waste heat from buildings to the |
---|
8080 | !-- kinematic flux. |
---|
8081 | IF ( indoor_model ) THEN |
---|
8082 | surf_usm_h%shf(m) = surf_usm_h%shf(m) + surf_usm_h%waste_heat(m) / c_p |
---|
8083 | ENDIF |
---|
8084 | |
---|
8085 | |
---|
8086 | IF (surf_usm_h%frac(ind_pav_green,m) > 0.0_wp) THEN |
---|
8087 | |
---|
8088 | IF ( humidity ) THEN |
---|
8089 | surf_usm_h%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
8090 | * t_surf_green_h(m) - dq_s_dt * & |
---|
8091 | t_surf_green_h_p(m) ) |
---|
8092 | |
---|
8093 | surf_usm_h%qsws(m) = surf_usm_h%qsws_eb(m) / rho_lv |
---|
8094 | |
---|
8095 | surf_usm_h%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
8096 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
8097 | * t_surf_green_h_p(m) ) |
---|
8098 | |
---|
8099 | surf_usm_h%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
8100 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
8101 | * t_surf_green_h_p(m) ) |
---|
8102 | ENDIF |
---|
8103 | |
---|
8104 | ! |
---|
8105 | !-- Calculate the true surface resistance |
---|
8106 | IF ( .NOT. humidity ) THEN |
---|
8107 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
8108 | ELSE |
---|
8109 | surf_usm_h%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
8110 | * t_surf_green_h(m) - dq_s_dt * & |
---|
8111 | t_surf_green_h_p(m) ) / & |
---|
8112 | (surf_usm_h%qsws(m) + 1.0E-20) - surf_usm_h%r_a_green(m) |
---|
8113 | ENDIF |
---|
8114 | |
---|
8115 | ! |
---|
8116 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
8117 | !-- evaporation of liquid water |
---|
8118 | IF ( humidity ) THEN |
---|
8119 | ! |
---|
8120 | !-- If precipitation is activated, add rain water to qsws_liq |
---|
8121 | !-- and qsws_soil according the the vegetation coverage. |
---|
8122 | !-- precipitation_rate is given in mm. |
---|
8123 | IF ( precipitation ) THEN |
---|
8124 | |
---|
8125 | ! |
---|
8126 | !-- Add precipitation to liquid water reservoir, if possible. |
---|
8127 | !-- Otherwise, add the water to soil. In case of |
---|
8128 | !-- pavements, the exceeding water amount is implicitely removed |
---|
8129 | !-- as runoff as qsws_soil is then not used in the soil model |
---|
8130 | IF ( m_liq_usm_h%var_usm_1d(m) /= m_liq_max ) THEN |
---|
8131 | surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) & |
---|
8132 | + surf_usm_h%frac(ind_pav_green,m) * prr(k+k_off,j+j_off,i+i_off)& |
---|
8133 | * hyrho(k+k_off) & |
---|
8134 | * 0.001_wp * rho_l * l_v |
---|
8135 | ENDIF |
---|
8136 | |
---|
8137 | ENDIF |
---|
8138 | |
---|
8139 | ! |
---|
8140 | !-- If the air is saturated, check the reservoir water level |
---|
8141 | IF ( surf_usm_h%qsws(m) < 0.0_wp ) THEN |
---|
8142 | ! |
---|
8143 | !-- Check if reservoir is full (avoid values > m_liq_max) |
---|
8144 | !-- In that case, qsws_liq goes to qsws_soil. In this |
---|
8145 | !-- case qsws_veg is zero anyway (because c_liq = 1), |
---|
8146 | !-- so that tend is zero and no further check is needed |
---|
8147 | IF ( m_liq_usm_h%var_usm_1d(m) == m_liq_max ) THEN |
---|
8148 | ! surf_usm_h%qsws_soil(m) = surf_usm_h%qsws_soil(m) + surf_usm_h%qsws_liq(m) |
---|
8149 | surf_usm_h%qsws_liq(m) = 0.0_wp |
---|
8150 | ENDIF |
---|
8151 | |
---|
8152 | ! |
---|
8153 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
8154 | !-- let the water enter the liquid water reservoir as dew on the |
---|
8155 | !-- plant |
---|
8156 | IF ( surf_usm_h%qsws_veg(m) < 0.0_wp ) THEN |
---|
8157 | surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) + surf_usm_h%qsws_veg(m) |
---|
8158 | surf_usm_h%qsws_veg(m) = 0.0_wp |
---|
8159 | ENDIF |
---|
8160 | ENDIF |
---|
8161 | |
---|
8162 | surf_usm_h%qsws(m) = surf_usm_h%qsws(m) / l_v |
---|
8163 | |
---|
8164 | tend = - surf_usm_h%qsws_liq(m) * drho_l_lv |
---|
8165 | m_liq_usm_h_p%var_usm_1d(m) = m_liq_usm_h%var_usm_1d(m) + dt_3d * & |
---|
8166 | ( tsc(2) * tend + & |
---|
8167 | tsc(3) * tm_liq_usm_h_m%var_usm_1d(m) ) |
---|
8168 | ! |
---|
8169 | !-- Check if reservoir is overfull -> reduce to maximum |
---|
8170 | !-- (conservation of water is violated here) |
---|
8171 | m_liq_usm_h_p%var_usm_1d(m) = MIN( m_liq_usm_h_p%var_usm_1d(m),m_liq_max ) |
---|
8172 | |
---|
8173 | ! |
---|
8174 | !-- Check if reservoir is empty (avoid values < 0.0) |
---|
8175 | !-- (conservation of water is violated here) |
---|
8176 | m_liq_usm_h_p%var_usm_1d(m) = MAX( m_liq_usm_h_p%var_usm_1d(m), 0.0_wp ) |
---|
8177 | ! |
---|
8178 | !-- Calculate m_liq tendencies for the next Runge-Kutta step |
---|
8179 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
8180 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
8181 | tm_liq_usm_h_m%var_usm_1d(m) = tend |
---|
8182 | ELSEIF ( intermediate_timestep_count < & |
---|
8183 | intermediate_timestep_count_max ) THEN |
---|
8184 | tm_liq_usm_h_m%var_usm_1d(m) = -9.5625_wp * tend + & |
---|
8185 | 5.3125_wp * tm_liq_usm_h_m%var_usm_1d(m) |
---|
8186 | ENDIF |
---|
8187 | ENDIF |
---|
8188 | |
---|
8189 | ENDIF |
---|
8190 | ELSE |
---|
8191 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
8192 | ENDIF |
---|
8193 | |
---|
8194 | ENDDO |
---|
8195 | ! |
---|
8196 | !-- Now, treat vertical surface elements |
---|
8197 | DO l = 0, 3 |
---|
8198 | DO m = 1, surf_usm_v(l)%ns |
---|
8199 | ! |
---|
8200 | !-- Get indices of respective grid point |
---|
8201 | i = surf_usm_v(l)%i(m) |
---|
8202 | j = surf_usm_v(l)%j(m) |
---|
8203 | k = surf_usm_v(l)%k(m) |
---|
8204 | |
---|
8205 | ! |
---|
8206 | !-- TODO - how to calculate lambda_surface for horizontal (??? do you mean verical ???) surfaces |
---|
8207 | !-- (lambda_surface is set according to stratification in land surface model). |
---|
8208 | !-- Please note, for vertical surfaces no ol is defined, since |
---|
8209 | !-- stratification is not considered in this case. |
---|
8210 | lambda_surface = surf_usm_v(l)%lambda_surf(m) |
---|
8211 | lambda_surface_window = surf_usm_v(l)%lambda_surf_window(m) |
---|
8212 | lambda_surface_green = surf_usm_v(l)%lambda_surf_green(m) |
---|
8213 | |
---|
8214 | ! pt1 = pt(k,j,i) |
---|
8215 | IF ( humidity ) THEN |
---|
8216 | qv1 = q(k,j,i) |
---|
8217 | ELSE |
---|
8218 | qv1 = 0.0_wp |
---|
8219 | ENDIF |
---|
8220 | ! |
---|
8221 | !-- calculate rho * c_p coefficient at wall layer |
---|
8222 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_v(l)%pt1(m) * exner(k) ) |
---|
8223 | |
---|
8224 | IF (surf_usm_v(l)%frac(1,m) > 0.0_wp ) THEN |
---|
8225 | ! |
---|
8226 | !-- Calculate frequently used parameters |
---|
8227 | rho_lv = rho_cp / c_p * l_v |
---|
8228 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
8229 | ENDIF |
---|
8230 | |
---|
8231 | !-- Calculation of r_a for vertical surfaces |
---|
8232 | !-- |
---|
8233 | !-- heat transfer coefficient for forced convection along vertical walls |
---|
8234 | !-- follows formulation in TUF3d model (Krayenhoff & Voogt, 2006) |
---|
8235 | !-- |
---|
8236 | !-- H = httc (Tsfc - Tair) |
---|
8237 | !-- httc = rw * (11.8 + 4.2 * Ueff) - 4.0 |
---|
8238 | !-- |
---|
8239 | !-- rw: wall patch roughness relative to 1.0 for concrete |
---|
8240 | !-- Ueff: effective wind speed |
---|
8241 | !-- - 4.0 is a reduction of Rowley et al (1930) formulation based on |
---|
8242 | !-- Cole and Sturrock (1977) |
---|
8243 | !-- |
---|
8244 | !-- Ucan: Canyon wind speed |
---|
8245 | !-- wstar: convective velocity |
---|
8246 | !-- Qs: surface heat flux |
---|
8247 | !-- zH: height of the convective layer |
---|
8248 | !-- wstar = (g/Tcan*Qs*zH)**(1./3.) |
---|
8249 | !-- Effective velocity components must always |
---|
8250 | !-- be defined at scalar grid point. The wall normal component is |
---|
8251 | !-- obtained by simple linear interpolation. ( An alternative would |
---|
8252 | !-- be an logarithmic interpolation. ) |
---|
8253 | !-- Parameter roughness_concrete (default value = 0.001) is used |
---|
8254 | !-- to calculation of roughness relative to concrete |
---|
8255 | surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) / & |
---|
8256 | roughness_concrete * ( 11.8_wp + 4.2_wp * & |
---|
8257 | SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & |
---|
8258 | ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & |
---|
8259 | ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2, & |
---|
8260 | 0.01_wp ) ) & |
---|
8261 | ) - 4.0_wp ) |
---|
8262 | ! |
---|
8263 | !-- Limit aerodynamic resistance |
---|
8264 | IF ( surf_usm_v(l)%r_a(m) < 1.0_wp ) surf_usm_v(l)%r_a(m) = 1.0_wp |
---|
8265 | |
---|
8266 | |
---|
8267 | f_shf = rho_cp / surf_usm_v(l)%r_a(m) |
---|
8268 | f_shf_window = rho_cp / surf_usm_v(l)%r_a(m) |
---|
8269 | f_shf_green = rho_cp / surf_usm_v(l)%r_a(m) |
---|
8270 | |
---|
8271 | |
---|
8272 | IF ( surf_usm_v(l)%frac(1,m) > 0.0_wp ) THEN |
---|
8273 | ! |
---|
8274 | !-- Adapted from LSM: |
---|
8275 | !-- Second step: calculate canopy resistance r_canopy |
---|
8276 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
8277 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
8278 | !-- night) |
---|
8279 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_v(l)%rad_sw_in(m) + 0.05_wp ) / & |
---|
8280 | (0.81_wp * (0.004_wp * surf_usm_v(l)%rad_sw_in(m) & |
---|
8281 | + 1.0_wp)) ) |
---|
8282 | ! |
---|
8283 | !-- f2: correction for soil moisture availability to plants (the |
---|
8284 | !-- integrated soil moisture must thus be considered here) |
---|
8285 | !-- f2 = 0 for very dry soils |
---|
8286 | |
---|
8287 | f2=1.0_wp |
---|
8288 | |
---|
8289 | ! |
---|
8290 | !-- Calculate water vapour pressure at saturation |
---|
8291 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_v_p(l)%t(m) & |
---|
8292 | - 273.16_wp ) / ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) ) |
---|
8293 | ! |
---|
8294 | !-- f3: correction for vapour pressure deficit |
---|
8295 | IF ( surf_usm_v(l)%g_d(m) /= 0.0_wp ) THEN |
---|
8296 | ! |
---|
8297 | !-- Calculate vapour pressure |
---|
8298 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
8299 | f3 = EXP ( - surf_usm_v(l)%g_d(m) * (e_s - e) ) |
---|
8300 | ELSE |
---|
8301 | f3 = 1.0_wp |
---|
8302 | ENDIF |
---|
8303 | ! |
---|
8304 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
8305 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
8306 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
8307 | surf_usm_v(l)%r_canopy(m) = surf_usm_v(l)%r_canopy_min(m) / & |
---|
8308 | ( surf_usm_v(l)%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
8309 | |
---|
8310 | ! |
---|
8311 | !-- Calculate saturation specific humidity |
---|
8312 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
8313 | ! |
---|
8314 | !-- In case of dewfall, set evapotranspiration to zero |
---|
8315 | !-- All super-saturated water is then removed from the air |
---|
8316 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
8317 | surf_usm_v(l)%r_canopy(m) = 0.0_wp |
---|
8318 | ENDIF |
---|
8319 | |
---|
8320 | ! |
---|
8321 | !-- Calculate coefficients for the total evapotranspiration |
---|
8322 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
8323 | !-- For pavements, only evaporation of liquid water is possible. |
---|
8324 | f_qsws_veg = rho_lv * & |
---|
8325 | ( 1.0_wp - 0.0_wp ) / & !surf_usm_h%c_liq(m) ) / & |
---|
8326 | ( surf_usm_v(l)%r_a(m) + surf_usm_v(l)%r_canopy(m) ) |
---|
8327 | ! f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
8328 | ! surf_usm_h%r_a_green(m) |
---|
8329 | |
---|
8330 | f_qsws = f_qsws_veg! + f_qsws_liq |
---|
8331 | ! |
---|
8332 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
8333 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_v_p(l)%t(m) - 35.86_wp) - & |
---|
8334 | 17.269_wp*( t_surf_green_v_p(l)%t(m) - 273.16_wp) & |
---|
8335 | / ( t_surf_green_v_p(l)%t(m) - 35.86_wp)**2 ) |
---|
8336 | |
---|
8337 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
8338 | ENDIF |
---|
8339 | |
---|
8340 | ! |
---|
8341 | !-- add LW up so that it can be removed in prognostic equation |
---|
8342 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%rad_sw_in(m) - & |
---|
8343 | surf_usm_v(l)%rad_sw_out(m) + & |
---|
8344 | surf_usm_v(l)%rad_lw_in(m) - & |
---|
8345 | surf_usm_v(l)%rad_lw_out(m) |
---|
8346 | ! |
---|
8347 | !-- numerator of the prognostic equation |
---|
8348 | coef_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout |
---|
8349 | ! included in calculation of radnet_l |
---|
8350 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_veg_wall,m) * & |
---|
8351 | sigma_sb * t_surf_wall_v(l)%t(m) ** 4 + & |
---|
8352 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
8353 | lambda_surface * t_wall_v(l)%t(nzb_wall,m) |
---|
8354 | IF ( ( .NOT. spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
8355 | coef_window_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout |
---|
8356 | ! included in calculation of radnet_l |
---|
8357 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_wat_win,m) * & |
---|
8358 | sigma_sb * t_surf_window_v(l)%t(m) ** 4 + & |
---|
8359 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
8360 | lambda_surface_window * t_window_v(l)%t(nzb_wall,m) |
---|
8361 | ENDIF |
---|
8362 | IF ( ( humidity ) .AND. ( surf_usm_v(l)%frac(ind_pav_green,m) > 0.0_wp ) ) THEN |
---|
8363 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout |
---|
8364 | ! included in calculation of radnet_l |
---|
8365 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8366 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
8367 | f_shf * surf_usm_v(l)%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
8368 | + dq_s_dt * t_surf_green_v(l)%t(m) ) + & |
---|
8369 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
8370 | ELSE |
---|
8371 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included |
---|
8372 | ! in calculation of radnet_l |
---|
8373 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8374 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
8375 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
8376 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
8377 | ENDIF |
---|
8378 | |
---|
8379 | ! |
---|
8380 | !-- denominator of the prognostic equation |
---|
8381 | coef_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_veg_wall,m) * sigma_sb * & |
---|
8382 | t_surf_wall_v(l)%t(m) ** 3 & |
---|
8383 | + lambda_surface + f_shf / exner(k) |
---|
8384 | IF ( ( .NOT. spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
8385 | coef_window_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_wat_win,m) * sigma_sb * & |
---|
8386 | t_surf_window_v(l)%t(m) ** 3 & |
---|
8387 | + lambda_surface_window + f_shf / exner(k) |
---|
8388 | ENDIF |
---|
8389 | IF ( ( humidity ) .AND. ( surf_usm_v(l)%frac(ind_pav_green,m) > 0.0_wp ) ) THEN |
---|
8390 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8391 | t_surf_green_v(l)%t(m) ** 3 + f_qsws * dq_s_dt & |
---|
8392 | + lambda_surface_green + f_shf / exner(k) |
---|
8393 | ELSE |
---|
8394 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8395 | t_surf_green_v(l)%t(m) ** 3 & |
---|
8396 | + lambda_surface_green + f_shf / exner(k) |
---|
8397 | ENDIF |
---|
8398 | ! |
---|
8399 | !-- implicit solution when the surface layer has no heat capacity, |
---|
8400 | !-- otherwise use RK3 scheme. |
---|
8401 | t_surf_wall_v_p(l)%t(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
8402 | surf_usm_v(l)%c_surface(m) * t_surf_wall_v(l)%t(m) ) / & |
---|
8403 | ( surf_usm_v(l)%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
8404 | IF ( ( .NOT. spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
8405 | t_surf_window_v_p(l)%t(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
8406 | surf_usm_v(l)%c_surface_window(m) * t_surf_window_v(l)%t(m) ) / & |
---|
8407 | ( surf_usm_v(l)%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
8408 | ENDIF |
---|
8409 | t_surf_green_v_p(l)%t(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
8410 | surf_usm_v(l)%c_surface_green(m) * t_surf_green_v(l)%t(m) ) / & |
---|
8411 | ( surf_usm_v(l)%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
8412 | ! |
---|
8413 | !-- add RK3 term |
---|
8414 | t_surf_wall_v_p(l)%t(m) = t_surf_wall_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
8415 | surf_usm_v(l)%tt_surface_wall_m(m) |
---|
8416 | t_surf_window_v_p(l)%t(m) = t_surf_window_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
8417 | surf_usm_v(l)%tt_surface_window_m(m) |
---|
8418 | t_surf_green_v_p(l)%t(m) = t_surf_green_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
8419 | surf_usm_v(l)%tt_surface_green_m(m) |
---|
8420 | ! |
---|
8421 | !-- Store surface temperature. Further, in case humidity is used |
---|
8422 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
8423 | !-- assumed to be the surface temperature. |
---|
8424 | surf_usm_v(l)%pt_surface(m) = ( surf_usm_v(l)%frac(ind_veg_wall,m) * t_surf_wall_v_p(l)%t(m) & |
---|
8425 | + surf_usm_v(l)%frac(ind_wat_win,m) * t_surf_window_v_p(l)%t(m) & |
---|
8426 | + surf_usm_v(l)%frac(ind_pav_green,m) * t_surf_green_v_p(l)%t(m) ) & |
---|
8427 | / exner(k) |
---|
8428 | |
---|
8429 | IF ( humidity ) surf_usm_v(l)%vpt_surface(m) = & |
---|
8430 | surf_usm_v(l)%pt_surface(m) |
---|
8431 | ! |
---|
8432 | !-- calculate true tendency |
---|
8433 | stend_wall = ( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) - dt_3d * tsc(3) * & |
---|
8434 | surf_usm_v(l)%tt_surface_wall_m(m) ) / ( dt_3d * tsc(2) ) |
---|
8435 | stend_window = ( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
8436 | surf_usm_v(l)%tt_surface_window_m(m) ) / ( dt_3d * tsc(2) ) |
---|
8437 | stend_green = ( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) - dt_3d * tsc(3) * & |
---|
8438 | surf_usm_v(l)%tt_surface_green_m(m) ) / ( dt_3d * tsc(2) ) |
---|
8439 | |
---|
8440 | ! |
---|
8441 | !-- calculate t_surf_* tendencies for the next Runge-Kutta step |
---|
8442 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
8443 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
8444 | surf_usm_v(l)%tt_surface_wall_m(m) = stend_wall |
---|
8445 | surf_usm_v(l)%tt_surface_window_m(m) = stend_window |
---|
8446 | surf_usm_v(l)%tt_surface_green_m(m) = stend_green |
---|
8447 | ELSEIF ( intermediate_timestep_count < & |
---|
8448 | intermediate_timestep_count_max ) THEN |
---|
8449 | surf_usm_v(l)%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
8450 | 5.3125_wp * surf_usm_v(l)%tt_surface_wall_m(m) |
---|
8451 | surf_usm_v(l)%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
8452 | 5.3125_wp * surf_usm_v(l)%tt_surface_green_m(m) |
---|
8453 | surf_usm_v(l)%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
8454 | 5.3125_wp * surf_usm_v(l)%tt_surface_window_m(m) |
---|
8455 | ENDIF |
---|
8456 | ENDIF |
---|
8457 | |
---|
8458 | ! |
---|
8459 | !-- in case of fast changes in the skin temperature, it is required to |
---|
8460 | !-- update the radiative fluxes in order to keep the solution stable |
---|
8461 | |
---|
8462 | IF ( ( ( ABS( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
8463 | ( ABS( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
8464 | ( ABS( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) ) > 1.0_wp ) ) & |
---|
8465 | .AND. unscheduled_radiation_calls ) THEN |
---|
8466 | force_radiation_call_l = .TRUE. |
---|
8467 | ENDIF |
---|
8468 | |
---|
8469 | ! |
---|
8470 | !-- calculate fluxes |
---|
8471 | !-- prognostic rad_net_l is used just for output! |
---|
8472 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
8473 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
8474 | 3.0_wp * sigma_sb * & |
---|
8475 | t_surf_wall_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
8476 | t_surf_wall_v(l)%t(m)**3 * t_surf_wall_v_p(l)%t(m) ) & |
---|
8477 | + surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
8478 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
8479 | 3.0_wp * sigma_sb * & |
---|
8480 | t_surf_window_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
8481 | t_surf_window_v(l)%t(m)**3 * t_surf_window_v_p(l)%t(m) ) & |
---|
8482 | + surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
8483 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
8484 | 3.0_wp * sigma_sb * & |
---|
8485 | t_surf_green_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
8486 | t_surf_green_v(l)%t(m)**3 * t_surf_green_v_p(l)%t(m) ) |
---|
8487 | |
---|
8488 | surf_usm_v(l)%wghf_eb_window(m) = lambda_surface_window * & |
---|
8489 | ( t_surf_window_v_p(l)%t(m) - t_window_v(l)%t(nzb_wall,m) ) |
---|
8490 | surf_usm_v(l)%wghf_eb(m) = lambda_surface * & |
---|
8491 | ( t_surf_wall_v_p(l)%t(m) - t_wall_v(l)%t(nzb_wall,m) ) |
---|
8492 | surf_usm_v(l)%wghf_eb_green(m) = lambda_surface_green * & |
---|
8493 | ( t_surf_green_v_p(l)%t(m) - t_green_v(l)%t(nzb_wall,m) ) |
---|
8494 | |
---|
8495 | ! |
---|
8496 | !-- ground/wall/roof surface heat flux |
---|
8497 | surf_usm_v(l)%wshf_eb(m) = & |
---|
8498 | - f_shf * ( surf_usm_v(l)%pt1(m) - & |
---|
8499 | t_surf_wall_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
8500 | - f_shf_window * ( surf_usm_v(l)%pt1(m) - & |
---|
8501 | t_surf_window_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_wat_win,m)& |
---|
8502 | - f_shf_green * ( surf_usm_v(l)%pt1(m) - & |
---|
8503 | t_surf_green_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_pav_green,m) |
---|
8504 | |
---|
8505 | ! |
---|
8506 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
8507 | !-- diffusion_s, surface_layer_fluxes,... |
---|
8508 | surf_usm_v(l)%shf(m) = surf_usm_v(l)%wshf_eb(m) / c_p |
---|
8509 | ! |
---|
8510 | !-- If the indoor model is applied, further add waste heat from buildings to the |
---|
8511 | !-- kinematic flux. |
---|
8512 | IF ( indoor_model ) THEN |
---|
8513 | surf_usm_v(l)%shf(m) = surf_usm_v(l)%shf(m) + & |
---|
8514 | surf_usm_v(l)%waste_heat(m) / c_p |
---|
8515 | ENDIF |
---|
8516 | |
---|
8517 | IF ( surf_usm_v(l)%frac(ind_pav_green,m) > 0.0_wp ) THEN |
---|
8518 | |
---|
8519 | |
---|
8520 | IF ( humidity ) THEN |
---|
8521 | surf_usm_v(l)%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
8522 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
8523 | t_surf_green_v_p(l)%t(m) ) |
---|
8524 | |
---|
8525 | surf_usm_v(l)%qsws(m) = surf_usm_v(l)%qsws_eb(m) / rho_lv |
---|
8526 | |
---|
8527 | surf_usm_v(l)%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
8528 | + dq_s_dt * t_surf_green_v(l)%t(m) - dq_s_dt & |
---|
8529 | * t_surf_green_v_p(l)%t(m) ) |
---|
8530 | |
---|
8531 | ! surf_usm_h%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
8532 | ! + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
8533 | ! * t_surf_green_h_p(m) ) |
---|
8534 | ENDIF |
---|
8535 | |
---|
8536 | ! |
---|
8537 | !-- Calculate the true surface resistance |
---|
8538 | IF ( .NOT. humidity ) THEN |
---|
8539 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
8540 | ELSE |
---|
8541 | surf_usm_v(l)%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
8542 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
8543 | t_surf_green_v_p(l)%t(m) ) / & |
---|
8544 | (surf_usm_v(l)%qsws(m) + 1.0E-20) - surf_usm_v(l)%r_a(m) |
---|
8545 | ENDIF |
---|
8546 | |
---|
8547 | ! |
---|
8548 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
8549 | !-- evaporation of liquid water |
---|
8550 | IF ( humidity ) THEN |
---|
8551 | ! |
---|
8552 | !-- If the air is saturated, check the reservoir water level |
---|
8553 | IF ( surf_usm_v(l)%qsws(m) < 0.0_wp ) THEN |
---|
8554 | |
---|
8555 | ! |
---|
8556 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
8557 | !-- let the water enter the liquid water reservoir as dew on the |
---|
8558 | !-- plant |
---|
8559 | IF ( surf_usm_v(l)%qsws_veg(m) < 0.0_wp ) THEN |
---|
8560 | ! surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) + surf_usm_h%qsws_veg(m) |
---|
8561 | surf_usm_v(l)%qsws_veg(m) = 0.0_wp |
---|
8562 | ENDIF |
---|
8563 | ENDIF |
---|
8564 | |
---|
8565 | ENDIF |
---|
8566 | ELSE |
---|
8567 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
8568 | ENDIF |
---|
8569 | |
---|
8570 | ENDDO |
---|
8571 | |
---|
8572 | ENDDO |
---|
8573 | ! |
---|
8574 | !-- Add-up anthropogenic heat, for now only at upward-facing surfaces |
---|
8575 | IF ( usm_anthropogenic_heat .AND. & |
---|
8576 | intermediate_timestep_count == intermediate_timestep_count_max ) THEN |
---|
8577 | ! |
---|
8578 | !-- application of the additional anthropogenic heat sources |
---|
8579 | !-- we considere the traffic for now so all heat is absorbed |
---|
8580 | !-- to the first layer, generalization would be worth. |
---|
8581 | !-- calculation of actual profile coefficient |
---|
8582 | !-- ??? check time_since_reference_point ??? |
---|
8583 | dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp) |
---|
8584 | dhour = INT(dtime/3600.0_wp) |
---|
8585 | DO i = nxl, nxr |
---|
8586 | DO j = nys, nyn |
---|
8587 | DO k = nzub, min(nzut,naheatlayers) |
---|
8588 | IF ( k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
8589 | ! |
---|
8590 | !-- increase of pt in box i,j,k in time dt_3d |
---|
8591 | !-- given to anthropogenic heat aheat*acoef (W*m-2) |
---|
8592 | !-- linear interpolation of coeficient |
---|
8593 | acoef = (REAL(dhour+1,wp)-dtime/3600.0_wp)*aheatprof(k,dhour) + & |
---|
8594 | (dtime/3600.0_wp-REAL(dhour,wp))*aheatprof(k,dhour+1) |
---|
8595 | IF ( aheat(k,j,i) > 0.0_wp ) THEN |
---|
8596 | ! |
---|
8597 | !-- calculate rho * c_p coefficient at layer k |
---|
8598 | rho_cp = c_p * hyp(k) / ( r_d * pt(k+1,j,i) * exner(k) ) |
---|
8599 | pt(k,j,i) = pt(k,j,i) + aheat(k,j,i)*acoef*dt_3d/(exner(k)*rho_cp*dz(1)) |
---|
8600 | ENDIF |
---|
8601 | ENDIF |
---|
8602 | ENDDO |
---|
8603 | ENDDO |
---|
8604 | ENDDO |
---|
8605 | |
---|
8606 | ENDIF |
---|
8607 | ! |
---|
8608 | !-- pt and shf are defined on nxlg:nxrg,nysg:nyng |
---|
8609 | !-- get the borders from neighbours |
---|
8610 | CALL exchange_horiz( pt, nbgp ) |
---|
8611 | ! |
---|
8612 | !-- calculation of force_radiation_call: |
---|
8613 | !-- Make logical OR for all processes. |
---|
8614 | !-- Force radiation call if at least one processor forces it. |
---|
8615 | IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )& |
---|
8616 | THEN |
---|
8617 | #if defined( __parallel ) |
---|
8618 | IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) |
---|
8619 | CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call, & |
---|
8620 | 1, MPI_LOGICAL, MPI_LOR, comm2d, ierr ) |
---|
8621 | #else |
---|
8622 | force_radiation_call = force_radiation_call_l |
---|
8623 | #endif |
---|
8624 | force_radiation_call_l = .FALSE. |
---|
8625 | ENDIF |
---|
8626 | |
---|
8627 | ! ! |
---|
8628 | ! !-- Calculate surface specific humidity |
---|
8629 | ! IF ( humidity ) THEN |
---|
8630 | ! CALL calc_q_surface_usm |
---|
8631 | ! ENDIF |
---|
8632 | |
---|
8633 | |
---|
8634 | ! CONTAINS |
---|
8635 | ! !------------------------------------------------------------------------------! |
---|
8636 | ! ! Description: |
---|
8637 | ! ! ------------ |
---|
8638 | ! !> Calculation of specific humidity of the skin layer (surface). It is assumend |
---|
8639 | ! !> that the skin is always saturated. |
---|
8640 | ! !------------------------------------------------------------------------------! |
---|
8641 | ! SUBROUTINE calc_q_surface_usm |
---|
8642 | ! |
---|
8643 | ! IMPLICIT NONE |
---|
8644 | ! |
---|
8645 | ! REAL(wp) :: resistance !< aerodynamic and soil resistance term |
---|
8646 | ! |
---|
8647 | ! DO m = 1, surf_usm_h%ns |
---|
8648 | ! |
---|
8649 | ! i = surf_usm_h%i(m) |
---|
8650 | ! j = surf_usm_h%j(m) |
---|
8651 | ! k = surf_usm_h%k(m) |
---|
8652 | ! |
---|
8653 | !! |
---|
8654 | !!-- Calculate water vapour pressure at saturation |
---|
8655 | ! e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
8656 | ! ( t_surf_green_h_p(m) - 273.16_wp ) / & |
---|
8657 | ! ( t_surf_green_h_p(m) - 35.86_wp ) & |
---|
8658 | ! ) |
---|
8659 | ! |
---|
8660 | !! |
---|
8661 | !!-- Calculate specific humidity at saturation |
---|
8662 | ! q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
8663 | ! |
---|
8664 | !! surf_usm_h%r_a_green(m) = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
8665 | !! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-10_wp ) |
---|
8666 | !! |
---|
8667 | !! !-- make sure that the resistance does not drop to zero |
---|
8668 | !! IF ( ABS(surf_usm_h%r_a_green(m)) < 1.0E-10_wp ) surf_usm_h%r_a_green(m) = 1.0E-10_wp |
---|
8669 | ! |
---|
8670 | ! resistance = surf_usm_h%r_a_green(m) / ( surf_usm_h%r_a_green(m) + surf_usm_h%r_s(m) + 1E-5_wp ) |
---|
8671 | ! |
---|
8672 | !! |
---|
8673 | !!-- Calculate specific humidity at surface |
---|
8674 | ! IF ( bulk_cloud_model ) THEN |
---|
8675 | ! q(k,j,i) = resistance * q_s + & |
---|
8676 | ! ( 1.0_wp - resistance ) * & |
---|
8677 | ! ( q(k,j,i) - ql(k,j,i) ) |
---|
8678 | ! ELSE |
---|
8679 | ! q(k,j,i) = resistance * q_s + & |
---|
8680 | ! ( 1.0_wp - resistance ) * & |
---|
8681 | ! q(k,j,i) |
---|
8682 | ! ENDIF |
---|
8683 | ! |
---|
8684 | !! |
---|
8685 | !!-- Update virtual potential temperature |
---|
8686 | ! vpt(k,j,i) = pt(k,j,i) * & |
---|
8687 | ! ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
8688 | ! |
---|
8689 | ! ENDDO |
---|
8690 | ! |
---|
8691 | !! |
---|
8692 | !!-- Now, treat vertical surface elements |
---|
8693 | ! DO l = 0, 3 |
---|
8694 | ! DO m = 1, surf_usm_v(l)%ns |
---|
8695 | !! |
---|
8696 | !!-- Get indices of respective grid point |
---|
8697 | ! i = surf_usm_v(l)%i(m) |
---|
8698 | ! j = surf_usm_v(l)%j(m) |
---|
8699 | ! k = surf_usm_v(l)%k(m) |
---|
8700 | ! |
---|
8701 | !! |
---|
8702 | !!-- Calculate water vapour pressure at saturation |
---|
8703 | ! e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
8704 | ! ( t_surf_green_v_p(l)%t(m) - 273.16_wp ) / & |
---|
8705 | ! ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) & |
---|
8706 | ! ) |
---|
8707 | ! |
---|
8708 | !! |
---|
8709 | !!-- Calculate specific humidity at saturation |
---|
8710 | ! q_s = 0.622_wp * e_s / ( surface_pressure -e_s ) |
---|
8711 | ! |
---|
8712 | !! |
---|
8713 | !!-- Calculate specific humidity at surface |
---|
8714 | ! IF ( bulk_cloud_model ) THEN |
---|
8715 | ! q(k,j,i) = ( q(k,j,i) - ql(k,j,i) ) |
---|
8716 | ! ELSE |
---|
8717 | ! q(k,j,i) = q(k,j,i) |
---|
8718 | ! ENDIF |
---|
8719 | !! |
---|
8720 | !!-- Update virtual potential temperature |
---|
8721 | ! vpt(k,j,i) = pt(k,j,i) * & |
---|
8722 | ! ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
8723 | ! |
---|
8724 | ! ENDDO |
---|
8725 | ! |
---|
8726 | ! ENDDO |
---|
8727 | ! |
---|
8728 | ! END SUBROUTINE calc_q_surface_usm |
---|
8729 | |
---|
8730 | END SUBROUTINE usm_surface_energy_balance |
---|
8731 | |
---|
8732 | |
---|
8733 | !------------------------------------------------------------------------------! |
---|
8734 | ! Description: |
---|
8735 | ! ------------ |
---|
8736 | !> Swapping of timelevels for t_surf and t_wall |
---|
8737 | !> called out from subroutine swap_timelevel |
---|
8738 | !------------------------------------------------------------------------------! |
---|
8739 | SUBROUTINE usm_swap_timelevel( mod_count ) |
---|
8740 | |
---|
8741 | IMPLICIT NONE |
---|
8742 | |
---|
8743 | INTEGER(iwp), INTENT(IN) :: mod_count |
---|
8744 | |
---|
8745 | |
---|
8746 | SELECT CASE ( mod_count ) |
---|
8747 | |
---|
8748 | CASE ( 0 ) |
---|
8749 | ! |
---|
8750 | !-- Horizontal surfaces |
---|
8751 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
8752 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
8753 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
8754 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
8755 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
8756 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
8757 | ! |
---|
8758 | !-- Vertical surfaces |
---|
8759 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
8760 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
8761 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
8762 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
8763 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
8764 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
8765 | CASE ( 1 ) |
---|
8766 | ! |
---|
8767 | !-- Horizontal surfaces |
---|
8768 | t_surf_wall_h => t_surf_wall_h_2; t_surf_wall_h_p => t_surf_wall_h_1 |
---|
8769 | t_wall_h => t_wall_h_2; t_wall_h_p => t_wall_h_1 |
---|
8770 | t_surf_window_h => t_surf_window_h_2; t_surf_window_h_p => t_surf_window_h_1 |
---|
8771 | t_window_h => t_window_h_2; t_window_h_p => t_window_h_1 |
---|
8772 | t_surf_green_h => t_surf_green_h_2; t_surf_green_h_p => t_surf_green_h_1 |
---|
8773 | t_green_h => t_green_h_2; t_green_h_p => t_green_h_1 |
---|
8774 | ! |
---|
8775 | !-- Vertical surfaces |
---|
8776 | t_surf_wall_v => t_surf_wall_v_2; t_surf_wall_v_p => t_surf_wall_v_1 |
---|
8777 | t_wall_v => t_wall_v_2; t_wall_v_p => t_wall_v_1 |
---|
8778 | t_surf_window_v => t_surf_window_v_2; t_surf_window_v_p => t_surf_window_v_1 |
---|
8779 | t_window_v => t_window_v_2; t_window_v_p => t_window_v_1 |
---|
8780 | t_surf_green_v => t_surf_green_v_2; t_surf_green_v_p => t_surf_green_v_1 |
---|
8781 | t_green_v => t_green_v_2; t_green_v_p => t_green_v_1 |
---|
8782 | END SELECT |
---|
8783 | |
---|
8784 | END SUBROUTINE usm_swap_timelevel |
---|
8785 | |
---|
8786 | !------------------------------------------------------------------------------! |
---|
8787 | ! Description: |
---|
8788 | ! ------------ |
---|
8789 | !> Subroutine writes t_surf and t_wall data into restart files |
---|
8790 | !------------------------------------------------------------------------------! |
---|
8791 | SUBROUTINE usm_wrd_local |
---|
8792 | |
---|
8793 | |
---|
8794 | IMPLICIT NONE |
---|
8795 | |
---|
8796 | CHARACTER(LEN=1) :: dum !< dummy string to create output-variable name |
---|
8797 | INTEGER(iwp) :: l !< index surface type orientation |
---|
8798 | |
---|
8799 | CALL wrd_write_string( 'ns_h_on_file_usm' ) |
---|
8800 | WRITE ( 14 ) surf_usm_h%ns |
---|
8801 | |
---|
8802 | CALL wrd_write_string( 'ns_v_on_file_usm' ) |
---|
8803 | WRITE ( 14 ) surf_usm_v(0:3)%ns |
---|
8804 | |
---|
8805 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
8806 | WRITE ( 14 ) surf_usm_h%start_index |
---|
8807 | |
---|
8808 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
8809 | WRITE ( 14 ) surf_usm_h%end_index |
---|
8810 | |
---|
8811 | CALL wrd_write_string( 't_surf_wall_h' ) |
---|
8812 | WRITE ( 14 ) t_surf_wall_h |
---|
8813 | |
---|
8814 | CALL wrd_write_string( 't_surf_window_h' ) |
---|
8815 | WRITE ( 14 ) t_surf_window_h |
---|
8816 | |
---|
8817 | CALL wrd_write_string( 't_surf_green_h' ) |
---|
8818 | WRITE ( 14 ) t_surf_green_h |
---|
8819 | ! |
---|
8820 | !-- Write restart data which is especially needed for the urban-surface |
---|
8821 | !-- model. In order to do not fill up the restart routines in |
---|
8822 | !-- surface_mod. |
---|
8823 | !-- Output of waste heat from indoor model. Restart data is required in |
---|
8824 | !-- this special case, because the indoor model where waste heat is |
---|
8825 | !-- computed is call each hour (current default), so that waste heat would |
---|
8826 | !-- have zero value until next call of indoor model. |
---|
8827 | IF ( indoor_model ) THEN |
---|
8828 | CALL wrd_write_string( 'waste_heat_h' ) |
---|
8829 | WRITE ( 14 ) surf_usm_h%waste_heat |
---|
8830 | ENDIF |
---|
8831 | |
---|
8832 | DO l = 0, 3 |
---|
8833 | |
---|
8834 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
8835 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
8836 | |
---|
8837 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
8838 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
8839 | |
---|
8840 | WRITE( dum, '(I1)') l |
---|
8841 | |
---|
8842 | CALL wrd_write_string( 't_surf_wall_v(' // dum // ')' ) |
---|
8843 | WRITE ( 14 ) t_surf_wall_v(l)%t |
---|
8844 | |
---|
8845 | CALL wrd_write_string( 't_surf_window_v(' // dum // ')' ) |
---|
8846 | WRITE ( 14 ) t_surf_window_v(l)%t |
---|
8847 | |
---|
8848 | CALL wrd_write_string( 't_surf_green_v(' // dum // ')' ) |
---|
8849 | WRITE ( 14 ) t_surf_green_v(l)%t |
---|
8850 | |
---|
8851 | IF ( indoor_model ) THEN |
---|
8852 | CALL wrd_write_string( 'waste_heat_v(' // dum // ')' ) |
---|
8853 | WRITE ( 14 ) surf_usm_v(l)%waste_heat |
---|
8854 | ENDIF |
---|
8855 | |
---|
8856 | ENDDO |
---|
8857 | |
---|
8858 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
8859 | WRITE ( 14 ) surf_usm_h%start_index |
---|
8860 | |
---|
8861 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
8862 | WRITE ( 14 ) surf_usm_h%end_index |
---|
8863 | |
---|
8864 | CALL wrd_write_string( 't_wall_h' ) |
---|
8865 | WRITE ( 14 ) t_wall_h |
---|
8866 | |
---|
8867 | CALL wrd_write_string( 't_window_h' ) |
---|
8868 | WRITE ( 14 ) t_window_h |
---|
8869 | |
---|
8870 | CALL wrd_write_string( 't_green_h' ) |
---|
8871 | WRITE ( 14 ) t_green_h |
---|
8872 | |
---|
8873 | DO l = 0, 3 |
---|
8874 | |
---|
8875 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
8876 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
8877 | |
---|
8878 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
8879 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
8880 | |
---|
8881 | WRITE( dum, '(I1)') l |
---|
8882 | |
---|
8883 | CALL wrd_write_string( 't_wall_v(' // dum // ')' ) |
---|
8884 | WRITE ( 14 ) t_wall_v(l)%t |
---|
8885 | |
---|
8886 | CALL wrd_write_string( 't_window_v(' // dum // ')' ) |
---|
8887 | WRITE ( 14 ) t_window_v(l)%t |
---|
8888 | |
---|
8889 | CALL wrd_write_string( 't_green_v(' // dum // ')' ) |
---|
8890 | WRITE ( 14 ) t_green_v(l)%t |
---|
8891 | |
---|
8892 | ENDDO |
---|
8893 | |
---|
8894 | END SUBROUTINE usm_wrd_local |
---|
8895 | |
---|
8896 | |
---|
8897 | END MODULE urban_surface_mod |
---|