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 3832 2019-03-28 13:16:58Z raasch $ |
---|
30 | ! instrumented with openmp directives |
---|
31 | ! |
---|
32 | ! 3824 2019-03-27 15:56:16Z pavelkrc |
---|
33 | ! Remove unused imports |
---|
34 | ! |
---|
35 | ! |
---|
36 | ! 3814 2019-03-26 08:40:31Z pavelkrc |
---|
37 | ! unused subroutine commented out |
---|
38 | ! |
---|
39 | ! 3769 2019-02-28 10:16:49Z moh.hefny |
---|
40 | ! removed unused variables |
---|
41 | ! |
---|
42 | ! 3767 2019-02-27 08:18:02Z raasch |
---|
43 | ! unused variables removed from rrd-subroutines parameter list |
---|
44 | ! |
---|
45 | ! 3748 2019-02-18 10:38:31Z suehring |
---|
46 | ! Revise conversion of waste-heat flux (do not divide by air density, will |
---|
47 | ! be done in diffusion_s) |
---|
48 | ! |
---|
49 | ! 3745 2019-02-15 18:57:56Z suehring |
---|
50 | ! - Remove internal flag indoor_model (is a global control parameter) |
---|
51 | ! - add waste heat from buildings to the kinmatic heat flux |
---|
52 | ! - consider waste heat in restart data |
---|
53 | ! - remove unused USE statements |
---|
54 | ! |
---|
55 | ! 3744 2019-02-15 18:38:58Z suehring |
---|
56 | ! fixed surface heat capacity in the building parameters |
---|
57 | ! convert the file back to unix format |
---|
58 | ! |
---|
59 | ! 3730 2019-02-11 11:26:47Z moh.hefny |
---|
60 | ! Formatting and clean-up (rvtils) |
---|
61 | ! |
---|
62 | ! 3710 2019-01-30 18:11:19Z suehring |
---|
63 | ! Check if building type is set within a valid range. |
---|
64 | ! |
---|
65 | ! 3705 2019-01-29 19:56:39Z suehring |
---|
66 | ! make nzb_wall public, required for virtual-measurements |
---|
67 | ! |
---|
68 | ! 3704 2019-01-29 19:51:41Z suehring |
---|
69 | ! Some interface calls moved to module_interface + cleanup |
---|
70 | ! |
---|
71 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
72 | ! Implementation of the PALM module interface |
---|
73 | ! |
---|
74 | ! 3636 2018-12-19 13:48:34Z raasch |
---|
75 | ! nopointer option removed |
---|
76 | ! |
---|
77 | ! 3614 2018-12-10 07:05:46Z raasch |
---|
78 | ! unused variables removed |
---|
79 | ! |
---|
80 | ! 3607 2018-12-07 11:56:58Z suehring |
---|
81 | ! Output of radiation-related quantities migrated to radiation_model_mod. |
---|
82 | ! |
---|
83 | ! 3597 2018-12-04 08:40:18Z maronga |
---|
84 | ! Fixed calculation method of near surface air potential temperature at 10 cm |
---|
85 | ! and moved to surface_layer_fluxes. Removed unnecessary _eb strings. |
---|
86 | ! |
---|
87 | ! 3524 2018-11-14 13:36:44Z raasch |
---|
88 | ! bugfix concerning allocation of t_surf_wall_v |
---|
89 | ! |
---|
90 | ! 3502 2018-11-07 14:45:23Z suehring |
---|
91 | ! Disable initialization of building roofs with ground-floor-level properties, |
---|
92 | ! since this causes strong oscillations of surface temperature during the |
---|
93 | ! spinup. |
---|
94 | ! |
---|
95 | ! 3469 2018-10-30 20:05:07Z kanani |
---|
96 | ! Add missing PUBLIC variables for new indoor model |
---|
97 | ! |
---|
98 | ! 3449 2018-10-29 19:36:56Z suehring |
---|
99 | ! Bugfix: Fix average arrays allocations in usm_3d_data_averaging (J.Resler) |
---|
100 | ! Bugfix: Fix reading wall temperatures (J.Resler) |
---|
101 | ! Bugfix: Fix treating of outputs for wall temperature and sky view factors (J.Resler) |
---|
102 | ! |
---|
103 | ! |
---|
104 | ! 3435 2018-10-26 18:25:44Z gronemeier |
---|
105 | ! Bugfix: allocate gamma_w_green_sat until nzt_wall+1 |
---|
106 | ! |
---|
107 | ! 3418 2018-10-24 16:07:39Z kanani |
---|
108 | ! (rvtils, srissman) |
---|
109 | ! -Updated building databse, two green roof types (ind_green_type_roof) |
---|
110 | ! -Latent heat flux for green walls and roofs, new output of latent heatflux |
---|
111 | ! and soil water content of green roof substrate |
---|
112 | ! -t_surf changed to t_surf_wall |
---|
113 | ! -Added namelist parameter usm_wall_mod for lower wall tendency |
---|
114 | ! of first two wall layers during spinup |
---|
115 | ! -Window calculations deactivated during spinup |
---|
116 | ! |
---|
117 | ! 3382 2018-10-19 13:10:32Z knoop |
---|
118 | ! Bugix: made array declaration Fortran Standard conform |
---|
119 | ! |
---|
120 | ! 3378 2018-10-19 12:34:59Z kanani |
---|
121 | ! merge from radiation branch (r3362) into trunk |
---|
122 | ! (moh.hefny): |
---|
123 | ! - check the requested output variables if they are correct |
---|
124 | ! - added unscheduled_radiation_calls switch to control force_radiation_call |
---|
125 | ! - minor formate changes |
---|
126 | ! |
---|
127 | ! 3371 2018-10-18 13:40:12Z knoop |
---|
128 | ! Set flag indicating that albedo at urban surfaces is already initialized |
---|
129 | ! |
---|
130 | ! 3347 2018-10-15 14:21:08Z suehring |
---|
131 | ! Enable USM initialization with default building parameters in case no static |
---|
132 | ! input file exist. |
---|
133 | ! |
---|
134 | ! 3343 2018-10-15 10:38:52Z suehring |
---|
135 | ! Add output variables usm_rad_pc_inlw, usm_rad_pc_insw* |
---|
136 | ! |
---|
137 | ! 3274 2018-09-24 15:42:55Z knoop |
---|
138 | ! Modularization of all bulk cloud physics code components |
---|
139 | ! |
---|
140 | ! 3248 2018-09-14 09:42:06Z sward |
---|
141 | ! Minor formating changes |
---|
142 | ! |
---|
143 | ! 3246 2018-09-13 15:14:50Z sward |
---|
144 | ! Added error handling for input namelist via parin_fail_message |
---|
145 | ! |
---|
146 | ! 3241 2018-09-12 15:02:00Z raasch |
---|
147 | ! unused variables removed |
---|
148 | ! |
---|
149 | ! 3223 2018-08-30 13:48:17Z suehring |
---|
150 | ! Bugfix for commit 3222 |
---|
151 | ! |
---|
152 | ! 3222 2018-08-30 13:35:35Z suehring |
---|
153 | ! Introduction of surface array for type and its name |
---|
154 | ! |
---|
155 | ! 3203 2018-08-23 10:48:36Z suehring |
---|
156 | ! Revise bulk parameter for emissivity at ground-floor level |
---|
157 | ! |
---|
158 | ! 3196 2018-08-13 12:26:14Z maronga |
---|
159 | ! Added maximum aerodynamic resistance of 300 for horiztonal surfaces. |
---|
160 | ! |
---|
161 | ! 3176 2018-07-26 17:12:48Z suehring |
---|
162 | ! Bugfix, update virtual potential surface temparture, else heat fluxes on |
---|
163 | ! roofs might become unphysical |
---|
164 | ! |
---|
165 | ! 3152 2018-07-19 13:26:52Z suehring |
---|
166 | ! Initialize q_surface, which might be used in surface_layer_fluxes |
---|
167 | ! |
---|
168 | ! 3151 2018-07-19 08:45:38Z raasch |
---|
169 | ! remaining preprocessor define strings __check removed |
---|
170 | ! |
---|
171 | ! 3136 2018-07-16 14:48:21Z suehring |
---|
172 | ! Limit also roughness length for heat and moisture where necessary |
---|
173 | ! |
---|
174 | ! 3123 2018-07-12 16:21:53Z suehring |
---|
175 | ! Correct working precision for INTEGER number |
---|
176 | ! |
---|
177 | ! 3115 2018-07-10 12:49:26Z suehring |
---|
178 | ! Additional building type to represent bridges |
---|
179 | ! |
---|
180 | ! 3091 2018-06-28 16:20:35Z suehring |
---|
181 | ! - Limit aerodynamic resistance at vertical walls. |
---|
182 | ! - Add check for local roughness length not exceeding surface-layer height and |
---|
183 | ! limit roughness length where necessary. |
---|
184 | ! |
---|
185 | ! 3065 2018-06-12 07:03:02Z Giersch |
---|
186 | ! Unused array dxdir was removed, dz was replaced by dzu to consider vertical |
---|
187 | ! grid stretching |
---|
188 | ! |
---|
189 | ! 3049 2018-05-29 13:52:36Z Giersch |
---|
190 | ! Error messages revised |
---|
191 | ! |
---|
192 | ! 3045 2018-05-28 07:55:41Z Giersch |
---|
193 | ! Error message added |
---|
194 | ! |
---|
195 | ! 3029 2018-05-23 12:19:17Z raasch |
---|
196 | ! bugfix: close unit 151 instead of 90 |
---|
197 | ! |
---|
198 | ! 3014 2018-05-09 08:42:38Z maronga |
---|
199 | ! Added pc_transpiration_rate |
---|
200 | ! |
---|
201 | ! 2977 2018-04-17 10:27:57Z kanani |
---|
202 | ! Implement changes from branch radiation (r2948-2971) with minor modifications. |
---|
203 | ! (moh.hefny): |
---|
204 | ! Extended exn for all model domain height to avoid the need to get nzut. |
---|
205 | ! |
---|
206 | ! 2963 2018-04-12 14:47:44Z suehring |
---|
207 | ! Introduce index for vegetation/wall, pavement/green-wall and water/window |
---|
208 | ! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. . |
---|
209 | ! |
---|
210 | ! 2943 2018-04-03 16:17:10Z suehring |
---|
211 | ! Calculate exner function at all height levels and remove some un-used |
---|
212 | ! variables. |
---|
213 | ! |
---|
214 | ! 2932 2018-03-26 09:39:22Z maronga |
---|
215 | ! renamed urban_surface_par to urban_surface_parameters |
---|
216 | ! |
---|
217 | ! 2921 2018-03-22 15:05:23Z Giersch |
---|
218 | ! The activation of spinup has been moved to parin |
---|
219 | ! |
---|
220 | ! 2920 2018-03-22 11:22:01Z kanani |
---|
221 | ! Remove unused pcbl, npcbl from ONLY list |
---|
222 | ! moh.hefny: |
---|
223 | ! Fixed bugs introduced by new structures and by moving radiation interaction |
---|
224 | ! into radiation_model_mod.f90. |
---|
225 | ! Bugfix: usm data output 3D didn't respect directions |
---|
226 | ! |
---|
227 | ! 2906 2018-03-19 08:56:40Z Giersch |
---|
228 | ! Local variable ids has to be initialized with a value of -1 in |
---|
229 | ! usm_3d_data_averaging |
---|
230 | ! |
---|
231 | ! 2894 2018-03-15 09:17:58Z Giersch |
---|
232 | ! Calculations of the index range of the subdomain on file which overlaps with |
---|
233 | ! the current subdomain are already done in read_restart_data_mod, |
---|
234 | ! usm_read/write_restart_data have been renamed to usm_r/wrd_local, variable |
---|
235 | ! named found has been introduced for checking if restart data was found, |
---|
236 | ! reading of restart strings has been moved completely to |
---|
237 | ! read_restart_data_mod, usm_rrd_local is already inside the overlap loop |
---|
238 | ! programmed in read_restart_data_mod, SAVE attribute added where necessary, |
---|
239 | ! deallocation and allocation of some arrays have been changed to take care of |
---|
240 | ! different restart files that can be opened (index i), the marker *** end usm |
---|
241 | ! *** is not necessary anymore, strings and their respective lengths are |
---|
242 | ! written out and read now in case of restart runs to get rid of prescribed |
---|
243 | ! character lengths |
---|
244 | ! |
---|
245 | ! 2805 2018-02-14 17:00:09Z suehring |
---|
246 | ! Initialization of resistances. |
---|
247 | ! |
---|
248 | ! 2797 2018-02-08 13:24:35Z suehring |
---|
249 | ! Comment concerning output of ground-heat flux added. |
---|
250 | ! |
---|
251 | ! 2766 2018-01-22 17:17:47Z kanani |
---|
252 | ! Removed redundant commas, added some blanks |
---|
253 | ! |
---|
254 | ! 2765 2018-01-22 11:34:58Z maronga |
---|
255 | ! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in |
---|
256 | ! building_pars |
---|
257 | ! |
---|
258 | ! 2750 2018-01-15 16:26:51Z knoop |
---|
259 | ! Move flag plant canopy to modules |
---|
260 | ! |
---|
261 | ! 2737 2018-01-11 14:58:11Z kanani |
---|
262 | ! Removed unused variables t_surf_whole... |
---|
263 | ! |
---|
264 | ! 2735 2018-01-11 12:01:27Z suehring |
---|
265 | ! resistances are saved in surface attributes |
---|
266 | ! |
---|
267 | ! 2723 2018-01-05 09:27:03Z maronga |
---|
268 | ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) |
---|
269 | ! |
---|
270 | ! 2720 2018-01-02 16:27:15Z kanani |
---|
271 | ! Correction of comment |
---|
272 | ! |
---|
273 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
274 | ! Corrected "Former revisions" section |
---|
275 | ! |
---|
276 | ! 2705 2017-12-18 11:26:23Z maronga |
---|
277 | ! Changes from last commit documented |
---|
278 | ! |
---|
279 | ! 2703 2017-12-15 20:12:38Z maronga |
---|
280 | ! Workaround for calculation of r_a |
---|
281 | ! |
---|
282 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
283 | ! - Change in file header (GPL part) |
---|
284 | ! - Bugfix in calculation of pt_surface and related fluxes. (BM) |
---|
285 | ! - Do not write surface temperatures onto pt array as this might cause |
---|
286 | ! problems with nesting. (MS) |
---|
287 | ! - Revised calculation of pt1 (now done in surface_layer_fluxes). |
---|
288 | ! Bugfix, f_shf_window and f_shf_green were not set at vertical surface |
---|
289 | ! elements. (MS) |
---|
290 | ! - merged with branch ebsolver |
---|
291 | ! green building surfaces do not evaporate yet |
---|
292 | ! properties of green wall layers and window layers are taken from wall layers |
---|
293 | ! this input data is missing. (RvT) |
---|
294 | ! - Merged with branch radiation (developed by Mohamed Salim) |
---|
295 | ! - Revised initialization. (MS) |
---|
296 | ! - Rename emiss_surf into emissivity, roughness_wall into z0, albedo_surf into |
---|
297 | ! albedo. (MS) |
---|
298 | ! - Move first call of usm_radiatin from usm_init to init_3d_model |
---|
299 | ! - fixed problem with near surface temperature |
---|
300 | ! - added near surface temperature pt_10cm_h(m), pt_10cm_v(l)%t(m) |
---|
301 | ! - does not work with temp profile including stability, ol |
---|
302 | ! pt_10cm = pt1 now |
---|
303 | ! - merged with 2357 bugfix, error message for nopointer version |
---|
304 | ! - added indoor model coupling with wall heat flux |
---|
305 | ! - added green substrate/ dry vegetation layer for buildings |
---|
306 | ! - merged with 2232 new surface-type structure |
---|
307 | ! - added transmissivity of window tiles |
---|
308 | ! - added MOSAIK tile approach for 3 different surfaces (RvT) |
---|
309 | ! |
---|
310 | ! 2583 2017-10-26 13:58:38Z knoop |
---|
311 | ! Bugfix: reverted MPI_Win_allocate_cptr introduction in last commit |
---|
312 | ! |
---|
313 | ! 2582 2017-10-26 13:19:46Z hellstea |
---|
314 | ! Workaround for gnufortran compiler added in usm_calc_svf. CALL MPI_Win_allocate is |
---|
315 | ! replaced by CALL MPI_Win_allocate_cptr if defined ( __gnufortran ). |
---|
316 | ! |
---|
317 | ! 2544 2017-10-13 18:09:32Z maronga |
---|
318 | ! Date and time quantities are now read from date_and_time_mod. Solar constant is |
---|
319 | ! read from radiation_model_mod |
---|
320 | ! |
---|
321 | ! 2516 2017-10-04 11:03:04Z suehring |
---|
322 | ! Remove tabs |
---|
323 | ! |
---|
324 | ! 2514 2017-10-04 09:52:37Z suehring |
---|
325 | ! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny |
---|
326 | ! no output of ghost layer data |
---|
327 | ! |
---|
328 | ! 2350 2017-08-15 11:48:26Z kanani |
---|
329 | ! Bugfix and error message for nopointer version. |
---|
330 | ! Additional "! defined(__nopointer)" as workaround to enable compilation of |
---|
331 | ! nopointer version. |
---|
332 | ! |
---|
333 | ! 2318 2017-07-20 17:27:44Z suehring |
---|
334 | ! Get topography top index via Function call |
---|
335 | ! |
---|
336 | ! 2317 2017-07-20 17:27:19Z suehring |
---|
337 | ! Bugfix: adjust output of shf. Added support for spinups |
---|
338 | ! |
---|
339 | ! 2287 2017-06-15 16:46:30Z suehring |
---|
340 | ! Bugfix in determination topography-top index |
---|
341 | ! |
---|
342 | ! 2269 2017-06-09 11:57:32Z suehring |
---|
343 | ! Enable restart runs with different number of PEs |
---|
344 | ! Bugfixes nopointer branch |
---|
345 | ! |
---|
346 | ! 2258 2017-06-08 07:55:13Z suehring |
---|
347 | ! Bugfix, add pre-preprocessor directives to enable non-parrallel mode |
---|
348 | ! |
---|
349 | ! 2233 2017-05-30 18:08:54Z suehring |
---|
350 | ! |
---|
351 | ! 2232 2017-05-30 17:47:52Z suehring |
---|
352 | ! Adjustments according to new surface-type structure. Remove usm_wall_heat_flux; |
---|
353 | ! insteat, heat fluxes are directly applied in diffusion_s. |
---|
354 | ! |
---|
355 | ! 2213 2017-04-24 15:10:35Z kanani |
---|
356 | ! Removal of output quantities usm_lad and usm_canopy_hr |
---|
357 | ! |
---|
358 | ! 2209 2017-04-19 09:34:46Z kanani |
---|
359 | ! cpp switch __mpi3 removed, |
---|
360 | ! minor formatting, |
---|
361 | ! small bugfix for division by zero (Krc) |
---|
362 | ! |
---|
363 | ! 2113 2017-01-12 13:40:46Z kanani |
---|
364 | ! cpp switch __mpi3 added for MPI-3 standard code (Ketelsen) |
---|
365 | ! |
---|
366 | ! 2071 2016-11-17 11:22:14Z maronga |
---|
367 | ! Small bugfix (Resler) |
---|
368 | ! |
---|
369 | ! 2031 2016-10-21 15:11:58Z knoop |
---|
370 | ! renamed variable rho to rho_ocean |
---|
371 | ! |
---|
372 | ! 2024 2016-10-12 16:42:37Z kanani |
---|
373 | ! Bugfixes in deallocation of array plantt and reading of csf/csfsurf, |
---|
374 | ! optimization of MPI-RMA operations, |
---|
375 | ! declaration of pcbl as integer, |
---|
376 | ! renamed usm_radnet -> usm_rad_net, usm_canopy_khf -> usm_canopy_hr, |
---|
377 | ! splitted arrays svf -> svf & csf, svfsurf -> svfsurf & csfsurf, |
---|
378 | ! use of new control parameter varnamelength, |
---|
379 | ! added output variables usm_rad_ressw, usm_rad_reslw, |
---|
380 | ! minor formatting changes, |
---|
381 | ! minor optimizations. |
---|
382 | ! |
---|
383 | ! 2011 2016-09-19 17:29:57Z kanani |
---|
384 | ! Major reformatting according to PALM coding standard (comments, blanks, |
---|
385 | ! alphabetical ordering, etc.), |
---|
386 | ! removed debug_prints, |
---|
387 | ! removed auxiliary SUBROUTINE get_usm_info, instead, USM flag urban_surface is |
---|
388 | ! defined in MODULE control_parameters (modules.f90) to avoid circular |
---|
389 | ! dependencies, |
---|
390 | ! renamed canopy_heat_flux to pc_heating_rate, as meaning of quantity changed. |
---|
391 | ! |
---|
392 | ! 2007 2016-08-24 15:47:17Z kanani |
---|
393 | ! Initial revision |
---|
394 | ! |
---|
395 | ! |
---|
396 | ! Description: |
---|
397 | ! ------------ |
---|
398 | ! 2016/6/9 - Initial version of the USM (Urban Surface Model) |
---|
399 | ! authors: Jaroslav Resler, Pavel Krc |
---|
400 | ! (Czech Technical University in Prague and Institute of |
---|
401 | ! Computer Science of the Czech Academy of Sciences, Prague) |
---|
402 | ! with contributions: Michal Belda, Nina Benesova, Ondrej Vlcek |
---|
403 | ! partly inspired by PALM LSM (B. Maronga) |
---|
404 | ! parameterizations of Ra checked with TUF3D (E. S. Krayenhoff) |
---|
405 | !> Module for Urban Surface Model (USM) |
---|
406 | !> The module includes: |
---|
407 | !> 1. radiation model with direct/diffuse radiation, shading, reflections |
---|
408 | !> and integration with plant canopy |
---|
409 | !> 2. wall and wall surface model |
---|
410 | !> 3. surface layer energy balance |
---|
411 | !> 4. anthropogenic heat (only from transportation so far) |
---|
412 | !> 5. necessary auxiliary subroutines (reading inputs, writing outputs, |
---|
413 | !> restart simulations, ...) |
---|
414 | !> It also make use of standard radiation and integrates it into |
---|
415 | !> urban surface model. |
---|
416 | !> |
---|
417 | !> Further work: |
---|
418 | !> ------------- |
---|
419 | !> 1. Remove global arrays surfouts, surfoutl and only keep track of radiosity |
---|
420 | !> from surfaces that are visible from local surfaces (i.e. there is a SVF |
---|
421 | !> where target is local). To do that, radiosity will be exchanged after each |
---|
422 | !> reflection step using MPI_Alltoall instead of current MPI_Allgather. |
---|
423 | !> |
---|
424 | !> 2. Temporarily large values of surface heat flux can be observed, up to |
---|
425 | !> 1.2 Km/s, which seem to be not realistic. |
---|
426 | !> |
---|
427 | !> @todo Output of _av variables in case of restarts |
---|
428 | !> @todo Revise flux conversion in energy-balance solver |
---|
429 | !> @todo Check optimizations for RMA operations |
---|
430 | !> @todo Alternatives for MPI_WIN_ALLOCATE? (causes problems with openmpi) |
---|
431 | !> @todo Check for load imbalances in CPU measures, e.g. for exchange_horiz_prog |
---|
432 | !> factor 3 between min and max time |
---|
433 | !> @todo Check divisions in wtend (etc.) calculations for possible division |
---|
434 | !> by zero, e.g. in case fraq(0,m) + fraq(1,m) = 0?! |
---|
435 | !> @todo Use unit 90 for OPEN/CLOSE of input files (FK) |
---|
436 | !> @todo Move plant canopy stuff into plant canopy code |
---|
437 | !------------------------------------------------------------------------------! |
---|
438 | MODULE urban_surface_mod |
---|
439 | |
---|
440 | USE arrays_3d, & |
---|
441 | ONLY: hyp, zu, pt, p, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
442 | |
---|
443 | USE calc_mean_profile_mod, & |
---|
444 | ONLY: calc_mean_profile |
---|
445 | |
---|
446 | USE basic_constants_and_equations_mod, & |
---|
447 | ONLY: c_p, g, kappa, pi, r_d, rho_l, l_v, sigma_sb |
---|
448 | |
---|
449 | USE control_parameters, & |
---|
450 | ONLY: coupling_start_time, topography, dt_3d, humidity, indoor_model, & |
---|
451 | intermediate_timestep_count, initializing_actions, & |
---|
452 | intermediate_timestep_count_max, simulated_time, end_time, & |
---|
453 | timestep_scheme, tsc, coupling_char, io_blocks, io_group, & |
---|
454 | message_string, time_since_reference_point, surface_pressure, & |
---|
455 | pt_surface, large_scale_forcing, lsf_surf, spinup, & |
---|
456 | spinup_pt_mean, spinup_time, time_do3d, dt_do3d, & |
---|
457 | average_count_3d, varnamelength, urban_surface, dz |
---|
458 | |
---|
459 | USE bulk_cloud_model_mod, & |
---|
460 | ONLY: bulk_cloud_model, precipitation |
---|
461 | |
---|
462 | USE cpulog, & |
---|
463 | ONLY: cpu_log, log_point, log_point_s |
---|
464 | |
---|
465 | USE date_and_time_mod, & |
---|
466 | ONLY: time_utc_init |
---|
467 | |
---|
468 | USE grid_variables, & |
---|
469 | ONLY: dx, dy, ddx, ddy, ddx2, ddy2 |
---|
470 | |
---|
471 | USE indices, & |
---|
472 | ONLY: nx, ny, nnx, nny, nnz, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, & |
---|
473 | nysg, nzb, nzt, nbgp, wall_flags_0 |
---|
474 | |
---|
475 | USE, INTRINSIC :: iso_c_binding |
---|
476 | |
---|
477 | USE kinds |
---|
478 | |
---|
479 | USE pegrid |
---|
480 | |
---|
481 | USE radiation_model_mod, & |
---|
482 | ONLY: albedo_type, radiation_interaction, & |
---|
483 | radiation, rad_sw_in, rad_lw_in, rad_sw_out, rad_lw_out, & |
---|
484 | force_radiation_call, iup_u, inorth_u, isouth_u, ieast_u, & |
---|
485 | iwest_u, iup_l, inorth_l, isouth_l, ieast_l, iwest_l, id, & |
---|
486 | iz, iy, ix, nsurf, idsvf, ndsvf, & |
---|
487 | idcsf, ndcsf, kdcsf, pct, & |
---|
488 | nz_urban_b, nz_urban_t, unscheduled_radiation_calls |
---|
489 | |
---|
490 | USE statistics, & |
---|
491 | ONLY: hom, statistic_regions |
---|
492 | |
---|
493 | USE surface_mod, & |
---|
494 | ONLY: get_topography_top_index_ji, get_topography_top_index, & |
---|
495 | ind_pav_green, ind_veg_wall, ind_wat_win, surf_usm_h, & |
---|
496 | surf_usm_v, surface_restore_elements |
---|
497 | |
---|
498 | |
---|
499 | IMPLICIT NONE |
---|
500 | |
---|
501 | ! |
---|
502 | !-- USM model constants |
---|
503 | |
---|
504 | REAL(wp), PARAMETER :: & |
---|
505 | b_ch = 6.04_wp, & !< Clapp & Hornberger exponent |
---|
506 | lambda_h_green_dry = 0.19_wp, & !< heat conductivity for dry soil |
---|
507 | lambda_h_green_sm = 3.44_wp, & !< heat conductivity of the soil matrix |
---|
508 | lambda_h_water = 0.57_wp, & !< heat conductivity of water |
---|
509 | psi_sat = -0.388_wp, & !< soil matrix potential at saturation |
---|
510 | rho_c_soil = 2.19E6_wp, & !< volumetric heat capacity of soil |
---|
511 | rho_c_water = 4.20E6_wp !< volumetric heat capacity of water |
---|
512 | ! m_max_depth = 0.0002_wp ! Maximum capacity of the water reservoir (m) |
---|
513 | |
---|
514 | ! |
---|
515 | !-- Soil parameters I alpha_vg, l_vg_green, n_vg, gamma_w_green_sat |
---|
516 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: soil_pars = RESHAPE( (/ & |
---|
517 | 3.83_wp, 1.250_wp, 1.38_wp, 6.94E-6_wp, & !< soil 1 |
---|
518 | 3.14_wp, -2.342_wp, 1.28_wp, 1.16E-6_wp, & !< soil 2 |
---|
519 | 0.83_wp, -0.588_wp, 1.25_wp, 0.26E-6_wp, & !< soil 3 |
---|
520 | 3.67_wp, -1.977_wp, 1.10_wp, 2.87E-6_wp, & !< soil 4 |
---|
521 | 2.65_wp, 2.500_wp, 1.10_wp, 1.74E-6_wp, & !< soil 5 |
---|
522 | 1.30_wp, 0.400_wp, 1.20_wp, 0.93E-6_wp, & !< soil 6 |
---|
523 | 0.00_wp, 0.00_wp, 0.00_wp, 0.57E-6_wp & !< soil 7 |
---|
524 | /), (/ 4, 7 /) ) |
---|
525 | |
---|
526 | ! |
---|
527 | !-- Soil parameters II swc_sat, fc, wilt, swc_res |
---|
528 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: m_soil_pars = RESHAPE( (/ & |
---|
529 | 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp, & !< soil 1 |
---|
530 | 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp, & !< soil 2 |
---|
531 | 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp, & !< soil 3 |
---|
532 | 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp, & !< soil 4 |
---|
533 | 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp, & !< soil 5 |
---|
534 | 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp, & !< soil 6 |
---|
535 | 0.472_wp, 0.323_wp, 0.171_wp, 0.000_wp & !< soil 7 |
---|
536 | /), (/ 4, 7 /) ) |
---|
537 | ! |
---|
538 | !-- value 9999999.9_wp -> generic available or user-defined value must be set |
---|
539 | !-- otherwise -> no generic variable and user setting is optional |
---|
540 | REAL(wp) :: alpha_vangenuchten = 9999999.9_wp, & !< NAMELIST alpha_vg |
---|
541 | field_capacity = 9999999.9_wp, & !< NAMELIST fc |
---|
542 | hydraulic_conductivity = 9999999.9_wp, & !< NAMELIST gamma_w_green_sat |
---|
543 | l_vangenuchten = 9999999.9_wp, & !< NAMELIST l_vg |
---|
544 | n_vangenuchten = 9999999.9_wp, & !< NAMELIST n_vg |
---|
545 | residual_moisture = 9999999.9_wp, & !< NAMELIST m_res |
---|
546 | saturation_moisture = 9999999.9_wp, & !< NAMELIST m_sat |
---|
547 | wilting_point = 9999999.9_wp !< NAMELIST m_wilt |
---|
548 | |
---|
549 | ! |
---|
550 | !-- configuration parameters (they can be setup in PALM config) |
---|
551 | LOGICAL :: usm_material_model = .TRUE. !< flag parameter indicating wheather the model of heat in materials is used |
---|
552 | LOGICAL :: usm_anthropogenic_heat = .FALSE. !< flag parameter indicating wheather the anthropogenic heat sources |
---|
553 | !< (e.g.transportation) are used |
---|
554 | LOGICAL :: force_radiation_call_l = .FALSE. !< flag parameter for unscheduled radiation model calls |
---|
555 | LOGICAL :: read_wall_temp_3d = .FALSE. |
---|
556 | LOGICAL :: usm_wall_mod = .FALSE. !< reduces conductivity of the first 2 wall layers by factor 0.1 |
---|
557 | |
---|
558 | |
---|
559 | INTEGER(iwp) :: building_type = 1 !< default building type (preleminary setting) |
---|
560 | INTEGER(iwp) :: land_category = 2 !< default category for land surface |
---|
561 | INTEGER(iwp) :: wall_category = 2 !< default category for wall surface over pedestrian zone |
---|
562 | INTEGER(iwp) :: pedestrian_category = 2 !< default category for wall surface in pedestrian zone |
---|
563 | INTEGER(iwp) :: roof_category = 2 !< default category for root surface |
---|
564 | REAL(wp) :: roughness_concrete = 0.001_wp !< roughness length of average concrete surface |
---|
565 | ! |
---|
566 | !-- Indices of input attributes for (above) ground floor level |
---|
567 | INTEGER(iwp) :: ind_alb_wall_agfl = 65 !< index in input list for albedo_type of wall above ground floor level |
---|
568 | INTEGER(iwp) :: ind_alb_wall_gfl = 32 !< index in input list for albedo_type of wall ground floor level |
---|
569 | INTEGER(iwp) :: ind_alb_wall_r = 96 !< index in input list for albedo_type of wall roof |
---|
570 | INTEGER(iwp) :: ind_alb_green_agfl = 83 !< index in input list for albedo_type of green above ground floor level |
---|
571 | INTEGER(iwp) :: ind_alb_green_gfl = 50 !< index in input list for albedo_type of green ground floor level |
---|
572 | INTEGER(iwp) :: ind_alb_green_r = 115 !< index in input list for albedo_type of green roof |
---|
573 | INTEGER(iwp) :: ind_alb_win_agfl = 79 !< index in input list for albedo_type of window fraction |
---|
574 | !< above ground floor level |
---|
575 | INTEGER(iwp) :: ind_alb_win_gfl = 46 !< index in input list for albedo_type of window fraction ground floor level |
---|
576 | INTEGER(iwp) :: ind_alb_win_r = 110 !< index in input list for albedo_type of window fraction roof |
---|
577 | INTEGER(iwp) :: ind_emis_wall_agfl = 64 !< index in input list for wall emissivity, above ground floor level |
---|
578 | INTEGER(iwp) :: ind_emis_wall_gfl = 31 !< index in input list for wall emissivity, ground floor level |
---|
579 | INTEGER(iwp) :: ind_emis_wall_r = 95 !< index in input list for wall emissivity, roof |
---|
580 | INTEGER(iwp) :: ind_emis_green_agfl = 82 !< index in input list for green emissivity, above ground floor level |
---|
581 | INTEGER(iwp) :: ind_emis_green_gfl = 49 !< index in input list for green emissivity, ground floor level |
---|
582 | INTEGER(iwp) :: ind_emis_green_r = 114 !< index in input list for green emissivity, roof |
---|
583 | INTEGER(iwp) :: ind_emis_win_agfl = 77 !< index in input list for window emissivity, above ground floor level |
---|
584 | INTEGER(iwp) :: ind_emis_win_gfl = 44 !< index in input list for window emissivity, ground floor level |
---|
585 | INTEGER(iwp) :: ind_emis_win_r = 108 !< index in input list for window emissivity, roof |
---|
586 | INTEGER(iwp) :: ind_green_frac_w_agfl = 80 !< index in input list for green fraction on wall, above ground floor level |
---|
587 | INTEGER(iwp) :: ind_green_frac_w_gfl = 47 !< index in input list for green fraction on wall, ground floor level |
---|
588 | INTEGER(iwp) :: ind_green_frac_r_agfl = 112 !< index in input list for green fraction on roof, above ground floor level |
---|
589 | INTEGER(iwp) :: ind_green_frac_r_gfl = 111 !< index in input list for green fraction on roof, ground floor level |
---|
590 | INTEGER(iwp) :: ind_hc1_agfl = 58 !< index in input list for heat capacity at first wall layer, |
---|
591 | !< above ground floor level |
---|
592 | INTEGER(iwp) :: ind_hc1_gfl = 25 !< index in input list for heat capacity at first wall layer, ground floor level |
---|
593 | INTEGER(iwp) :: ind_hc1_wall_r = 89 !< index in input list for heat capacity at first wall layer, roof |
---|
594 | INTEGER(iwp) :: ind_hc1_win_agfl = 71 !< index in input list for heat capacity at first window layer, |
---|
595 | !< above ground floor level |
---|
596 | INTEGER(iwp) :: ind_hc1_win_gfl = 38 !< index in input list for heat capacity at first window layer, |
---|
597 | !< ground floor level |
---|
598 | INTEGER(iwp) :: ind_hc1_win_r = 102 !< index in input list for heat capacity at first window layer, roof |
---|
599 | INTEGER(iwp) :: ind_hc2_agfl = 59 !< index in input list for heat capacity at second wall layer, |
---|
600 | !< above ground floor level |
---|
601 | INTEGER(iwp) :: ind_hc2_gfl = 26 !< index in input list for heat capacity at second wall layer, ground floor level |
---|
602 | INTEGER(iwp) :: ind_hc2_wall_r = 90 !< index in input list for heat capacity at second wall layer, roof |
---|
603 | INTEGER(iwp) :: ind_hc2_win_agfl = 72 !< index in input list for heat capacity at second window layer, |
---|
604 | !< above ground floor level |
---|
605 | INTEGER(iwp) :: ind_hc2_win_gfl = 39 !< index in input list for heat capacity at second window layer, |
---|
606 | !< ground floor level |
---|
607 | INTEGER(iwp) :: ind_hc2_win_r = 103 !< index in input list for heat capacity at second window layer, roof |
---|
608 | INTEGER(iwp) :: ind_hc3_agfl = 60 !< index in input list for heat capacity at third wall layer, |
---|
609 | !< above ground floor level |
---|
610 | INTEGER(iwp) :: ind_hc3_gfl = 27 !< index in input list for heat capacity at third wall layer, ground floor level |
---|
611 | INTEGER(iwp) :: ind_hc3_wall_r = 91 !< index in input list for heat capacity at third wall layer, roof |
---|
612 | INTEGER(iwp) :: ind_hc3_win_agfl = 73 !< index in input list for heat capacity at third window layer, |
---|
613 | !< above ground floor level |
---|
614 | INTEGER(iwp) :: ind_hc3_win_gfl = 40 !< index in input list for heat capacity at third window layer, |
---|
615 | !< ground floor level |
---|
616 | INTEGER(iwp) :: ind_hc3_win_r = 104 !< index in input list for heat capacity at third window layer, roof |
---|
617 | INTEGER(iwp) :: ind_gflh = 17 !< index in input list for ground floor level height |
---|
618 | INTEGER(iwp) :: ind_lai_r_agfl = 113 !< index in input list for LAI on roof, above ground floor level |
---|
619 | INTEGER(iwp) :: ind_lai_r_gfl = 113 !< index in input list for LAI on roof, ground floor level |
---|
620 | INTEGER(iwp) :: ind_lai_w_agfl = 81 !< index in input list for LAI on wall, above ground floor level |
---|
621 | INTEGER(iwp) :: ind_lai_w_gfl = 48 !< index in input list for LAI on wall, ground floor level |
---|
622 | INTEGER(iwp) :: ind_tc1_agfl = 61 !< index in input list for thermal conductivity at first wall layer, |
---|
623 | !< above ground floor level |
---|
624 | INTEGER(iwp) :: ind_tc1_gfl = 28 !< index in input list for thermal conductivity at first wall layer, |
---|
625 | !< ground floor level |
---|
626 | INTEGER(iwp) :: ind_tc1_wall_r = 92 !< index in input list for thermal conductivity at first wall layer, roof |
---|
627 | INTEGER(iwp) :: ind_tc1_win_agfl = 74 !< index in input list for thermal conductivity at first window layer, |
---|
628 | !< above ground floor level |
---|
629 | INTEGER(iwp) :: ind_tc1_win_gfl = 41 !< index in input list for thermal conductivity at first window layer, |
---|
630 | !< ground floor level |
---|
631 | INTEGER(iwp) :: ind_tc1_win_r = 105 !< index in input list for thermal conductivity at first window layer, roof |
---|
632 | INTEGER(iwp) :: ind_tc2_agfl = 62 !< index in input list for thermal conductivity at second wall layer, |
---|
633 | !< above ground floor level |
---|
634 | INTEGER(iwp) :: ind_tc2_gfl = 29 !< index in input list for thermal conductivity at second wall layer, |
---|
635 | !< ground floor level |
---|
636 | INTEGER(iwp) :: ind_tc2_wall_r = 93 !< index in input list for thermal conductivity at second wall layer, roof |
---|
637 | INTEGER(iwp) :: ind_tc2_win_agfl = 75 !< index in input list for thermal conductivity at second window layer, |
---|
638 | !< above ground floor level |
---|
639 | INTEGER(iwp) :: ind_tc2_win_gfl = 42 !< index in input list for thermal conductivity at second window layer, |
---|
640 | !< ground floor level |
---|
641 | INTEGER(iwp) :: ind_tc2_win_r = 106 !< index in input list for thermal conductivity at second window layer, |
---|
642 | !< ground floor level |
---|
643 | INTEGER(iwp) :: ind_tc3_agfl = 63 !< index in input list for thermal conductivity at third wall layer, |
---|
644 | !< above ground floor level |
---|
645 | INTEGER(iwp) :: ind_tc3_gfl = 30 !< index in input list for thermal conductivity at third wall layer, |
---|
646 | !< ground floor level |
---|
647 | INTEGER(iwp) :: ind_tc3_wall_r = 94 !< index in input list for thermal conductivity at third wall layer, roof |
---|
648 | INTEGER(iwp) :: ind_tc3_win_agfl = 76 !< index in input list for thermal conductivity at third window layer, |
---|
649 | !< above ground floor level |
---|
650 | INTEGER(iwp) :: ind_tc3_win_gfl = 43 !< index in input list for thermal conductivity at third window layer, |
---|
651 | !< ground floor level |
---|
652 | INTEGER(iwp) :: ind_tc3_win_r = 107 !< index in input list for thermal conductivity at third window layer, roof |
---|
653 | INTEGER(iwp) :: ind_thick_1_agfl = 54 !< index for wall layer thickness - 1st layer above ground floor level |
---|
654 | INTEGER(iwp) :: ind_thick_1_gfl = 21 !< index for wall layer thickness - 1st layer ground floor level |
---|
655 | INTEGER(iwp) :: ind_thick_1_wall_r = 85 !< index for wall layer thickness - 1st layer roof |
---|
656 | INTEGER(iwp) :: ind_thick_1_win_agfl = 67 !< index for window layer thickness - 1st layer above ground floor level |
---|
657 | INTEGER(iwp) :: ind_thick_1_win_gfl = 34 !< index for window layer thickness - 1st layer ground floor level |
---|
658 | INTEGER(iwp) :: ind_thick_1_win_r = 98 !< index for window layer thickness - 1st layer roof |
---|
659 | INTEGER(iwp) :: ind_thick_2_agfl = 55 !< index for wall layer thickness - 2nd layer above ground floor level |
---|
660 | INTEGER(iwp) :: ind_thick_2_gfl = 22 !< index for wall layer thickness - 2nd layer ground floor level |
---|
661 | INTEGER(iwp) :: ind_thick_2_wall_r = 86 !< index for wall layer thickness - 2nd layer roof |
---|
662 | INTEGER(iwp) :: ind_thick_2_win_agfl = 68 !< index for window layer thickness - 2nd layer above ground floor level |
---|
663 | INTEGER(iwp) :: ind_thick_2_win_gfl = 35 !< index for window layer thickness - 2nd layer ground floor level |
---|
664 | INTEGER(iwp) :: ind_thick_2_win_r = 99 !< index for window layer thickness - 2nd layer roof |
---|
665 | INTEGER(iwp) :: ind_thick_3_agfl = 56 !< index for wall layer thickness - 3rd layer above ground floor level |
---|
666 | INTEGER(iwp) :: ind_thick_3_gfl = 23 !< index for wall layer thickness - 3rd layer ground floor level |
---|
667 | INTEGER(iwp) :: ind_thick_3_wall_r = 87 !< index for wall layer thickness - 3rd layer roof |
---|
668 | INTEGER(iwp) :: ind_thick_3_win_agfl = 69 !< index for window layer thickness - 3rd layer above ground floor level |
---|
669 | INTEGER(iwp) :: ind_thick_3_win_gfl = 36 !< index for window layer thickness - 3rd layer ground floor level |
---|
670 | INTEGER(iwp) :: ind_thick_3_win_r = 100 !< index for window layer thickness - 3rd layer roof |
---|
671 | INTEGER(iwp) :: ind_thick_4_agfl = 57 !< index for wall layer thickness - 4th layer above ground floor level |
---|
672 | INTEGER(iwp) :: ind_thick_4_gfl = 24 !< index for wall layer thickness - 4th layer ground floor level |
---|
673 | INTEGER(iwp) :: ind_thick_4_wall_r = 88 !< index for wall layer thickness - 4st layer roof |
---|
674 | INTEGER(iwp) :: ind_thick_4_win_agfl = 70 !< index for window layer thickness - 4th layer above ground floor level |
---|
675 | INTEGER(iwp) :: ind_thick_4_win_gfl = 37 !< index for window layer thickness - 4th layer ground floor level |
---|
676 | INTEGER(iwp) :: ind_thick_4_win_r = 101 !< index for window layer thickness - 4th layer roof |
---|
677 | INTEGER(iwp) :: ind_trans_agfl = 78 !< index in input list for window transmissivity, above ground floor level |
---|
678 | INTEGER(iwp) :: ind_trans_gfl = 45 !< index in input list for window transmissivity, ground floor level |
---|
679 | INTEGER(iwp) :: ind_trans_r = 109 !< index in input list for window transmissivity, roof |
---|
680 | INTEGER(iwp) :: ind_wall_frac_agfl = 53 !< index in input list for wall fraction, above ground floor level |
---|
681 | INTEGER(iwp) :: ind_wall_frac_gfl = 20 !< index in input list for wall fraction, ground floor level |
---|
682 | INTEGER(iwp) :: ind_wall_frac_r = 84 !< index in input list for wall fraction, roof |
---|
683 | INTEGER(iwp) :: ind_win_frac_agfl = 66 !< index in input list for window fraction, above ground floor level |
---|
684 | INTEGER(iwp) :: ind_win_frac_gfl = 33 !< index in input list for window fraction, ground floor level |
---|
685 | INTEGER(iwp) :: ind_win_frac_r = 97 !< index in input list for window fraction, roof |
---|
686 | INTEGER(iwp) :: ind_z0_agfl = 51 !< index in input list for z0, above ground floor level |
---|
687 | INTEGER(iwp) :: ind_z0_gfl = 18 !< index in input list for z0, ground floor level |
---|
688 | INTEGER(iwp) :: ind_z0qh_agfl = 52 !< index in input list for z0h / z0q, above ground floor level |
---|
689 | INTEGER(iwp) :: ind_z0qh_gfl = 19 !< index in input list for z0h / z0q, ground floor level |
---|
690 | INTEGER(iwp) :: ind_green_type_roof = 116 !< index in input list for type of green roof |
---|
691 | |
---|
692 | |
---|
693 | REAL(wp) :: roof_height_limit = 4.0_wp !< height for distinguish between land surfaces and roofs |
---|
694 | REAL(wp) :: ground_floor_level = 4.0_wp !< default ground floor level |
---|
695 | |
---|
696 | |
---|
697 | CHARACTER(37), DIMENSION(0:7), PARAMETER :: building_type_name = (/ & |
---|
698 | 'user-defined ', & !< type 0 |
---|
699 | 'residential - 1950 ', & !< type 1 |
---|
700 | 'residential 1951 - 2000 ', & !< type 2 |
---|
701 | 'residential 2001 - ', & !< type 3 |
---|
702 | 'office - 1950 ', & !< type 4 |
---|
703 | 'office 1951 - 2000 ', & !< type 5 |
---|
704 | 'office 2001 - ', & !< type 6 |
---|
705 | 'bridges ' & !< type 7 |
---|
706 | /) |
---|
707 | ! |
---|
708 | !-- building parameters, 6 different types |
---|
709 | !-- Parameter for urban surface model |
---|
710 | !-- 0 - heat capacity wall surface, 1 - heat capacity of window surface, 2 - heat capacity of green surface |
---|
711 | !-- 3 - thermal conductivity of wall surface, 4 - thermal conductivity of window surface, |
---|
712 | !-- 5 - thermal conductivty of green surface, 6 - wall fraction ground plate, |
---|
713 | !-- 7 - 1st wall layer thickness ground plate, 8 - 2nd wall layer thickness ground plate |
---|
714 | !-- 9 - 3rd wall layer thickness ground plate, 10 - 4th wall layer thickness ground plate, |
---|
715 | !-- 11 - heat capacity 1st/2nd wall layer ground plate, 12 - heat capacity 3rd wall layer ground plate |
---|
716 | !-- 13 - heat capacity 4th wall layer ground plate, 14 - thermal conductivity 1st/2nd wall layer ground plate, |
---|
717 | !-- 15 - thermal conductivity 3rd wall layer ground plate, 16 - thermal conductivity 4th wall layer ground plate |
---|
718 | !-- 17 - ground floor level height, 18 - z0 roughness ground floor level, 19 - z0h/z0g roughness heaat/humidity, |
---|
719 | !-- 20 - wall fraction ground floor level, 21 - 1st wall layer thickness ground floor level, |
---|
720 | !-- 22 - 2nd wall layer thickness ground floor level, 23 - 3rd wall layer thickness ground floor level, |
---|
721 | !-- 24 - 4th wall layer thickness ground floor level, 25 - heat capacity 1st/2nd wall layer ground floor level, |
---|
722 | !-- 26 - heat capacity 3rd wall layer ground floor level, 27 - heat capacity 4th wall layer ground floor level, |
---|
723 | !-- 28 - thermal conductivity 1st/2nd wall layer ground floor level, |
---|
724 | !-- 29 - thermal conductivity 3rd wall layer ground floor level, 30 - thermal conductivity 4th wall layer ground floor level |
---|
725 | !-- 31 - wall emissivity ground floor level, 32 - wall albedo ground floor level, 33 - window fraction ground floor level, |
---|
726 | !-- 34 - 1st window layer thickness ground floor level, 35 - 2nd window layer thickness ground floor level, |
---|
727 | !-- 36 - 3rd window layer thickness ground floor level, 37 - 4th window layer thickness ground floor level, |
---|
728 | !-- 38 - heat capacity 1st/2nd window layer ground floor level, 39 - heat capacity 3rd window layer ground floor level, |
---|
729 | !-- 40 - heat capacity 4th window layer ground floor level, |
---|
730 | !-- 41 - thermal conductivity 1st/2nd window layer ground floor level, |
---|
731 | !-- 42 - thermal conductivity 3rd window layer ground floor level, |
---|
732 | !-- 43 - thermal conductivity 4th window layer ground floor level, 44 - window emissivity ground floor level, |
---|
733 | !-- 45 - window transmissivity ground floor level, 46 - window albedo ground floor level, |
---|
734 | !-- 47 - green fraction ground floor level, 48 - LAI on wall ground floor level, 49 - green emissivity ground floor level, |
---|
735 | !-- 50 - green albedo ground floor level, 51 - z0 roughness above ground floor level, |
---|
736 | !-- 52 - z0h/z0g roughness heat/humidity above ground floor level, 53 - wall fraction above ground floor level |
---|
737 | !-- 54 - 1st wall layer thickness above ground floor level, 55 - 2nd wall layer thickness above ground floor level |
---|
738 | !-- 56 - 3rd wall layer thickness above ground floor level, 57 - 4th wall layer thickness above ground floor level |
---|
739 | !-- 58 - heat capacity 1st/2nd wall layer above ground floor level, |
---|
740 | !-- 59 - heat capacity 3rd wall layer above ground floor level, |
---|
741 | !-- 60 - heat capacity 4th wall layer above ground floor level, |
---|
742 | !-- 61 - thermal conductivity 1st/2nd wall layer above ground floor level, |
---|
743 | !-- 62 - thermal conductivity 3rd wall layer above ground floor level, |
---|
744 | !-- 63 - thermal conductivity 4th wall layer above ground floor level, |
---|
745 | !-- 64 - wall emissivity above ground floor level, 65 - wall albedo above ground floor level, |
---|
746 | !-- 66 - window fraction above ground floor level, 67 - 1st window layer thickness above ground floor level, |
---|
747 | !-- 68 - 2nd thickness window layer above ground floor level, 69 - 3rd window layer thickness above ground floor level, |
---|
748 | !-- 70 - 4th window layer thickness above ground floor level, |
---|
749 | !-- 71 - heat capacity 1st/2nd window layer above ground floor level, |
---|
750 | !-- 72 - heat capacity 3rd window layer above ground floor level, |
---|
751 | !-- 73 - heat capacity 4th window layer above ground floor level, |
---|
752 | !-- 74 - conductivity 1st/2nd window layer above ground floor level, |
---|
753 | !-- 75 - thermal conductivity 3rd window layer above ground floor level, |
---|
754 | !-- 76 - thermal conductivity 4th window layer above ground floor level, 77 - window emissivity above ground floor level, |
---|
755 | !-- 78 - window transmissivity above ground floor level, 79 - window albedo above ground floor level, |
---|
756 | !-- 80 - green fraction above ground floor level, 81 - LAI on wall above ground floor level, |
---|
757 | !-- 82 - green emissivity above ground floor level, 83 - green albedo above ground floor level, |
---|
758 | !-- 84 - wall fraction roof, 85 - 1st wall layer thickness roof, 86 - 2nd wall layer thickness roof, |
---|
759 | !-- 87 - 3rd wall layer thickness roof, 88 - 4th wall layer thickness roof, |
---|
760 | !-- 89 - heat capacity 1st/2nd wall layer roof, 90 - heat capacity 3rd wall layer roof, |
---|
761 | !-- 91 - heat capacity 4th wall layer roof, 92 - thermal conductivity 1st/2nd wall layer roof, |
---|
762 | !-- 93 - thermal conductivity 3rd wall layer roof, 94 - thermal conductivity 4th wall layer roof, |
---|
763 | !-- 95 - wall emissivity roof, 96 - wall albedo roof, 97 - window fraction roof, |
---|
764 | !-- 98 - window 1st layer thickness roof, 99 - window 2nd layer thickness roof, 100 - window 3rd layer thickness roof, |
---|
765 | !-- 101 - window 4th layer thickness, 102 - heat capacity 1st/2nd window layer roof, |
---|
766 | !-- 103 - heat capacity 3rd window layer roof, 104 - heat capacity 4th window layer roof, |
---|
767 | !-- 105 - thermal conductivity 1st/2nd window layer roof, 106 - thermal conductivity 3rd window layer roof, |
---|
768 | !-- 107 - thermal conductivity 4th window layer roof, 108 - window emissivity roof, 109 - window transmissivity roof, |
---|
769 | !-- 110 - window albedo roof, 111 - green fraction roof ground floor level, |
---|
770 | !-- 112 - green fraction roof above ground floor level, 113 - LAI roof, 114 - green emissivity roof, |
---|
771 | !-- 115 - green albedo roof, 116 - green type roof, |
---|
772 | !-- Parameter for indoor model |
---|
773 | !-- 117 - indoor target summer temperature, 118 - indoor target winter temperature, |
---|
774 | !-- 119 - shading factor, 120 - g-value windows, 121 - u-value windows, 122 - basical airflow without occupancy of the room, |
---|
775 | !-- 123 - additional airflow depend of occupancy of the room, 124 - heat recovery efficiency, |
---|
776 | !-- 125 - dynamic parameter specific effective surface, 126 - dynamic parameter innner heatstorage, |
---|
777 | !-- 127 - ratio internal surface/floor area, 128 - maximal heating capacity, 129 - maximal cooling capacity, |
---|
778 | !-- 130 - additional internal heat gains dependent on occupancy of the room, |
---|
779 | !-- 131 - basic internal heat gains without occupancy of the room, 132 - storey height, 133 - ceiling construction height |
---|
780 | |
---|
781 | |
---|
782 | REAL(wp), DIMENSION(0:133,1:7), PARAMETER :: building_pars = RESHAPE( (/ & |
---|
783 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
784 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
785 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
786 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
787 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
788 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
789 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
790 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
791 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
792 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
793 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
794 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
795 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
796 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
797 | 2.1_wp, 0.93_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
798 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
799 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
800 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
801 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
802 | 0.005_wp, 0.01_wp, 0.31_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
803 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
804 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
805 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
806 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
807 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
808 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
809 | 0.1_wp, 0.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
810 | 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 |
---|
811 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
812 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.42_wp, 2000000.0_wp, & !parameter 6-11 |
---|
813 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
814 | 0.01_wp, 0.001_wp, 0.78_wp, & !parameter 18-20 |
---|
815 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
816 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
817 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
818 | 27.0_wp, 0.22_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
819 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
820 | 0.11_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 41-44 |
---|
821 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
822 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.73_wp, 0.005_wp, & !parameter 50-54 |
---|
823 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
824 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
825 | 0.04_wp, 0.92_wp, 27.0_wp, 0.27_wp, & !parameter 63-66 |
---|
826 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
827 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
828 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
829 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
830 | 0.005_wp, 0.01_wp, 0.5_wp, 0.79_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
831 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
832 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
833 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
834 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
835 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
836 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
837 | 0.1_wp, 0.5_wp, 0.0_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
838 | 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 |
---|
839 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
840 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
841 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
842 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
843 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
844 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
845 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
846 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
847 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
848 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
849 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
850 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
851 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
852 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
853 | 0.035_wp, 0.92_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
854 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
855 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
856 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
857 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
858 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
859 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
860 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
861 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
862 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
863 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
864 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
865 | 0.1_wp, 0.5_wp, 0.8_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
866 | 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 |
---|
867 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
868 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
869 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
870 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
871 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
872 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
873 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
874 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
875 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
876 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
877 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
878 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
879 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
880 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
881 | 2.1_wp, 0.93_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
882 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
883 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
884 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
885 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
886 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
887 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
888 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
889 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
890 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
891 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
892 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
893 | 0.1_wp, 1.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
894 | 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 |
---|
895 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
896 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 6-11 |
---|
897 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
898 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
899 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
900 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
901 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
902 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
903 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
904 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, & !parameter 41-44 |
---|
905 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
906 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
907 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
908 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
909 | 0.04_wp, 0.92_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
910 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
911 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
912 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
913 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
914 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
915 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
916 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
917 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
918 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
919 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
920 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
921 | 0.1_wp, 1.5_wp, 0.65_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
922 | 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 |
---|
923 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
924 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
925 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
926 | 0.01_wp, 0.001_wp, 0.475_wp, & !parameter 18-20 |
---|
927 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
928 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
929 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
930 | 27.0_wp, 0.525_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
931 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
932 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
933 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
934 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.425_wp, 0.005_wp, & !parameter 50-54 |
---|
935 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
936 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
937 | 0.035_wp, 0.92_wp, 27.0_wp, 0.575_wp, & !parameter 63-66 |
---|
938 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
939 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
940 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
941 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
942 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
943 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
944 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
945 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
946 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
947 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
948 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
949 | 0.1_wp, 1.5_wp, 0.9_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
950 | 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 |
---|
951 | 20000.0_wp, 20000.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
952 | 1.0_wp, 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 6-11 |
---|
953 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 4.0_wp, & !parameter 12-17 |
---|
954 | 0.01_wp, 0.001_wp, 1.0_wp, & !parameter 18-20 |
---|
955 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 21-25 |
---|
956 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, & !parameter 26-28 |
---|
957 | 1.0_wp, 1.0_wp, 0.9_wp, & !parameter 29-31 |
---|
958 | 27.0_wp, 0.0_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
959 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
960 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, & !parameter 41-44 |
---|
961 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
962 | 5.0_wp, 0.001_wp, 0.0001_wp, 1.0_wp, 0.29_wp, & !parameter 50-54 |
---|
963 | 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 55-58 |
---|
964 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, & !parameter 59-62 |
---|
965 | 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 63-66 |
---|
966 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
967 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
968 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
969 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
970 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, 1848000.0_wp, & !parameter 85-90 |
---|
971 | 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
972 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
973 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
974 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
975 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
976 | 299.15_wp, 293.15_wp, 0.8_wp, 100.0_wp, 100.0_wp, & !parameter 117-121 |
---|
977 | 20.0_wp, 20.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 4.5_wp, & !parameter 122-127 |
---|
978 | 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) |
---|
979 | /), & |
---|
980 | (/134, 7/) ) |
---|
981 | |
---|
982 | ! |
---|
983 | !-- Type for surface temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
984 | TYPE t_surf_vertical |
---|
985 | REAL(wp), DIMENSION(:), ALLOCATABLE :: t |
---|
986 | END TYPE t_surf_vertical |
---|
987 | ! |
---|
988 | !-- Type for wall temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
989 | TYPE t_wall_vertical |
---|
990 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t |
---|
991 | END TYPE t_wall_vertical |
---|
992 | |
---|
993 | TYPE surf_type_usm |
---|
994 | REAL(wp), DIMENSION(:), ALLOCATABLE :: var_usm_1d !< 1D prognostic variable |
---|
995 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: var_usm_2d !< 2D prognostic variable |
---|
996 | END TYPE surf_type_usm |
---|
997 | |
---|
998 | TYPE(surf_type_usm), POINTER :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
999 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
1000 | |
---|
1001 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h_1, & !< |
---|
1002 | m_liq_usm_h_2 !< |
---|
1003 | |
---|
1004 | TYPE(surf_type_usm), DIMENSION(:), POINTER :: & |
---|
1005 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
1006 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
1007 | |
---|
1008 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
1009 | m_liq_usm_v_1, & !< |
---|
1010 | m_liq_usm_v_2 !< |
---|
1011 | |
---|
1012 | TYPE(surf_type_usm), TARGET :: tm_liq_usm_h_m !< liquid water reservoir tendency (m), horizontal surface elements |
---|
1013 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: tm_liq_usm_v_m !< liquid water reservoir tendency (m), |
---|
1014 | !< vertical surface elements |
---|
1015 | |
---|
1016 | ! |
---|
1017 | !-- anthropogenic heat sources |
---|
1018 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: aheat !< daily average of anthropogenic heat (W/m2) |
---|
1019 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: aheatprof !< diurnal profiles of anthropogenic heat |
---|
1020 | !< for particular layers |
---|
1021 | INTEGER(iwp) :: naheatlayers = 1 !< number of layers of anthropogenic heat |
---|
1022 | |
---|
1023 | ! |
---|
1024 | !-- wall surface model |
---|
1025 | !-- wall surface model constants |
---|
1026 | INTEGER(iwp), PARAMETER :: nzb_wall = 0 !< inner side of the wall model (to be switched) |
---|
1027 | INTEGER(iwp), PARAMETER :: nzt_wall = 3 !< outer side of the wall model (to be switched) |
---|
1028 | INTEGER(iwp), PARAMETER :: nzw = 4 !< number of wall layers (fixed for now) |
---|
1029 | |
---|
1030 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
1031 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
1032 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
1033 | !< normalized soil, wall and roof, window and |
---|
1034 | !<green layer depths (m/m) |
---|
1035 | |
---|
1036 | REAL(wp) :: wall_inner_temperature = 295.0_wp !< temperature of the inner wall |
---|
1037 | !< surface (~22 degrees C) (K) |
---|
1038 | REAL(wp) :: roof_inner_temperature = 295.0_wp !< temperature of the inner roof |
---|
1039 | !< surface (~22 degrees C) (K) |
---|
1040 | REAL(wp) :: soil_inner_temperature = 288.0_wp !< temperature of the deep soil |
---|
1041 | !< (~15 degrees C) (K) |
---|
1042 | REAL(wp) :: window_inner_temperature = 295.0_wp !< temperature of the inner window |
---|
1043 | !< surface (~22 degrees C) (K) |
---|
1044 | |
---|
1045 | REAL(wp) :: m_total = 0.0_wp !< weighted total water content of the soil (m3/m3) |
---|
1046 | INTEGER(iwp) :: soil_type |
---|
1047 | |
---|
1048 | ! |
---|
1049 | !-- surface and material model variables for walls, ground, roofs |
---|
1050 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn !< normalized wall layer depths (m) |
---|
1051 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_window !< normalized window layer depths (m) |
---|
1052 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_green !< normalized green layer depths (m) |
---|
1053 | |
---|
1054 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h |
---|
1055 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h_p |
---|
1056 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h |
---|
1057 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h_p |
---|
1058 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h |
---|
1059 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h_p |
---|
1060 | |
---|
1061 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_1 |
---|
1062 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_2 |
---|
1063 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_1 |
---|
1064 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_2 |
---|
1065 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_1 |
---|
1066 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_2 |
---|
1067 | |
---|
1068 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v |
---|
1069 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v_p |
---|
1070 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v |
---|
1071 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v_p |
---|
1072 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v |
---|
1073 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v_p |
---|
1074 | |
---|
1075 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_1 |
---|
1076 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_2 |
---|
1077 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_1 |
---|
1078 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_2 |
---|
1079 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_1 |
---|
1080 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_2 |
---|
1081 | |
---|
1082 | ! |
---|
1083 | !-- Energy balance variables |
---|
1084 | !-- parameters of the land, roof and wall surfaces |
---|
1085 | |
---|
1086 | REAL(wp), DIMENSION(:,:), POINTER :: t_wall_h, t_wall_h_p |
---|
1087 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_1, t_wall_h_2 |
---|
1088 | REAL(wp), DIMENSION(:,:), POINTER :: t_window_h, t_window_h_p |
---|
1089 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_1, t_window_h_2 |
---|
1090 | REAL(wp), DIMENSION(:,:), POINTER :: t_green_h, t_green_h_p |
---|
1091 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_1, t_green_h_2 |
---|
1092 | REAL(wp), DIMENSION(:,:), POINTER :: swc_h, rootfr_h, wilt_h, fc_h, swc_sat_h, swc_h_p, swc_res_h |
---|
1093 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_1, rootfr_h_1, & |
---|
1094 | wilt_h_1, fc_h_1, swc_sat_h_1, swc_h_2, swc_res_h_1 |
---|
1095 | |
---|
1096 | |
---|
1097 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_wall_v, t_wall_v_p |
---|
1098 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_1, t_wall_v_2 |
---|
1099 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_window_v, t_window_v_p |
---|
1100 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_1, t_window_v_2 |
---|
1101 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_green_v, t_green_v_p |
---|
1102 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_1, t_green_v_2 |
---|
1103 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: swc_v, swc_v_p |
---|
1104 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_1, swc_v_2 |
---|
1105 | |
---|
1106 | ! |
---|
1107 | !-- Surface and material parameters classes (surface_type) |
---|
1108 | !-- albedo, emissivity, lambda_surf, roughness, thickness, volumetric heat capacity, thermal conductivity |
---|
1109 | INTEGER(iwp) :: n_surface_types !< number of the wall type categories |
---|
1110 | INTEGER(iwp), PARAMETER :: n_surface_params = 9 !< number of parameters for each type of the wall |
---|
1111 | INTEGER(iwp), PARAMETER :: ialbedo = 1 !< albedo of the surface |
---|
1112 | INTEGER(iwp), PARAMETER :: iemiss = 2 !< emissivity of the surface |
---|
1113 | INTEGER(iwp), PARAMETER :: ilambdas = 3 !< heat conductivity lambda S between surface |
---|
1114 | !< and material ( W m-2 K-1 ) |
---|
1115 | INTEGER(iwp), PARAMETER :: irough = 4 !< roughness length z0 for movements |
---|
1116 | INTEGER(iwp), PARAMETER :: iroughh = 5 !< roughness length z0h for scalars |
---|
1117 | !< (heat, humidity,...) |
---|
1118 | INTEGER(iwp), PARAMETER :: icsurf = 6 !< Surface skin layer heat capacity (J m-2 K-1 ) |
---|
1119 | INTEGER(iwp), PARAMETER :: ithick = 7 !< thickness of the surface (wall, roof, land) ( m ) |
---|
1120 | INTEGER(iwp), PARAMETER :: irhoC = 8 !< volumetric heat capacity rho*C of |
---|
1121 | !< the material ( J m-3 K-1 ) |
---|
1122 | INTEGER(iwp), PARAMETER :: ilambdah = 9 !< thermal conductivity lambda H |
---|
1123 | !< of the wall (W m-1 K-1 ) |
---|
1124 | CHARACTER(12), DIMENSION(:), ALLOCATABLE :: surface_type_names !< names of wall types (used only for reports) |
---|
1125 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: surface_type_codes !< codes of wall types |
---|
1126 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: surface_params !< parameters of wall types |
---|
1127 | |
---|
1128 | ! |
---|
1129 | !-- interfaces of subroutines accessed from outside of this module |
---|
1130 | INTERFACE usm_3d_data_averaging |
---|
1131 | MODULE PROCEDURE usm_3d_data_averaging |
---|
1132 | END INTERFACE usm_3d_data_averaging |
---|
1133 | |
---|
1134 | INTERFACE usm_boundary_condition |
---|
1135 | MODULE PROCEDURE usm_boundary_condition |
---|
1136 | END INTERFACE usm_boundary_condition |
---|
1137 | |
---|
1138 | INTERFACE usm_check_data_output |
---|
1139 | MODULE PROCEDURE usm_check_data_output |
---|
1140 | END INTERFACE usm_check_data_output |
---|
1141 | |
---|
1142 | INTERFACE usm_check_parameters |
---|
1143 | MODULE PROCEDURE usm_check_parameters |
---|
1144 | END INTERFACE usm_check_parameters |
---|
1145 | |
---|
1146 | INTERFACE usm_data_output_3d |
---|
1147 | MODULE PROCEDURE usm_data_output_3d |
---|
1148 | END INTERFACE usm_data_output_3d |
---|
1149 | |
---|
1150 | INTERFACE usm_define_netcdf_grid |
---|
1151 | MODULE PROCEDURE usm_define_netcdf_grid |
---|
1152 | END INTERFACE usm_define_netcdf_grid |
---|
1153 | |
---|
1154 | INTERFACE usm_init |
---|
1155 | MODULE PROCEDURE usm_init |
---|
1156 | END INTERFACE usm_init |
---|
1157 | |
---|
1158 | INTERFACE usm_init_arrays |
---|
1159 | MODULE PROCEDURE usm_init_arrays |
---|
1160 | END INTERFACE usm_init_arrays |
---|
1161 | |
---|
1162 | INTERFACE usm_material_heat_model |
---|
1163 | MODULE PROCEDURE usm_material_heat_model |
---|
1164 | END INTERFACE usm_material_heat_model |
---|
1165 | |
---|
1166 | INTERFACE usm_green_heat_model |
---|
1167 | MODULE PROCEDURE usm_green_heat_model |
---|
1168 | END INTERFACE usm_green_heat_model |
---|
1169 | |
---|
1170 | INTERFACE usm_parin |
---|
1171 | MODULE PROCEDURE usm_parin |
---|
1172 | END INTERFACE usm_parin |
---|
1173 | |
---|
1174 | INTERFACE usm_rrd_local |
---|
1175 | MODULE PROCEDURE usm_rrd_local |
---|
1176 | END INTERFACE usm_rrd_local |
---|
1177 | |
---|
1178 | INTERFACE usm_surface_energy_balance |
---|
1179 | MODULE PROCEDURE usm_surface_energy_balance |
---|
1180 | END INTERFACE usm_surface_energy_balance |
---|
1181 | |
---|
1182 | INTERFACE usm_swap_timelevel |
---|
1183 | MODULE PROCEDURE usm_swap_timelevel |
---|
1184 | END INTERFACE usm_swap_timelevel |
---|
1185 | |
---|
1186 | INTERFACE usm_wrd_local |
---|
1187 | MODULE PROCEDURE usm_wrd_local |
---|
1188 | END INTERFACE usm_wrd_local |
---|
1189 | |
---|
1190 | |
---|
1191 | SAVE |
---|
1192 | |
---|
1193 | PRIVATE |
---|
1194 | |
---|
1195 | ! |
---|
1196 | !-- Public functions |
---|
1197 | PUBLIC usm_boundary_condition, usm_check_parameters, usm_init, & |
---|
1198 | usm_rrd_local, & |
---|
1199 | usm_surface_energy_balance, usm_material_heat_model, & |
---|
1200 | usm_swap_timelevel, usm_check_data_output, usm_3d_data_averaging, & |
---|
1201 | usm_data_output_3d, usm_define_netcdf_grid, usm_parin, & |
---|
1202 | usm_wrd_local, usm_init_arrays |
---|
1203 | |
---|
1204 | ! |
---|
1205 | !-- Public parameters, constants and initial values |
---|
1206 | PUBLIC usm_anthropogenic_heat, usm_material_model, usm_wall_mod, & |
---|
1207 | usm_green_heat_model, building_pars, & |
---|
1208 | nzb_wall, nzt_wall, t_wall_h, t_wall_v, & |
---|
1209 | t_window_h, t_window_v, building_type |
---|
1210 | |
---|
1211 | |
---|
1212 | |
---|
1213 | CONTAINS |
---|
1214 | |
---|
1215 | !------------------------------------------------------------------------------! |
---|
1216 | ! Description: |
---|
1217 | ! ------------ |
---|
1218 | !> This subroutine creates the necessary indices of the urban surfaces |
---|
1219 | !> and plant canopy and it allocates the needed arrays for USM |
---|
1220 | !------------------------------------------------------------------------------! |
---|
1221 | SUBROUTINE usm_init_arrays |
---|
1222 | |
---|
1223 | IMPLICIT NONE |
---|
1224 | |
---|
1225 | INTEGER(iwp) :: l |
---|
1226 | |
---|
1227 | CALL location_message( 'initializing and allocating urban surfaces', .FALSE. ) |
---|
1228 | |
---|
1229 | ! |
---|
1230 | !-- Allocate radiation arrays which are part of the new data type. |
---|
1231 | !-- For horizontal surfaces. |
---|
1232 | ALLOCATE ( surf_usm_h%surfhf(1:surf_usm_h%ns) ) |
---|
1233 | ALLOCATE ( surf_usm_h%rad_net_l(1:surf_usm_h%ns) ) |
---|
1234 | ! |
---|
1235 | !-- For vertical surfaces |
---|
1236 | DO l = 0, 3 |
---|
1237 | ALLOCATE ( surf_usm_v(l)%surfhf(1:surf_usm_v(l)%ns) ) |
---|
1238 | ALLOCATE ( surf_usm_v(l)%rad_net_l(1:surf_usm_v(l)%ns) ) |
---|
1239 | ENDDO |
---|
1240 | |
---|
1241 | ! |
---|
1242 | !-- Wall surface model |
---|
1243 | !-- allocate arrays for wall surface model and define pointers |
---|
1244 | !-- allocate array of wall types and wall parameters |
---|
1245 | ALLOCATE ( surf_usm_h%surface_types(1:surf_usm_h%ns) ) |
---|
1246 | ALLOCATE ( surf_usm_h%building_type(1:surf_usm_h%ns) ) |
---|
1247 | ALLOCATE ( surf_usm_h%building_type_name(1:surf_usm_h%ns) ) |
---|
1248 | surf_usm_h%building_type = 0 |
---|
1249 | surf_usm_h%building_type_name = 'none' |
---|
1250 | DO l = 0, 3 |
---|
1251 | ALLOCATE ( surf_usm_v(l)%surface_types(1:surf_usm_v(l)%ns) ) |
---|
1252 | ALLOCATE ( surf_usm_v(l)%building_type(1:surf_usm_v(l)%ns) ) |
---|
1253 | ALLOCATE ( surf_usm_v(l)%building_type_name(1:surf_usm_v(l)%ns) ) |
---|
1254 | surf_usm_v(l)%building_type = 0 |
---|
1255 | surf_usm_v(l)%building_type_name = 'none' |
---|
1256 | ENDDO |
---|
1257 | ! |
---|
1258 | !-- Allocate albedo_type and albedo. Each surface element |
---|
1259 | !-- has 3 values, 0: wall fraction, 1: green fraction, 2: window fraction. |
---|
1260 | ALLOCATE ( surf_usm_h%albedo_type(0:2,1:surf_usm_h%ns) ) |
---|
1261 | ALLOCATE ( surf_usm_h%albedo(0:2,1:surf_usm_h%ns) ) |
---|
1262 | surf_usm_h%albedo_type = albedo_type |
---|
1263 | DO l = 0, 3 |
---|
1264 | ALLOCATE ( surf_usm_v(l)%albedo_type(0:2,1:surf_usm_v(l)%ns) ) |
---|
1265 | ALLOCATE ( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns) ) |
---|
1266 | surf_usm_v(l)%albedo_type = albedo_type |
---|
1267 | ENDDO |
---|
1268 | |
---|
1269 | ! |
---|
1270 | !-- Allocate indoor target temperature for summer and winter |
---|
1271 | ALLOCATE ( surf_usm_h%target_temp_summer(1:surf_usm_h%ns) ) |
---|
1272 | ALLOCATE ( surf_usm_h%target_temp_winter(1:surf_usm_h%ns) ) |
---|
1273 | DO l = 0, 3 |
---|
1274 | ALLOCATE ( surf_usm_v(l)%target_temp_summer(1:surf_usm_v(l)%ns) ) |
---|
1275 | ALLOCATE ( surf_usm_v(l)%target_temp_winter(1:surf_usm_v(l)%ns) ) |
---|
1276 | ENDDO |
---|
1277 | ! |
---|
1278 | !-- In case the indoor model is applied, allocate memory for waste heat |
---|
1279 | !-- and indoor temperature. |
---|
1280 | IF ( indoor_model ) THEN |
---|
1281 | ALLOCATE ( surf_usm_h%waste_heat(1:surf_usm_h%ns) ) |
---|
1282 | surf_usm_h%waste_heat = 0.0_wp |
---|
1283 | DO l = 0, 3 |
---|
1284 | ALLOCATE ( surf_usm_v(l)%waste_heat(1:surf_usm_v(l)%ns) ) |
---|
1285 | surf_usm_v(l)%waste_heat = 0.0_wp |
---|
1286 | ENDDO |
---|
1287 | ENDIF |
---|
1288 | ! |
---|
1289 | !-- Allocate flag indicating ground floor level surface elements |
---|
1290 | ALLOCATE ( surf_usm_h%ground_level(1:surf_usm_h%ns) ) |
---|
1291 | DO l = 0, 3 |
---|
1292 | ALLOCATE ( surf_usm_v(l)%ground_level(1:surf_usm_v(l)%ns) ) |
---|
1293 | ENDDO |
---|
1294 | ! |
---|
1295 | !-- Allocate arrays for relative surface fraction. |
---|
1296 | !-- 0 - wall fraction, 1 - green fraction, 2 - window fraction |
---|
1297 | ALLOCATE ( surf_usm_h%frac(0:2,1:surf_usm_h%ns) ) |
---|
1298 | surf_usm_h%frac = 0.0_wp |
---|
1299 | DO l = 0, 3 |
---|
1300 | ALLOCATE ( surf_usm_v(l)%frac(0:2,1:surf_usm_v(l)%ns) ) |
---|
1301 | surf_usm_v(l)%frac = 0.0_wp |
---|
1302 | ENDDO |
---|
1303 | |
---|
1304 | ! |
---|
1305 | !-- wall and roof surface parameters. First for horizontal surfaces |
---|
1306 | ALLOCATE ( surf_usm_h%isroof_surf(1:surf_usm_h%ns) ) |
---|
1307 | ALLOCATE ( surf_usm_h%lambda_surf(1:surf_usm_h%ns) ) |
---|
1308 | ALLOCATE ( surf_usm_h%lambda_surf_window(1:surf_usm_h%ns) ) |
---|
1309 | ALLOCATE ( surf_usm_h%lambda_surf_green(1:surf_usm_h%ns) ) |
---|
1310 | ALLOCATE ( surf_usm_h%c_surface(1:surf_usm_h%ns) ) |
---|
1311 | ALLOCATE ( surf_usm_h%c_surface_window(1:surf_usm_h%ns) ) |
---|
1312 | ALLOCATE ( surf_usm_h%c_surface_green(1:surf_usm_h%ns) ) |
---|
1313 | ALLOCATE ( surf_usm_h%transmissivity(1:surf_usm_h%ns) ) |
---|
1314 | ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns) ) |
---|
1315 | ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns) ) |
---|
1316 | ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns) ) |
---|
1317 | ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns) ) |
---|
1318 | ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns) ) |
---|
1319 | ALLOCATE ( surf_usm_h%green_type_roof(1:surf_usm_h%ns) ) |
---|
1320 | ALLOCATE ( surf_usm_h%r_s(1:surf_usm_h%ns) ) |
---|
1321 | |
---|
1322 | ! |
---|
1323 | !-- For vertical surfaces. |
---|
1324 | DO l = 0, 3 |
---|
1325 | ALLOCATE ( surf_usm_v(l)%lambda_surf(1:surf_usm_v(l)%ns) ) |
---|
1326 | ALLOCATE ( surf_usm_v(l)%c_surface(1:surf_usm_v(l)%ns) ) |
---|
1327 | ALLOCATE ( surf_usm_v(l)%lambda_surf_window(1:surf_usm_v(l)%ns) ) |
---|
1328 | ALLOCATE ( surf_usm_v(l)%c_surface_window(1:surf_usm_v(l)%ns) ) |
---|
1329 | ALLOCATE ( surf_usm_v(l)%lambda_surf_green(1:surf_usm_v(l)%ns) ) |
---|
1330 | ALLOCATE ( surf_usm_v(l)%c_surface_green(1:surf_usm_v(l)%ns) ) |
---|
1331 | ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns) ) |
---|
1332 | ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns) ) |
---|
1333 | ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns) ) |
---|
1334 | ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) |
---|
1335 | ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) |
---|
1336 | ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) |
---|
1337 | ALLOCATE ( surf_usm_v(l)%r_s(1:surf_usm_v(l)%ns) ) |
---|
1338 | ENDDO |
---|
1339 | |
---|
1340 | ! |
---|
1341 | !-- allocate wall and roof material parameters. First for horizontal surfaces |
---|
1342 | ALLOCATE ( surf_usm_h%thickness_wall(1:surf_usm_h%ns) ) |
---|
1343 | ALLOCATE ( surf_usm_h%thickness_window(1:surf_usm_h%ns) ) |
---|
1344 | ALLOCATE ( surf_usm_h%thickness_green(1:surf_usm_h%ns) ) |
---|
1345 | ALLOCATE ( surf_usm_h%lambda_h(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1346 | ALLOCATE ( surf_usm_h%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1347 | ALLOCATE ( surf_usm_h%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1348 | ALLOCATE ( surf_usm_h%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1349 | ALLOCATE ( surf_usm_h%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1350 | ALLOCATE ( surf_usm_h%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1351 | |
---|
1352 | ALLOCATE ( surf_usm_h%rho_c_total_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1353 | ALLOCATE ( surf_usm_h%n_vg_green(1:surf_usm_h%ns) ) |
---|
1354 | ALLOCATE ( surf_usm_h%alpha_vg_green(1:surf_usm_h%ns) ) |
---|
1355 | ALLOCATE ( surf_usm_h%l_vg_green(1:surf_usm_h%ns) ) |
---|
1356 | ALLOCATE ( surf_usm_h%gamma_w_green_sat(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1357 | ALLOCATE ( surf_usm_h%lambda_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1358 | ALLOCATE ( surf_usm_h%gamma_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1359 | ALLOCATE ( surf_usm_h%tswc_h_m(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1360 | |
---|
1361 | ! |
---|
1362 | !-- For vertical surfaces. |
---|
1363 | DO l = 0, 3 |
---|
1364 | ALLOCATE ( surf_usm_v(l)%thickness_wall(1:surf_usm_v(l)%ns) ) |
---|
1365 | ALLOCATE ( surf_usm_v(l)%thickness_window(1:surf_usm_v(l)%ns) ) |
---|
1366 | ALLOCATE ( surf_usm_v(l)%thickness_green(1:surf_usm_v(l)%ns) ) |
---|
1367 | ALLOCATE ( surf_usm_v(l)%lambda_h(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1368 | ALLOCATE ( surf_usm_v(l)%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1369 | ALLOCATE ( surf_usm_v(l)%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1370 | ALLOCATE ( surf_usm_v(l)%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1371 | ALLOCATE ( surf_usm_v(l)%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1372 | ALLOCATE ( surf_usm_v(l)%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1373 | ENDDO |
---|
1374 | |
---|
1375 | ! |
---|
1376 | !-- allocate green wall and roof vegetation and soil parameters. First horizontal surfaces |
---|
1377 | ALLOCATE ( surf_usm_h%g_d(1:surf_usm_h%ns) ) |
---|
1378 | ALLOCATE ( surf_usm_h%c_liq(1:surf_usm_h%ns) ) |
---|
1379 | ALLOCATE ( surf_usm_h%qsws_liq(1:surf_usm_h%ns) ) |
---|
1380 | ALLOCATE ( surf_usm_h%qsws_veg(1:surf_usm_h%ns) ) |
---|
1381 | ALLOCATE ( surf_usm_h%r_canopy(1:surf_usm_h%ns) ) |
---|
1382 | ALLOCATE ( surf_usm_h%r_canopy_min(1:surf_usm_h%ns) ) |
---|
1383 | ALLOCATE ( surf_usm_h%qsws_eb(1:surf_usm_h%ns) ) |
---|
1384 | ALLOCATE ( surf_usm_h%pt_10cm(1:surf_usm_h%ns) ) |
---|
1385 | ALLOCATE ( surf_usm_h%pt_2m(1:surf_usm_h%ns) ) |
---|
1386 | |
---|
1387 | ! |
---|
1388 | !-- For vertical surfaces. |
---|
1389 | DO l = 0, 3 |
---|
1390 | ALLOCATE ( surf_usm_v(l)%g_d(1:surf_usm_v(l)%ns) ) |
---|
1391 | ALLOCATE ( surf_usm_v(l)%c_liq(1:surf_usm_v(l)%ns) ) |
---|
1392 | ALLOCATE ( surf_usm_v(l)%qsws_liq(1:surf_usm_v(l)%ns) ) |
---|
1393 | ALLOCATE ( surf_usm_v(l)%qsws_veg(1:surf_usm_v(l)%ns) ) |
---|
1394 | ALLOCATE ( surf_usm_v(l)%qsws_eb(1:surf_usm_v(l)%ns) ) |
---|
1395 | ALLOCATE ( surf_usm_v(l)%r_canopy(1:surf_usm_v(l)%ns) ) |
---|
1396 | ALLOCATE ( surf_usm_v(l)%r_canopy_min(1:surf_usm_v(l)%ns) ) |
---|
1397 | ALLOCATE ( surf_usm_v(l)%pt_10cm(1:surf_usm_v(l)%ns) ) |
---|
1398 | ENDDO |
---|
1399 | |
---|
1400 | ! |
---|
1401 | !-- allocate wall and roof layers sizes. For horizontal surfaces. |
---|
1402 | ALLOCATE ( zwn(nzb_wall:nzt_wall) ) |
---|
1403 | ALLOCATE ( surf_usm_h%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1404 | ALLOCATE ( zwn_window(nzb_wall:nzt_wall) ) |
---|
1405 | ALLOCATE ( surf_usm_h%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1406 | ALLOCATE ( zwn_green(nzb_wall:nzt_wall) ) |
---|
1407 | ALLOCATE ( surf_usm_h%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1408 | ALLOCATE ( surf_usm_h%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1409 | ALLOCATE ( surf_usm_h%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1410 | ALLOCATE ( surf_usm_h%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1411 | ALLOCATE ( surf_usm_h%zw(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1412 | ALLOCATE ( surf_usm_h%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1413 | ALLOCATE ( surf_usm_h%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1414 | ALLOCATE ( surf_usm_h%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1415 | ALLOCATE ( surf_usm_h%zw_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1416 | ALLOCATE ( surf_usm_h%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1417 | ALLOCATE ( surf_usm_h%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1418 | ALLOCATE ( surf_usm_h%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1419 | ALLOCATE ( surf_usm_h%zw_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1420 | |
---|
1421 | ! |
---|
1422 | !-- For vertical surfaces. |
---|
1423 | DO l = 0, 3 |
---|
1424 | ALLOCATE ( surf_usm_v(l)%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1425 | ALLOCATE ( surf_usm_v(l)%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1426 | ALLOCATE ( surf_usm_v(l)%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1427 | ALLOCATE ( surf_usm_v(l)%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1428 | ALLOCATE ( surf_usm_v(l)%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1429 | ALLOCATE ( surf_usm_v(l)%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1430 | ALLOCATE ( surf_usm_v(l)%zw(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1431 | ALLOCATE ( surf_usm_v(l)%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1432 | ALLOCATE ( surf_usm_v(l)%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1433 | ALLOCATE ( surf_usm_v(l)%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1434 | ALLOCATE ( surf_usm_v(l)%zw_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1435 | ALLOCATE ( surf_usm_v(l)%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1436 | ALLOCATE ( surf_usm_v(l)%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1437 | ALLOCATE ( surf_usm_v(l)%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1438 | ALLOCATE ( surf_usm_v(l)%zw_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1439 | ENDDO |
---|
1440 | |
---|
1441 | ! |
---|
1442 | !-- allocate wall and roof temperature arrays, for horizontal walls |
---|
1443 | ! |
---|
1444 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1445 | !-- might be already allocated. |
---|
1446 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
1447 | ALLOCATE ( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
1448 | IF ( .NOT. ALLOCATED( t_surf_wall_h_2 ) ) & |
---|
1449 | ALLOCATE ( t_surf_wall_h_2(1:surf_usm_h%ns) ) |
---|
1450 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
1451 | ALLOCATE ( t_wall_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1452 | IF ( .NOT. ALLOCATED( t_wall_h_2 ) ) & |
---|
1453 | ALLOCATE ( t_wall_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1454 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
1455 | ALLOCATE ( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
1456 | IF ( .NOT. ALLOCATED( t_surf_window_h_2 ) ) & |
---|
1457 | ALLOCATE ( t_surf_window_h_2(1:surf_usm_h%ns) ) |
---|
1458 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
1459 | ALLOCATE ( t_window_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1460 | IF ( .NOT. ALLOCATED( t_window_h_2 ) ) & |
---|
1461 | ALLOCATE ( t_window_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1462 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
1463 | ALLOCATE ( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
1464 | IF ( .NOT. ALLOCATED( t_surf_green_h_2 ) ) & |
---|
1465 | ALLOCATE ( t_surf_green_h_2(1:surf_usm_h%ns) ) |
---|
1466 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
1467 | ALLOCATE ( t_green_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1468 | IF ( .NOT. ALLOCATED( t_green_h_2 ) ) & |
---|
1469 | ALLOCATE ( t_green_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1470 | IF ( .NOT. ALLOCATED( swc_h_1 ) ) & |
---|
1471 | ALLOCATE ( swc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1472 | IF ( .NOT. ALLOCATED( swc_sat_h_1 ) ) & |
---|
1473 | ALLOCATE ( swc_sat_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1474 | IF ( .NOT. ALLOCATED( swc_res_h_1 ) ) & |
---|
1475 | ALLOCATE ( swc_res_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1476 | IF ( .NOT. ALLOCATED( swc_h_2 ) ) & |
---|
1477 | ALLOCATE ( swc_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1478 | IF ( .NOT. ALLOCATED( rootfr_h_1 ) ) & |
---|
1479 | ALLOCATE ( rootfr_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1480 | IF ( .NOT. ALLOCATED( wilt_h_1 ) ) & |
---|
1481 | ALLOCATE ( wilt_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1482 | IF ( .NOT. ALLOCATED( fc_h_1 ) ) & |
---|
1483 | ALLOCATE ( fc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1484 | |
---|
1485 | IF ( .NOT. ALLOCATED( m_liq_usm_h_1%var_usm_1d ) ) & |
---|
1486 | ALLOCATE ( m_liq_usm_h_1%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1487 | IF ( .NOT. ALLOCATED( m_liq_usm_h_2%var_usm_1d ) ) & |
---|
1488 | ALLOCATE ( m_liq_usm_h_2%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1489 | |
---|
1490 | ! |
---|
1491 | !-- initial assignment of the pointers |
---|
1492 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
1493 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
1494 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
1495 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
1496 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
1497 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
1498 | m_liq_usm_h => m_liq_usm_h_1; m_liq_usm_h_p => m_liq_usm_h_2 |
---|
1499 | swc_h => swc_h_1; swc_h_p => swc_h_2 |
---|
1500 | swc_sat_h => swc_sat_h_1 |
---|
1501 | swc_res_h => swc_res_h_1 |
---|
1502 | rootfr_h => rootfr_h_1 |
---|
1503 | wilt_h => wilt_h_1 |
---|
1504 | fc_h => fc_h_1 |
---|
1505 | |
---|
1506 | ! |
---|
1507 | !-- allocate wall and roof temperature arrays, for vertical walls if required |
---|
1508 | ! |
---|
1509 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1510 | !-- might be already allocated. |
---|
1511 | DO l = 0, 3 |
---|
1512 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(l)%t ) ) & |
---|
1513 | ALLOCATE ( t_surf_wall_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1514 | IF ( .NOT. ALLOCATED( t_surf_wall_v_2(l)%t ) ) & |
---|
1515 | ALLOCATE ( t_surf_wall_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1516 | IF ( .NOT. ALLOCATED( t_wall_v_1(l)%t ) ) & |
---|
1517 | ALLOCATE ( t_wall_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1518 | IF ( .NOT. ALLOCATED( t_wall_v_2(l)%t ) ) & |
---|
1519 | ALLOCATE ( t_wall_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1520 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(l)%t ) ) & |
---|
1521 | ALLOCATE ( t_surf_window_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1522 | IF ( .NOT. ALLOCATED( t_surf_window_v_2(l)%t ) ) & |
---|
1523 | ALLOCATE ( t_surf_window_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1524 | IF ( .NOT. ALLOCATED( t_window_v_1(l)%t ) ) & |
---|
1525 | ALLOCATE ( t_window_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1526 | IF ( .NOT. ALLOCATED( t_window_v_2(l)%t ) ) & |
---|
1527 | ALLOCATE ( t_window_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1528 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(l)%t ) ) & |
---|
1529 | ALLOCATE ( t_surf_green_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1530 | IF ( .NOT. ALLOCATED( t_surf_green_v_2(l)%t ) ) & |
---|
1531 | ALLOCATE ( t_surf_green_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1532 | IF ( .NOT. ALLOCATED( t_green_v_1(l)%t ) ) & |
---|
1533 | ALLOCATE ( t_green_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1534 | IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) ) & |
---|
1535 | ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1536 | IF ( .NOT. ALLOCATED( m_liq_usm_v_1(l)%var_usm_1d ) ) & |
---|
1537 | ALLOCATE ( m_liq_usm_v_1(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1538 | IF ( .NOT. ALLOCATED( m_liq_usm_v_2(l)%var_usm_1d ) ) & |
---|
1539 | ALLOCATE ( m_liq_usm_v_2(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1540 | IF ( .NOT. ALLOCATED( swc_v_1(l)%t ) ) & |
---|
1541 | ALLOCATE ( swc_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1542 | IF ( .NOT. ALLOCATED( swc_v_2(l)%t ) ) & |
---|
1543 | ALLOCATE ( swc_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1544 | ENDDO |
---|
1545 | ! |
---|
1546 | !-- initial assignment of the pointers |
---|
1547 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
1548 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
1549 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
1550 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
1551 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
1552 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
1553 | m_liq_usm_v => m_liq_usm_v_1; m_liq_usm_v_p => m_liq_usm_v_2 |
---|
1554 | swc_v => swc_v_1; swc_v_p => swc_v_2 |
---|
1555 | |
---|
1556 | ! |
---|
1557 | !-- Allocate intermediate timestep arrays. For horizontal surfaces. |
---|
1558 | ALLOCATE ( surf_usm_h%tt_surface_wall_m(1:surf_usm_h%ns) ) |
---|
1559 | ALLOCATE ( surf_usm_h%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1560 | ALLOCATE ( surf_usm_h%tt_surface_window_m(1:surf_usm_h%ns) ) |
---|
1561 | ALLOCATE ( surf_usm_h%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1562 | ALLOCATE ( surf_usm_h%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1563 | ALLOCATE ( surf_usm_h%tt_surface_green_m(1:surf_usm_h%ns) ) |
---|
1564 | |
---|
1565 | ! |
---|
1566 | !-- Allocate intermediate timestep arrays |
---|
1567 | !-- Horizontal surfaces |
---|
1568 | ALLOCATE ( tm_liq_usm_h_m%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1569 | ! |
---|
1570 | !-- Horizontal surfaces |
---|
1571 | DO l = 0, 3 |
---|
1572 | ALLOCATE ( tm_liq_usm_v_m(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1573 | ENDDO |
---|
1574 | |
---|
1575 | ! |
---|
1576 | !-- Set inital values for prognostic quantities |
---|
1577 | IF ( ALLOCATED( surf_usm_h%tt_surface_wall_m ) ) surf_usm_h%tt_surface_wall_m = 0.0_wp |
---|
1578 | IF ( ALLOCATED( surf_usm_h%tt_wall_m ) ) surf_usm_h%tt_wall_m = 0.0_wp |
---|
1579 | IF ( ALLOCATED( surf_usm_h%tt_surface_window_m ) ) surf_usm_h%tt_surface_window_m = 0.0_wp |
---|
1580 | IF ( ALLOCATED( surf_usm_h%tt_window_m ) ) surf_usm_h%tt_window_m = 0.0_wp |
---|
1581 | IF ( ALLOCATED( surf_usm_h%tt_green_m ) ) surf_usm_h%tt_green_m = 0.0_wp |
---|
1582 | IF ( ALLOCATED( surf_usm_h%tt_surface_green_m ) ) surf_usm_h%tt_surface_green_m = 0.0_wp |
---|
1583 | ! |
---|
1584 | !-- Now, for vertical surfaces |
---|
1585 | DO l = 0, 3 |
---|
1586 | ALLOCATE ( surf_usm_v(l)%tt_surface_wall_m(1:surf_usm_v(l)%ns) ) |
---|
1587 | ALLOCATE ( surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1588 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_wall_m ) ) surf_usm_v(l)%tt_surface_wall_m = 0.0_wp |
---|
1589 | IF ( ALLOCATED( surf_usm_v(l)%tt_wall_m ) ) surf_usm_v(l)%tt_wall_m = 0.0_wp |
---|
1590 | ALLOCATE ( surf_usm_v(l)%tt_surface_window_m(1:surf_usm_v(l)%ns) ) |
---|
1591 | ALLOCATE ( surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1592 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_window_m ) ) surf_usm_v(l)%tt_surface_window_m = 0.0_wp |
---|
1593 | IF ( ALLOCATED( surf_usm_v(l)%tt_window_m ) ) surf_usm_v(l)%tt_window_m = 0.0_wp |
---|
1594 | ALLOCATE ( surf_usm_v(l)%tt_surface_green_m(1:surf_usm_v(l)%ns) ) |
---|
1595 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_green_m ) ) surf_usm_v(l)%tt_surface_green_m = 0.0_wp |
---|
1596 | ALLOCATE ( surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1597 | IF ( ALLOCATED( surf_usm_v(l)%tt_green_m ) ) surf_usm_v(l)%tt_green_m = 0.0_wp |
---|
1598 | ENDDO |
---|
1599 | ! |
---|
1600 | !-- allocate wall heat flux output array and set initial values. For horizontal surfaces |
---|
1601 | ! ALLOCATE ( surf_usm_h%wshf(1:surf_usm_h%ns) ) !can be removed |
---|
1602 | ALLOCATE ( surf_usm_h%wshf_eb(1:surf_usm_h%ns) ) |
---|
1603 | ALLOCATE ( surf_usm_h%wghf_eb(1:surf_usm_h%ns) ) |
---|
1604 | ALLOCATE ( surf_usm_h%wghf_eb_window(1:surf_usm_h%ns) ) |
---|
1605 | ALLOCATE ( surf_usm_h%wghf_eb_green(1:surf_usm_h%ns) ) |
---|
1606 | ALLOCATE ( surf_usm_h%iwghf_eb(1:surf_usm_h%ns) ) |
---|
1607 | ALLOCATE ( surf_usm_h%iwghf_eb_window(1:surf_usm_h%ns) ) |
---|
1608 | IF ( ALLOCATED( surf_usm_h%wshf ) ) surf_usm_h%wshf = 0.0_wp |
---|
1609 | IF ( ALLOCATED( surf_usm_h%wshf_eb ) ) surf_usm_h%wshf_eb = 0.0_wp |
---|
1610 | IF ( ALLOCATED( surf_usm_h%wghf_eb ) ) surf_usm_h%wghf_eb = 0.0_wp |
---|
1611 | IF ( ALLOCATED( surf_usm_h%wghf_eb_window ) ) surf_usm_h%wghf_eb_window = 0.0_wp |
---|
1612 | IF ( ALLOCATED( surf_usm_h%wghf_eb_green ) ) surf_usm_h%wghf_eb_green = 0.0_wp |
---|
1613 | IF ( ALLOCATED( surf_usm_h%iwghf_eb ) ) surf_usm_h%iwghf_eb = 0.0_wp |
---|
1614 | IF ( ALLOCATED( surf_usm_h%iwghf_eb_window ) ) surf_usm_h%iwghf_eb_window = 0.0_wp |
---|
1615 | ! |
---|
1616 | !-- Now, for vertical surfaces |
---|
1617 | DO l = 0, 3 |
---|
1618 | ! ALLOCATE ( surf_usm_v(l)%wshf(1:surf_usm_v(l)%ns) ) ! can be removed |
---|
1619 | ALLOCATE ( surf_usm_v(l)%wshf_eb(1:surf_usm_v(l)%ns) ) |
---|
1620 | ALLOCATE ( surf_usm_v(l)%wghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1621 | ALLOCATE ( surf_usm_v(l)%wghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1622 | ALLOCATE ( surf_usm_v(l)%wghf_eb_green(1:surf_usm_v(l)%ns) ) |
---|
1623 | ALLOCATE ( surf_usm_v(l)%iwghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1624 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1625 | IF ( ALLOCATED( surf_usm_v(l)%wshf ) ) surf_usm_v(l)%wshf = 0.0_wp |
---|
1626 | IF ( ALLOCATED( surf_usm_v(l)%wshf_eb ) ) surf_usm_v(l)%wshf_eb = 0.0_wp |
---|
1627 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb ) ) surf_usm_v(l)%wghf_eb = 0.0_wp |
---|
1628 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_window ) ) surf_usm_v(l)%wghf_eb_window = 0.0_wp |
---|
1629 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_green ) ) surf_usm_v(l)%wghf_eb_green = 0.0_wp |
---|
1630 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb ) ) surf_usm_v(l)%iwghf_eb = 0.0_wp |
---|
1631 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) ) surf_usm_v(l)%iwghf_eb_window = 0.0_wp |
---|
1632 | ENDDO |
---|
1633 | |
---|
1634 | CALL location_message( 'finished', .TRUE. ) |
---|
1635 | |
---|
1636 | END SUBROUTINE usm_init_arrays |
---|
1637 | |
---|
1638 | |
---|
1639 | !------------------------------------------------------------------------------! |
---|
1640 | ! Description: |
---|
1641 | ! ------------ |
---|
1642 | !> Sum up and time-average urban surface output quantities as well as allocate |
---|
1643 | !> the array necessary for storing the average. |
---|
1644 | !------------------------------------------------------------------------------! |
---|
1645 | SUBROUTINE usm_3d_data_averaging( mode, variable ) |
---|
1646 | |
---|
1647 | IMPLICIT NONE |
---|
1648 | |
---|
1649 | CHARACTER(LEN=*), INTENT(IN) :: mode |
---|
1650 | CHARACTER(LEN=*), INTENT(IN) :: variable |
---|
1651 | |
---|
1652 | INTEGER(iwp) :: i, j, k, l, m, ids, idsint, iwl, istat !< runnin indices |
---|
1653 | CHARACTER(LEN=varnamelength) :: var !< trimmed variable |
---|
1654 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
1655 | CHARACTER(LEN=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
1656 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
1657 | |
---|
1658 | IF ( variable(1:4) == 'usm_' ) THEN ! is such a check really rquired? |
---|
1659 | |
---|
1660 | ! |
---|
1661 | !-- find the real name of the variable |
---|
1662 | ids = -1 |
---|
1663 | l = -1 |
---|
1664 | var = TRIM(variable) |
---|
1665 | DO i = 0, nd-1 |
---|
1666 | k = len(TRIM(var)) |
---|
1667 | j = len(TRIM(dirname(i))) |
---|
1668 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
1669 | ids = i |
---|
1670 | idsint = dirint(ids) |
---|
1671 | var = var(:k-j) |
---|
1672 | EXIT |
---|
1673 | ENDIF |
---|
1674 | ENDDO |
---|
1675 | l = idsint - 2 ! horisontal direction index - terible hack ! |
---|
1676 | IF ( l < 0 .OR. l > 3 ) THEN |
---|
1677 | l = -1 |
---|
1678 | END IF |
---|
1679 | IF ( ids == -1 ) THEN |
---|
1680 | var = TRIM(variable) |
---|
1681 | ENDIF |
---|
1682 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
1683 | ! |
---|
1684 | !-- wall layers |
---|
1685 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
1686 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1687 | var = var(1:10) |
---|
1688 | ELSE |
---|
1689 | ! |
---|
1690 | !-- wrong wall layer index |
---|
1691 | RETURN |
---|
1692 | ENDIF |
---|
1693 | ENDIF |
---|
1694 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
1695 | ! |
---|
1696 | !-- wall layers |
---|
1697 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
1698 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1699 | var = var(1:12) |
---|
1700 | ELSE |
---|
1701 | ! |
---|
1702 | !-- wrong window layer index |
---|
1703 | RETURN |
---|
1704 | ENDIF |
---|
1705 | ENDIF |
---|
1706 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
1707 | ! |
---|
1708 | !-- wall layers |
---|
1709 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
1710 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1711 | var = var(1:11) |
---|
1712 | ELSE |
---|
1713 | ! |
---|
1714 | !-- wrong green layer index |
---|
1715 | RETURN |
---|
1716 | ENDIF |
---|
1717 | ENDIF |
---|
1718 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
1719 | ! |
---|
1720 | !-- swc layers |
---|
1721 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
1722 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1723 | var = var(1:7) |
---|
1724 | ELSE |
---|
1725 | ! |
---|
1726 | !-- wrong swc layer index |
---|
1727 | RETURN |
---|
1728 | ENDIF |
---|
1729 | ENDIF |
---|
1730 | |
---|
1731 | IF ( mode == 'allocate' ) THEN |
---|
1732 | |
---|
1733 | SELECT CASE ( TRIM( var ) ) |
---|
1734 | |
---|
1735 | CASE ( 'usm_wshf' ) |
---|
1736 | ! |
---|
1737 | !-- array of sensible heat flux from surfaces |
---|
1738 | !-- land surfaces |
---|
1739 | IF ( l == -1 ) THEN |
---|
1740 | IF ( .NOT. ALLOCATED(surf_usm_h%wshf_eb_av) ) THEN |
---|
1741 | ALLOCATE ( surf_usm_h%wshf_eb_av(1:surf_usm_h%ns) ) |
---|
1742 | surf_usm_h%wshf_eb_av = 0.0_wp |
---|
1743 | ENDIF |
---|
1744 | ELSE |
---|
1745 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wshf_eb_av) ) THEN |
---|
1746 | ALLOCATE ( surf_usm_v(l)%wshf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1747 | surf_usm_v(l)%wshf_eb_av = 0.0_wp |
---|
1748 | ENDIF |
---|
1749 | ENDIF |
---|
1750 | |
---|
1751 | CASE ( 'usm_qsws' ) |
---|
1752 | ! |
---|
1753 | !-- array of latent heat flux from surfaces |
---|
1754 | !-- land surfaces |
---|
1755 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_eb_av) ) THEN |
---|
1756 | ALLOCATE ( surf_usm_h%qsws_eb_av(1:surf_usm_h%ns) ) |
---|
1757 | surf_usm_h%qsws_eb_av = 0.0_wp |
---|
1758 | ELSE |
---|
1759 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_eb_av) ) THEN |
---|
1760 | ALLOCATE ( surf_usm_v(l)%qsws_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1761 | surf_usm_v(l)%qsws_eb_av = 0.0_wp |
---|
1762 | ENDIF |
---|
1763 | ENDIF |
---|
1764 | |
---|
1765 | CASE ( 'usm_qsws_veg' ) |
---|
1766 | ! |
---|
1767 | !-- array of latent heat flux from vegetation surfaces |
---|
1768 | !-- land surfaces |
---|
1769 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_veg_av) ) THEN |
---|
1770 | ALLOCATE ( surf_usm_h%qsws_veg_av(1:surf_usm_h%ns) ) |
---|
1771 | surf_usm_h%qsws_veg_av = 0.0_wp |
---|
1772 | ELSE |
---|
1773 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_veg_av) ) THEN |
---|
1774 | ALLOCATE ( surf_usm_v(l)%qsws_veg_av(1:surf_usm_v(l)%ns) ) |
---|
1775 | surf_usm_v(l)%qsws_veg_av = 0.0_wp |
---|
1776 | ENDIF |
---|
1777 | ENDIF |
---|
1778 | |
---|
1779 | CASE ( 'usm_qsws_liq' ) |
---|
1780 | ! |
---|
1781 | !-- array of latent heat flux from surfaces with liquid |
---|
1782 | !-- land surfaces |
---|
1783 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_liq_av) ) THEN |
---|
1784 | ALLOCATE ( surf_usm_h%qsws_liq_av(1:surf_usm_h%ns) ) |
---|
1785 | surf_usm_h%qsws_liq_av = 0.0_wp |
---|
1786 | ELSE |
---|
1787 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_liq_av) ) THEN |
---|
1788 | ALLOCATE ( surf_usm_v(l)%qsws_liq_av(1:surf_usm_v(l)%ns) ) |
---|
1789 | surf_usm_v(l)%qsws_liq_av = 0.0_wp |
---|
1790 | ENDIF |
---|
1791 | ENDIF |
---|
1792 | ! |
---|
1793 | !-- Please note, the following output quantities belongs to the |
---|
1794 | !-- individual tile fractions - ground heat flux at wall-, window-, |
---|
1795 | !-- and green fraction. Aggregated ground-heat flux is treated |
---|
1796 | !-- accordingly in average_3d_data, sum_up_3d_data, etc.. |
---|
1797 | CASE ( 'usm_wghf' ) |
---|
1798 | ! |
---|
1799 | !-- array of heat flux from ground (wall, roof, land) |
---|
1800 | IF ( l == -1 ) THEN |
---|
1801 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_av) ) THEN |
---|
1802 | ALLOCATE ( surf_usm_h%wghf_eb_av(1:surf_usm_h%ns) ) |
---|
1803 | surf_usm_h%wghf_eb_av = 0.0_wp |
---|
1804 | ENDIF |
---|
1805 | ELSE |
---|
1806 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_av) ) THEN |
---|
1807 | ALLOCATE ( surf_usm_v(l)%wghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1808 | surf_usm_v(l)%wghf_eb_av = 0.0_wp |
---|
1809 | ENDIF |
---|
1810 | ENDIF |
---|
1811 | |
---|
1812 | CASE ( 'usm_wghf_window' ) |
---|
1813 | ! |
---|
1814 | !-- array of heat flux from window ground (wall, roof, land) |
---|
1815 | IF ( l == -1 ) THEN |
---|
1816 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_window_av) ) THEN |
---|
1817 | ALLOCATE ( surf_usm_h%wghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
1818 | surf_usm_h%wghf_eb_window_av = 0.0_wp |
---|
1819 | ENDIF |
---|
1820 | ELSE |
---|
1821 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_window_av) ) THEN |
---|
1822 | ALLOCATE ( surf_usm_v(l)%wghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
1823 | surf_usm_v(l)%wghf_eb_window_av = 0.0_wp |
---|
1824 | ENDIF |
---|
1825 | ENDIF |
---|
1826 | |
---|
1827 | CASE ( 'usm_wghf_green' ) |
---|
1828 | ! |
---|
1829 | !-- array of heat flux from green ground (wall, roof, land) |
---|
1830 | IF ( l == -1 ) THEN |
---|
1831 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_green_av) ) THEN |
---|
1832 | ALLOCATE ( surf_usm_h%wghf_eb_green_av(1:surf_usm_h%ns) ) |
---|
1833 | surf_usm_h%wghf_eb_green_av = 0.0_wp |
---|
1834 | ENDIF |
---|
1835 | ELSE |
---|
1836 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_green_av) ) THEN |
---|
1837 | ALLOCATE ( surf_usm_v(l)%wghf_eb_green_av(1:surf_usm_v(l)%ns) ) |
---|
1838 | surf_usm_v(l)%wghf_eb_green_av = 0.0_wp |
---|
1839 | ENDIF |
---|
1840 | ENDIF |
---|
1841 | |
---|
1842 | CASE ( 'usm_iwghf' ) |
---|
1843 | ! |
---|
1844 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
1845 | IF ( l == -1 ) THEN |
---|
1846 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_av) ) THEN |
---|
1847 | ALLOCATE ( surf_usm_h%iwghf_eb_av(1:surf_usm_h%ns) ) |
---|
1848 | surf_usm_h%iwghf_eb_av = 0.0_wp |
---|
1849 | ENDIF |
---|
1850 | ELSE |
---|
1851 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_av) ) THEN |
---|
1852 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1853 | surf_usm_v(l)%iwghf_eb_av = 0.0_wp |
---|
1854 | ENDIF |
---|
1855 | ENDIF |
---|
1856 | |
---|
1857 | CASE ( 'usm_iwghf_window' ) |
---|
1858 | ! |
---|
1859 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
1860 | IF ( l == -1 ) THEN |
---|
1861 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_window_av) ) THEN |
---|
1862 | ALLOCATE ( surf_usm_h%iwghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
1863 | surf_usm_h%iwghf_eb_window_av = 0.0_wp |
---|
1864 | ENDIF |
---|
1865 | ELSE |
---|
1866 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_window_av) ) THEN |
---|
1867 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
1868 | surf_usm_v(l)%iwghf_eb_window_av = 0.0_wp |
---|
1869 | ENDIF |
---|
1870 | ENDIF |
---|
1871 | |
---|
1872 | CASE ( 'usm_t_surf_wall' ) |
---|
1873 | ! |
---|
1874 | !-- surface temperature for surfaces |
---|
1875 | IF ( l == -1 ) THEN |
---|
1876 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_wall_av) ) THEN |
---|
1877 | ALLOCATE ( surf_usm_h%t_surf_wall_av(1:surf_usm_h%ns) ) |
---|
1878 | surf_usm_h%t_surf_wall_av = 0.0_wp |
---|
1879 | ENDIF |
---|
1880 | ELSE |
---|
1881 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_wall_av) ) THEN |
---|
1882 | ALLOCATE ( surf_usm_v(l)%t_surf_wall_av(1:surf_usm_v(l)%ns) ) |
---|
1883 | surf_usm_v(l)%t_surf_wall_av = 0.0_wp |
---|
1884 | ENDIF |
---|
1885 | ENDIF |
---|
1886 | |
---|
1887 | CASE ( 'usm_t_surf_window' ) |
---|
1888 | ! |
---|
1889 | !-- surface temperature for window surfaces |
---|
1890 | IF ( l == -1 ) THEN |
---|
1891 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_window_av) ) THEN |
---|
1892 | ALLOCATE ( surf_usm_h%t_surf_window_av(1:surf_usm_h%ns) ) |
---|
1893 | surf_usm_h%t_surf_window_av = 0.0_wp |
---|
1894 | ENDIF |
---|
1895 | ELSE |
---|
1896 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_window_av) ) THEN |
---|
1897 | ALLOCATE ( surf_usm_v(l)%t_surf_window_av(1:surf_usm_v(l)%ns) ) |
---|
1898 | surf_usm_v(l)%t_surf_window_av = 0.0_wp |
---|
1899 | ENDIF |
---|
1900 | ENDIF |
---|
1901 | |
---|
1902 | CASE ( 'usm_t_surf_green' ) |
---|
1903 | ! |
---|
1904 | !-- surface temperature for green surfaces |
---|
1905 | IF ( l == -1 ) THEN |
---|
1906 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_green_av) ) THEN |
---|
1907 | ALLOCATE ( surf_usm_h%t_surf_green_av(1:surf_usm_h%ns) ) |
---|
1908 | surf_usm_h%t_surf_green_av = 0.0_wp |
---|
1909 | ENDIF |
---|
1910 | ELSE |
---|
1911 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_green_av) ) THEN |
---|
1912 | ALLOCATE ( surf_usm_v(l)%t_surf_green_av(1:surf_usm_v(l)%ns) ) |
---|
1913 | surf_usm_v(l)%t_surf_green_av = 0.0_wp |
---|
1914 | ENDIF |
---|
1915 | ENDIF |
---|
1916 | |
---|
1917 | CASE ( 'usm_theta_10cm' ) |
---|
1918 | ! |
---|
1919 | !-- near surface (10cm) temperature for whole surfaces |
---|
1920 | IF ( l == -1 ) THEN |
---|
1921 | IF ( .NOT. ALLOCATED(surf_usm_h%pt_10cm_av) ) THEN |
---|
1922 | ALLOCATE ( surf_usm_h%pt_10cm_av(1:surf_usm_h%ns) ) |
---|
1923 | surf_usm_h%pt_10cm_av = 0.0_wp |
---|
1924 | ENDIF |
---|
1925 | ELSE |
---|
1926 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%pt_10cm_av) ) THEN |
---|
1927 | ALLOCATE ( surf_usm_v(l)%pt_10cm_av(1:surf_usm_v(l)%ns) ) |
---|
1928 | surf_usm_v(l)%pt_10cm_av = 0.0_wp |
---|
1929 | ENDIF |
---|
1930 | ENDIF |
---|
1931 | |
---|
1932 | CASE ( 'usm_t_wall' ) |
---|
1933 | ! |
---|
1934 | !-- wall temperature for iwl layer of walls and land |
---|
1935 | IF ( l == -1 ) THEN |
---|
1936 | IF ( .NOT. ALLOCATED(surf_usm_h%t_wall_av) ) THEN |
---|
1937 | ALLOCATE ( surf_usm_h%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1938 | surf_usm_h%t_wall_av = 0.0_wp |
---|
1939 | ENDIF |
---|
1940 | ELSE |
---|
1941 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_wall_av) ) THEN |
---|
1942 | ALLOCATE ( surf_usm_v(l)%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1943 | surf_usm_v(l)%t_wall_av = 0.0_wp |
---|
1944 | ENDIF |
---|
1945 | ENDIF |
---|
1946 | |
---|
1947 | CASE ( 'usm_t_window' ) |
---|
1948 | ! |
---|
1949 | !-- window temperature for iwl layer of walls and land |
---|
1950 | IF ( l == -1 ) THEN |
---|
1951 | IF ( .NOT. ALLOCATED(surf_usm_h%t_window_av) ) THEN |
---|
1952 | ALLOCATE ( surf_usm_h%t_window_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1953 | surf_usm_h%t_window_av = 0.0_wp |
---|
1954 | ENDIF |
---|
1955 | ELSE |
---|
1956 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_window_av) ) THEN |
---|
1957 | ALLOCATE ( surf_usm_v(l)%t_window_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1958 | surf_usm_v(l)%t_window_av = 0.0_wp |
---|
1959 | ENDIF |
---|
1960 | ENDIF |
---|
1961 | |
---|
1962 | CASE ( 'usm_t_green' ) |
---|
1963 | ! |
---|
1964 | !-- green temperature for iwl layer of walls and land |
---|
1965 | IF ( l == -1 ) THEN |
---|
1966 | IF ( .NOT. ALLOCATED(surf_usm_h%t_green_av) ) THEN |
---|
1967 | ALLOCATE ( surf_usm_h%t_green_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1968 | surf_usm_h%t_green_av = 0.0_wp |
---|
1969 | ENDIF |
---|
1970 | ELSE |
---|
1971 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_green_av) ) THEN |
---|
1972 | ALLOCATE ( surf_usm_v(l)%t_green_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1973 | surf_usm_v(l)%t_green_av = 0.0_wp |
---|
1974 | ENDIF |
---|
1975 | ENDIF |
---|
1976 | CASE ( 'usm_swc' ) |
---|
1977 | ! |
---|
1978 | !-- soil water content for iwl layer of walls and land |
---|
1979 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%swc_av) ) THEN |
---|
1980 | ALLOCATE ( surf_usm_h%swc_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1981 | surf_usm_h%swc_av = 0.0_wp |
---|
1982 | ELSE |
---|
1983 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%swc_av) ) THEN |
---|
1984 | ALLOCATE ( surf_usm_v(l)%swc_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1985 | surf_usm_v(l)%swc_av = 0.0_wp |
---|
1986 | ENDIF |
---|
1987 | ENDIF |
---|
1988 | |
---|
1989 | CASE DEFAULT |
---|
1990 | CONTINUE |
---|
1991 | |
---|
1992 | END SELECT |
---|
1993 | |
---|
1994 | ELSEIF ( mode == 'sum' ) THEN |
---|
1995 | |
---|
1996 | SELECT CASE ( TRIM( var ) ) |
---|
1997 | |
---|
1998 | CASE ( 'usm_wshf' ) |
---|
1999 | ! |
---|
2000 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2001 | IF ( l == -1 ) THEN |
---|
2002 | DO m = 1, surf_usm_h%ns |
---|
2003 | surf_usm_h%wshf_eb_av(m) = & |
---|
2004 | surf_usm_h%wshf_eb_av(m) + & |
---|
2005 | surf_usm_h%wshf_eb(m) |
---|
2006 | ENDDO |
---|
2007 | ELSE |
---|
2008 | DO m = 1, surf_usm_v(l)%ns |
---|
2009 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2010 | surf_usm_v(l)%wshf_eb_av(m) + & |
---|
2011 | surf_usm_v(l)%wshf_eb(m) |
---|
2012 | ENDDO |
---|
2013 | ENDIF |
---|
2014 | |
---|
2015 | CASE ( 'usm_qsws' ) |
---|
2016 | ! |
---|
2017 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2018 | IF ( l == -1 ) THEN |
---|
2019 | DO m = 1, surf_usm_h%ns |
---|
2020 | surf_usm_h%qsws_eb_av(m) = & |
---|
2021 | surf_usm_h%qsws_eb_av(m) + & |
---|
2022 | surf_usm_h%qsws_eb(m) |
---|
2023 | ENDDO |
---|
2024 | ELSE |
---|
2025 | DO m = 1, surf_usm_v(l)%ns |
---|
2026 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2027 | surf_usm_v(l)%qsws_eb_av(m) + & |
---|
2028 | surf_usm_v(l)%qsws_eb(m) |
---|
2029 | ENDDO |
---|
2030 | ENDIF |
---|
2031 | |
---|
2032 | CASE ( 'usm_qsws_veg' ) |
---|
2033 | ! |
---|
2034 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2035 | IF ( l == -1 ) THEN |
---|
2036 | DO m = 1, surf_usm_h%ns |
---|
2037 | surf_usm_h%qsws_veg_av(m) = & |
---|
2038 | surf_usm_h%qsws_veg_av(m) + & |
---|
2039 | surf_usm_h%qsws_veg(m) |
---|
2040 | ENDDO |
---|
2041 | ELSE |
---|
2042 | DO m = 1, surf_usm_v(l)%ns |
---|
2043 | surf_usm_v(l)%qsws_veg_av(m) = & |
---|
2044 | surf_usm_v(l)%qsws_veg_av(m) + & |
---|
2045 | surf_usm_v(l)%qsws_veg(m) |
---|
2046 | ENDDO |
---|
2047 | ENDIF |
---|
2048 | |
---|
2049 | CASE ( 'usm_qsws_liq' ) |
---|
2050 | ! |
---|
2051 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2052 | IF ( l == -1 ) THEN |
---|
2053 | DO m = 1, surf_usm_h%ns |
---|
2054 | surf_usm_h%qsws_liq_av(m) = & |
---|
2055 | surf_usm_h%qsws_liq_av(m) + & |
---|
2056 | surf_usm_h%qsws_liq(m) |
---|
2057 | ENDDO |
---|
2058 | ELSE |
---|
2059 | DO m = 1, surf_usm_v(l)%ns |
---|
2060 | surf_usm_v(l)%qsws_liq_av(m) = & |
---|
2061 | surf_usm_v(l)%qsws_liq_av(m) + & |
---|
2062 | surf_usm_v(l)%qsws_liq(m) |
---|
2063 | ENDDO |
---|
2064 | ENDIF |
---|
2065 | |
---|
2066 | CASE ( 'usm_wghf' ) |
---|
2067 | ! |
---|
2068 | !-- array of heat flux from ground (wall, roof, land) |
---|
2069 | IF ( l == -1 ) THEN |
---|
2070 | DO m = 1, surf_usm_h%ns |
---|
2071 | surf_usm_h%wghf_eb_av(m) = & |
---|
2072 | surf_usm_h%wghf_eb_av(m) + & |
---|
2073 | surf_usm_h%wghf_eb(m) |
---|
2074 | ENDDO |
---|
2075 | ELSE |
---|
2076 | DO m = 1, surf_usm_v(l)%ns |
---|
2077 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2078 | surf_usm_v(l)%wghf_eb_av(m) + & |
---|
2079 | surf_usm_v(l)%wghf_eb(m) |
---|
2080 | ENDDO |
---|
2081 | ENDIF |
---|
2082 | |
---|
2083 | CASE ( 'usm_wghf_window' ) |
---|
2084 | ! |
---|
2085 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2086 | IF ( l == -1 ) THEN |
---|
2087 | DO m = 1, surf_usm_h%ns |
---|
2088 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2089 | surf_usm_h%wghf_eb_window_av(m) + & |
---|
2090 | surf_usm_h%wghf_eb_window(m) |
---|
2091 | ENDDO |
---|
2092 | ELSE |
---|
2093 | DO m = 1, surf_usm_v(l)%ns |
---|
2094 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2095 | surf_usm_v(l)%wghf_eb_window_av(m) + & |
---|
2096 | surf_usm_v(l)%wghf_eb_window(m) |
---|
2097 | ENDDO |
---|
2098 | ENDIF |
---|
2099 | |
---|
2100 | CASE ( 'usm_wghf_green' ) |
---|
2101 | ! |
---|
2102 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2103 | IF ( l == -1 ) THEN |
---|
2104 | DO m = 1, surf_usm_h%ns |
---|
2105 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2106 | surf_usm_h%wghf_eb_green_av(m) + & |
---|
2107 | surf_usm_h%wghf_eb_green(m) |
---|
2108 | ENDDO |
---|
2109 | ELSE |
---|
2110 | DO m = 1, surf_usm_v(l)%ns |
---|
2111 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2112 | surf_usm_v(l)%wghf_eb_green_av(m) + & |
---|
2113 | surf_usm_v(l)%wghf_eb_green(m) |
---|
2114 | ENDDO |
---|
2115 | ENDIF |
---|
2116 | |
---|
2117 | CASE ( 'usm_iwghf' ) |
---|
2118 | ! |
---|
2119 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2120 | IF ( l == -1 ) THEN |
---|
2121 | DO m = 1, surf_usm_h%ns |
---|
2122 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2123 | surf_usm_h%iwghf_eb_av(m) + & |
---|
2124 | surf_usm_h%iwghf_eb(m) |
---|
2125 | ENDDO |
---|
2126 | ELSE |
---|
2127 | DO m = 1, surf_usm_v(l)%ns |
---|
2128 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2129 | surf_usm_v(l)%iwghf_eb_av(m) + & |
---|
2130 | surf_usm_v(l)%iwghf_eb(m) |
---|
2131 | ENDDO |
---|
2132 | ENDIF |
---|
2133 | |
---|
2134 | CASE ( 'usm_iwghf_window' ) |
---|
2135 | ! |
---|
2136 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2137 | IF ( l == -1 ) THEN |
---|
2138 | DO m = 1, surf_usm_h%ns |
---|
2139 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2140 | surf_usm_h%iwghf_eb_window_av(m) + & |
---|
2141 | surf_usm_h%iwghf_eb_window(m) |
---|
2142 | ENDDO |
---|
2143 | ELSE |
---|
2144 | DO m = 1, surf_usm_v(l)%ns |
---|
2145 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2146 | surf_usm_v(l)%iwghf_eb_window_av(m) + & |
---|
2147 | surf_usm_v(l)%iwghf_eb_window(m) |
---|
2148 | ENDDO |
---|
2149 | ENDIF |
---|
2150 | |
---|
2151 | CASE ( 'usm_t_surf_wall' ) |
---|
2152 | ! |
---|
2153 | !-- surface temperature for surfaces |
---|
2154 | IF ( l == -1 ) THEN |
---|
2155 | DO m = 1, surf_usm_h%ns |
---|
2156 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2157 | surf_usm_h%t_surf_wall_av(m) + & |
---|
2158 | t_surf_wall_h(m) |
---|
2159 | ENDDO |
---|
2160 | ELSE |
---|
2161 | DO m = 1, surf_usm_v(l)%ns |
---|
2162 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2163 | surf_usm_v(l)%t_surf_wall_av(m) + & |
---|
2164 | t_surf_wall_v(l)%t(m) |
---|
2165 | ENDDO |
---|
2166 | ENDIF |
---|
2167 | |
---|
2168 | CASE ( 'usm_t_surf_window' ) |
---|
2169 | ! |
---|
2170 | !-- surface temperature for window surfaces |
---|
2171 | IF ( l == -1 ) THEN |
---|
2172 | DO m = 1, surf_usm_h%ns |
---|
2173 | surf_usm_h%t_surf_window_av(m) = & |
---|
2174 | surf_usm_h%t_surf_window_av(m) + & |
---|
2175 | t_surf_window_h(m) |
---|
2176 | ENDDO |
---|
2177 | ELSE |
---|
2178 | DO m = 1, surf_usm_v(l)%ns |
---|
2179 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2180 | surf_usm_v(l)%t_surf_window_av(m) + & |
---|
2181 | t_surf_window_v(l)%t(m) |
---|
2182 | ENDDO |
---|
2183 | ENDIF |
---|
2184 | |
---|
2185 | CASE ( 'usm_t_surf_green' ) |
---|
2186 | ! |
---|
2187 | !-- surface temperature for green surfaces |
---|
2188 | IF ( l == -1 ) THEN |
---|
2189 | DO m = 1, surf_usm_h%ns |
---|
2190 | surf_usm_h%t_surf_green_av(m) = & |
---|
2191 | surf_usm_h%t_surf_green_av(m) + & |
---|
2192 | t_surf_green_h(m) |
---|
2193 | ENDDO |
---|
2194 | ELSE |
---|
2195 | DO m = 1, surf_usm_v(l)%ns |
---|
2196 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2197 | surf_usm_v(l)%t_surf_green_av(m) + & |
---|
2198 | t_surf_green_v(l)%t(m) |
---|
2199 | ENDDO |
---|
2200 | ENDIF |
---|
2201 | |
---|
2202 | CASE ( 'usm_theta_10cm' ) |
---|
2203 | ! |
---|
2204 | !-- near surface temperature for whole surfaces |
---|
2205 | IF ( l == -1 ) THEN |
---|
2206 | DO m = 1, surf_usm_h%ns |
---|
2207 | surf_usm_h%pt_10cm_av(m) = & |
---|
2208 | surf_usm_h%pt_10cm_av(m) + & |
---|
2209 | surf_usm_h%pt_10cm(m) |
---|
2210 | ENDDO |
---|
2211 | ELSE |
---|
2212 | DO m = 1, surf_usm_v(l)%ns |
---|
2213 | surf_usm_v(l)%pt_10cm_av(m) = & |
---|
2214 | surf_usm_v(l)%pt_10cm_av(m) + & |
---|
2215 | surf_usm_v(l)%pt_10cm(m) |
---|
2216 | ENDDO |
---|
2217 | ENDIF |
---|
2218 | |
---|
2219 | CASE ( 'usm_t_wall' ) |
---|
2220 | ! |
---|
2221 | !-- wall temperature for iwl layer of walls and land |
---|
2222 | IF ( l == -1 ) THEN |
---|
2223 | DO m = 1, surf_usm_h%ns |
---|
2224 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
2225 | surf_usm_h%t_wall_av(iwl,m) + & |
---|
2226 | t_wall_h(iwl,m) |
---|
2227 | ENDDO |
---|
2228 | ELSE |
---|
2229 | DO m = 1, surf_usm_v(l)%ns |
---|
2230 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
2231 | surf_usm_v(l)%t_wall_av(iwl,m) + & |
---|
2232 | t_wall_v(l)%t(iwl,m) |
---|
2233 | ENDDO |
---|
2234 | ENDIF |
---|
2235 | |
---|
2236 | CASE ( 'usm_t_window' ) |
---|
2237 | ! |
---|
2238 | !-- window temperature for iwl layer of walls and land |
---|
2239 | IF ( l == -1 ) THEN |
---|
2240 | DO m = 1, surf_usm_h%ns |
---|
2241 | surf_usm_h%t_window_av(iwl,m) = & |
---|
2242 | surf_usm_h%t_window_av(iwl,m) + & |
---|
2243 | t_window_h(iwl,m) |
---|
2244 | ENDDO |
---|
2245 | ELSE |
---|
2246 | DO m = 1, surf_usm_v(l)%ns |
---|
2247 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
2248 | surf_usm_v(l)%t_window_av(iwl,m) + & |
---|
2249 | t_window_v(l)%t(iwl,m) |
---|
2250 | ENDDO |
---|
2251 | ENDIF |
---|
2252 | |
---|
2253 | CASE ( 'usm_t_green' ) |
---|
2254 | ! |
---|
2255 | !-- green temperature for iwl layer of walls and land |
---|
2256 | IF ( l == -1 ) THEN |
---|
2257 | DO m = 1, surf_usm_h%ns |
---|
2258 | surf_usm_h%t_green_av(iwl,m) = & |
---|
2259 | surf_usm_h%t_green_av(iwl,m) + & |
---|
2260 | t_green_h(iwl,m) |
---|
2261 | ENDDO |
---|
2262 | ELSE |
---|
2263 | DO m = 1, surf_usm_v(l)%ns |
---|
2264 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
2265 | surf_usm_v(l)%t_green_av(iwl,m) + & |
---|
2266 | t_green_v(l)%t(iwl,m) |
---|
2267 | ENDDO |
---|
2268 | ENDIF |
---|
2269 | |
---|
2270 | CASE ( 'usm_swc' ) |
---|
2271 | ! |
---|
2272 | !-- soil water content for iwl layer of walls and land |
---|
2273 | IF ( l == -1 ) THEN |
---|
2274 | DO m = 1, surf_usm_h%ns |
---|
2275 | surf_usm_h%swc_av(iwl,m) = & |
---|
2276 | surf_usm_h%swc_av(iwl,m) + & |
---|
2277 | swc_h(iwl,m) |
---|
2278 | ENDDO |
---|
2279 | ELSE |
---|
2280 | DO m = 1, surf_usm_v(l)%ns |
---|
2281 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
2282 | surf_usm_v(l)%swc_av(iwl,m) + & |
---|
2283 | swc_v(l)%t(iwl,m) |
---|
2284 | ENDDO |
---|
2285 | ENDIF |
---|
2286 | |
---|
2287 | CASE DEFAULT |
---|
2288 | CONTINUE |
---|
2289 | |
---|
2290 | END SELECT |
---|
2291 | |
---|
2292 | ELSEIF ( mode == 'average' ) THEN |
---|
2293 | |
---|
2294 | SELECT CASE ( TRIM( var ) ) |
---|
2295 | |
---|
2296 | CASE ( 'usm_wshf' ) |
---|
2297 | ! |
---|
2298 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2299 | IF ( l == -1 ) THEN |
---|
2300 | DO m = 1, surf_usm_h%ns |
---|
2301 | surf_usm_h%wshf_eb_av(m) = & |
---|
2302 | surf_usm_h%wshf_eb_av(m) / & |
---|
2303 | REAL( average_count_3d, kind=wp ) |
---|
2304 | ENDDO |
---|
2305 | ELSE |
---|
2306 | DO m = 1, surf_usm_v(l)%ns |
---|
2307 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2308 | surf_usm_v(l)%wshf_eb_av(m) / & |
---|
2309 | REAL( average_count_3d, kind=wp ) |
---|
2310 | ENDDO |
---|
2311 | ENDIF |
---|
2312 | |
---|
2313 | CASE ( 'usm_qsws' ) |
---|
2314 | ! |
---|
2315 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2316 | IF ( l == -1 ) THEN |
---|
2317 | DO m = 1, surf_usm_h%ns |
---|
2318 | surf_usm_h%qsws_eb_av(m) = & |
---|
2319 | surf_usm_h%qsws_eb_av(m) / & |
---|
2320 | REAL( average_count_3d, kind=wp ) |
---|
2321 | ENDDO |
---|
2322 | ELSE |
---|
2323 | DO m = 1, surf_usm_v(l)%ns |
---|
2324 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2325 | surf_usm_v(l)%qsws_eb_av(m) / & |
---|
2326 | REAL( average_count_3d, kind=wp ) |
---|
2327 | ENDDO |
---|
2328 | ENDIF |
---|
2329 | |
---|
2330 | CASE ( 'usm_qsws_veg' ) |
---|
2331 | ! |
---|
2332 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2333 | IF ( l == -1 ) THEN |
---|
2334 | DO m = 1, surf_usm_h%ns |
---|
2335 | surf_usm_h%qsws_veg_av(m) = & |
---|
2336 | surf_usm_h%qsws_veg_av(m) / & |
---|
2337 | REAL( average_count_3d, kind=wp ) |
---|
2338 | ENDDO |
---|
2339 | ELSE |
---|
2340 | DO m = 1, surf_usm_v(l)%ns |
---|
2341 | surf_usm_v(l)%qsws_veg_av(m) = & |
---|
2342 | surf_usm_v(l)%qsws_veg_av(m) / & |
---|
2343 | REAL( average_count_3d, kind=wp ) |
---|
2344 | ENDDO |
---|
2345 | ENDIF |
---|
2346 | |
---|
2347 | CASE ( 'usm_qsws_liq' ) |
---|
2348 | ! |
---|
2349 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2350 | IF ( l == -1 ) THEN |
---|
2351 | DO m = 1, surf_usm_h%ns |
---|
2352 | surf_usm_h%qsws_liq_av(m) = & |
---|
2353 | surf_usm_h%qsws_liq_av(m) / & |
---|
2354 | REAL( average_count_3d, kind=wp ) |
---|
2355 | ENDDO |
---|
2356 | ELSE |
---|
2357 | DO m = 1, surf_usm_v(l)%ns |
---|
2358 | surf_usm_v(l)%qsws_liq_av(m) = & |
---|
2359 | surf_usm_v(l)%qsws_liq_av(m) / & |
---|
2360 | REAL( average_count_3d, kind=wp ) |
---|
2361 | ENDDO |
---|
2362 | ENDIF |
---|
2363 | |
---|
2364 | CASE ( 'usm_wghf' ) |
---|
2365 | ! |
---|
2366 | !-- array of heat flux from ground (wall, roof, land) |
---|
2367 | IF ( l == -1 ) THEN |
---|
2368 | DO m = 1, surf_usm_h%ns |
---|
2369 | surf_usm_h%wghf_eb_av(m) = & |
---|
2370 | surf_usm_h%wghf_eb_av(m) / & |
---|
2371 | REAL( average_count_3d, kind=wp ) |
---|
2372 | ENDDO |
---|
2373 | ELSE |
---|
2374 | DO m = 1, surf_usm_v(l)%ns |
---|
2375 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2376 | surf_usm_v(l)%wghf_eb_av(m) / & |
---|
2377 | REAL( average_count_3d, kind=wp ) |
---|
2378 | ENDDO |
---|
2379 | ENDIF |
---|
2380 | |
---|
2381 | CASE ( 'usm_wghf_window' ) |
---|
2382 | ! |
---|
2383 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2384 | IF ( l == -1 ) THEN |
---|
2385 | DO m = 1, surf_usm_h%ns |
---|
2386 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2387 | surf_usm_h%wghf_eb_window_av(m) / & |
---|
2388 | REAL( average_count_3d, kind=wp ) |
---|
2389 | ENDDO |
---|
2390 | ELSE |
---|
2391 | DO m = 1, surf_usm_v(l)%ns |
---|
2392 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2393 | surf_usm_v(l)%wghf_eb_window_av(m) / & |
---|
2394 | REAL( average_count_3d, kind=wp ) |
---|
2395 | ENDDO |
---|
2396 | ENDIF |
---|
2397 | |
---|
2398 | CASE ( 'usm_wghf_green' ) |
---|
2399 | ! |
---|
2400 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2401 | IF ( l == -1 ) THEN |
---|
2402 | DO m = 1, surf_usm_h%ns |
---|
2403 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2404 | surf_usm_h%wghf_eb_green_av(m) / & |
---|
2405 | REAL( average_count_3d, kind=wp ) |
---|
2406 | ENDDO |
---|
2407 | ELSE |
---|
2408 | DO m = 1, surf_usm_v(l)%ns |
---|
2409 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2410 | surf_usm_v(l)%wghf_eb_green_av(m) / & |
---|
2411 | REAL( average_count_3d, kind=wp ) |
---|
2412 | ENDDO |
---|
2413 | ENDIF |
---|
2414 | |
---|
2415 | CASE ( 'usm_iwghf' ) |
---|
2416 | ! |
---|
2417 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2418 | IF ( l == -1 ) THEN |
---|
2419 | DO m = 1, surf_usm_h%ns |
---|
2420 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2421 | surf_usm_h%iwghf_eb_av(m) / & |
---|
2422 | REAL( average_count_3d, kind=wp ) |
---|
2423 | ENDDO |
---|
2424 | ELSE |
---|
2425 | DO m = 1, surf_usm_v(l)%ns |
---|
2426 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2427 | surf_usm_v(l)%iwghf_eb_av(m) / & |
---|
2428 | REAL( average_count_3d, kind=wp ) |
---|
2429 | ENDDO |
---|
2430 | ENDIF |
---|
2431 | |
---|
2432 | CASE ( 'usm_iwghf_window' ) |
---|
2433 | ! |
---|
2434 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2435 | IF ( l == -1 ) THEN |
---|
2436 | DO m = 1, surf_usm_h%ns |
---|
2437 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2438 | surf_usm_h%iwghf_eb_window_av(m) / & |
---|
2439 | REAL( average_count_3d, kind=wp ) |
---|
2440 | ENDDO |
---|
2441 | ELSE |
---|
2442 | DO m = 1, surf_usm_v(l)%ns |
---|
2443 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2444 | surf_usm_v(l)%iwghf_eb_window_av(m) / & |
---|
2445 | REAL( average_count_3d, kind=wp ) |
---|
2446 | ENDDO |
---|
2447 | ENDIF |
---|
2448 | |
---|
2449 | CASE ( 'usm_t_surf_wall' ) |
---|
2450 | ! |
---|
2451 | !-- surface temperature for surfaces |
---|
2452 | IF ( l == -1 ) THEN |
---|
2453 | DO m = 1, surf_usm_h%ns |
---|
2454 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2455 | surf_usm_h%t_surf_wall_av(m) / & |
---|
2456 | REAL( average_count_3d, kind=wp ) |
---|
2457 | ENDDO |
---|
2458 | ELSE |
---|
2459 | DO m = 1, surf_usm_v(l)%ns |
---|
2460 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2461 | surf_usm_v(l)%t_surf_wall_av(m) / & |
---|
2462 | REAL( average_count_3d, kind=wp ) |
---|
2463 | ENDDO |
---|
2464 | ENDIF |
---|
2465 | |
---|
2466 | CASE ( 'usm_t_surf_window' ) |
---|
2467 | ! |
---|
2468 | !-- surface temperature for window surfaces |
---|
2469 | IF ( l == -1 ) THEN |
---|
2470 | DO m = 1, surf_usm_h%ns |
---|
2471 | surf_usm_h%t_surf_window_av(m) = & |
---|
2472 | surf_usm_h%t_surf_window_av(m) / & |
---|
2473 | REAL( average_count_3d, kind=wp ) |
---|
2474 | ENDDO |
---|
2475 | ELSE |
---|
2476 | DO m = 1, surf_usm_v(l)%ns |
---|
2477 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2478 | surf_usm_v(l)%t_surf_window_av(m) / & |
---|
2479 | REAL( average_count_3d, kind=wp ) |
---|
2480 | ENDDO |
---|
2481 | ENDIF |
---|
2482 | |
---|
2483 | CASE ( 'usm_t_surf_green' ) |
---|
2484 | ! |
---|
2485 | !-- surface temperature for green surfaces |
---|
2486 | IF ( l == -1 ) THEN |
---|
2487 | DO m = 1, surf_usm_h%ns |
---|
2488 | surf_usm_h%t_surf_green_av(m) = & |
---|
2489 | surf_usm_h%t_surf_green_av(m) / & |
---|
2490 | REAL( average_count_3d, kind=wp ) |
---|
2491 | ENDDO |
---|
2492 | ELSE |
---|
2493 | DO m = 1, surf_usm_v(l)%ns |
---|
2494 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2495 | surf_usm_v(l)%t_surf_green_av(m) / & |
---|
2496 | REAL( average_count_3d, kind=wp ) |
---|
2497 | ENDDO |
---|
2498 | ENDIF |
---|
2499 | |
---|
2500 | CASE ( 'usm_theta_10cm' ) |
---|
2501 | ! |
---|
2502 | !-- near surface temperature for whole surfaces |
---|
2503 | IF ( l == -1 ) THEN |
---|
2504 | DO m = 1, surf_usm_h%ns |
---|
2505 | surf_usm_h%pt_10cm_av(m) = & |
---|
2506 | surf_usm_h%pt_10cm_av(m) / & |
---|
2507 | REAL( average_count_3d, kind=wp ) |
---|
2508 | ENDDO |
---|
2509 | ELSE |
---|
2510 | DO m = 1, surf_usm_v(l)%ns |
---|
2511 | surf_usm_v(l)%pt_10cm_av(m) = & |
---|
2512 | surf_usm_v(l)%pt_10cm_av(m) / & |
---|
2513 | REAL( average_count_3d, kind=wp ) |
---|
2514 | ENDDO |
---|
2515 | ENDIF |
---|
2516 | |
---|
2517 | |
---|
2518 | CASE ( 'usm_t_wall' ) |
---|
2519 | ! |
---|
2520 | !-- wall temperature for iwl layer of walls and land |
---|
2521 | IF ( l == -1 ) THEN |
---|
2522 | DO m = 1, surf_usm_h%ns |
---|
2523 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
2524 | surf_usm_h%t_wall_av(iwl,m) / & |
---|
2525 | REAL( average_count_3d, kind=wp ) |
---|
2526 | ENDDO |
---|
2527 | ELSE |
---|
2528 | DO m = 1, surf_usm_v(l)%ns |
---|
2529 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
2530 | surf_usm_v(l)%t_wall_av(iwl,m) / & |
---|
2531 | REAL( average_count_3d, kind=wp ) |
---|
2532 | ENDDO |
---|
2533 | ENDIF |
---|
2534 | |
---|
2535 | CASE ( 'usm_t_window' ) |
---|
2536 | ! |
---|
2537 | !-- window temperature for iwl layer of walls and land |
---|
2538 | IF ( l == -1 ) THEN |
---|
2539 | DO m = 1, surf_usm_h%ns |
---|
2540 | surf_usm_h%t_window_av(iwl,m) = & |
---|
2541 | surf_usm_h%t_window_av(iwl,m) / & |
---|
2542 | REAL( average_count_3d, kind=wp ) |
---|
2543 | ENDDO |
---|
2544 | ELSE |
---|
2545 | DO m = 1, surf_usm_v(l)%ns |
---|
2546 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
2547 | surf_usm_v(l)%t_window_av(iwl,m) / & |
---|
2548 | REAL( average_count_3d, kind=wp ) |
---|
2549 | ENDDO |
---|
2550 | ENDIF |
---|
2551 | |
---|
2552 | CASE ( 'usm_t_green' ) |
---|
2553 | ! |
---|
2554 | !-- green temperature for iwl layer of walls and land |
---|
2555 | IF ( l == -1 ) THEN |
---|
2556 | DO m = 1, surf_usm_h%ns |
---|
2557 | surf_usm_h%t_green_av(iwl,m) = & |
---|
2558 | surf_usm_h%t_green_av(iwl,m) / & |
---|
2559 | REAL( average_count_3d, kind=wp ) |
---|
2560 | ENDDO |
---|
2561 | ELSE |
---|
2562 | DO m = 1, surf_usm_v(l)%ns |
---|
2563 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
2564 | surf_usm_v(l)%t_green_av(iwl,m) / & |
---|
2565 | REAL( average_count_3d, kind=wp ) |
---|
2566 | ENDDO |
---|
2567 | ENDIF |
---|
2568 | |
---|
2569 | CASE ( 'usm_swc' ) |
---|
2570 | ! |
---|
2571 | !-- soil water content for iwl layer of walls and land |
---|
2572 | IF ( l == -1 ) THEN |
---|
2573 | DO m = 1, surf_usm_h%ns |
---|
2574 | surf_usm_h%swc_av(iwl,m) = & |
---|
2575 | surf_usm_h%swc_av(iwl,m) / & |
---|
2576 | REAL( average_count_3d, kind=wp ) |
---|
2577 | ENDDO |
---|
2578 | ELSE |
---|
2579 | DO m = 1, surf_usm_v(l)%ns |
---|
2580 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
2581 | surf_usm_v(l)%swc_av(iwl,m) / & |
---|
2582 | REAL( average_count_3d, kind=wp ) |
---|
2583 | ENDDO |
---|
2584 | ENDIF |
---|
2585 | |
---|
2586 | |
---|
2587 | END SELECT |
---|
2588 | |
---|
2589 | ENDIF |
---|
2590 | |
---|
2591 | ENDIF |
---|
2592 | |
---|
2593 | END SUBROUTINE usm_3d_data_averaging |
---|
2594 | |
---|
2595 | |
---|
2596 | |
---|
2597 | !------------------------------------------------------------------------------! |
---|
2598 | ! Description: |
---|
2599 | ! ------------ |
---|
2600 | !> Set internal Neumann boundary condition at outer soil grid points |
---|
2601 | !> for temperature and humidity. |
---|
2602 | !------------------------------------------------------------------------------! |
---|
2603 | SUBROUTINE usm_boundary_condition |
---|
2604 | |
---|
2605 | IMPLICIT NONE |
---|
2606 | |
---|
2607 | INTEGER(iwp) :: i !< grid index x-direction |
---|
2608 | INTEGER(iwp) :: ioff !< offset index x-direction indicating location of soil grid point |
---|
2609 | INTEGER(iwp) :: j !< grid index y-direction |
---|
2610 | INTEGER(iwp) :: joff !< offset index x-direction indicating location of soil grid point |
---|
2611 | INTEGER(iwp) :: k !< grid index z-direction |
---|
2612 | INTEGER(iwp) :: koff !< offset index x-direction indicating location of soil grid point |
---|
2613 | INTEGER(iwp) :: l !< running index surface-orientation |
---|
2614 | INTEGER(iwp) :: m !< running index surface elements |
---|
2615 | |
---|
2616 | koff = surf_usm_h%koff |
---|
2617 | DO m = 1, surf_usm_h%ns |
---|
2618 | i = surf_usm_h%i(m) |
---|
2619 | j = surf_usm_h%j(m) |
---|
2620 | k = surf_usm_h%k(m) |
---|
2621 | pt(k+koff,j,i) = pt(k,j,i) |
---|
2622 | ENDDO |
---|
2623 | |
---|
2624 | DO l = 0, 3 |
---|
2625 | ioff = surf_usm_v(l)%ioff |
---|
2626 | joff = surf_usm_v(l)%joff |
---|
2627 | DO m = 1, surf_usm_v(l)%ns |
---|
2628 | i = surf_usm_v(l)%i(m) |
---|
2629 | j = surf_usm_v(l)%j(m) |
---|
2630 | k = surf_usm_v(l)%k(m) |
---|
2631 | pt(k,j+joff,i+ioff) = pt(k,j,i) |
---|
2632 | ENDDO |
---|
2633 | ENDDO |
---|
2634 | |
---|
2635 | END SUBROUTINE usm_boundary_condition |
---|
2636 | |
---|
2637 | |
---|
2638 | !------------------------------------------------------------------------------! |
---|
2639 | ! |
---|
2640 | ! Description: |
---|
2641 | ! ------------ |
---|
2642 | !> Subroutine checks variables and assigns units. |
---|
2643 | !> It is called out from subroutine check_parameters. |
---|
2644 | !------------------------------------------------------------------------------! |
---|
2645 | SUBROUTINE usm_check_data_output( variable, unit ) |
---|
2646 | |
---|
2647 | IMPLICIT NONE |
---|
2648 | |
---|
2649 | CHARACTER(LEN=*),INTENT(IN) :: variable !< |
---|
2650 | CHARACTER(LEN=*),INTENT(OUT) :: unit !< |
---|
2651 | |
---|
2652 | INTEGER(iwp) :: i,j,l !< index |
---|
2653 | CHARACTER(LEN=2) :: ls |
---|
2654 | CHARACTER(LEN=varnamelength) :: var !< TRIM(variable) |
---|
2655 | INTEGER(iwp), PARAMETER :: nl1 = 16 !< number of directional usm variables |
---|
2656 | CHARACTER(LEN=varnamelength), DIMENSION(nl1) :: varlist1 = & !< list of directional usm variables |
---|
2657 | (/'usm_wshf ', & |
---|
2658 | 'usm_wghf ', & |
---|
2659 | 'usm_wghf_window ', & |
---|
2660 | 'usm_wghf_green ', & |
---|
2661 | 'usm_iwghf ', & |
---|
2662 | 'usm_iwghf_window ', & |
---|
2663 | 'usm_surfz ', & |
---|
2664 | 'usm_surfwintrans ', & |
---|
2665 | 'usm_surfcat ', & |
---|
2666 | 'usm_surfalb ', & |
---|
2667 | 'usm_surfemis ', & |
---|
2668 | 'usm_t_surf_wall ', & |
---|
2669 | 'usm_t_surf_window ', & |
---|
2670 | 'usm_t_surf_green ', & |
---|
2671 | 'usm_t_green ', & |
---|
2672 | 'usm_theta_10cm '/) |
---|
2673 | |
---|
2674 | INTEGER(iwp), PARAMETER :: nl2 = 3 !< number of directional layer usm variables |
---|
2675 | CHARACTER(LEN=varnamelength), DIMENSION(nl2) :: varlist2 = & !< list of directional layer usm variables |
---|
2676 | (/'usm_t_wall ', & |
---|
2677 | 'usm_t_window ', & |
---|
2678 | 'usm_t_green '/) |
---|
2679 | |
---|
2680 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
2681 | CHARACTER(LEN=6), DIMENSION(nd), PARAMETER :: dirname = & !< direction names |
---|
2682 | (/'_roof ','_south','_north','_west ','_east '/) |
---|
2683 | LOGICAL :: lfound !< flag if the variable is found |
---|
2684 | |
---|
2685 | |
---|
2686 | lfound = .FALSE. |
---|
2687 | |
---|
2688 | var = TRIM(variable) |
---|
2689 | |
---|
2690 | ! |
---|
2691 | !-- check if variable exists |
---|
2692 | !-- directional variables |
---|
2693 | DO i = 1, nl1 |
---|
2694 | DO j = 1, nd |
---|
2695 | IF ( TRIM(var) == TRIM(varlist1(i))//TRIM(dirname(j)) ) THEN |
---|
2696 | lfound = .TRUE. |
---|
2697 | EXIT |
---|
2698 | ENDIF |
---|
2699 | IF ( lfound ) EXIT |
---|
2700 | ENDDO |
---|
2701 | ENDDO |
---|
2702 | IF ( lfound ) GOTO 10 |
---|
2703 | ! |
---|
2704 | !-- directional layer variables |
---|
2705 | DO i = 1, nl2 |
---|
2706 | DO j = 1, nd |
---|
2707 | DO l = nzb_wall, nzt_wall |
---|
2708 | WRITE(ls,'(A1,I1)') '_',l |
---|
2709 | IF ( TRIM(var) == TRIM(varlist2(i))//TRIM(ls)//TRIM(dirname(j)) ) THEN |
---|
2710 | lfound = .TRUE. |
---|
2711 | EXIT |
---|
2712 | ENDIF |
---|
2713 | ENDDO |
---|
2714 | IF ( lfound ) EXIT |
---|
2715 | ENDDO |
---|
2716 | ENDDO |
---|
2717 | IF ( .NOT. lfound ) THEN |
---|
2718 | unit = 'illegal' |
---|
2719 | RETURN |
---|
2720 | ENDIF |
---|
2721 | 10 CONTINUE |
---|
2722 | |
---|
2723 | IF ( var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
2724 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
2725 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
2726 | var(1:17) == 'usm_surfwintrans_' .OR. & |
---|
2727 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
2728 | var(1:13) == 'usm_qsws_liq_' ) THEN |
---|
2729 | unit = 'W/m2' |
---|
2730 | ELSE IF ( var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
2731 | var(1:12) == 'usm_t_window' .OR. var(1:17) == 'usm_t_surf_window' .OR. & |
---|
2732 | var(1:16) == 'usm_t_surf_green' .OR. & |
---|
2733 | var(1:11) == 'usm_t_green' .OR. var(1:7) == 'usm_swc' .OR. & |
---|
2734 | var(1:14) == 'usm_theta_10cm' ) THEN |
---|
2735 | unit = 'K' |
---|
2736 | ELSE IF ( var(1:9) == 'usm_surfz' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
2737 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' ) THEN |
---|
2738 | unit = '1' |
---|
2739 | ELSE |
---|
2740 | unit = 'illegal' |
---|
2741 | ENDIF |
---|
2742 | |
---|
2743 | END SUBROUTINE usm_check_data_output |
---|
2744 | |
---|
2745 | |
---|
2746 | !------------------------------------------------------------------------------! |
---|
2747 | ! Description: |
---|
2748 | ! ------------ |
---|
2749 | !> Check parameters routine for urban surface model |
---|
2750 | !------------------------------------------------------------------------------! |
---|
2751 | SUBROUTINE usm_check_parameters |
---|
2752 | |
---|
2753 | USE control_parameters, & |
---|
2754 | ONLY: bc_pt_b, bc_q_b, constant_flux_layer, large_scale_forcing, & |
---|
2755 | lsf_surf, topography |
---|
2756 | |
---|
2757 | USE netcdf_data_input_mod, & |
---|
2758 | ONLY: building_type_f |
---|
2759 | |
---|
2760 | IMPLICIT NONE |
---|
2761 | |
---|
2762 | INTEGER(iwp) :: i !< running index, x-dimension |
---|
2763 | INTEGER(iwp) :: j !< running index, y-dimension |
---|
2764 | |
---|
2765 | ! |
---|
2766 | !-- Dirichlet boundary conditions are required as the surface fluxes are |
---|
2767 | !-- calculated from the temperature/humidity gradients in the urban surface |
---|
2768 | !-- model |
---|
2769 | IF ( bc_pt_b == 'neumann' .OR. bc_q_b == 'neumann' ) THEN |
---|
2770 | message_string = 'urban surface model requires setting of '// & |
---|
2771 | 'bc_pt_b = "dirichlet" and '// & |
---|
2772 | 'bc_q_b = "dirichlet"' |
---|
2773 | CALL message( 'usm_check_parameters', 'PA0590', 1, 2, 0, 6, 0 ) |
---|
2774 | ENDIF |
---|
2775 | |
---|
2776 | IF ( .NOT. constant_flux_layer ) THEN |
---|
2777 | message_string = 'urban surface model requires '// & |
---|
2778 | 'constant_flux_layer = .T.' |
---|
2779 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
2780 | ENDIF |
---|
2781 | |
---|
2782 | IF ( .NOT. radiation ) THEN |
---|
2783 | message_string = 'urban surface model requires '// & |
---|
2784 | 'the radiation model to be switched on' |
---|
2785 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
2786 | ENDIF |
---|
2787 | ! |
---|
2788 | !-- Surface forcing has to be disabled for LSF in case of enabled |
---|
2789 | !-- urban surface module |
---|
2790 | IF ( large_scale_forcing ) THEN |
---|
2791 | lsf_surf = .FALSE. |
---|
2792 | ENDIF |
---|
2793 | ! |
---|
2794 | !-- Topography |
---|
2795 | IF ( topography == 'flat' ) THEN |
---|
2796 | message_string = 'topography /= "flat" is required '// & |
---|
2797 | 'when using the urban surface model' |
---|
2798 | CALL message( 'usm_check_parameters', 'PA0592', 1, 2, 0, 6, 0 ) |
---|
2799 | ENDIF |
---|
2800 | ! |
---|
2801 | !-- naheatlayers |
---|
2802 | IF ( naheatlayers > nzt ) THEN |
---|
2803 | message_string = 'number of anthropogenic heat layers '// & |
---|
2804 | '"naheatlayers" can not be larger than'// & |
---|
2805 | ' number of domain layers "nzt"' |
---|
2806 | CALL message( 'usm_check_parameters', 'PA0593', 1, 2, 0, 6, 0 ) |
---|
2807 | ENDIF |
---|
2808 | ! |
---|
2809 | !-- Check if building types are set within a valid range. |
---|
2810 | IF ( building_type < LBOUND( building_pars, 2 ) .AND. & |
---|
2811 | building_type > UBOUND( building_pars, 2 ) ) THEN |
---|
2812 | WRITE( message_string, * ) 'building_type = ', building_type, & |
---|
2813 | ' is out of the valid range' |
---|
2814 | CALL message( 'usm_check_parameters', 'PA0529', 2, 2, 0, 6, 0 ) |
---|
2815 | ENDIF |
---|
2816 | IF ( building_type_f%from_file ) THEN |
---|
2817 | DO i = nxl, nxr |
---|
2818 | DO j = nys, nyn |
---|
2819 | IF ( building_type_f%var(j,i) /= building_type_f%fill .AND. & |
---|
2820 | ( building_type_f%var(j,i) < LBOUND( building_pars, 2 ) .OR. & |
---|
2821 | building_type_f%var(j,i) > UBOUND( building_pars, 2 ) ) ) & |
---|
2822 | THEN |
---|
2823 | WRITE( message_string, * ) 'building_type = is out of ' // & |
---|
2824 | 'the valid range at (j,i) = ', j, i |
---|
2825 | CALL message( 'usm_check_parameters', 'PA0529', 2, 2, 0, 6, 0 ) |
---|
2826 | ENDIF |
---|
2827 | ENDDO |
---|
2828 | ENDDO |
---|
2829 | ENDIF |
---|
2830 | END SUBROUTINE usm_check_parameters |
---|
2831 | |
---|
2832 | |
---|
2833 | !------------------------------------------------------------------------------! |
---|
2834 | ! |
---|
2835 | ! Description: |
---|
2836 | ! ------------ |
---|
2837 | !> Output of the 3D-arrays in netCDF and/or AVS format |
---|
2838 | !> for variables of urban_surface model. |
---|
2839 | !> It resorts the urban surface module output quantities from surf style |
---|
2840 | !> indexing into temporary 3D array with indices (i,j,k). |
---|
2841 | !> It is called from subroutine data_output_3d. |
---|
2842 | !------------------------------------------------------------------------------! |
---|
2843 | SUBROUTINE usm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
2844 | |
---|
2845 | IMPLICIT NONE |
---|
2846 | |
---|
2847 | INTEGER(iwp), INTENT(IN) :: av !< flag if averaged |
---|
2848 | CHARACTER (len=*), INTENT(IN) :: variable !< variable name |
---|
2849 | INTEGER(iwp), INTENT(IN) :: nzb_do !< lower limit of the data output (usually 0) |
---|
2850 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) |
---|
2851 | LOGICAL, INTENT(OUT) :: found !< |
---|
2852 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< sp - it has to correspond to module data_output_3d |
---|
2853 | REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: temp_pf !< temp array for urban surface output procedure |
---|
2854 | |
---|
2855 | CHARACTER (len=varnamelength) :: var !< trimmed variable name |
---|
2856 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
2857 | CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
2858 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
2859 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: diridx = (/ -1, 1, 0, 3, 2 /) |
---|
2860 | !< index for surf_*_v: 0:3 = (North, South, East, West) |
---|
2861 | INTEGER(iwp) :: ids,idsint,idsidx |
---|
2862 | INTEGER(iwp) :: i,j,k,iwl,istat, l, m !< running indices |
---|
2863 | |
---|
2864 | found = .TRUE. |
---|
2865 | temp_pf = -1._wp |
---|
2866 | |
---|
2867 | ids = -1 |
---|
2868 | var = TRIM(variable) |
---|
2869 | DO i = 0, nd-1 |
---|
2870 | k = len(TRIM(var)) |
---|
2871 | j = len(TRIM(dirname(i))) |
---|
2872 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
2873 | ids = i |
---|
2874 | idsint = dirint(ids) |
---|
2875 | idsidx = diridx(ids) |
---|
2876 | var = var(:k-j) |
---|
2877 | EXIT |
---|
2878 | ENDIF |
---|
2879 | ENDDO |
---|
2880 | IF ( ids == -1 ) THEN |
---|
2881 | var = TRIM(variable) |
---|
2882 | ENDIF |
---|
2883 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
2884 | ! |
---|
2885 | !-- wall layers |
---|
2886 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
2887 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2888 | var = var(1:10) |
---|
2889 | ENDIF |
---|
2890 | ENDIF |
---|
2891 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
2892 | ! |
---|
2893 | !-- window layers |
---|
2894 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
2895 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2896 | var = var(1:12) |
---|
2897 | ENDIF |
---|
2898 | ENDIF |
---|
2899 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
2900 | ! |
---|
2901 | !-- green layers |
---|
2902 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
2903 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2904 | var = var(1:11) |
---|
2905 | ENDIF |
---|
2906 | ENDIF |
---|
2907 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
2908 | ! |
---|
2909 | !-- green layers soil water content |
---|
2910 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
2911 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2912 | var = var(1:7) |
---|
2913 | ENDIF |
---|
2914 | ENDIF |
---|
2915 | |
---|
2916 | SELECT CASE ( TRIM(var) ) |
---|
2917 | |
---|
2918 | CASE ( 'usm_surfz' ) |
---|
2919 | ! |
---|
2920 | !-- array of surface height (z) |
---|
2921 | IF ( idsint == iup_u ) THEN |
---|
2922 | DO m = 1, surf_usm_h%ns |
---|
2923 | i = surf_usm_h%i(m) |
---|
2924 | j = surf_usm_h%j(m) |
---|
2925 | k = surf_usm_h%k(m) |
---|
2926 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) ) |
---|
2927 | ENDDO |
---|
2928 | ELSE |
---|
2929 | l = idsidx |
---|
2930 | DO m = 1, surf_usm_v(l)%ns |
---|
2931 | i = surf_usm_v(l)%i(m) |
---|
2932 | j = surf_usm_v(l)%j(m) |
---|
2933 | k = surf_usm_v(l)%k(m) |
---|
2934 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) + 1.0_wp ) |
---|
2935 | ENDDO |
---|
2936 | ENDIF |
---|
2937 | |
---|
2938 | CASE ( 'usm_surfcat' ) |
---|
2939 | ! |
---|
2940 | !-- surface category |
---|
2941 | IF ( idsint == iup_u ) THEN |
---|
2942 | DO m = 1, surf_usm_h%ns |
---|
2943 | i = surf_usm_h%i(m) |
---|
2944 | j = surf_usm_h%j(m) |
---|
2945 | k = surf_usm_h%k(m) |
---|
2946 | temp_pf(k,j,i) = surf_usm_h%surface_types(m) |
---|
2947 | ENDDO |
---|
2948 | ELSE |
---|
2949 | l = idsidx |
---|
2950 | DO m = 1, surf_usm_v(l)%ns |
---|
2951 | i = surf_usm_v(l)%i(m) |
---|
2952 | j = surf_usm_v(l)%j(m) |
---|
2953 | k = surf_usm_v(l)%k(m) |
---|
2954 | temp_pf(k,j,i) = surf_usm_v(l)%surface_types(m) |
---|
2955 | ENDDO |
---|
2956 | ENDIF |
---|
2957 | |
---|
2958 | CASE ( 'usm_surfalb' ) |
---|
2959 | ! |
---|
2960 | !-- surface albedo, weighted average |
---|
2961 | IF ( idsint == iup_u ) THEN |
---|
2962 | DO m = 1, surf_usm_h%ns |
---|
2963 | i = surf_usm_h%i(m) |
---|
2964 | j = surf_usm_h%j(m) |
---|
2965 | k = surf_usm_h%k(m) |
---|
2966 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
2967 | surf_usm_h%albedo(ind_veg_wall,m) + & |
---|
2968 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
2969 | surf_usm_h%albedo(ind_pav_green,m) + & |
---|
2970 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
2971 | surf_usm_h%albedo(ind_wat_win,m) |
---|
2972 | ENDDO |
---|
2973 | ELSE |
---|
2974 | l = idsidx |
---|
2975 | DO m = 1, surf_usm_v(l)%ns |
---|
2976 | i = surf_usm_v(l)%i(m) |
---|
2977 | j = surf_usm_v(l)%j(m) |
---|
2978 | k = surf_usm_v(l)%k(m) |
---|
2979 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
2980 | surf_usm_v(l)%albedo(ind_veg_wall,m) + & |
---|
2981 | surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
2982 | surf_usm_v(l)%albedo(ind_pav_green,m) + & |
---|
2983 | surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
2984 | surf_usm_v(l)%albedo(ind_wat_win,m) |
---|
2985 | ENDDO |
---|
2986 | ENDIF |
---|
2987 | |
---|
2988 | CASE ( 'usm_surfemis' ) |
---|
2989 | ! |
---|
2990 | !-- surface emissivity, weighted average |
---|
2991 | IF ( idsint == iup_u ) THEN |
---|
2992 | DO m = 1, surf_usm_h%ns |
---|
2993 | i = surf_usm_h%i(m) |
---|
2994 | j = surf_usm_h%j(m) |
---|
2995 | k = surf_usm_h%k(m) |
---|
2996 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
2997 | surf_usm_h%emissivity(ind_veg_wall,m) + & |
---|
2998 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
2999 | surf_usm_h%emissivity(ind_pav_green,m) + & |
---|
3000 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
3001 | surf_usm_h%emissivity(ind_wat_win,m) |
---|
3002 | ENDDO |
---|
3003 | ELSE |
---|
3004 | l = idsidx |
---|
3005 | DO m = 1, surf_usm_v(l)%ns |
---|
3006 | i = surf_usm_v(l)%i(m) |
---|
3007 | j = surf_usm_v(l)%j(m) |
---|
3008 | k = surf_usm_v(l)%k(m) |
---|
3009 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) *& |
---|
3010 | surf_usm_v(l)%emissivity(ind_veg_wall,m) +& |
---|
3011 | surf_usm_v(l)%frac(ind_pav_green,m) *& |
---|
3012 | surf_usm_v(l)%emissivity(ind_pav_green,m)+& |
---|
3013 | surf_usm_v(l)%frac(ind_wat_win,m) *& |
---|
3014 | surf_usm_v(l)%emissivity(ind_wat_win,m) |
---|
3015 | ENDDO |
---|
3016 | ENDIF |
---|
3017 | |
---|
3018 | CASE ( 'usm_surfwintrans' ) |
---|
3019 | ! |
---|
3020 | !-- transmissivity window tiles |
---|
3021 | IF ( idsint == iup_u ) THEN |
---|
3022 | DO m = 1, surf_usm_h%ns |
---|
3023 | i = surf_usm_h%i(m) |
---|
3024 | j = surf_usm_h%j(m) |
---|
3025 | k = surf_usm_h%k(m) |
---|
3026 | temp_pf(k,j,i) = surf_usm_h%transmissivity(m) |
---|
3027 | ENDDO |
---|
3028 | ELSE |
---|
3029 | l = idsidx |
---|
3030 | DO m = 1, surf_usm_v(l)%ns |
---|
3031 | i = surf_usm_v(l)%i(m) |
---|
3032 | j = surf_usm_v(l)%j(m) |
---|
3033 | k = surf_usm_v(l)%k(m) |
---|
3034 | temp_pf(k,j,i) = surf_usm_v(l)%transmissivity(m) |
---|
3035 | ENDDO |
---|
3036 | ENDIF |
---|
3037 | |
---|
3038 | CASE ( 'usm_wshf' ) |
---|
3039 | ! |
---|
3040 | !-- array of sensible heat flux from surfaces |
---|
3041 | IF ( av == 0 ) THEN |
---|
3042 | IF ( idsint == iup_u ) THEN |
---|
3043 | DO m = 1, surf_usm_h%ns |
---|
3044 | i = surf_usm_h%i(m) |
---|
3045 | j = surf_usm_h%j(m) |
---|
3046 | k = surf_usm_h%k(m) |
---|
3047 | temp_pf(k,j,i) = surf_usm_h%wshf_eb(m) |
---|
3048 | ENDDO |
---|
3049 | ELSE |
---|
3050 | l = idsidx |
---|
3051 | DO m = 1, surf_usm_v(l)%ns |
---|
3052 | i = surf_usm_v(l)%i(m) |
---|
3053 | j = surf_usm_v(l)%j(m) |
---|
3054 | k = surf_usm_v(l)%k(m) |
---|
3055 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb(m) |
---|
3056 | ENDDO |
---|
3057 | ENDIF |
---|
3058 | ELSE |
---|
3059 | IF ( idsint == iup_u ) THEN |
---|
3060 | DO m = 1, surf_usm_h%ns |
---|
3061 | i = surf_usm_h%i(m) |
---|
3062 | j = surf_usm_h%j(m) |
---|
3063 | k = surf_usm_h%k(m) |
---|
3064 | temp_pf(k,j,i) = surf_usm_h%wshf_eb_av(m) |
---|
3065 | ENDDO |
---|
3066 | ELSE |
---|
3067 | l = idsidx |
---|
3068 | DO m = 1, surf_usm_v(l)%ns |
---|
3069 | i = surf_usm_v(l)%i(m) |
---|
3070 | j = surf_usm_v(l)%j(m) |
---|
3071 | k = surf_usm_v(l)%k(m) |
---|
3072 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb_av(m) |
---|
3073 | ENDDO |
---|
3074 | ENDIF |
---|
3075 | ENDIF |
---|
3076 | |
---|
3077 | |
---|
3078 | CASE ( 'usm_qsws' ) |
---|
3079 | ! |
---|
3080 | !-- array of latent heat flux from surfaces |
---|
3081 | IF ( av == 0 ) THEN |
---|
3082 | IF ( idsint == iup_u ) THEN |
---|
3083 | DO m = 1, surf_usm_h%ns |
---|
3084 | i = surf_usm_h%i(m) |
---|
3085 | j = surf_usm_h%j(m) |
---|
3086 | k = surf_usm_h%k(m) |
---|
3087 | temp_pf(k,j,i) = surf_usm_h%qsws_eb(m) |
---|
3088 | ENDDO |
---|
3089 | ELSE |
---|
3090 | l = idsidx |
---|
3091 | DO m = 1, surf_usm_v(l)%ns |
---|
3092 | i = surf_usm_v(l)%i(m) |
---|
3093 | j = surf_usm_v(l)%j(m) |
---|
3094 | k = surf_usm_v(l)%k(m) |
---|
3095 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb(m) |
---|
3096 | ENDDO |
---|
3097 | ENDIF |
---|
3098 | ELSE |
---|
3099 | IF ( idsint == iup_u ) THEN |
---|
3100 | DO m = 1, surf_usm_h%ns |
---|
3101 | i = surf_usm_h%i(m) |
---|
3102 | j = surf_usm_h%j(m) |
---|
3103 | k = surf_usm_h%k(m) |
---|
3104 | temp_pf(k,j,i) = surf_usm_h%qsws_eb_av(m) |
---|
3105 | ENDDO |
---|
3106 | ELSE |
---|
3107 | l = idsidx |
---|
3108 | DO m = 1, surf_usm_v(l)%ns |
---|
3109 | i = surf_usm_v(l)%i(m) |
---|
3110 | j = surf_usm_v(l)%j(m) |
---|
3111 | k = surf_usm_v(l)%k(m) |
---|
3112 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb_av(m) |
---|
3113 | ENDDO |
---|
3114 | ENDIF |
---|
3115 | ENDIF |
---|
3116 | |
---|
3117 | CASE ( 'usm_qsws_veg' ) |
---|
3118 | ! |
---|
3119 | !-- array of latent heat flux from vegetation surfaces |
---|
3120 | IF ( av == 0 ) THEN |
---|
3121 | IF ( idsint == iup_u ) THEN |
---|
3122 | DO m = 1, surf_usm_h%ns |
---|
3123 | i = surf_usm_h%i(m) |
---|
3124 | j = surf_usm_h%j(m) |
---|
3125 | k = surf_usm_h%k(m) |
---|
3126 | temp_pf(k,j,i) = surf_usm_h%qsws_veg(m) |
---|
3127 | ENDDO |
---|
3128 | ELSE |
---|
3129 | l = idsidx |
---|
3130 | DO m = 1, surf_usm_v(l)%ns |
---|
3131 | i = surf_usm_v(l)%i(m) |
---|
3132 | j = surf_usm_v(l)%j(m) |
---|
3133 | k = surf_usm_v(l)%k(m) |
---|
3134 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg(m) |
---|
3135 | ENDDO |
---|
3136 | ENDIF |
---|
3137 | ELSE |
---|
3138 | IF ( idsint == iup_u ) THEN |
---|
3139 | DO m = 1, surf_usm_h%ns |
---|
3140 | i = surf_usm_h%i(m) |
---|
3141 | j = surf_usm_h%j(m) |
---|
3142 | k = surf_usm_h%k(m) |
---|
3143 | temp_pf(k,j,i) = surf_usm_h%qsws_veg_av(m) |
---|
3144 | ENDDO |
---|
3145 | ELSE |
---|
3146 | l = idsidx |
---|
3147 | DO m = 1, surf_usm_v(l)%ns |
---|
3148 | i = surf_usm_v(l)%i(m) |
---|
3149 | j = surf_usm_v(l)%j(m) |
---|
3150 | k = surf_usm_v(l)%k(m) |
---|
3151 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_av(m) |
---|
3152 | ENDDO |
---|
3153 | ENDIF |
---|
3154 | ENDIF |
---|
3155 | |
---|
3156 | CASE ( 'usm_qsws_liq' ) |
---|
3157 | ! |
---|
3158 | !-- array of latent heat flux from surfaces with liquid |
---|
3159 | IF ( av == 0 ) THEN |
---|
3160 | IF ( idsint == iup_u ) THEN |
---|
3161 | DO m = 1, surf_usm_h%ns |
---|
3162 | i = surf_usm_h%i(m) |
---|
3163 | j = surf_usm_h%j(m) |
---|
3164 | k = surf_usm_h%k(m) |
---|
3165 | temp_pf(k,j,i) = surf_usm_h%qsws_liq(m) |
---|
3166 | ENDDO |
---|
3167 | ELSE |
---|
3168 | l = idsidx |
---|
3169 | DO m = 1, surf_usm_v(l)%ns |
---|
3170 | i = surf_usm_v(l)%i(m) |
---|
3171 | j = surf_usm_v(l)%j(m) |
---|
3172 | k = surf_usm_v(l)%k(m) |
---|
3173 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq(m) |
---|
3174 | ENDDO |
---|
3175 | ENDIF |
---|
3176 | ELSE |
---|
3177 | IF ( idsint == iup_u ) THEN |
---|
3178 | DO m = 1, surf_usm_h%ns |
---|
3179 | i = surf_usm_h%i(m) |
---|
3180 | j = surf_usm_h%j(m) |
---|
3181 | k = surf_usm_h%k(m) |
---|
3182 | temp_pf(k,j,i) = surf_usm_h%qsws_liq_av(m) |
---|
3183 | ENDDO |
---|
3184 | ELSE |
---|
3185 | l = idsidx |
---|
3186 | DO m = 1, surf_usm_v(l)%ns |
---|
3187 | i = surf_usm_v(l)%i(m) |
---|
3188 | j = surf_usm_v(l)%j(m) |
---|
3189 | k = surf_usm_v(l)%k(m) |
---|
3190 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_av(m) |
---|
3191 | ENDDO |
---|
3192 | ENDIF |
---|
3193 | ENDIF |
---|
3194 | |
---|
3195 | CASE ( 'usm_wghf' ) |
---|
3196 | ! |
---|
3197 | !-- array of heat flux from ground (land, wall, roof) |
---|
3198 | IF ( av == 0 ) THEN |
---|
3199 | IF ( idsint == iup_u ) THEN |
---|
3200 | DO m = 1, surf_usm_h%ns |
---|
3201 | i = surf_usm_h%i(m) |
---|
3202 | j = surf_usm_h%j(m) |
---|
3203 | k = surf_usm_h%k(m) |
---|
3204 | temp_pf(k,j,i) = surf_usm_h%wghf_eb(m) |
---|
3205 | ENDDO |
---|
3206 | ELSE |
---|
3207 | l = idsidx |
---|
3208 | DO m = 1, surf_usm_v(l)%ns |
---|
3209 | i = surf_usm_v(l)%i(m) |
---|
3210 | j = surf_usm_v(l)%j(m) |
---|
3211 | k = surf_usm_v(l)%k(m) |
---|
3212 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb(m) |
---|
3213 | ENDDO |
---|
3214 | ENDIF |
---|
3215 | ELSE |
---|
3216 | IF ( idsint == iup_u ) THEN |
---|
3217 | DO m = 1, surf_usm_h%ns |
---|
3218 | i = surf_usm_h%i(m) |
---|
3219 | j = surf_usm_h%j(m) |
---|
3220 | k = surf_usm_h%k(m) |
---|
3221 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_av(m) |
---|
3222 | ENDDO |
---|
3223 | ELSE |
---|
3224 | l = idsidx |
---|
3225 | DO m = 1, surf_usm_v(l)%ns |
---|
3226 | i = surf_usm_v(l)%i(m) |
---|
3227 | j = surf_usm_v(l)%j(m) |
---|
3228 | k = surf_usm_v(l)%k(m) |
---|
3229 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_av(m) |
---|
3230 | ENDDO |
---|
3231 | ENDIF |
---|
3232 | ENDIF |
---|
3233 | |
---|
3234 | CASE ( 'usm_wghf_window' ) |
---|
3235 | ! |
---|
3236 | !-- array of heat flux from window ground (land, wall, roof) |
---|
3237 | IF ( av == 0 ) THEN |
---|
3238 | IF ( idsint == iup_u ) THEN |
---|
3239 | DO m = 1, surf_usm_h%ns |
---|
3240 | i = surf_usm_h%i(m) |
---|
3241 | j = surf_usm_h%j(m) |
---|
3242 | k = surf_usm_h%k(m) |
---|
3243 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window(m) |
---|
3244 | ENDDO |
---|
3245 | ELSE |
---|
3246 | l = idsidx |
---|
3247 | DO m = 1, surf_usm_v(l)%ns |
---|
3248 | i = surf_usm_v(l)%i(m) |
---|
3249 | j = surf_usm_v(l)%j(m) |
---|
3250 | k = surf_usm_v(l)%k(m) |
---|
3251 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window(m) |
---|
3252 | ENDDO |
---|
3253 | ENDIF |
---|
3254 | ELSE |
---|
3255 | IF ( idsint == iup_u ) THEN |
---|
3256 | DO m = 1, surf_usm_h%ns |
---|
3257 | i = surf_usm_h%i(m) |
---|
3258 | j = surf_usm_h%j(m) |
---|
3259 | k = surf_usm_h%k(m) |
---|
3260 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window_av(m) |
---|
3261 | ENDDO |
---|
3262 | ELSE |
---|
3263 | l = idsidx |
---|
3264 | DO m = 1, surf_usm_v(l)%ns |
---|
3265 | i = surf_usm_v(l)%i(m) |
---|
3266 | j = surf_usm_v(l)%j(m) |
---|
3267 | k = surf_usm_v(l)%k(m) |
---|
3268 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window_av(m) |
---|
3269 | ENDDO |
---|
3270 | ENDIF |
---|
3271 | ENDIF |
---|
3272 | |
---|
3273 | CASE ( 'usm_wghf_green' ) |
---|
3274 | ! |
---|
3275 | !-- array of heat flux from green ground (land, wall, roof) |
---|
3276 | IF ( av == 0 ) THEN |
---|
3277 | IF ( idsint == iup_u ) THEN |
---|
3278 | DO m = 1, surf_usm_h%ns |
---|
3279 | i = surf_usm_h%i(m) |
---|
3280 | j = surf_usm_h%j(m) |
---|
3281 | k = surf_usm_h%k(m) |
---|
3282 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green(m) |
---|
3283 | ENDDO |
---|
3284 | ELSE |
---|
3285 | l = idsidx |
---|
3286 | DO m = 1, surf_usm_v(l)%ns |
---|
3287 | i = surf_usm_v(l)%i(m) |
---|
3288 | j = surf_usm_v(l)%j(m) |
---|
3289 | k = surf_usm_v(l)%k(m) |
---|
3290 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green(m) |
---|
3291 | ENDDO |
---|
3292 | ENDIF |
---|
3293 | ELSE |
---|
3294 | IF ( idsint == iup_u ) THEN |
---|
3295 | DO m = 1, surf_usm_h%ns |
---|
3296 | i = surf_usm_h%i(m) |
---|
3297 | j = surf_usm_h%j(m) |
---|
3298 | k = surf_usm_h%k(m) |
---|
3299 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green_av(m) |
---|
3300 | ENDDO |
---|
3301 | ELSE |
---|
3302 | l = idsidx |
---|
3303 | DO m = 1, surf_usm_v(l)%ns |
---|
3304 | i = surf_usm_v(l)%i(m) |
---|
3305 | j = surf_usm_v(l)%j(m) |
---|
3306 | k = surf_usm_v(l)%k(m) |
---|
3307 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green_av(m) |
---|
3308 | ENDDO |
---|
3309 | ENDIF |
---|
3310 | ENDIF |
---|
3311 | |
---|
3312 | CASE ( 'usm_iwghf' ) |
---|
3313 | ! |
---|
3314 | !-- array of heat flux from indoor ground (land, wall, roof) |
---|
3315 | IF ( av == 0 ) THEN |
---|
3316 | IF ( idsint == iup_u ) THEN |
---|
3317 | DO m = 1, surf_usm_h%ns |
---|
3318 | i = surf_usm_h%i(m) |
---|
3319 | j = surf_usm_h%j(m) |
---|
3320 | k = surf_usm_h%k(m) |
---|
3321 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb(m) |
---|
3322 | ENDDO |
---|
3323 | ELSE |
---|
3324 | l = idsidx |
---|
3325 | DO m = 1, surf_usm_v(l)%ns |
---|
3326 | i = surf_usm_v(l)%i(m) |
---|
3327 | j = surf_usm_v(l)%j(m) |
---|
3328 | k = surf_usm_v(l)%k(m) |
---|
3329 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb(m) |
---|
3330 | ENDDO |
---|
3331 | ENDIF |
---|
3332 | ELSE |
---|
3333 | IF ( idsint == iup_u ) THEN |
---|
3334 | DO m = 1, surf_usm_h%ns |
---|
3335 | i = surf_usm_h%i(m) |
---|
3336 | j = surf_usm_h%j(m) |
---|
3337 | k = surf_usm_h%k(m) |
---|
3338 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_av(m) |
---|
3339 | ENDDO |
---|
3340 | ELSE |
---|
3341 | l = idsidx |
---|
3342 | DO m = 1, surf_usm_v(l)%ns |
---|
3343 | i = surf_usm_v(l)%i(m) |
---|
3344 | j = surf_usm_v(l)%j(m) |
---|
3345 | k = surf_usm_v(l)%k(m) |
---|
3346 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_av(m) |
---|
3347 | ENDDO |
---|
3348 | ENDIF |
---|
3349 | ENDIF |
---|
3350 | |
---|
3351 | CASE ( 'usm_iwghf_window' ) |
---|
3352 | ! |
---|
3353 | !-- array of heat flux from indoor window ground (land, wall, roof) |
---|
3354 | IF ( av == 0 ) THEN |
---|
3355 | IF ( idsint == iup_u ) THEN |
---|
3356 | DO m = 1, surf_usm_h%ns |
---|
3357 | i = surf_usm_h%i(m) |
---|
3358 | j = surf_usm_h%j(m) |
---|
3359 | k = surf_usm_h%k(m) |
---|
3360 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window(m) |
---|
3361 | ENDDO |
---|
3362 | ELSE |
---|
3363 | l = idsidx |
---|
3364 | DO m = 1, surf_usm_v(l)%ns |
---|
3365 | i = surf_usm_v(l)%i(m) |
---|
3366 | j = surf_usm_v(l)%j(m) |
---|
3367 | k = surf_usm_v(l)%k(m) |
---|
3368 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window(m) |
---|
3369 | ENDDO |
---|
3370 | ENDIF |
---|
3371 | ELSE |
---|
3372 | IF ( idsint == iup_u ) THEN |
---|
3373 | DO m = 1, surf_usm_h%ns |
---|
3374 | i = surf_usm_h%i(m) |
---|
3375 | j = surf_usm_h%j(m) |
---|
3376 | k = surf_usm_h%k(m) |
---|
3377 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window_av(m) |
---|
3378 | ENDDO |
---|
3379 | ELSE |
---|
3380 | l = idsidx |
---|
3381 | DO m = 1, surf_usm_v(l)%ns |
---|
3382 | i = surf_usm_v(l)%i(m) |
---|
3383 | j = surf_usm_v(l)%j(m) |
---|
3384 | k = surf_usm_v(l)%k(m) |
---|
3385 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window_av(m) |
---|
3386 | ENDDO |
---|
3387 | ENDIF |
---|
3388 | ENDIF |
---|
3389 | |
---|
3390 | CASE ( 'usm_t_surf_wall' ) |
---|
3391 | ! |
---|
3392 | !-- surface temperature for surfaces |
---|
3393 | IF ( av == 0 ) THEN |
---|
3394 | IF ( idsint == iup_u ) THEN |
---|
3395 | DO m = 1, surf_usm_h%ns |
---|
3396 | i = surf_usm_h%i(m) |
---|
3397 | j = surf_usm_h%j(m) |
---|
3398 | k = surf_usm_h%k(m) |
---|
3399 | temp_pf(k,j,i) = t_surf_wall_h(m) |
---|
3400 | ENDDO |
---|
3401 | ELSE |
---|
3402 | l = idsidx |
---|
3403 | DO m = 1, surf_usm_v(l)%ns |
---|
3404 | i = surf_usm_v(l)%i(m) |
---|
3405 | j = surf_usm_v(l)%j(m) |
---|
3406 | k = surf_usm_v(l)%k(m) |
---|
3407 | temp_pf(k,j,i) = t_surf_wall_v(l)%t(m) |
---|
3408 | ENDDO |
---|
3409 | ENDIF |
---|
3410 | ELSE |
---|
3411 | IF ( idsint == iup_u ) THEN |
---|
3412 | DO m = 1, surf_usm_h%ns |
---|
3413 | i = surf_usm_h%i(m) |
---|
3414 | j = surf_usm_h%j(m) |
---|
3415 | k = surf_usm_h%k(m) |
---|
3416 | temp_pf(k,j,i) = surf_usm_h%t_surf_wall_av(m) |
---|
3417 | ENDDO |
---|
3418 | ELSE |
---|
3419 | l = idsidx |
---|
3420 | DO m = 1, surf_usm_v(l)%ns |
---|
3421 | i = surf_usm_v(l)%i(m) |
---|
3422 | j = surf_usm_v(l)%j(m) |
---|
3423 | k = surf_usm_v(l)%k(m) |
---|
3424 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_wall_av(m) |
---|
3425 | ENDDO |
---|
3426 | ENDIF |
---|
3427 | ENDIF |
---|
3428 | |
---|
3429 | CASE ( 'usm_t_surf_window' ) |
---|
3430 | ! |
---|
3431 | !-- surface temperature for window surfaces |
---|
3432 | IF ( av == 0 ) THEN |
---|
3433 | IF ( idsint == iup_u ) THEN |
---|
3434 | DO m = 1, surf_usm_h%ns |
---|
3435 | i = surf_usm_h%i(m) |
---|
3436 | j = surf_usm_h%j(m) |
---|
3437 | k = surf_usm_h%k(m) |
---|
3438 | temp_pf(k,j,i) = t_surf_window_h(m) |
---|
3439 | ENDDO |
---|
3440 | ELSE |
---|
3441 | l = idsidx |
---|
3442 | DO m = 1, surf_usm_v(l)%ns |
---|
3443 | i = surf_usm_v(l)%i(m) |
---|
3444 | j = surf_usm_v(l)%j(m) |
---|
3445 | k = surf_usm_v(l)%k(m) |
---|
3446 | temp_pf(k,j,i) = t_surf_window_v(l)%t(m) |
---|
3447 | ENDDO |
---|
3448 | ENDIF |
---|
3449 | |
---|
3450 | ELSE |
---|
3451 | IF ( idsint == iup_u ) THEN |
---|
3452 | DO m = 1, surf_usm_h%ns |
---|
3453 | i = surf_usm_h%i(m) |
---|
3454 | j = surf_usm_h%j(m) |
---|
3455 | k = surf_usm_h%k(m) |
---|
3456 | temp_pf(k,j,i) = surf_usm_h%t_surf_window_av(m) |
---|
3457 | ENDDO |
---|
3458 | ELSE |
---|
3459 | l = idsidx |
---|
3460 | DO m = 1, surf_usm_v(l)%ns |
---|
3461 | i = surf_usm_v(l)%i(m) |
---|
3462 | j = surf_usm_v(l)%j(m) |
---|
3463 | k = surf_usm_v(l)%k(m) |
---|
3464 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_window_av(m) |
---|
3465 | ENDDO |
---|
3466 | |
---|
3467 | ENDIF |
---|
3468 | |
---|
3469 | ENDIF |
---|
3470 | |
---|
3471 | CASE ( 'usm_t_surf_green' ) |
---|
3472 | ! |
---|
3473 | !-- surface temperature for green surfaces |
---|
3474 | IF ( av == 0 ) THEN |
---|
3475 | IF ( idsint == iup_u ) THEN |
---|
3476 | DO m = 1, surf_usm_h%ns |
---|
3477 | i = surf_usm_h%i(m) |
---|
3478 | j = surf_usm_h%j(m) |
---|
3479 | k = surf_usm_h%k(m) |
---|
3480 | temp_pf(k,j,i) = t_surf_green_h(m) |
---|
3481 | ENDDO |
---|
3482 | ELSE |
---|
3483 | l = idsidx |
---|
3484 | DO m = 1, surf_usm_v(l)%ns |
---|
3485 | i = surf_usm_v(l)%i(m) |
---|
3486 | j = surf_usm_v(l)%j(m) |
---|
3487 | k = surf_usm_v(l)%k(m) |
---|
3488 | temp_pf(k,j,i) = t_surf_green_v(l)%t(m) |
---|
3489 | ENDDO |
---|
3490 | ENDIF |
---|
3491 | |
---|
3492 | ELSE |
---|
3493 | IF ( idsint == iup_u ) THEN |
---|
3494 | DO m = 1, surf_usm_h%ns |
---|
3495 | i = surf_usm_h%i(m) |
---|
3496 | j = surf_usm_h%j(m) |
---|
3497 | k = surf_usm_h%k(m) |
---|
3498 | temp_pf(k,j,i) = surf_usm_h%t_surf_green_av(m) |
---|
3499 | ENDDO |
---|
3500 | ELSE |
---|
3501 | l = idsidx |
---|
3502 | DO m = 1, surf_usm_v(l)%ns |
---|
3503 | i = surf_usm_v(l)%i(m) |
---|
3504 | j = surf_usm_v(l)%j(m) |
---|
3505 | k = surf_usm_v(l)%k(m) |
---|
3506 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_green_av(m) |
---|
3507 | ENDDO |
---|
3508 | |
---|
3509 | ENDIF |
---|
3510 | |
---|
3511 | ENDIF |
---|
3512 | |
---|
3513 | CASE ( 'usm_theta_10cm' ) |
---|
3514 | ! |
---|
3515 | !-- near surface temperature for whole surfaces |
---|
3516 | IF ( av == 0 ) THEN |
---|
3517 | IF ( idsint == iup_u ) THEN |
---|
3518 | DO m = 1, surf_usm_h%ns |
---|
3519 | i = surf_usm_h%i(m) |
---|
3520 | j = surf_usm_h%j(m) |
---|
3521 | k = surf_usm_h%k(m) |
---|
3522 | temp_pf(k,j,i) = surf_usm_h%pt_10cm(m) |
---|
3523 | ENDDO |
---|
3524 | ELSE |
---|
3525 | l = idsidx |
---|
3526 | DO m = 1, surf_usm_v(l)%ns |
---|
3527 | i = surf_usm_v(l)%i(m) |
---|
3528 | j = surf_usm_v(l)%j(m) |
---|
3529 | k = surf_usm_v(l)%k(m) |
---|
3530 | temp_pf(k,j,i) = surf_usm_v(l)%pt_10cm(m) |
---|
3531 | ENDDO |
---|
3532 | ENDIF |
---|
3533 | |
---|
3534 | |
---|
3535 | ELSE |
---|
3536 | IF ( idsint == iup_u ) THEN |
---|
3537 | DO m = 1, surf_usm_h%ns |
---|
3538 | i = surf_usm_h%i(m) |
---|
3539 | j = surf_usm_h%j(m) |
---|
3540 | k = surf_usm_h%k(m) |
---|
3541 | temp_pf(k,j,i) = surf_usm_h%pt_10cm_av(m) |
---|
3542 | ENDDO |
---|
3543 | ELSE |
---|
3544 | l = idsidx |
---|
3545 | DO m = 1, surf_usm_v(l)%ns |
---|
3546 | i = surf_usm_v(l)%i(m) |
---|
3547 | j = surf_usm_v(l)%j(m) |
---|
3548 | k = surf_usm_v(l)%k(m) |
---|
3549 | temp_pf(k,j,i) = surf_usm_v(l)%pt_10cm_av(m) |
---|
3550 | ENDDO |
---|
3551 | |
---|
3552 | ENDIF |
---|
3553 | ENDIF |
---|
3554 | |
---|
3555 | CASE ( 'usm_t_wall' ) |
---|
3556 | ! |
---|
3557 | !-- wall temperature for iwl layer of walls and land |
---|
3558 | IF ( av == 0 ) THEN |
---|
3559 | IF ( idsint == iup_u ) THEN |
---|
3560 | DO m = 1, surf_usm_h%ns |
---|
3561 | i = surf_usm_h%i(m) |
---|
3562 | j = surf_usm_h%j(m) |
---|
3563 | k = surf_usm_h%k(m) |
---|
3564 | temp_pf(k,j,i) = t_wall_h(iwl,m) |
---|
3565 | ENDDO |
---|
3566 | ELSE |
---|
3567 | l = idsidx |
---|
3568 | DO m = 1, surf_usm_v(l)%ns |
---|
3569 | i = surf_usm_v(l)%i(m) |
---|
3570 | j = surf_usm_v(l)%j(m) |
---|
3571 | k = surf_usm_v(l)%k(m) |
---|
3572 | temp_pf(k,j,i) = t_wall_v(l)%t(iwl,m) |
---|
3573 | ENDDO |
---|
3574 | ENDIF |
---|
3575 | ELSE |
---|
3576 | IF ( idsint == iup_u ) THEN |
---|
3577 | DO m = 1, surf_usm_h%ns |
---|
3578 | i = surf_usm_h%i(m) |
---|
3579 | j = surf_usm_h%j(m) |
---|
3580 | k = surf_usm_h%k(m) |
---|
3581 | temp_pf(k,j,i) = surf_usm_h%t_wall_av(iwl,m) |
---|
3582 | ENDDO |
---|
3583 | ELSE |
---|
3584 | l = idsidx |
---|
3585 | DO m = 1, surf_usm_v(l)%ns |
---|
3586 | i = surf_usm_v(l)%i(m) |
---|
3587 | j = surf_usm_v(l)%j(m) |
---|
3588 | k = surf_usm_v(l)%k(m) |
---|
3589 | temp_pf(k,j,i) = surf_usm_v(l)%t_wall_av(iwl,m) |
---|
3590 | ENDDO |
---|
3591 | ENDIF |
---|
3592 | ENDIF |
---|
3593 | |
---|
3594 | CASE ( 'usm_t_window' ) |
---|
3595 | ! |
---|
3596 | !-- window temperature for iwl layer of walls and land |
---|
3597 | IF ( av == 0 ) THEN |
---|
3598 | IF ( idsint == iup_u ) THEN |
---|
3599 | DO m = 1, surf_usm_h%ns |
---|
3600 | i = surf_usm_h%i(m) |
---|
3601 | j = surf_usm_h%j(m) |
---|
3602 | k = surf_usm_h%k(m) |
---|
3603 | temp_pf(k,j,i) = t_window_h(iwl,m) |
---|
3604 | ENDDO |
---|
3605 | ELSE |
---|
3606 | l = idsidx |
---|
3607 | DO m = 1, surf_usm_v(l)%ns |
---|
3608 | i = surf_usm_v(l)%i(m) |
---|
3609 | j = surf_usm_v(l)%j(m) |
---|
3610 | k = surf_usm_v(l)%k(m) |
---|
3611 | temp_pf(k,j,i) = t_window_v(l)%t(iwl,m) |
---|
3612 | ENDDO |
---|
3613 | ENDIF |
---|
3614 | ELSE |
---|
3615 | IF ( idsint == iup_u ) THEN |
---|
3616 | DO m = 1, surf_usm_h%ns |
---|
3617 | i = surf_usm_h%i(m) |
---|
3618 | j = surf_usm_h%j(m) |
---|
3619 | k = surf_usm_h%k(m) |
---|
3620 | temp_pf(k,j,i) = surf_usm_h%t_window_av(iwl,m) |
---|
3621 | ENDDO |
---|
3622 | ELSE |
---|
3623 | l = idsidx |
---|
3624 | DO m = 1, surf_usm_v(l)%ns |
---|
3625 | i = surf_usm_v(l)%i(m) |
---|
3626 | j = surf_usm_v(l)%j(m) |
---|
3627 | k = surf_usm_v(l)%k(m) |
---|
3628 | temp_pf(k,j,i) = surf_usm_v(l)%t_window_av(iwl,m) |
---|
3629 | ENDDO |
---|
3630 | ENDIF |
---|
3631 | ENDIF |
---|
3632 | |
---|
3633 | CASE ( 'usm_t_green' ) |
---|
3634 | ! |
---|
3635 | !-- green temperature for iwl layer of walls and land |
---|
3636 | IF ( av == 0 ) THEN |
---|
3637 | IF ( idsint == iup_u ) THEN |
---|
3638 | DO m = 1, surf_usm_h%ns |
---|
3639 | i = surf_usm_h%i(m) |
---|
3640 | j = surf_usm_h%j(m) |
---|
3641 | k = surf_usm_h%k(m) |
---|
3642 | temp_pf(k,j,i) = t_green_h(iwl,m) |
---|
3643 | ENDDO |
---|
3644 | ELSE |
---|
3645 | l = idsidx |
---|
3646 | DO m = 1, surf_usm_v(l)%ns |
---|
3647 | i = surf_usm_v(l)%i(m) |
---|
3648 | j = surf_usm_v(l)%j(m) |
---|
3649 | k = surf_usm_v(l)%k(m) |
---|
3650 | temp_pf(k,j,i) = t_green_v(l)%t(iwl,m) |
---|
3651 | ENDDO |
---|
3652 | ENDIF |
---|
3653 | ELSE |
---|
3654 | IF ( idsint == iup_u ) THEN |
---|
3655 | DO m = 1, surf_usm_h%ns |
---|
3656 | i = surf_usm_h%i(m) |
---|
3657 | j = surf_usm_h%j(m) |
---|
3658 | k = surf_usm_h%k(m) |
---|
3659 | temp_pf(k,j,i) = surf_usm_h%t_green_av(iwl,m) |
---|
3660 | ENDDO |
---|
3661 | ELSE |
---|
3662 | l = idsidx |
---|
3663 | DO m = 1, surf_usm_v(l)%ns |
---|
3664 | i = surf_usm_v(l)%i(m) |
---|
3665 | j = surf_usm_v(l)%j(m) |
---|
3666 | k = surf_usm_v(l)%k(m) |
---|
3667 | temp_pf(k,j,i) = surf_usm_v(l)%t_green_av(iwl,m) |
---|
3668 | ENDDO |
---|
3669 | ENDIF |
---|
3670 | ENDIF |
---|
3671 | |
---|
3672 | CASE ( 'usm_swc' ) |
---|
3673 | ! |
---|
3674 | !-- soil water content for iwl layer of walls and land |
---|
3675 | IF ( av == 0 ) THEN |
---|
3676 | IF ( idsint == iup_u ) THEN |
---|
3677 | DO m = 1, surf_usm_h%ns |
---|
3678 | i = surf_usm_h%i(m) |
---|
3679 | j = surf_usm_h%j(m) |
---|
3680 | k = surf_usm_h%k(m) |
---|
3681 | temp_pf(k,j,i) = swc_h(iwl,m) |
---|
3682 | ENDDO |
---|
3683 | ELSE |
---|
3684 | l = idsidx |
---|
3685 | DO m = 1, surf_usm_v(l)%ns |
---|
3686 | i = surf_usm_v(l)%i(m) |
---|
3687 | j = surf_usm_v(l)%j(m) |
---|
3688 | k = surf_usm_v(l)%k(m) |
---|
3689 | temp_pf(k,j,i) = swc_v(l)%t(iwl,m) |
---|
3690 | ENDDO |
---|
3691 | ENDIF |
---|
3692 | ELSE |
---|
3693 | IF ( idsint == iup_u ) THEN |
---|
3694 | DO m = 1, surf_usm_h%ns |
---|
3695 | i = surf_usm_h%i(m) |
---|
3696 | j = surf_usm_h%j(m) |
---|
3697 | k = surf_usm_h%k(m) |
---|
3698 | temp_pf(k,j,i) = surf_usm_h%swc_av(iwl,m) |
---|
3699 | ENDDO |
---|
3700 | ELSE |
---|
3701 | l = idsidx |
---|
3702 | DO m = 1, surf_usm_v(l)%ns |
---|
3703 | i = surf_usm_v(l)%i(m) |
---|
3704 | j = surf_usm_v(l)%j(m) |
---|
3705 | k = surf_usm_v(l)%k(m) |
---|
3706 | temp_pf(k,j,i) = surf_usm_v(l)%swc_av(iwl,m) |
---|
3707 | ENDDO |
---|
3708 | ENDIF |
---|
3709 | ENDIF |
---|
3710 | |
---|
3711 | |
---|
3712 | CASE DEFAULT |
---|
3713 | found = .FALSE. |
---|
3714 | RETURN |
---|
3715 | END SELECT |
---|
3716 | |
---|
3717 | ! |
---|
3718 | !-- Rearrange dimensions for NetCDF output |
---|
3719 | !-- FIXME: this may generate FPE overflow upon conversion from DP to SP |
---|
3720 | DO j = nys, nyn |
---|
3721 | DO i = nxl, nxr |
---|
3722 | DO k = nzb_do, nzt_do |
---|
3723 | local_pf(i,j,k) = temp_pf(k,j,i) |
---|
3724 | ENDDO |
---|
3725 | ENDDO |
---|
3726 | ENDDO |
---|
3727 | |
---|
3728 | END SUBROUTINE usm_data_output_3d |
---|
3729 | |
---|
3730 | |
---|
3731 | !------------------------------------------------------------------------------! |
---|
3732 | ! |
---|
3733 | ! Description: |
---|
3734 | ! ------------ |
---|
3735 | !> Soubroutine defines appropriate grid for netcdf variables. |
---|
3736 | !> It is called out from subroutine netcdf. |
---|
3737 | !------------------------------------------------------------------------------! |
---|
3738 | SUBROUTINE usm_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) |
---|
3739 | |
---|
3740 | IMPLICIT NONE |
---|
3741 | |
---|
3742 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
3743 | LOGICAL, INTENT(OUT) :: found !< |
---|
3744 | CHARACTER (len=*), INTENT(OUT) :: grid_x !< |
---|
3745 | CHARACTER (len=*), INTENT(OUT) :: grid_y !< |
---|
3746 | CHARACTER (len=*), INTENT(OUT) :: grid_z !< |
---|
3747 | |
---|
3748 | CHARACTER (len=varnamelength) :: var |
---|
3749 | |
---|
3750 | var = TRIM(variable) |
---|
3751 | IF ( var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
3752 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
3753 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
3754 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
3755 | var(1:13) == 'usm_qsws_liq_' .OR. & |
---|
3756 | var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
3757 | var(1:17) == 'usm_t_surf_window' .OR. var(1:12) == 'usm_t_window' .OR. & |
---|
3758 | var(1:16) == 'usm_t_surf_green' .OR. var(1:11) == 'usm_t_green' .OR. & |
---|
3759 | var(1:15) == 'usm_theta_10cm' .OR. & |
---|
3760 | var(1:9) == 'usm_surfz' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
3761 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
3762 | var(1:16) == 'usm_surfwintrans' .OR. var(1:7) == 'usm_swc' ) THEN |
---|
3763 | |
---|
3764 | found = .TRUE. |
---|
3765 | grid_x = 'x' |
---|
3766 | grid_y = 'y' |
---|
3767 | grid_z = 'zu' |
---|
3768 | ELSE |
---|
3769 | found = .FALSE. |
---|
3770 | grid_x = 'none' |
---|
3771 | grid_y = 'none' |
---|
3772 | grid_z = 'none' |
---|
3773 | ENDIF |
---|
3774 | |
---|
3775 | END SUBROUTINE usm_define_netcdf_grid |
---|
3776 | |
---|
3777 | |
---|
3778 | !------------------------------------------------------------------------------! |
---|
3779 | ! Description: |
---|
3780 | ! ------------ |
---|
3781 | !> Initialization of the wall surface model |
---|
3782 | !------------------------------------------------------------------------------! |
---|
3783 | SUBROUTINE usm_init_material_model |
---|
3784 | |
---|
3785 | IMPLICIT NONE |
---|
3786 | |
---|
3787 | INTEGER(iwp) :: k, l, m !< running indices |
---|
3788 | |
---|
3789 | CALL location_message( ' initialization of wall surface model', .TRUE. ) |
---|
3790 | |
---|
3791 | ! |
---|
3792 | !-- Calculate wall grid spacings. |
---|
3793 | !-- Temperature is defined at the center of the wall layers, |
---|
3794 | !-- whereas gradients/fluxes are defined at the edges (_stag) |
---|
3795 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
3796 | DO m = 1, surf_usm_h%ns |
---|
3797 | |
---|
3798 | surf_usm_h%dz_wall(nzb_wall,m) = surf_usm_h%zw(nzb_wall,m) |
---|
3799 | DO k = nzb_wall+1, nzt_wall |
---|
3800 | surf_usm_h%dz_wall(k,m) = surf_usm_h%zw(k,m) - & |
---|
3801 | surf_usm_h%zw(k-1,m) |
---|
3802 | ENDDO |
---|
3803 | surf_usm_h%dz_window(nzb_wall,m) = surf_usm_h%zw_window(nzb_wall,m) |
---|
3804 | DO k = nzb_wall+1, nzt_wall |
---|
3805 | surf_usm_h%dz_window(k,m) = surf_usm_h%zw_window(k,m) - & |
---|
3806 | surf_usm_h%zw_window(k-1,m) |
---|
3807 | ENDDO |
---|
3808 | |
---|
3809 | surf_usm_h%dz_wall(nzt_wall+1,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
3810 | |
---|
3811 | DO k = nzb_wall, nzt_wall-1 |
---|
3812 | surf_usm_h%dz_wall_stag(k,m) = 0.5 * ( & |
---|
3813 | surf_usm_h%dz_wall(k+1,m) + surf_usm_h%dz_wall(k,m) ) |
---|
3814 | ENDDO |
---|
3815 | surf_usm_h%dz_wall_stag(nzt_wall,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
3816 | |
---|
3817 | surf_usm_h%dz_window(nzt_wall+1,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
3818 | |
---|
3819 | DO k = nzb_wall, nzt_wall-1 |
---|
3820 | surf_usm_h%dz_window_stag(k,m) = 0.5 * ( & |
---|
3821 | surf_usm_h%dz_window(k+1,m) + surf_usm_h%dz_window(k,m) ) |
---|
3822 | ENDDO |
---|
3823 | surf_usm_h%dz_window_stag(nzt_wall,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
3824 | |
---|
3825 | IF (surf_usm_h%green_type_roof(m) == 2.0_wp ) THEN |
---|
3826 | ! |
---|
3827 | !-- extensive green roof |
---|
3828 | !-- set ratio of substrate layer thickness, soil-type and LAI |
---|
3829 | soil_type = 3 |
---|
3830 | surf_usm_h%lai(m) = 2.0_wp |
---|
3831 | |
---|
3832 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
3833 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
3834 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.15_wp |
---|
3835 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.20_wp |
---|
3836 | ELSE |
---|
3837 | ! |
---|
3838 | !-- intensiv green roof |
---|
3839 | !-- set ratio of substrate layer thickness, soil-type and LAI |
---|
3840 | soil_type = 6 |
---|
3841 | surf_usm_h%lai(m) = 4.0_wp |
---|
3842 | |
---|
3843 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
3844 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
3845 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.40_wp |
---|
3846 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.80_wp |
---|
3847 | ENDIF |
---|
3848 | |
---|
3849 | surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
3850 | DO k = nzb_wall+1, nzt_wall |
---|
3851 | surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
3852 | surf_usm_h%zw_green(k-1,m) |
---|
3853 | ENDDO |
---|
3854 | surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3855 | |
---|
3856 | DO k = nzb_wall, nzt_wall-1 |
---|
3857 | surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
3858 | surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
3859 | ENDDO |
---|
3860 | surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3861 | |
---|
3862 | IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
3863 | alpha_vangenuchten = soil_pars(0,soil_type) |
---|
3864 | ENDIF |
---|
3865 | |
---|
3866 | IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
3867 | l_vangenuchten = soil_pars(1,soil_type) |
---|
3868 | ENDIF |
---|
3869 | |
---|
3870 | IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
3871 | n_vangenuchten = soil_pars(2,soil_type) |
---|
3872 | ENDIF |
---|
3873 | |
---|
3874 | IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
3875 | hydraulic_conductivity = soil_pars(3,soil_type) |
---|
3876 | ENDIF |
---|
3877 | |
---|
3878 | IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
3879 | saturation_moisture = m_soil_pars(0,soil_type) |
---|
3880 | ENDIF |
---|
3881 | |
---|
3882 | IF ( field_capacity == 9999999.9_wp ) THEN |
---|
3883 | field_capacity = m_soil_pars(1,soil_type) |
---|
3884 | ENDIF |
---|
3885 | |
---|
3886 | IF ( wilting_point == 9999999.9_wp ) THEN |
---|
3887 | wilting_point = m_soil_pars(2,soil_type) |
---|
3888 | ENDIF |
---|
3889 | |
---|
3890 | IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
3891 | residual_moisture = m_soil_pars(3,soil_type) |
---|
3892 | ENDIF |
---|
3893 | |
---|
3894 | DO k = nzb_wall, nzt_wall+1 |
---|
3895 | swc_h(k,m) = field_capacity |
---|
3896 | rootfr_h(k,m) = 0.5_wp |
---|
3897 | surf_usm_h%alpha_vg_green(m) = alpha_vangenuchten |
---|
3898 | surf_usm_h%l_vg_green(m) = l_vangenuchten |
---|
3899 | surf_usm_h%n_vg_green(m) = n_vangenuchten |
---|
3900 | surf_usm_h%gamma_w_green_sat(k,m) = hydraulic_conductivity |
---|
3901 | swc_sat_h(k,m) = saturation_moisture |
---|
3902 | fc_h(k,m) = field_capacity |
---|
3903 | wilt_h(k,m) = wilting_point |
---|
3904 | swc_res_h(k,m) = residual_moisture |
---|
3905 | ENDDO |
---|
3906 | |
---|
3907 | ENDDO |
---|
3908 | |
---|
3909 | surf_usm_h%ddz_wall = 1.0_wp / surf_usm_h%dz_wall |
---|
3910 | surf_usm_h%ddz_wall_stag = 1.0_wp / surf_usm_h%dz_wall_stag |
---|
3911 | surf_usm_h%ddz_window = 1.0_wp / surf_usm_h%dz_window |
---|
3912 | surf_usm_h%ddz_window_stag = 1.0_wp / surf_usm_h%dz_window_stag |
---|
3913 | surf_usm_h%ddz_green = 1.0_wp / surf_usm_h%dz_green |
---|
3914 | surf_usm_h%ddz_green_stag = 1.0_wp / surf_usm_h%dz_green_stag |
---|
3915 | ! |
---|
3916 | !-- For vertical surfaces |
---|
3917 | DO l = 0, 3 |
---|
3918 | DO m = 1, surf_usm_v(l)%ns |
---|
3919 | surf_usm_v(l)%dz_wall(nzb_wall,m) = surf_usm_v(l)%zw(nzb_wall,m) |
---|
3920 | DO k = nzb_wall+1, nzt_wall |
---|
3921 | surf_usm_v(l)%dz_wall(k,m) = surf_usm_v(l)%zw(k,m) - & |
---|
3922 | surf_usm_v(l)%zw(k-1,m) |
---|
3923 | ENDDO |
---|
3924 | surf_usm_v(l)%dz_window(nzb_wall,m) = surf_usm_v(l)%zw_window(nzb_wall,m) |
---|
3925 | DO k = nzb_wall+1, nzt_wall |
---|
3926 | surf_usm_v(l)%dz_window(k,m) = surf_usm_v(l)%zw_window(k,m) - & |
---|
3927 | surf_usm_v(l)%zw_window(k-1,m) |
---|
3928 | ENDDO |
---|
3929 | surf_usm_v(l)%dz_green(nzb_wall,m) = surf_usm_v(l)%zw_green(nzb_wall,m) |
---|
3930 | DO k = nzb_wall+1, nzt_wall |
---|
3931 | surf_usm_v(l)%dz_green(k,m) = surf_usm_v(l)%zw_green(k,m) - & |
---|
3932 | surf_usm_v(l)%zw_green(k-1,m) |
---|
3933 | ENDDO |
---|
3934 | |
---|
3935 | surf_usm_v(l)%dz_wall(nzt_wall+1,m) = & |
---|
3936 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
3937 | |
---|
3938 | DO k = nzb_wall, nzt_wall-1 |
---|
3939 | surf_usm_v(l)%dz_wall_stag(k,m) = 0.5 * ( & |
---|
3940 | surf_usm_v(l)%dz_wall(k+1,m) + & |
---|
3941 | surf_usm_v(l)%dz_wall(k,m) ) |
---|
3942 | ENDDO |
---|
3943 | surf_usm_v(l)%dz_wall_stag(nzt_wall,m) = & |
---|
3944 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
3945 | surf_usm_v(l)%dz_window(nzt_wall+1,m) = & |
---|
3946 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
3947 | |
---|
3948 | DO k = nzb_wall, nzt_wall-1 |
---|
3949 | surf_usm_v(l)%dz_window_stag(k,m) = 0.5 * ( & |
---|
3950 | surf_usm_v(l)%dz_window(k+1,m) + & |
---|
3951 | surf_usm_v(l)%dz_window(k,m) ) |
---|
3952 | ENDDO |
---|
3953 | surf_usm_v(l)%dz_window_stag(nzt_wall,m) = & |
---|
3954 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
3955 | surf_usm_v(l)%dz_green(nzt_wall+1,m) = & |
---|
3956 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
3957 | |
---|
3958 | DO k = nzb_wall, nzt_wall-1 |
---|
3959 | surf_usm_v(l)%dz_green_stag(k,m) = 0.5 * ( & |
---|
3960 | surf_usm_v(l)%dz_green(k+1,m) + & |
---|
3961 | surf_usm_v(l)%dz_green(k,m) ) |
---|
3962 | ENDDO |
---|
3963 | surf_usm_v(l)%dz_green_stag(nzt_wall,m) = & |
---|
3964 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
3965 | ENDDO |
---|
3966 | surf_usm_v(l)%ddz_wall = 1.0_wp / surf_usm_v(l)%dz_wall |
---|
3967 | surf_usm_v(l)%ddz_wall_stag = 1.0_wp / surf_usm_v(l)%dz_wall_stag |
---|
3968 | surf_usm_v(l)%ddz_window = 1.0_wp / surf_usm_v(l)%dz_window |
---|
3969 | surf_usm_v(l)%ddz_window_stag = 1.0_wp / surf_usm_v(l)%dz_window_stag |
---|
3970 | surf_usm_v(l)%ddz_green = 1.0_wp / surf_usm_v(l)%dz_green |
---|
3971 | surf_usm_v(l)%ddz_green_stag = 1.0_wp / surf_usm_v(l)%dz_green_stag |
---|
3972 | ENDDO |
---|
3973 | |
---|
3974 | |
---|
3975 | CALL location_message( ' wall structures filed out', .TRUE. ) |
---|
3976 | |
---|
3977 | CALL location_message( ' initialization of wall surface model finished', .TRUE. ) |
---|
3978 | |
---|
3979 | END SUBROUTINE usm_init_material_model |
---|
3980 | |
---|
3981 | |
---|
3982 | !------------------------------------------------------------------------------! |
---|
3983 | ! Description: |
---|
3984 | ! ------------ |
---|
3985 | !> Initialization of the urban surface model |
---|
3986 | !------------------------------------------------------------------------------! |
---|
3987 | SUBROUTINE usm_init |
---|
3988 | |
---|
3989 | USE arrays_3d, & |
---|
3990 | ONLY: zw |
---|
3991 | |
---|
3992 | USE netcdf_data_input_mod, & |
---|
3993 | ONLY: building_pars_f, building_type_f, terrain_height_f |
---|
3994 | |
---|
3995 | IMPLICIT NONE |
---|
3996 | |
---|
3997 | INTEGER(iwp) :: i !< loop index x-dirction |
---|
3998 | INTEGER(iwp) :: ind_alb_green !< index in input list for green albedo |
---|
3999 | INTEGER(iwp) :: ind_alb_wall !< index in input list for wall albedo |
---|
4000 | INTEGER(iwp) :: ind_alb_win !< index in input list for window albedo |
---|
4001 | INTEGER(iwp) :: ind_emis_wall !< index in input list for wall emissivity |
---|
4002 | INTEGER(iwp) :: ind_emis_green !< index in input list for green emissivity |
---|
4003 | INTEGER(iwp) :: ind_emis_win !< index in input list for window emissivity |
---|
4004 | INTEGER(iwp) :: ind_green_frac_w !< index in input list for green fraction on wall |
---|
4005 | INTEGER(iwp) :: ind_green_frac_r !< index in input list for green fraction on roof |
---|
4006 | INTEGER(iwp) :: ind_hc1 !< index in input list for heat capacity at first wall layer |
---|
4007 | INTEGER(iwp) :: ind_hc1_win !< index in input list for heat capacity at first window layer |
---|
4008 | INTEGER(iwp) :: ind_hc2 !< index in input list for heat capacity at second wall layer |
---|
4009 | INTEGER(iwp) :: ind_hc2_win !< index in input list for heat capacity at second window layer |
---|
4010 | INTEGER(iwp) :: ind_hc3 !< index in input list for heat capacity at third wall layer |
---|
4011 | INTEGER(iwp) :: ind_hc3_win !< index in input list for heat capacity at third window layer |
---|
4012 | INTEGER(iwp) :: ind_lai_r !< index in input list for LAI on roof |
---|
4013 | INTEGER(iwp) :: ind_lai_w !< index in input list for LAI on wall |
---|
4014 | INTEGER(iwp) :: ind_tc1 !< index in input list for thermal conductivity at first wall layer |
---|
4015 | INTEGER(iwp) :: ind_tc1_win !< index in input list for thermal conductivity at first window layer |
---|
4016 | INTEGER(iwp) :: ind_tc2 !< index in input list for thermal conductivity at second wall layer |
---|
4017 | INTEGER(iwp) :: ind_tc2_win !< index in input list for thermal conductivity at second window layer |
---|
4018 | INTEGER(iwp) :: ind_tc3 !< index in input list for thermal conductivity at third wall layer |
---|
4019 | INTEGER(iwp) :: ind_tc3_win !< index in input list for thermal conductivity at third window layer |
---|
4020 | INTEGER(iwp) :: ind_thick_1 !< index in input list for thickness of first wall layer |
---|
4021 | INTEGER(iwp) :: ind_thick_1_win !< index in input list for thickness of first window layer |
---|
4022 | INTEGER(iwp) :: ind_thick_2 !< index in input list for thickness of second wall layer |
---|
4023 | INTEGER(iwp) :: ind_thick_2_win !< index in input list for thickness of second window layer |
---|
4024 | INTEGER(iwp) :: ind_thick_3 !< index in input list for thickness of third wall layer |
---|
4025 | INTEGER(iwp) :: ind_thick_3_win !< index in input list for thickness of third window layer |
---|
4026 | INTEGER(iwp) :: ind_thick_4 !< index in input list for thickness of fourth wall layer |
---|
4027 | INTEGER(iwp) :: ind_thick_4_win !< index in input list for thickness of fourth window layer |
---|
4028 | INTEGER(iwp) :: ind_trans !< index in input list for window transmissivity |
---|
4029 | INTEGER(iwp) :: ind_wall_frac !< index in input list for wall fraction |
---|
4030 | INTEGER(iwp) :: ind_win_frac !< index in input list for window fraction |
---|
4031 | INTEGER(iwp) :: ind_z0 !< index in input list for z0 |
---|
4032 | INTEGER(iwp) :: ind_z0qh !< index in input list for z0h / z0q |
---|
4033 | INTEGER(iwp) :: j !< loop index y-dirction |
---|
4034 | INTEGER(iwp) :: k !< loop index z-dirction |
---|
4035 | INTEGER(iwp) :: l !< loop index surface orientation |
---|
4036 | INTEGER(iwp) :: m !< loop index surface element |
---|
4037 | INTEGER(iwp) :: st !< dummy |
---|
4038 | |
---|
4039 | REAL(wp) :: c, tin, twin |
---|
4040 | REAL(wp) :: ground_floor_level_l !< local height of ground floor level |
---|
4041 | REAL(wp) :: z_agl !< height above ground |
---|
4042 | |
---|
4043 | CALL location_message( 'initializing urban surface model', .FALSE. ) |
---|
4044 | |
---|
4045 | CALL cpu_log( log_point_s(78), 'usm_init', 'start' ) |
---|
4046 | ! |
---|
4047 | !-- surface forcing have to be disabled for LSF |
---|
4048 | !-- in case of enabled urban surface module |
---|
4049 | IF ( large_scale_forcing ) THEN |
---|
4050 | lsf_surf = .FALSE. |
---|
4051 | ENDIF |
---|
4052 | |
---|
4053 | ! |
---|
4054 | !-- Flag surface elements belonging to the ground floor level. Therefore, |
---|
4055 | !-- use terrain height array from file, if available. This flag is later used |
---|
4056 | !-- to control initialization of surface attributes. |
---|
4057 | !-- Todo: for the moment disable initialization of building roofs with |
---|
4058 | !-- ground-floor-level properties. |
---|
4059 | surf_usm_h%ground_level = .FALSE. |
---|
4060 | ! DO m = 1, surf_usm_h%ns |
---|
4061 | ! i = surf_usm_h%i(m) |
---|
4062 | ! j = surf_usm_h%j(m) |
---|
4063 | ! k = surf_usm_h%k(m) |
---|
4064 | ! ! |
---|
4065 | ! !-- Get local ground level. If no ground level is given in input file, |
---|
4066 | ! !-- use default value. |
---|
4067 | ! ground_floor_level_l = ground_floor_level |
---|
4068 | ! IF ( building_pars_f%from_file ) THEN |
---|
4069 | ! IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4070 | ! building_pars_f%fill ) & |
---|
4071 | ! ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4072 | ! ENDIF |
---|
4073 | ! ! |
---|
4074 | ! !-- Determine height of surface element above ground level |
---|
4075 | ! IF ( terrain_height_f%from_file ) THEN |
---|
4076 | ! z_agl = zw(k) - terrain_height_f%var(j,i) |
---|
4077 | ! ELSE |
---|
4078 | ! z_agl = zw(k) |
---|
4079 | ! ENDIF |
---|
4080 | ! ! |
---|
4081 | ! !-- Set flag for ground level |
---|
4082 | ! IF ( z_agl <= ground_floor_level_l ) & |
---|
4083 | ! surf_usm_h%ground_level(m) = .TRUE. |
---|
4084 | ! ENDDO |
---|
4085 | |
---|
4086 | DO l = 0, 3 |
---|
4087 | surf_usm_v(l)%ground_level = .FALSE. |
---|
4088 | DO m = 1, surf_usm_v(l)%ns |
---|
4089 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4090 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4091 | k = surf_usm_v(l)%k(m) |
---|
4092 | ! |
---|
4093 | !-- Get local ground level. If no ground level is given in input file, |
---|
4094 | !-- use default value. |
---|
4095 | ground_floor_level_l = ground_floor_level |
---|
4096 | IF ( building_pars_f%from_file ) THEN |
---|
4097 | IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4098 | building_pars_f%fill ) & |
---|
4099 | ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4100 | ENDIF |
---|
4101 | ! |
---|
4102 | !-- Determine height of surface element above ground level. Please |
---|
4103 | !-- note, height of surface element is determined with respect to |
---|
4104 | !-- its height of the adjoing atmospheric grid point. |
---|
4105 | IF ( terrain_height_f%from_file ) THEN |
---|
4106 | z_agl = zw(k) - terrain_height_f%var(j-surf_usm_v(l)%joff, & |
---|
4107 | i-surf_usm_v(l)%ioff) |
---|
4108 | ELSE |
---|
4109 | z_agl = zw(k) |
---|
4110 | ENDIF |
---|
4111 | ! |
---|
4112 | !-- Set flag for ground level |
---|
4113 | IF ( z_agl <= ground_floor_level_l ) & |
---|
4114 | surf_usm_v(l)%ground_level(m) = .TRUE. |
---|
4115 | |
---|
4116 | ENDDO |
---|
4117 | ENDDO |
---|
4118 | ! |
---|
4119 | !-- Initialization of resistances. |
---|
4120 | DO m = 1, surf_usm_h%ns |
---|
4121 | surf_usm_h%r_a(m) = 50.0_wp |
---|
4122 | surf_usm_h%r_a_green(m) = 50.0_wp |
---|
4123 | surf_usm_h%r_a_window(m) = 50.0_wp |
---|
4124 | ENDDO |
---|
4125 | DO l = 0, 3 |
---|
4126 | DO m = 1, surf_usm_v(l)%ns |
---|
4127 | surf_usm_v(l)%r_a(m) = 50.0_wp |
---|
4128 | surf_usm_v(l)%r_a_green(m) = 50.0_wp |
---|
4129 | surf_usm_v(l)%r_a_window(m) = 50.0_wp |
---|
4130 | ENDDO |
---|
4131 | ENDDO |
---|
4132 | |
---|
4133 | ! |
---|
4134 | !-- Map values onto horizontal elemements |
---|
4135 | DO m = 1, surf_usm_h%ns |
---|
4136 | surf_usm_h%r_canopy_min(m) = 200.0_wp !< min_canopy_resistance |
---|
4137 | surf_usm_h%g_d(m) = 0.0_wp !< canopy_resistance_coefficient |
---|
4138 | ENDDO |
---|
4139 | ! |
---|
4140 | !-- Map values onto vertical elements, even though this does not make |
---|
4141 | !-- much sense. |
---|
4142 | DO l = 0, 3 |
---|
4143 | DO m = 1, surf_usm_v(l)%ns |
---|
4144 | surf_usm_v(l)%r_canopy_min(m) = 200.0_wp !< min_canopy_resistance |
---|
4145 | surf_usm_v(l)%g_d(m) = 0.0_wp !< canopy_resistance_coefficient |
---|
4146 | ENDDO |
---|
4147 | ENDDO |
---|
4148 | |
---|
4149 | ! |
---|
4150 | !-- Initialize urban-type surface attribute. According to initialization in |
---|
4151 | !-- land-surface model, follow a 3-level approach. |
---|
4152 | !-- Level 1 - initialization via default attributes |
---|
4153 | DO m = 1, surf_usm_h%ns |
---|
4154 | ! |
---|
4155 | !-- Now, all horizontal surfaces are roof surfaces (?) |
---|
4156 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
4157 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
4158 | ! |
---|
4159 | !-- In order to distinguish between ground floor level and |
---|
4160 | !-- above-ground-floor level surfaces, set input indices. |
---|
4161 | |
---|
4162 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4163 | surf_usm_h%ground_level(m) ) |
---|
4164 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4165 | surf_usm_h%ground_level(m) ) |
---|
4166 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4167 | surf_usm_h%ground_level(m) ) |
---|
4168 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4169 | surf_usm_h%ground_level(m) ) |
---|
4170 | ! |
---|
4171 | !-- Store building type and its name on each surface element |
---|
4172 | surf_usm_h%building_type(m) = building_type |
---|
4173 | surf_usm_h%building_type_name(m) = building_type_name(building_type) |
---|
4174 | ! |
---|
4175 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4176 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,building_type) |
---|
4177 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,building_type) |
---|
4178 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,building_type) |
---|
4179 | surf_usm_h%lai(m) = building_pars(ind_lai_r,building_type) |
---|
4180 | |
---|
4181 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
4182 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
4183 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,building_type) |
---|
4184 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,building_type) |
---|
4185 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
4186 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
4187 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,building_type) |
---|
4188 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,building_type) |
---|
4189 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
4190 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
4191 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,building_type) |
---|
4192 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,building_type) |
---|
4193 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
4194 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
4195 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,building_type) |
---|
4196 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,building_type) |
---|
4197 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,building_type) |
---|
4198 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,building_type) |
---|
4199 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,building_type) |
---|
4200 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,building_type) |
---|
4201 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,building_type) |
---|
4202 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,building_type) |
---|
4203 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,building_type) |
---|
4204 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,building_type) |
---|
4205 | |
---|
4206 | surf_usm_h%target_temp_summer(m) = building_pars(117,building_type) |
---|
4207 | surf_usm_h%target_temp_winter(m) = building_pars(118,building_type) |
---|
4208 | ! |
---|
4209 | !-- emissivity of wall-, green- and window fraction |
---|
4210 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,building_type) |
---|
4211 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,building_type) |
---|
4212 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,building_type) |
---|
4213 | |
---|
4214 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,building_type) |
---|
4215 | |
---|
4216 | surf_usm_h%z0(m) = building_pars(ind_z0,building_type) |
---|
4217 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
4218 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
4219 | ! |
---|
4220 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
4221 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,building_type) ) |
---|
4222 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,building_type) ) |
---|
4223 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,building_type) ) |
---|
4224 | |
---|
4225 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
4226 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
4227 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
4228 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
4229 | |
---|
4230 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
4231 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
4232 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
4233 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
4234 | |
---|
4235 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,building_type) |
---|
4236 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,building_type) |
---|
4237 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,building_type) |
---|
4238 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,building_type) |
---|
4239 | |
---|
4240 | surf_usm_h%c_surface(m) = building_pars(0,building_type) |
---|
4241 | surf_usm_h%lambda_surf(m) = building_pars(3,building_type) |
---|
4242 | surf_usm_h%c_surface_green(m) = building_pars(2,building_type) |
---|
4243 | surf_usm_h%lambda_surf_green(m) = building_pars(5,building_type) |
---|
4244 | surf_usm_h%c_surface_window(m) = building_pars(1,building_type) |
---|
4245 | surf_usm_h%lambda_surf_window(m) = building_pars(4,building_type) |
---|
4246 | |
---|
4247 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,building_type) |
---|
4248 | |
---|
4249 | ENDDO |
---|
4250 | |
---|
4251 | DO l = 0, 3 |
---|
4252 | DO m = 1, surf_usm_v(l)%ns |
---|
4253 | |
---|
4254 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for root surface |
---|
4255 | ! |
---|
4256 | !-- In order to distinguish between ground floor level and |
---|
4257 | !-- above-ground-floor level surfaces, set input indices. |
---|
4258 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
4259 | surf_usm_v(l)%ground_level(m) ) |
---|
4260 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
4261 | surf_usm_v(l)%ground_level(m) ) |
---|
4262 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
4263 | surf_usm_v(l)%ground_level(m) ) |
---|
4264 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4265 | surf_usm_v(l)%ground_level(m) ) |
---|
4266 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4267 | surf_usm_v(l)%ground_level(m) ) |
---|
4268 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4269 | surf_usm_v(l)%ground_level(m) ) |
---|
4270 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4271 | surf_usm_v(l)%ground_level(m) ) |
---|
4272 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4273 | surf_usm_v(l)%ground_level(m) ) |
---|
4274 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4275 | surf_usm_v(l)%ground_level(m) ) |
---|
4276 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4277 | surf_usm_v(l)%ground_level(m) ) |
---|
4278 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
4279 | surf_usm_v(l)%ground_level(m) ) |
---|
4280 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4281 | surf_usm_v(l)%ground_level(m) ) |
---|
4282 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
4283 | surf_usm_v(l)%ground_level(m) ) |
---|
4284 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4285 | surf_usm_v(l)%ground_level(m) ) |
---|
4286 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
4287 | surf_usm_v(l)%ground_level(m) ) |
---|
4288 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4289 | surf_usm_v(l)%ground_level(m) ) |
---|
4290 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
4291 | surf_usm_v(l)%ground_level(m) ) |
---|
4292 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4293 | surf_usm_v(l)%ground_level(m) ) |
---|
4294 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
4295 | surf_usm_v(l)%ground_level(m) ) |
---|
4296 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4297 | surf_usm_v(l)%ground_level(m) ) |
---|
4298 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
4299 | surf_usm_v(l)%ground_level(m) ) |
---|
4300 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
4301 | surf_usm_v(l)%ground_level(m) ) |
---|
4302 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
4303 | surf_usm_v(l)%ground_level(m) ) |
---|
4304 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
4305 | surf_usm_v(l)%ground_level(m) ) |
---|
4306 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
4307 | surf_usm_v(l)%ground_level(m) ) |
---|
4308 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
4309 | surf_usm_v(l)%ground_level(m) ) |
---|
4310 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
4311 | surf_usm_v(l)%ground_level(m) ) |
---|
4312 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
4313 | surf_usm_v(l)%ground_level(m) ) |
---|
4314 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
4315 | surf_usm_v(l)%ground_level(m) ) |
---|
4316 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4317 | surf_usm_v(l)%ground_level(m) ) |
---|
4318 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4319 | surf_usm_v(l)%ground_level(m) ) |
---|
4320 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4321 | surf_usm_v(l)%ground_level(m) ) |
---|
4322 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4323 | surf_usm_v(l)%ground_level(m) ) |
---|
4324 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4325 | surf_usm_v(l)%ground_level(m) ) |
---|
4326 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4327 | surf_usm_v(l)%ground_level(m) ) |
---|
4328 | ! |
---|
4329 | !-- Store building type and its name on each surface element |
---|
4330 | surf_usm_v(l)%building_type(m) = building_type |
---|
4331 | surf_usm_v(l)%building_type_name(m) = building_type_name(building_type) |
---|
4332 | ! |
---|
4333 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4334 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,building_type) |
---|
4335 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,building_type) |
---|
4336 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,building_type) |
---|
4337 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,building_type) |
---|
4338 | |
---|
4339 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
4340 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
4341 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
4342 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
4343 | |
---|
4344 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
4345 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
4346 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,building_type) |
---|
4347 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,building_type) |
---|
4348 | |
---|
4349 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,building_type) |
---|
4350 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,building_type) |
---|
4351 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,building_type) |
---|
4352 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,building_type) |
---|
4353 | |
---|
4354 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
4355 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
4356 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
4357 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
4358 | |
---|
4359 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
4360 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
4361 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,building_type) |
---|
4362 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,building_type) |
---|
4363 | |
---|
4364 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,building_type) |
---|
4365 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,building_type) |
---|
4366 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,building_type) |
---|
4367 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,building_type) |
---|
4368 | |
---|
4369 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,building_type) |
---|
4370 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,building_type) |
---|
4371 | ! |
---|
4372 | !-- emissivity of wall-, green- and window fraction |
---|
4373 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,building_type) |
---|
4374 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,building_type) |
---|
4375 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,building_type) |
---|
4376 | |
---|
4377 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,building_type) |
---|
4378 | |
---|
4379 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,building_type) |
---|
4380 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
4381 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
4382 | |
---|
4383 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,building_type) ) |
---|
4384 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,building_type) ) |
---|
4385 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,building_type) ) |
---|
4386 | |
---|
4387 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
4388 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
4389 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
4390 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
4391 | |
---|
4392 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
4393 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
4394 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
4395 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
4396 | |
---|
4397 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,building_type) |
---|
4398 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,building_type) |
---|
4399 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,building_type) |
---|
4400 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,building_type) |
---|
4401 | |
---|
4402 | surf_usm_v(l)%c_surface(m) = building_pars(0,building_type) |
---|
4403 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,building_type) |
---|
4404 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,building_type) |
---|
4405 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,building_type) |
---|
4406 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,building_type) |
---|
4407 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,building_type) |
---|
4408 | |
---|
4409 | ENDDO |
---|
4410 | ENDDO |
---|
4411 | ! |
---|
4412 | !-- Level 2 - initialization via building type read from file |
---|
4413 | IF ( building_type_f%from_file ) THEN |
---|
4414 | DO m = 1, surf_usm_h%ns |
---|
4415 | i = surf_usm_h%i(m) |
---|
4416 | j = surf_usm_h%j(m) |
---|
4417 | ! |
---|
4418 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
4419 | st = building_type_f%var(j,i) |
---|
4420 | IF ( st /= building_type_f%fill ) THEN |
---|
4421 | |
---|
4422 | ! |
---|
4423 | !-- In order to distinguish between ground floor level and |
---|
4424 | !-- above-ground-floor level surfaces, set input indices. |
---|
4425 | |
---|
4426 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4427 | surf_usm_h%ground_level(m) ) |
---|
4428 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4429 | surf_usm_h%ground_level(m) ) |
---|
4430 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4431 | surf_usm_h%ground_level(m) ) |
---|
4432 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4433 | surf_usm_h%ground_level(m) ) |
---|
4434 | ! |
---|
4435 | !-- Store building type and its name on each surface element |
---|
4436 | surf_usm_h%building_type(m) = st |
---|
4437 | surf_usm_h%building_type_name(m) = building_type_name(st) |
---|
4438 | ! |
---|
4439 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4440 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,st) |
---|
4441 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,st) |
---|
4442 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,st) |
---|
4443 | surf_usm_h%lai(m) = building_pars(ind_lai_r,st) |
---|
4444 | |
---|
4445 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,st) |
---|
4446 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,st) |
---|
4447 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,st) |
---|
4448 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,st) |
---|
4449 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,st) |
---|
4450 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,st) |
---|
4451 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,st) |
---|
4452 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,st) |
---|
4453 | |
---|
4454 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
4455 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
4456 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,st) |
---|
4457 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,st) |
---|
4458 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
4459 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
4460 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,st) |
---|
4461 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,st) |
---|
4462 | |
---|
4463 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,st) |
---|
4464 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,st) |
---|
4465 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,st) |
---|
4466 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,st) |
---|
4467 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,st) |
---|
4468 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,st) |
---|
4469 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,st) |
---|
4470 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,st) |
---|
4471 | |
---|
4472 | surf_usm_h%target_temp_summer(m) = building_pars(117,st) |
---|
4473 | surf_usm_h%target_temp_winter(m) = building_pars(118,st) |
---|
4474 | ! |
---|
4475 | !-- emissivity of wall-, green- and window fraction |
---|
4476 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,st) |
---|
4477 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,st) |
---|
4478 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,st) |
---|
4479 | |
---|
4480 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,st) |
---|
4481 | |
---|
4482 | surf_usm_h%z0(m) = building_pars(ind_z0,st) |
---|
4483 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,st) |
---|
4484 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,st) |
---|
4485 | ! |
---|
4486 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
4487 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,st) ) |
---|
4488 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,st) ) |
---|
4489 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,st) ) |
---|
4490 | |
---|
4491 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
4492 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
4493 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
4494 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
4495 | |
---|
4496 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
4497 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
4498 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
4499 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
4500 | |
---|
4501 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,st) |
---|
4502 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,st) |
---|
4503 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,st) |
---|
4504 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,st) |
---|
4505 | |
---|
4506 | surf_usm_h%c_surface(m) = building_pars(0,st) |
---|
4507 | surf_usm_h%lambda_surf(m) = building_pars(3,st) |
---|
4508 | surf_usm_h%c_surface_green(m) = building_pars(2,st) |
---|
4509 | surf_usm_h%lambda_surf_green(m) = building_pars(5,st) |
---|
4510 | surf_usm_h%c_surface_window(m) = building_pars(1,st) |
---|
4511 | surf_usm_h%lambda_surf_window(m) = building_pars(4,st) |
---|
4512 | |
---|
4513 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,st) |
---|
4514 | |
---|
4515 | ENDIF |
---|
4516 | ENDDO |
---|
4517 | |
---|
4518 | DO l = 0, 3 |
---|
4519 | DO m = 1, surf_usm_v(l)%ns |
---|
4520 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4521 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4522 | ! |
---|
4523 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
4524 | |
---|
4525 | st = building_type_f%var(j,i) |
---|
4526 | IF ( st /= building_type_f%fill ) THEN |
---|
4527 | |
---|
4528 | ! |
---|
4529 | !-- In order to distinguish between ground floor level and |
---|
4530 | !-- above-ground-floor level surfaces, set input indices. |
---|
4531 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
4532 | surf_usm_v(l)%ground_level(m) ) |
---|
4533 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
4534 | surf_usm_v(l)%ground_level(m) ) |
---|
4535 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
4536 | surf_usm_v(l)%ground_level(m) ) |
---|
4537 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4538 | surf_usm_v(l)%ground_level(m) ) |
---|
4539 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4540 | surf_usm_v(l)%ground_level(m) ) |
---|
4541 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4542 | surf_usm_v(l)%ground_level(m) ) |
---|
4543 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4544 | surf_usm_v(l)%ground_level(m) ) |
---|
4545 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4546 | surf_usm_v(l)%ground_level(m) ) |
---|
4547 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4548 | surf_usm_v(l)%ground_level(m) ) |
---|
4549 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4550 | surf_usm_v(l)%ground_level(m) ) |
---|
4551 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
4552 | surf_usm_v(l)%ground_level(m) ) |
---|
4553 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4554 | surf_usm_v(l)%ground_level(m) ) |
---|
4555 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
4556 | surf_usm_v(l)%ground_level(m) ) |
---|
4557 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4558 | surf_usm_v(l)%ground_level(m) ) |
---|
4559 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
4560 | surf_usm_v(l)%ground_level(m) ) |
---|
4561 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4562 | surf_usm_v(l)%ground_level(m) ) |
---|
4563 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
4564 | surf_usm_v(l)%ground_level(m) ) |
---|
4565 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4566 | surf_usm_v(l)%ground_level(m) ) |
---|
4567 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
4568 | surf_usm_v(l)%ground_level(m) ) |
---|
4569 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4570 | surf_usm_v(l)%ground_level(m) ) |
---|
4571 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
4572 | surf_usm_v(l)%ground_level(m) ) |
---|
4573 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
4574 | surf_usm_v(l)%ground_level(m) ) |
---|
4575 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
4576 | surf_usm_v(l)%ground_level(m) ) |
---|
4577 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
4578 | surf_usm_v(l)%ground_level(m) ) |
---|
4579 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
4580 | surf_usm_v(l)%ground_level(m) ) |
---|
4581 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
4582 | surf_usm_v(l)%ground_level(m) ) |
---|
4583 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
4584 | surf_usm_v(l)%ground_level(m) ) |
---|
4585 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
4586 | surf_usm_v(l)%ground_level(m) ) |
---|
4587 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
4588 | surf_usm_v(l)%ground_level(m) ) |
---|
4589 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4590 | surf_usm_v(l)%ground_level(m) ) |
---|
4591 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4592 | surf_usm_v(l)%ground_level(m) ) |
---|
4593 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4594 | surf_usm_v(l)%ground_level(m) ) |
---|
4595 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4596 | surf_usm_v(l)%ground_level(m) ) |
---|
4597 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4598 | surf_usm_v(l)%ground_level(m) ) |
---|
4599 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4600 | surf_usm_v(l)%ground_level(m) ) |
---|
4601 | ! |
---|
4602 | !-- Store building type and its name on each surface element |
---|
4603 | surf_usm_v(l)%building_type(m) = st |
---|
4604 | surf_usm_v(l)%building_type_name(m) = building_type_name(st) |
---|
4605 | ! |
---|
4606 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4607 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,st) |
---|
4608 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,st) |
---|
4609 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,st) |
---|
4610 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,st) |
---|
4611 | |
---|
4612 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
4613 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
4614 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
4615 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
4616 | |
---|
4617 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
4618 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
4619 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,st) |
---|
4620 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,st) |
---|
4621 | |
---|
4622 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,st) |
---|
4623 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,st) |
---|
4624 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,st) |
---|
4625 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,st) |
---|
4626 | |
---|
4627 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
4628 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
4629 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
4630 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
4631 | |
---|
4632 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
4633 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
4634 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,st) |
---|
4635 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,st) |
---|
4636 | |
---|
4637 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,st) |
---|
4638 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,st) |
---|
4639 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,st) |
---|
4640 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,st) |
---|
4641 | |
---|
4642 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,st) |
---|
4643 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,st) |
---|
4644 | ! |
---|
4645 | !-- emissivity of wall-, green- and window fraction |
---|
4646 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,st) |
---|
4647 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,st) |
---|
4648 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,st) |
---|
4649 | |
---|
4650 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,st) |
---|
4651 | |
---|
4652 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,st) |
---|
4653 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,st) |
---|
4654 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,st) |
---|
4655 | |
---|
4656 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,st) ) |
---|
4657 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,st) ) |
---|
4658 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,st) ) |
---|
4659 | |
---|
4660 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4661 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4662 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4663 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4664 | |
---|
4665 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4666 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4667 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4668 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4669 | |
---|
4670 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,st) |
---|
4671 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,st) |
---|
4672 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,st) |
---|
4673 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,st) |
---|
4674 | |
---|
4675 | surf_usm_v(l)%c_surface(m) = building_pars(0,st) |
---|
4676 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,st) |
---|
4677 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,st) |
---|
4678 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,st) |
---|
4679 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,st) |
---|
4680 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,st) |
---|
4681 | |
---|
4682 | |
---|
4683 | ENDIF |
---|
4684 | ENDDO |
---|
4685 | ENDDO |
---|
4686 | ENDIF |
---|
4687 | |
---|
4688 | ! |
---|
4689 | !-- Level 3 - initialization via building_pars read from file |
---|
4690 | IF ( building_pars_f%from_file ) THEN |
---|
4691 | DO m = 1, surf_usm_h%ns |
---|
4692 | i = surf_usm_h%i(m) |
---|
4693 | j = surf_usm_h%j(m) |
---|
4694 | |
---|
4695 | ! |
---|
4696 | !-- In order to distinguish between ground floor level and |
---|
4697 | !-- above-ground-floor level surfaces, set input indices. |
---|
4698 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4699 | surf_usm_h%ground_level(m) ) |
---|
4700 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4701 | surf_usm_h%ground_level(m) ) |
---|
4702 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4703 | surf_usm_h%ground_level(m) ) |
---|
4704 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4705 | surf_usm_h%ground_level(m) ) |
---|
4706 | |
---|
4707 | ! |
---|
4708 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4709 | IF ( building_pars_f%pars_xy(ind_wall_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4710 | surf_usm_h%frac(ind_veg_wall,m) = building_pars_f%pars_xy(ind_wall_frac_r,j,i) |
---|
4711 | IF ( building_pars_f%pars_xy(ind_green_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4712 | surf_usm_h%frac(ind_pav_green,m) = building_pars_f%pars_xy(ind_green_frac_r,j,i) |
---|
4713 | IF ( building_pars_f%pars_xy(ind_win_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4714 | surf_usm_h%frac(ind_wat_win,m) = building_pars_f%pars_xy(ind_win_frac_r,j,i) |
---|
4715 | |
---|
4716 | |
---|
4717 | IF ( building_pars_f%pars_xy(ind_lai_r,j,i) /= building_pars_f%fill ) & |
---|
4718 | surf_usm_h%lai(m) = building_pars_f%pars_xy(ind_lai_r,j,i) |
---|
4719 | |
---|
4720 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4721 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4722 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4723 | ENDIF |
---|
4724 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4725 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
4726 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4727 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
4728 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4729 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4730 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4731 | ENDIF |
---|
4732 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4733 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
4734 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4735 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
4736 | IF ( building_pars_f%pars_xy(ind_hc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
4737 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
4738 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
4739 | ENDIF |
---|
4740 | IF ( building_pars_f%pars_xy(ind_hc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
4741 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win_r,j,i) |
---|
4742 | IF ( building_pars_f%pars_xy(ind_hc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
4743 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win_r,j,i) |
---|
4744 | |
---|
4745 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4746 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
4747 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
4748 | ENDIF |
---|
4749 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4750 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_wall_r,j,i) |
---|
4751 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4752 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_wall_r,j,i) |
---|
4753 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4754 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
4755 | 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) |
---|
4756 | ENDIF |
---|
4757 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4758 | 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) |
---|
4759 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4760 | 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) |
---|
4761 | IF ( building_pars_f%pars_xy(ind_tc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
4762 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
4763 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
4764 | ENDIF |
---|
4765 | IF ( building_pars_f%pars_xy(ind_tc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
4766 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win_r,j,i) |
---|
4767 | IF ( building_pars_f%pars_xy(ind_tc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
4768 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win_r,j,i) |
---|
4769 | |
---|
4770 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
4771 | surf_usm_h%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
4772 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
4773 | surf_usm_h%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
4774 | |
---|
4775 | IF ( building_pars_f%pars_xy(ind_emis_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4776 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall_r,j,i) |
---|
4777 | IF ( building_pars_f%pars_xy(ind_emis_green_r,j,i) /= building_pars_f%fill )& |
---|
4778 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green_r,j,i) |
---|
4779 | IF ( building_pars_f%pars_xy(ind_emis_win_r,j,i) /= building_pars_f%fill ) & |
---|
4780 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win_r,j,i) |
---|
4781 | |
---|
4782 | IF ( building_pars_f%pars_xy(ind_trans_r,j,i) /= building_pars_f%fill ) & |
---|
4783 | surf_usm_h%transmissivity(m) = building_pars_f%pars_xy(ind_trans_r,j,i) |
---|
4784 | |
---|
4785 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
4786 | surf_usm_h%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
4787 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4788 | surf_usm_h%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4789 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4790 | surf_usm_h%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4791 | |
---|
4792 | IF ( building_pars_f%pars_xy(ind_alb_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4793 | surf_usm_h%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall_r,j,i) |
---|
4794 | IF ( building_pars_f%pars_xy(ind_alb_green_r,j,i) /= building_pars_f%fill ) & |
---|
4795 | surf_usm_h%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green_r,j,i) |
---|
4796 | IF ( building_pars_f%pars_xy(ind_alb_win_r,j,i) /= building_pars_f%fill ) & |
---|
4797 | surf_usm_h%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win_r,j,i) |
---|
4798 | |
---|
4799 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4800 | surf_usm_h%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
4801 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4802 | surf_usm_h%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
4803 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4804 | surf_usm_h%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
4805 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4806 | surf_usm_h%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
4807 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4808 | surf_usm_h%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
4809 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4810 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
4811 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4812 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
4813 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4814 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
4815 | IF ( building_pars_f%pars_xy(ind_thick_1_win_r,j,i) /= building_pars_f%fill ) & |
---|
4816 | surf_usm_h%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win_r,j,i) |
---|
4817 | IF ( building_pars_f%pars_xy(ind_thick_2_win_r,j,i) /= building_pars_f%fill ) & |
---|
4818 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win_r,j,i) |
---|
4819 | IF ( building_pars_f%pars_xy(ind_thick_3_win_r,j,i) /= building_pars_f%fill ) & |
---|
4820 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win_r,j,i) |
---|
4821 | IF ( building_pars_f%pars_xy(ind_thick_4_win_r,j,i) /= building_pars_f%fill ) & |
---|
4822 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win_r,j,i) |
---|
4823 | |
---|
4824 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
4825 | surf_usm_h%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
4826 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
4827 | surf_usm_h%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
4828 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
4829 | surf_usm_h%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
4830 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
4831 | surf_usm_h%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
4832 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
4833 | surf_usm_h%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
4834 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
4835 | surf_usm_h%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
4836 | |
---|
4837 | IF ( building_pars_f%pars_xy(ind_green_type_roof,j,i) /= building_pars_f%fill ) & |
---|
4838 | surf_usm_h%green_type_roof(m) = building_pars_f%pars_xy(ind_green_type_roof,j,i) |
---|
4839 | ENDDO |
---|
4840 | |
---|
4841 | |
---|
4842 | |
---|
4843 | DO l = 0, 3 |
---|
4844 | DO m = 1, surf_usm_v(l)%ns |
---|
4845 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4846 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4847 | |
---|
4848 | ! |
---|
4849 | !-- In order to distinguish between ground floor level and |
---|
4850 | !-- above-ground-floor level surfaces, set input indices. |
---|
4851 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
4852 | surf_usm_v(l)%ground_level(m) ) |
---|
4853 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
4854 | surf_usm_v(l)%ground_level(m) ) |
---|
4855 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
4856 | surf_usm_v(l)%ground_level(m) ) |
---|
4857 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4858 | surf_usm_v(l)%ground_level(m) ) |
---|
4859 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4860 | surf_usm_v(l)%ground_level(m) ) |
---|
4861 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4862 | surf_usm_v(l)%ground_level(m) ) |
---|
4863 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4864 | surf_usm_v(l)%ground_level(m) ) |
---|
4865 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4866 | surf_usm_v(l)%ground_level(m) ) |
---|
4867 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4868 | surf_usm_v(l)%ground_level(m) ) |
---|
4869 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4870 | surf_usm_v(l)%ground_level(m) ) |
---|
4871 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
4872 | surf_usm_v(l)%ground_level(m) ) |
---|
4873 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4874 | surf_usm_v(l)%ground_level(m) ) |
---|
4875 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
4876 | surf_usm_v(l)%ground_level(m) ) |
---|
4877 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4878 | surf_usm_v(l)%ground_level(m) ) |
---|
4879 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
4880 | surf_usm_v(l)%ground_level(m) ) |
---|
4881 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4882 | surf_usm_v(l)%ground_level(m) ) |
---|
4883 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
4884 | surf_usm_v(l)%ground_level(m) ) |
---|
4885 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4886 | surf_usm_v(l)%ground_level(m) ) |
---|
4887 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
4888 | surf_usm_v(l)%ground_level(m) ) |
---|
4889 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4890 | surf_usm_v(l)%ground_level(m) ) |
---|
4891 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
4892 | surf_usm_v(l)%ground_level(m) ) |
---|
4893 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
4894 | surf_usm_v(l)%ground_level(m) ) |
---|
4895 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
4896 | surf_usm_v(l)%ground_level(m) ) |
---|
4897 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
4898 | surf_usm_v(l)%ground_level(m) ) |
---|
4899 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
4900 | surf_usm_v(l)%ground_level(m) ) |
---|
4901 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
4902 | surf_usm_v(l)%ground_level(m) ) |
---|
4903 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
4904 | surf_usm_v(l)%ground_level(m) ) |
---|
4905 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
4906 | surf_usm_v(l)%ground_level(m) ) |
---|
4907 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
4908 | surf_usm_v(l)%ground_level(m) ) |
---|
4909 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4910 | surf_usm_v(l)%ground_level(m) ) |
---|
4911 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4912 | surf_usm_v(l)%ground_level(m) ) |
---|
4913 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4914 | surf_usm_v(l)%ground_level(m) ) |
---|
4915 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4916 | surf_usm_v(l)%ground_level(m) ) |
---|
4917 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4918 | surf_usm_v(l)%ground_level(m) ) |
---|
4919 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4920 | surf_usm_v(l)%ground_level(m) ) |
---|
4921 | |
---|
4922 | ! |
---|
4923 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4924 | IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= & |
---|
4925 | building_pars_f%fill ) & |
---|
4926 | surf_usm_v(l)%frac(ind_veg_wall,m) = & |
---|
4927 | building_pars_f%pars_xy(ind_wall_frac,j,i) |
---|
4928 | IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /= & |
---|
4929 | building_pars_f%fill ) & |
---|
4930 | surf_usm_v(l)%frac(ind_pav_green,m) = & |
---|
4931 | building_pars_f%pars_xy(ind_green_frac_w,j,i) |
---|
4932 | IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= & |
---|
4933 | building_pars_f%fill ) & |
---|
4934 | surf_usm_v(l)%frac(ind_wat_win,m) = & |
---|
4935 | building_pars_f%pars_xy(ind_win_frac,j,i) |
---|
4936 | |
---|
4937 | IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill ) & |
---|
4938 | surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i) |
---|
4939 | |
---|
4940 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) & |
---|
4941 | THEN |
---|
4942 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = & |
---|
4943 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4944 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = & |
---|
4945 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4946 | ENDIF |
---|
4947 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4948 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = & |
---|
4949 | building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4950 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4951 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = & |
---|
4952 | building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4953 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
4954 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = & |
---|
4955 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4956 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = & |
---|
4957 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4958 | ENDIF |
---|
4959 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4960 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4961 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4962 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4963 | IF ( building_pars_f%pars_xy(ind_hc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
4964 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
4965 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
4966 | ENDIF |
---|
4967 | IF ( building_pars_f%pars_xy(ind_hc2_win,j,i) /= building_pars_f%fill ) & |
---|
4968 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win,j,i) |
---|
4969 | IF ( building_pars_f%pars_xy(ind_hc3_win,j,i) /= building_pars_f%fill ) & |
---|
4970 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win,j,i) |
---|
4971 | |
---|
4972 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4973 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4974 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4975 | ENDIF |
---|
4976 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4977 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4978 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4979 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4980 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4981 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4982 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4983 | ENDIF |
---|
4984 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4985 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4986 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4987 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4988 | IF ( building_pars_f%pars_xy(ind_tc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
4989 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
4990 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
4991 | ENDIF |
---|
4992 | IF ( building_pars_f%pars_xy(ind_tc2_win,j,i) /= building_pars_f%fill ) & |
---|
4993 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win,j,i) |
---|
4994 | IF ( building_pars_f%pars_xy(ind_tc3_win,j,i) /= building_pars_f%fill ) & |
---|
4995 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win,j,i) |
---|
4996 | |
---|
4997 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
4998 | surf_usm_v(l)%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
4999 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
5000 | surf_usm_v(l)%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
5001 | |
---|
5002 | IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill ) & |
---|
5003 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall,j,i) |
---|
5004 | IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )& |
---|
5005 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green,j,i) |
---|
5006 | IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill ) & |
---|
5007 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win,j,i) |
---|
5008 | |
---|
5009 | IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill ) & |
---|
5010 | surf_usm_v(l)%transmissivity(m) = building_pars_f%pars_xy(ind_trans,j,i) |
---|
5011 | |
---|
5012 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
5013 | surf_usm_v(l)%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
5014 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5015 | surf_usm_v(l)%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5016 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5017 | surf_usm_v(l)%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5018 | |
---|
5019 | IF ( building_pars_f%pars_xy(ind_alb_wall,j,i) /= building_pars_f%fill ) & |
---|
5020 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall,j,i) |
---|
5021 | IF ( building_pars_f%pars_xy(ind_alb_green,j,i) /= building_pars_f%fill ) & |
---|
5022 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green,j,i) |
---|
5023 | IF ( building_pars_f%pars_xy(ind_alb_win,j,i) /= building_pars_f%fill ) & |
---|
5024 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win,j,i) |
---|
5025 | |
---|
5026 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5027 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5028 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5029 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5030 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5031 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5032 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5033 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5034 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5035 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5036 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5037 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5038 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5039 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5040 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5041 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5042 | IF ( building_pars_f%pars_xy(ind_thick_1_win,j,i) /= building_pars_f%fill ) & |
---|
5043 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win,j,i) |
---|
5044 | IF ( building_pars_f%pars_xy(ind_thick_2_win,j,i) /= building_pars_f%fill ) & |
---|
5045 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win,j,i) |
---|
5046 | IF ( building_pars_f%pars_xy(ind_thick_3_win,j,i) /= building_pars_f%fill ) & |
---|
5047 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win,j,i) |
---|
5048 | IF ( building_pars_f%pars_xy(ind_thick_4_win,j,i) /= building_pars_f%fill ) & |
---|
5049 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win,j,i) |
---|
5050 | |
---|
5051 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
5052 | surf_usm_v(l)%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
5053 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
5054 | surf_usm_v(l)%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
5055 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
5056 | surf_usm_v(l)%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
5057 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
5058 | surf_usm_v(l)%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
5059 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
5060 | surf_usm_v(l)%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
5061 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
5062 | surf_usm_v(l)%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
5063 | |
---|
5064 | ENDDO |
---|
5065 | ENDDO |
---|
5066 | ENDIF |
---|
5067 | ! |
---|
5068 | !-- Read the surface_types array. |
---|
5069 | !-- Please note, here also initialization of surface attributes is done as |
---|
5070 | !-- long as _urbsurf and _surfpar files are available. Values from above |
---|
5071 | !-- will be overwritten. This might be removed later, but is still in the |
---|
5072 | !-- code to enable compatibility with older model version. |
---|
5073 | CALL usm_read_urban_surface_types() |
---|
5074 | |
---|
5075 | CALL usm_init_material_model() |
---|
5076 | ! |
---|
5077 | !-- init anthropogenic sources of heat |
---|
5078 | IF ( usm_anthropogenic_heat ) THEN |
---|
5079 | ! |
---|
5080 | !-- init anthropogenic sources of heat (from transportation for now) |
---|
5081 | CALL usm_read_anthropogenic_heat() |
---|
5082 | ENDIF |
---|
5083 | |
---|
5084 | ! |
---|
5085 | !-- Check for consistent initialization. |
---|
5086 | !-- Check if roughness length for momentum, or heat, exceed surface-layer |
---|
5087 | !-- height and decrease local roughness length where necessary. |
---|
5088 | DO m = 1, surf_usm_h%ns |
---|
5089 | IF ( surf_usm_h%z0(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5090 | |
---|
5091 | surf_usm_h%z0(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5092 | |
---|
5093 | WRITE( message_string, * ) 'z0 exceeds surface-layer height ' // & |
---|
5094 | 'at horizontal urban surface and is ' // & |
---|
5095 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5096 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
5097 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
5098 | 0, 0, 0, 6, 0 ) |
---|
5099 | ENDIF |
---|
5100 | IF ( surf_usm_h%z0h(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5101 | |
---|
5102 | surf_usm_h%z0h(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5103 | surf_usm_h%z0q(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5104 | |
---|
5105 | WRITE( message_string, * ) 'z0h exceeds surface-layer height ' // & |
---|
5106 | 'at horizontal urban surface and is ' // & |
---|
5107 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5108 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
5109 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
5110 | 0, 0, 0, 6, 0 ) |
---|
5111 | ENDIF |
---|
5112 | ENDDO |
---|
5113 | |
---|
5114 | DO l = 0, 3 |
---|
5115 | DO m = 1, surf_usm_v(l)%ns |
---|
5116 | IF ( surf_usm_v(l)%z0(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
5117 | |
---|
5118 | surf_usm_v(l)%z0(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
5119 | |
---|
5120 | WRITE( message_string, * ) 'z0 exceeds surface-layer height '// & |
---|
5121 | 'at vertical urban surface and is ' // & |
---|
5122 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5123 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
5124 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
5125 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
5126 | 0, 0, 0, 6, 0 ) |
---|
5127 | ENDIF |
---|
5128 | IF ( surf_usm_v(l)%z0h(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
5129 | |
---|
5130 | surf_usm_v(l)%z0h(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
5131 | surf_usm_v(l)%z0q(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
5132 | |
---|
5133 | WRITE( message_string, * ) 'z0h exceeds surface-layer height '// & |
---|
5134 | 'at vertical urban surface and is ' // & |
---|
5135 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5136 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
5137 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
5138 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
5139 | 0, 0, 0, 6, 0 ) |
---|
5140 | ENDIF |
---|
5141 | ENDDO |
---|
5142 | ENDDO |
---|
5143 | |
---|
5144 | ! |
---|
5145 | !-- Intitialization of the surface and wall/ground/roof temperature |
---|
5146 | ! |
---|
5147 | !-- Initialization for restart runs |
---|
5148 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. & |
---|
5149 | TRIM( initializing_actions ) /= 'cyclic_fill' ) THEN |
---|
5150 | |
---|
5151 | ! |
---|
5152 | !-- At horizontal surfaces. Please note, t_surf_wall_h is defined on a |
---|
5153 | !-- different data type, but with the same dimension. |
---|
5154 | DO m = 1, surf_usm_h%ns |
---|
5155 | i = surf_usm_h%i(m) |
---|
5156 | j = surf_usm_h%j(m) |
---|
5157 | k = surf_usm_h%k(m) |
---|
5158 | |
---|
5159 | t_surf_wall_h(m) = pt(k,j,i) * exner(k) |
---|
5160 | t_surf_window_h(m) = pt(k,j,i) * exner(k) |
---|
5161 | t_surf_green_h(m) = pt(k,j,i) * exner(k) |
---|
5162 | surf_usm_h%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
5163 | ENDDO |
---|
5164 | ! |
---|
5165 | !-- At vertical surfaces. |
---|
5166 | DO l = 0, 3 |
---|
5167 | DO m = 1, surf_usm_v(l)%ns |
---|
5168 | i = surf_usm_v(l)%i(m) |
---|
5169 | j = surf_usm_v(l)%j(m) |
---|
5170 | k = surf_usm_v(l)%k(m) |
---|
5171 | |
---|
5172 | t_surf_wall_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
5173 | t_surf_window_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
5174 | t_surf_green_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
5175 | surf_usm_v(l)%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
5176 | ENDDO |
---|
5177 | ENDDO |
---|
5178 | |
---|
5179 | ! |
---|
5180 | !-- For the sake of correct initialization, set also q_surface. |
---|
5181 | !-- Note, at urban surfaces q_surface is initialized with 0. |
---|
5182 | IF ( humidity ) THEN |
---|
5183 | DO m = 1, surf_usm_h%ns |
---|
5184 | surf_usm_h%q_surface(m) = 0.0_wp |
---|
5185 | ENDDO |
---|
5186 | DO l = 0, 3 |
---|
5187 | DO m = 1, surf_usm_v(l)%ns |
---|
5188 | surf_usm_v(l)%q_surface(m) = 0.0_wp |
---|
5189 | ENDDO |
---|
5190 | ENDDO |
---|
5191 | ENDIF |
---|
5192 | ! |
---|
5193 | !-- initial values for t_wall |
---|
5194 | !-- outer value is set to surface temperature |
---|
5195 | !-- inner value is set to wall_inner_temperature |
---|
5196 | !-- and profile is logaritmic (linear in nz). |
---|
5197 | !-- Horizontal surfaces |
---|
5198 | DO m = 1, surf_usm_h%ns |
---|
5199 | ! |
---|
5200 | !-- Roof |
---|
5201 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
5202 | tin = roof_inner_temperature |
---|
5203 | twin = window_inner_temperature |
---|
5204 | ! |
---|
5205 | !-- Normal land surface |
---|
5206 | ELSE |
---|
5207 | tin = soil_inner_temperature |
---|
5208 | twin = window_inner_temperature |
---|
5209 | ENDIF |
---|
5210 | |
---|
5211 | DO k = nzb_wall, nzt_wall+1 |
---|
5212 | c = REAL( k - nzb_wall, wp ) / & |
---|
5213 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
5214 | |
---|
5215 | t_wall_h(k,m) = ( 1.0_wp - c ) * t_surf_wall_h(m) + c * tin |
---|
5216 | t_window_h(k,m) = ( 1.0_wp - c ) * t_surf_window_h(m) + c * twin |
---|
5217 | t_green_h(k,m) = t_surf_wall_h(m) |
---|
5218 | swc_h(k,m) = 0.5_wp |
---|
5219 | swc_sat_h(k,m) = 0.95_wp |
---|
5220 | swc_res_h(k,m) = 0.05_wp |
---|
5221 | rootfr_h(k,m) = 0.1_wp |
---|
5222 | wilt_h(k,m) = 0.1_wp |
---|
5223 | fc_h(k,m) = 0.9_wp |
---|
5224 | ENDDO |
---|
5225 | ENDDO |
---|
5226 | ! |
---|
5227 | !-- Vertical surfaces |
---|
5228 | DO l = 0, 3 |
---|
5229 | DO m = 1, surf_usm_v(l)%ns |
---|
5230 | ! |
---|
5231 | !-- Inner wall |
---|
5232 | tin = wall_inner_temperature |
---|
5233 | twin = window_inner_temperature |
---|
5234 | |
---|
5235 | DO k = nzb_wall, nzt_wall+1 |
---|
5236 | c = REAL( k - nzb_wall, wp ) / & |
---|
5237 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
5238 | t_wall_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_wall_v(l)%t(m) + c * tin |
---|
5239 | t_window_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_window_v(l)%t(m) + c * twin |
---|
5240 | t_green_v(l)%t(k,m) = t_surf_wall_v(l)%t(m) |
---|
5241 | swc_v(l)%t(k,m) = 0.5_wp |
---|
5242 | ENDDO |
---|
5243 | ENDDO |
---|
5244 | ENDDO |
---|
5245 | ENDIF |
---|
5246 | |
---|
5247 | ! |
---|
5248 | !-- If specified, replace constant wall temperatures with fully 3D values from file |
---|
5249 | IF ( read_wall_temp_3d ) CALL usm_read_wall_temperature() |
---|
5250 | |
---|
5251 | !-- |
---|
5252 | !-- Possibly DO user-defined actions (e.g. define heterogeneous wall surface) |
---|
5253 | CALL user_init_urban_surface |
---|
5254 | |
---|
5255 | ! |
---|
5256 | !-- initialize prognostic values for the first timestep |
---|
5257 | t_surf_wall_h_p = t_surf_wall_h |
---|
5258 | t_surf_wall_v_p = t_surf_wall_v |
---|
5259 | t_surf_window_h_p = t_surf_window_h |
---|
5260 | t_surf_window_v_p = t_surf_window_v |
---|
5261 | t_surf_green_h_p = t_surf_green_h |
---|
5262 | t_surf_green_v_p = t_surf_green_v |
---|
5263 | |
---|
5264 | t_wall_h_p = t_wall_h |
---|
5265 | t_wall_v_p = t_wall_v |
---|
5266 | t_window_h_p = t_window_h |
---|
5267 | t_window_v_p = t_window_v |
---|
5268 | t_green_h_p = t_green_h |
---|
5269 | t_green_v_p = t_green_v |
---|
5270 | |
---|
5271 | ! |
---|
5272 | !-- Adjust radiative fluxes for urban surface at model start |
---|
5273 | !CALL radiation_interaction |
---|
5274 | !-- TODO: interaction should be called once before first output, |
---|
5275 | !-- that is not yet possible. |
---|
5276 | |
---|
5277 | m_liq_usm_h_p = m_liq_usm_h |
---|
5278 | m_liq_usm_v_p = m_liq_usm_v |
---|
5279 | ! |
---|
5280 | !-- Set initial values for prognostic quantities |
---|
5281 | !-- Horizontal surfaces |
---|
5282 | tm_liq_usm_h_m%var_usm_1d = 0.0_wp |
---|
5283 | surf_usm_h%c_liq = 0.0_wp |
---|
5284 | |
---|
5285 | surf_usm_h%qsws_liq = 0.0_wp |
---|
5286 | surf_usm_h%qsws_veg = 0.0_wp |
---|
5287 | |
---|
5288 | ! |
---|
5289 | !-- Do the same for vertical surfaces |
---|
5290 | DO l = 0, 3 |
---|
5291 | tm_liq_usm_v_m(l)%var_usm_1d = 0.0_wp |
---|
5292 | surf_usm_v(l)%c_liq = 0.0_wp |
---|
5293 | |
---|
5294 | surf_usm_v(l)%qsws_liq = 0.0_wp |
---|
5295 | surf_usm_v(l)%qsws_veg = 0.0_wp |
---|
5296 | ENDDO |
---|
5297 | |
---|
5298 | ! |
---|
5299 | !-- Set initial values for prognostic soil quantities |
---|
5300 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN |
---|
5301 | m_liq_usm_h%var_usm_1d = 0.0_wp |
---|
5302 | |
---|
5303 | DO l = 0, 3 |
---|
5304 | m_liq_usm_v(l)%var_usm_1d = 0.0_wp |
---|
5305 | ENDDO |
---|
5306 | ENDIF |
---|
5307 | |
---|
5308 | CALL cpu_log( log_point_s(78), 'usm_init', 'stop' ) |
---|
5309 | |
---|
5310 | CALL location_message( 'finished', .TRUE. ) |
---|
5311 | |
---|
5312 | END SUBROUTINE usm_init |
---|
5313 | |
---|
5314 | |
---|
5315 | !------------------------------------------------------------------------------! |
---|
5316 | ! Description: |
---|
5317 | ! ------------ |
---|
5318 | ! |
---|
5319 | !> Wall model as part of the urban surface model. The model predicts vertical |
---|
5320 | !> and horizontal wall / roof temperatures and window layer temperatures. |
---|
5321 | !> No window layer temperature calculactions during spinup to increase |
---|
5322 | !> possible timestep. |
---|
5323 | !------------------------------------------------------------------------------! |
---|
5324 | SUBROUTINE usm_material_heat_model( spinup ) |
---|
5325 | |
---|
5326 | |
---|
5327 | IMPLICIT NONE |
---|
5328 | |
---|
5329 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
5330 | |
---|
5331 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wtend, wintend !< tendency |
---|
5332 | REAL(wp) :: win_absorp !< absorption coefficient from transmissivity |
---|
5333 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wall_mod |
---|
5334 | |
---|
5335 | LOGICAL :: spinup !< if true, no calculation of window temperatures |
---|
5336 | |
---|
5337 | !$OMP PARALLEL PRIVATE (m, i, j, k, kw, wtend, wintend, win_absorp, wall_mod) |
---|
5338 | wall_mod=1.0_wp |
---|
5339 | IF (usm_wall_mod .AND. spinup) THEN |
---|
5340 | DO kw=nzb_wall,nzb_wall+1 |
---|
5341 | wall_mod(kw)=0.1_wp |
---|
5342 | ENDDO |
---|
5343 | ENDIF |
---|
5344 | |
---|
5345 | ! |
---|
5346 | !-- For horizontal surfaces |
---|
5347 | !$OMP DO SCHEDULE (STATIC) |
---|
5348 | DO m = 1, surf_usm_h%ns |
---|
5349 | ! |
---|
5350 | !-- Obtain indices |
---|
5351 | i = surf_usm_h%i(m) |
---|
5352 | j = surf_usm_h%j(m) |
---|
5353 | k = surf_usm_h%k(m) |
---|
5354 | ! |
---|
5355 | !-- prognostic equation for ground/roof temperature t_wall_h |
---|
5356 | wtend(:) = 0.0_wp |
---|
5357 | wtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzb_wall,m)) * & |
---|
5358 | ( surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
5359 | ( t_wall_h(nzb_wall+1,m) & |
---|
5360 | - t_wall_h(nzb_wall,m) ) * & |
---|
5361 | surf_usm_h%ddz_wall(nzb_wall+1,m) & |
---|
5362 | + surf_usm_h%frac(ind_veg_wall,m) & |
---|
5363 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
5364 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
5365 | * surf_usm_h%wghf_eb(m) & |
---|
5366 | - surf_usm_h%frac(ind_pav_green,m) & |
---|
5367 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
5368 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
5369 | * ( surf_usm_h%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
5370 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
5371 | + surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) & |
---|
5372 | * surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
5373 | / ( surf_usm_h%ddz_green(nzt_wall,m) & |
---|
5374 | + surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
5375 | * ( t_wall_h(nzb_wall,m) & |
---|
5376 | - t_green_h(nzt_wall,m) ) ) * & |
---|
5377 | surf_usm_h%ddz_wall_stag(nzb_wall,m) |
---|
5378 | ! |
---|
5379 | !-- if indoor model ist used inner wall layer is calculated by using iwghf (indoor wall ground heat flux) |
---|
5380 | IF ( indoor_model ) THEN |
---|
5381 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5382 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
5383 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
5384 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
5385 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
5386 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5387 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
5388 | * surf_usm_h%ddz_wall(kw,m) & |
---|
5389 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
5390 | ENDDO |
---|
5391 | wtend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzt_wall,m)) * & |
---|
5392 | ( -surf_usm_h%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1) * & |
---|
5393 | ( t_wall_h(nzt_wall,m) & |
---|
5394 | - t_wall_h(nzt_wall-1,m) ) * & |
---|
5395 | surf_usm_h%ddz_wall(nzt_wall,m) & |
---|
5396 | + surf_usm_h%iwghf_eb(m) ) * & |
---|
5397 | surf_usm_h%ddz_wall_stag(nzt_wall,m) |
---|
5398 | ELSE |
---|
5399 | DO kw = nzb_wall+1, nzt_wall |
---|
5400 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
5401 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
5402 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
5403 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
5404 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5405 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
5406 | * surf_usm_h%ddz_wall(kw,m) & |
---|
5407 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
5408 | ENDDO |
---|
5409 | ENDIF |
---|
5410 | |
---|
5411 | t_wall_h_p(nzb_wall:nzt_wall,m) = t_wall_h(nzb_wall:nzt_wall,m) & |
---|
5412 | + dt_3d * ( tsc(2) & |
---|
5413 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5414 | * surf_usm_h%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
5415 | |
---|
5416 | ! |
---|
5417 | !-- during spinup the tempeature inside window layers is not calculated to make larger timesteps possible |
---|
5418 | IF ( .NOT. spinup) THEN |
---|
5419 | win_absorp = -log(surf_usm_h%transmissivity(m)) / surf_usm_h%zw_window(nzt_wall,m) |
---|
5420 | ! |
---|
5421 | !-- prognostic equation for ground/roof window temperature t_window_h |
---|
5422 | !-- takes absorption of shortwave radiation into account |
---|
5423 | wintend(:) = 0.0_wp |
---|
5424 | wintend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzb_wall,m)) * & |
---|
5425 | ( surf_usm_h%lambda_h_window(nzb_wall,m) * & |
---|
5426 | ( t_window_h(nzb_wall+1,m) & |
---|
5427 | - t_window_h(nzb_wall,m) ) * & |
---|
5428 | surf_usm_h%ddz_window(nzb_wall+1,m) & |
---|
5429 | + surf_usm_h%wghf_eb_window(m) & |
---|
5430 | + surf_usm_h%rad_sw_in(m) & |
---|
5431 | * (1.0_wp - exp(-win_absorp & |
---|
5432 | * surf_usm_h%zw_window(nzb_wall,m) ) ) & |
---|
5433 | ) * surf_usm_h%ddz_window_stag(nzb_wall,m) |
---|
5434 | |
---|
5435 | IF ( indoor_model ) THEN |
---|
5436 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5437 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
5438 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
5439 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
5440 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
5441 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
5442 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
5443 | * surf_usm_h%ddz_window(kw,m) & |
---|
5444 | + surf_usm_h%rad_sw_in(m) & |
---|
5445 | * (exp(-win_absorp & |
---|
5446 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
5447 | - exp(-win_absorp & |
---|
5448 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
5449 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
5450 | |
---|
5451 | ENDDO |
---|
5452 | wintend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzt_wall,m)) * & |
---|
5453 | ( -surf_usm_h%lambda_h_window(nzt_wall-1,m) * & |
---|
5454 | ( t_window_h(nzt_wall,m) & |
---|
5455 | - t_window_h(nzt_wall-1,m) ) * & |
---|
5456 | surf_usm_h%ddz_window(nzt_wall,m) & |
---|
5457 | + surf_usm_h%iwghf_eb_window(m) & |
---|
5458 | + surf_usm_h%rad_sw_in(m) & |
---|
5459 | * (exp(-win_absorp & |
---|
5460 | * surf_usm_h%zw_window(nzt_wall-1,m) ) & |
---|
5461 | - exp(-win_absorp & |
---|
5462 | * surf_usm_h%zw_window(nzt_wall,m) ) ) & |
---|
5463 | ) * surf_usm_h%ddz_window_stag(nzt_wall,m) |
---|
5464 | ELSE |
---|
5465 | DO kw = nzb_wall+1, nzt_wall |
---|
5466 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
5467 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
5468 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
5469 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
5470 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
5471 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
5472 | * surf_usm_h%ddz_window(kw,m) & |
---|
5473 | + surf_usm_h%rad_sw_in(m) & |
---|
5474 | * (exp(-win_absorp & |
---|
5475 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
5476 | - exp(-win_absorp & |
---|
5477 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
5478 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
5479 | |
---|
5480 | ENDDO |
---|
5481 | ENDIF |
---|
5482 | |
---|
5483 | t_window_h_p(nzb_wall:nzt_wall,m) = t_window_h(nzb_wall:nzt_wall,m) & |
---|
5484 | + dt_3d * ( tsc(2) & |
---|
5485 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5486 | * surf_usm_h%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
5487 | |
---|
5488 | ENDIF |
---|
5489 | |
---|
5490 | ! |
---|
5491 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
5492 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5493 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5494 | DO kw = nzb_wall, nzt_wall |
---|
5495 | surf_usm_h%tt_wall_m(kw,m) = wtend(kw) |
---|
5496 | ENDDO |
---|
5497 | ELSEIF ( intermediate_timestep_count < & |
---|
5498 | intermediate_timestep_count_max ) THEN |
---|
5499 | DO kw = nzb_wall, nzt_wall |
---|
5500 | surf_usm_h%tt_wall_m(kw,m) = -9.5625_wp * wtend(kw) + & |
---|
5501 | 5.3125_wp * surf_usm_h%tt_wall_m(kw,m) |
---|
5502 | ENDDO |
---|
5503 | ENDIF |
---|
5504 | ENDIF |
---|
5505 | |
---|
5506 | IF (.NOT. spinup) THEN |
---|
5507 | ! |
---|
5508 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
5509 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5510 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5511 | DO kw = nzb_wall, nzt_wall |
---|
5512 | surf_usm_h%tt_window_m(kw,m) = wintend(kw) |
---|
5513 | ENDDO |
---|
5514 | ELSEIF ( intermediate_timestep_count < & |
---|
5515 | intermediate_timestep_count_max ) THEN |
---|
5516 | DO kw = nzb_wall, nzt_wall |
---|
5517 | surf_usm_h%tt_window_m(kw,m) = -9.5625_wp * wintend(kw) + & |
---|
5518 | 5.3125_wp * surf_usm_h%tt_window_m(kw,m) |
---|
5519 | ENDDO |
---|
5520 | ENDIF |
---|
5521 | ENDIF |
---|
5522 | ENDIF |
---|
5523 | |
---|
5524 | ENDDO |
---|
5525 | |
---|
5526 | ! |
---|
5527 | !-- For vertical surfaces |
---|
5528 | !$OMP DO SCHEDULE (STATIC) |
---|
5529 | DO l = 0, 3 |
---|
5530 | DO m = 1, surf_usm_v(l)%ns |
---|
5531 | ! |
---|
5532 | !-- Obtain indices |
---|
5533 | i = surf_usm_v(l)%i(m) |
---|
5534 | j = surf_usm_v(l)%j(m) |
---|
5535 | k = surf_usm_v(l)%k(m) |
---|
5536 | ! |
---|
5537 | !-- prognostic equation for wall temperature t_wall_v |
---|
5538 | wtend(:) = 0.0_wp |
---|
5539 | |
---|
5540 | wtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzb_wall,m)) * & |
---|
5541 | ( surf_usm_v(l)%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
5542 | ( t_wall_v(l)%t(nzb_wall+1,m) & |
---|
5543 | - t_wall_v(l)%t(nzb_wall,m) ) * & |
---|
5544 | surf_usm_v(l)%ddz_wall(nzb_wall+1,m) & |
---|
5545 | + surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5546 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5547 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
5548 | * surf_usm_v(l)%wghf_eb(m) & |
---|
5549 | - surf_usm_v(l)%frac(ind_pav_green,m) & |
---|
5550 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5551 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
5552 | * ( surf_usm_v(l)%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
5553 | * surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
5554 | + surf_usm_v(l)%lambda_h(nzb_wall,m)* wall_mod(nzb_wall) & |
---|
5555 | * surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
5556 | / ( surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
5557 | + surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
5558 | * ( t_wall_v(l)%t(nzb_wall,m) & |
---|
5559 | - t_green_v(l)%t(nzt_wall,m) ) ) * & |
---|
5560 | surf_usm_v(l)%ddz_wall_stag(nzb_wall,m) |
---|
5561 | |
---|
5562 | IF ( indoor_model ) THEN |
---|
5563 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5564 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
5565 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
5566 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
5567 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
5568 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5569 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
5570 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
5571 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
5572 | ENDDO |
---|
5573 | wtend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzt_wall,m)) * & |
---|
5574 | ( -surf_usm_v(l)%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1)* & |
---|
5575 | ( t_wall_v(l)%t(nzt_wall,m) & |
---|
5576 | - t_wall_v(l)%t(nzt_wall-1,m) ) * & |
---|
5577 | surf_usm_v(l)%ddz_wall(nzt_wall,m) & |
---|
5578 | + surf_usm_v(l)%iwghf_eb(m) ) * & |
---|
5579 | surf_usm_v(l)%ddz_wall_stag(nzt_wall,m) |
---|
5580 | ELSE |
---|
5581 | DO kw = nzb_wall+1, nzt_wall |
---|
5582 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
5583 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
5584 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
5585 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
5586 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5587 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
5588 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
5589 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
5590 | ENDDO |
---|
5591 | ENDIF |
---|
5592 | |
---|
5593 | t_wall_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
5594 | t_wall_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
5595 | + dt_3d * ( tsc(2) & |
---|
5596 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5597 | * surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
5598 | |
---|
5599 | IF (.NOT. spinup) THEN |
---|
5600 | win_absorp = -log(surf_usm_v(l)%transmissivity(m)) / surf_usm_v(l)%zw_window(nzt_wall,m) |
---|
5601 | ! |
---|
5602 | !-- prognostic equation for window temperature t_window_v |
---|
5603 | wintend(:) = 0.0_wp |
---|
5604 | wintend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzb_wall,m)) * & |
---|
5605 | ( surf_usm_v(l)%lambda_h_window(nzb_wall,m) * & |
---|
5606 | ( t_window_v(l)%t(nzb_wall+1,m) & |
---|
5607 | - t_window_v(l)%t(nzb_wall,m) ) * & |
---|
5608 | surf_usm_v(l)%ddz_window(nzb_wall+1,m) & |
---|
5609 | + surf_usm_v(l)%wghf_eb_window(m) & |
---|
5610 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5611 | * (1.0_wp - exp(-win_absorp & |
---|
5612 | * surf_usm_v(l)%zw_window(nzb_wall,m) ) ) & |
---|
5613 | ) * surf_usm_v(l)%ddz_window_stag(nzb_wall,m) |
---|
5614 | |
---|
5615 | IF ( indoor_model ) THEN |
---|
5616 | DO kw = nzb_wall+1, nzt_wall -1 |
---|
5617 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
5618 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
5619 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
5620 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
5621 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
5622 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
5623 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
5624 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5625 | * (exp(-win_absorp & |
---|
5626 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
5627 | - exp(-win_absorp & |
---|
5628 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
5629 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
5630 | ENDDO |
---|
5631 | wintend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzt_wall,m)) * & |
---|
5632 | ( -surf_usm_v(l)%lambda_h_window(nzt_wall-1,m) * & |
---|
5633 | ( t_window_v(l)%t(nzt_wall,m) & |
---|
5634 | - t_window_v(l)%t(nzt_wall-1,m) ) * & |
---|
5635 | surf_usm_v(l)%ddz_window(nzt_wall,m) & |
---|
5636 | + surf_usm_v(l)%iwghf_eb_window(m) & |
---|
5637 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5638 | * (exp(-win_absorp & |
---|
5639 | * surf_usm_v(l)%zw_window(nzt_wall-1,m) ) & |
---|
5640 | - exp(-win_absorp & |
---|
5641 | * surf_usm_v(l)%zw_window(nzt_wall,m) ) ) & |
---|
5642 | ) * surf_usm_v(l)%ddz_window_stag(nzt_wall,m) |
---|
5643 | ELSE |
---|
5644 | DO kw = nzb_wall+1, nzt_wall |
---|
5645 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
5646 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
5647 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
5648 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
5649 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
5650 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
5651 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
5652 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5653 | * (exp(-win_absorp & |
---|
5654 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
5655 | - exp(-win_absorp & |
---|
5656 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
5657 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
5658 | ENDDO |
---|
5659 | ENDIF |
---|
5660 | |
---|
5661 | t_window_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
5662 | t_window_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
5663 | + dt_3d * ( tsc(2) & |
---|
5664 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5665 | * surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
5666 | ENDIF |
---|
5667 | |
---|
5668 | ! |
---|
5669 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
5670 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5671 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5672 | DO kw = nzb_wall, nzt_wall |
---|
5673 | surf_usm_v(l)%tt_wall_m(kw,m) = wtend(kw) |
---|
5674 | ENDDO |
---|
5675 | ELSEIF ( intermediate_timestep_count < & |
---|
5676 | intermediate_timestep_count_max ) THEN |
---|
5677 | DO kw = nzb_wall, nzt_wall |
---|
5678 | surf_usm_v(l)%tt_wall_m(kw,m) = & |
---|
5679 | - 9.5625_wp * wtend(kw) + & |
---|
5680 | 5.3125_wp * surf_usm_v(l)%tt_wall_m(kw,m) |
---|
5681 | ENDDO |
---|
5682 | ENDIF |
---|
5683 | ENDIF |
---|
5684 | |
---|
5685 | |
---|
5686 | IF (.NOT. spinup) THEN |
---|
5687 | ! |
---|
5688 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
5689 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5690 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5691 | DO kw = nzb_wall, nzt_wall |
---|
5692 | surf_usm_v(l)%tt_window_m(kw,m) = wintend(kw) |
---|
5693 | ENDDO |
---|
5694 | ELSEIF ( intermediate_timestep_count < & |
---|
5695 | intermediate_timestep_count_max ) THEN |
---|
5696 | DO kw = nzb_wall, nzt_wall |
---|
5697 | surf_usm_v(l)%tt_window_m(kw,m) = & |
---|
5698 | - 9.5625_wp * wintend(kw) + & |
---|
5699 | 5.3125_wp * surf_usm_v(l)%tt_window_m(kw,m) |
---|
5700 | ENDDO |
---|
5701 | ENDIF |
---|
5702 | ENDIF |
---|
5703 | ENDIF |
---|
5704 | |
---|
5705 | ENDDO |
---|
5706 | ENDDO |
---|
5707 | !$OMP END PARALLEL |
---|
5708 | |
---|
5709 | END SUBROUTINE usm_material_heat_model |
---|
5710 | |
---|
5711 | !------------------------------------------------------------------------------! |
---|
5712 | ! Description: |
---|
5713 | ! ------------ |
---|
5714 | ! |
---|
5715 | !> Green and substrate model as part of the urban surface model. The model predicts ground |
---|
5716 | !> temperatures. |
---|
5717 | !------------------------------------------------------------------------------! |
---|
5718 | SUBROUTINE usm_green_heat_model |
---|
5719 | |
---|
5720 | |
---|
5721 | IMPLICIT NONE |
---|
5722 | |
---|
5723 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
5724 | |
---|
5725 | REAL(wp) :: ke, lambda_h_green_sat !< heat conductivity for saturated soil |
---|
5726 | REAL(wp) :: h_vg !< Van Genuchten coef. h |
---|
5727 | REAL(wp) :: drho_l_lv !< frequently used parameter |
---|
5728 | |
---|
5729 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: gtend,tend !< tendency |
---|
5730 | |
---|
5731 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: root_extr_green |
---|
5732 | |
---|
5733 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: lambda_green_temp !< temp. lambda |
---|
5734 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: gamma_green_temp !< temp. gamma |
---|
5735 | |
---|
5736 | LOGICAL :: conserve_water_content = .true. |
---|
5737 | |
---|
5738 | |
---|
5739 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
5740 | |
---|
5741 | ! |
---|
5742 | !-- For horizontal surfaces |
---|
5743 | !$OMP PARALLEL PRIVATE (m, i, j, k, kw, lambda_h_green_sat, ke, lambda_green_temp, gtend, & |
---|
5744 | !$OMP& tend, h_vg, gamma_green_temp, m_total, root_extr_green) |
---|
5745 | !$OMP DO SCHEDULE (STATIC) |
---|
5746 | DO m = 1, surf_usm_h%ns |
---|
5747 | |
---|
5748 | IF (surf_usm_h%frac(ind_pav_green,m) > 0.0_wp) THEN |
---|
5749 | ! |
---|
5750 | !-- Obtain indices |
---|
5751 | i = surf_usm_h%i(m) |
---|
5752 | j = surf_usm_h%j(m) |
---|
5753 | k = surf_usm_h%k(m) |
---|
5754 | |
---|
5755 | DO kw = nzb_wall, nzt_wall |
---|
5756 | ! |
---|
5757 | !-- Calculate volumetric heat capacity of the soil, taking |
---|
5758 | !-- into account water content |
---|
5759 | 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)) & |
---|
5760 | + rho_c_water * swc_h(kw,m)) |
---|
5761 | |
---|
5762 | ! |
---|
5763 | !-- Calculate soil heat conductivity at the center of the soil |
---|
5764 | !-- layers |
---|
5765 | lambda_h_green_sat = lambda_h_green_sm ** (1.0_wp - swc_sat_h(kw,m)) * & |
---|
5766 | lambda_h_water ** swc_h(kw,m) |
---|
5767 | |
---|
5768 | ke = 1.0_wp + LOG10(MAX(0.1_wp,swc_h(kw,m) & |
---|
5769 | / swc_sat_h(kw,m))) |
---|
5770 | |
---|
5771 | lambda_green_temp(kw) = ke * (lambda_h_green_sat - lambda_h_green_dry) + & |
---|
5772 | lambda_h_green_dry |
---|
5773 | |
---|
5774 | ENDDO |
---|
5775 | |
---|
5776 | |
---|
5777 | ! |
---|
5778 | !-- Calculate soil heat conductivity (lambda_h) at the _stag level |
---|
5779 | !-- using linear interpolation. For pavement surface, the |
---|
5780 | !-- true pavement depth is considered |
---|
5781 | DO kw = nzb_wall, nzt_wall |
---|
5782 | surf_usm_h%lambda_h_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
5783 | * 0.5_wp |
---|
5784 | ENDDO |
---|
5785 | |
---|
5786 | t_green_h(nzt_wall+1,m) = t_wall_h(nzb_wall,m) |
---|
5787 | ! |
---|
5788 | !-- prognostic equation for ground/roof temperature t_green_h |
---|
5789 | gtend(:) = 0.0_wp |
---|
5790 | gtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_total_green(nzb_wall,m)) * & |
---|
5791 | ( surf_usm_h%lambda_h_green(nzb_wall,m) * & |
---|
5792 | ( t_green_h(nzb_wall+1,m) & |
---|
5793 | - t_green_h(nzb_wall,m) ) * & |
---|
5794 | surf_usm_h%ddz_green(nzb_wall+1,m) & |
---|
5795 | + surf_usm_h%wghf_eb_green(m) ) * & |
---|
5796 | surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
5797 | |
---|
5798 | DO kw = nzb_wall+1, nzt_wall |
---|
5799 | gtend(kw) = (1.0_wp / surf_usm_h%rho_c_total_green(kw,m)) & |
---|
5800 | * ( surf_usm_h%lambda_h_green(kw,m) & |
---|
5801 | * ( t_green_h(kw+1,m) - t_green_h(kw,m) ) & |
---|
5802 | * surf_usm_h%ddz_green(kw+1,m) & |
---|
5803 | - surf_usm_h%lambda_h_green(kw-1,m) & |
---|
5804 | * ( t_green_h(kw,m) - t_green_h(kw-1,m) ) & |
---|
5805 | * surf_usm_h%ddz_green(kw,m) & |
---|
5806 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
5807 | ENDDO |
---|
5808 | |
---|
5809 | t_green_h_p(nzb_wall:nzt_wall,m) = t_green_h(nzb_wall:nzt_wall,m) & |
---|
5810 | + dt_3d * ( tsc(2) & |
---|
5811 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5812 | * surf_usm_h%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
5813 | |
---|
5814 | |
---|
5815 | ! |
---|
5816 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
5817 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5818 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5819 | DO kw = nzb_wall, nzt_wall |
---|
5820 | surf_usm_h%tt_green_m(kw,m) = gtend(kw) |
---|
5821 | ENDDO |
---|
5822 | ELSEIF ( intermediate_timestep_count < & |
---|
5823 | intermediate_timestep_count_max ) THEN |
---|
5824 | DO kw = nzb_wall, nzt_wall |
---|
5825 | surf_usm_h%tt_green_m(kw,m) = -9.5625_wp * gtend(kw) + & |
---|
5826 | 5.3125_wp * surf_usm_h%tt_green_m(kw,m) |
---|
5827 | ENDDO |
---|
5828 | ENDIF |
---|
5829 | ENDIF |
---|
5830 | |
---|
5831 | DO kw = nzb_wall, nzt_wall |
---|
5832 | |
---|
5833 | ! |
---|
5834 | !-- Calculate soil diffusivity at the center of the soil layers |
---|
5835 | lambda_green_temp(kw) = (- b_ch * surf_usm_h%gamma_w_green_sat(kw,m) * psi_sat & |
---|
5836 | / swc_sat_h(kw,m) ) * ( MAX( swc_h(kw,m), & |
---|
5837 | wilt_h(kw,m) ) / swc_sat_h(kw,m) )**( & |
---|
5838 | b_ch + 2.0_wp ) |
---|
5839 | |
---|
5840 | ! |
---|
5841 | !-- Parametrization of Van Genuchten |
---|
5842 | IF ( soil_type /= 7 ) THEN |
---|
5843 | ! |
---|
5844 | !-- Calculate the hydraulic conductivity after Van Genuchten |
---|
5845 | !-- (1980) |
---|
5846 | h_vg = ( ( (swc_res_h(kw,m) - swc_sat_h(kw,m)) / ( swc_res_h(kw,m) - & |
---|
5847 | MAX( swc_h(kw,m), wilt_h(kw,m) ) ) )**( & |
---|
5848 | surf_usm_h%n_vg_green(m) / (surf_usm_h%n_vg_green(m) - 1.0_wp ) ) - 1.0_wp & |
---|
5849 | )**( 1.0_wp / surf_usm_h%n_vg_green(m) ) / surf_usm_h%alpha_vg_green(m) |
---|
5850 | |
---|
5851 | |
---|
5852 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( ( (1.0_wp + & |
---|
5853 | ( surf_usm_h%alpha_vg_green(m) * h_vg )**surf_usm_h%n_vg_green(m))**( & |
---|
5854 | 1.0_wp - 1.0_wp / surf_usm_h%n_vg_green(m) ) - ( & |
---|
5855 | surf_usm_h%alpha_vg_green(m) * h_vg )**( surf_usm_h%n_vg_green(m) & |
---|
5856 | - 1.0_wp) )**2 ) & |
---|
5857 | / ( ( 1.0_wp + ( surf_usm_h%alpha_vg_green(m) * h_vg & |
---|
5858 | )**surf_usm_h%n_vg_green(m) )**( ( 1.0_wp - 1.0_wp & |
---|
5859 | / surf_usm_h%n_vg_green(m) ) *( surf_usm_h%l_vg_green(m) + 2.0_wp) ) ) |
---|
5860 | |
---|
5861 | ! |
---|
5862 | !-- Parametrization of Clapp & Hornberger |
---|
5863 | ELSE |
---|
5864 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( swc_h(kw,m) & |
---|
5865 | / swc_sat_h(kw,m) )**(2.0_wp * b_ch + 3.0_wp) |
---|
5866 | ENDIF |
---|
5867 | |
---|
5868 | ENDDO |
---|
5869 | |
---|
5870 | ! |
---|
5871 | !-- Prognostic equation for soil moisture content. Only performed, |
---|
5872 | !-- when humidity is enabled in the atmosphere |
---|
5873 | IF ( humidity ) THEN |
---|
5874 | ! |
---|
5875 | !-- Calculate soil diffusivity (lambda_w) at the _stag level |
---|
5876 | !-- using linear interpolation. To do: replace this with |
---|
5877 | !-- ECMWF-IFS Eq. 8.81 |
---|
5878 | DO kw = nzb_wall, nzt_wall-1 |
---|
5879 | |
---|
5880 | surf_usm_h%lambda_w_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
5881 | * 0.5_wp |
---|
5882 | surf_usm_h%gamma_w_green(kw,m) = ( gamma_green_temp(kw+1) + gamma_green_temp(kw) ) & |
---|
5883 | * 0.5_wp |
---|
5884 | |
---|
5885 | ENDDO |
---|
5886 | |
---|
5887 | ! |
---|
5888 | !-- In case of a closed bottom (= water content is conserved), |
---|
5889 | !-- set hydraulic conductivity to zero to that no water will be |
---|
5890 | !-- lost in the bottom layer. |
---|
5891 | IF ( conserve_water_content ) THEN |
---|
5892 | surf_usm_h%gamma_w_green(kw,m) = 0.0_wp |
---|
5893 | ELSE |
---|
5894 | surf_usm_h%gamma_w_green(kw,m) = gamma_green_temp(nzt_wall) |
---|
5895 | ENDIF |
---|
5896 | |
---|
5897 | !-- The root extraction (= root_extr * qsws_veg / (rho_l |
---|
5898 | !-- * l_v)) ensures the mass conservation for water. The |
---|
5899 | !-- transpiration of plants equals the cumulative withdrawals by |
---|
5900 | !-- the roots in the soil. The scheme takes into account the |
---|
5901 | !-- availability of water in the soil layers as well as the root |
---|
5902 | !-- fraction in the respective layer. Layer with moisture below |
---|
5903 | !-- wilting point will not contribute, which reflects the |
---|
5904 | !-- preference of plants to take water from moister layers. |
---|
5905 | |
---|
5906 | ! |
---|
5907 | !-- Calculate the root extraction (ECMWF 7.69, the sum of |
---|
5908 | !-- root_extr = 1). The energy balance solver guarantees a |
---|
5909 | !-- positive transpiration, so that there is no need for an |
---|
5910 | !-- additional check. |
---|
5911 | m_total = 0.0_wp |
---|
5912 | DO kw = nzb_wall, nzt_wall |
---|
5913 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
5914 | m_total = m_total + rootfr_h(kw,m) * swc_h(kw,m) |
---|
5915 | ENDIF |
---|
5916 | ENDDO |
---|
5917 | |
---|
5918 | IF ( m_total > 0.0_wp ) THEN |
---|
5919 | DO kw = nzb_wall, nzt_wall |
---|
5920 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
5921 | root_extr_green(kw) = rootfr_h(kw,m) * swc_h(kw,m) & |
---|
5922 | / m_total |
---|
5923 | ELSE |
---|
5924 | root_extr_green(kw) = 0.0_wp |
---|
5925 | ENDIF |
---|
5926 | ENDDO |
---|
5927 | ENDIF |
---|
5928 | |
---|
5929 | ! |
---|
5930 | !-- Prognostic equation for soil water content m_soil. |
---|
5931 | tend(:) = 0.0_wp |
---|
5932 | |
---|
5933 | tend(nzb_wall) = ( surf_usm_h%lambda_w_green(nzb_wall,m) * ( & |
---|
5934 | swc_h(nzb_wall+1,m) - swc_h(nzb_wall,m) ) & |
---|
5935 | * surf_usm_h%ddz_green(nzb_wall+1,m) - surf_usm_h%gamma_w_green(nzb_wall,m) - ( & |
---|
5936 | root_extr_green(nzb_wall) * surf_usm_h%qsws_veg(m) & |
---|
5937 | ! + surf_usm_h%qsws_soil_green(m) |
---|
5938 | ) * drho_l_lv ) & |
---|
5939 | * surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
5940 | |
---|
5941 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5942 | tend(kw) = ( surf_usm_h%lambda_w_green(kw,m) * ( swc_h(kw+1,m) & |
---|
5943 | - swc_h(kw,m) ) * surf_usm_h%ddz_green(kw+1,m) & |
---|
5944 | - surf_usm_h%gamma_w_green(kw,m) & |
---|
5945 | - surf_usm_h%lambda_w_green(kw-1,m) * (swc_h(kw,m) - & |
---|
5946 | swc_h(kw-1,m)) * surf_usm_h%ddz_green(kw,m) & |
---|
5947 | + surf_usm_h%gamma_w_green(kw-1,m) - (root_extr_green(kw) & |
---|
5948 | * surf_usm_h%qsws_veg(m) * drho_l_lv) & |
---|
5949 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
5950 | |
---|
5951 | ENDDO |
---|
5952 | tend(nzt_wall) = ( - surf_usm_h%gamma_w_green(nzt_wall,m) & |
---|
5953 | - surf_usm_h%lambda_w_green(nzt_wall-1,m) & |
---|
5954 | * (swc_h(nzt_wall,m) & |
---|
5955 | - swc_h(nzt_wall-1,m)) & |
---|
5956 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
5957 | + surf_usm_h%gamma_w_green(nzt_wall-1,m) - ( & |
---|
5958 | root_extr_green(nzt_wall) & |
---|
5959 | * surf_usm_h%qsws_veg(m) * drho_l_lv ) & |
---|
5960 | ) * surf_usm_h%ddz_green_stag(nzt_wall,m) |
---|
5961 | |
---|
5962 | swc_h_p(nzb_wall:nzt_wall,m) = swc_h(nzb_wall:nzt_wall,m)& |
---|
5963 | + dt_3d * ( tsc(2) * tend(:) & |
---|
5964 | + tsc(3) * surf_usm_h%tswc_h_m(:,m) ) |
---|
5965 | |
---|
5966 | ! |
---|
5967 | !-- Account for dry soils (find a better solution here!) |
---|
5968 | DO kw = nzb_wall, nzt_wall |
---|
5969 | IF ( swc_h_p(kw,m) < 0.0_wp ) swc_h_p(kw,m) = 0.0_wp |
---|
5970 | ENDDO |
---|
5971 | |
---|
5972 | ! |
---|
5973 | !-- Calculate m_soil tendencies for the next Runge-Kutta step |
---|
5974 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5975 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5976 | DO kw = nzb_wall, nzt_wall |
---|
5977 | surf_usm_h%tswc_h_m(kw,m) = tend(kw) |
---|
5978 | ENDDO |
---|
5979 | ELSEIF ( intermediate_timestep_count < & |
---|
5980 | intermediate_timestep_count_max ) THEN |
---|
5981 | DO kw = nzb_wall, nzt_wall |
---|
5982 | surf_usm_h%tswc_h_m(kw,m) = -9.5625_wp * tend(kw) + 5.3125_wp& |
---|
5983 | * surf_usm_h%tswc_h_m(kw,m) |
---|
5984 | ENDDO |
---|
5985 | ENDIF |
---|
5986 | ENDIF |
---|
5987 | ENDIF |
---|
5988 | |
---|
5989 | ENDIF |
---|
5990 | |
---|
5991 | ENDDO |
---|
5992 | !$OMP END PARALLEL |
---|
5993 | |
---|
5994 | ! |
---|
5995 | !-- For vertical surfaces |
---|
5996 | DO l = 0, 3 |
---|
5997 | DO m = 1, surf_usm_v(l)%ns |
---|
5998 | |
---|
5999 | IF (surf_usm_v(l)%frac(ind_pav_green,m) > 0.0_wp) THEN |
---|
6000 | ! |
---|
6001 | !-- no substrate layer for green walls / only groundbase green walls (ivy i.e.) -> green layers get same |
---|
6002 | !-- temperature as first wall layer |
---|
6003 | !-- there fore no temperature calculations for vertical green substrate layers now |
---|
6004 | |
---|
6005 | ! |
---|
6006 | ! ! |
---|
6007 | ! !-- Obtain indices |
---|
6008 | ! i = surf_usm_v(l)%i(m) |
---|
6009 | ! j = surf_usm_v(l)%j(m) |
---|
6010 | ! k = surf_usm_v(l)%k(m) |
---|
6011 | ! |
---|
6012 | ! t_green_v(l)%t(nzt_wall+1,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
6013 | ! ! |
---|
6014 | ! !-- prognostic equation for green temperature t_green_v |
---|
6015 | ! gtend(:) = 0.0_wp |
---|
6016 | ! gtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_green(nzb_wall,m)) * & |
---|
6017 | ! ( surf_usm_v(l)%lambda_h_green(nzb_wall,m) * & |
---|
6018 | ! ( t_green_v(l)%t(nzb_wall+1,m) & |
---|
6019 | ! - t_green_v(l)%t(nzb_wall,m) ) * & |
---|
6020 | ! surf_usm_v(l)%ddz_green(nzb_wall+1,m) & |
---|
6021 | ! + surf_usm_v(l)%wghf_eb(m) ) * & |
---|
6022 | ! surf_usm_v(l)%ddz_green_stag(nzb_wall,m) |
---|
6023 | ! |
---|
6024 | ! DO kw = nzb_wall+1, nzt_wall |
---|
6025 | ! gtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_green(kw,m)) & |
---|
6026 | ! * ( surf_usm_v(l)%lambda_h_green(kw,m) & |
---|
6027 | ! * ( t_green_v(l)%t(kw+1,m) - t_green_v(l)%t(kw,m) ) & |
---|
6028 | ! * surf_usm_v(l)%ddz_green(kw+1,m) & |
---|
6029 | ! - surf_usm_v(l)%lambda_h(kw-1,m) & |
---|
6030 | ! * ( t_green_v(l)%t(kw,m) - t_green_v(l)%t(kw-1,m) ) & |
---|
6031 | ! * surf_usm_v(l)%ddz_green(kw,m) ) & |
---|
6032 | ! * surf_usm_v(l)%ddz_green_stag(kw,m) |
---|
6033 | ! ENDDO |
---|
6034 | ! |
---|
6035 | ! t_green_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
6036 | ! t_green_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
6037 | ! + dt_3d * ( tsc(2) & |
---|
6038 | ! * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6039 | ! * surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
6040 | ! |
---|
6041 | ! ! |
---|
6042 | ! !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
6043 | ! IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6044 | ! IF ( intermediate_timestep_count == 1 ) THEN |
---|
6045 | ! DO kw = nzb_wall, nzt_wall |
---|
6046 | ! surf_usm_v(l)%tt_green_m(kw,m) = gtend(kw) |
---|
6047 | ! ENDDO |
---|
6048 | ! ELSEIF ( intermediate_timestep_count < & |
---|
6049 | ! intermediate_timestep_count_max ) THEN |
---|
6050 | ! DO kw = nzb_wall, nzt_wall |
---|
6051 | ! surf_usm_v(l)%tt_green_m(kw,m) = & |
---|
6052 | ! - 9.5625_wp * gtend(kw) + & |
---|
6053 | ! 5.3125_wp * surf_usm_v(l)%tt_green_m(kw,m) |
---|
6054 | ! ENDDO |
---|
6055 | ! ENDIF |
---|
6056 | ! ENDIF |
---|
6057 | |
---|
6058 | DO kw = nzb_wall, nzt_wall+1 |
---|
6059 | t_green_v(l)%t(kw,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
6060 | ENDDO |
---|
6061 | |
---|
6062 | ENDIF |
---|
6063 | |
---|
6064 | ENDDO |
---|
6065 | ENDDO |
---|
6066 | |
---|
6067 | END SUBROUTINE usm_green_heat_model |
---|
6068 | |
---|
6069 | !------------------------------------------------------------------------------! |
---|
6070 | ! Description: |
---|
6071 | ! ------------ |
---|
6072 | !> Parin for &usm_par for urban surface model |
---|
6073 | !------------------------------------------------------------------------------! |
---|
6074 | SUBROUTINE usm_parin |
---|
6075 | |
---|
6076 | IMPLICIT NONE |
---|
6077 | |
---|
6078 | CHARACTER (LEN=80) :: line !< string containing current line of file PARIN |
---|
6079 | |
---|
6080 | NAMELIST /urban_surface_par/ & |
---|
6081 | building_type, & |
---|
6082 | land_category, & |
---|
6083 | naheatlayers, & |
---|
6084 | pedestrian_category, & |
---|
6085 | roughness_concrete, & |
---|
6086 | read_wall_temp_3d, & |
---|
6087 | roof_category, & |
---|
6088 | urban_surface, & |
---|
6089 | usm_anthropogenic_heat, & |
---|
6090 | usm_material_model, & |
---|
6091 | wall_category, & |
---|
6092 | wall_inner_temperature, & |
---|
6093 | roof_inner_temperature, & |
---|
6094 | soil_inner_temperature, & |
---|
6095 | window_inner_temperature, & |
---|
6096 | usm_wall_mod |
---|
6097 | |
---|
6098 | NAMELIST /urban_surface_parameters/ & |
---|
6099 | building_type, & |
---|
6100 | land_category, & |
---|
6101 | naheatlayers, & |
---|
6102 | pedestrian_category, & |
---|
6103 | roughness_concrete, & |
---|
6104 | read_wall_temp_3d, & |
---|
6105 | roof_category, & |
---|
6106 | urban_surface, & |
---|
6107 | usm_anthropogenic_heat, & |
---|
6108 | usm_material_model, & |
---|
6109 | wall_category, & |
---|
6110 | wall_inner_temperature, & |
---|
6111 | roof_inner_temperature, & |
---|
6112 | soil_inner_temperature, & |
---|
6113 | window_inner_temperature, & |
---|
6114 | usm_wall_mod |
---|
6115 | |
---|
6116 | |
---|
6117 | ! |
---|
6118 | !-- Try to find urban surface model package |
---|
6119 | REWIND ( 11 ) |
---|
6120 | line = ' ' |
---|
6121 | DO WHILE ( INDEX( line, '&urban_surface_parameters' ) == 0 ) |
---|
6122 | READ ( 11, '(A)', END=12 ) line |
---|
6123 | ENDDO |
---|
6124 | BACKSPACE ( 11 ) |
---|
6125 | |
---|
6126 | ! |
---|
6127 | !-- Read user-defined namelist |
---|
6128 | READ ( 11, urban_surface_parameters, ERR = 10 ) |
---|
6129 | |
---|
6130 | ! |
---|
6131 | !-- Set flag that indicates that the urban surface model is switched on |
---|
6132 | urban_surface = .TRUE. |
---|
6133 | |
---|
6134 | GOTO 14 |
---|
6135 | |
---|
6136 | 10 BACKSPACE( 11 ) |
---|
6137 | READ( 11 , '(A)') line |
---|
6138 | CALL parin_fail_message( 'urban_surface_parameters', line ) |
---|
6139 | ! |
---|
6140 | !-- Try to find old namelist |
---|
6141 | 12 REWIND ( 11 ) |
---|
6142 | line = ' ' |
---|
6143 | DO WHILE ( INDEX( line, '&urban_surface_par' ) == 0 ) |
---|
6144 | READ ( 11, '(A)', END=14 ) line |
---|
6145 | ENDDO |
---|
6146 | BACKSPACE ( 11 ) |
---|
6147 | |
---|
6148 | ! |
---|
6149 | !-- Read user-defined namelist |
---|
6150 | READ ( 11, urban_surface_par, ERR = 13, END = 14 ) |
---|
6151 | |
---|
6152 | message_string = 'namelist urban_surface_par is deprecated and will be ' // & |
---|
6153 | 'removed in near future. Please use namelist ' // & |
---|
6154 | 'urban_surface_parameters instead' |
---|
6155 | CALL message( 'usm_parin', 'PA0487', 0, 1, 0, 6, 0 ) |
---|
6156 | |
---|
6157 | ! |
---|
6158 | !-- Set flag that indicates that the urban surface model is switched on |
---|
6159 | urban_surface = .TRUE. |
---|
6160 | |
---|
6161 | GOTO 14 |
---|
6162 | |
---|
6163 | 13 BACKSPACE( 11 ) |
---|
6164 | READ( 11 , '(A)') line |
---|
6165 | CALL parin_fail_message( 'urban_surface_par', line ) |
---|
6166 | |
---|
6167 | |
---|
6168 | 14 CONTINUE |
---|
6169 | |
---|
6170 | |
---|
6171 | END SUBROUTINE usm_parin |
---|
6172 | |
---|
6173 | |
---|
6174 | !------------------------------------------------------------------------------! |
---|
6175 | ! Description: |
---|
6176 | ! ------------ |
---|
6177 | ! |
---|
6178 | !> This subroutine is part of the urban surface model. |
---|
6179 | !> It reads daily heat produced by anthropogenic sources |
---|
6180 | !> and the diurnal cycle of the heat. |
---|
6181 | !------------------------------------------------------------------------------! |
---|
6182 | SUBROUTINE usm_read_anthropogenic_heat |
---|
6183 | |
---|
6184 | INTEGER(iwp) :: i,j,k,ii !< running indices |
---|
6185 | REAL(wp) :: heat !< anthropogenic heat |
---|
6186 | |
---|
6187 | ! |
---|
6188 | !-- allocation of array of sources of anthropogenic heat and their diural profile |
---|
6189 | ALLOCATE( aheat(naheatlayers,nys:nyn,nxl:nxr) ) |
---|
6190 | ALLOCATE( aheatprof(naheatlayers,0:24) ) |
---|
6191 | |
---|
6192 | ! |
---|
6193 | !-- read daily amount of heat and its daily cycle |
---|
6194 | aheat = 0.0_wp |
---|
6195 | DO ii = 0, io_blocks-1 |
---|
6196 | IF ( ii == io_group ) THEN |
---|
6197 | |
---|
6198 | !-- open anthropogenic heat file |
---|
6199 | OPEN( 151, file='ANTHROPOGENIC_HEAT'//TRIM(coupling_char), action='read', & |
---|
6200 | status='old', form='formatted', err=11 ) |
---|
6201 | i = 0 |
---|
6202 | j = 0 |
---|
6203 | DO |
---|
6204 | READ( 151, *, err=12, end=13 ) i, j, k, heat |
---|
6205 | IF ( i >= nxl .AND. i <= nxr .AND. j >= nys .AND. j <= nyn ) THEN |
---|
6206 | IF ( k <= naheatlayers .AND. k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
6207 | !-- write heat into the array |
---|
6208 | aheat(k,j,i) = heat |
---|
6209 | ENDIF |
---|
6210 | ENDIF |
---|
6211 | CYCLE |
---|
6212 | 12 WRITE(message_string,'(a,2i4)') 'error in file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' after line ',i,j |
---|
6213 | CALL message( 'usm_read_anthropogenic_heat', 'PA0515', 0, 1, 0, 6, 0 ) |
---|
6214 | ENDDO |
---|
6215 | 13 CLOSE(151) |
---|
6216 | CYCLE |
---|
6217 | 11 message_string = 'file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' does not exist' |
---|
6218 | CALL message( 'usm_read_anthropogenic_heat', 'PA0516', 1, 2, 0, 6, 0 ) |
---|
6219 | ENDIF |
---|
6220 | |
---|
6221 | #if defined( __parallel ) |
---|
6222 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
6223 | #endif |
---|
6224 | ENDDO |
---|
6225 | |
---|
6226 | ! |
---|
6227 | !-- read diurnal profiles of heat sources |
---|
6228 | aheatprof = 0.0_wp |
---|
6229 | DO ii = 0, io_blocks-1 |
---|
6230 | IF ( ii == io_group ) THEN |
---|
6231 | ! |
---|
6232 | !-- open anthropogenic heat profile file |
---|
6233 | OPEN( 151, file='ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char), action='read', & |
---|
6234 | status='old', form='formatted', err=21 ) |
---|
6235 | i = 0 |
---|
6236 | DO |
---|
6237 | READ( 151, *, err=22, end=23 ) i, k, heat |
---|
6238 | IF ( i >= 0 .AND. i <= 24 .AND. k <= naheatlayers ) THEN |
---|
6239 | !-- write heat into the array |
---|
6240 | aheatprof(k,i) = heat |
---|
6241 | ENDIF |
---|
6242 | CYCLE |
---|
6243 | 22 WRITE(message_string,'(a,i4)') 'error in file ANTHROPOGENIC_HEAT_PROFILE'// & |
---|
6244 | TRIM(coupling_char)//' after line ',i |
---|
6245 | CALL message( 'usm_read_anthropogenic_heat', 'PA0517', 0, 1, 0, 6, 0 ) |
---|
6246 | ENDDO |
---|
6247 | aheatprof(:,24) = aheatprof(:,0) |
---|
6248 | 23 CLOSE(151) |
---|
6249 | CYCLE |
---|
6250 | 21 message_string = 'file ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char)//' does not exist' |
---|
6251 | CALL message( 'usm_read_anthropogenic_heat', 'PA0518', 1, 2, 0, 6, 0 ) |
---|
6252 | ENDIF |
---|
6253 | |
---|
6254 | #if defined( __parallel ) |
---|
6255 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
6256 | #endif |
---|
6257 | ENDDO |
---|
6258 | |
---|
6259 | END SUBROUTINE usm_read_anthropogenic_heat |
---|
6260 | |
---|
6261 | |
---|
6262 | !------------------------------------------------------------------------------! |
---|
6263 | ! Description: |
---|
6264 | ! ------------ |
---|
6265 | !> Soubroutine reads t_surf and t_wall data from restart files |
---|
6266 | !------------------------------------------------------------------------------! |
---|
6267 | SUBROUTINE usm_rrd_local( k, nxlf, nxlc, nxl_on_file, nxrf, nxr_on_file, nynf, nyn_on_file, & |
---|
6268 | nysf, nysc, nys_on_file, found ) |
---|
6269 | |
---|
6270 | |
---|
6271 | USE control_parameters, & |
---|
6272 | ONLY: length, restart_string |
---|
6273 | |
---|
6274 | IMPLICIT NONE |
---|
6275 | |
---|
6276 | INTEGER(iwp) :: k !< running index over previous input files covering current local domain |
---|
6277 | INTEGER(iwp) :: l !< index variable for surface type |
---|
6278 | INTEGER(iwp) :: ns_h_on_file_usm !< number of horizontal surface elements (urban type) on file |
---|
6279 | INTEGER(iwp) :: nxlc !< index of left boundary on current subdomain |
---|
6280 | INTEGER(iwp) :: nxlf !< index of left boundary on former subdomain |
---|
6281 | INTEGER(iwp) :: nxl_on_file !< index of left boundary on former local domain |
---|
6282 | INTEGER(iwp) :: nxrf !< index of right boundary on former subdomain |
---|
6283 | INTEGER(iwp) :: nxr_on_file !< index of right boundary on former local domain |
---|
6284 | INTEGER(iwp) :: nynf !< index of north boundary on former subdomain |
---|
6285 | INTEGER(iwp) :: nyn_on_file !< index of north boundary on former local domain |
---|
6286 | INTEGER(iwp) :: nysc !< index of south boundary on current subdomain |
---|
6287 | INTEGER(iwp) :: nysf !< index of south boundary on former subdomain |
---|
6288 | INTEGER(iwp) :: nys_on_file !< index of south boundary on former local domain |
---|
6289 | |
---|
6290 | INTEGER(iwp) :: ns_v_on_file_usm(0:3) !< number of vertical surface elements (urban type) on file |
---|
6291 | |
---|
6292 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: start_index_on_file |
---|
6293 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: end_index_on_file |
---|
6294 | |
---|
6295 | LOGICAL, INTENT(OUT) :: found |
---|
6296 | !!! suehring: Why the SAVE attribute? |
---|
6297 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_wall_h |
---|
6298 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_window_h |
---|
6299 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_green_h |
---|
6300 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_waste_h |
---|
6301 | |
---|
6302 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_wall_h |
---|
6303 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_window_h |
---|
6304 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_green_h |
---|
6305 | |
---|
6306 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_wall_v |
---|
6307 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_window_v |
---|
6308 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_green_v |
---|
6309 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_waste_v |
---|
6310 | |
---|
6311 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_wall_v |
---|
6312 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_window_v |
---|
6313 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_green_v |
---|
6314 | |
---|
6315 | |
---|
6316 | found = .TRUE. |
---|
6317 | |
---|
6318 | |
---|
6319 | SELECT CASE ( restart_string(1:length) ) |
---|
6320 | |
---|
6321 | CASE ( 'ns_h_on_file_usm') |
---|
6322 | IF ( k == 1 ) THEN |
---|
6323 | READ ( 13 ) ns_h_on_file_usm |
---|
6324 | |
---|
6325 | IF ( ALLOCATED( tmp_surf_wall_h ) ) DEALLOCATE( tmp_surf_wall_h ) |
---|
6326 | IF ( ALLOCATED( tmp_wall_h ) ) DEALLOCATE( tmp_wall_h ) |
---|
6327 | IF ( ALLOCATED( tmp_surf_window_h ) ) & |
---|
6328 | DEALLOCATE( tmp_surf_window_h ) |
---|
6329 | IF ( ALLOCATED( tmp_window_h) ) DEALLOCATE( tmp_window_h ) |
---|
6330 | IF ( ALLOCATED( tmp_surf_green_h) ) & |
---|
6331 | DEALLOCATE( tmp_surf_green_h ) |
---|
6332 | IF ( ALLOCATED( tmp_green_h) ) DEALLOCATE( tmp_green_h ) |
---|
6333 | IF ( ALLOCATED( tmp_surf_waste_h) ) & |
---|
6334 | DEALLOCATE( tmp_surf_waste_h ) |
---|
6335 | |
---|
6336 | ! |
---|
6337 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
6338 | !-- the size of allocated surface elements do not necessarily |
---|
6339 | !-- need to match the size of present surface elements on |
---|
6340 | !-- current processor, as the number of processors between |
---|
6341 | !-- restarts can change. |
---|
6342 | ALLOCATE( tmp_surf_wall_h(1:ns_h_on_file_usm) ) |
---|
6343 | ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1, & |
---|
6344 | 1:ns_h_on_file_usm) ) |
---|
6345 | ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) ) |
---|
6346 | ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1, & |
---|
6347 | 1:ns_h_on_file_usm) ) |
---|
6348 | ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) ) |
---|
6349 | ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1, & |
---|
6350 | 1:ns_h_on_file_usm) ) |
---|
6351 | ALLOCATE( tmp_surf_waste_h(1:ns_h_on_file_usm) ) |
---|
6352 | |
---|
6353 | ENDIF |
---|
6354 | |
---|
6355 | CASE ( 'ns_v_on_file_usm') |
---|
6356 | IF ( k == 1 ) THEN |
---|
6357 | READ ( 13 ) ns_v_on_file_usm |
---|
6358 | |
---|
6359 | DO l = 0, 3 |
---|
6360 | IF ( ALLOCATED( tmp_surf_wall_v(l)%t ) ) & |
---|
6361 | DEALLOCATE( tmp_surf_wall_v(l)%t ) |
---|
6362 | IF ( ALLOCATED( tmp_wall_v(l)%t ) ) & |
---|
6363 | DEALLOCATE( tmp_wall_v(l)%t ) |
---|
6364 | IF ( ALLOCATED( tmp_surf_window_v(l)%t ) ) & |
---|
6365 | DEALLOCATE( tmp_surf_window_v(l)%t ) |
---|
6366 | IF ( ALLOCATED( tmp_window_v(l)%t ) ) & |
---|
6367 | DEALLOCATE( tmp_window_v(l)%t ) |
---|
6368 | IF ( ALLOCATED( tmp_surf_green_v(l)%t ) ) & |
---|
6369 | DEALLOCATE( tmp_surf_green_v(l)%t ) |
---|
6370 | IF ( ALLOCATED( tmp_green_v(l)%t ) ) & |
---|
6371 | DEALLOCATE( tmp_green_v(l)%t ) |
---|
6372 | IF ( ALLOCATED( tmp_surf_waste_v(l)%t ) ) & |
---|
6373 | DEALLOCATE( tmp_surf_waste_v(l)%t ) |
---|
6374 | ENDDO |
---|
6375 | |
---|
6376 | ! |
---|
6377 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
6378 | !-- the size of allocated surface elements do not necessarily |
---|
6379 | !-- need to match the size of present surface elements on |
---|
6380 | !-- current processor, as the number of processors between |
---|
6381 | !-- restarts can change. |
---|
6382 | DO l = 0, 3 |
---|
6383 | ALLOCATE( tmp_surf_wall_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6384 | ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
6385 | 1:ns_v_on_file_usm(l) ) ) |
---|
6386 | ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6387 | ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
6388 | 1:ns_v_on_file_usm(l) ) ) |
---|
6389 | ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6390 | ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
6391 | 1:ns_v_on_file_usm(l) ) ) |
---|
6392 | ALLOCATE( tmp_surf_waste_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6393 | ENDDO |
---|
6394 | |
---|
6395 | ENDIF |
---|
6396 | |
---|
6397 | CASE ( 'usm_start_index_h', 'usm_start_index_v' ) |
---|
6398 | IF ( k == 1 ) THEN |
---|
6399 | |
---|
6400 | IF ( ALLOCATED( start_index_on_file ) ) & |
---|
6401 | DEALLOCATE( start_index_on_file ) |
---|
6402 | |
---|
6403 | ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file, & |
---|
6404 | nxl_on_file:nxr_on_file) ) |
---|
6405 | |
---|
6406 | READ ( 13 ) start_index_on_file |
---|
6407 | |
---|
6408 | ENDIF |
---|
6409 | |
---|
6410 | CASE ( 'usm_end_index_h', 'usm_end_index_v' ) |
---|
6411 | IF ( k == 1 ) THEN |
---|
6412 | |
---|
6413 | IF ( ALLOCATED( end_index_on_file ) ) & |
---|
6414 | DEALLOCATE( end_index_on_file ) |
---|
6415 | |
---|
6416 | ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file, & |
---|
6417 | nxl_on_file:nxr_on_file) ) |
---|
6418 | |
---|
6419 | READ ( 13 ) end_index_on_file |
---|
6420 | |
---|
6421 | ENDIF |
---|
6422 | |
---|
6423 | CASE ( 't_surf_wall_h' ) |
---|
6424 | IF ( k == 1 ) THEN |
---|
6425 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
6426 | ALLOCATE( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
6427 | READ ( 13 ) tmp_surf_wall_h |
---|
6428 | ENDIF |
---|
6429 | CALL surface_restore_elements( & |
---|
6430 | t_surf_wall_h_1, tmp_surf_wall_h, & |
---|
6431 | surf_usm_h%start_index, & |
---|
6432 | start_index_on_file, & |
---|
6433 | end_index_on_file, & |
---|
6434 | nxlc, nysc, & |
---|
6435 | nxlf, nxrf, nysf, nynf, & |
---|
6436 | nys_on_file, nyn_on_file, & |
---|
6437 | nxl_on_file,nxr_on_file ) |
---|
6438 | |
---|
6439 | CASE ( 't_surf_wall_v(0)' ) |
---|
6440 | IF ( k == 1 ) THEN |
---|
6441 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(0)%t ) ) & |
---|
6442 | ALLOCATE( t_surf_wall_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6443 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
6444 | ENDIF |
---|
6445 | CALL surface_restore_elements( & |
---|
6446 | t_surf_wall_v_1(0)%t, tmp_surf_wall_v(0)%t, & |
---|
6447 | surf_usm_v(0)%start_index, & |
---|
6448 | start_index_on_file, & |
---|
6449 | end_index_on_file, & |
---|
6450 | nxlc, nysc, & |
---|
6451 | nxlf, nxrf, nysf, nynf, & |
---|
6452 | nys_on_file, nyn_on_file, & |
---|
6453 | nxl_on_file,nxr_on_file ) |
---|
6454 | |
---|
6455 | CASE ( 't_surf_wall_v(1)' ) |
---|
6456 | IF ( k == 1 ) THEN |
---|
6457 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(1)%t ) ) & |
---|
6458 | ALLOCATE( t_surf_wall_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6459 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
6460 | ENDIF |
---|
6461 | CALL surface_restore_elements( & |
---|
6462 | t_surf_wall_v_1(1)%t, tmp_surf_wall_v(1)%t, & |
---|
6463 | surf_usm_v(1)%start_index, & |
---|
6464 | start_index_on_file, & |
---|
6465 | end_index_on_file, & |
---|
6466 | nxlc, nysc, & |
---|
6467 | nxlf, nxrf, nysf, nynf, & |
---|
6468 | nys_on_file, nyn_on_file, & |
---|
6469 | nxl_on_file,nxr_on_file ) |
---|
6470 | |
---|
6471 | CASE ( 't_surf_wall_v(2)' ) |
---|
6472 | IF ( k == 1 ) THEN |
---|
6473 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(2)%t ) ) & |
---|
6474 | ALLOCATE( t_surf_wall_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6475 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
6476 | ENDIF |
---|
6477 | CALL surface_restore_elements( & |
---|
6478 | t_surf_wall_v_1(2)%t, tmp_surf_wall_v(2)%t, & |
---|
6479 | surf_usm_v(2)%start_index, & |
---|
6480 | start_index_on_file, & |
---|
6481 | end_index_on_file, & |
---|
6482 | nxlc, nysc, & |
---|
6483 | nxlf, nxrf, nysf, nynf, & |
---|
6484 | nys_on_file, nyn_on_file, & |
---|
6485 | nxl_on_file,nxr_on_file ) |
---|
6486 | |
---|
6487 | CASE ( 't_surf_wall_v(3)' ) |
---|
6488 | IF ( k == 1 ) THEN |
---|
6489 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(3)%t ) ) & |
---|
6490 | ALLOCATE( t_surf_wall_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6491 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
6492 | ENDIF |
---|
6493 | CALL surface_restore_elements( & |
---|
6494 | t_surf_wall_v_1(3)%t, tmp_surf_wall_v(3)%t, & |
---|
6495 | surf_usm_v(3)%start_index, & |
---|
6496 | start_index_on_file, & |
---|
6497 | end_index_on_file, & |
---|
6498 | nxlc, nysc, & |
---|
6499 | nxlf, nxrf, nysf, nynf, & |
---|
6500 | nys_on_file, nyn_on_file, & |
---|
6501 | nxl_on_file,nxr_on_file ) |
---|
6502 | |
---|
6503 | CASE ( 't_surf_green_h' ) |
---|
6504 | IF ( k == 1 ) THEN |
---|
6505 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
6506 | ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
6507 | READ ( 13 ) tmp_surf_green_h |
---|
6508 | ENDIF |
---|
6509 | CALL surface_restore_elements( & |
---|
6510 | t_surf_green_h_1, tmp_surf_green_h, & |
---|
6511 | surf_usm_h%start_index, & |
---|
6512 | start_index_on_file, & |
---|
6513 | end_index_on_file, & |
---|
6514 | nxlc, nysc, & |
---|
6515 | nxlf, nxrf, nysf, nynf, & |
---|
6516 | nys_on_file, nyn_on_file, & |
---|
6517 | nxl_on_file,nxr_on_file ) |
---|
6518 | |
---|
6519 | CASE ( 't_surf_green_v(0)' ) |
---|
6520 | IF ( k == 1 ) THEN |
---|
6521 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(0)%t ) ) & |
---|
6522 | ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6523 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
6524 | ENDIF |
---|
6525 | CALL surface_restore_elements( & |
---|
6526 | t_surf_green_v_1(0)%t, & |
---|
6527 | tmp_surf_green_v(0)%t, & |
---|
6528 | surf_usm_v(0)%start_index, & |
---|
6529 | start_index_on_file, & |
---|
6530 | end_index_on_file, & |
---|
6531 | nxlc, nysc, & |
---|
6532 | nxlf, nxrf, nysf, nynf, & |
---|
6533 | nys_on_file, nyn_on_file, & |
---|
6534 | nxl_on_file,nxr_on_file ) |
---|
6535 | |
---|
6536 | CASE ( 't_surf_green_v(1)' ) |
---|
6537 | IF ( k == 1 ) THEN |
---|
6538 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(1)%t ) ) & |
---|
6539 | ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6540 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
6541 | ENDIF |
---|
6542 | CALL surface_restore_elements( & |
---|
6543 | t_surf_green_v_1(1)%t, & |
---|
6544 | tmp_surf_green_v(1)%t, & |
---|
6545 | surf_usm_v(1)%start_index, & |
---|
6546 | start_index_on_file, & |
---|
6547 | end_index_on_file, & |
---|
6548 | nxlc, nysc, & |
---|
6549 | nxlf, nxrf, nysf, nynf, & |
---|
6550 | nys_on_file, nyn_on_file, & |
---|
6551 | nxl_on_file,nxr_on_file ) |
---|
6552 | |
---|
6553 | CASE ( 't_surf_green_v(2)' ) |
---|
6554 | IF ( k == 1 ) THEN |
---|
6555 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(2)%t ) ) & |
---|
6556 | ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6557 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
6558 | ENDIF |
---|
6559 | CALL surface_restore_elements( & |
---|
6560 | t_surf_green_v_1(2)%t, & |
---|
6561 | tmp_surf_green_v(2)%t, & |
---|
6562 | surf_usm_v(2)%start_index, & |
---|
6563 | start_index_on_file, & |
---|
6564 | end_index_on_file, & |
---|
6565 | nxlc, nysc, & |
---|
6566 | nxlf, nxrf, nysf, nynf, & |
---|
6567 | nys_on_file, nyn_on_file, & |
---|
6568 | nxl_on_file,nxr_on_file ) |
---|
6569 | |
---|
6570 | CASE ( 't_surf_green_v(3)' ) |
---|
6571 | IF ( k == 1 ) THEN |
---|
6572 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(3)%t ) ) & |
---|
6573 | ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6574 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
6575 | ENDIF |
---|
6576 | CALL surface_restore_elements( & |
---|
6577 | t_surf_green_v_1(3)%t, & |
---|
6578 | tmp_surf_green_v(3)%t, & |
---|
6579 | surf_usm_v(3)%start_index, & |
---|
6580 | start_index_on_file, & |
---|
6581 | end_index_on_file, & |
---|
6582 | nxlc, nysc, & |
---|
6583 | nxlf, nxrf, nysf, nynf, & |
---|
6584 | nys_on_file, nyn_on_file, & |
---|
6585 | nxl_on_file,nxr_on_file ) |
---|
6586 | |
---|
6587 | CASE ( 't_surf_window_h' ) |
---|
6588 | IF ( k == 1 ) THEN |
---|
6589 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
6590 | ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
6591 | READ ( 13 ) tmp_surf_window_h |
---|
6592 | ENDIF |
---|
6593 | CALL surface_restore_elements( & |
---|
6594 | t_surf_window_h_1, & |
---|
6595 | tmp_surf_window_h, & |
---|
6596 | surf_usm_h%start_index, & |
---|
6597 | start_index_on_file, & |
---|
6598 | end_index_on_file, & |
---|
6599 | nxlc, nysc, & |
---|
6600 | nxlf, nxrf, nysf, nynf, & |
---|
6601 | nys_on_file, nyn_on_file, & |
---|
6602 | nxl_on_file,nxr_on_file ) |
---|
6603 | |
---|
6604 | CASE ( 't_surf_window_v(0)' ) |
---|
6605 | IF ( k == 1 ) THEN |
---|
6606 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(0)%t ) ) & |
---|
6607 | ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6608 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
6609 | ENDIF |
---|
6610 | CALL surface_restore_elements( & |
---|
6611 | t_surf_window_v_1(0)%t, & |
---|
6612 | tmp_surf_window_v(0)%t, & |
---|
6613 | surf_usm_v(0)%start_index, & |
---|
6614 | start_index_on_file, & |
---|
6615 | end_index_on_file, & |
---|
6616 | nxlc, nysc, & |
---|
6617 | nxlf, nxrf, nysf, nynf, & |
---|
6618 | nys_on_file, nyn_on_file, & |
---|
6619 | nxl_on_file,nxr_on_file ) |
---|
6620 | |
---|
6621 | CASE ( 't_surf_window_v(1)' ) |
---|
6622 | IF ( k == 1 ) THEN |
---|
6623 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(1)%t ) ) & |
---|
6624 | ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6625 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
6626 | ENDIF |
---|
6627 | CALL surface_restore_elements( & |
---|
6628 | t_surf_window_v_1(1)%t, & |
---|
6629 | tmp_surf_window_v(1)%t, & |
---|
6630 | surf_usm_v(1)%start_index, & |
---|
6631 | start_index_on_file, & |
---|
6632 | end_index_on_file, & |
---|
6633 | nxlc, nysc, & |
---|
6634 | nxlf, nxrf, nysf, nynf, & |
---|
6635 | nys_on_file, nyn_on_file, & |
---|
6636 | nxl_on_file,nxr_on_file ) |
---|
6637 | |
---|
6638 | CASE ( 't_surf_window_v(2)' ) |
---|
6639 | IF ( k == 1 ) THEN |
---|
6640 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(2)%t ) ) & |
---|
6641 | ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6642 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
6643 | ENDIF |
---|
6644 | CALL surface_restore_elements( & |
---|
6645 | t_surf_window_v_1(2)%t, & |
---|
6646 | tmp_surf_window_v(2)%t, & |
---|
6647 | surf_usm_v(2)%start_index, & |
---|
6648 | start_index_on_file, & |
---|
6649 | end_index_on_file, & |
---|
6650 | nxlc, nysc, & |
---|
6651 | nxlf, nxrf, nysf, nynf, & |
---|
6652 | nys_on_file, nyn_on_file, & |
---|
6653 | nxl_on_file,nxr_on_file ) |
---|
6654 | |
---|
6655 | CASE ( 't_surf_window_v(3)' ) |
---|
6656 | IF ( k == 1 ) THEN |
---|
6657 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(3)%t ) ) & |
---|
6658 | ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6659 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
6660 | ENDIF |
---|
6661 | CALL surface_restore_elements( & |
---|
6662 | t_surf_window_v_1(3)%t, & |
---|
6663 | tmp_surf_window_v(3)%t, & |
---|
6664 | surf_usm_v(3)%start_index, & |
---|
6665 | start_index_on_file, & |
---|
6666 | end_index_on_file, & |
---|
6667 | nxlc, nysc, & |
---|
6668 | nxlf, nxrf, nysf, nynf, & |
---|
6669 | nys_on_file, nyn_on_file, & |
---|
6670 | nxl_on_file,nxr_on_file ) |
---|
6671 | |
---|
6672 | CASE ( 'waste_heat_h' ) |
---|
6673 | IF ( k == 1 ) THEN |
---|
6674 | IF ( .NOT. ALLOCATED( surf_usm_h%waste_heat ) ) & |
---|
6675 | ALLOCATE( surf_usm_h%waste_heat(1:surf_usm_h%ns) ) |
---|
6676 | READ ( 13 ) tmp_surf_waste_h |
---|
6677 | ENDIF |
---|
6678 | CALL surface_restore_elements( & |
---|
6679 | surf_usm_h%waste_heat, & |
---|
6680 | tmp_surf_waste_h, & |
---|
6681 | surf_usm_h%start_index, & |
---|
6682 | start_index_on_file, & |
---|
6683 | end_index_on_file, & |
---|
6684 | nxlc, nysc, & |
---|
6685 | nxlf, nxrf, nysf, nynf, & |
---|
6686 | nys_on_file, nyn_on_file, & |
---|
6687 | nxl_on_file,nxr_on_file ) |
---|
6688 | |
---|
6689 | CASE ( 'waste_heat_v(0)' ) |
---|
6690 | IF ( k == 1 ) THEN |
---|
6691 | IF ( .NOT. ALLOCATED( surf_usm_v(0)%waste_heat ) ) & |
---|
6692 | ALLOCATE( surf_usm_v(0)%waste_heat(1:surf_usm_v(0)%ns) ) |
---|
6693 | READ ( 13 ) tmp_surf_waste_v(0)%t |
---|
6694 | ENDIF |
---|
6695 | CALL surface_restore_elements( & |
---|
6696 | surf_usm_v(0)%waste_heat, & |
---|
6697 | tmp_surf_waste_v(0)%t, & |
---|
6698 | surf_usm_v(0)%start_index, & |
---|
6699 | start_index_on_file, & |
---|
6700 | end_index_on_file, & |
---|
6701 | nxlc, nysc, & |
---|
6702 | nxlf, nxrf, nysf, nynf, & |
---|
6703 | nys_on_file, nyn_on_file, & |
---|
6704 | nxl_on_file,nxr_on_file ) |
---|
6705 | |
---|
6706 | CASE ( 'waste_heat_v(1)' ) |
---|
6707 | IF ( k == 1 ) THEN |
---|
6708 | IF ( .NOT. ALLOCATED( surf_usm_v(1)%waste_heat ) ) & |
---|
6709 | ALLOCATE( surf_usm_v(1)%waste_heat(1:surf_usm_v(1)%ns) ) |
---|
6710 | READ ( 13 ) tmp_surf_waste_v(1)%t |
---|
6711 | ENDIF |
---|
6712 | CALL surface_restore_elements( & |
---|
6713 | surf_usm_v(1)%waste_heat, & |
---|
6714 | tmp_surf_waste_v(1)%t, & |
---|
6715 | surf_usm_v(1)%start_index, & |
---|
6716 | start_index_on_file, & |
---|
6717 | end_index_on_file, & |
---|
6718 | nxlc, nysc, & |
---|
6719 | nxlf, nxrf, nysf, nynf, & |
---|
6720 | nys_on_file, nyn_on_file, & |
---|
6721 | nxl_on_file,nxr_on_file ) |
---|
6722 | |
---|
6723 | CASE ( 'waste_heat_v(2)' ) |
---|
6724 | IF ( k == 1 ) THEN |
---|
6725 | IF ( .NOT. ALLOCATED( surf_usm_v(2)%waste_heat ) ) & |
---|
6726 | ALLOCATE( surf_usm_v(2)%waste_heat(1:surf_usm_v(2)%ns) ) |
---|
6727 | READ ( 13 ) tmp_surf_waste_v(2)%t |
---|
6728 | ENDIF |
---|
6729 | CALL surface_restore_elements( & |
---|
6730 | surf_usm_v(2)%waste_heat, & |
---|
6731 | tmp_surf_waste_v(2)%t, & |
---|
6732 | surf_usm_v(2)%start_index, & |
---|
6733 | start_index_on_file, & |
---|
6734 | end_index_on_file, & |
---|
6735 | nxlc, nysc, & |
---|
6736 | nxlf, nxrf, nysf, nynf, & |
---|
6737 | nys_on_file, nyn_on_file, & |
---|
6738 | nxl_on_file,nxr_on_file ) |
---|
6739 | |
---|
6740 | CASE ( 'waste_heat_v(3)' ) |
---|
6741 | IF ( k == 1 ) THEN |
---|
6742 | IF ( .NOT. ALLOCATED( surf_usm_v(3)%waste_heat ) ) & |
---|
6743 | ALLOCATE( surf_usm_v(3)%waste_heat(1:surf_usm_v(3)%ns) ) |
---|
6744 | READ ( 13 ) tmp_surf_waste_v(3)%t |
---|
6745 | ENDIF |
---|
6746 | CALL surface_restore_elements( & |
---|
6747 | surf_usm_v(3)%waste_heat, & |
---|
6748 | tmp_surf_waste_v(3)%t, & |
---|
6749 | surf_usm_v(3)%start_index, & |
---|
6750 | start_index_on_file, & |
---|
6751 | end_index_on_file, & |
---|
6752 | nxlc, nysc, & |
---|
6753 | nxlf, nxrf, nysf, nynf, & |
---|
6754 | nys_on_file, nyn_on_file, & |
---|
6755 | nxl_on_file,nxr_on_file ) |
---|
6756 | |
---|
6757 | CASE ( 't_wall_h' ) |
---|
6758 | IF ( k == 1 ) THEN |
---|
6759 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
6760 | ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1, & |
---|
6761 | 1:surf_usm_h%ns) ) |
---|
6762 | READ ( 13 ) tmp_wall_h |
---|
6763 | ENDIF |
---|
6764 | CALL surface_restore_elements( & |
---|
6765 | t_wall_h_1, tmp_wall_h, & |
---|
6766 | surf_usm_h%start_index, & |
---|
6767 | start_index_on_file, & |
---|
6768 | end_index_on_file, & |
---|
6769 | nxlc, nysc, & |
---|
6770 | nxlf, nxrf, nysf, nynf, & |
---|
6771 | nys_on_file, nyn_on_file, & |
---|
6772 | nxl_on_file,nxr_on_file ) |
---|
6773 | |
---|
6774 | CASE ( 't_wall_v(0)' ) |
---|
6775 | IF ( k == 1 ) THEN |
---|
6776 | IF ( .NOT. ALLOCATED( t_wall_v_1(0)%t ) ) & |
---|
6777 | ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6778 | 1:surf_usm_v(0)%ns) ) |
---|
6779 | READ ( 13 ) tmp_wall_v(0)%t |
---|
6780 | ENDIF |
---|
6781 | CALL surface_restore_elements( & |
---|
6782 | t_wall_v_1(0)%t, tmp_wall_v(0)%t, & |
---|
6783 | surf_usm_v(0)%start_index, & |
---|
6784 | start_index_on_file, & |
---|
6785 | end_index_on_file, & |
---|
6786 | nxlc, nysc, & |
---|
6787 | nxlf, nxrf, nysf, nynf, & |
---|
6788 | nys_on_file, nyn_on_file, & |
---|
6789 | nxl_on_file,nxr_on_file ) |
---|
6790 | |
---|
6791 | CASE ( 't_wall_v(1)' ) |
---|
6792 | IF ( k == 1 ) THEN |
---|
6793 | IF ( .NOT. ALLOCATED( t_wall_v_1(1)%t ) ) & |
---|
6794 | ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
6795 | 1:surf_usm_v(1)%ns) ) |
---|
6796 | READ ( 13 ) tmp_wall_v(1)%t |
---|
6797 | ENDIF |
---|
6798 | CALL surface_restore_elements( & |
---|
6799 | t_wall_v_1(1)%t, tmp_wall_v(1)%t, & |
---|
6800 | surf_usm_v(1)%start_index, & |
---|
6801 | start_index_on_file, & |
---|
6802 | end_index_on_file, & |
---|
6803 | nxlc, nysc, & |
---|
6804 | nxlf, nxrf, nysf, nynf, & |
---|
6805 | nys_on_file, nyn_on_file, & |
---|
6806 | nxl_on_file,nxr_on_file ) |
---|
6807 | |
---|
6808 | CASE ( 't_wall_v(2)' ) |
---|
6809 | IF ( k == 1 ) THEN |
---|
6810 | IF ( .NOT. ALLOCATED( t_wall_v_1(2)%t ) ) & |
---|
6811 | ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
6812 | 1:surf_usm_v(2)%ns) ) |
---|
6813 | READ ( 13 ) tmp_wall_v(2)%t |
---|
6814 | ENDIF |
---|
6815 | CALL surface_restore_elements( & |
---|
6816 | t_wall_v_1(2)%t, tmp_wall_v(2)%t, & |
---|
6817 | surf_usm_v(2)%start_index, & |
---|
6818 | start_index_on_file, & |
---|
6819 | end_index_on_file , & |
---|
6820 | nxlc, nysc, & |
---|
6821 | nxlf, nxrf, nysf, nynf, & |
---|
6822 | nys_on_file, nyn_on_file, & |
---|
6823 | nxl_on_file,nxr_on_file ) |
---|
6824 | |
---|
6825 | CASE ( 't_wall_v(3)' ) |
---|
6826 | IF ( k == 1 ) THEN |
---|
6827 | IF ( .NOT. ALLOCATED( t_wall_v_1(3)%t ) ) & |
---|
6828 | ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
6829 | 1:surf_usm_v(3)%ns) ) |
---|
6830 | READ ( 13 ) tmp_wall_v(3)%t |
---|
6831 | ENDIF |
---|
6832 | CALL surface_restore_elements( & |
---|
6833 | t_wall_v_1(3)%t, tmp_wall_v(3)%t, & |
---|
6834 | surf_usm_v(3)%start_index, & |
---|
6835 | start_index_on_file, & |
---|
6836 | end_index_on_file, & |
---|
6837 | nxlc, nysc, & |
---|
6838 | nxlf, nxrf, nysf, nynf, & |
---|
6839 | nys_on_file, nyn_on_file, & |
---|
6840 | nxl_on_file,nxr_on_file ) |
---|
6841 | |
---|
6842 | CASE ( 't_green_h' ) |
---|
6843 | IF ( k == 1 ) THEN |
---|
6844 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
6845 | ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1, & |
---|
6846 | 1:surf_usm_h%ns) ) |
---|
6847 | READ ( 13 ) tmp_green_h |
---|
6848 | ENDIF |
---|
6849 | CALL surface_restore_elements( & |
---|
6850 | t_green_h_1, tmp_green_h, & |
---|
6851 | surf_usm_h%start_index, & |
---|
6852 | start_index_on_file, & |
---|
6853 | end_index_on_file, & |
---|
6854 | nxlc, nysc, & |
---|
6855 | nxlf, nxrf, nysf, nynf, & |
---|
6856 | nys_on_file, nyn_on_file, & |
---|
6857 | nxl_on_file,nxr_on_file ) |
---|
6858 | |
---|
6859 | CASE ( 't_green_v(0)' ) |
---|
6860 | IF ( k == 1 ) THEN |
---|
6861 | IF ( .NOT. ALLOCATED( t_green_v_1(0)%t ) ) & |
---|
6862 | ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6863 | 1:surf_usm_v(0)%ns) ) |
---|
6864 | READ ( 13 ) tmp_green_v(0)%t |
---|
6865 | ENDIF |
---|
6866 | CALL surface_restore_elements( & |
---|
6867 | t_green_v_1(0)%t, tmp_green_v(0)%t, & |
---|
6868 | surf_usm_v(0)%start_index, & |
---|
6869 | start_index_on_file, & |
---|
6870 | end_index_on_file, & |
---|
6871 | nxlc, nysc, & |
---|
6872 | nxlf, nxrf, nysf, nynf, & |
---|
6873 | nys_on_file, nyn_on_file, & |
---|
6874 | nxl_on_file,nxr_on_file ) |
---|
6875 | |
---|
6876 | CASE ( 't_green_v(1)' ) |
---|
6877 | IF ( k == 1 ) THEN |
---|
6878 | IF ( .NOT. ALLOCATED( t_green_v_1(1)%t ) ) & |
---|
6879 | ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
6880 | 1:surf_usm_v(1)%ns) ) |
---|
6881 | READ ( 13 ) tmp_green_v(1)%t |
---|
6882 | ENDIF |
---|
6883 | CALL surface_restore_elements( & |
---|
6884 | t_green_v_1(1)%t, tmp_green_v(1)%t, & |
---|
6885 | surf_usm_v(1)%start_index, & |
---|
6886 | start_index_on_file, & |
---|
6887 | end_index_on_file, & |
---|
6888 | nxlc, nysc, & |
---|
6889 | nxlf, nxrf, nysf, nynf, & |
---|
6890 | nys_on_file, nyn_on_file, & |
---|
6891 | nxl_on_file,nxr_on_file ) |
---|
6892 | |
---|
6893 | CASE ( 't_green_v(2)' ) |
---|
6894 | IF ( k == 1 ) THEN |
---|
6895 | IF ( .NOT. ALLOCATED( t_green_v_1(2)%t ) ) & |
---|
6896 | ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
6897 | 1:surf_usm_v(2)%ns) ) |
---|
6898 | READ ( 13 ) tmp_green_v(2)%t |
---|
6899 | ENDIF |
---|
6900 | CALL surface_restore_elements( & |
---|
6901 | t_green_v_1(2)%t, tmp_green_v(2)%t, & |
---|
6902 | surf_usm_v(2)%start_index, & |
---|
6903 | start_index_on_file, & |
---|
6904 | end_index_on_file , & |
---|
6905 | nxlc, nysc, & |
---|
6906 | nxlf, nxrf, nysf, nynf, & |
---|
6907 | nys_on_file, nyn_on_file, & |
---|
6908 | nxl_on_file,nxr_on_file ) |
---|
6909 | |
---|
6910 | CASE ( 't_green_v(3)' ) |
---|
6911 | IF ( k == 1 ) THEN |
---|
6912 | IF ( .NOT. ALLOCATED( t_green_v_1(3)%t ) ) & |
---|
6913 | ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
6914 | 1:surf_usm_v(3)%ns) ) |
---|
6915 | READ ( 13 ) tmp_green_v(3)%t |
---|
6916 | ENDIF |
---|
6917 | CALL surface_restore_elements( & |
---|
6918 | t_green_v_1(3)%t, tmp_green_v(3)%t, & |
---|
6919 | surf_usm_v(3)%start_index, & |
---|
6920 | start_index_on_file, & |
---|
6921 | end_index_on_file, & |
---|
6922 | nxlc, nysc, & |
---|
6923 | nxlf, nxrf, nysf, nynf, & |
---|
6924 | nys_on_file, nyn_on_file, & |
---|
6925 | nxl_on_file,nxr_on_file ) |
---|
6926 | |
---|
6927 | CASE ( 't_window_h' ) |
---|
6928 | IF ( k == 1 ) THEN |
---|
6929 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
6930 | ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1, & |
---|
6931 | 1:surf_usm_h%ns) ) |
---|
6932 | READ ( 13 ) tmp_window_h |
---|
6933 | ENDIF |
---|
6934 | CALL surface_restore_elements( & |
---|
6935 | t_window_h_1, tmp_window_h, & |
---|
6936 | surf_usm_h%start_index, & |
---|
6937 | start_index_on_file, & |
---|
6938 | end_index_on_file, & |
---|
6939 | nxlc, nysc, & |
---|
6940 | nxlf, nxrf, nysf, nynf, & |
---|
6941 | nys_on_file, nyn_on_file, & |
---|
6942 | nxl_on_file, nxr_on_file ) |
---|
6943 | |
---|
6944 | CASE ( 't_window_v(0)' ) |
---|
6945 | IF ( k == 1 ) THEN |
---|
6946 | IF ( .NOT. ALLOCATED( t_window_v_1(0)%t ) ) & |
---|
6947 | ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6948 | 1:surf_usm_v(0)%ns) ) |
---|
6949 | READ ( 13 ) tmp_window_v(0)%t |
---|
6950 | ENDIF |
---|
6951 | CALL surface_restore_elements( & |
---|
6952 | t_window_v_1(0)%t, & |
---|
6953 | tmp_window_v(0)%t, & |
---|
6954 | surf_usm_v(0)%start_index, & |
---|
6955 | start_index_on_file, & |
---|
6956 | end_index_on_file, & |
---|
6957 | nxlc, nysc, & |
---|
6958 | nxlf, nxrf, nysf, nynf, & |
---|
6959 | nys_on_file, nyn_on_file, & |
---|
6960 | nxl_on_file,nxr_on_file ) |
---|
6961 | |
---|
6962 | CASE ( 't_window_v(1)' ) |
---|
6963 | IF ( k == 1 ) THEN |
---|
6964 | IF ( .NOT. ALLOCATED( t_window_v_1(1)%t ) ) & |
---|
6965 | ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
6966 | 1:surf_usm_v(1)%ns) ) |
---|
6967 | READ ( 13 ) tmp_window_v(1)%t |
---|
6968 | ENDIF |
---|
6969 | CALL surface_restore_elements( & |
---|
6970 | t_window_v_1(1)%t, & |
---|
6971 | tmp_window_v(1)%t, & |
---|
6972 | surf_usm_v(1)%start_index, & |
---|
6973 | start_index_on_file, & |
---|
6974 | end_index_on_file, & |
---|
6975 | nxlc, nysc, & |
---|
6976 | nxlf, nxrf, nysf, nynf, & |
---|
6977 | nys_on_file, nyn_on_file, & |
---|
6978 | nxl_on_file,nxr_on_file ) |
---|
6979 | |
---|
6980 | CASE ( 't_window_v(2)' ) |
---|
6981 | IF ( k == 1 ) THEN |
---|
6982 | IF ( .NOT. ALLOCATED( t_window_v_1(2)%t ) ) & |
---|
6983 | ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
6984 | 1:surf_usm_v(2)%ns) ) |
---|
6985 | READ ( 13 ) tmp_window_v(2)%t |
---|
6986 | ENDIF |
---|
6987 | CALL surface_restore_elements( & |
---|
6988 | t_window_v_1(2)%t, & |
---|
6989 | tmp_window_v(2)%t, & |
---|
6990 | surf_usm_v(2)%start_index, & |
---|
6991 | start_index_on_file, & |
---|
6992 | end_index_on_file , & |
---|
6993 | nxlc, nysc, & |
---|
6994 | nxlf, nxrf, nysf, nynf, & |
---|
6995 | nys_on_file, nyn_on_file, & |
---|
6996 | nxl_on_file,nxr_on_file ) |
---|
6997 | |
---|
6998 | CASE ( 't_window_v(3)' ) |
---|
6999 | IF ( k == 1 ) THEN |
---|
7000 | IF ( .NOT. ALLOCATED( t_window_v_1(3)%t ) ) & |
---|
7001 | ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) ) |
---|
7002 | READ ( 13 ) tmp_window_v(3)%t |
---|
7003 | ENDIF |
---|
7004 | CALL surface_restore_elements( & |
---|
7005 | t_window_v_1(3)%t, & |
---|
7006 | tmp_window_v(3)%t, & |
---|
7007 | surf_usm_v(3)%start_index, & |
---|
7008 | start_index_on_file, & |
---|
7009 | end_index_on_file, & |
---|
7010 | nxlc, nysc, & |
---|
7011 | nxlf, nxrf, nysf, nynf, & |
---|
7012 | nys_on_file, nyn_on_file, & |
---|
7013 | nxl_on_file,nxr_on_file ) |
---|
7014 | |
---|
7015 | CASE DEFAULT |
---|
7016 | |
---|
7017 | found = .FALSE. |
---|
7018 | |
---|
7019 | END SELECT |
---|
7020 | |
---|
7021 | |
---|
7022 | END SUBROUTINE usm_rrd_local |
---|
7023 | |
---|
7024 | |
---|
7025 | !------------------------------------------------------------------------------! |
---|
7026 | ! Description: |
---|
7027 | ! ------------ |
---|
7028 | ! |
---|
7029 | !> This subroutine reads walls, roofs and land categories and it parameters |
---|
7030 | !> from input files. |
---|
7031 | !------------------------------------------------------------------------------! |
---|
7032 | SUBROUTINE usm_read_urban_surface_types |
---|
7033 | |
---|
7034 | USE netcdf_data_input_mod, & |
---|
7035 | ONLY: building_pars_f, building_type_f |
---|
7036 | |
---|
7037 | IMPLICIT NONE |
---|
7038 | |
---|
7039 | CHARACTER(12) :: wtn |
---|
7040 | INTEGER(iwp) :: wtc |
---|
7041 | REAL(wp), DIMENSION(n_surface_params) :: wtp |
---|
7042 | LOGICAL :: ascii_file = .FALSE. |
---|
7043 | INTEGER(iwp), DIMENSION(0:17, nysg:nyng, nxlg:nxrg) :: usm_par |
---|
7044 | REAL(wp), DIMENSION(1:14, nysg:nyng, nxlg:nxrg) :: usm_val |
---|
7045 | INTEGER(iwp) :: k, l, iw, jw, kw, it, ip, ii, ij, m |
---|
7046 | INTEGER(iwp) :: i, j |
---|
7047 | INTEGER(iwp) :: nz, roof, dirwe, dirsn |
---|
7048 | INTEGER(iwp) :: category |
---|
7049 | INTEGER(iwp) :: weheight1, wecat1, snheight1, sncat1 |
---|
7050 | INTEGER(iwp) :: weheight2, wecat2, snheight2, sncat2 |
---|
7051 | INTEGER(iwp) :: weheight3, wecat3, snheight3, sncat3 |
---|
7052 | REAL(wp) :: height, albedo, thick |
---|
7053 | REAL(wp) :: wealbedo1, wethick1, snalbedo1, snthick1 |
---|
7054 | REAL(wp) :: wealbedo2, wethick2, snalbedo2, snthick2 |
---|
7055 | REAL(wp) :: wealbedo3, wethick3, snalbedo3, snthick3 |
---|
7056 | |
---|
7057 | ! |
---|
7058 | !-- If building_pars or building_type are already read from static input |
---|
7059 | !-- file, skip reading ASCII file. |
---|
7060 | IF ( building_type_f%from_file .OR. building_pars_f%from_file ) & |
---|
7061 | RETURN |
---|
7062 | ! |
---|
7063 | !-- Check if ASCII input file exists. If not, return and initialize USM |
---|
7064 | !-- with default settings. |
---|
7065 | INQUIRE( FILE = 'SURFACE_PARAMETERS' // coupling_char, & |
---|
7066 | EXIST = ascii_file ) |
---|
7067 | |
---|
7068 | IF ( .NOT. ascii_file ) RETURN |
---|
7069 | |
---|
7070 | ! |
---|
7071 | !-- read categories of walls and their parameters |
---|
7072 | DO ii = 0, io_blocks-1 |
---|
7073 | IF ( ii == io_group ) THEN |
---|
7074 | ! |
---|
7075 | !-- open urban surface file |
---|
7076 | OPEN( 151, file='SURFACE_PARAMETERS'//coupling_char, action='read', & |
---|
7077 | status='old', form='formatted', err=15 ) |
---|
7078 | ! |
---|
7079 | !-- first test and get n_surface_types |
---|
7080 | k = 0 |
---|
7081 | l = 0 |
---|
7082 | DO |
---|
7083 | l = l+1 |
---|
7084 | READ( 151, *, err=11, end=12 ) wtc, wtp, wtn |
---|
7085 | k = k+1 |
---|
7086 | CYCLE |
---|
7087 | 11 CONTINUE |
---|
7088 | ENDDO |
---|
7089 | 12 n_surface_types = k |
---|
7090 | ALLOCATE( surface_type_names(n_surface_types) ) |
---|
7091 | ALLOCATE( surface_type_codes(n_surface_types) ) |
---|
7092 | ALLOCATE( surface_params(n_surface_params, n_surface_types) ) |
---|
7093 | ! |
---|
7094 | !-- real reading |
---|
7095 | rewind( 151 ) |
---|
7096 | k = 0 |
---|
7097 | DO |
---|
7098 | READ( 151, *, err=13, end=14 ) wtc, wtp, wtn |
---|
7099 | k = k+1 |
---|
7100 | surface_type_codes(k) = wtc |
---|
7101 | surface_params(:,k) = wtp |
---|
7102 | surface_type_names(k) = wtn |
---|
7103 | CYCLE |
---|
7104 | 13 WRITE(6,'(i3,a,2i5)') myid, 'readparams2 error k=', k |
---|
7105 | FLUSH(6) |
---|
7106 | CONTINUE |
---|
7107 | ENDDO |
---|
7108 | 14 CLOSE(151) |
---|
7109 | CYCLE |
---|
7110 | 15 message_string = 'file SURFACE_PARAMETERS'//TRIM(coupling_char)//' does not exist' |
---|
7111 | CALL message( 'usm_read_urban_surface_types', 'PA0513', 1, 2, 0, 6, 0 ) |
---|
7112 | ENDIF |
---|
7113 | ENDDO |
---|
7114 | |
---|
7115 | ! |
---|
7116 | !-- read types of surfaces |
---|
7117 | usm_par = 0 |
---|
7118 | DO ii = 0, io_blocks-1 |
---|
7119 | IF ( ii == io_group ) THEN |
---|
7120 | |
---|
7121 | ! |
---|
7122 | !-- open csv urban surface file |
---|
7123 | OPEN( 151, file='URBAN_SURFACE'//TRIM(coupling_char), action='read', & |
---|
7124 | status='old', form='formatted', err=23 ) |
---|
7125 | |
---|
7126 | l = 0 |
---|
7127 | DO |
---|
7128 | l = l+1 |
---|
7129 | ! |
---|
7130 | !-- i, j, height, nz, roof, dirwe, dirsn, category, soilcat, |
---|
7131 | !-- weheight1, wecat1, snheight1, sncat1, weheight2, wecat2, snheight2, sncat2, |
---|
7132 | !-- weheight3, wecat3, snheight3, sncat3 |
---|
7133 | READ( 151, *, err=21, end=25 ) i, j, height, nz, roof, dirwe, dirsn, & |
---|
7134 | category, albedo, thick, & |
---|
7135 | weheight1, wecat1, wealbedo1, wethick1, & |
---|
7136 | weheight2, wecat2, wealbedo2, wethick2, & |
---|
7137 | weheight3, wecat3, wealbedo3, wethick3, & |
---|
7138 | snheight1, sncat1, snalbedo1, snthick1, & |
---|
7139 | snheight2, sncat2, snalbedo2, snthick2, & |
---|
7140 | snheight3, sncat3, snalbedo3, snthick3 |
---|
7141 | |
---|
7142 | IF ( i >= nxlg .AND. i <= nxrg .AND. j >= nysg .AND. j <= nyng ) THEN |
---|
7143 | ! |
---|
7144 | !-- write integer variables into array |
---|
7145 | usm_par(:,j,i) = (/1, nz, roof, dirwe, dirsn, category, & |
---|
7146 | weheight1, wecat1, weheight2, wecat2, weheight3, wecat3, & |
---|
7147 | snheight1, sncat1, snheight2, sncat2, snheight3, sncat3 /) |
---|
7148 | ! |
---|
7149 | !-- write real values into array |
---|
7150 | usm_val(:,j,i) = (/ albedo, thick, & |
---|
7151 | wealbedo1, wethick1, wealbedo2, wethick2, & |
---|
7152 | wealbedo3, wethick3, snalbedo1, snthick1, & |
---|
7153 | snalbedo2, snthick2, snalbedo3, snthick3 /) |
---|
7154 | ENDIF |
---|
7155 | CYCLE |
---|
7156 | 21 WRITE (message_string, "(A,I5)") 'errors in file URBAN_SURFACE'//TRIM(coupling_char)//' on line ', l |
---|
7157 | CALL message( 'usm_read_urban_surface_types', 'PA0512', 0, 1, 0, 6, 0 ) |
---|
7158 | ENDDO |
---|
7159 | |
---|
7160 | 23 message_string = 'file URBAN_SURFACE'//TRIM(coupling_char)//' does not exist' |
---|
7161 | CALL message( 'usm_read_urban_surface_types', 'PA0514', 1, 2, 0, 6, 0 ) |
---|
7162 | |
---|
7163 | 25 CLOSE( 151 ) |
---|
7164 | |
---|
7165 | ENDIF |
---|
7166 | #if defined( __parallel ) |
---|
7167 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7168 | #endif |
---|
7169 | ENDDO |
---|
7170 | |
---|
7171 | ! |
---|
7172 | !-- check completeness and formal correctness of the data |
---|
7173 | DO i = nxlg, nxrg |
---|
7174 | DO j = nysg, nyng |
---|
7175 | IF ( usm_par(0,j,i) /= 0 .AND. ( & !< incomplete data,supply default values later |
---|
7176 | usm_par(1,j,i) < nzb .OR. & |
---|
7177 | usm_par(1,j,i) > nzt .OR. & !< incorrect height (nz < nzb .OR. nz > nzt) |
---|
7178 | usm_par(2,j,i) < 0 .OR. & |
---|
7179 | usm_par(2,j,i) > 1 .OR. & !< incorrect roof sign |
---|
7180 | usm_par(3,j,i) < nzb-nzt .OR. & |
---|
7181 | usm_par(3,j,i) > nzt-nzb .OR. & !< incorrect west-east wall direction sign |
---|
7182 | usm_par(4,j,i) < nzb-nzt .OR. & |
---|
7183 | usm_par(4,j,i) > nzt-nzb .OR. & !< incorrect south-north wall direction sign |
---|
7184 | usm_par(6,j,i) < nzb .OR. & |
---|
7185 | usm_par(6,j,i) > nzt .OR. & !< incorrect pedestrian level height for west-east wall |
---|
7186 | usm_par(8,j,i) > nzt .OR. & |
---|
7187 | usm_par(10,j,i) > nzt .OR. & !< incorrect wall or roof level height for west-east wall |
---|
7188 | usm_par(12,j,i) < nzb .OR. & |
---|
7189 | usm_par(12,j,i) > nzt .OR. & !< incorrect pedestrian level height for south-north wall |
---|
7190 | usm_par(14,j,i) > nzt .OR. & |
---|
7191 | usm_par(16,j,i) > nzt & !< incorrect wall or roof level height for south-north wall |
---|
7192 | ) ) THEN |
---|
7193 | ! |
---|
7194 | !-- incorrect input data |
---|
7195 | WRITE (message_string, "(A,2I5)") 'missing or incorrect data in file URBAN_SURFACE'// & |
---|
7196 | TRIM(coupling_char)//' for i,j=', i,j |
---|
7197 | CALL message( 'usm_read_urban_surface', 'PA0504', 1, 2, 0, 6, 0 ) |
---|
7198 | ENDIF |
---|
7199 | |
---|
7200 | ENDDO |
---|
7201 | ENDDO |
---|
7202 | ! |
---|
7203 | !-- Assign the surface types to the respective data type. |
---|
7204 | !-- First, for horizontal upward-facing surfaces. |
---|
7205 | !-- Further, set flag indicating that albedo is initialized via ASCII |
---|
7206 | !-- format, else it would be overwritten in the radiation model. |
---|
7207 | surf_usm_h%albedo_from_ascii = .TRUE. |
---|
7208 | DO m = 1, surf_usm_h%ns |
---|
7209 | iw = surf_usm_h%i(m) |
---|
7210 | jw = surf_usm_h%j(m) |
---|
7211 | kw = surf_usm_h%k(m) |
---|
7212 | |
---|
7213 | IF ( usm_par(5,jw,iw) == 0 ) THEN |
---|
7214 | |
---|
7215 | IF ( zu(kw) >= roof_height_limit ) THEN |
---|
7216 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
7217 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
7218 | ELSE |
---|
7219 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
7220 | surf_usm_h%surface_types(m) = land_category !< default category for land surface |
---|
7221 | ENDIF |
---|
7222 | |
---|
7223 | surf_usm_h%albedo(:,m) = -1.0_wp |
---|
7224 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
7225 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
7226 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
7227 | ELSE |
---|
7228 | IF ( usm_par(2,jw,iw)==0 ) THEN |
---|
7229 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
7230 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
7231 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
7232 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
7233 | ELSE |
---|
7234 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
7235 | surf_usm_h%thickness_wall(m) = usm_val(2,jw,iw) |
---|
7236 | surf_usm_h%thickness_window(m) = usm_val(2,jw,iw) |
---|
7237 | surf_usm_h%thickness_green(m) = usm_val(2,jw,iw) |
---|
7238 | ENDIF |
---|
7239 | surf_usm_h%surface_types(m) = usm_par(5,jw,iw) |
---|
7240 | surf_usm_h%albedo(:,m) = usm_val(1,jw,iw) |
---|
7241 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
7242 | ENDIF |
---|
7243 | ! |
---|
7244 | !-- Find the type position |
---|
7245 | it = surf_usm_h%surface_types(m) |
---|
7246 | ip = -99999 |
---|
7247 | DO k = 1, n_surface_types |
---|
7248 | IF ( surface_type_codes(k) == it ) THEN |
---|
7249 | ip = k |
---|
7250 | EXIT |
---|
7251 | ENDIF |
---|
7252 | ENDDO |
---|
7253 | IF ( ip == -99999 ) THEN |
---|
7254 | ! |
---|
7255 | !-- land/roof category not found |
---|
7256 | WRITE (9,"(A,I5,A,3I5)") 'land/roof category ', it, & |
---|
7257 | ' not found for i,j,k=', iw,jw,kw |
---|
7258 | FLUSH(9) |
---|
7259 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
7260 | category = roof_category |
---|
7261 | ELSE |
---|
7262 | category = land_category |
---|
7263 | ENDIF |
---|
7264 | DO k = 1, n_surface_types |
---|
7265 | IF ( surface_type_codes(k) == roof_category ) THEN |
---|
7266 | ip = k |
---|
7267 | EXIT |
---|
7268 | ENDIF |
---|
7269 | ENDDO |
---|
7270 | IF ( ip == -99999 ) THEN |
---|
7271 | ! |
---|
7272 | !-- default land/roof category not found |
---|
7273 | WRITE (9,"(A,I5,A,3I5)") 'Default land/roof category', category, ' not found!' |
---|
7274 | FLUSH(9) |
---|
7275 | ip = 1 |
---|
7276 | ENDIF |
---|
7277 | ENDIF |
---|
7278 | ! |
---|
7279 | !-- Albedo |
---|
7280 | IF ( surf_usm_h%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
7281 | surf_usm_h%albedo(:,m) = surface_params(ialbedo,ip) |
---|
7282 | ENDIF |
---|
7283 | ! |
---|
7284 | !-- Albedo type is 0 (custom), others are replaced later |
---|
7285 | surf_usm_h%albedo_type(:,m) = 0 |
---|
7286 | ! |
---|
7287 | !-- Transmissivity |
---|
7288 | IF ( surf_usm_h%transmissivity(m) < 0.0_wp ) THEN |
---|
7289 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
7290 | ENDIF |
---|
7291 | ! |
---|
7292 | !-- emissivity of the wall |
---|
7293 | surf_usm_h%emissivity(:,m) = surface_params(iemiss,ip) |
---|
7294 | ! |
---|
7295 | !-- heat conductivity λS between air and wall ( W mâ2 Kâ1 ) |
---|
7296 | surf_usm_h%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
7297 | surf_usm_h%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
7298 | surf_usm_h%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
7299 | ! |
---|
7300 | !-- roughness length for momentum, heat and humidity |
---|
7301 | surf_usm_h%z0(m) = surface_params(irough,ip) |
---|
7302 | surf_usm_h%z0h(m) = surface_params(iroughh,ip) |
---|
7303 | surf_usm_h%z0q(m) = surface_params(iroughh,ip) |
---|
7304 | ! |
---|
7305 | !-- Surface skin layer heat capacity (J mâ2 Kâ1 ) |
---|
7306 | surf_usm_h%c_surface(m) = surface_params(icsurf,ip) |
---|
7307 | surf_usm_h%c_surface_window(m) = surface_params(icsurf,ip) |
---|
7308 | surf_usm_h%c_surface_green(m) = surface_params(icsurf,ip) |
---|
7309 | ! |
---|
7310 | !-- wall material parameters: |
---|
7311 | !-- thickness of the wall (m) |
---|
7312 | !-- missing values are replaced by default value for category |
---|
7313 | IF ( surf_usm_h%thickness_wall(m) <= 0.001_wp ) THEN |
---|
7314 | surf_usm_h%thickness_wall(m) = surface_params(ithick,ip) |
---|
7315 | ENDIF |
---|
7316 | IF ( surf_usm_h%thickness_window(m) <= 0.001_wp ) THEN |
---|
7317 | surf_usm_h%thickness_window(m) = surface_params(ithick,ip) |
---|
7318 | ENDIF |
---|
7319 | IF ( surf_usm_h%thickness_green(m) <= 0.001_wp ) THEN |
---|
7320 | surf_usm_h%thickness_green(m) = surface_params(ithick,ip) |
---|
7321 | ENDIF |
---|
7322 | ! |
---|
7323 | !-- volumetric heat capacity rho*C of the wall ( J mâ3 Kâ1 ) |
---|
7324 | surf_usm_h%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
7325 | surf_usm_h%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
7326 | surf_usm_h%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
7327 | ! |
---|
7328 | !-- thermal conductivity λH of the wall (W mâ1 Kâ1 ) |
---|
7329 | surf_usm_h%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
7330 | surf_usm_h%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
7331 | surf_usm_h%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
7332 | |
---|
7333 | ENDDO |
---|
7334 | ! |
---|
7335 | !-- For vertical surface elements ( 0 -- northward-facing, 1 -- southward-facing, |
---|
7336 | !-- 2 -- eastward-facing, 3 -- westward-facing ) |
---|
7337 | DO l = 0, 3 |
---|
7338 | ! |
---|
7339 | !-- Set flag indicating that albedo is initialized via ASCII format. |
---|
7340 | !-- Else it would be overwritten in the radiation model. |
---|
7341 | surf_usm_v(l)%albedo_from_ascii = .TRUE. |
---|
7342 | DO m = 1, surf_usm_v(l)%ns |
---|
7343 | i = surf_usm_v(l)%i(m) |
---|
7344 | j = surf_usm_v(l)%j(m) |
---|
7345 | kw = surf_usm_v(l)%k(m) |
---|
7346 | |
---|
7347 | IF ( l == 3 ) THEN ! westward facing |
---|
7348 | iw = i |
---|
7349 | jw = j |
---|
7350 | ii = 6 |
---|
7351 | ij = 3 |
---|
7352 | ELSEIF ( l == 2 ) THEN |
---|
7353 | iw = i-1 |
---|
7354 | jw = j |
---|
7355 | ii = 6 |
---|
7356 | ij = 3 |
---|
7357 | ELSEIF ( l == 1 ) THEN |
---|
7358 | iw = i |
---|
7359 | jw = j |
---|
7360 | ii = 12 |
---|
7361 | ij = 9 |
---|
7362 | ELSEIF ( l == 0 ) THEN |
---|
7363 | iw = i |
---|
7364 | jw = j-1 |
---|
7365 | ii = 12 |
---|
7366 | ij = 9 |
---|
7367 | ENDIF |
---|
7368 | |
---|
7369 | IF ( iw < 0 .OR. jw < 0 ) THEN |
---|
7370 | ! |
---|
7371 | !-- wall on west or south border of the domain - assign default category |
---|
7372 | IF ( kw <= roof_height_limit ) THEN |
---|
7373 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
7374 | ELSE |
---|
7375 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
7376 | END IF |
---|
7377 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7378 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7379 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7380 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7381 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7382 | ELSE IF ( kw <= usm_par(ii,jw,iw) ) THEN |
---|
7383 | ! |
---|
7384 | !-- pedestrian zone |
---|
7385 | IF ( usm_par(ii+1,jw,iw) == 0 ) THEN |
---|
7386 | surf_usm_v(l)%surface_types(m) = pedestrian_category !< default category for wall surface in |
---|
7387 | !<pedestrian zone |
---|
7388 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7389 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7390 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7391 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7392 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7393 | ELSE |
---|
7394 | surf_usm_v(l)%surface_types(m) = usm_par(ii+1,jw,iw) |
---|
7395 | surf_usm_v(l)%albedo(:,m) = usm_val(ij,jw,iw) |
---|
7396 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+1,jw,iw) |
---|
7397 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+1,jw,iw) |
---|
7398 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+1,jw,iw) |
---|
7399 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7400 | ENDIF |
---|
7401 | ELSE IF ( kw <= usm_par(ii+2,jw,iw) ) THEN |
---|
7402 | ! |
---|
7403 | !-- wall zone |
---|
7404 | IF ( usm_par(ii+3,jw,iw) == 0 ) THEN |
---|
7405 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface |
---|
7406 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7407 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7408 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7409 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7410 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7411 | ELSE |
---|
7412 | surf_usm_v(l)%surface_types(m) = usm_par(ii+3,jw,iw) |
---|
7413 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+2,jw,iw) |
---|
7414 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+3,jw,iw) |
---|
7415 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+3,jw,iw) |
---|
7416 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+3,jw,iw) |
---|
7417 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7418 | ENDIF |
---|
7419 | ELSE IF ( kw <= usm_par(ii+4,jw,iw) ) THEN |
---|
7420 | ! |
---|
7421 | !-- roof zone |
---|
7422 | IF ( usm_par(ii+5,jw,iw) == 0 ) THEN |
---|
7423 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for roof surface |
---|
7424 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7425 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7426 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7427 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7428 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7429 | ELSE |
---|
7430 | surf_usm_v(l)%surface_types(m) = usm_par(ii+5,jw,iw) |
---|
7431 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+4,jw,iw) |
---|
7432 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+5,jw,iw) |
---|
7433 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+5,jw,iw) |
---|
7434 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+5,jw,iw) |
---|
7435 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7436 | ENDIF |
---|
7437 | ELSE |
---|
7438 | WRITE(9,*) 'Problem reading USM data:' |
---|
7439 | WRITE(9,*) l,i,j,kw,get_topography_top_index_ji( j, i, 's' ) |
---|
7440 | WRITE(9,*) ii,iw,jw,kw,get_topography_top_index_ji( jw, iw, 's' ) |
---|
7441 | WRITE(9,*) usm_par(ii,jw,iw),usm_par(ii+1,jw,iw) |
---|
7442 | WRITE(9,*) usm_par(ii+2,jw,iw),usm_par(ii+3,jw,iw) |
---|
7443 | WRITE(9,*) usm_par(ii+4,jw,iw),usm_par(ii+5,jw,iw) |
---|
7444 | WRITE(9,*) kw,roof_height_limit,wall_category,roof_category |
---|
7445 | FLUSH(9) |
---|
7446 | ! |
---|
7447 | !-- supply the default category |
---|
7448 | IF ( kw <= roof_height_limit ) THEN |
---|
7449 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
7450 | ELSE |
---|
7451 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
7452 | END IF |
---|
7453 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7454 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7455 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7456 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7457 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7458 | ENDIF |
---|
7459 | ! |
---|
7460 | !-- Find the type position |
---|
7461 | it = surf_usm_v(l)%surface_types(m) |
---|
7462 | ip = -99999 |
---|
7463 | DO k = 1, n_surface_types |
---|
7464 | IF ( surface_type_codes(k) == it ) THEN |
---|
7465 | ip = k |
---|
7466 | EXIT |
---|
7467 | ENDIF |
---|
7468 | ENDDO |
---|
7469 | IF ( ip == -99999 ) THEN |
---|
7470 | ! |
---|
7471 | !-- wall category not found |
---|
7472 | WRITE (9, "(A,I7,A,3I5)") 'wall category ', it, & |
---|
7473 | ' not found for i,j,k=', iw,jw,kw |
---|
7474 | FLUSH(9) |
---|
7475 | category = wall_category |
---|
7476 | DO k = 1, n_surface_types |
---|
7477 | IF ( surface_type_codes(k) == category ) THEN |
---|
7478 | ip = k |
---|
7479 | EXIT |
---|
7480 | ENDIF |
---|
7481 | ENDDO |
---|
7482 | IF ( ip == -99999 ) THEN |
---|
7483 | ! |
---|
7484 | !-- default wall category not found |
---|
7485 | WRITE (9, "(A,I5,A,3I5)") 'Default wall category', category, ' not found!' |
---|
7486 | FLUSH(9) |
---|
7487 | ip = 1 |
---|
7488 | ENDIF |
---|
7489 | ENDIF |
---|
7490 | |
---|
7491 | ! |
---|
7492 | !-- Albedo |
---|
7493 | IF ( surf_usm_v(l)%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
7494 | surf_usm_v(l)%albedo(:,m) = surface_params(ialbedo,ip) |
---|
7495 | ENDIF |
---|
7496 | !-- Albedo type is 0 (custom), others are replaced later |
---|
7497 | surf_usm_v(l)%albedo_type(:,m) = 0 |
---|
7498 | !-- Transmissivity of the windows |
---|
7499 | IF ( surf_usm_v(l)%transmissivity(m) < 0.0_wp ) THEN |
---|
7500 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7501 | ENDIF |
---|
7502 | ! |
---|
7503 | !-- emissivity of the wall |
---|
7504 | surf_usm_v(l)%emissivity(:,m) = surface_params(iemiss,ip) |
---|
7505 | ! |
---|
7506 | !-- heat conductivity lambda S between air and wall ( W m-2 K-1 ) |
---|
7507 | surf_usm_v(l)%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
7508 | surf_usm_v(l)%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
7509 | surf_usm_v(l)%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
7510 | ! |
---|
7511 | !-- roughness length |
---|
7512 | surf_usm_v(l)%z0(m) = surface_params(irough,ip) |
---|
7513 | surf_usm_v(l)%z0h(m) = surface_params(iroughh,ip) |
---|
7514 | surf_usm_v(l)%z0q(m) = surface_params(iroughh,ip) |
---|
7515 | ! |
---|
7516 | !-- Surface skin layer heat capacity (J m-2 K-1 ) |
---|
7517 | surf_usm_v(l)%c_surface(m) = surface_params(icsurf,ip) |
---|
7518 | surf_usm_v(l)%c_surface_window(m) = surface_params(icsurf,ip) |
---|
7519 | surf_usm_v(l)%c_surface_green(m) = surface_params(icsurf,ip) |
---|
7520 | ! |
---|
7521 | !-- wall material parameters: |
---|
7522 | !-- thickness of the wall (m) |
---|
7523 | !-- missing values are replaced by default value for category |
---|
7524 | IF ( surf_usm_v(l)%thickness_wall(m) <= 0.001_wp ) THEN |
---|
7525 | surf_usm_v(l)%thickness_wall(m) = surface_params(ithick,ip) |
---|
7526 | ENDIF |
---|
7527 | IF ( surf_usm_v(l)%thickness_window(m) <= 0.001_wp ) THEN |
---|
7528 | surf_usm_v(l)%thickness_window(m) = surface_params(ithick,ip) |
---|
7529 | ENDIF |
---|
7530 | IF ( surf_usm_v(l)%thickness_green(m) <= 0.001_wp ) THEN |
---|
7531 | surf_usm_v(l)%thickness_green(m) = surface_params(ithick,ip) |
---|
7532 | ENDIF |
---|
7533 | ! |
---|
7534 | !-- volumetric heat capacity rho*C of the wall ( J m-3 K-1 ) |
---|
7535 | surf_usm_v(l)%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
7536 | surf_usm_v(l)%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
7537 | surf_usm_v(l)%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
7538 | ! |
---|
7539 | !-- thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
7540 | surf_usm_v(l)%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
7541 | surf_usm_v(l)%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
7542 | surf_usm_v(l)%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
7543 | |
---|
7544 | ENDDO |
---|
7545 | ENDDO |
---|
7546 | |
---|
7547 | ! |
---|
7548 | !-- Initialize wall layer thicknesses. Please note, this will be removed |
---|
7549 | !-- after migration to Palm input data standard. |
---|
7550 | DO k = nzb_wall, nzt_wall |
---|
7551 | zwn(k) = zwn_default(k) |
---|
7552 | zwn_green(k) = zwn_default_green(k) |
---|
7553 | zwn_window(k) = zwn_default_window(k) |
---|
7554 | ENDDO |
---|
7555 | ! |
---|
7556 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
7557 | DO m = 1, surf_usm_h%ns |
---|
7558 | surf_usm_h%zw(:,m) = zwn(:) * surf_usm_h%thickness_wall(m) |
---|
7559 | surf_usm_h%zw_green(:,m) = zwn_green(:) * surf_usm_h%thickness_green(m) |
---|
7560 | surf_usm_h%zw_window(:,m) = zwn_window(:) * surf_usm_h%thickness_window(m) |
---|
7561 | ENDDO |
---|
7562 | DO l = 0, 3 |
---|
7563 | DO m = 1, surf_usm_v(l)%ns |
---|
7564 | surf_usm_v(l)%zw(:,m) = zwn(:) * surf_usm_v(l)%thickness_wall(m) |
---|
7565 | surf_usm_v(l)%zw_green(:,m) = zwn_green(:) * surf_usm_v(l)%thickness_green(m) |
---|
7566 | surf_usm_v(l)%zw_window(:,m) = zwn_window(:) * surf_usm_v(l)%thickness_window(m) |
---|
7567 | ENDDO |
---|
7568 | ENDDO |
---|
7569 | |
---|
7570 | |
---|
7571 | WRITE(9,*) 'Urban surfaces read' |
---|
7572 | FLUSH(9) |
---|
7573 | |
---|
7574 | CALL location_message( ' types and parameters of urban surfaces read', .TRUE. ) |
---|
7575 | |
---|
7576 | END SUBROUTINE usm_read_urban_surface_types |
---|
7577 | |
---|
7578 | |
---|
7579 | !------------------------------------------------------------------------------! |
---|
7580 | ! Description: |
---|
7581 | ! ------------ |
---|
7582 | ! |
---|
7583 | !> This function advances through the list of local surfaces to find given |
---|
7584 | !> x, y, d, z coordinates |
---|
7585 | !------------------------------------------------------------------------------! |
---|
7586 | PURE FUNCTION find_surface( x, y, z, d ) result(isurfl) |
---|
7587 | |
---|
7588 | INTEGER(iwp), INTENT(in) :: x, y, z, d |
---|
7589 | INTEGER(iwp) :: isurfl |
---|
7590 | INTEGER(iwp) :: isx, isy, isz |
---|
7591 | |
---|
7592 | IF ( d == 0 ) THEN |
---|
7593 | DO isurfl = 1, surf_usm_h%ns |
---|
7594 | isx = surf_usm_h%i(isurfl) |
---|
7595 | isy = surf_usm_h%j(isurfl) |
---|
7596 | isz = surf_usm_h%k(isurfl) |
---|
7597 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
7598 | ENDDO |
---|
7599 | ELSE |
---|
7600 | DO isurfl = 1, surf_usm_v(d-1)%ns |
---|
7601 | isx = surf_usm_v(d-1)%i(isurfl) |
---|
7602 | isy = surf_usm_v(d-1)%j(isurfl) |
---|
7603 | isz = surf_usm_v(d-1)%k(isurfl) |
---|
7604 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
7605 | ENDDO |
---|
7606 | ENDIF |
---|
7607 | ! |
---|
7608 | !-- coordinate not found |
---|
7609 | isurfl = -1 |
---|
7610 | |
---|
7611 | END FUNCTION |
---|
7612 | |
---|
7613 | |
---|
7614 | !------------------------------------------------------------------------------! |
---|
7615 | ! Description: |
---|
7616 | ! ------------ |
---|
7617 | ! |
---|
7618 | !> This subroutine reads temperatures of respective material layers in walls, |
---|
7619 | !> roofs and ground from input files. Data in the input file must be in |
---|
7620 | !> standard order, i.e. horizontal surfaces first ordered by x, y and then |
---|
7621 | !> vertical surfaces ordered by x, y, direction, z |
---|
7622 | !------------------------------------------------------------------------------! |
---|
7623 | SUBROUTINE usm_read_wall_temperature |
---|
7624 | |
---|
7625 | INTEGER(iwp) :: i, j, k, d, ii, iline !> running indices |
---|
7626 | INTEGER(iwp) :: isurfl |
---|
7627 | REAL(wp) :: rtsurf |
---|
7628 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: rtwall |
---|
7629 | |
---|
7630 | |
---|
7631 | DO ii = 0, io_blocks-1 |
---|
7632 | IF ( ii == io_group ) THEN |
---|
7633 | ! |
---|
7634 | !-- open wall temperature file |
---|
7635 | OPEN( 152, file='WALL_TEMPERATURE'//coupling_char, action='read', & |
---|
7636 | status='old', form='formatted', err=15 ) |
---|
7637 | |
---|
7638 | isurfl = 0 |
---|
7639 | iline = 1 |
---|
7640 | DO |
---|
7641 | rtwall = -9999.0_wp !< for incomplete lines |
---|
7642 | READ( 152, *, err=13, end=14 ) i, j, k, d, rtsurf, rtwall |
---|
7643 | |
---|
7644 | IF ( nxl <= i .and. i <= nxr .and. & |
---|
7645 | nys <= j .and. j <= nyn) THEN !< local processor |
---|
7646 | !-- identify surface id |
---|
7647 | isurfl = find_surface( i, j, k, d ) |
---|
7648 | IF ( isurfl == -1 ) THEN |
---|
7649 | WRITE(message_string, '(a,4i5,a,i5,a)') 'Coordinates (xyzd) ', i, j, k, d, & |
---|
7650 | ' on line ', iline, & |
---|
7651 | ' in file WALL_TEMPERATURE are either not present or out of standard order of surfaces.' |
---|
7652 | CALL message( 'usm_read_wall_temperature', 'PA0521', 1, 2, 0, 6, 0 ) |
---|
7653 | ENDIF |
---|
7654 | ! |
---|
7655 | !-- assign temperatures |
---|
7656 | IF ( d == 0 ) THEN |
---|
7657 | t_surf_wall_h(isurfl) = rtsurf |
---|
7658 | t_wall_h(:,isurfl) = rtwall(:) |
---|
7659 | t_window_h(:,isurfl) = rtwall(:) |
---|
7660 | t_green_h(:,isurfl) = rtwall(:) |
---|
7661 | ELSE |
---|
7662 | t_surf_wall_v(d-1)%t(isurfl) = rtsurf |
---|
7663 | t_wall_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
7664 | t_window_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
7665 | t_green_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
7666 | ENDIF |
---|
7667 | ENDIF |
---|
7668 | |
---|
7669 | iline = iline + 1 |
---|
7670 | CYCLE |
---|
7671 | 13 WRITE(message_string, '(a,i5,a)') 'Error reading line ', iline, & |
---|
7672 | ' in file WALL_TEMPERATURE.' |
---|
7673 | CALL message( 'usm_read_wall_temperature', 'PA0522', 1, 2, 0, 6, 0 ) |
---|
7674 | ENDDO |
---|
7675 | 14 CLOSE(152) |
---|
7676 | CYCLE |
---|
7677 | 15 message_string = 'file WALL_TEMPERATURE'//TRIM(coupling_char)//' does not exist' |
---|
7678 | CALL message( 'usm_read_wall_temperature', 'PA0523', 1, 2, 0, 6, 0 ) |
---|
7679 | ENDIF |
---|
7680 | #if defined( __parallel ) |
---|
7681 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7682 | #endif |
---|
7683 | ENDDO |
---|
7684 | |
---|
7685 | CALL location_message( ' wall layer temperatures read', .TRUE. ) |
---|
7686 | |
---|
7687 | END SUBROUTINE usm_read_wall_temperature |
---|
7688 | |
---|
7689 | |
---|
7690 | |
---|
7691 | !------------------------------------------------------------------------------! |
---|
7692 | ! Description: |
---|
7693 | ! ------------ |
---|
7694 | !> Solver for the energy balance at the ground/roof/wall surface. |
---|
7695 | !> It follows basic ideas and structure of lsm_energy_balance |
---|
7696 | !> with many simplifications and adjustments. |
---|
7697 | !> TODO better description |
---|
7698 | !> No calculation of window surface temperatures during spinup to increase |
---|
7699 | !> maximum possible timstep |
---|
7700 | !------------------------------------------------------------------------------! |
---|
7701 | SUBROUTINE usm_surface_energy_balance( spinup ) |
---|
7702 | |
---|
7703 | |
---|
7704 | IMPLICIT NONE |
---|
7705 | |
---|
7706 | INTEGER(iwp) :: i, j, k, l, m !< running indices |
---|
7707 | |
---|
7708 | INTEGER(iwp) :: i_off !< offset to determine index of surface element, seen from atmospheric grid point, for x |
---|
7709 | INTEGER(iwp) :: j_off !< offset to determine index of surface element, seen from atmospheric grid point, for y |
---|
7710 | INTEGER(iwp) :: k_off !< offset to determine index of surface element, seen from atmospheric grid point, for z |
---|
7711 | |
---|
7712 | LOGICAL :: spinup !true during spinup |
---|
7713 | |
---|
7714 | REAL(wp) :: stend_wall !< surface tendency |
---|
7715 | |
---|
7716 | REAL(wp) :: stend_window !< surface tendency |
---|
7717 | REAL(wp) :: stend_green !< surface tendency |
---|
7718 | REAL(wp) :: coef_1 !< first coeficient for prognostic equation |
---|
7719 | REAL(wp) :: coef_window_1 !< first coeficient for prognostic window equation |
---|
7720 | REAL(wp) :: coef_green_1 !< first coeficient for prognostic green wall equation |
---|
7721 | REAL(wp) :: coef_2 !< second coeficient for prognostic equation |
---|
7722 | REAL(wp) :: coef_window_2 !< second coeficient for prognostic window equation |
---|
7723 | REAL(wp) :: coef_green_2 !< second coeficient for prognostic green wall equation |
---|
7724 | REAL(wp) :: rho_cp !< rho_wall_surface * c_p |
---|
7725 | REAL(wp) :: f_shf !< factor for shf_eb |
---|
7726 | REAL(wp) :: f_shf_window !< factor for shf_eb window |
---|
7727 | REAL(wp) :: f_shf_green !< factor for shf_eb green wall |
---|
7728 | REAL(wp) :: lambda_surface !< current value of lambda_surface (heat conductivity |
---|
7729 | !<between air and wall) |
---|
7730 | REAL(wp) :: lambda_surface_window !< current value of lambda_surface (heat conductivity |
---|
7731 | !< between air and window) |
---|
7732 | REAL(wp) :: lambda_surface_green !< current value of lambda_surface (heat conductivity |
---|
7733 | !< between air and greeb wall) |
---|
7734 | |
---|
7735 | REAL(wp) :: dtime !< simulated time of day (in UTC) |
---|
7736 | INTEGER(iwp) :: dhour !< simulated hour of day (in UTC) |
---|
7737 | REAL(wp) :: acoef !< actual coefficient of diurnal profile of anthropogenic heat |
---|
7738 | REAL(wp) :: f1, & !< resistance correction term 1 |
---|
7739 | f2, & !< resistance correction term 2 |
---|
7740 | f3, & !< resistance correction term 3 |
---|
7741 | e, & !< water vapour pressure |
---|
7742 | e_s, & !< water vapour saturation pressure |
---|
7743 | e_s_dt, & !< derivate of e_s with respect to T |
---|
7744 | tend, & !< tendency |
---|
7745 | dq_s_dt, & !< derivate of q_s with respect to T |
---|
7746 | f_qsws, & !< factor for qsws |
---|
7747 | f_qsws_veg, & !< factor for qsws_veg |
---|
7748 | f_qsws_liq, & !< factor for qsws_liq |
---|
7749 | m_liq_max, & !< maxmimum value of the liq. water reservoir |
---|
7750 | qv1, & !< specific humidity at first grid level |
---|
7751 | m_max_depth = 0.0002_wp, & !< Maximum capacity of the water reservoir (m) |
---|
7752 | rho_lv, & !< frequently used parameter for green layers |
---|
7753 | drho_l_lv, & !< frequently used parameter for green layers |
---|
7754 | q_s !< saturation specific humidity |
---|
7755 | |
---|
7756 | ! |
---|
7757 | !-- Index offset of surface element point with respect to adjoining |
---|
7758 | !-- atmospheric grid point |
---|
7759 | k_off = surf_usm_h%koff |
---|
7760 | j_off = surf_usm_h%joff |
---|
7761 | i_off = surf_usm_h%ioff |
---|
7762 | |
---|
7763 | ! |
---|
7764 | !-- First, treat horizontal surface elements |
---|
7765 | !$OMP PARALLEL PRIVATE (m, i, j, k, lambda_surface, lambda_surface_window, & |
---|
7766 | !$OMP& lambda_surface_green, qv1, rho_cp, rho_lv, drho_l_lv, f_shf, & |
---|
7767 | !$OMP& f_shf_window, f_shf_green, m_total, f1, f2, e_s, e, f3, f_qsws_veg,& |
---|
7768 | !$OMP& q_s, f_qsws_liq, f_qsws, e_s_dt, dq_s_dt, coef_1, coef_window_1, & |
---|
7769 | !$OMP& coef_green_1, coef_2, coef_window_2, coef_green_2, stend_wall, & |
---|
7770 | !$OMP& stend_window, stend_green, tend, m_liq_max) |
---|
7771 | !$OMP DO SCHEDULE (STATIC) |
---|
7772 | DO m = 1, surf_usm_h%ns |
---|
7773 | ! |
---|
7774 | !-- Get indices of respective grid point |
---|
7775 | i = surf_usm_h%i(m) |
---|
7776 | j = surf_usm_h%j(m) |
---|
7777 | k = surf_usm_h%k(m) |
---|
7778 | ! |
---|
7779 | !-- TODO - how to calculate lambda_surface for horizontal surfaces |
---|
7780 | !-- (lambda_surface is set according to stratification in land surface model) |
---|
7781 | !-- MS: ??? |
---|
7782 | IF ( surf_usm_h%ol(m) >= 0.0_wp ) THEN |
---|
7783 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
7784 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
7785 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
7786 | ELSE |
---|
7787 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
7788 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
7789 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
7790 | ENDIF |
---|
7791 | |
---|
7792 | ! pt1 = pt(k,j,i) |
---|
7793 | IF ( humidity ) THEN |
---|
7794 | qv1 = q(k,j,i) |
---|
7795 | ELSE |
---|
7796 | qv1 = 0.0_wp |
---|
7797 | ENDIF |
---|
7798 | ! |
---|
7799 | !-- calculate rho * c_p coefficient at surface layer |
---|
7800 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_h%pt1(m) * exner(k) ) |
---|
7801 | |
---|
7802 | IF ( surf_usm_h%frac(ind_pav_green,m) > 0.0_wp ) THEN |
---|
7803 | ! |
---|
7804 | !-- Calculate frequently used parameters |
---|
7805 | rho_lv = rho_cp / c_p * l_v |
---|
7806 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
7807 | ENDIF |
---|
7808 | |
---|
7809 | ! |
---|
7810 | !-- Calculate aerodyamic resistance. |
---|
7811 | !-- Calculation for horizontal surfaces follows LSM formulation |
---|
7812 | !-- pt, us, ts are not available for the prognostic time step, |
---|
7813 | !-- data from the last time step is used here. |
---|
7814 | ! |
---|
7815 | !-- Workaround: use single r_a as stability is only treated for the |
---|
7816 | !-- average temperature |
---|
7817 | surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /& |
---|
7818 | ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7819 | surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m) |
---|
7820 | surf_usm_h%r_a_green(m) = surf_usm_h%r_a(m) |
---|
7821 | |
---|
7822 | ! r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exner(k) ) / & |
---|
7823 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7824 | ! r_a_window = ( surf_usm_h%pt1(m) - t_surf_window_h(m) / exner(k) ) / & |
---|
7825 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7826 | ! r_a_green = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
7827 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7828 | |
---|
7829 | !-- Make sure that the resistance does not drop to zero |
---|
7830 | IF ( surf_usm_h%r_a(m) < 1.0_wp ) & |
---|
7831 | surf_usm_h%r_a(m) = 1.0_wp |
---|
7832 | IF ( surf_usm_h%r_a_green(m) < 1.0_wp ) & |
---|
7833 | surf_usm_h%r_a_green(m) = 1.0_wp |
---|
7834 | IF ( surf_usm_h%r_a_window(m) < 1.0_wp ) & |
---|
7835 | surf_usm_h%r_a_window(m) = 1.0_wp |
---|
7836 | |
---|
7837 | ! |
---|
7838 | !-- Make sure that the resistacne does not exceed a maxmium value in case |
---|
7839 | !-- of zero velocities |
---|
7840 | IF ( surf_usm_h%r_a(m) > 300.0_wp ) & |
---|
7841 | surf_usm_h%r_a(m) = 300.0_wp |
---|
7842 | IF ( surf_usm_h%r_a_green(m) > 300.0_wp ) & |
---|
7843 | surf_usm_h%r_a_green(m) = 300.0_wp |
---|
7844 | IF ( surf_usm_h%r_a_window(m) > 300.0_wp ) & |
---|
7845 | surf_usm_h%r_a_window(m) = 300.0_wp |
---|
7846 | |
---|
7847 | ! |
---|
7848 | !-- factor for shf_eb |
---|
7849 | f_shf = rho_cp / surf_usm_h%r_a(m) |
---|
7850 | f_shf_window = rho_cp / surf_usm_h%r_a_window(m) |
---|
7851 | f_shf_green = rho_cp / surf_usm_h%r_a_green(m) |
---|
7852 | |
---|
7853 | |
---|
7854 | IF ( surf_usm_h%frac(ind_pav_green,m) > 0.0_wp ) THEN |
---|
7855 | !-- Adapted from LSM: |
---|
7856 | !-- Second step: calculate canopy resistance r_canopy |
---|
7857 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
7858 | |
---|
7859 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
7860 | !-- night) |
---|
7861 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_h%rad_sw_in(m) + 0.05_wp ) / & |
---|
7862 | (0.81_wp * (0.004_wp * surf_usm_h%rad_sw_in(m) & |
---|
7863 | + 1.0_wp)) ) |
---|
7864 | ! |
---|
7865 | !-- f2: correction for soil moisture availability to plants (the |
---|
7866 | !-- integrated soil moisture must thus be considered here) |
---|
7867 | !-- f2 = 0 for very dry soils |
---|
7868 | m_total = 0.0_wp |
---|
7869 | DO k = nzb_wall, nzt_wall+1 |
---|
7870 | m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
7871 | * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
7872 | ENDDO |
---|
7873 | |
---|
7874 | IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
7875 | f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
7876 | ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
7877 | f2 = 1.0_wp |
---|
7878 | ELSE |
---|
7879 | f2 = 1.0E-20_wp |
---|
7880 | ENDIF |
---|
7881 | |
---|
7882 | ! |
---|
7883 | !-- Calculate water vapour pressure at saturation |
---|
7884 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_h(m) & |
---|
7885 | - 273.16_wp ) / ( t_surf_green_h(m) - 35.86_wp ) ) |
---|
7886 | ! |
---|
7887 | !-- f3: correction for vapour pressure deficit |
---|
7888 | IF ( surf_usm_h%g_d(m) /= 0.0_wp ) THEN |
---|
7889 | ! |
---|
7890 | !-- Calculate vapour pressure |
---|
7891 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
7892 | f3 = EXP ( - surf_usm_h%g_d(m) * (e_s - e) ) |
---|
7893 | ELSE |
---|
7894 | f3 = 1.0_wp |
---|
7895 | ENDIF |
---|
7896 | |
---|
7897 | ! |
---|
7898 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
7899 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
7900 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
7901 | surf_usm_h%r_canopy(m) = surf_usm_h%r_canopy_min(m) / & |
---|
7902 | ( surf_usm_h%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
7903 | |
---|
7904 | ! |
---|
7905 | !-- Calculate the maximum possible liquid water amount on plants and |
---|
7906 | !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
7907 | !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
7908 | !-- liquid water fraction for paved surfaces is calculated after |
---|
7909 | !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
7910 | !-- vegetated surfaces and bare soils. |
---|
7911 | m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
7912 | surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
7913 | ! |
---|
7914 | !-- Calculate saturation specific humidity |
---|
7915 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
7916 | ! |
---|
7917 | !-- In case of dewfall, set evapotranspiration to zero |
---|
7918 | !-- All super-saturated water is then removed from the air |
---|
7919 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
7920 | surf_usm_h%r_canopy(m) = 0.0_wp |
---|
7921 | ENDIF |
---|
7922 | |
---|
7923 | ! |
---|
7924 | !-- Calculate coefficients for the total evapotranspiration |
---|
7925 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
7926 | !-- For pavements, only evaporation of liquid water is possible. |
---|
7927 | f_qsws_veg = rho_lv * & |
---|
7928 | ( 1.0_wp - surf_usm_h%c_liq(m) ) / & |
---|
7929 | ( surf_usm_h%r_a_green(m) + surf_usm_h%r_canopy(m) ) |
---|
7930 | f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
7931 | surf_usm_h%r_a_green(m) |
---|
7932 | |
---|
7933 | f_qsws = f_qsws_veg + f_qsws_liq |
---|
7934 | ! |
---|
7935 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
7936 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_h(m) - 35.86_wp) - & |
---|
7937 | 17.269_wp*( t_surf_green_h(m) - 273.16_wp) & |
---|
7938 | / ( t_surf_green_h(m) - 35.86_wp)**2 ) |
---|
7939 | |
---|
7940 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
7941 | ENDIF |
---|
7942 | ! |
---|
7943 | !-- add LW up so that it can be removed in prognostic equation |
---|
7944 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_sw_in(m) - & |
---|
7945 | surf_usm_h%rad_sw_out(m) + & |
---|
7946 | surf_usm_h%rad_lw_in(m) - & |
---|
7947 | surf_usm_h%rad_lw_out(m) |
---|
7948 | ! |
---|
7949 | !-- numerator of the prognostic equation |
---|
7950 | !-- Todo: Adjust to tile approach. So far, emissivity for wall (element 0) |
---|
7951 | !-- is used |
---|
7952 | coef_1 = surf_usm_h%rad_net_l(m) + & |
---|
7953 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
7954 | sigma_sb * t_surf_wall_h(m) ** 4 + & |
---|
7955 | f_shf * surf_usm_h%pt1(m) + & |
---|
7956 | lambda_surface * t_wall_h(nzb_wall,m) |
---|
7957 | IF ( ( .NOT. spinup ) .AND. (surf_usm_h%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
7958 | coef_window_1 = surf_usm_h%rad_net_l(m) + & |
---|
7959 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_wat_win,m) & |
---|
7960 | * sigma_sb * t_surf_window_h(m) ** 4 + & |
---|
7961 | f_shf_window * surf_usm_h%pt1(m) + & |
---|
7962 | lambda_surface_window * t_window_h(nzb_wall,m) |
---|
7963 | ENDIF |
---|
7964 | IF ( ( humidity ) .AND. ( surf_usm_h%frac(ind_pav_green,m) > 0.0_wp ) ) THEN |
---|
7965 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
7966 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
7967 | t_surf_green_h(m) ** 4 + & |
---|
7968 | f_shf_green * surf_usm_h%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
7969 | + dq_s_dt * t_surf_green_h(m) ) & |
---|
7970 | +lambda_surface_green * t_green_h(nzb_wall,m) |
---|
7971 | ELSE |
---|
7972 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
7973 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) *& |
---|
7974 | sigma_sb * t_surf_green_h(m) ** 4 + & |
---|
7975 | f_shf_green * surf_usm_h%pt1(m) + & |
---|
7976 | lambda_surface_green * t_green_h(nzb_wall,m) |
---|
7977 | ENDIF |
---|
7978 | ! |
---|
7979 | !-- denominator of the prognostic equation |
---|
7980 | coef_2 = 4.0_wp * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
7981 | sigma_sb * t_surf_wall_h(m) ** 3 & |
---|
7982 | + lambda_surface + f_shf / exner(k) |
---|
7983 | IF ( ( .NOT. spinup ) .AND. ( surf_usm_h%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
7984 | coef_window_2 = 4.0_wp * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
7985 | sigma_sb * t_surf_window_h(m) ** 3 & |
---|
7986 | + lambda_surface_window + f_shf_window / exner(k) |
---|
7987 | ENDIF |
---|
7988 | IF ( ( humidity ) .AND. ( surf_usm_h%frac(ind_pav_green,m) > 0.0_wp ) ) THEN |
---|
7989 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
7990 | t_surf_green_h(m) ** 3 + f_qsws * dq_s_dt & |
---|
7991 | + lambda_surface_green + f_shf_green / exner(k) |
---|
7992 | ELSE |
---|
7993 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
7994 | t_surf_green_h(m) ** 3 & |
---|
7995 | + lambda_surface_green + f_shf_green / exner(k) |
---|
7996 | ENDIF |
---|
7997 | ! |
---|
7998 | !-- implicit solution when the surface layer has no heat capacity, |
---|
7999 | !-- otherwise use RK3 scheme. |
---|
8000 | t_surf_wall_h_p(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
8001 | surf_usm_h%c_surface(m) * t_surf_wall_h(m) ) / & |
---|
8002 | ( surf_usm_h%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
8003 | IF ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m) > 0.0_wp)) THEN |
---|
8004 | t_surf_window_h_p(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
8005 | surf_usm_h%c_surface_window(m) * t_surf_window_h(m) ) / & |
---|
8006 | ( surf_usm_h%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
8007 | ENDIF |
---|
8008 | t_surf_green_h_p(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
8009 | surf_usm_h%c_surface_green(m) * t_surf_green_h(m) ) / & |
---|
8010 | ( surf_usm_h%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
8011 | ! |
---|
8012 | !-- add RK3 term |
---|
8013 | t_surf_wall_h_p(m) = t_surf_wall_h_p(m) + dt_3d * tsc(3) * & |
---|
8014 | surf_usm_h%tt_surface_wall_m(m) |
---|
8015 | |
---|
8016 | t_surf_window_h_p(m) = t_surf_window_h_p(m) + dt_3d * tsc(3) * & |
---|
8017 | surf_usm_h%tt_surface_window_m(m) |
---|
8018 | |
---|
8019 | t_surf_green_h_p(m) = t_surf_green_h_p(m) + dt_3d * tsc(3) * & |
---|
8020 | surf_usm_h%tt_surface_green_m(m) |
---|
8021 | ! |
---|
8022 | !-- Store surface temperature on pt_surface. Further, in case humidity is used |
---|
8023 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
8024 | !-- assumed to be the surface temperature. |
---|
8025 | surf_usm_h%pt_surface(m) = ( surf_usm_h%frac(ind_veg_wall,m) * t_surf_wall_h_p(m) & |
---|
8026 | + surf_usm_h%frac(ind_wat_win,m) * t_surf_window_h_p(m) & |
---|
8027 | + surf_usm_h%frac(ind_pav_green,m) * t_surf_green_h_p(m) ) & |
---|
8028 | / exner(k) |
---|
8029 | |
---|
8030 | IF ( humidity ) surf_usm_h%vpt_surface(m) = & |
---|
8031 | surf_usm_h%pt_surface(m) |
---|
8032 | ! |
---|
8033 | !-- calculate true tendency |
---|
8034 | stend_wall = ( t_surf_wall_h_p(m) - t_surf_wall_h(m) - dt_3d * tsc(3) * & |
---|
8035 | surf_usm_h%tt_surface_wall_m(m)) / ( dt_3d * tsc(2) ) |
---|
8036 | stend_window = ( t_surf_window_h_p(m) - t_surf_window_h(m) - dt_3d * tsc(3) * & |
---|
8037 | surf_usm_h%tt_surface_window_m(m)) / ( dt_3d * tsc(2) ) |
---|
8038 | stend_green = ( t_surf_green_h_p(m) - t_surf_green_h(m) - dt_3d * tsc(3) * & |
---|
8039 | surf_usm_h%tt_surface_green_m(m)) / ( dt_3d * tsc(2) ) |
---|
8040 | ! |
---|
8041 | !-- calculate t_surf tendencies for the next Runge-Kutta step |
---|
8042 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
8043 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
8044 | surf_usm_h%tt_surface_wall_m(m) = stend_wall |
---|
8045 | surf_usm_h%tt_surface_window_m(m) = stend_window |
---|
8046 | surf_usm_h%tt_surface_green_m(m) = stend_green |
---|
8047 | ELSEIF ( intermediate_timestep_count < & |
---|
8048 | intermediate_timestep_count_max ) THEN |
---|
8049 | surf_usm_h%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
8050 | 5.3125_wp * surf_usm_h%tt_surface_wall_m(m) |
---|
8051 | surf_usm_h%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
8052 | 5.3125_wp * surf_usm_h%tt_surface_window_m(m) |
---|
8053 | surf_usm_h%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
8054 | 5.3125_wp * surf_usm_h%tt_surface_green_m(m) |
---|
8055 | ENDIF |
---|
8056 | ENDIF |
---|
8057 | ! |
---|
8058 | !-- in case of fast changes in the skin temperature, it is required to |
---|
8059 | !-- update the radiative fluxes in order to keep the solution stable |
---|
8060 | IF ( ( ( ABS( t_surf_wall_h_p(m) - t_surf_wall_h(m) ) > 1.0_wp ) .OR. & |
---|
8061 | ( ABS( t_surf_green_h_p(m) - t_surf_green_h(m) ) > 1.0_wp ) .OR. & |
---|
8062 | ( ABS( t_surf_window_h_p(m) - t_surf_window_h(m) ) > 1.0_wp ) ) & |
---|
8063 | .AND. unscheduled_radiation_calls ) THEN |
---|
8064 | force_radiation_call_l = .TRUE. |
---|
8065 | ENDIF |
---|
8066 | ! |
---|
8067 | !-- calculate fluxes |
---|
8068 | !-- rad_net_l is never used! |
---|
8069 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_net_l(m) + & |
---|
8070 | surf_usm_h%frac(ind_veg_wall,m) * & |
---|
8071 | sigma_sb * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
8072 | ( t_surf_wall_h_p(m)**4 - t_surf_wall_h(m)**4 ) & |
---|
8073 | + surf_usm_h%frac(ind_wat_win,m) * & |
---|
8074 | sigma_sb * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
8075 | ( t_surf_window_h_p(m)**4 - t_surf_window_h(m)**4 ) & |
---|
8076 | + surf_usm_h%frac(ind_pav_green,m) * & |
---|
8077 | sigma_sb * surf_usm_h%emissivity(ind_pav_green,m) * & |
---|
8078 | ( t_surf_green_h_p(m)**4 - t_surf_green_h(m)**4 ) |
---|
8079 | |
---|
8080 | surf_usm_h%wghf_eb(m) = lambda_surface * & |
---|
8081 | ( t_surf_wall_h_p(m) - t_wall_h(nzb_wall,m) ) |
---|
8082 | surf_usm_h%wghf_eb_green(m) = lambda_surface_green * & |
---|
8083 | ( t_surf_green_h_p(m) - t_green_h(nzb_wall,m) ) |
---|
8084 | surf_usm_h%wghf_eb_window(m) = lambda_surface_window * & |
---|
8085 | ( t_surf_window_h_p(m) - t_window_h(nzb_wall,m) ) |
---|
8086 | |
---|
8087 | ! |
---|
8088 | !-- ground/wall/roof surface heat flux |
---|
8089 | surf_usm_h%wshf_eb(m) = - f_shf * ( surf_usm_h%pt1(m) - t_surf_wall_h_p(m) / exner(k) ) * & |
---|
8090 | surf_usm_h%frac(ind_veg_wall,m) & |
---|
8091 | - f_shf_window * ( surf_usm_h%pt1(m) - t_surf_window_h_p(m) / exner(k) ) * & |
---|
8092 | surf_usm_h%frac(ind_wat_win,m) & |
---|
8093 | - f_shf_green * ( surf_usm_h%pt1(m) - t_surf_green_h_p(m) / exner(k) ) * & |
---|
8094 | surf_usm_h%frac(ind_pav_green,m) |
---|
8095 | ! |
---|
8096 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
8097 | !-- diffusion_s, surface_layer_fluxes,... |
---|
8098 | surf_usm_h%shf(m) = surf_usm_h%wshf_eb(m) / c_p |
---|
8099 | ! |
---|
8100 | !-- If the indoor model is applied, further add waste heat from buildings to the |
---|
8101 | !-- kinematic flux. |
---|
8102 | IF ( indoor_model ) THEN |
---|
8103 | surf_usm_h%shf(m) = surf_usm_h%shf(m) + surf_usm_h%waste_heat(m) / c_p |
---|
8104 | ENDIF |
---|
8105 | |
---|
8106 | |
---|
8107 | IF (surf_usm_h%frac(ind_pav_green,m) > 0.0_wp) THEN |
---|
8108 | |
---|
8109 | IF ( humidity ) THEN |
---|
8110 | surf_usm_h%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
8111 | * t_surf_green_h(m) - dq_s_dt * & |
---|
8112 | t_surf_green_h_p(m) ) |
---|
8113 | |
---|
8114 | surf_usm_h%qsws(m) = surf_usm_h%qsws_eb(m) / rho_lv |
---|
8115 | |
---|
8116 | surf_usm_h%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
8117 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
8118 | * t_surf_green_h_p(m) ) |
---|
8119 | |
---|
8120 | surf_usm_h%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
8121 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
8122 | * t_surf_green_h_p(m) ) |
---|
8123 | ENDIF |
---|
8124 | |
---|
8125 | ! |
---|
8126 | !-- Calculate the true surface resistance |
---|
8127 | IF ( .NOT. humidity ) THEN |
---|
8128 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
8129 | ELSE |
---|
8130 | surf_usm_h%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
8131 | * t_surf_green_h(m) - dq_s_dt * & |
---|
8132 | t_surf_green_h_p(m) ) / & |
---|
8133 | (surf_usm_h%qsws(m) + 1.0E-20) - surf_usm_h%r_a_green(m) |
---|
8134 | ENDIF |
---|
8135 | |
---|
8136 | ! |
---|
8137 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
8138 | !-- evaporation of liquid water |
---|
8139 | IF ( humidity ) THEN |
---|
8140 | ! |
---|
8141 | !-- If precipitation is activated, add rain water to qsws_liq |
---|
8142 | !-- and qsws_soil according the the vegetation coverage. |
---|
8143 | !-- precipitation_rate is given in mm. |
---|
8144 | IF ( precipitation ) THEN |
---|
8145 | |
---|
8146 | ! |
---|
8147 | !-- Add precipitation to liquid water reservoir, if possible. |
---|
8148 | !-- Otherwise, add the water to soil. In case of |
---|
8149 | !-- pavements, the exceeding water amount is implicitely removed |
---|
8150 | !-- as runoff as qsws_soil is then not used in the soil model |
---|
8151 | IF ( m_liq_usm_h%var_usm_1d(m) /= m_liq_max ) THEN |
---|
8152 | surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) & |
---|
8153 | + surf_usm_h%frac(ind_pav_green,m) * prr(k+k_off,j+j_off,i+i_off)& |
---|
8154 | * hyrho(k+k_off) & |
---|
8155 | * 0.001_wp * rho_l * l_v |
---|
8156 | ENDIF |
---|
8157 | |
---|
8158 | ENDIF |
---|
8159 | |
---|
8160 | ! |
---|
8161 | !-- If the air is saturated, check the reservoir water level |
---|
8162 | IF ( surf_usm_h%qsws(m) < 0.0_wp ) THEN |
---|
8163 | ! |
---|
8164 | !-- Check if reservoir is full (avoid values > m_liq_max) |
---|
8165 | !-- In that case, qsws_liq goes to qsws_soil. In this |
---|
8166 | !-- case qsws_veg is zero anyway (because c_liq = 1), |
---|
8167 | !-- so that tend is zero and no further check is needed |
---|
8168 | IF ( m_liq_usm_h%var_usm_1d(m) == m_liq_max ) THEN |
---|
8169 | ! surf_usm_h%qsws_soil(m) = surf_usm_h%qsws_soil(m) + surf_usm_h%qsws_liq(m) |
---|
8170 | surf_usm_h%qsws_liq(m) = 0.0_wp |
---|
8171 | ENDIF |
---|
8172 | |
---|
8173 | ! |
---|
8174 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
8175 | !-- let the water enter the liquid water reservoir as dew on the |
---|
8176 | !-- plant |
---|
8177 | IF ( surf_usm_h%qsws_veg(m) < 0.0_wp ) THEN |
---|
8178 | surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) + surf_usm_h%qsws_veg(m) |
---|
8179 | surf_usm_h%qsws_veg(m) = 0.0_wp |
---|
8180 | ENDIF |
---|
8181 | ENDIF |
---|
8182 | |
---|
8183 | surf_usm_h%qsws(m) = surf_usm_h%qsws(m) / l_v |
---|
8184 | |
---|
8185 | tend = - surf_usm_h%qsws_liq(m) * drho_l_lv |
---|
8186 | m_liq_usm_h_p%var_usm_1d(m) = m_liq_usm_h%var_usm_1d(m) + dt_3d * & |
---|
8187 | ( tsc(2) * tend + & |
---|
8188 | tsc(3) * tm_liq_usm_h_m%var_usm_1d(m) ) |
---|
8189 | ! |
---|
8190 | !-- Check if reservoir is overfull -> reduce to maximum |
---|
8191 | !-- (conservation of water is violated here) |
---|
8192 | m_liq_usm_h_p%var_usm_1d(m) = MIN( m_liq_usm_h_p%var_usm_1d(m),m_liq_max ) |
---|
8193 | |
---|
8194 | ! |
---|
8195 | !-- Check if reservoir is empty (avoid values < 0.0) |
---|
8196 | !-- (conservation of water is violated here) |
---|
8197 | m_liq_usm_h_p%var_usm_1d(m) = MAX( m_liq_usm_h_p%var_usm_1d(m), 0.0_wp ) |
---|
8198 | ! |
---|
8199 | !-- Calculate m_liq tendencies for the next Runge-Kutta step |
---|
8200 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
8201 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
8202 | tm_liq_usm_h_m%var_usm_1d(m) = tend |
---|
8203 | ELSEIF ( intermediate_timestep_count < & |
---|
8204 | intermediate_timestep_count_max ) THEN |
---|
8205 | tm_liq_usm_h_m%var_usm_1d(m) = -9.5625_wp * tend + & |
---|
8206 | 5.3125_wp * tm_liq_usm_h_m%var_usm_1d(m) |
---|
8207 | ENDIF |
---|
8208 | ENDIF |
---|
8209 | |
---|
8210 | ENDIF |
---|
8211 | ELSE |
---|
8212 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
8213 | ENDIF |
---|
8214 | |
---|
8215 | ENDDO |
---|
8216 | ! |
---|
8217 | !-- Now, treat vertical surface elements |
---|
8218 | !$OMP DO SCHEDULE (STATIC) |
---|
8219 | DO l = 0, 3 |
---|
8220 | DO m = 1, surf_usm_v(l)%ns |
---|
8221 | ! |
---|
8222 | !-- Get indices of respective grid point |
---|
8223 | i = surf_usm_v(l)%i(m) |
---|
8224 | j = surf_usm_v(l)%j(m) |
---|
8225 | k = surf_usm_v(l)%k(m) |
---|
8226 | |
---|
8227 | ! |
---|
8228 | !-- TODO - how to calculate lambda_surface for horizontal (??? do you mean verical ???) surfaces |
---|
8229 | !-- (lambda_surface is set according to stratification in land surface model). |
---|
8230 | !-- Please note, for vertical surfaces no ol is defined, since |
---|
8231 | !-- stratification is not considered in this case. |
---|
8232 | lambda_surface = surf_usm_v(l)%lambda_surf(m) |
---|
8233 | lambda_surface_window = surf_usm_v(l)%lambda_surf_window(m) |
---|
8234 | lambda_surface_green = surf_usm_v(l)%lambda_surf_green(m) |
---|
8235 | |
---|
8236 | ! pt1 = pt(k,j,i) |
---|
8237 | IF ( humidity ) THEN |
---|
8238 | qv1 = q(k,j,i) |
---|
8239 | ELSE |
---|
8240 | qv1 = 0.0_wp |
---|
8241 | ENDIF |
---|
8242 | ! |
---|
8243 | !-- calculate rho * c_p coefficient at wall layer |
---|
8244 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_v(l)%pt1(m) * exner(k) ) |
---|
8245 | |
---|
8246 | IF (surf_usm_v(l)%frac(1,m) > 0.0_wp ) THEN |
---|
8247 | ! |
---|
8248 | !-- Calculate frequently used parameters |
---|
8249 | rho_lv = rho_cp / c_p * l_v |
---|
8250 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
8251 | ENDIF |
---|
8252 | |
---|
8253 | !-- Calculation of r_a for vertical surfaces |
---|
8254 | !-- |
---|
8255 | !-- heat transfer coefficient for forced convection along vertical walls |
---|
8256 | !-- follows formulation in TUF3d model (Krayenhoff & Voogt, 2006) |
---|
8257 | !-- |
---|
8258 | !-- H = httc (Tsfc - Tair) |
---|
8259 | !-- httc = rw * (11.8 + 4.2 * Ueff) - 4.0 |
---|
8260 | !-- |
---|
8261 | !-- rw: wall patch roughness relative to 1.0 for concrete |
---|
8262 | !-- Ueff: effective wind speed |
---|
8263 | !-- - 4.0 is a reduction of Rowley et al (1930) formulation based on |
---|
8264 | !-- Cole and Sturrock (1977) |
---|
8265 | !-- |
---|
8266 | !-- Ucan: Canyon wind speed |
---|
8267 | !-- wstar: convective velocity |
---|
8268 | !-- Qs: surface heat flux |
---|
8269 | !-- zH: height of the convective layer |
---|
8270 | !-- wstar = (g/Tcan*Qs*zH)**(1./3.) |
---|
8271 | !-- Effective velocity components must always |
---|
8272 | !-- be defined at scalar grid point. The wall normal component is |
---|
8273 | !-- obtained by simple linear interpolation. ( An alternative would |
---|
8274 | !-- be an logarithmic interpolation. ) |
---|
8275 | !-- Parameter roughness_concrete (default value = 0.001) is used |
---|
8276 | !-- to calculation of roughness relative to concrete |
---|
8277 | surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) / & |
---|
8278 | roughness_concrete * ( 11.8_wp + 4.2_wp * & |
---|
8279 | SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & |
---|
8280 | ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & |
---|
8281 | ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2, & |
---|
8282 | 0.01_wp ) ) & |
---|
8283 | ) - 4.0_wp ) |
---|
8284 | ! |
---|
8285 | !-- Limit aerodynamic resistance |
---|
8286 | IF ( surf_usm_v(l)%r_a(m) < 1.0_wp ) surf_usm_v(l)%r_a(m) = 1.0_wp |
---|
8287 | |
---|
8288 | |
---|
8289 | f_shf = rho_cp / surf_usm_v(l)%r_a(m) |
---|
8290 | f_shf_window = rho_cp / surf_usm_v(l)%r_a(m) |
---|
8291 | f_shf_green = rho_cp / surf_usm_v(l)%r_a(m) |
---|
8292 | |
---|
8293 | |
---|
8294 | IF ( surf_usm_v(l)%frac(1,m) > 0.0_wp ) THEN |
---|
8295 | ! |
---|
8296 | !-- Adapted from LSM: |
---|
8297 | !-- Second step: calculate canopy resistance r_canopy |
---|
8298 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
8299 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
8300 | !-- night) |
---|
8301 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_v(l)%rad_sw_in(m) + 0.05_wp ) / & |
---|
8302 | (0.81_wp * (0.004_wp * surf_usm_v(l)%rad_sw_in(m) & |
---|
8303 | + 1.0_wp)) ) |
---|
8304 | ! |
---|
8305 | !-- f2: correction for soil moisture availability to plants (the |
---|
8306 | !-- integrated soil moisture must thus be considered here) |
---|
8307 | !-- f2 = 0 for very dry soils |
---|
8308 | |
---|
8309 | f2=1.0_wp |
---|
8310 | |
---|
8311 | ! |
---|
8312 | !-- Calculate water vapour pressure at saturation |
---|
8313 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_v_p(l)%t(m) & |
---|
8314 | - 273.16_wp ) / ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) ) |
---|
8315 | ! |
---|
8316 | !-- f3: correction for vapour pressure deficit |
---|
8317 | IF ( surf_usm_v(l)%g_d(m) /= 0.0_wp ) THEN |
---|
8318 | ! |
---|
8319 | !-- Calculate vapour pressure |
---|
8320 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
8321 | f3 = EXP ( - surf_usm_v(l)%g_d(m) * (e_s - e) ) |
---|
8322 | ELSE |
---|
8323 | f3 = 1.0_wp |
---|
8324 | ENDIF |
---|
8325 | ! |
---|
8326 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
8327 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
8328 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
8329 | surf_usm_v(l)%r_canopy(m) = surf_usm_v(l)%r_canopy_min(m) / & |
---|
8330 | ( surf_usm_v(l)%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
8331 | |
---|
8332 | ! |
---|
8333 | !-- Calculate saturation specific humidity |
---|
8334 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
8335 | ! |
---|
8336 | !-- In case of dewfall, set evapotranspiration to zero |
---|
8337 | !-- All super-saturated water is then removed from the air |
---|
8338 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
8339 | surf_usm_v(l)%r_canopy(m) = 0.0_wp |
---|
8340 | ENDIF |
---|
8341 | |
---|
8342 | ! |
---|
8343 | !-- Calculate coefficients for the total evapotranspiration |
---|
8344 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
8345 | !-- For pavements, only evaporation of liquid water is possible. |
---|
8346 | f_qsws_veg = rho_lv * & |
---|
8347 | ( 1.0_wp - 0.0_wp ) / & !surf_usm_h%c_liq(m) ) / & |
---|
8348 | ( surf_usm_v(l)%r_a(m) + surf_usm_v(l)%r_canopy(m) ) |
---|
8349 | ! f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
8350 | ! surf_usm_h%r_a_green(m) |
---|
8351 | |
---|
8352 | f_qsws = f_qsws_veg! + f_qsws_liq |
---|
8353 | ! |
---|
8354 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
8355 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_v_p(l)%t(m) - 35.86_wp) - & |
---|
8356 | 17.269_wp*( t_surf_green_v_p(l)%t(m) - 273.16_wp) & |
---|
8357 | / ( t_surf_green_v_p(l)%t(m) - 35.86_wp)**2 ) |
---|
8358 | |
---|
8359 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
8360 | ENDIF |
---|
8361 | |
---|
8362 | ! |
---|
8363 | !-- add LW up so that it can be removed in prognostic equation |
---|
8364 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%rad_sw_in(m) - & |
---|
8365 | surf_usm_v(l)%rad_sw_out(m) + & |
---|
8366 | surf_usm_v(l)%rad_lw_in(m) - & |
---|
8367 | surf_usm_v(l)%rad_lw_out(m) |
---|
8368 | ! |
---|
8369 | !-- numerator of the prognostic equation |
---|
8370 | coef_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout |
---|
8371 | ! included in calculation of radnet_l |
---|
8372 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_veg_wall,m) * & |
---|
8373 | sigma_sb * t_surf_wall_v(l)%t(m) ** 4 + & |
---|
8374 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
8375 | lambda_surface * t_wall_v(l)%t(nzb_wall,m) |
---|
8376 | IF ( ( .NOT. spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
8377 | coef_window_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout |
---|
8378 | ! included in calculation of radnet_l |
---|
8379 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_wat_win,m) * & |
---|
8380 | sigma_sb * t_surf_window_v(l)%t(m) ** 4 + & |
---|
8381 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
8382 | lambda_surface_window * t_window_v(l)%t(nzb_wall,m) |
---|
8383 | ENDIF |
---|
8384 | IF ( ( humidity ) .AND. ( surf_usm_v(l)%frac(ind_pav_green,m) > 0.0_wp ) ) THEN |
---|
8385 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout |
---|
8386 | ! included in calculation of radnet_l |
---|
8387 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8388 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
8389 | f_shf * surf_usm_v(l)%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
8390 | + dq_s_dt * t_surf_green_v(l)%t(m) ) + & |
---|
8391 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
8392 | ELSE |
---|
8393 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included |
---|
8394 | ! in calculation of radnet_l |
---|
8395 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8396 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
8397 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
8398 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
8399 | ENDIF |
---|
8400 | |
---|
8401 | ! |
---|
8402 | !-- denominator of the prognostic equation |
---|
8403 | coef_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_veg_wall,m) * sigma_sb * & |
---|
8404 | t_surf_wall_v(l)%t(m) ** 3 & |
---|
8405 | + lambda_surface + f_shf / exner(k) |
---|
8406 | IF ( ( .NOT. spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
8407 | coef_window_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_wat_win,m) * sigma_sb * & |
---|
8408 | t_surf_window_v(l)%t(m) ** 3 & |
---|
8409 | + lambda_surface_window + f_shf / exner(k) |
---|
8410 | ENDIF |
---|
8411 | IF ( ( humidity ) .AND. ( surf_usm_v(l)%frac(ind_pav_green,m) > 0.0_wp ) ) THEN |
---|
8412 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8413 | t_surf_green_v(l)%t(m) ** 3 + f_qsws * dq_s_dt & |
---|
8414 | + lambda_surface_green + f_shf / exner(k) |
---|
8415 | ELSE |
---|
8416 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8417 | t_surf_green_v(l)%t(m) ** 3 & |
---|
8418 | + lambda_surface_green + f_shf / exner(k) |
---|
8419 | ENDIF |
---|
8420 | ! |
---|
8421 | !-- implicit solution when the surface layer has no heat capacity, |
---|
8422 | !-- otherwise use RK3 scheme. |
---|
8423 | t_surf_wall_v_p(l)%t(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
8424 | surf_usm_v(l)%c_surface(m) * t_surf_wall_v(l)%t(m) ) / & |
---|
8425 | ( surf_usm_v(l)%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
8426 | IF ( ( .NOT. spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN |
---|
8427 | t_surf_window_v_p(l)%t(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
8428 | surf_usm_v(l)%c_surface_window(m) * t_surf_window_v(l)%t(m) ) / & |
---|
8429 | ( surf_usm_v(l)%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
8430 | ENDIF |
---|
8431 | t_surf_green_v_p(l)%t(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
8432 | surf_usm_v(l)%c_surface_green(m) * t_surf_green_v(l)%t(m) ) / & |
---|
8433 | ( surf_usm_v(l)%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
8434 | ! |
---|
8435 | !-- add RK3 term |
---|
8436 | t_surf_wall_v_p(l)%t(m) = t_surf_wall_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
8437 | surf_usm_v(l)%tt_surface_wall_m(m) |
---|
8438 | t_surf_window_v_p(l)%t(m) = t_surf_window_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
8439 | surf_usm_v(l)%tt_surface_window_m(m) |
---|
8440 | t_surf_green_v_p(l)%t(m) = t_surf_green_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
8441 | surf_usm_v(l)%tt_surface_green_m(m) |
---|
8442 | ! |
---|
8443 | !-- Store surface temperature. Further, in case humidity is used |
---|
8444 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
8445 | !-- assumed to be the surface temperature. |
---|
8446 | surf_usm_v(l)%pt_surface(m) = ( surf_usm_v(l)%frac(ind_veg_wall,m) * t_surf_wall_v_p(l)%t(m) & |
---|
8447 | + surf_usm_v(l)%frac(ind_wat_win,m) * t_surf_window_v_p(l)%t(m) & |
---|
8448 | + surf_usm_v(l)%frac(ind_pav_green,m) * t_surf_green_v_p(l)%t(m) ) & |
---|
8449 | / exner(k) |
---|
8450 | |
---|
8451 | IF ( humidity ) surf_usm_v(l)%vpt_surface(m) = & |
---|
8452 | surf_usm_v(l)%pt_surface(m) |
---|
8453 | ! |
---|
8454 | !-- calculate true tendency |
---|
8455 | stend_wall = ( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) - dt_3d * tsc(3) * & |
---|
8456 | surf_usm_v(l)%tt_surface_wall_m(m) ) / ( dt_3d * tsc(2) ) |
---|
8457 | stend_window = ( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
8458 | surf_usm_v(l)%tt_surface_window_m(m) ) / ( dt_3d * tsc(2) ) |
---|
8459 | stend_green = ( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) - dt_3d * tsc(3) * & |
---|
8460 | surf_usm_v(l)%tt_surface_green_m(m) ) / ( dt_3d * tsc(2) ) |
---|
8461 | |
---|
8462 | ! |
---|
8463 | !-- calculate t_surf_* tendencies for the next Runge-Kutta step |
---|
8464 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
8465 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
8466 | surf_usm_v(l)%tt_surface_wall_m(m) = stend_wall |
---|
8467 | surf_usm_v(l)%tt_surface_window_m(m) = stend_window |
---|
8468 | surf_usm_v(l)%tt_surface_green_m(m) = stend_green |
---|
8469 | ELSEIF ( intermediate_timestep_count < & |
---|
8470 | intermediate_timestep_count_max ) THEN |
---|
8471 | surf_usm_v(l)%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
8472 | 5.3125_wp * surf_usm_v(l)%tt_surface_wall_m(m) |
---|
8473 | surf_usm_v(l)%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
8474 | 5.3125_wp * surf_usm_v(l)%tt_surface_green_m(m) |
---|
8475 | surf_usm_v(l)%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
8476 | 5.3125_wp * surf_usm_v(l)%tt_surface_window_m(m) |
---|
8477 | ENDIF |
---|
8478 | ENDIF |
---|
8479 | |
---|
8480 | ! |
---|
8481 | !-- in case of fast changes in the skin temperature, it is required to |
---|
8482 | !-- update the radiative fluxes in order to keep the solution stable |
---|
8483 | |
---|
8484 | IF ( ( ( ABS( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
8485 | ( ABS( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
8486 | ( ABS( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) ) > 1.0_wp ) ) & |
---|
8487 | .AND. unscheduled_radiation_calls ) THEN |
---|
8488 | force_radiation_call_l = .TRUE. |
---|
8489 | ENDIF |
---|
8490 | |
---|
8491 | ! |
---|
8492 | !-- calculate fluxes |
---|
8493 | !-- prognostic rad_net_l is used just for output! |
---|
8494 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
8495 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
8496 | 3.0_wp * sigma_sb * & |
---|
8497 | t_surf_wall_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
8498 | t_surf_wall_v(l)%t(m)**3 * t_surf_wall_v_p(l)%t(m) ) & |
---|
8499 | + surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
8500 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
8501 | 3.0_wp * sigma_sb * & |
---|
8502 | t_surf_window_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
8503 | t_surf_window_v(l)%t(m)**3 * t_surf_window_v_p(l)%t(m) ) & |
---|
8504 | + surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
8505 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
8506 | 3.0_wp * sigma_sb * & |
---|
8507 | t_surf_green_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
8508 | t_surf_green_v(l)%t(m)**3 * t_surf_green_v_p(l)%t(m) ) |
---|
8509 | |
---|
8510 | surf_usm_v(l)%wghf_eb_window(m) = lambda_surface_window * & |
---|
8511 | ( t_surf_window_v_p(l)%t(m) - t_window_v(l)%t(nzb_wall,m) ) |
---|
8512 | surf_usm_v(l)%wghf_eb(m) = lambda_surface * & |
---|
8513 | ( t_surf_wall_v_p(l)%t(m) - t_wall_v(l)%t(nzb_wall,m) ) |
---|
8514 | surf_usm_v(l)%wghf_eb_green(m) = lambda_surface_green * & |
---|
8515 | ( t_surf_green_v_p(l)%t(m) - t_green_v(l)%t(nzb_wall,m) ) |
---|
8516 | |
---|
8517 | ! |
---|
8518 | !-- ground/wall/roof surface heat flux |
---|
8519 | surf_usm_v(l)%wshf_eb(m) = & |
---|
8520 | - f_shf * ( surf_usm_v(l)%pt1(m) - & |
---|
8521 | t_surf_wall_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
8522 | - f_shf_window * ( surf_usm_v(l)%pt1(m) - & |
---|
8523 | t_surf_window_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_wat_win,m)& |
---|
8524 | - f_shf_green * ( surf_usm_v(l)%pt1(m) - & |
---|
8525 | t_surf_green_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_pav_green,m) |
---|
8526 | |
---|
8527 | ! |
---|
8528 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
8529 | !-- diffusion_s, surface_layer_fluxes,... |
---|
8530 | surf_usm_v(l)%shf(m) = surf_usm_v(l)%wshf_eb(m) / c_p |
---|
8531 | ! |
---|
8532 | !-- If the indoor model is applied, further add waste heat from buildings to the |
---|
8533 | !-- kinematic flux. |
---|
8534 | IF ( indoor_model ) THEN |
---|
8535 | surf_usm_v(l)%shf(m) = surf_usm_v(l)%shf(m) + & |
---|
8536 | surf_usm_v(l)%waste_heat(m) / c_p |
---|
8537 | ENDIF |
---|
8538 | |
---|
8539 | IF ( surf_usm_v(l)%frac(ind_pav_green,m) > 0.0_wp ) THEN |
---|
8540 | |
---|
8541 | |
---|
8542 | IF ( humidity ) THEN |
---|
8543 | surf_usm_v(l)%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
8544 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
8545 | t_surf_green_v_p(l)%t(m) ) |
---|
8546 | |
---|
8547 | surf_usm_v(l)%qsws(m) = surf_usm_v(l)%qsws_eb(m) / rho_lv |
---|
8548 | |
---|
8549 | surf_usm_v(l)%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
8550 | + dq_s_dt * t_surf_green_v(l)%t(m) - dq_s_dt & |
---|
8551 | * t_surf_green_v_p(l)%t(m) ) |
---|
8552 | |
---|
8553 | ! surf_usm_h%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
8554 | ! + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
8555 | ! * t_surf_green_h_p(m) ) |
---|
8556 | ENDIF |
---|
8557 | |
---|
8558 | ! |
---|
8559 | !-- Calculate the true surface resistance |
---|
8560 | IF ( .NOT. humidity ) THEN |
---|
8561 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
8562 | ELSE |
---|
8563 | surf_usm_v(l)%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
8564 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
8565 | t_surf_green_v_p(l)%t(m) ) / & |
---|
8566 | (surf_usm_v(l)%qsws(m) + 1.0E-20) - surf_usm_v(l)%r_a(m) |
---|
8567 | ENDIF |
---|
8568 | |
---|
8569 | ! |
---|
8570 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
8571 | !-- evaporation of liquid water |
---|
8572 | IF ( humidity ) THEN |
---|
8573 | ! |
---|
8574 | !-- If the air is saturated, check the reservoir water level |
---|
8575 | IF ( surf_usm_v(l)%qsws(m) < 0.0_wp ) THEN |
---|
8576 | |
---|
8577 | ! |
---|
8578 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
8579 | !-- let the water enter the liquid water reservoir as dew on the |
---|
8580 | !-- plant |
---|
8581 | IF ( surf_usm_v(l)%qsws_veg(m) < 0.0_wp ) THEN |
---|
8582 | ! surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) + surf_usm_h%qsws_veg(m) |
---|
8583 | surf_usm_v(l)%qsws_veg(m) = 0.0_wp |
---|
8584 | ENDIF |
---|
8585 | ENDIF |
---|
8586 | |
---|
8587 | ENDIF |
---|
8588 | ELSE |
---|
8589 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
8590 | ENDIF |
---|
8591 | |
---|
8592 | ENDDO |
---|
8593 | |
---|
8594 | ENDDO |
---|
8595 | !$OMP END PARALLEL |
---|
8596 | |
---|
8597 | ! |
---|
8598 | !-- Add-up anthropogenic heat, for now only at upward-facing surfaces |
---|
8599 | IF ( usm_anthropogenic_heat .AND. & |
---|
8600 | intermediate_timestep_count == intermediate_timestep_count_max ) THEN |
---|
8601 | ! |
---|
8602 | !-- application of the additional anthropogenic heat sources |
---|
8603 | !-- we considere the traffic for now so all heat is absorbed |
---|
8604 | !-- to the first layer, generalization would be worth. |
---|
8605 | !-- calculation of actual profile coefficient |
---|
8606 | !-- ??? check time_since_reference_point ??? |
---|
8607 | dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp) |
---|
8608 | dhour = INT(dtime/3600.0_wp) |
---|
8609 | |
---|
8610 | !-- TO_DO: activate, if testcase is available |
---|
8611 | !-- !$OMP PARALLEL DO PRIVATE (i, j, k, acoef, rho_cp) |
---|
8612 | !-- it may also improve performance to move get_topography_top_index_ji before the k-loop |
---|
8613 | DO i = nxl, nxr |
---|
8614 | DO j = nys, nyn |
---|
8615 | DO k = nz_urban_b, min(nz_urban_t,naheatlayers) |
---|
8616 | IF ( k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
8617 | ! |
---|
8618 | !-- increase of pt in box i,j,k in time dt_3d |
---|
8619 | !-- given to anthropogenic heat aheat*acoef (W*m-2) |
---|
8620 | !-- linear interpolation of coeficient |
---|
8621 | acoef = (REAL(dhour+1,wp)-dtime/3600.0_wp)*aheatprof(k,dhour) + & |
---|
8622 | (dtime/3600.0_wp-REAL(dhour,wp))*aheatprof(k,dhour+1) |
---|
8623 | IF ( aheat(k,j,i) > 0.0_wp ) THEN |
---|
8624 | ! |
---|
8625 | !-- calculate rho * c_p coefficient at layer k |
---|
8626 | rho_cp = c_p * hyp(k) / ( r_d * pt(k+1,j,i) * exner(k) ) |
---|
8627 | pt(k,j,i) = pt(k,j,i) + aheat(k,j,i)*acoef*dt_3d/(exner(k)*rho_cp*dz(1)) |
---|
8628 | ENDIF |
---|
8629 | ENDIF |
---|
8630 | ENDDO |
---|
8631 | ENDDO |
---|
8632 | ENDDO |
---|
8633 | |
---|
8634 | ENDIF |
---|
8635 | ! |
---|
8636 | !-- pt and shf are defined on nxlg:nxrg,nysg:nyng |
---|
8637 | !-- get the borders from neighbours |
---|
8638 | CALL exchange_horiz( pt, nbgp ) |
---|
8639 | ! |
---|
8640 | !-- calculation of force_radiation_call: |
---|
8641 | !-- Make logical OR for all processes. |
---|
8642 | !-- Force radiation call if at least one processor forces it. |
---|
8643 | IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )& |
---|
8644 | THEN |
---|
8645 | #if defined( __parallel ) |
---|
8646 | IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) |
---|
8647 | CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call, & |
---|
8648 | 1, MPI_LOGICAL, MPI_LOR, comm2d, ierr ) |
---|
8649 | #else |
---|
8650 | force_radiation_call = force_radiation_call_l |
---|
8651 | #endif |
---|
8652 | force_radiation_call_l = .FALSE. |
---|
8653 | ENDIF |
---|
8654 | |
---|
8655 | ! ! |
---|
8656 | ! !-- Calculate surface specific humidity |
---|
8657 | ! IF ( humidity ) THEN |
---|
8658 | ! CALL calc_q_surface_usm |
---|
8659 | ! ENDIF |
---|
8660 | |
---|
8661 | |
---|
8662 | ! CONTAINS |
---|
8663 | ! !------------------------------------------------------------------------------! |
---|
8664 | ! ! Description: |
---|
8665 | ! ! ------------ |
---|
8666 | ! !> Calculation of specific humidity of the skin layer (surface). It is assumend |
---|
8667 | ! !> that the skin is always saturated. |
---|
8668 | ! !------------------------------------------------------------------------------! |
---|
8669 | ! SUBROUTINE calc_q_surface_usm |
---|
8670 | ! |
---|
8671 | ! IMPLICIT NONE |
---|
8672 | ! |
---|
8673 | ! REAL(wp) :: resistance !< aerodynamic and soil resistance term |
---|
8674 | ! |
---|
8675 | ! DO m = 1, surf_usm_h%ns |
---|
8676 | ! |
---|
8677 | ! i = surf_usm_h%i(m) |
---|
8678 | ! j = surf_usm_h%j(m) |
---|
8679 | ! k = surf_usm_h%k(m) |
---|
8680 | ! |
---|
8681 | !! |
---|
8682 | !!-- Calculate water vapour pressure at saturation |
---|
8683 | ! e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
8684 | ! ( t_surf_green_h_p(m) - 273.16_wp ) / & |
---|
8685 | ! ( t_surf_green_h_p(m) - 35.86_wp ) & |
---|
8686 | ! ) |
---|
8687 | ! |
---|
8688 | !! |
---|
8689 | !!-- Calculate specific humidity at saturation |
---|
8690 | ! q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
8691 | ! |
---|
8692 | !! surf_usm_h%r_a_green(m) = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
8693 | !! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-10_wp ) |
---|
8694 | !! |
---|
8695 | !! !-- make sure that the resistance does not drop to zero |
---|
8696 | !! IF ( ABS(surf_usm_h%r_a_green(m)) < 1.0E-10_wp ) surf_usm_h%r_a_green(m) = 1.0E-10_wp |
---|
8697 | ! |
---|
8698 | ! resistance = surf_usm_h%r_a_green(m) / ( surf_usm_h%r_a_green(m) + surf_usm_h%r_s(m) + 1E-5_wp ) |
---|
8699 | ! |
---|
8700 | !! |
---|
8701 | !!-- Calculate specific humidity at surface |
---|
8702 | ! IF ( bulk_cloud_model ) THEN |
---|
8703 | ! q(k,j,i) = resistance * q_s + & |
---|
8704 | ! ( 1.0_wp - resistance ) * & |
---|
8705 | ! ( q(k,j,i) - ql(k,j,i) ) |
---|
8706 | ! ELSE |
---|
8707 | ! q(k,j,i) = resistance * q_s + & |
---|
8708 | ! ( 1.0_wp - resistance ) * & |
---|
8709 | ! q(k,j,i) |
---|
8710 | ! ENDIF |
---|
8711 | ! |
---|
8712 | !! |
---|
8713 | !!-- Update virtual potential temperature |
---|
8714 | ! vpt(k,j,i) = pt(k,j,i) * & |
---|
8715 | ! ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
8716 | ! |
---|
8717 | ! ENDDO |
---|
8718 | ! |
---|
8719 | !! |
---|
8720 | !!-- Now, treat vertical surface elements |
---|
8721 | ! DO l = 0, 3 |
---|
8722 | ! DO m = 1, surf_usm_v(l)%ns |
---|
8723 | !! |
---|
8724 | !!-- Get indices of respective grid point |
---|
8725 | ! i = surf_usm_v(l)%i(m) |
---|
8726 | ! j = surf_usm_v(l)%j(m) |
---|
8727 | ! k = surf_usm_v(l)%k(m) |
---|
8728 | ! |
---|
8729 | !! |
---|
8730 | !!-- Calculate water vapour pressure at saturation |
---|
8731 | ! e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
8732 | ! ( t_surf_green_v_p(l)%t(m) - 273.16_wp ) / & |
---|
8733 | ! ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) & |
---|
8734 | ! ) |
---|
8735 | ! |
---|
8736 | !! |
---|
8737 | !!-- Calculate specific humidity at saturation |
---|
8738 | ! q_s = 0.622_wp * e_s / ( surface_pressure -e_s ) |
---|
8739 | ! |
---|
8740 | !! |
---|
8741 | !!-- Calculate specific humidity at surface |
---|
8742 | ! IF ( bulk_cloud_model ) THEN |
---|
8743 | ! q(k,j,i) = ( q(k,j,i) - ql(k,j,i) ) |
---|
8744 | ! ELSE |
---|
8745 | ! q(k,j,i) = q(k,j,i) |
---|
8746 | ! ENDIF |
---|
8747 | !! |
---|
8748 | !!-- Update virtual potential temperature |
---|
8749 | ! vpt(k,j,i) = pt(k,j,i) * & |
---|
8750 | ! ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
8751 | ! |
---|
8752 | ! ENDDO |
---|
8753 | ! |
---|
8754 | ! ENDDO |
---|
8755 | ! |
---|
8756 | ! END SUBROUTINE calc_q_surface_usm |
---|
8757 | |
---|
8758 | END SUBROUTINE usm_surface_energy_balance |
---|
8759 | |
---|
8760 | |
---|
8761 | !------------------------------------------------------------------------------! |
---|
8762 | ! Description: |
---|
8763 | ! ------------ |
---|
8764 | !> Swapping of timelevels for t_surf and t_wall |
---|
8765 | !> called out from subroutine swap_timelevel |
---|
8766 | !------------------------------------------------------------------------------! |
---|
8767 | SUBROUTINE usm_swap_timelevel( mod_count ) |
---|
8768 | |
---|
8769 | IMPLICIT NONE |
---|
8770 | |
---|
8771 | INTEGER(iwp), INTENT(IN) :: mod_count |
---|
8772 | |
---|
8773 | |
---|
8774 | SELECT CASE ( mod_count ) |
---|
8775 | |
---|
8776 | CASE ( 0 ) |
---|
8777 | ! |
---|
8778 | !-- Horizontal surfaces |
---|
8779 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
8780 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
8781 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
8782 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
8783 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
8784 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
8785 | ! |
---|
8786 | !-- Vertical surfaces |
---|
8787 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
8788 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
8789 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
8790 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
8791 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
8792 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
8793 | CASE ( 1 ) |
---|
8794 | ! |
---|
8795 | !-- Horizontal surfaces |
---|
8796 | t_surf_wall_h => t_surf_wall_h_2; t_surf_wall_h_p => t_surf_wall_h_1 |
---|
8797 | t_wall_h => t_wall_h_2; t_wall_h_p => t_wall_h_1 |
---|
8798 | t_surf_window_h => t_surf_window_h_2; t_surf_window_h_p => t_surf_window_h_1 |
---|
8799 | t_window_h => t_window_h_2; t_window_h_p => t_window_h_1 |
---|
8800 | t_surf_green_h => t_surf_green_h_2; t_surf_green_h_p => t_surf_green_h_1 |
---|
8801 | t_green_h => t_green_h_2; t_green_h_p => t_green_h_1 |
---|
8802 | ! |
---|
8803 | !-- Vertical surfaces |
---|
8804 | t_surf_wall_v => t_surf_wall_v_2; t_surf_wall_v_p => t_surf_wall_v_1 |
---|
8805 | t_wall_v => t_wall_v_2; t_wall_v_p => t_wall_v_1 |
---|
8806 | t_surf_window_v => t_surf_window_v_2; t_surf_window_v_p => t_surf_window_v_1 |
---|
8807 | t_window_v => t_window_v_2; t_window_v_p => t_window_v_1 |
---|
8808 | t_surf_green_v => t_surf_green_v_2; t_surf_green_v_p => t_surf_green_v_1 |
---|
8809 | t_green_v => t_green_v_2; t_green_v_p => t_green_v_1 |
---|
8810 | END SELECT |
---|
8811 | |
---|
8812 | END SUBROUTINE usm_swap_timelevel |
---|
8813 | |
---|
8814 | !------------------------------------------------------------------------------! |
---|
8815 | ! Description: |
---|
8816 | ! ------------ |
---|
8817 | !> Subroutine writes t_surf and t_wall data into restart files |
---|
8818 | !------------------------------------------------------------------------------! |
---|
8819 | SUBROUTINE usm_wrd_local |
---|
8820 | |
---|
8821 | |
---|
8822 | IMPLICIT NONE |
---|
8823 | |
---|
8824 | CHARACTER(LEN=1) :: dum !< dummy string to create output-variable name |
---|
8825 | INTEGER(iwp) :: l !< index surface type orientation |
---|
8826 | |
---|
8827 | CALL wrd_write_string( 'ns_h_on_file_usm' ) |
---|
8828 | WRITE ( 14 ) surf_usm_h%ns |
---|
8829 | |
---|
8830 | CALL wrd_write_string( 'ns_v_on_file_usm' ) |
---|
8831 | WRITE ( 14 ) surf_usm_v(0:3)%ns |
---|
8832 | |
---|
8833 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
8834 | WRITE ( 14 ) surf_usm_h%start_index |
---|
8835 | |
---|
8836 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
8837 | WRITE ( 14 ) surf_usm_h%end_index |
---|
8838 | |
---|
8839 | CALL wrd_write_string( 't_surf_wall_h' ) |
---|
8840 | WRITE ( 14 ) t_surf_wall_h |
---|
8841 | |
---|
8842 | CALL wrd_write_string( 't_surf_window_h' ) |
---|
8843 | WRITE ( 14 ) t_surf_window_h |
---|
8844 | |
---|
8845 | CALL wrd_write_string( 't_surf_green_h' ) |
---|
8846 | WRITE ( 14 ) t_surf_green_h |
---|
8847 | ! |
---|
8848 | !-- Write restart data which is especially needed for the urban-surface |
---|
8849 | !-- model. In order to do not fill up the restart routines in |
---|
8850 | !-- surface_mod. |
---|
8851 | !-- Output of waste heat from indoor model. Restart data is required in |
---|
8852 | !-- this special case, because the indoor model where waste heat is |
---|
8853 | !-- computed is call each hour (current default), so that waste heat would |
---|
8854 | !-- have zero value until next call of indoor model. |
---|
8855 | IF ( indoor_model ) THEN |
---|
8856 | CALL wrd_write_string( 'waste_heat_h' ) |
---|
8857 | WRITE ( 14 ) surf_usm_h%waste_heat |
---|
8858 | ENDIF |
---|
8859 | |
---|
8860 | DO l = 0, 3 |
---|
8861 | |
---|
8862 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
8863 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
8864 | |
---|
8865 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
8866 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
8867 | |
---|
8868 | WRITE( dum, '(I1)') l |
---|
8869 | |
---|
8870 | CALL wrd_write_string( 't_surf_wall_v(' // dum // ')' ) |
---|
8871 | WRITE ( 14 ) t_surf_wall_v(l)%t |
---|
8872 | |
---|
8873 | CALL wrd_write_string( 't_surf_window_v(' // dum // ')' ) |
---|
8874 | WRITE ( 14 ) t_surf_window_v(l)%t |
---|
8875 | |
---|
8876 | CALL wrd_write_string( 't_surf_green_v(' // dum // ')' ) |
---|
8877 | WRITE ( 14 ) t_surf_green_v(l)%t |
---|
8878 | |
---|
8879 | IF ( indoor_model ) THEN |
---|
8880 | CALL wrd_write_string( 'waste_heat_v(' // dum // ')' ) |
---|
8881 | WRITE ( 14 ) surf_usm_v(l)%waste_heat |
---|
8882 | ENDIF |
---|
8883 | |
---|
8884 | ENDDO |
---|
8885 | |
---|
8886 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
8887 | WRITE ( 14 ) surf_usm_h%start_index |
---|
8888 | |
---|
8889 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
8890 | WRITE ( 14 ) surf_usm_h%end_index |
---|
8891 | |
---|
8892 | CALL wrd_write_string( 't_wall_h' ) |
---|
8893 | WRITE ( 14 ) t_wall_h |
---|
8894 | |
---|
8895 | CALL wrd_write_string( 't_window_h' ) |
---|
8896 | WRITE ( 14 ) t_window_h |
---|
8897 | |
---|
8898 | CALL wrd_write_string( 't_green_h' ) |
---|
8899 | WRITE ( 14 ) t_green_h |
---|
8900 | |
---|
8901 | DO l = 0, 3 |
---|
8902 | |
---|
8903 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
8904 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
8905 | |
---|
8906 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
8907 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
8908 | |
---|
8909 | WRITE( dum, '(I1)') l |
---|
8910 | |
---|
8911 | CALL wrd_write_string( 't_wall_v(' // dum // ')' ) |
---|
8912 | WRITE ( 14 ) t_wall_v(l)%t |
---|
8913 | |
---|
8914 | CALL wrd_write_string( 't_window_v(' // dum // ')' ) |
---|
8915 | WRITE ( 14 ) t_window_v(l)%t |
---|
8916 | |
---|
8917 | CALL wrd_write_string( 't_green_v(' // dum // ')' ) |
---|
8918 | WRITE ( 14 ) t_green_v(l)%t |
---|
8919 | |
---|
8920 | ENDDO |
---|
8921 | |
---|
8922 | END SUBROUTINE usm_wrd_local |
---|
8923 | |
---|
8924 | |
---|
8925 | END MODULE urban_surface_mod |
---|