1 | !> @file urban_surface_mod.f90 |
---|
2 | !------------------------------------------------------------------------------! |
---|
3 | ! This file is part of the PALM model system. |
---|
4 | ! |
---|
5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
6 | ! terms of the GNU General Public License as published by the Free Software |
---|
7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
8 | ! version. |
---|
9 | ! |
---|
10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
13 | ! |
---|
14 | ! You should have received a copy of the GNU General Public License along with |
---|
15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
16 | ! |
---|
17 | ! Copyright 2015-2018 Czech Technical University in Prague |
---|
18 | ! Copyright 2015-2018 Institute of Computer Science of the |
---|
19 | ! Czech Academy of Sciences, Prague |
---|
20 | ! Copyright 1997-2018 Leibniz Universitaet Hannover |
---|
21 | !------------------------------------------------------------------------------! |
---|
22 | ! |
---|
23 | ! Current revisions: |
---|
24 | ! ------------------ |
---|
25 | ! |
---|
26 | ! |
---|
27 | ! Former revisions: |
---|
28 | ! ----------------- |
---|
29 | ! $Id: urban_surface_mod.f90 3614 2018-12-10 07:05:46Z raasch $ |
---|
30 | ! unused variables removed |
---|
31 | ! |
---|
32 | ! 3607 2018-12-07 11:56:58Z suehring |
---|
33 | ! Output of radiation-related quantities migrated to radiation_model_mod. |
---|
34 | ! |
---|
35 | ! 3597 2018-12-04 08:40:18Z maronga |
---|
36 | ! Fixed calculation method of near surface air potential temperature at 10 cm |
---|
37 | ! and moved to surface_layer_fluxes. Removed unnecessary _eb strings. |
---|
38 | ! |
---|
39 | ! 3524 2018-11-14 13:36:44Z raasch |
---|
40 | ! bugfix concerning allocation of t_surf_wall_v |
---|
41 | ! |
---|
42 | ! 3502 2018-11-07 14:45:23Z suehring |
---|
43 | ! Disable initialization of building roofs with ground-floor-level properties, |
---|
44 | ! since this causes strong oscillations of surface temperature during the |
---|
45 | ! spinup. |
---|
46 | ! |
---|
47 | ! 3469 2018-10-30 20:05:07Z kanani |
---|
48 | ! Add missing PUBLIC variables for new indoor model |
---|
49 | ! |
---|
50 | ! 3449 2018-10-29 19:36:56Z suehring |
---|
51 | ! Bugfix: Fix average arrays allocations in usm_average_3d_data (J.Resler) |
---|
52 | ! Bugfix: Fix reading wall temperatures (J.Resler) |
---|
53 | ! Bugfix: Fix treating of outputs for wall temperature and sky view factors (J.Resler) |
---|
54 | ! |
---|
55 | ! |
---|
56 | ! 3435 2018-10-26 18:25:44Z gronemeier |
---|
57 | ! Bugfix: allocate gamma_w_green_sat until nzt_wall+1 |
---|
58 | ! |
---|
59 | ! 3418 2018-10-24 16:07:39Z kanani |
---|
60 | ! (rvtils, srissman) |
---|
61 | ! -Updated building databse, two green roof types (ind_green_type_roof) |
---|
62 | ! -Latent heat flux for green walls and roofs, new output of latent heatflux |
---|
63 | ! and soil water content of green roof substrate |
---|
64 | ! -t_surf changed to t_surf_wall |
---|
65 | ! -Added namelist parameter usm_wall_mod for lower wall tendency |
---|
66 | ! of first two wall layers during spinup |
---|
67 | ! -Window calculations deactivated during spinup |
---|
68 | ! |
---|
69 | ! 3382 2018-10-19 13:10:32Z knoop |
---|
70 | ! Bugix: made array declaration Fortran Standard conform |
---|
71 | ! |
---|
72 | ! 3378 2018-10-19 12:34:59Z kanani |
---|
73 | ! merge from radiation branch (r3362) into trunk |
---|
74 | ! (moh.hefny): |
---|
75 | ! - check the requested output variables if they are correct |
---|
76 | ! - added unscheduled_radiation_calls switch to control force_radiation_call |
---|
77 | ! - minor formate changes |
---|
78 | ! |
---|
79 | ! 3371 2018-10-18 13:40:12Z knoop |
---|
80 | ! Set flag indicating that albedo at urban surfaces is already initialized |
---|
81 | ! |
---|
82 | ! 3347 2018-10-15 14:21:08Z suehring |
---|
83 | ! Enable USM initialization with default building parameters in case no static |
---|
84 | ! input file exist. |
---|
85 | ! |
---|
86 | ! 3343 2018-10-15 10:38:52Z suehring |
---|
87 | ! Add output variables usm_rad_pc_inlw, usm_rad_pc_insw* |
---|
88 | ! |
---|
89 | ! 3274 2018-09-24 15:42:55Z knoop |
---|
90 | ! Modularization of all bulk cloud physics code components |
---|
91 | ! |
---|
92 | ! 3248 2018-09-14 09:42:06Z sward |
---|
93 | ! Minor formating changes |
---|
94 | ! |
---|
95 | ! 3246 2018-09-13 15:14:50Z sward |
---|
96 | ! Added error handling for input namelist via parin_fail_message |
---|
97 | ! |
---|
98 | ! 3241 2018-09-12 15:02:00Z raasch |
---|
99 | ! unused variables removed |
---|
100 | ! |
---|
101 | ! 3223 2018-08-30 13:48:17Z suehring |
---|
102 | ! Bugfix for commit 3222 |
---|
103 | ! |
---|
104 | ! 3222 2018-08-30 13:35:35Z suehring |
---|
105 | ! Introduction of surface array for type and its name |
---|
106 | ! |
---|
107 | ! 3203 2018-08-23 10:48:36Z suehring |
---|
108 | ! Revise bulk parameter for emissivity at ground-floor level |
---|
109 | ! |
---|
110 | ! 3196 2018-08-13 12:26:14Z maronga |
---|
111 | ! Added maximum aerodynamic resistance of 300 for horiztonal surfaces. |
---|
112 | ! |
---|
113 | ! 3176 2018-07-26 17:12:48Z suehring |
---|
114 | ! Bugfix, update virtual potential surface temparture, else heat fluxes on |
---|
115 | ! roofs might become unphysical |
---|
116 | ! |
---|
117 | ! 3152 2018-07-19 13:26:52Z suehring |
---|
118 | ! Initialize q_surface, which might be used in surface_layer_fluxes |
---|
119 | ! |
---|
120 | ! 3151 2018-07-19 08:45:38Z raasch |
---|
121 | ! remaining preprocessor define strings __check removed |
---|
122 | ! |
---|
123 | ! 3136 2018-07-16 14:48:21Z suehring |
---|
124 | ! Limit also roughness length for heat and moisture where necessary |
---|
125 | ! |
---|
126 | ! 3123 2018-07-12 16:21:53Z suehring |
---|
127 | ! Correct working precision for INTEGER number |
---|
128 | ! |
---|
129 | ! 3115 2018-07-10 12:49:26Z suehring |
---|
130 | ! Additional building type to represent bridges |
---|
131 | ! |
---|
132 | ! 3091 2018-06-28 16:20:35Z suehring |
---|
133 | ! - Limit aerodynamic resistance at vertical walls. |
---|
134 | ! - Add check for local roughness length not exceeding surface-layer height and |
---|
135 | ! limit roughness length where necessary. |
---|
136 | ! |
---|
137 | ! 3065 2018-06-12 07:03:02Z Giersch |
---|
138 | ! Unused array dxdir was removed, dz was replaced by dzu to consider vertical |
---|
139 | ! grid stretching |
---|
140 | ! |
---|
141 | ! 3049 2018-05-29 13:52:36Z Giersch |
---|
142 | ! Error messages revised |
---|
143 | ! |
---|
144 | ! 3045 2018-05-28 07:55:41Z Giersch |
---|
145 | ! Error message added |
---|
146 | ! |
---|
147 | ! 3029 2018-05-23 12:19:17Z raasch |
---|
148 | ! bugfix: close unit 151 instead of 90 |
---|
149 | ! |
---|
150 | ! 3014 2018-05-09 08:42:38Z maronga |
---|
151 | ! Added pc_transpiration_rate |
---|
152 | ! |
---|
153 | ! 2977 2018-04-17 10:27:57Z kanani |
---|
154 | ! Implement changes from branch radiation (r2948-2971) with minor modifications. |
---|
155 | ! (moh.hefny): |
---|
156 | ! Extended exn for all model domain height to avoid the need to get nzut. |
---|
157 | ! |
---|
158 | ! 2963 2018-04-12 14:47:44Z suehring |
---|
159 | ! Introduce index for vegetation/wall, pavement/green-wall and water/window |
---|
160 | ! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. . |
---|
161 | ! |
---|
162 | ! 2943 2018-04-03 16:17:10Z suehring |
---|
163 | ! Calculate exner function at all height levels and remove some un-used |
---|
164 | ! variables. |
---|
165 | ! |
---|
166 | ! 2932 2018-03-26 09:39:22Z maronga |
---|
167 | ! renamed urban_surface_par to urban_surface_parameters |
---|
168 | ! |
---|
169 | ! 2921 2018-03-22 15:05:23Z Giersch |
---|
170 | ! The activation of spinup has been moved to parin |
---|
171 | ! |
---|
172 | ! 2920 2018-03-22 11:22:01Z kanani |
---|
173 | ! Remove unused pcbl, npcbl from ONLY list |
---|
174 | ! moh.hefny: |
---|
175 | ! Fixed bugs introduced by new structures and by moving radiation interaction |
---|
176 | ! into radiation_model_mod.f90. |
---|
177 | ! Bugfix: usm data output 3D didn't respect directions |
---|
178 | ! |
---|
179 | ! 2906 2018-03-19 08:56:40Z Giersch |
---|
180 | ! Local variable ids has to be initialized with a value of -1 in |
---|
181 | ! usm_average_3d_data |
---|
182 | ! |
---|
183 | ! 2894 2018-03-15 09:17:58Z Giersch |
---|
184 | ! Calculations of the index range of the subdomain on file which overlaps with |
---|
185 | ! the current subdomain are already done in read_restart_data_mod, |
---|
186 | ! usm_read/write_restart_data have been renamed to usm_r/wrd_local, variable |
---|
187 | ! named found has been introduced for checking if restart data was found, |
---|
188 | ! reading of restart strings has been moved completely to |
---|
189 | ! read_restart_data_mod, usm_rrd_local is already inside the overlap loop |
---|
190 | ! programmed in read_restart_data_mod, SAVE attribute added where necessary, |
---|
191 | ! deallocation and allocation of some arrays have been changed to take care of |
---|
192 | ! different restart files that can be opened (index i), the marker *** end usm |
---|
193 | ! *** is not necessary anymore, strings and their respective lengths are |
---|
194 | ! written out and read now in case of restart runs to get rid of prescribed |
---|
195 | ! character lengths |
---|
196 | ! |
---|
197 | ! 2805 2018-02-14 17:00:09Z suehring |
---|
198 | ! Initialization of resistances. |
---|
199 | ! |
---|
200 | ! 2797 2018-02-08 13:24:35Z suehring |
---|
201 | ! Comment concerning output of ground-heat flux added. |
---|
202 | ! |
---|
203 | ! 2766 2018-01-22 17:17:47Z kanani |
---|
204 | ! Removed redundant commas, added some blanks |
---|
205 | ! |
---|
206 | ! 2765 2018-01-22 11:34:58Z maronga |
---|
207 | ! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in |
---|
208 | ! building_pars |
---|
209 | ! |
---|
210 | ! 2750 2018-01-15 16:26:51Z knoop |
---|
211 | ! Move flag plant canopy to modules |
---|
212 | ! |
---|
213 | ! 2737 2018-01-11 14:58:11Z kanani |
---|
214 | ! Removed unused variables t_surf_whole... |
---|
215 | ! |
---|
216 | ! 2735 2018-01-11 12:01:27Z suehring |
---|
217 | ! resistances are saved in surface attributes |
---|
218 | ! |
---|
219 | ! 2723 2018-01-05 09:27:03Z maronga |
---|
220 | ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) |
---|
221 | ! |
---|
222 | ! 2720 2018-01-02 16:27:15Z kanani |
---|
223 | ! Correction of comment |
---|
224 | ! |
---|
225 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
226 | ! Corrected "Former revisions" section |
---|
227 | ! |
---|
228 | ! 2705 2017-12-18 11:26:23Z maronga |
---|
229 | ! Changes from last commit documented |
---|
230 | ! |
---|
231 | ! 2703 2017-12-15 20:12:38Z maronga |
---|
232 | ! Workaround for calculation of r_a |
---|
233 | ! |
---|
234 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
235 | ! - Change in file header (GPL part) |
---|
236 | ! - Bugfix in calculation of pt_surface and related fluxes. (BM) |
---|
237 | ! - Do not write surface temperatures onto pt array as this might cause |
---|
238 | ! problems with nesting. (MS) |
---|
239 | ! - Revised calculation of pt1 (now done in surface_layer_fluxes). |
---|
240 | ! Bugfix, f_shf_window and f_shf_green were not set at vertical surface |
---|
241 | ! elements. (MS) |
---|
242 | ! - merged with branch ebsolver |
---|
243 | ! green building surfaces do not evaporate yet |
---|
244 | ! properties of green wall layers and window layers are taken from wall layers |
---|
245 | ! this input data is missing. (RvT) |
---|
246 | ! - Merged with branch radiation (developed by Mohamed Salim) |
---|
247 | ! - Revised initialization. (MS) |
---|
248 | ! - Rename emiss_surf into emissivity, roughness_wall into z0, albedo_surf into |
---|
249 | ! albedo. (MS) |
---|
250 | ! - Move first call of usm_radiatin from usm_init to init_3d_model |
---|
251 | ! - fixed problem with near surface temperature |
---|
252 | ! - added near surface temperature pt_10cm_h(m), pt_10cm_v(l)%t(m) |
---|
253 | ! - does not work with temp profile including stability, ol |
---|
254 | ! pt_10cm = pt1 now |
---|
255 | ! - merged with 2357 bugfix, error message for nopointer version |
---|
256 | ! - added indoor model coupling with wall heat flux |
---|
257 | ! - added green substrate/ dry vegetation layer for buildings |
---|
258 | ! - merged with 2232 new surface-type structure |
---|
259 | ! - added transmissivity of window tiles |
---|
260 | ! - added MOSAIK tile approach for 3 different surfaces (RvT) |
---|
261 | ! |
---|
262 | ! 2583 2017-10-26 13:58:38Z knoop |
---|
263 | ! Bugfix: reverted MPI_Win_allocate_cptr introduction in last commit |
---|
264 | ! |
---|
265 | ! 2582 2017-10-26 13:19:46Z hellstea |
---|
266 | ! Workaround for gnufortran compiler added in usm_calc_svf. CALL MPI_Win_allocate is |
---|
267 | ! replaced by CALL MPI_Win_allocate_cptr if defined ( __gnufortran ). |
---|
268 | ! |
---|
269 | ! 2544 2017-10-13 18:09:32Z maronga |
---|
270 | ! Date and time quantities are now read from date_and_time_mod. Solar constant is |
---|
271 | ! read from radiation_model_mod |
---|
272 | ! |
---|
273 | ! 2516 2017-10-04 11:03:04Z suehring |
---|
274 | ! Remove tabs |
---|
275 | ! |
---|
276 | ! 2514 2017-10-04 09:52:37Z suehring |
---|
277 | ! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny |
---|
278 | ! no output of ghost layer data |
---|
279 | ! |
---|
280 | ! 2350 2017-08-15 11:48:26Z kanani |
---|
281 | ! Bugfix and error message for nopointer version. |
---|
282 | ! Additional "! defined(__nopointer)" as workaround to enable compilation of |
---|
283 | ! nopointer version. |
---|
284 | ! |
---|
285 | ! 2318 2017-07-20 17:27:44Z suehring |
---|
286 | ! Get topography top index via Function call |
---|
287 | ! |
---|
288 | ! 2317 2017-07-20 17:27:19Z suehring |
---|
289 | ! Bugfix: adjust output of shf. Added support for spinups |
---|
290 | ! |
---|
291 | ! 2287 2017-06-15 16:46:30Z suehring |
---|
292 | ! Bugfix in determination topography-top index |
---|
293 | ! |
---|
294 | ! 2269 2017-06-09 11:57:32Z suehring |
---|
295 | ! Enable restart runs with different number of PEs |
---|
296 | ! Bugfixes nopointer branch |
---|
297 | ! |
---|
298 | ! 2258 2017-06-08 07:55:13Z suehring |
---|
299 | ! Bugfix, add pre-preprocessor directives to enable non-parrallel mode |
---|
300 | ! |
---|
301 | ! 2233 2017-05-30 18:08:54Z suehring |
---|
302 | ! |
---|
303 | ! 2232 2017-05-30 17:47:52Z suehring |
---|
304 | ! Adjustments according to new surface-type structure. Remove usm_wall_heat_flux; |
---|
305 | ! insteat, heat fluxes are directly applied in diffusion_s. |
---|
306 | ! |
---|
307 | ! 2213 2017-04-24 15:10:35Z kanani |
---|
308 | ! Removal of output quantities usm_lad and usm_canopy_hr |
---|
309 | ! |
---|
310 | ! 2209 2017-04-19 09:34:46Z kanani |
---|
311 | ! cpp switch __mpi3 removed, |
---|
312 | ! minor formatting, |
---|
313 | ! small bugfix for division by zero (Krc) |
---|
314 | ! |
---|
315 | ! 2113 2017-01-12 13:40:46Z kanani |
---|
316 | ! cpp switch __mpi3 added for MPI-3 standard code (Ketelsen) |
---|
317 | ! |
---|
318 | ! 2071 2016-11-17 11:22:14Z maronga |
---|
319 | ! Small bugfix (Resler) |
---|
320 | ! |
---|
321 | ! 2031 2016-10-21 15:11:58Z knoop |
---|
322 | ! renamed variable rho to rho_ocean |
---|
323 | ! |
---|
324 | ! 2024 2016-10-12 16:42:37Z kanani |
---|
325 | ! Bugfixes in deallocation of array plantt and reading of csf/csfsurf, |
---|
326 | ! optimization of MPI-RMA operations, |
---|
327 | ! declaration of pcbl as integer, |
---|
328 | ! renamed usm_radnet -> usm_rad_net, usm_canopy_khf -> usm_canopy_hr, |
---|
329 | ! splitted arrays svf -> svf & csf, svfsurf -> svfsurf & csfsurf, |
---|
330 | ! use of new control parameter varnamelength, |
---|
331 | ! added output variables usm_rad_ressw, usm_rad_reslw, |
---|
332 | ! minor formatting changes, |
---|
333 | ! minor optimizations. |
---|
334 | ! |
---|
335 | ! 2011 2016-09-19 17:29:57Z kanani |
---|
336 | ! Major reformatting according to PALM coding standard (comments, blanks, |
---|
337 | ! alphabetical ordering, etc.), |
---|
338 | ! removed debug_prints, |
---|
339 | ! removed auxiliary SUBROUTINE get_usm_info, instead, USM flag urban_surface is |
---|
340 | ! defined in MODULE control_parameters (modules.f90) to avoid circular |
---|
341 | ! dependencies, |
---|
342 | ! renamed canopy_heat_flux to pc_heating_rate, as meaning of quantity changed. |
---|
343 | ! |
---|
344 | ! 2007 2016-08-24 15:47:17Z kanani |
---|
345 | ! Initial revision |
---|
346 | ! |
---|
347 | ! |
---|
348 | ! Description: |
---|
349 | ! ------------ |
---|
350 | ! 2016/6/9 - Initial version of the USM (Urban Surface Model) |
---|
351 | ! authors: Jaroslav Resler, Pavel Krc |
---|
352 | ! (Czech Technical University in Prague and Institute of |
---|
353 | ! Computer Science of the Czech Academy of Sciences, Prague) |
---|
354 | ! with contributions: Michal Belda, Nina Benesova, Ondrej Vlcek |
---|
355 | ! partly inspired by PALM LSM (B. Maronga) |
---|
356 | ! parameterizations of Ra checked with TUF3D (E. S. Krayenhoff) |
---|
357 | !> Module for Urban Surface Model (USM) |
---|
358 | !> The module includes: |
---|
359 | !> 1. radiation model with direct/diffuse radiation, shading, reflections |
---|
360 | !> and integration with plant canopy |
---|
361 | !> 2. wall and wall surface model |
---|
362 | !> 3. surface layer energy balance |
---|
363 | !> 4. anthropogenic heat (only from transportation so far) |
---|
364 | !> 5. necessary auxiliary subroutines (reading inputs, writing outputs, |
---|
365 | !> restart simulations, ...) |
---|
366 | !> It also make use of standard radiation and integrates it into |
---|
367 | !> urban surface model. |
---|
368 | !> |
---|
369 | !> Further work: |
---|
370 | !> ------------- |
---|
371 | !> 1. Remove global arrays surfouts, surfoutl and only keep track of radiosity |
---|
372 | !> from surfaces that are visible from local surfaces (i.e. there is a SVF |
---|
373 | !> where target is local). To do that, radiosity will be exchanged after each |
---|
374 | !> reflection step using MPI_Alltoall instead of current MPI_Allgather. |
---|
375 | !> |
---|
376 | !> 2. Temporarily large values of surface heat flux can be observed, up to |
---|
377 | !> 1.2 Km/s, which seem to be not realistic. |
---|
378 | !> |
---|
379 | !> @todo Output of _av variables in case of restarts |
---|
380 | !> @todo Revise flux conversion in energy-balance solver |
---|
381 | !> @todo Bugfixing in nopointer branch |
---|
382 | !> @todo Check optimizations for RMA operations |
---|
383 | !> @todo Alternatives for MPI_WIN_ALLOCATE? (causes problems with openmpi) |
---|
384 | !> @todo Check for load imbalances in CPU measures, e.g. for exchange_horiz_prog |
---|
385 | !> factor 3 between min and max time |
---|
386 | !> @todo Move setting of flag indoor_model to indoor_model_mod once available |
---|
387 | !> @todo Check divisions in wtend (etc.) calculations for possible division |
---|
388 | !> by zero, e.g. in case fraq(0,m) + fraq(1,m) = 0?! |
---|
389 | !> @todo Use unit 90 for OPEN/CLOSE of input files (FK) |
---|
390 | !> @todo Move plant canopy stuff into plant canopy code |
---|
391 | !------------------------------------------------------------------------------! |
---|
392 | MODULE urban_surface_mod |
---|
393 | |
---|
394 | USE arrays_3d, & |
---|
395 | #if ! defined( __nopointer ) |
---|
396 | ONLY: hyp, zu, pt, p, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
397 | #else |
---|
398 | ONLY: hyp, pt, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
399 | #endif |
---|
400 | USE calc_mean_profile_mod, & |
---|
401 | ONLY: calc_mean_profile |
---|
402 | |
---|
403 | USE basic_constants_and_equations_mod, & |
---|
404 | ONLY: c_p, g, kappa, pi, r_d, rho_l, l_v |
---|
405 | |
---|
406 | USE control_parameters, & |
---|
407 | ONLY: coupling_start_time, topography, dt_3d, humidity, & |
---|
408 | intermediate_timestep_count, initializing_actions, & |
---|
409 | intermediate_timestep_count_max, simulated_time, end_time, & |
---|
410 | timestep_scheme, tsc, coupling_char, io_blocks, io_group, & |
---|
411 | message_string, time_since_reference_point, surface_pressure, & |
---|
412 | pt_surface, large_scale_forcing, lsf_surf, spinup, & |
---|
413 | spinup_pt_mean, spinup_time, time_do3d, dt_do3d, & |
---|
414 | average_count_3d, varnamelength, urban_surface, & |
---|
415 | plant_canopy, dz |
---|
416 | |
---|
417 | USE bulk_cloud_model_mod, & |
---|
418 | ONLY: bulk_cloud_model, precipitation |
---|
419 | |
---|
420 | USE cpulog, & |
---|
421 | ONLY: cpu_log, log_point, log_point_s |
---|
422 | |
---|
423 | USE date_and_time_mod, & |
---|
424 | ONLY: time_utc_init |
---|
425 | |
---|
426 | USE grid_variables, & |
---|
427 | ONLY: dx, dy, ddx, ddy, ddx2, ddy2 |
---|
428 | |
---|
429 | USE indices, & |
---|
430 | ONLY: nx, ny, nnx, nny, nnz, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, & |
---|
431 | nysg, nzb, nzt, nbgp, wall_flags_0 |
---|
432 | |
---|
433 | USE, INTRINSIC :: iso_c_binding |
---|
434 | |
---|
435 | USE kinds |
---|
436 | |
---|
437 | USE pegrid |
---|
438 | |
---|
439 | USE plant_canopy_model_mod, & |
---|
440 | ONLY: pc_heating_rate, pc_transpiration_rate, pc_latent_rate |
---|
441 | |
---|
442 | USE radiation_model_mod, & |
---|
443 | ONLY: albedo_type, radiation_interaction, calc_zenith, zenith, & |
---|
444 | radiation, rad_sw_in, rad_lw_in, rad_sw_out, rad_lw_out, & |
---|
445 | sigma_sb, sun_direction, sun_dir_lat, sun_dir_lon, & |
---|
446 | force_radiation_call, iup_u, inorth_u, isouth_u, ieast_u, & |
---|
447 | iwest_u, iup_l, inorth_l, isouth_l, ieast_l, iwest_l, id, & |
---|
448 | iz, iy, ix, nsurf, idsvf, ndsvf, & |
---|
449 | idcsf, ndcsf, kdcsf, pct, & |
---|
450 | nzub, nzut, unscheduled_radiation_calls |
---|
451 | |
---|
452 | USE statistics, & |
---|
453 | ONLY: hom, statistic_regions |
---|
454 | |
---|
455 | USE surface_mod, & |
---|
456 | ONLY: get_topography_top_index_ji, get_topography_top_index, & |
---|
457 | ind_pav_green, ind_veg_wall, ind_wat_win, surf_usm_h, & |
---|
458 | surf_usm_v, surface_restore_elements |
---|
459 | |
---|
460 | |
---|
461 | IMPLICIT NONE |
---|
462 | |
---|
463 | ! |
---|
464 | !-- USM model constants |
---|
465 | |
---|
466 | REAL(wp), PARAMETER :: & |
---|
467 | b_ch = 6.04_wp, & ! Clapp & Hornberger exponent |
---|
468 | lambda_h_green_dry = 0.19_wp, & ! heat conductivity for dry soil |
---|
469 | lambda_h_green_sm = 3.44_wp, & ! heat conductivity of the soil matrix |
---|
470 | lambda_h_water = 0.57_wp, & ! heat conductivity of water |
---|
471 | psi_sat = -0.388_wp, & ! soil matrix potential at saturation |
---|
472 | rho_c_soil = 2.19E6_wp, & ! volumetric heat capacity of soil |
---|
473 | rho_c_water = 4.20E6_wp !, & ! volumetric heat capacity of water |
---|
474 | ! m_max_depth = 0.0002_wp ! Maximum capacity of the water reservoir (m) |
---|
475 | |
---|
476 | ! |
---|
477 | !-- Soil parameters I alpha_vg, l_vg_green, n_vg, gamma_w_green_sat |
---|
478 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: soil_pars = RESHAPE( (/ & |
---|
479 | 3.83_wp, 1.250_wp, 1.38_wp, 6.94E-6_wp, & ! 1 |
---|
480 | 3.14_wp, -2.342_wp, 1.28_wp, 1.16E-6_wp, & ! 2 |
---|
481 | 0.83_wp, -0.588_wp, 1.25_wp, 0.26E-6_wp, & ! 3 |
---|
482 | 3.67_wp, -1.977_wp, 1.10_wp, 2.87E-6_wp, & ! 4 |
---|
483 | 2.65_wp, 2.500_wp, 1.10_wp, 1.74E-6_wp, & ! 5 |
---|
484 | 1.30_wp, 0.400_wp, 1.20_wp, 0.93E-6_wp, & ! 6 |
---|
485 | 0.00_wp, 0.00_wp, 0.00_wp, 0.57E-6_wp & ! 7 |
---|
486 | /), (/ 4, 7 /) ) |
---|
487 | |
---|
488 | ! |
---|
489 | !-- Soil parameters II swc_sat, fc, wilt, swc_res |
---|
490 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: m_soil_pars = RESHAPE( (/ & |
---|
491 | 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp, & ! 1 |
---|
492 | 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp, & ! 2 |
---|
493 | 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp, & ! 3 |
---|
494 | 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp, & ! 4 |
---|
495 | 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp, & ! 5 |
---|
496 | 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp, & ! 6 |
---|
497 | 0.472_wp, 0.323_wp, 0.171_wp, 0.000_wp & ! 7 |
---|
498 | /), (/ 4, 7 /) ) |
---|
499 | |
---|
500 | ! value 9999999.9_wp -> generic available or user-defined value must be set |
---|
501 | ! otherwise -> no generic variable and user setting is optional |
---|
502 | REAL(wp) :: alpha_vangenuchten = 9999999.9_wp, & !< NAMELIST alpha_vg |
---|
503 | field_capacity = 9999999.9_wp, & !< NAMELIST fc |
---|
504 | hydraulic_conductivity = 9999999.9_wp, & !< NAMELIST gamma_w_green_sat |
---|
505 | lambda_h_green_sat = 0.0_wp, & !< heat conductivity for saturated soil |
---|
506 | l_vangenuchten = 9999999.9_wp, & !< NAMELIST l_vg |
---|
507 | n_vangenuchten = 9999999.9_wp, & !< NAMELIST n_vg |
---|
508 | residual_moisture = 9999999.9_wp, & !< NAMELIST m_res |
---|
509 | saturation_moisture = 9999999.9_wp, & !< NAMELIST m_sat |
---|
510 | wilting_point = 9999999.9_wp!, & !< NAMELIST m_wilt |
---|
511 | |
---|
512 | |
---|
513 | !-- configuration parameters (they can be setup in PALM config) |
---|
514 | LOGICAL :: usm_material_model = .TRUE. !< flag parameter indicating wheather the model of heat in materials is used |
---|
515 | LOGICAL :: usm_anthropogenic_heat = .FALSE. !< flag parameter indicating wheather the anthropogenic heat sources (e.g.transportation) are used |
---|
516 | LOGICAL :: force_radiation_call_l = .FALSE. !< flag parameter for unscheduled radiation model calls |
---|
517 | LOGICAL :: indoor_model = .FALSE. !< whether to use the indoor model |
---|
518 | LOGICAL :: read_wall_temp_3d = .FALSE. |
---|
519 | LOGICAL :: usm_wall_mod = .FALSE. !< reduces conductivity of the first 2 wall layers by factor 0.1 |
---|
520 | |
---|
521 | |
---|
522 | INTEGER(iwp) :: building_type = 1 !< default building type (preleminary setting) |
---|
523 | INTEGER(iwp) :: land_category = 2 !< default category for land surface |
---|
524 | INTEGER(iwp) :: wall_category = 2 !< default category for wall surface over pedestrian zone |
---|
525 | INTEGER(iwp) :: pedestrian_category = 2 !< default category for wall surface in pedestrian zone |
---|
526 | INTEGER(iwp) :: roof_category = 2 !< default category for root surface |
---|
527 | REAL(wp) :: roughness_concrete = 0.001_wp !< roughness length of average concrete surface |
---|
528 | ! |
---|
529 | !-- Indices of input attributes for (above) ground floor level |
---|
530 | INTEGER(iwp) :: ind_alb_wall_agfl = 65 !< index in input list for albedo_type of wall above ground floor level |
---|
531 | INTEGER(iwp) :: ind_alb_wall_gfl = 32 !< index in input list for albedo_type of wall ground floor level |
---|
532 | INTEGER(iwp) :: ind_alb_wall_r = 96 !< index in input list for albedo_type of wall roof |
---|
533 | INTEGER(iwp) :: ind_alb_green_agfl = 83 !< index in input list for albedo_type of green above ground floor level |
---|
534 | INTEGER(iwp) :: ind_alb_green_gfl = 50 !< index in input list for albedo_type of green ground floor level |
---|
535 | INTEGER(iwp) :: ind_alb_green_r = 115 !< index in input list for albedo_type of green roof |
---|
536 | INTEGER(iwp) :: ind_alb_win_agfl = 79 !< index in input list for albedo_type of window fraction above ground floor level |
---|
537 | INTEGER(iwp) :: ind_alb_win_gfl = 46 !< index in input list for albedo_type of window fraction ground floor level |
---|
538 | INTEGER(iwp) :: ind_alb_win_r = 110 !< index in input list for albedo_type of window fraction roof |
---|
539 | INTEGER(iwp) :: ind_emis_wall_agfl = 64 !< index in input list for wall emissivity, above ground floor level |
---|
540 | INTEGER(iwp) :: ind_emis_wall_gfl = 31 !< index in input list for wall emissivity, ground floor level |
---|
541 | INTEGER(iwp) :: ind_emis_wall_r = 95 !< index in input list for wall emissivity, roof |
---|
542 | INTEGER(iwp) :: ind_emis_green_agfl = 82 !< index in input list for green emissivity, above ground floor level |
---|
543 | INTEGER(iwp) :: ind_emis_green_gfl = 49 !< index in input list for green emissivity, ground floor level |
---|
544 | INTEGER(iwp) :: ind_emis_green_r = 114 !< index in input list for green emissivity, roof |
---|
545 | INTEGER(iwp) :: ind_emis_win_agfl = 77 !< index in input list for window emissivity, above ground floor level |
---|
546 | INTEGER(iwp) :: ind_emis_win_gfl = 44 !< index in input list for window emissivity, ground floor level |
---|
547 | INTEGER(iwp) :: ind_emis_win_r = 108 !< index in input list for window emissivity, roof |
---|
548 | INTEGER(iwp) :: ind_green_frac_w_agfl = 80 !< index in input list for green fraction on wall, above ground floor level |
---|
549 | INTEGER(iwp) :: ind_green_frac_w_gfl = 47 !< index in input list for green fraction on wall, ground floor level |
---|
550 | INTEGER(iwp) :: ind_green_frac_r_agfl = 112 !< index in input list for green fraction on roof, above ground floor level |
---|
551 | INTEGER(iwp) :: ind_green_frac_r_gfl = 111 !< index in input list for green fraction on roof, ground floor level |
---|
552 | INTEGER(iwp) :: ind_hc1_agfl = 58 !< index in input list for heat capacity at first wall layer, above ground floor level |
---|
553 | INTEGER(iwp) :: ind_hc1_gfl = 25 !< index in input list for heat capacity at first wall layer, ground floor level |
---|
554 | INTEGER(iwp) :: ind_hc1_wall_r = 89 !< index in input list for heat capacity at first wall layer, roof |
---|
555 | INTEGER(iwp) :: ind_hc1_win_agfl = 71 !< index in input list for heat capacity at first window layer, above ground floor level |
---|
556 | INTEGER(iwp) :: ind_hc1_win_gfl = 38 !< index in input list for heat capacity at first window layer, ground floor level |
---|
557 | INTEGER(iwp) :: ind_hc1_win_r = 102 !< index in input list for heat capacity at first window layer, roof |
---|
558 | INTEGER(iwp) :: ind_hc2_agfl = 59 !< index in input list for heat capacity at second wall layer, above ground floor level |
---|
559 | INTEGER(iwp) :: ind_hc2_gfl = 26 !< index in input list for heat capacity at second wall layer, ground floor level |
---|
560 | INTEGER(iwp) :: ind_hc2_wall_r = 90 !< index in input list for heat capacity at second wall layer, roof |
---|
561 | INTEGER(iwp) :: ind_hc2_win_agfl = 72 !< index in input list for heat capacity at second window layer, above ground floor level |
---|
562 | INTEGER(iwp) :: ind_hc2_win_gfl = 39 !< index in input list for heat capacity at second window layer, ground floor level |
---|
563 | INTEGER(iwp) :: ind_hc2_win_r = 103 !< index in input list for heat capacity at second window layer, roof |
---|
564 | INTEGER(iwp) :: ind_hc3_agfl = 60 !< index in input list for heat capacity at third wall layer, above ground floor level |
---|
565 | INTEGER(iwp) :: ind_hc3_gfl = 27 !< index in input list for heat capacity at third wall layer, ground floor level |
---|
566 | INTEGER(iwp) :: ind_hc3_wall_r = 91 !< index in input list for heat capacity at third wall layer, roof |
---|
567 | INTEGER(iwp) :: ind_hc3_win_agfl = 73 !< index in input list for heat capacity at third window layer, above ground floor level |
---|
568 | INTEGER(iwp) :: ind_hc3_win_gfl = 40 !< index in input list for heat capacity at third window layer, ground floor level |
---|
569 | INTEGER(iwp) :: ind_hc3_win_r = 104 !< index in input list for heat capacity at third window layer, roof |
---|
570 | INTEGER(iwp) :: ind_gflh = 17 !< index in input list for ground floor level height |
---|
571 | INTEGER(iwp) :: ind_lai_r_agfl = 113 !< index in input list for LAI on roof, above ground floor level |
---|
572 | INTEGER(iwp) :: ind_lai_r_gfl = 113 !< index in input list for LAI on roof, ground floor level |
---|
573 | INTEGER(iwp) :: ind_lai_w_agfl = 81 !< index in input list for LAI on wall, above ground floor level |
---|
574 | INTEGER(iwp) :: ind_lai_w_gfl = 48 !< index in input list for LAI on wall, ground floor level |
---|
575 | INTEGER(iwp) :: ind_tc1_agfl = 61 !< index in input list for thermal conductivity at first wall layer, above ground floor level |
---|
576 | INTEGER(iwp) :: ind_tc1_gfl = 28 !< index in input list for thermal conductivity at first wall layer, ground floor level |
---|
577 | INTEGER(iwp) :: ind_tc1_wall_r = 92 !< index in input list for thermal conductivity at first wall layer, roof |
---|
578 | INTEGER(iwp) :: ind_tc1_win_agfl = 74 !< index in input list for thermal conductivity at first window layer, above ground floor level |
---|
579 | INTEGER(iwp) :: ind_tc1_win_gfl = 41 !< index in input list for thermal conductivity at first window layer, ground floor level |
---|
580 | INTEGER(iwp) :: ind_tc1_win_r = 105 !< index in input list for thermal conductivity at first window layer, roof |
---|
581 | INTEGER(iwp) :: ind_tc2_agfl = 62 !< index in input list for thermal conductivity at second wall layer, above ground floor level |
---|
582 | INTEGER(iwp) :: ind_tc2_gfl = 29 !< index in input list for thermal conductivity at second wall layer, ground floor level |
---|
583 | INTEGER(iwp) :: ind_tc2_wall_r = 93 !< index in input list for thermal conductivity at second wall layer, roof |
---|
584 | INTEGER(iwp) :: ind_tc2_win_agfl = 75 !< index in input list for thermal conductivity at second window layer, above ground floor level |
---|
585 | INTEGER(iwp) :: ind_tc2_win_gfl = 42 !< index in input list for thermal conductivity at second window layer, ground floor level |
---|
586 | INTEGER(iwp) :: ind_tc2_win_r = 106 !< index in input list for thermal conductivity at second window layer, ground floor level |
---|
587 | INTEGER(iwp) :: ind_tc3_agfl = 63 !< index in input list for thermal conductivity at third wall layer, above ground floor level |
---|
588 | INTEGER(iwp) :: ind_tc3_gfl = 30 !< index in input list for thermal conductivity at third wall layer, ground floor level |
---|
589 | INTEGER(iwp) :: ind_tc3_wall_r = 94 !< index in input list for thermal conductivity at third wall layer, roof |
---|
590 | INTEGER(iwp) :: ind_tc3_win_agfl = 76 !< index in input list for thermal conductivity at third window layer, above ground floor level |
---|
591 | INTEGER(iwp) :: ind_tc3_win_gfl = 43 !< index in input list for thermal conductivity at third window layer, ground floor level |
---|
592 | INTEGER(iwp) :: ind_tc3_win_r = 107 !< index in input list for thermal conductivity at third window layer, roof |
---|
593 | INTEGER(iwp) :: ind_thick_1_agfl = 54 !< index for wall layer thickness - 1st layer above ground floor level |
---|
594 | INTEGER(iwp) :: ind_thick_1_gfl = 21 !< index for wall layer thickness - 1st layer ground floor level |
---|
595 | INTEGER(iwp) :: ind_thick_1_wall_r = 85 !< index for wall layer thickness - 1st layer roof |
---|
596 | INTEGER(iwp) :: ind_thick_1_win_agfl = 67 !< index for window layer thickness - 1st layer above ground floor level |
---|
597 | INTEGER(iwp) :: ind_thick_1_win_gfl = 34 !< index for window layer thickness - 1st layer ground floor level |
---|
598 | INTEGER(iwp) :: ind_thick_1_win_r = 98 !< index for window layer thickness - 1st layer roof |
---|
599 | INTEGER(iwp) :: ind_thick_2_agfl = 55 !< index for wall layer thickness - 2nd layer above ground floor level |
---|
600 | INTEGER(iwp) :: ind_thick_2_gfl = 22 !< index for wall layer thickness - 2nd layer ground floor level |
---|
601 | INTEGER(iwp) :: ind_thick_2_wall_r = 86 !< index for wall layer thickness - 2nd layer roof |
---|
602 | INTEGER(iwp) :: ind_thick_2_win_agfl = 68 !< index for window layer thickness - 2nd layer above ground floor level |
---|
603 | INTEGER(iwp) :: ind_thick_2_win_gfl = 35 !< index for window layer thickness - 2nd layer ground floor level |
---|
604 | INTEGER(iwp) :: ind_thick_2_win_r = 99 !< index for window layer thickness - 2nd layer roof |
---|
605 | INTEGER(iwp) :: ind_thick_3_agfl = 56 !< index for wall layer thickness - 3rd layer above ground floor level |
---|
606 | INTEGER(iwp) :: ind_thick_3_gfl = 23 !< index for wall layer thickness - 3rd layer ground floor level |
---|
607 | INTEGER(iwp) :: ind_thick_3_wall_r = 87 !< index for wall layer thickness - 3rd layer roof |
---|
608 | INTEGER(iwp) :: ind_thick_3_win_agfl = 69 !< index for window layer thickness - 3rd layer above ground floor level |
---|
609 | INTEGER(iwp) :: ind_thick_3_win_gfl = 36 !< index for window layer thickness - 3rd layer ground floor level |
---|
610 | INTEGER(iwp) :: ind_thick_3_win_r = 100 !< index for window layer thickness - 3rd layer roof |
---|
611 | INTEGER(iwp) :: ind_thick_4_agfl = 57 !< index for wall layer thickness - 4th layer above ground floor level |
---|
612 | INTEGER(iwp) :: ind_thick_4_gfl = 24 !< index for wall layer thickness - 4th layer ground floor level |
---|
613 | INTEGER(iwp) :: ind_thick_4_wall_r = 88 !< index for wall layer thickness - 4st layer roof |
---|
614 | INTEGER(iwp) :: ind_thick_4_win_agfl = 70 !< index for window layer thickness - 4th layer above ground floor level |
---|
615 | INTEGER(iwp) :: ind_thick_4_win_gfl = 37 !< index for window layer thickness - 4th layer ground floor level |
---|
616 | INTEGER(iwp) :: ind_thick_4_win_r = 101 !< index for window layer thickness - 4th layer roof |
---|
617 | INTEGER(iwp) :: ind_trans_agfl = 78 !< index in input list for window transmissivity, above ground floor level |
---|
618 | INTEGER(iwp) :: ind_trans_gfl = 45 !< index in input list for window transmissivity, ground floor level |
---|
619 | INTEGER(iwp) :: ind_trans_r = 109 !< index in input list for window transmissivity, roof |
---|
620 | INTEGER(iwp) :: ind_wall_frac_agfl = 53 !< index in input list for wall fraction, above ground floor level |
---|
621 | INTEGER(iwp) :: ind_wall_frac_gfl = 20 !< index in input list for wall fraction, ground floor level |
---|
622 | INTEGER(iwp) :: ind_wall_frac_r = 84 !< index in input list for wall fraction, roof |
---|
623 | INTEGER(iwp) :: ind_win_frac_agfl = 66 !< index in input list for window fraction, above ground floor level |
---|
624 | INTEGER(iwp) :: ind_win_frac_gfl = 33 !< index in input list for window fraction, ground floor level |
---|
625 | INTEGER(iwp) :: ind_win_frac_r = 97 !< index in input list for window fraction, roof |
---|
626 | INTEGER(iwp) :: ind_z0_agfl = 51 !< index in input list for z0, above ground floor level |
---|
627 | INTEGER(iwp) :: ind_z0_gfl = 18 !< index in input list for z0, ground floor level |
---|
628 | INTEGER(iwp) :: ind_z0qh_agfl = 52 !< index in input list for z0h / z0q, above ground floor level |
---|
629 | INTEGER(iwp) :: ind_z0qh_gfl = 19 !< index in input list for z0h / z0q, ground floor level |
---|
630 | INTEGER(iwp) :: ind_green_type_roof = 116 !< index in input list for type of green roof |
---|
631 | |
---|
632 | |
---|
633 | REAL(wp) :: roof_height_limit = 4.0_wp !< height for distinguish between land surfaces and roofs |
---|
634 | REAL(wp) :: ground_floor_level = 4.0_wp !< default ground floor level |
---|
635 | |
---|
636 | |
---|
637 | CHARACTER(37), DIMENSION(0:7), PARAMETER :: building_type_name = (/ & |
---|
638 | 'user-defined ', & ! 0 |
---|
639 | 'residential - 1950 ', & ! 1 |
---|
640 | 'residential 1951 - 2000 ', & ! 2 |
---|
641 | 'residential 2001 - ', & ! 3 |
---|
642 | 'office - 1950 ', & ! 4 |
---|
643 | 'office 1951 - 2000 ', & ! 5 |
---|
644 | 'office 2001 - ', & ! 6 |
---|
645 | 'bridges ' & ! 7 |
---|
646 | /) |
---|
647 | ! |
---|
648 | !-- building parameters, 6 different types |
---|
649 | !-- Parameter for urban surface model |
---|
650 | !-- 0 - heat capacity wall surface, 1 - heat capacity of window surface, 2 - heat capacity of green surface |
---|
651 | !-- 3 - thermal conductivity of wall surface, 4 - thermal conductivity of window surface, |
---|
652 | !-- 5 - thermal conductivty of green surface, 6 - wall fraction ground plate, |
---|
653 | !-- 7 - 1st wall layer thickness ground plate, 8 - 2nd wall layer thickness ground plate |
---|
654 | !-- 9 - 3rd wall layer thickness ground plate, 10 - 4th wall layer thickness ground plate, |
---|
655 | !-- 11 - heat capacity 1st/2nd wall layer ground plate, 12 - heat capacity 3rd wall layer ground plate |
---|
656 | !-- 13 - heat capacity 4th wall layer ground plate, 14 - thermal conductivity 1st/2nd wall layer ground plate, |
---|
657 | !-- 15 - thermal conductivity 3rd wall layer ground plate, 16 - thermal conductivity 4th wall layer ground plate |
---|
658 | !-- 17 - ground floor level height, 18 - z0 roughness ground floor level, 19 - z0h/z0g roughness heaat/humidity, |
---|
659 | !-- 20 - wall fraction ground floor level, 21 - 1st wall layer thickness ground floor level, |
---|
660 | !-- 22 - 2nd wall layer thickness ground floor level, 23 - 3rd wall layer thickness ground floor level, |
---|
661 | !-- 24 - 4th wall layer thickness ground floor level, 25 - heat capacity 1st/2nd wall layer ground floor level, |
---|
662 | !-- 26 - heat capacity 3rd wall layer ground floor level, 27 - heat capacity 4th wall layer ground floor level, |
---|
663 | !-- 28 - thermal conductivity 1st/2nd wall layer ground floor level, |
---|
664 | !-- 29 - thermal conductivity 3rd wall layer ground floor level, 30 - thermal conductivity 4th wall layer ground floor level |
---|
665 | !-- 31 - wall emissivity ground floor level, 32 - wall albedo ground floor level, 33 - window fraction ground floor level, |
---|
666 | !-- 34 - 1st window layer thickness ground floor level, 35 - 2nd window layer thickness ground floor level, |
---|
667 | !-- 36 - 3rd window layer thickness ground floor level, 37 - 4th window layer thickness ground floor level, |
---|
668 | !-- 38 - heat capacity 1st/2nd window layer ground floor level, 39 - heat capacity 3rd window layer ground floor level, |
---|
669 | !-- 40 - heat capacity 4th window layer ground floor level, |
---|
670 | !-- 41 - thermal conductivity 1st/2nd window layer ground floor level, |
---|
671 | !-- 42 - thermal conductivity 3rd window layer ground floor level, |
---|
672 | !-- 43 - thermal conductivity 4th window layer ground floor level, 44 - window emissivity ground floor level, |
---|
673 | !-- 45 - window transmissivity ground floor level, 46 - window albedo ground floor level, |
---|
674 | !-- 47 - green fraction ground floor level, 48 - LAI on wall ground floor level, 49 - green emissivity ground floor level, |
---|
675 | !-- 50 - green albedo ground floor level, 51 - z0 roughness above ground floor level, |
---|
676 | !-- 52 - z0h/z0g roughness heat/humidity above ground floor level, 53 - wall fraction above ground floor level |
---|
677 | !-- 54 - 1st wall layer thickness above ground floor level, 55 - 2nd wall layer thickness above ground floor level |
---|
678 | !-- 56 - 3rd wall layer thickness above ground floor level, 57 - 4th wall layer thickness above ground floor level |
---|
679 | !-- 58 - heat capacity 1st/2nd wall layer above ground floor level, |
---|
680 | !-- 59 - heat capacity 3rd wall layer above ground floor level, |
---|
681 | !-- 60 - heat capacity 4th wall layer above ground floor level, |
---|
682 | !-- 61 - thermal conductivity 1st/2nd wall layer above ground floor level, |
---|
683 | !-- 62 - thermal conductivity 3rd wall layer above ground floor level, |
---|
684 | !-- 63 - thermal conductivity 4th wall layer above ground floor level, |
---|
685 | !-- 64 - wall emissivity above ground floor level, 65 - wall albedo above ground floor level, |
---|
686 | !-- 66 - window fraction above ground floor level, 67 - 1st window layer thickness above ground floor level, |
---|
687 | !-- 68 - 2nd thickness window layer above ground floor level, 69 - 3rd window layer thickness above ground floor level, |
---|
688 | !-- 70 - 4th window layer thickness above ground floor level, |
---|
689 | !-- 71 - heat capacity 1st/2nd window layer above ground floor level, |
---|
690 | !-- 72 - heat capacity 3rd window layer above ground floor level, |
---|
691 | !-- 73 - heat capacity 4th window layer above ground floor level, |
---|
692 | !-- 74 - conductivity 1st/2nd window layer above ground floor level, |
---|
693 | !-- 75 - thermal conductivity 3rd window layer above ground floor level, |
---|
694 | !-- 76 - thermal conductivity 4th window layer above ground floor level, 77 - window emissivity above ground floor level, |
---|
695 | !-- 78 - window transmissivity above ground floor level, 79 - window albedo above ground floor level, |
---|
696 | !-- 80 - green fraction above ground floor level, 81 - LAI on wall above ground floor level, |
---|
697 | !-- 82 - green emissivity above ground floor level, 83 - green albedo above ground floor level, |
---|
698 | !-- 84 - wall fraction roof, 85 - 1st wall layer thickness roof, 86 - 2nd wall layer thickness roof, |
---|
699 | !-- 87 - 3rd wall layer thickness roof, 88 - 4th wall layer thickness roof, |
---|
700 | !-- 89 - heat capacity 1st/2nd wall layer roof, 90 - heat capacity 3rd wall layer roof, |
---|
701 | !-- 91 - heat capacity 4th wall layer roof, 92 - thermal conductivity 1st/2nd wall layer roof, |
---|
702 | !-- 93 - thermal conductivity 3rd wall layer roof, 94 - thermal conductivity 4th wall layer roof, |
---|
703 | !-- 95 - wall emissivity roof, 96 - wall albedo roof, 97 - window fraction roof, |
---|
704 | !-- 98 - window 1st layer thickness roof, 99 - window 2nd layer thickness roof, 100 - window 3rd layer thickness roof, |
---|
705 | !-- 101 - window 4th layer thickness, 102 - heat capacity 1st/2nd window layer roof, |
---|
706 | !-- 103 - heat capacity 3rd window layer roof, 104 - heat capacity 4th window layer roof, |
---|
707 | !-- 105 - thermal conductivity 1st/2nd window layer roof, 106 - thermal conductivity 3rd window layer roof, |
---|
708 | !-- 107 - thermal conductivity 4th window layer roof, 108 - window emissivity roof, 109 - window transmissivity roof, |
---|
709 | !-- 110 - window albedo roof, 111 - green fraction roof ground floor level, |
---|
710 | !-- 112 - green fraction roof above ground floor level, 113 - LAI roof, 114 - green emissivity roof, |
---|
711 | !-- 115 - green albedo roof, 116 - green type roof, |
---|
712 | !-- Parameter for indoor model |
---|
713 | !-- 117 - indoor target summer temperature, 118 - indoor target winter temperature, |
---|
714 | !-- 119 - shading factor, 120 - g-value windows, 121 - u-value windows, 122 - basical airflow without occupancy of the room, |
---|
715 | !-- 123 - additional airflow depend of occupancy of the room, 124 - heat recovery efficiency, |
---|
716 | !-- 125 - dynamic parameter specific effective surface, 126 - dynamic parameter innner heatstorage, |
---|
717 | !-- 127 - ratio internal surface/floor area, 128 - maximal heating capacity, 129 - maximal cooling capacity, |
---|
718 | !-- 130 - additional internal heat gains dependent on occupancy of the room, |
---|
719 | !-- 131 - basic internal heat gains without occupancy of the room, 132 - storey height, 133 - ceiling construction height |
---|
720 | |
---|
721 | |
---|
722 | REAL(wp), DIMENSION(0:133,1:7), PARAMETER :: building_pars = RESHAPE( (/ & |
---|
723 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
724 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
725 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
726 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
727 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
728 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
729 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
730 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
731 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
732 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
733 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
734 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
735 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
736 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
737 | 2.1_wp, 0.93_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
738 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
739 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
740 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
741 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
742 | 0.005_wp, 0.01_wp, 0.31_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
743 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
744 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
745 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
746 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
747 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
748 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
749 | 0.1_wp, 0.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
750 | 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 |
---|
751 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
752 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.42_wp, 2000000.0_wp, & !parameter 6-11 |
---|
753 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
754 | 0.01_wp, 0.001_wp, 0.78_wp, & !parameter 18-20 |
---|
755 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
756 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
757 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
758 | 27.0_wp, 0.22_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
759 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
760 | 0.11_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 41-44 |
---|
761 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
762 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.73_wp, 0.005_wp, & !parameter 50-54 |
---|
763 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
764 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
765 | 0.04_wp, 0.92_wp, 27.0_wp, 0.27_wp, & !parameter 63-66 |
---|
766 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
767 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
768 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
769 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
770 | 0.005_wp, 0.01_wp, 0.5_wp, 0.79_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
771 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
772 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
773 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
774 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
775 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
776 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
777 | 0.1_wp, 0.5_wp, 0.0_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
778 | 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 |
---|
779 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
780 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
781 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
782 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
783 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
784 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
785 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
786 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
787 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
788 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
789 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
790 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
791 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
792 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
793 | 0.035_wp, 0.92_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
794 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
795 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
796 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
797 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
798 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
799 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
800 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
801 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
802 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
803 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
804 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
805 | 0.1_wp, 0.5_wp, 0.8_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
806 | 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 |
---|
807 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
808 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
809 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
810 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
811 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
812 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
813 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
814 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
815 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
816 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
817 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
818 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
819 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
820 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
821 | 2.1_wp, 0.93_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
822 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
823 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
824 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
825 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
826 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
827 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
828 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
829 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
830 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
831 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
832 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
833 | 0.1_wp, 1.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
834 | 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 |
---|
835 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
836 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 6-11 |
---|
837 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
838 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
839 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
840 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
841 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
842 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
843 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
844 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, & !parameter 41-44 |
---|
845 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
846 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
847 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
848 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
849 | 0.04_wp, 0.92_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
850 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
851 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
852 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
853 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
854 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
855 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
856 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
857 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
858 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
859 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
860 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
861 | 0.1_wp, 1.5_wp, 0.65_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
862 | 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 |
---|
863 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
864 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
865 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
866 | 0.01_wp, 0.001_wp, 0.475_wp, & !parameter 18-20 |
---|
867 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
868 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
869 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
870 | 27.0_wp, 0.525_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
871 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
872 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
873 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
874 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.425_wp, 0.005_wp, & !parameter 50-54 |
---|
875 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
876 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
877 | 0.035_wp, 0.92_wp, 27.0_wp, 0.575_wp, & !parameter 63-66 |
---|
878 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
879 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
880 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
881 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
882 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
883 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
884 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
885 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
886 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
887 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
888 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
889 | 0.1_wp, 1.5_wp, 0.9_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
890 | 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 |
---|
891 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
892 | 1.0_wp, 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 6-11 |
---|
893 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 4.0_wp, & !parameter 12-17 |
---|
894 | 0.01_wp, 0.001_wp, 1.0_wp, & !parameter 18-20 |
---|
895 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 21-25 |
---|
896 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, & !parameter 26-28 |
---|
897 | 1.0_wp, 1.0_wp, 0.9_wp, & !parameter 29-31 |
---|
898 | 27.0_wp, 0.0_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
899 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
900 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, & !parameter 41-44 |
---|
901 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
902 | 5.0_wp, 0.001_wp, 0.0001_wp, 1.0_wp, 0.29_wp, & !parameter 50-54 |
---|
903 | 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 55-58 |
---|
904 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, & !parameter 59-62 |
---|
905 | 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 63-66 |
---|
906 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
907 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
908 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
909 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
910 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, 1848000.0_wp, & !parameter 85-90 |
---|
911 | 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
912 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
913 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
914 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
915 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
916 | 299.15_wp, 293.15_wp, 0.8_wp, 100.0_wp, 100.0_wp, & !parameter 117-121 |
---|
917 | 20.0_wp, 20.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 4.5_wp, & !parameter 122-127 |
---|
918 | 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) |
---|
919 | /), & |
---|
920 | (/134, 7/) ) |
---|
921 | |
---|
922 | ! |
---|
923 | !-- Type for surface temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
924 | TYPE t_surf_vertical |
---|
925 | REAL(wp), DIMENSION(:), ALLOCATABLE :: t |
---|
926 | END TYPE t_surf_vertical |
---|
927 | ! |
---|
928 | !-- Type for wall temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
929 | TYPE t_wall_vertical |
---|
930 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t |
---|
931 | END TYPE t_wall_vertical |
---|
932 | |
---|
933 | TYPE surf_type_usm |
---|
934 | REAL(wp), DIMENSION(:), ALLOCATABLE :: var_usm_1d !< 1D prognostic variable |
---|
935 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: var_usm_2d !< 2D prognostic variable |
---|
936 | END TYPE surf_type_usm |
---|
937 | |
---|
938 | #if defined( __nopointer ) |
---|
939 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
940 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
941 | |
---|
942 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
943 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
944 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
945 | #else |
---|
946 | TYPE(surf_type_usm), POINTER :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
947 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
948 | |
---|
949 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h_1, & !< |
---|
950 | m_liq_usm_h_2 !< |
---|
951 | |
---|
952 | TYPE(surf_type_usm), DIMENSION(:), POINTER :: & |
---|
953 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
954 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
955 | |
---|
956 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
957 | m_liq_usm_v_1, & !< |
---|
958 | m_liq_usm_v_2 !< |
---|
959 | #endif |
---|
960 | |
---|
961 | TYPE(surf_type_usm), TARGET :: tm_liq_usm_h_m !< liquid water reservoir tendency (m), horizontal surface elements |
---|
962 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: tm_liq_usm_v_m !< liquid water reservoir tendency (m), vertical surface elements |
---|
963 | |
---|
964 | |
---|
965 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
966 | !-- anthropogenic heat sources |
---|
967 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
968 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: aheat !< daily average of anthropogenic heat (W/m2) |
---|
969 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: aheatprof !< diurnal profiles of anthropogenic heat for particular layers |
---|
970 | INTEGER(iwp) :: naheatlayers = 1 !< number of layers of anthropogenic heat |
---|
971 | |
---|
972 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
973 | !-- wall surface model |
---|
974 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
975 | !-- wall surface model constants |
---|
976 | INTEGER(iwp), PARAMETER :: nzb_wall = 0 !< inner side of the wall model (to be switched) |
---|
977 | INTEGER(iwp), PARAMETER :: nzt_wall = 3 !< outer side of the wall model (to be switched) |
---|
978 | INTEGER(iwp), PARAMETER :: nzw = 4 !< number of wall layers (fixed for now) |
---|
979 | |
---|
980 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
981 | !< normalized soil, wall and roof layer depths (m/m) |
---|
982 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
983 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
984 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
985 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
986 | !< normalized window layer depths (m/m) |
---|
987 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
988 | !< normalized green layer depths (m/m) |
---|
989 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
990 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
991 | |
---|
992 | |
---|
993 | REAL(wp) :: wall_inner_temperature = 295.0_wp !< temperature of the inner wall surface (~22 degrees C) (K) |
---|
994 | REAL(wp) :: roof_inner_temperature = 295.0_wp !< temperature of the inner roof surface (~22 degrees C) (K) |
---|
995 | REAL(wp) :: soil_inner_temperature = 288.0_wp !< temperature of the deep soil (~15 degrees C) (K) |
---|
996 | REAL(wp) :: window_inner_temperature = 295.0_wp !< temperature of the inner window surface (~22 degrees C) (K) |
---|
997 | |
---|
998 | REAL(wp) :: m_total = 0.0_wp !< weighted total water content of the soil (m3/m3) |
---|
999 | INTEGER(iwp) :: soil_type |
---|
1000 | |
---|
1001 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1002 | !-- surface and material model variables for walls, ground, roofs |
---|
1003 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1004 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn !< normalized wall layer depths (m) |
---|
1005 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_window !< normalized window layer depths (m) |
---|
1006 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_green !< normalized green layer depths (m) |
---|
1007 | |
---|
1008 | #if defined( __nopointer ) |
---|
1009 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h !< wall surface temperature (K) at horizontal walls |
---|
1010 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_p !< progn. wall surface temperature (K) at horizontal walls |
---|
1011 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h !< window surface temperature (K) at horizontal walls |
---|
1012 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_p !< progn. window surface temperature (K) at horizontal walls |
---|
1013 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h !< green surface temperature (K) at horizontal walls |
---|
1014 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_p !< progn. green surface temperature (K) at horizontal walls |
---|
1015 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v |
---|
1016 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_p |
---|
1017 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v |
---|
1018 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_p |
---|
1019 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v |
---|
1020 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_p |
---|
1021 | #else |
---|
1022 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h |
---|
1023 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h_p |
---|
1024 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h |
---|
1025 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h_p |
---|
1026 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h |
---|
1027 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h_p |
---|
1028 | |
---|
1029 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_1 |
---|
1030 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_2 |
---|
1031 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_1 |
---|
1032 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_2 |
---|
1033 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_1 |
---|
1034 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_2 |
---|
1035 | |
---|
1036 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v |
---|
1037 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v_p |
---|
1038 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v |
---|
1039 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v_p |
---|
1040 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v |
---|
1041 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v_p |
---|
1042 | |
---|
1043 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_1 |
---|
1044 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_2 |
---|
1045 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_1 |
---|
1046 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_2 |
---|
1047 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_1 |
---|
1048 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_2 |
---|
1049 | |
---|
1050 | #endif |
---|
1051 | |
---|
1052 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1053 | !-- Energy balance variables |
---|
1054 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1055 | !-- parameters of the land, roof and wall surfaces |
---|
1056 | |
---|
1057 | #if defined( __nopointer ) |
---|
1058 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h !< Wall temperature (K) |
---|
1059 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_p !< Prog. wall temperature (K) |
---|
1060 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h !< Window temperature (K) |
---|
1061 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_p !< Prog. window temperature (K) |
---|
1062 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h !< Green temperature (K) |
---|
1063 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_p !< Prog. green temperature (K) |
---|
1064 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h !< soil water content green building layer |
---|
1065 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_av !< avg of soil water content green building layer |
---|
1066 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_p !< Prog. soil water content green building layer |
---|
1067 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_sat_h !< soil water content green building layer at saturation |
---|
1068 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_res_h !< soil water content green building layer residual |
---|
1069 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: rootfr_h !< root fraction green green building layer |
---|
1070 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: wilt_h !< wilting point green building layer |
---|
1071 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: fc_h !< field capacity green building layer |
---|
1072 | |
---|
1073 | |
---|
1074 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v !< Wall temperature (K) |
---|
1075 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_p !< Prog. wall temperature (K) |
---|
1076 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v !< Window temperature (K) |
---|
1077 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_p !< Prog. window temperature (K) |
---|
1078 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v !< Green temperature (K) |
---|
1079 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_p !< Prog. green temperature (K) |
---|
1080 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v !< Wall swc |
---|
1081 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_p !< Prog. swc |
---|
1082 | |
---|
1083 | #else |
---|
1084 | REAL(wp), DIMENSION(:,:), POINTER :: t_wall_h, t_wall_h_p |
---|
1085 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_1, t_wall_h_2 |
---|
1086 | REAL(wp), DIMENSION(:,:), POINTER :: t_window_h, t_window_h_p |
---|
1087 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_1, t_window_h_2 |
---|
1088 | REAL(wp), DIMENSION(:,:), POINTER :: t_green_h, t_green_h_p |
---|
1089 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_1, t_green_h_2 |
---|
1090 | REAL(wp), DIMENSION(:,:), POINTER :: swc_h, rootfr_h, wilt_h, fc_h, swc_sat_h, swc_h_p, swc_res_h |
---|
1091 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_1, rootfr_h_1, & |
---|
1092 | wilt_h_1, fc_h_1, swc_sat_h_1, swc_h_2, swc_res_h_1 |
---|
1093 | |
---|
1094 | |
---|
1095 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_wall_v, t_wall_v_p |
---|
1096 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_1, t_wall_v_2 |
---|
1097 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_window_v, t_window_v_p |
---|
1098 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_1, t_window_v_2 |
---|
1099 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_green_v, t_green_v_p |
---|
1100 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_1, t_green_v_2 |
---|
1101 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: swc_v, swc_v_p |
---|
1102 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_1, swc_v_2 |
---|
1103 | #endif |
---|
1104 | |
---|
1105 | !-- Surface and material parameters classes (surface_type) |
---|
1106 | !-- albedo, emissivity, lambda_surf, roughness, thickness, volumetric heat capacity, thermal conductivity |
---|
1107 | INTEGER(iwp) :: n_surface_types !< number of the wall type categories |
---|
1108 | INTEGER(iwp), PARAMETER :: n_surface_params = 9 !< number of parameters for each type of the wall |
---|
1109 | INTEGER(iwp), PARAMETER :: ialbedo = 1 !< albedo of the surface |
---|
1110 | INTEGER(iwp), PARAMETER :: iemiss = 2 !< emissivity of the surface |
---|
1111 | INTEGER(iwp), PARAMETER :: ilambdas = 3 !< heat conductivity lambda S between surface and material ( W m-2 K-1 ) |
---|
1112 | INTEGER(iwp), PARAMETER :: irough = 4 !< roughness length z0 for movements |
---|
1113 | INTEGER(iwp), PARAMETER :: iroughh = 5 !< roughness length z0h for scalars (heat, humidity,...) |
---|
1114 | INTEGER(iwp), PARAMETER :: icsurf = 6 !< Surface skin layer heat capacity (J m-2 K-1 ) |
---|
1115 | INTEGER(iwp), PARAMETER :: ithick = 7 !< thickness of the surface (wall, roof, land) ( m ) |
---|
1116 | INTEGER(iwp), PARAMETER :: irhoC = 8 !< volumetric heat capacity rho*C of the material ( J m-3 K-1 ) |
---|
1117 | INTEGER(iwp), PARAMETER :: ilambdah = 9 !< thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
1118 | CHARACTER(12), DIMENSION(:), ALLOCATABLE :: surface_type_names !< names of wall types (used only for reports) |
---|
1119 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: surface_type_codes !< codes of wall types |
---|
1120 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: surface_params !< parameters of wall types |
---|
1121 | |
---|
1122 | |
---|
1123 | !-- interfaces of subroutines accessed from outside of this module |
---|
1124 | INTERFACE usm_boundary_condition |
---|
1125 | MODULE PROCEDURE usm_boundary_condition |
---|
1126 | END INTERFACE usm_boundary_condition |
---|
1127 | |
---|
1128 | INTERFACE usm_check_data_output |
---|
1129 | MODULE PROCEDURE usm_check_data_output |
---|
1130 | END INTERFACE usm_check_data_output |
---|
1131 | |
---|
1132 | INTERFACE usm_check_parameters |
---|
1133 | MODULE PROCEDURE usm_check_parameters |
---|
1134 | END INTERFACE usm_check_parameters |
---|
1135 | |
---|
1136 | INTERFACE usm_data_output_3d |
---|
1137 | MODULE PROCEDURE usm_data_output_3d |
---|
1138 | END INTERFACE usm_data_output_3d |
---|
1139 | |
---|
1140 | INTERFACE usm_define_netcdf_grid |
---|
1141 | MODULE PROCEDURE usm_define_netcdf_grid |
---|
1142 | END INTERFACE usm_define_netcdf_grid |
---|
1143 | |
---|
1144 | INTERFACE usm_init_urban_surface |
---|
1145 | MODULE PROCEDURE usm_init_urban_surface |
---|
1146 | END INTERFACE usm_init_urban_surface |
---|
1147 | |
---|
1148 | INTERFACE usm_material_heat_model |
---|
1149 | MODULE PROCEDURE usm_material_heat_model |
---|
1150 | END INTERFACE usm_material_heat_model |
---|
1151 | |
---|
1152 | INTERFACE usm_green_heat_model |
---|
1153 | MODULE PROCEDURE usm_green_heat_model |
---|
1154 | END INTERFACE usm_green_heat_model |
---|
1155 | |
---|
1156 | INTERFACE usm_parin |
---|
1157 | MODULE PROCEDURE usm_parin |
---|
1158 | END INTERFACE usm_parin |
---|
1159 | |
---|
1160 | INTERFACE usm_rrd_local |
---|
1161 | MODULE PROCEDURE usm_rrd_local |
---|
1162 | END INTERFACE usm_rrd_local |
---|
1163 | |
---|
1164 | INTERFACE usm_surface_energy_balance |
---|
1165 | MODULE PROCEDURE usm_surface_energy_balance |
---|
1166 | END INTERFACE usm_surface_energy_balance |
---|
1167 | |
---|
1168 | INTERFACE usm_swap_timelevel |
---|
1169 | MODULE PROCEDURE usm_swap_timelevel |
---|
1170 | END INTERFACE usm_swap_timelevel |
---|
1171 | |
---|
1172 | INTERFACE usm_wrd_local |
---|
1173 | MODULE PROCEDURE usm_wrd_local |
---|
1174 | END INTERFACE usm_wrd_local |
---|
1175 | |
---|
1176 | INTERFACE usm_allocate_surface |
---|
1177 | MODULE PROCEDURE usm_allocate_surface |
---|
1178 | END INTERFACE usm_allocate_surface |
---|
1179 | |
---|
1180 | INTERFACE usm_average_3d_data |
---|
1181 | MODULE PROCEDURE usm_average_3d_data |
---|
1182 | END INTERFACE usm_average_3d_data |
---|
1183 | |
---|
1184 | |
---|
1185 | SAVE |
---|
1186 | |
---|
1187 | PRIVATE |
---|
1188 | |
---|
1189 | !-- Public functions |
---|
1190 | PUBLIC usm_boundary_condition, usm_check_parameters, usm_init_urban_surface,& |
---|
1191 | usm_rrd_local, & |
---|
1192 | usm_surface_energy_balance, usm_material_heat_model, & |
---|
1193 | usm_swap_timelevel, usm_check_data_output, usm_average_3d_data, & |
---|
1194 | usm_data_output_3d, usm_define_netcdf_grid, usm_parin, & |
---|
1195 | usm_wrd_local, usm_allocate_surface |
---|
1196 | |
---|
1197 | !-- Public parameters, constants and initial values |
---|
1198 | PUBLIC usm_anthropogenic_heat, usm_material_model, usm_wall_mod, & |
---|
1199 | usm_green_heat_model, building_pars, & |
---|
1200 | nzt_wall, t_wall_h, t_wall_v, & |
---|
1201 | t_window_h, t_window_v, building_type |
---|
1202 | |
---|
1203 | |
---|
1204 | |
---|
1205 | CONTAINS |
---|
1206 | |
---|
1207 | !------------------------------------------------------------------------------! |
---|
1208 | ! Description: |
---|
1209 | ! ------------ |
---|
1210 | !> This subroutine creates the necessary indices of the urban surfaces |
---|
1211 | !> and plant canopy and it allocates the needed arrays for USM |
---|
1212 | !------------------------------------------------------------------------------! |
---|
1213 | SUBROUTINE usm_allocate_surface |
---|
1214 | |
---|
1215 | IMPLICIT NONE |
---|
1216 | |
---|
1217 | INTEGER(iwp) :: l |
---|
1218 | |
---|
1219 | ! |
---|
1220 | !-- Allocate radiation arrays which are part of the new data type. |
---|
1221 | !-- For horizontal surfaces. |
---|
1222 | ALLOCATE( surf_usm_h%surfhf(1:surf_usm_h%ns) ) |
---|
1223 | ALLOCATE( surf_usm_h%rad_net_l(1:surf_usm_h%ns) ) |
---|
1224 | ! |
---|
1225 | !-- For vertical surfaces |
---|
1226 | DO l = 0, 3 |
---|
1227 | ALLOCATE( surf_usm_v(l)%surfhf(1:surf_usm_v(l)%ns) ) |
---|
1228 | ALLOCATE( surf_usm_v(l)%rad_net_l(1:surf_usm_v(l)%ns) ) |
---|
1229 | ENDDO |
---|
1230 | |
---|
1231 | !-- Wall surface model |
---|
1232 | !-- allocate arrays for wall surface model and define pointers |
---|
1233 | |
---|
1234 | !-- allocate array of wall types and wall parameters |
---|
1235 | ALLOCATE ( surf_usm_h%surface_types(1:surf_usm_h%ns) ) |
---|
1236 | ALLOCATE ( surf_usm_h%building_type(1:surf_usm_h%ns) ) |
---|
1237 | ALLOCATE ( surf_usm_h%building_type_name(1:surf_usm_h%ns) ) |
---|
1238 | surf_usm_h%building_type = 0 |
---|
1239 | surf_usm_h%building_type_name = 'none' |
---|
1240 | DO l = 0, 3 |
---|
1241 | ALLOCATE( surf_usm_v(l)%surface_types(1:surf_usm_v(l)%ns) ) |
---|
1242 | ALLOCATE ( surf_usm_v(l)%building_type(1:surf_usm_v(l)%ns) ) |
---|
1243 | ALLOCATE ( surf_usm_v(l)%building_type_name(1:surf_usm_v(l)%ns) ) |
---|
1244 | surf_usm_v(l)%building_type = 0 |
---|
1245 | surf_usm_v(l)%building_type_name = 'none' |
---|
1246 | ENDDO |
---|
1247 | ! |
---|
1248 | !-- Allocate albedo_type and albedo. Each surface element |
---|
1249 | !-- has 3 values, 0: wall fraction, 1: green fraction, 2: window fraction. |
---|
1250 | ALLOCATE( surf_usm_h%albedo_type(0:2,1:surf_usm_h%ns) ) |
---|
1251 | ALLOCATE( surf_usm_h%albedo(0:2,1:surf_usm_h%ns) ) |
---|
1252 | surf_usm_h%albedo_type = albedo_type |
---|
1253 | DO l = 0, 3 |
---|
1254 | ALLOCATE( surf_usm_v(l)%albedo_type(0:2,1:surf_usm_v(l)%ns) ) |
---|
1255 | ALLOCATE( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns) ) |
---|
1256 | surf_usm_v(l)%albedo_type = albedo_type |
---|
1257 | ENDDO |
---|
1258 | |
---|
1259 | |
---|
1260 | ! |
---|
1261 | !-- Allocate indoor target temperature for summer and winter |
---|
1262 | ALLOCATE( surf_usm_h%target_temp_summer(1:surf_usm_h%ns) ) |
---|
1263 | ALLOCATE( surf_usm_h%target_temp_winter(1:surf_usm_h%ns) ) |
---|
1264 | DO l = 0, 3 |
---|
1265 | ALLOCATE( surf_usm_v(l)%target_temp_summer(1:surf_usm_v(l)%ns) ) |
---|
1266 | ALLOCATE( surf_usm_v(l)%target_temp_winter(1:surf_usm_v(l)%ns) ) |
---|
1267 | ENDDO |
---|
1268 | ! |
---|
1269 | !-- Allocate flag indicating ground floor level surface elements |
---|
1270 | ALLOCATE ( surf_usm_h%ground_level(1:surf_usm_h%ns) ) |
---|
1271 | DO l = 0, 3 |
---|
1272 | ALLOCATE( surf_usm_v(l)%ground_level(1:surf_usm_v(l)%ns) ) |
---|
1273 | ENDDO |
---|
1274 | ! |
---|
1275 | !-- Allocate arrays for relative surface fraction. |
---|
1276 | !-- 0 - wall fraction, 1 - green fraction, 2 - window fraction |
---|
1277 | ALLOCATE( surf_usm_h%frac(0:2,1:surf_usm_h%ns) ) |
---|
1278 | surf_usm_h%frac = 0.0_wp |
---|
1279 | DO l = 0, 3 |
---|
1280 | ALLOCATE( surf_usm_v(l)%frac(0:2,1:surf_usm_v(l)%ns) ) |
---|
1281 | surf_usm_v(l)%frac = 0.0_wp |
---|
1282 | ENDDO |
---|
1283 | |
---|
1284 | !-- wall and roof surface parameters. First for horizontal surfaces |
---|
1285 | ALLOCATE ( surf_usm_h%isroof_surf(1:surf_usm_h%ns) ) |
---|
1286 | ALLOCATE ( surf_usm_h%lambda_surf(1:surf_usm_h%ns) ) |
---|
1287 | ALLOCATE ( surf_usm_h%lambda_surf_window(1:surf_usm_h%ns) ) |
---|
1288 | ALLOCATE ( surf_usm_h%lambda_surf_green(1:surf_usm_h%ns) ) |
---|
1289 | ALLOCATE ( surf_usm_h%c_surface(1:surf_usm_h%ns) ) |
---|
1290 | ALLOCATE ( surf_usm_h%c_surface_window(1:surf_usm_h%ns) ) |
---|
1291 | ALLOCATE ( surf_usm_h%c_surface_green(1:surf_usm_h%ns) ) |
---|
1292 | ALLOCATE ( surf_usm_h%transmissivity(1:surf_usm_h%ns) ) |
---|
1293 | ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns) ) |
---|
1294 | ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns) ) |
---|
1295 | ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns) ) |
---|
1296 | ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns) ) |
---|
1297 | ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns) ) |
---|
1298 | ALLOCATE ( surf_usm_h%green_type_roof(1:surf_usm_h%ns) ) |
---|
1299 | ALLOCATE ( surf_usm_h%r_s(1:surf_usm_h%ns) ) |
---|
1300 | |
---|
1301 | ! |
---|
1302 | !-- For vertical surfaces. |
---|
1303 | DO l = 0, 3 |
---|
1304 | ALLOCATE ( surf_usm_v(l)%lambda_surf(1:surf_usm_v(l)%ns) ) |
---|
1305 | ALLOCATE ( surf_usm_v(l)%c_surface(1:surf_usm_v(l)%ns) ) |
---|
1306 | ALLOCATE ( surf_usm_v(l)%lambda_surf_window(1:surf_usm_v(l)%ns) ) |
---|
1307 | ALLOCATE ( surf_usm_v(l)%c_surface_window(1:surf_usm_v(l)%ns) ) |
---|
1308 | ALLOCATE ( surf_usm_v(l)%lambda_surf_green(1:surf_usm_v(l)%ns) ) |
---|
1309 | ALLOCATE ( surf_usm_v(l)%c_surface_green(1:surf_usm_v(l)%ns) ) |
---|
1310 | ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns) ) |
---|
1311 | ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns) ) |
---|
1312 | ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns) ) |
---|
1313 | ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) |
---|
1314 | ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) |
---|
1315 | ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) |
---|
1316 | ALLOCATE ( surf_usm_v(l)%r_s(1:surf_usm_v(l)%ns) ) |
---|
1317 | ENDDO |
---|
1318 | |
---|
1319 | ! |
---|
1320 | !-- allocate wall and roof material parameters. First for horizontal surfaces |
---|
1321 | ALLOCATE ( surf_usm_h%thickness_wall(1:surf_usm_h%ns) ) |
---|
1322 | ALLOCATE ( surf_usm_h%thickness_window(1:surf_usm_h%ns) ) |
---|
1323 | ALLOCATE ( surf_usm_h%thickness_green(1:surf_usm_h%ns) ) |
---|
1324 | ALLOCATE ( surf_usm_h%lambda_h(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1325 | ALLOCATE ( surf_usm_h%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1326 | ALLOCATE ( surf_usm_h%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1327 | ALLOCATE ( surf_usm_h%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1328 | ALLOCATE ( surf_usm_h%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1329 | ALLOCATE ( surf_usm_h%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1330 | |
---|
1331 | ALLOCATE ( surf_usm_h%rho_c_total_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1332 | ALLOCATE ( surf_usm_h%n_vg_green(1:surf_usm_h%ns) ) |
---|
1333 | ALLOCATE ( surf_usm_h%alpha_vg_green(1:surf_usm_h%ns) ) |
---|
1334 | ALLOCATE ( surf_usm_h%l_vg_green(1:surf_usm_h%ns) ) |
---|
1335 | ALLOCATE ( surf_usm_h%gamma_w_green_sat(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1336 | ALLOCATE ( surf_usm_h%lambda_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1337 | ALLOCATE ( surf_usm_h%gamma_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1338 | ALLOCATE ( surf_usm_h%tswc_h_m(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1339 | |
---|
1340 | ! |
---|
1341 | !-- For vertical surfaces. |
---|
1342 | DO l = 0, 3 |
---|
1343 | ALLOCATE ( surf_usm_v(l)%thickness_wall(1:surf_usm_v(l)%ns) ) |
---|
1344 | ALLOCATE ( surf_usm_v(l)%thickness_window(1:surf_usm_v(l)%ns) ) |
---|
1345 | ALLOCATE ( surf_usm_v(l)%thickness_green(1:surf_usm_v(l)%ns) ) |
---|
1346 | ALLOCATE ( surf_usm_v(l)%lambda_h(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1347 | ALLOCATE ( surf_usm_v(l)%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1348 | ALLOCATE ( surf_usm_v(l)%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1349 | ALLOCATE ( surf_usm_v(l)%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1350 | ALLOCATE ( surf_usm_v(l)%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1351 | ALLOCATE ( surf_usm_v(l)%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1352 | ENDDO |
---|
1353 | |
---|
1354 | ! |
---|
1355 | !-- allocate green wall and roof vegetation and soil parameters. First horizontal surfaces |
---|
1356 | ALLOCATE ( surf_usm_h%g_d(1:surf_usm_h%ns) ) |
---|
1357 | ALLOCATE ( surf_usm_h%c_liq(1:surf_usm_h%ns) ) |
---|
1358 | ALLOCATE ( surf_usm_h%qsws_liq(1:surf_usm_h%ns) ) |
---|
1359 | ALLOCATE ( surf_usm_h%qsws_veg(1:surf_usm_h%ns) ) |
---|
1360 | ALLOCATE ( surf_usm_h%r_canopy(1:surf_usm_h%ns) ) |
---|
1361 | ALLOCATE ( surf_usm_h%r_canopy_min(1:surf_usm_h%ns) ) |
---|
1362 | ALLOCATE ( surf_usm_h%qsws_eb(1:surf_usm_h%ns) ) |
---|
1363 | ALLOCATE ( surf_usm_h%pt_10cm(1:surf_usm_h%ns) ) |
---|
1364 | ALLOCATE ( surf_usm_h%pt_2m(1:surf_usm_h%ns) ) |
---|
1365 | |
---|
1366 | ! |
---|
1367 | !-- For vertical surfaces. |
---|
1368 | DO l = 0, 3 |
---|
1369 | ALLOCATE ( surf_usm_v(l)%g_d(1:surf_usm_v(l)%ns) ) |
---|
1370 | ALLOCATE ( surf_usm_v(l)%c_liq(1:surf_usm_v(l)%ns) ) |
---|
1371 | ALLOCATE ( surf_usm_v(l)%qsws_liq(1:surf_usm_v(l)%ns) ) |
---|
1372 | ALLOCATE ( surf_usm_v(l)%qsws_veg(1:surf_usm_v(l)%ns) ) |
---|
1373 | ALLOCATE ( surf_usm_v(l)%qsws_eb(1:surf_usm_v(l)%ns) ) |
---|
1374 | ALLOCATE ( surf_usm_v(l)%r_canopy(1:surf_usm_v(l)%ns) ) |
---|
1375 | ALLOCATE ( surf_usm_v(l)%r_canopy_min(1:surf_usm_v(l)%ns) ) |
---|
1376 | ALLOCATE ( surf_usm_v(l)%pt_10cm(1:surf_usm_v(l)%ns) ) |
---|
1377 | ENDDO |
---|
1378 | |
---|
1379 | !-- allocate wall and roof layers sizes. For horizontal surfaces. |
---|
1380 | ALLOCATE ( zwn(nzb_wall:nzt_wall) ) |
---|
1381 | ALLOCATE ( surf_usm_h%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1382 | ALLOCATE ( zwn_window(nzb_wall:nzt_wall) ) |
---|
1383 | ALLOCATE ( surf_usm_h%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1384 | ALLOCATE ( zwn_green(nzb_wall:nzt_wall) ) |
---|
1385 | ALLOCATE ( surf_usm_h%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1386 | ALLOCATE ( surf_usm_h%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1387 | ALLOCATE ( surf_usm_h%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1388 | ALLOCATE ( surf_usm_h%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1389 | ALLOCATE ( surf_usm_h%zw(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1390 | ALLOCATE ( surf_usm_h%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1391 | ALLOCATE ( surf_usm_h%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1392 | ALLOCATE ( surf_usm_h%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1393 | ALLOCATE ( surf_usm_h%zw_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1394 | ALLOCATE ( surf_usm_h%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1395 | ALLOCATE ( surf_usm_h%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1396 | ALLOCATE ( surf_usm_h%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1397 | ALLOCATE ( surf_usm_h%zw_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1398 | ! |
---|
1399 | !-- For vertical surfaces. |
---|
1400 | DO l = 0, 3 |
---|
1401 | ALLOCATE ( surf_usm_v(l)%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1402 | ALLOCATE ( surf_usm_v(l)%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1403 | ALLOCATE ( surf_usm_v(l)%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1404 | ALLOCATE ( surf_usm_v(l)%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1405 | ALLOCATE ( surf_usm_v(l)%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1406 | ALLOCATE ( surf_usm_v(l)%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1407 | ALLOCATE ( surf_usm_v(l)%zw(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1408 | ALLOCATE ( surf_usm_v(l)%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1409 | ALLOCATE ( surf_usm_v(l)%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1410 | ALLOCATE ( surf_usm_v(l)%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1411 | ALLOCATE ( surf_usm_v(l)%zw_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1412 | ALLOCATE ( surf_usm_v(l)%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1413 | ALLOCATE ( surf_usm_v(l)%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1414 | ALLOCATE ( surf_usm_v(l)%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1415 | ALLOCATE ( surf_usm_v(l)%zw_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1416 | ENDDO |
---|
1417 | |
---|
1418 | !-- allocate wall and roof temperature arrays, for horizontal walls |
---|
1419 | #if defined( __nopointer ) |
---|
1420 | IF ( .NOT. ALLOCATED( t_surf_wall_h ) ) & |
---|
1421 | ALLOCATE ( t_surf_wall_h(1:surf_usm_h%ns) ) |
---|
1422 | IF ( .NOT. ALLOCATED( t_surf_wall_h_p ) ) & |
---|
1423 | ALLOCATE ( t_surf_wall_h_p(1:surf_usm_h%ns) ) |
---|
1424 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
1425 | ALLOCATE ( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1426 | IF ( .NOT. ALLOCATED( t_wall_h_p ) ) & |
---|
1427 | ALLOCATE ( t_wall_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1428 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
1429 | ALLOCATE ( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
1430 | IF ( .NOT. ALLOCATED( t_surf_window_h_p ) ) & |
---|
1431 | ALLOCATE ( t_surf_window_h_p(1:surf_usm_h%ns) ) |
---|
1432 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
1433 | ALLOCATE ( t_window_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1434 | IF ( .NOT. ALLOCATED( t_window_h_p ) ) & |
---|
1435 | ALLOCATE ( t_window_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1436 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
1437 | ALLOCATE ( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
1438 | IF ( .NOT. ALLOCATED( t_surf_green_h_p ) ) & |
---|
1439 | ALLOCATE ( t_surf_green_h_p(1:surf_usm_h%ns) ) |
---|
1440 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
1441 | ALLOCATE ( t_green_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1442 | IF ( .NOT. ALLOCATED( t_green_h_p ) ) & |
---|
1443 | ALLOCATE ( t_green_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1444 | IF ( .NOT. ALLOCATED( swc_h ) ) & |
---|
1445 | ALLOCATE ( swc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1446 | IF ( .NOT. ALLOCATED( swc_sat_h ) ) & |
---|
1447 | ALLOCATE ( swc_sat_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1448 | IF ( .NOT. ALLOCATED( swc_res_h ) ) & |
---|
1449 | ALLOCATE ( swc_res_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1450 | IF ( .NOT. ALLOCATED( rootfr_h ) ) & |
---|
1451 | ALLOCATE ( rootfr_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1452 | IF ( .NOT. ALLOCATED( wilt_h ) ) & |
---|
1453 | ALLOCATE ( wilt_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1454 | IF ( .NOT. ALLOCATED( fc_h ) ) & |
---|
1455 | ALLOCATE ( fc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1456 | |
---|
1457 | IF ( .NOT. ALLOCATED( m_liq_usm_h%var_usm_1d ) ) & |
---|
1458 | ALLOCATE ( m_liq_usm_h%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1459 | |
---|
1460 | !-- Horizontal surfaces |
---|
1461 | ALLOCATE ( m_liq_usm_h_p%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1462 | ! |
---|
1463 | !-- Vertical surfaces |
---|
1464 | DO l = 0, 3 |
---|
1465 | ALLOCATE ( m_liq_usm_v_p(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1466 | ENDDO |
---|
1467 | |
---|
1468 | #else |
---|
1469 | ! |
---|
1470 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1471 | !-- might be already allocated. |
---|
1472 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
1473 | ALLOCATE ( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
1474 | IF ( .NOT. ALLOCATED( t_surf_wall_h_2 ) ) & |
---|
1475 | ALLOCATE ( t_surf_wall_h_2(1:surf_usm_h%ns) ) |
---|
1476 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
1477 | ALLOCATE ( t_wall_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1478 | IF ( .NOT. ALLOCATED( t_wall_h_2 ) ) & |
---|
1479 | ALLOCATE ( t_wall_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1480 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
1481 | ALLOCATE ( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
1482 | IF ( .NOT. ALLOCATED( t_surf_window_h_2 ) ) & |
---|
1483 | ALLOCATE ( t_surf_window_h_2(1:surf_usm_h%ns) ) |
---|
1484 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
1485 | ALLOCATE ( t_window_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1486 | IF ( .NOT. ALLOCATED( t_window_h_2 ) ) & |
---|
1487 | ALLOCATE ( t_window_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1488 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
1489 | ALLOCATE ( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
1490 | IF ( .NOT. ALLOCATED( t_surf_green_h_2 ) ) & |
---|
1491 | ALLOCATE ( t_surf_green_h_2(1:surf_usm_h%ns) ) |
---|
1492 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
1493 | ALLOCATE ( t_green_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1494 | IF ( .NOT. ALLOCATED( t_green_h_2 ) ) & |
---|
1495 | ALLOCATE ( t_green_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1496 | IF ( .NOT. ALLOCATED( swc_h_1 ) ) & |
---|
1497 | ALLOCATE ( swc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1498 | IF ( .NOT. ALLOCATED( swc_sat_h_1 ) ) & |
---|
1499 | ALLOCATE ( swc_sat_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1500 | IF ( .NOT. ALLOCATED( swc_res_h_1 ) ) & |
---|
1501 | ALLOCATE ( swc_res_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1502 | IF ( .NOT. ALLOCATED( swc_h_2 ) ) & |
---|
1503 | ALLOCATE ( swc_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1504 | IF ( .NOT. ALLOCATED( rootfr_h_1 ) ) & |
---|
1505 | ALLOCATE ( rootfr_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1506 | IF ( .NOT. ALLOCATED( wilt_h_1 ) ) & |
---|
1507 | ALLOCATE ( wilt_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1508 | IF ( .NOT. ALLOCATED( fc_h_1 ) ) & |
---|
1509 | ALLOCATE ( fc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1510 | |
---|
1511 | IF ( .NOT. ALLOCATED( m_liq_usm_h_1%var_usm_1d ) ) & |
---|
1512 | ALLOCATE ( m_liq_usm_h_1%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1513 | IF ( .NOT. ALLOCATED( m_liq_usm_h_2%var_usm_1d ) ) & |
---|
1514 | ALLOCATE ( m_liq_usm_h_2%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1515 | |
---|
1516 | ! |
---|
1517 | !-- initial assignment of the pointers |
---|
1518 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
1519 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
1520 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
1521 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
1522 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
1523 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
1524 | m_liq_usm_h => m_liq_usm_h_1; m_liq_usm_h_p => m_liq_usm_h_2 |
---|
1525 | swc_h => swc_h_1; swc_h_p => swc_h_2 |
---|
1526 | swc_sat_h => swc_sat_h_1 |
---|
1527 | swc_res_h => swc_res_h_1 |
---|
1528 | rootfr_h => rootfr_h_1 |
---|
1529 | wilt_h => wilt_h_1 |
---|
1530 | fc_h => fc_h_1 |
---|
1531 | |
---|
1532 | #endif |
---|
1533 | |
---|
1534 | !-- allocate wall and roof temperature arrays, for vertical walls if required |
---|
1535 | #if defined( __nopointer ) |
---|
1536 | DO l = 0, 3 |
---|
1537 | IF ( .NOT. ALLOCATED( t_surf_wall_v(l)%t ) ) & |
---|
1538 | ALLOCATE ( t_surf_wall_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1539 | IF ( .NOT. ALLOCATED( t_surf_wall_v_p(l)%t ) ) & |
---|
1540 | ALLOCATE ( t_surf_wall_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1541 | IF ( .NOT. ALLOCATED( t_wall_v(l)%t ) ) & |
---|
1542 | ALLOCATE ( t_wall_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1543 | IF ( .NOT. ALLOCATED( t_wall_v_p(l)%t ) ) & |
---|
1544 | ALLOCATE ( t_wall_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1545 | IF ( .NOT. ALLOCATED( t_surf_window_v(l)%t ) ) & |
---|
1546 | ALLOCATE ( t_surf_window_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1547 | IF ( .NOT. ALLOCATED( t_surf_window_v_p(l)%t ) ) & |
---|
1548 | ALLOCATE ( t_surf_window_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1549 | IF ( .NOT. ALLOCATED( t_window_v(l)%t ) ) & |
---|
1550 | ALLOCATE ( t_window_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1551 | IF ( .NOT. ALLOCATED( t_window_v_p(l)%t ) ) & |
---|
1552 | ALLOCATE ( t_window_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1553 | IF ( .NOT. ALLOCATED( t_green_v(l)%t ) ) & |
---|
1554 | ALLOCATE ( t_green_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1555 | IF ( .NOT. ALLOCATED( t_green_v_p(l)%t ) ) & |
---|
1556 | ALLOCATE ( t_green_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1557 | IF ( .NOT. ALLOCATED( t_surf_green_v(l)%t ) ) & |
---|
1558 | ALLOCATE ( t_surf_green_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1559 | IF ( .NOT. ALLOCATED( t_surf_green_v_p(l)%t ) ) & |
---|
1560 | ALLOCATE ( t_surf_green_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1561 | IF ( .NOT. ALLOCATED( m_liq_usm_v(l)%var_usm_1d ) ) & |
---|
1562 | ALLOCATE ( m_liq_usm_v(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1563 | IF ( .NOT. ALLOCATED( swc_v(l)%t ) ) & |
---|
1564 | ALLOCATE ( swc_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1565 | IF ( .NOT. ALLOCATED( swc_v_p(l)%t ) ) & |
---|
1566 | ALLOCATE ( swc_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1567 | ENDDO |
---|
1568 | #else |
---|
1569 | ! |
---|
1570 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1571 | !-- might be already allocated. |
---|
1572 | DO l = 0, 3 |
---|
1573 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(l)%t ) ) & |
---|
1574 | ALLOCATE ( t_surf_wall_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1575 | IF ( .NOT. ALLOCATED( t_surf_wall_v_2(l)%t ) ) & |
---|
1576 | ALLOCATE ( t_surf_wall_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1577 | IF ( .NOT. ALLOCATED( t_wall_v_1(l)%t ) ) & |
---|
1578 | ALLOCATE ( t_wall_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1579 | IF ( .NOT. ALLOCATED( t_wall_v_2(l)%t ) ) & |
---|
1580 | ALLOCATE ( t_wall_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1581 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(l)%t ) ) & |
---|
1582 | ALLOCATE ( t_surf_window_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1583 | IF ( .NOT. ALLOCATED( t_surf_window_v_2(l)%t ) ) & |
---|
1584 | ALLOCATE ( t_surf_window_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1585 | IF ( .NOT. ALLOCATED( t_window_v_1(l)%t ) ) & |
---|
1586 | ALLOCATE ( t_window_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1587 | IF ( .NOT. ALLOCATED( t_window_v_2(l)%t ) ) & |
---|
1588 | ALLOCATE ( t_window_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1589 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(l)%t ) ) & |
---|
1590 | ALLOCATE ( t_surf_green_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1591 | IF ( .NOT. ALLOCATED( t_surf_green_v_2(l)%t ) ) & |
---|
1592 | ALLOCATE ( t_surf_green_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1593 | IF ( .NOT. ALLOCATED( t_green_v_1(l)%t ) ) & |
---|
1594 | ALLOCATE ( t_green_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1595 | IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) ) & |
---|
1596 | ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1597 | IF ( .NOT. ALLOCATED( m_liq_usm_v_1(l)%var_usm_1d ) ) & |
---|
1598 | ALLOCATE ( m_liq_usm_v_1(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1599 | IF ( .NOT. ALLOCATED( m_liq_usm_v_2(l)%var_usm_1d ) ) & |
---|
1600 | ALLOCATE ( m_liq_usm_v_2(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1601 | IF ( .NOT. ALLOCATED( swc_v_1(l)%t ) ) & |
---|
1602 | ALLOCATE ( swc_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1603 | IF ( .NOT. ALLOCATED( swc_v_2(l)%t ) ) & |
---|
1604 | ALLOCATE ( swc_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1605 | ENDDO |
---|
1606 | ! |
---|
1607 | !-- initial assignment of the pointers |
---|
1608 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
1609 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
1610 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
1611 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
1612 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
1613 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
1614 | m_liq_usm_v => m_liq_usm_v_1; m_liq_usm_v_p => m_liq_usm_v_2 |
---|
1615 | swc_v => swc_v_1; swc_v_p => swc_v_2 |
---|
1616 | |
---|
1617 | #endif |
---|
1618 | ! |
---|
1619 | !-- Allocate intermediate timestep arrays. For horizontal surfaces. |
---|
1620 | ALLOCATE ( surf_usm_h%tt_surface_wall_m(1:surf_usm_h%ns) ) |
---|
1621 | ALLOCATE ( surf_usm_h%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1622 | ALLOCATE ( surf_usm_h%tt_surface_window_m(1:surf_usm_h%ns) ) |
---|
1623 | ALLOCATE ( surf_usm_h%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1624 | ALLOCATE ( surf_usm_h%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1625 | ALLOCATE ( surf_usm_h%tt_surface_green_m(1:surf_usm_h%ns) ) |
---|
1626 | |
---|
1627 | ! |
---|
1628 | !-- Allocate intermediate timestep arrays |
---|
1629 | !-- Horizontal surfaces |
---|
1630 | ALLOCATE ( tm_liq_usm_h_m%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1631 | ! |
---|
1632 | !-- Horizontal surfaces |
---|
1633 | DO l = 0, 3 |
---|
1634 | ALLOCATE ( tm_liq_usm_v_m(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1635 | ENDDO |
---|
1636 | |
---|
1637 | ! |
---|
1638 | !-- Set inital values for prognostic quantities |
---|
1639 | IF ( ALLOCATED( surf_usm_h%tt_surface_wall_m ) ) surf_usm_h%tt_surface_wall_m = 0.0_wp |
---|
1640 | IF ( ALLOCATED( surf_usm_h%tt_wall_m ) ) surf_usm_h%tt_wall_m = 0.0_wp |
---|
1641 | IF ( ALLOCATED( surf_usm_h%tt_surface_window_m ) ) surf_usm_h%tt_surface_window_m = 0.0_wp |
---|
1642 | IF ( ALLOCATED( surf_usm_h%tt_window_m ) ) surf_usm_h%tt_window_m = 0.0_wp |
---|
1643 | IF ( ALLOCATED( surf_usm_h%tt_green_m ) ) surf_usm_h%tt_green_m = 0.0_wp |
---|
1644 | IF ( ALLOCATED( surf_usm_h%tt_surface_green_m ) ) surf_usm_h%tt_surface_green_m = 0.0_wp |
---|
1645 | ! |
---|
1646 | !-- Now, for vertical surfaces |
---|
1647 | DO l = 0, 3 |
---|
1648 | ALLOCATE ( surf_usm_v(l)%tt_surface_wall_m(1:surf_usm_v(l)%ns) ) |
---|
1649 | ALLOCATE ( surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1650 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_wall_m ) ) surf_usm_v(l)%tt_surface_wall_m = 0.0_wp |
---|
1651 | IF ( ALLOCATED( surf_usm_v(l)%tt_wall_m ) ) surf_usm_v(l)%tt_wall_m = 0.0_wp |
---|
1652 | ALLOCATE ( surf_usm_v(l)%tt_surface_window_m(1:surf_usm_v(l)%ns) ) |
---|
1653 | ALLOCATE ( surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1654 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_window_m ) ) surf_usm_v(l)%tt_surface_window_m = 0.0_wp |
---|
1655 | IF ( ALLOCATED( surf_usm_v(l)%tt_window_m ) ) surf_usm_v(l)%tt_window_m = 0.0_wp |
---|
1656 | ALLOCATE ( surf_usm_v(l)%tt_surface_green_m(1:surf_usm_v(l)%ns) ) |
---|
1657 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_green_m ) ) surf_usm_v(l)%tt_surface_green_m = 0.0_wp |
---|
1658 | ALLOCATE ( surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1659 | IF ( ALLOCATED( surf_usm_v(l)%tt_green_m ) ) surf_usm_v(l)%tt_green_m = 0.0_wp |
---|
1660 | ENDDO |
---|
1661 | |
---|
1662 | !-- allocate wall heat flux output array and set initial values. For horizontal surfaces |
---|
1663 | ! ALLOCATE ( surf_usm_h%wshf(1:surf_usm_h%ns) ) !can be removed |
---|
1664 | ALLOCATE ( surf_usm_h%wshf_eb(1:surf_usm_h%ns) ) |
---|
1665 | ALLOCATE ( surf_usm_h%wghf_eb(1:surf_usm_h%ns) ) |
---|
1666 | ALLOCATE ( surf_usm_h%wghf_eb_window(1:surf_usm_h%ns) ) |
---|
1667 | ALLOCATE ( surf_usm_h%wghf_eb_green(1:surf_usm_h%ns) ) |
---|
1668 | ALLOCATE ( surf_usm_h%iwghf_eb(1:surf_usm_h%ns) ) |
---|
1669 | ALLOCATE ( surf_usm_h%iwghf_eb_window(1:surf_usm_h%ns) ) |
---|
1670 | IF ( ALLOCATED( surf_usm_h%wshf ) ) surf_usm_h%wshf = 0.0_wp |
---|
1671 | IF ( ALLOCATED( surf_usm_h%wshf_eb ) ) surf_usm_h%wshf_eb = 0.0_wp |
---|
1672 | IF ( ALLOCATED( surf_usm_h%wghf_eb ) ) surf_usm_h%wghf_eb = 0.0_wp |
---|
1673 | IF ( ALLOCATED( surf_usm_h%wghf_eb_window ) ) surf_usm_h%wghf_eb_window = 0.0_wp |
---|
1674 | IF ( ALLOCATED( surf_usm_h%wghf_eb_green ) ) surf_usm_h%wghf_eb_green = 0.0_wp |
---|
1675 | IF ( ALLOCATED( surf_usm_h%iwghf_eb ) ) surf_usm_h%iwghf_eb = 0.0_wp |
---|
1676 | IF ( ALLOCATED( surf_usm_h%iwghf_eb_window ) ) surf_usm_h%iwghf_eb_window = 0.0_wp |
---|
1677 | ! |
---|
1678 | !-- Now, for vertical surfaces |
---|
1679 | DO l = 0, 3 |
---|
1680 | ! ALLOCATE ( surf_usm_v(l)%wshf(1:surf_usm_v(l)%ns) ) ! can be removed |
---|
1681 | ALLOCATE ( surf_usm_v(l)%wshf_eb(1:surf_usm_v(l)%ns) ) |
---|
1682 | ALLOCATE ( surf_usm_v(l)%wghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1683 | ALLOCATE ( surf_usm_v(l)%wghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1684 | ALLOCATE ( surf_usm_v(l)%wghf_eb_green(1:surf_usm_v(l)%ns) ) |
---|
1685 | ALLOCATE ( surf_usm_v(l)%iwghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1686 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1687 | IF ( ALLOCATED( surf_usm_v(l)%wshf ) ) surf_usm_v(l)%wshf = 0.0_wp |
---|
1688 | IF ( ALLOCATED( surf_usm_v(l)%wshf_eb ) ) surf_usm_v(l)%wshf_eb = 0.0_wp |
---|
1689 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb ) ) surf_usm_v(l)%wghf_eb = 0.0_wp |
---|
1690 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_window ) ) surf_usm_v(l)%wghf_eb_window = 0.0_wp |
---|
1691 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_green ) ) surf_usm_v(l)%wghf_eb_green = 0.0_wp |
---|
1692 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb ) ) surf_usm_v(l)%iwghf_eb = 0.0_wp |
---|
1693 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) ) surf_usm_v(l)%iwghf_eb_window = 0.0_wp |
---|
1694 | ENDDO |
---|
1695 | |
---|
1696 | END SUBROUTINE usm_allocate_surface |
---|
1697 | |
---|
1698 | |
---|
1699 | !------------------------------------------------------------------------------! |
---|
1700 | ! Description: |
---|
1701 | ! ------------ |
---|
1702 | !> Sum up and time-average urban surface output quantities as well as allocate |
---|
1703 | !> the array necessary for storing the average. |
---|
1704 | !------------------------------------------------------------------------------! |
---|
1705 | SUBROUTINE usm_average_3d_data( mode, variable ) |
---|
1706 | |
---|
1707 | IMPLICIT NONE |
---|
1708 | |
---|
1709 | CHARACTER(LEN=*), INTENT(IN) :: mode |
---|
1710 | CHARACTER(LEN=*), INTENT(IN) :: variable |
---|
1711 | |
---|
1712 | INTEGER(iwp) :: i, j, k, l, m, ids, idsint, iwl, istat |
---|
1713 | CHARACTER(LEN=varnamelength) :: var |
---|
1714 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
1715 | CHARACTER(LEN=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
1716 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
1717 | |
---|
1718 | !-- find the real name of the variable |
---|
1719 | ids = -1 |
---|
1720 | l = -1 |
---|
1721 | var = TRIM(variable) |
---|
1722 | DO i = 0, nd-1 |
---|
1723 | k = len(TRIM(var)) |
---|
1724 | j = len(TRIM(dirname(i))) |
---|
1725 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
1726 | ids = i |
---|
1727 | idsint = dirint(ids) |
---|
1728 | var = var(:k-j) |
---|
1729 | EXIT |
---|
1730 | ENDIF |
---|
1731 | ENDDO |
---|
1732 | l = idsint - 2 ! horisontal direction index - terible hack ! |
---|
1733 | IF ( l < 0 .OR. l > 3 ) THEN |
---|
1734 | l = -1 |
---|
1735 | END IF |
---|
1736 | IF ( ids == -1 ) THEN |
---|
1737 | var = TRIM(variable) |
---|
1738 | ENDIF |
---|
1739 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
1740 | !-- wall layers |
---|
1741 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
1742 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1743 | var = var(1:10) |
---|
1744 | ELSE |
---|
1745 | !-- wrong wall layer index |
---|
1746 | RETURN |
---|
1747 | ENDIF |
---|
1748 | ENDIF |
---|
1749 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
1750 | !-- wall layers |
---|
1751 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
1752 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1753 | var = var(1:12) |
---|
1754 | ELSE |
---|
1755 | !-- wrong window layer index |
---|
1756 | RETURN |
---|
1757 | ENDIF |
---|
1758 | ENDIF |
---|
1759 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
1760 | !-- wall layers |
---|
1761 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
1762 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1763 | var = var(1:11) |
---|
1764 | ELSE |
---|
1765 | !-- wrong green layer index |
---|
1766 | RETURN |
---|
1767 | ENDIF |
---|
1768 | ENDIF |
---|
1769 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
1770 | !-- swc layers |
---|
1771 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
1772 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1773 | var = var(1:7) |
---|
1774 | ELSE |
---|
1775 | !-- wrong swc layer index |
---|
1776 | RETURN |
---|
1777 | ENDIF |
---|
1778 | ENDIF |
---|
1779 | |
---|
1780 | IF ( mode == 'allocate' ) THEN |
---|
1781 | |
---|
1782 | SELECT CASE ( TRIM( var ) ) |
---|
1783 | |
---|
1784 | CASE ( 'usm_wshf' ) |
---|
1785 | !-- array of sensible heat flux from surfaces |
---|
1786 | !-- land surfaces |
---|
1787 | IF ( l == -1 ) THEN |
---|
1788 | IF ( .NOT. ALLOCATED(surf_usm_h%wshf_eb_av) ) THEN |
---|
1789 | ALLOCATE( surf_usm_h%wshf_eb_av(1:surf_usm_h%ns) ) |
---|
1790 | surf_usm_h%wshf_eb_av = 0.0_wp |
---|
1791 | ENDIF |
---|
1792 | ELSE |
---|
1793 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wshf_eb_av) ) THEN |
---|
1794 | ALLOCATE( surf_usm_v(l)%wshf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1795 | surf_usm_v(l)%wshf_eb_av = 0.0_wp |
---|
1796 | ENDIF |
---|
1797 | ENDIF |
---|
1798 | |
---|
1799 | CASE ( 'usm_qsws' ) |
---|
1800 | !-- array of latent heat flux from surfaces |
---|
1801 | !-- land surfaces |
---|
1802 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_eb_av) ) THEN |
---|
1803 | ALLOCATE( surf_usm_h%qsws_eb_av(1:surf_usm_h%ns) ) |
---|
1804 | surf_usm_h%qsws_eb_av = 0.0_wp |
---|
1805 | ELSE |
---|
1806 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_eb_av) ) THEN |
---|
1807 | ALLOCATE( surf_usm_v(l)%qsws_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1808 | surf_usm_v(l)%qsws_eb_av = 0.0_wp |
---|
1809 | ENDIF |
---|
1810 | ENDIF |
---|
1811 | |
---|
1812 | CASE ( 'usm_qsws_veg' ) |
---|
1813 | !-- array of latent heat flux from vegetation surfaces |
---|
1814 | !-- land surfaces |
---|
1815 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_veg_av) ) THEN |
---|
1816 | ALLOCATE( surf_usm_h%qsws_veg_av(1:surf_usm_h%ns) ) |
---|
1817 | surf_usm_h%qsws_veg_av = 0.0_wp |
---|
1818 | ELSE |
---|
1819 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_veg_av) ) THEN |
---|
1820 | ALLOCATE( surf_usm_v(l)%qsws_veg_av(1:surf_usm_v(l)%ns) ) |
---|
1821 | surf_usm_v(l)%qsws_veg_av = 0.0_wp |
---|
1822 | ENDIF |
---|
1823 | ENDIF |
---|
1824 | |
---|
1825 | CASE ( 'usm_qsws_liq' ) |
---|
1826 | !-- array of latent heat flux from surfaces with liquid |
---|
1827 | !-- land surfaces |
---|
1828 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_liq_av) ) THEN |
---|
1829 | ALLOCATE( surf_usm_h%qsws_liq_av(1:surf_usm_h%ns) ) |
---|
1830 | surf_usm_h%qsws_liq_av = 0.0_wp |
---|
1831 | ELSE |
---|
1832 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_liq_av) ) THEN |
---|
1833 | ALLOCATE( surf_usm_v(l)%qsws_liq_av(1:surf_usm_v(l)%ns) ) |
---|
1834 | surf_usm_v(l)%qsws_liq_av = 0.0_wp |
---|
1835 | ENDIF |
---|
1836 | ENDIF |
---|
1837 | ! |
---|
1838 | !-- Please note, the following output quantities belongs to the |
---|
1839 | !-- individual tile fractions - ground heat flux at wall-, window-, |
---|
1840 | !-- and green fraction. Aggregated ground-heat flux is treated |
---|
1841 | !-- accordingly in average_3d_data, sum_up_3d_data, etc.. |
---|
1842 | CASE ( 'usm_wghf' ) |
---|
1843 | !-- array of heat flux from ground (wall, roof, land) |
---|
1844 | IF ( l == -1 ) THEN |
---|
1845 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_av) ) THEN |
---|
1846 | ALLOCATE( surf_usm_h%wghf_eb_av(1:surf_usm_h%ns) ) |
---|
1847 | surf_usm_h%wghf_eb_av = 0.0_wp |
---|
1848 | ENDIF |
---|
1849 | ELSE |
---|
1850 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_av) ) THEN |
---|
1851 | ALLOCATE( surf_usm_v(l)%wghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1852 | surf_usm_v(l)%wghf_eb_av = 0.0_wp |
---|
1853 | ENDIF |
---|
1854 | ENDIF |
---|
1855 | |
---|
1856 | CASE ( 'usm_wghf_window' ) |
---|
1857 | !-- array of heat flux from window ground (wall, roof, land) |
---|
1858 | IF ( l == -1 ) THEN |
---|
1859 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_window_av) ) THEN |
---|
1860 | ALLOCATE( surf_usm_h%wghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
1861 | surf_usm_h%wghf_eb_window_av = 0.0_wp |
---|
1862 | ENDIF |
---|
1863 | ELSE |
---|
1864 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_window_av) ) THEN |
---|
1865 | ALLOCATE( surf_usm_v(l)%wghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
1866 | surf_usm_v(l)%wghf_eb_window_av = 0.0_wp |
---|
1867 | ENDIF |
---|
1868 | ENDIF |
---|
1869 | |
---|
1870 | CASE ( 'usm_wghf_green' ) |
---|
1871 | !-- array of heat flux from green ground (wall, roof, land) |
---|
1872 | IF ( l == -1 ) THEN |
---|
1873 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_green_av) ) THEN |
---|
1874 | ALLOCATE( surf_usm_h%wghf_eb_green_av(1:surf_usm_h%ns) ) |
---|
1875 | surf_usm_h%wghf_eb_green_av = 0.0_wp |
---|
1876 | ENDIF |
---|
1877 | ELSE |
---|
1878 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_green_av) ) THEN |
---|
1879 | ALLOCATE( surf_usm_v(l)%wghf_eb_green_av(1:surf_usm_v(l)%ns) ) |
---|
1880 | surf_usm_v(l)%wghf_eb_green_av = 0.0_wp |
---|
1881 | ENDIF |
---|
1882 | ENDIF |
---|
1883 | |
---|
1884 | CASE ( 'usm_iwghf' ) |
---|
1885 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
1886 | IF ( l == -1 ) THEN |
---|
1887 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_av) ) THEN |
---|
1888 | ALLOCATE( surf_usm_h%iwghf_eb_av(1:surf_usm_h%ns) ) |
---|
1889 | surf_usm_h%iwghf_eb_av = 0.0_wp |
---|
1890 | ENDIF |
---|
1891 | ELSE |
---|
1892 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_av) ) THEN |
---|
1893 | ALLOCATE( surf_usm_v(l)%iwghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1894 | surf_usm_v(l)%iwghf_eb_av = 0.0_wp |
---|
1895 | ENDIF |
---|
1896 | ENDIF |
---|
1897 | |
---|
1898 | CASE ( 'usm_iwghf_window' ) |
---|
1899 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
1900 | IF ( l == -1 ) THEN |
---|
1901 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_window_av) ) THEN |
---|
1902 | ALLOCATE( surf_usm_h%iwghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
1903 | surf_usm_h%iwghf_eb_window_av = 0.0_wp |
---|
1904 | ENDIF |
---|
1905 | ELSE |
---|
1906 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_window_av) ) THEN |
---|
1907 | ALLOCATE( surf_usm_v(l)%iwghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
1908 | surf_usm_v(l)%iwghf_eb_window_av = 0.0_wp |
---|
1909 | ENDIF |
---|
1910 | ENDIF |
---|
1911 | |
---|
1912 | CASE ( 'usm_t_surf_wall' ) |
---|
1913 | !-- surface temperature for surfaces |
---|
1914 | IF ( l == -1 ) THEN |
---|
1915 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_wall_av) ) THEN |
---|
1916 | ALLOCATE( surf_usm_h%t_surf_wall_av(1:surf_usm_h%ns) ) |
---|
1917 | surf_usm_h%t_surf_wall_av = 0.0_wp |
---|
1918 | ENDIF |
---|
1919 | ELSE |
---|
1920 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_wall_av) ) THEN |
---|
1921 | ALLOCATE( surf_usm_v(l)%t_surf_wall_av(1:surf_usm_v(l)%ns) ) |
---|
1922 | surf_usm_v(l)%t_surf_wall_av = 0.0_wp |
---|
1923 | ENDIF |
---|
1924 | ENDIF |
---|
1925 | |
---|
1926 | CASE ( 'usm_t_surf_window' ) |
---|
1927 | !-- surface temperature for window surfaces |
---|
1928 | IF ( l == -1 ) THEN |
---|
1929 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_window_av) ) THEN |
---|
1930 | ALLOCATE( surf_usm_h%t_surf_window_av(1:surf_usm_h%ns) ) |
---|
1931 | surf_usm_h%t_surf_window_av = 0.0_wp |
---|
1932 | ENDIF |
---|
1933 | ELSE |
---|
1934 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_window_av) ) THEN |
---|
1935 | ALLOCATE( surf_usm_v(l)%t_surf_window_av(1:surf_usm_v(l)%ns) ) |
---|
1936 | surf_usm_v(l)%t_surf_window_av = 0.0_wp |
---|
1937 | ENDIF |
---|
1938 | ENDIF |
---|
1939 | |
---|
1940 | CASE ( 'usm_t_surf_green' ) |
---|
1941 | !-- surface temperature for green surfaces |
---|
1942 | IF ( l == -1 ) THEN |
---|
1943 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_green_av) ) THEN |
---|
1944 | ALLOCATE( surf_usm_h%t_surf_green_av(1:surf_usm_h%ns) ) |
---|
1945 | surf_usm_h%t_surf_green_av = 0.0_wp |
---|
1946 | ENDIF |
---|
1947 | ELSE |
---|
1948 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_green_av) ) THEN |
---|
1949 | ALLOCATE( surf_usm_v(l)%t_surf_green_av(1:surf_usm_v(l)%ns) ) |
---|
1950 | surf_usm_v(l)%t_surf_green_av = 0.0_wp |
---|
1951 | ENDIF |
---|
1952 | ENDIF |
---|
1953 | |
---|
1954 | CASE ( 'usm_theta_10cm' ) |
---|
1955 | !-- near surface (10cm) temperature for whole surfaces |
---|
1956 | IF ( l == -1 ) THEN |
---|
1957 | IF ( .NOT. ALLOCATED(surf_usm_h%pt_10cm_av) ) THEN |
---|
1958 | ALLOCATE( surf_usm_h%pt_10cm_av(1:surf_usm_h%ns) ) |
---|
1959 | surf_usm_h%pt_10cm_av = 0.0_wp |
---|
1960 | ENDIF |
---|
1961 | ELSE |
---|
1962 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%pt_10cm_av) ) THEN |
---|
1963 | ALLOCATE( surf_usm_v(l)%pt_10cm_av(1:surf_usm_v(l)%ns) ) |
---|
1964 | surf_usm_v(l)%pt_10cm_av = 0.0_wp |
---|
1965 | ENDIF |
---|
1966 | ENDIF |
---|
1967 | |
---|
1968 | CASE ( 'usm_t_wall' ) |
---|
1969 | !-- wall temperature for iwl layer of walls and land |
---|
1970 | IF ( l == -1 ) THEN |
---|
1971 | IF ( .NOT. ALLOCATED(surf_usm_h%t_wall_av) ) THEN |
---|
1972 | ALLOCATE( surf_usm_h%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1973 | surf_usm_h%t_wall_av = 0.0_wp |
---|
1974 | ENDIF |
---|
1975 | ELSE |
---|
1976 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_wall_av) ) THEN |
---|
1977 | ALLOCATE( surf_usm_v(l)%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1978 | surf_usm_v(l)%t_wall_av = 0.0_wp |
---|
1979 | ENDIF |
---|
1980 | ENDIF |
---|
1981 | |
---|
1982 | CASE ( 'usm_t_window' ) |
---|
1983 | !-- window temperature for iwl layer of walls and land |
---|
1984 | IF ( l == -1 ) THEN |
---|
1985 | IF ( .NOT. ALLOCATED(surf_usm_h%t_window_av) ) THEN |
---|
1986 | ALLOCATE( surf_usm_h%t_window_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1987 | surf_usm_h%t_window_av = 0.0_wp |
---|
1988 | ENDIF |
---|
1989 | ELSE |
---|
1990 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_window_av) ) THEN |
---|
1991 | ALLOCATE( surf_usm_v(l)%t_window_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1992 | surf_usm_v(l)%t_window_av = 0.0_wp |
---|
1993 | ENDIF |
---|
1994 | ENDIF |
---|
1995 | |
---|
1996 | CASE ( 'usm_t_green' ) |
---|
1997 | !-- green temperature for iwl layer of walls and land |
---|
1998 | IF ( l == -1 ) THEN |
---|
1999 | IF ( .NOT. ALLOCATED(surf_usm_h%t_green_av) ) THEN |
---|
2000 | ALLOCATE( surf_usm_h%t_green_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2001 | surf_usm_h%t_green_av = 0.0_wp |
---|
2002 | ENDIF |
---|
2003 | ELSE |
---|
2004 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_green_av) ) THEN |
---|
2005 | ALLOCATE( surf_usm_v(l)%t_green_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2006 | surf_usm_v(l)%t_green_av = 0.0_wp |
---|
2007 | ENDIF |
---|
2008 | ENDIF |
---|
2009 | CASE ( 'usm_swc' ) |
---|
2010 | !-- soil water content for iwl layer of walls and land |
---|
2011 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%swc_av) ) THEN |
---|
2012 | ALLOCATE( surf_usm_h%swc_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2013 | surf_usm_h%swc_av = 0.0_wp |
---|
2014 | ELSE |
---|
2015 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%swc_av) ) THEN |
---|
2016 | ALLOCATE( surf_usm_v(l)%swc_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2017 | surf_usm_v(l)%swc_av = 0.0_wp |
---|
2018 | ENDIF |
---|
2019 | ENDIF |
---|
2020 | |
---|
2021 | CASE DEFAULT |
---|
2022 | CONTINUE |
---|
2023 | |
---|
2024 | END SELECT |
---|
2025 | |
---|
2026 | ELSEIF ( mode == 'sum' ) THEN |
---|
2027 | |
---|
2028 | SELECT CASE ( TRIM( var ) ) |
---|
2029 | |
---|
2030 | CASE ( 'usm_wshf' ) |
---|
2031 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2032 | IF ( l == -1 ) THEN |
---|
2033 | DO m = 1, surf_usm_h%ns |
---|
2034 | surf_usm_h%wshf_eb_av(m) = & |
---|
2035 | surf_usm_h%wshf_eb_av(m) + & |
---|
2036 | surf_usm_h%wshf_eb(m) |
---|
2037 | ENDDO |
---|
2038 | ELSE |
---|
2039 | DO m = 1, surf_usm_v(l)%ns |
---|
2040 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2041 | surf_usm_v(l)%wshf_eb_av(m) + & |
---|
2042 | surf_usm_v(l)%wshf_eb(m) |
---|
2043 | ENDDO |
---|
2044 | ENDIF |
---|
2045 | |
---|
2046 | CASE ( 'usm_qsws' ) |
---|
2047 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2048 | IF ( l == -1 ) THEN |
---|
2049 | DO m = 1, surf_usm_h%ns |
---|
2050 | surf_usm_h%qsws_eb_av(m) = & |
---|
2051 | surf_usm_h%qsws_eb_av(m) + & |
---|
2052 | surf_usm_h%qsws_eb(m) |
---|
2053 | ENDDO |
---|
2054 | ELSE |
---|
2055 | DO m = 1, surf_usm_v(l)%ns |
---|
2056 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2057 | surf_usm_v(l)%qsws_eb_av(m) + & |
---|
2058 | surf_usm_v(l)%qsws_eb(m) |
---|
2059 | ENDDO |
---|
2060 | ENDIF |
---|
2061 | |
---|
2062 | CASE ( 'usm_qsws_veg' ) |
---|
2063 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2064 | IF ( l == -1 ) THEN |
---|
2065 | DO m = 1, surf_usm_h%ns |
---|
2066 | surf_usm_h%qsws_veg_av(m) = & |
---|
2067 | surf_usm_h%qsws_veg_av(m) + & |
---|
2068 | surf_usm_h%qsws_veg(m) |
---|
2069 | ENDDO |
---|
2070 | ELSE |
---|
2071 | DO m = 1, surf_usm_v(l)%ns |
---|
2072 | surf_usm_v(l)%qsws_veg_av(m) = & |
---|
2073 | surf_usm_v(l)%qsws_veg_av(m) + & |
---|
2074 | surf_usm_v(l)%qsws_veg(m) |
---|
2075 | ENDDO |
---|
2076 | ENDIF |
---|
2077 | |
---|
2078 | CASE ( 'usm_qsws_liq' ) |
---|
2079 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2080 | IF ( l == -1 ) THEN |
---|
2081 | DO m = 1, surf_usm_h%ns |
---|
2082 | surf_usm_h%qsws_liq_av(m) = & |
---|
2083 | surf_usm_h%qsws_liq_av(m) + & |
---|
2084 | surf_usm_h%qsws_liq(m) |
---|
2085 | ENDDO |
---|
2086 | ELSE |
---|
2087 | DO m = 1, surf_usm_v(l)%ns |
---|
2088 | surf_usm_v(l)%qsws_liq_av(m) = & |
---|
2089 | surf_usm_v(l)%qsws_liq_av(m) + & |
---|
2090 | surf_usm_v(l)%qsws_liq(m) |
---|
2091 | ENDDO |
---|
2092 | ENDIF |
---|
2093 | |
---|
2094 | CASE ( 'usm_wghf' ) |
---|
2095 | !-- array of heat flux from ground (wall, roof, land) |
---|
2096 | IF ( l == -1 ) THEN |
---|
2097 | DO m = 1, surf_usm_h%ns |
---|
2098 | surf_usm_h%wghf_eb_av(m) = & |
---|
2099 | surf_usm_h%wghf_eb_av(m) + & |
---|
2100 | surf_usm_h%wghf_eb(m) |
---|
2101 | ENDDO |
---|
2102 | ELSE |
---|
2103 | DO m = 1, surf_usm_v(l)%ns |
---|
2104 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2105 | surf_usm_v(l)%wghf_eb_av(m) + & |
---|
2106 | surf_usm_v(l)%wghf_eb(m) |
---|
2107 | ENDDO |
---|
2108 | ENDIF |
---|
2109 | |
---|
2110 | CASE ( 'usm_wghf_window' ) |
---|
2111 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2112 | IF ( l == -1 ) THEN |
---|
2113 | DO m = 1, surf_usm_h%ns |
---|
2114 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2115 | surf_usm_h%wghf_eb_window_av(m) + & |
---|
2116 | surf_usm_h%wghf_eb_window(m) |
---|
2117 | ENDDO |
---|
2118 | ELSE |
---|
2119 | DO m = 1, surf_usm_v(l)%ns |
---|
2120 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2121 | surf_usm_v(l)%wghf_eb_window_av(m) + & |
---|
2122 | surf_usm_v(l)%wghf_eb_window(m) |
---|
2123 | ENDDO |
---|
2124 | ENDIF |
---|
2125 | |
---|
2126 | CASE ( 'usm_wghf_green' ) |
---|
2127 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2128 | IF ( l == -1 ) THEN |
---|
2129 | DO m = 1, surf_usm_h%ns |
---|
2130 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2131 | surf_usm_h%wghf_eb_green_av(m) + & |
---|
2132 | surf_usm_h%wghf_eb_green(m) |
---|
2133 | ENDDO |
---|
2134 | ELSE |
---|
2135 | DO m = 1, surf_usm_v(l)%ns |
---|
2136 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2137 | surf_usm_v(l)%wghf_eb_green_av(m) + & |
---|
2138 | surf_usm_v(l)%wghf_eb_green(m) |
---|
2139 | ENDDO |
---|
2140 | ENDIF |
---|
2141 | |
---|
2142 | CASE ( 'usm_iwghf' ) |
---|
2143 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2144 | IF ( l == -1 ) THEN |
---|
2145 | DO m = 1, surf_usm_h%ns |
---|
2146 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2147 | surf_usm_h%iwghf_eb_av(m) + & |
---|
2148 | surf_usm_h%iwghf_eb(m) |
---|
2149 | ENDDO |
---|
2150 | ELSE |
---|
2151 | DO m = 1, surf_usm_v(l)%ns |
---|
2152 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2153 | surf_usm_v(l)%iwghf_eb_av(m) + & |
---|
2154 | surf_usm_v(l)%iwghf_eb(m) |
---|
2155 | ENDDO |
---|
2156 | ENDIF |
---|
2157 | |
---|
2158 | CASE ( 'usm_iwghf_window' ) |
---|
2159 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2160 | IF ( l == -1 ) THEN |
---|
2161 | DO m = 1, surf_usm_h%ns |
---|
2162 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2163 | surf_usm_h%iwghf_eb_window_av(m) + & |
---|
2164 | surf_usm_h%iwghf_eb_window(m) |
---|
2165 | ENDDO |
---|
2166 | ELSE |
---|
2167 | DO m = 1, surf_usm_v(l)%ns |
---|
2168 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2169 | surf_usm_v(l)%iwghf_eb_window_av(m) + & |
---|
2170 | surf_usm_v(l)%iwghf_eb_window(m) |
---|
2171 | ENDDO |
---|
2172 | ENDIF |
---|
2173 | |
---|
2174 | CASE ( 'usm_t_surf_wall' ) |
---|
2175 | !-- surface temperature for surfaces |
---|
2176 | IF ( l == -1 ) THEN |
---|
2177 | DO m = 1, surf_usm_h%ns |
---|
2178 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2179 | surf_usm_h%t_surf_wall_av(m) + & |
---|
2180 | t_surf_wall_h(m) |
---|
2181 | ENDDO |
---|
2182 | ELSE |
---|
2183 | DO m = 1, surf_usm_v(l)%ns |
---|
2184 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2185 | surf_usm_v(l)%t_surf_wall_av(m) + & |
---|
2186 | t_surf_wall_v(l)%t(m) |
---|
2187 | ENDDO |
---|
2188 | ENDIF |
---|
2189 | |
---|
2190 | CASE ( 'usm_t_surf_window' ) |
---|
2191 | !-- surface temperature for window surfaces |
---|
2192 | IF ( l == -1 ) THEN |
---|
2193 | DO m = 1, surf_usm_h%ns |
---|
2194 | surf_usm_h%t_surf_window_av(m) = & |
---|
2195 | surf_usm_h%t_surf_window_av(m) + & |
---|
2196 | t_surf_window_h(m) |
---|
2197 | ENDDO |
---|
2198 | ELSE |
---|
2199 | DO m = 1, surf_usm_v(l)%ns |
---|
2200 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2201 | surf_usm_v(l)%t_surf_window_av(m) + & |
---|
2202 | t_surf_window_v(l)%t(m) |
---|
2203 | ENDDO |
---|
2204 | ENDIF |
---|
2205 | |
---|
2206 | CASE ( 'usm_t_surf_green' ) |
---|
2207 | !-- surface temperature for green surfaces |
---|
2208 | IF ( l == -1 ) THEN |
---|
2209 | DO m = 1, surf_usm_h%ns |
---|
2210 | surf_usm_h%t_surf_green_av(m) = & |
---|
2211 | surf_usm_h%t_surf_green_av(m) + & |
---|
2212 | t_surf_green_h(m) |
---|
2213 | ENDDO |
---|
2214 | ELSE |
---|
2215 | DO m = 1, surf_usm_v(l)%ns |
---|
2216 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2217 | surf_usm_v(l)%t_surf_green_av(m) + & |
---|
2218 | t_surf_green_v(l)%t(m) |
---|
2219 | ENDDO |
---|
2220 | ENDIF |
---|
2221 | |
---|
2222 | CASE ( 'usm_theta_10cm' ) |
---|
2223 | !-- near surface temperature for whole surfaces |
---|
2224 | IF ( l == -1 ) THEN |
---|
2225 | DO m = 1, surf_usm_h%ns |
---|
2226 | surf_usm_h%pt_10cm_av(m) = & |
---|
2227 | surf_usm_h%pt_10cm_av(m) + & |
---|
2228 | surf_usm_h%pt_10cm(m) |
---|
2229 | ENDDO |
---|
2230 | ELSE |
---|
2231 | DO m = 1, surf_usm_v(l)%ns |
---|
2232 | surf_usm_v(l)%pt_10cm_av(m) = & |
---|
2233 | surf_usm_v(l)%pt_10cm_av(m) + & |
---|
2234 | surf_usm_v(l)%pt_10cm(m) |
---|
2235 | ENDDO |
---|
2236 | ENDIF |
---|
2237 | |
---|
2238 | CASE ( 'usm_t_wall' ) |
---|
2239 | !-- wall temperature for iwl layer of walls and land |
---|
2240 | IF ( l == -1 ) THEN |
---|
2241 | DO m = 1, surf_usm_h%ns |
---|
2242 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
2243 | surf_usm_h%t_wall_av(iwl,m) + & |
---|
2244 | t_wall_h(iwl,m) |
---|
2245 | ENDDO |
---|
2246 | ELSE |
---|
2247 | DO m = 1, surf_usm_v(l)%ns |
---|
2248 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
2249 | surf_usm_v(l)%t_wall_av(iwl,m) + & |
---|
2250 | t_wall_v(l)%t(iwl,m) |
---|
2251 | ENDDO |
---|
2252 | ENDIF |
---|
2253 | |
---|
2254 | CASE ( 'usm_t_window' ) |
---|
2255 | !-- window 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_window_av(iwl,m) = & |
---|
2259 | surf_usm_h%t_window_av(iwl,m) + & |
---|
2260 | t_window_h(iwl,m) |
---|
2261 | ENDDO |
---|
2262 | ELSE |
---|
2263 | DO m = 1, surf_usm_v(l)%ns |
---|
2264 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
2265 | surf_usm_v(l)%t_window_av(iwl,m) + & |
---|
2266 | t_window_v(l)%t(iwl,m) |
---|
2267 | ENDDO |
---|
2268 | ENDIF |
---|
2269 | |
---|
2270 | CASE ( 'usm_t_green' ) |
---|
2271 | !-- green temperature for iwl layer of walls and land |
---|
2272 | IF ( l == -1 ) THEN |
---|
2273 | DO m = 1, surf_usm_h%ns |
---|
2274 | surf_usm_h%t_green_av(iwl,m) = & |
---|
2275 | surf_usm_h%t_green_av(iwl,m) + & |
---|
2276 | t_green_h(iwl,m) |
---|
2277 | ENDDO |
---|
2278 | ELSE |
---|
2279 | DO m = 1, surf_usm_v(l)%ns |
---|
2280 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
2281 | surf_usm_v(l)%t_green_av(iwl,m) + & |
---|
2282 | t_green_v(l)%t(iwl,m) |
---|
2283 | ENDDO |
---|
2284 | ENDIF |
---|
2285 | |
---|
2286 | CASE ( 'usm_swc' ) |
---|
2287 | !-- soil water content for iwl layer of walls and land |
---|
2288 | IF ( l == -1 ) THEN |
---|
2289 | DO m = 1, surf_usm_h%ns |
---|
2290 | surf_usm_h%swc_av(iwl,m) = & |
---|
2291 | surf_usm_h%swc_av(iwl,m) + & |
---|
2292 | swc_h(iwl,m) |
---|
2293 | ENDDO |
---|
2294 | ELSE |
---|
2295 | DO m = 1, surf_usm_v(l)%ns |
---|
2296 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
2297 | surf_usm_v(l)%swc_av(iwl,m) + & |
---|
2298 | swc_v(l)%t(iwl,m) |
---|
2299 | ENDDO |
---|
2300 | ENDIF |
---|
2301 | |
---|
2302 | CASE DEFAULT |
---|
2303 | CONTINUE |
---|
2304 | |
---|
2305 | END SELECT |
---|
2306 | |
---|
2307 | ELSEIF ( mode == 'average' ) THEN |
---|
2308 | |
---|
2309 | SELECT CASE ( TRIM( var ) ) |
---|
2310 | |
---|
2311 | CASE ( 'usm_wshf' ) |
---|
2312 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2313 | IF ( l == -1 ) THEN |
---|
2314 | DO m = 1, surf_usm_h%ns |
---|
2315 | surf_usm_h%wshf_eb_av(m) = & |
---|
2316 | surf_usm_h%wshf_eb_av(m) / & |
---|
2317 | REAL( average_count_3d, kind=wp ) |
---|
2318 | ENDDO |
---|
2319 | ELSE |
---|
2320 | DO m = 1, surf_usm_v(l)%ns |
---|
2321 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2322 | surf_usm_v(l)%wshf_eb_av(m) / & |
---|
2323 | REAL( average_count_3d, kind=wp ) |
---|
2324 | ENDDO |
---|
2325 | ENDIF |
---|
2326 | |
---|
2327 | CASE ( 'usm_qsws' ) |
---|
2328 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2329 | IF ( l == -1 ) THEN |
---|
2330 | DO m = 1, surf_usm_h%ns |
---|
2331 | surf_usm_h%qsws_eb_av(m) = & |
---|
2332 | surf_usm_h%qsws_eb_av(m) / & |
---|
2333 | REAL( average_count_3d, kind=wp ) |
---|
2334 | ENDDO |
---|
2335 | ELSE |
---|
2336 | DO m = 1, surf_usm_v(l)%ns |
---|
2337 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2338 | surf_usm_v(l)%qsws_eb_av(m) / & |
---|
2339 | REAL( average_count_3d, kind=wp ) |
---|
2340 | ENDDO |
---|
2341 | ENDIF |
---|
2342 | |
---|
2343 | CASE ( 'usm_qsws_veg' ) |
---|
2344 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2345 | IF ( l == -1 ) THEN |
---|
2346 | DO m = 1, surf_usm_h%ns |
---|
2347 | surf_usm_h%qsws_veg_av(m) = & |
---|
2348 | surf_usm_h%qsws_veg_av(m) / & |
---|
2349 | REAL( average_count_3d, kind=wp ) |
---|
2350 | ENDDO |
---|
2351 | ELSE |
---|
2352 | DO m = 1, surf_usm_v(l)%ns |
---|
2353 | surf_usm_v(l)%qsws_veg_av(m) = & |
---|
2354 | surf_usm_v(l)%qsws_veg_av(m) / & |
---|
2355 | REAL( average_count_3d, kind=wp ) |
---|
2356 | ENDDO |
---|
2357 | ENDIF |
---|
2358 | |
---|
2359 | CASE ( 'usm_qsws_liq' ) |
---|
2360 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2361 | IF ( l == -1 ) THEN |
---|
2362 | DO m = 1, surf_usm_h%ns |
---|
2363 | surf_usm_h%qsws_liq_av(m) = & |
---|
2364 | surf_usm_h%qsws_liq_av(m) / & |
---|
2365 | REAL( average_count_3d, kind=wp ) |
---|
2366 | ENDDO |
---|
2367 | ELSE |
---|
2368 | DO m = 1, surf_usm_v(l)%ns |
---|
2369 | surf_usm_v(l)%qsws_liq_av(m) = & |
---|
2370 | surf_usm_v(l)%qsws_liq_av(m) / & |
---|
2371 | REAL( average_count_3d, kind=wp ) |
---|
2372 | ENDDO |
---|
2373 | ENDIF |
---|
2374 | |
---|
2375 | CASE ( 'usm_wghf' ) |
---|
2376 | !-- array of heat flux from ground (wall, roof, land) |
---|
2377 | IF ( l == -1 ) THEN |
---|
2378 | DO m = 1, surf_usm_h%ns |
---|
2379 | surf_usm_h%wghf_eb_av(m) = & |
---|
2380 | surf_usm_h%wghf_eb_av(m) / & |
---|
2381 | REAL( average_count_3d, kind=wp ) |
---|
2382 | ENDDO |
---|
2383 | ELSE |
---|
2384 | DO m = 1, surf_usm_v(l)%ns |
---|
2385 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2386 | surf_usm_v(l)%wghf_eb_av(m) / & |
---|
2387 | REAL( average_count_3d, kind=wp ) |
---|
2388 | ENDDO |
---|
2389 | ENDIF |
---|
2390 | |
---|
2391 | CASE ( 'usm_wghf_window' ) |
---|
2392 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2393 | IF ( l == -1 ) THEN |
---|
2394 | DO m = 1, surf_usm_h%ns |
---|
2395 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2396 | surf_usm_h%wghf_eb_window_av(m) / & |
---|
2397 | REAL( average_count_3d, kind=wp ) |
---|
2398 | ENDDO |
---|
2399 | ELSE |
---|
2400 | DO m = 1, surf_usm_v(l)%ns |
---|
2401 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2402 | surf_usm_v(l)%wghf_eb_window_av(m) / & |
---|
2403 | REAL( average_count_3d, kind=wp ) |
---|
2404 | ENDDO |
---|
2405 | ENDIF |
---|
2406 | |
---|
2407 | CASE ( 'usm_wghf_green' ) |
---|
2408 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2409 | IF ( l == -1 ) THEN |
---|
2410 | DO m = 1, surf_usm_h%ns |
---|
2411 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2412 | surf_usm_h%wghf_eb_green_av(m) / & |
---|
2413 | REAL( average_count_3d, kind=wp ) |
---|
2414 | ENDDO |
---|
2415 | ELSE |
---|
2416 | DO m = 1, surf_usm_v(l)%ns |
---|
2417 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2418 | surf_usm_v(l)%wghf_eb_green_av(m) / & |
---|
2419 | REAL( average_count_3d, kind=wp ) |
---|
2420 | ENDDO |
---|
2421 | ENDIF |
---|
2422 | |
---|
2423 | CASE ( 'usm_iwghf' ) |
---|
2424 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2425 | IF ( l == -1 ) THEN |
---|
2426 | DO m = 1, surf_usm_h%ns |
---|
2427 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2428 | surf_usm_h%iwghf_eb_av(m) / & |
---|
2429 | REAL( average_count_3d, kind=wp ) |
---|
2430 | ENDDO |
---|
2431 | ELSE |
---|
2432 | DO m = 1, surf_usm_v(l)%ns |
---|
2433 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2434 | surf_usm_v(l)%iwghf_eb_av(m) / & |
---|
2435 | REAL( average_count_3d, kind=wp ) |
---|
2436 | ENDDO |
---|
2437 | ENDIF |
---|
2438 | |
---|
2439 | CASE ( 'usm_iwghf_window' ) |
---|
2440 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2441 | IF ( l == -1 ) THEN |
---|
2442 | DO m = 1, surf_usm_h%ns |
---|
2443 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2444 | surf_usm_h%iwghf_eb_window_av(m) / & |
---|
2445 | REAL( average_count_3d, kind=wp ) |
---|
2446 | ENDDO |
---|
2447 | ELSE |
---|
2448 | DO m = 1, surf_usm_v(l)%ns |
---|
2449 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2450 | surf_usm_v(l)%iwghf_eb_window_av(m) / & |
---|
2451 | REAL( average_count_3d, kind=wp ) |
---|
2452 | ENDDO |
---|
2453 | ENDIF |
---|
2454 | |
---|
2455 | CASE ( 'usm_t_surf_wall' ) |
---|
2456 | !-- surface temperature for surfaces |
---|
2457 | IF ( l == -1 ) THEN |
---|
2458 | DO m = 1, surf_usm_h%ns |
---|
2459 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2460 | surf_usm_h%t_surf_wall_av(m) / & |
---|
2461 | REAL( average_count_3d, kind=wp ) |
---|
2462 | ENDDO |
---|
2463 | ELSE |
---|
2464 | DO m = 1, surf_usm_v(l)%ns |
---|
2465 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2466 | surf_usm_v(l)%t_surf_wall_av(m) / & |
---|
2467 | REAL( average_count_3d, kind=wp ) |
---|
2468 | ENDDO |
---|
2469 | ENDIF |
---|
2470 | |
---|
2471 | CASE ( 'usm_t_surf_window' ) |
---|
2472 | !-- surface temperature for window surfaces |
---|
2473 | IF ( l == -1 ) THEN |
---|
2474 | DO m = 1, surf_usm_h%ns |
---|
2475 | surf_usm_h%t_surf_window_av(m) = & |
---|
2476 | surf_usm_h%t_surf_window_av(m) / & |
---|
2477 | REAL( average_count_3d, kind=wp ) |
---|
2478 | ENDDO |
---|
2479 | ELSE |
---|
2480 | DO m = 1, surf_usm_v(l)%ns |
---|
2481 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2482 | surf_usm_v(l)%t_surf_window_av(m) / & |
---|
2483 | REAL( average_count_3d, kind=wp ) |
---|
2484 | ENDDO |
---|
2485 | ENDIF |
---|
2486 | |
---|
2487 | CASE ( 'usm_t_surf_green' ) |
---|
2488 | !-- surface temperature for green surfaces |
---|
2489 | IF ( l == -1 ) THEN |
---|
2490 | DO m = 1, surf_usm_h%ns |
---|
2491 | surf_usm_h%t_surf_green_av(m) = & |
---|
2492 | surf_usm_h%t_surf_green_av(m) / & |
---|
2493 | REAL( average_count_3d, kind=wp ) |
---|
2494 | ENDDO |
---|
2495 | ELSE |
---|
2496 | DO m = 1, surf_usm_v(l)%ns |
---|
2497 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2498 | surf_usm_v(l)%t_surf_green_av(m) / & |
---|
2499 | REAL( average_count_3d, kind=wp ) |
---|
2500 | ENDDO |
---|
2501 | ENDIF |
---|
2502 | |
---|
2503 | CASE ( 'usm_theta_10cm' ) |
---|
2504 | !-- near surface temperature for whole surfaces |
---|
2505 | IF ( l == -1 ) THEN |
---|
2506 | DO m = 1, surf_usm_h%ns |
---|
2507 | surf_usm_h%pt_10cm_av(m) = & |
---|
2508 | surf_usm_h%pt_10cm_av(m) / & |
---|
2509 | REAL( average_count_3d, kind=wp ) |
---|
2510 | ENDDO |
---|
2511 | ELSE |
---|
2512 | DO m = 1, surf_usm_v(l)%ns |
---|
2513 | surf_usm_v(l)%pt_10cm_av(m) = & |
---|
2514 | surf_usm_v(l)%pt_10cm_av(m) / & |
---|
2515 | REAL( average_count_3d, kind=wp ) |
---|
2516 | ENDDO |
---|
2517 | ENDIF |
---|
2518 | |
---|
2519 | |
---|
2520 | CASE ( 'usm_t_wall' ) |
---|
2521 | !-- wall temperature for iwl layer of walls and land |
---|
2522 | IF ( l == -1 ) THEN |
---|
2523 | DO m = 1, surf_usm_h%ns |
---|
2524 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
2525 | surf_usm_h%t_wall_av(iwl,m) / & |
---|
2526 | REAL( average_count_3d, kind=wp ) |
---|
2527 | ENDDO |
---|
2528 | ELSE |
---|
2529 | DO m = 1, surf_usm_v(l)%ns |
---|
2530 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
2531 | surf_usm_v(l)%t_wall_av(iwl,m) / & |
---|
2532 | REAL( average_count_3d, kind=wp ) |
---|
2533 | ENDDO |
---|
2534 | ENDIF |
---|
2535 | |
---|
2536 | CASE ( 'usm_t_window' ) |
---|
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 | !-- green temperature for iwl layer of walls and land |
---|
2554 | IF ( l == -1 ) THEN |
---|
2555 | DO m = 1, surf_usm_h%ns |
---|
2556 | surf_usm_h%t_green_av(iwl,m) = & |
---|
2557 | surf_usm_h%t_green_av(iwl,m) / & |
---|
2558 | REAL( average_count_3d, kind=wp ) |
---|
2559 | ENDDO |
---|
2560 | ELSE |
---|
2561 | DO m = 1, surf_usm_v(l)%ns |
---|
2562 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
2563 | surf_usm_v(l)%t_green_av(iwl,m) / & |
---|
2564 | REAL( average_count_3d, kind=wp ) |
---|
2565 | ENDDO |
---|
2566 | ENDIF |
---|
2567 | |
---|
2568 | CASE ( 'usm_swc' ) |
---|
2569 | !-- soil water content for iwl layer of walls and land |
---|
2570 | IF ( l == -1 ) THEN |
---|
2571 | DO m = 1, surf_usm_h%ns |
---|
2572 | surf_usm_h%swc_av(iwl,m) = & |
---|
2573 | surf_usm_h%swc_av(iwl,m) / & |
---|
2574 | REAL( average_count_3d, kind=wp ) |
---|
2575 | ENDDO |
---|
2576 | ELSE |
---|
2577 | DO m = 1, surf_usm_v(l)%ns |
---|
2578 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
2579 | surf_usm_v(l)%swc_av(iwl,m) / & |
---|
2580 | REAL( average_count_3d, kind=wp ) |
---|
2581 | ENDDO |
---|
2582 | ENDIF |
---|
2583 | |
---|
2584 | |
---|
2585 | END SELECT |
---|
2586 | |
---|
2587 | ENDIF |
---|
2588 | |
---|
2589 | END SUBROUTINE usm_average_3d_data |
---|
2590 | |
---|
2591 | |
---|
2592 | |
---|
2593 | !------------------------------------------------------------------------------! |
---|
2594 | ! Description: |
---|
2595 | ! ------------ |
---|
2596 | !> Set internal Neumann boundary condition at outer soil grid points |
---|
2597 | !> for temperature and humidity. |
---|
2598 | !------------------------------------------------------------------------------! |
---|
2599 | SUBROUTINE usm_boundary_condition |
---|
2600 | |
---|
2601 | IMPLICIT NONE |
---|
2602 | |
---|
2603 | INTEGER(iwp) :: i !< grid index x-direction |
---|
2604 | INTEGER(iwp) :: ioff !< offset index x-direction indicating location of soil grid point |
---|
2605 | INTEGER(iwp) :: j !< grid index y-direction |
---|
2606 | INTEGER(iwp) :: joff !< offset index x-direction indicating location of soil grid point |
---|
2607 | INTEGER(iwp) :: k !< grid index z-direction |
---|
2608 | INTEGER(iwp) :: koff !< offset index x-direction indicating location of soil grid point |
---|
2609 | INTEGER(iwp) :: l !< running index surface-orientation |
---|
2610 | INTEGER(iwp) :: m !< running index surface elements |
---|
2611 | |
---|
2612 | koff = surf_usm_h%koff |
---|
2613 | DO m = 1, surf_usm_h%ns |
---|
2614 | i = surf_usm_h%i(m) |
---|
2615 | j = surf_usm_h%j(m) |
---|
2616 | k = surf_usm_h%k(m) |
---|
2617 | pt(k+koff,j,i) = pt(k,j,i) |
---|
2618 | ENDDO |
---|
2619 | |
---|
2620 | DO l = 0, 3 |
---|
2621 | ioff = surf_usm_v(l)%ioff |
---|
2622 | joff = surf_usm_v(l)%joff |
---|
2623 | DO m = 1, surf_usm_v(l)%ns |
---|
2624 | i = surf_usm_v(l)%i(m) |
---|
2625 | j = surf_usm_v(l)%j(m) |
---|
2626 | k = surf_usm_v(l)%k(m) |
---|
2627 | pt(k,j+joff,i+ioff) = pt(k,j,i) |
---|
2628 | ENDDO |
---|
2629 | ENDDO |
---|
2630 | |
---|
2631 | END SUBROUTINE usm_boundary_condition |
---|
2632 | |
---|
2633 | |
---|
2634 | !------------------------------------------------------------------------------! |
---|
2635 | ! |
---|
2636 | ! Description: |
---|
2637 | ! ------------ |
---|
2638 | !> Subroutine checks variables and assigns units. |
---|
2639 | !> It is called out from subroutine check_parameters. |
---|
2640 | !------------------------------------------------------------------------------! |
---|
2641 | SUBROUTINE usm_check_data_output( variable, unit ) |
---|
2642 | |
---|
2643 | IMPLICIT NONE |
---|
2644 | |
---|
2645 | CHARACTER(LEN=*),INTENT(IN) :: variable !< |
---|
2646 | CHARACTER(LEN=*),INTENT(OUT) :: unit !< |
---|
2647 | |
---|
2648 | INTEGER(iwp) :: i,j,l !< index |
---|
2649 | CHARACTER(LEN=2) :: ls |
---|
2650 | CHARACTER(LEN=varnamelength) :: var !< TRIM(variable) |
---|
2651 | INTEGER(iwp), PARAMETER :: nl1 = 16 !< number of directional usm variables |
---|
2652 | CHARACTER(LEN=varnamelength), DIMENSION(nl1) :: varlist1 = & !< list of directional usm variables |
---|
2653 | (/'usm_wshf ', & |
---|
2654 | 'usm_wghf ', & |
---|
2655 | 'usm_wghf_window ', & |
---|
2656 | 'usm_wghf_green ', & |
---|
2657 | 'usm_iwghf ', & |
---|
2658 | 'usm_iwghf_window ', & |
---|
2659 | 'usm_surfz ', & |
---|
2660 | 'usm_surfwintrans ', & |
---|
2661 | 'usm_surfcat ', & |
---|
2662 | 'usm_surfalb ', & |
---|
2663 | 'usm_surfemis ', & |
---|
2664 | 'usm_t_surf_wall ', & |
---|
2665 | 'usm_t_surf_window ', & |
---|
2666 | 'usm_t_surf_green ', & |
---|
2667 | 'usm_t_green ', & |
---|
2668 | 'usm_theta_10cm '/) |
---|
2669 | |
---|
2670 | INTEGER(iwp), PARAMETER :: nl2 = 3 !< number of directional layer usm variables |
---|
2671 | CHARACTER(LEN=varnamelength), DIMENSION(nl2) :: varlist2 = & !< list of directional layer usm variables |
---|
2672 | (/'usm_t_wall ', & |
---|
2673 | 'usm_t_window ', & |
---|
2674 | 'usm_t_green '/) |
---|
2675 | |
---|
2676 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
2677 | CHARACTER(LEN=6), DIMENSION(nd), PARAMETER :: dirname = & !< direction names |
---|
2678 | (/'_roof ','_south','_north','_west ','_east '/) |
---|
2679 | LOGICAL :: lfound !< flag if the variable is found |
---|
2680 | |
---|
2681 | |
---|
2682 | lfound = .FALSE. |
---|
2683 | |
---|
2684 | var = TRIM(variable) |
---|
2685 | |
---|
2686 | !-- check if variable exists |
---|
2687 | ! directional variables |
---|
2688 | DO i = 1, nl1 |
---|
2689 | DO j = 1, nd |
---|
2690 | IF ( TRIM(var) == TRIM(varlist1(i))//TRIM(dirname(j)) ) THEN |
---|
2691 | lfound = .TRUE. |
---|
2692 | EXIT |
---|
2693 | ENDIF |
---|
2694 | IF ( lfound ) EXIT |
---|
2695 | ENDDO |
---|
2696 | ENDDO |
---|
2697 | IF ( lfound ) GOTO 10 |
---|
2698 | ! directional layer variables |
---|
2699 | DO i = 1, nl2 |
---|
2700 | DO j = 1, nd |
---|
2701 | DO l = nzb_wall, nzt_wall |
---|
2702 | WRITE(ls,'(A1,I1)') '_',l |
---|
2703 | IF ( TRIM(var) == TRIM(varlist2(i))//TRIM(ls)//TRIM(dirname(j)) ) THEN |
---|
2704 | lfound = .TRUE. |
---|
2705 | EXIT |
---|
2706 | ENDIF |
---|
2707 | ENDDO |
---|
2708 | IF ( lfound ) EXIT |
---|
2709 | ENDDO |
---|
2710 | ENDDO |
---|
2711 | IF ( .NOT. lfound ) THEN |
---|
2712 | unit = 'illegal' |
---|
2713 | RETURN |
---|
2714 | ENDIF |
---|
2715 | 10 CONTINUE |
---|
2716 | |
---|
2717 | IF ( var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
2718 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
2719 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
2720 | var(1:17) == 'usm_surfwintrans_' .OR. & |
---|
2721 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
2722 | var(1:13) == 'usm_qsws_liq_' ) THEN |
---|
2723 | unit = 'W/m2' |
---|
2724 | ELSE IF ( var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
2725 | var(1:12) == 'usm_t_window' .OR. var(1:17) == 'usm_t_surf_window' .OR. & |
---|
2726 | var(1:16) == 'usm_t_surf_green' .OR. & |
---|
2727 | var(1:11) == 'usm_t_green' .OR. var(1:7) == 'usm_swc' .OR. & |
---|
2728 | var(1:14) == 'usm_theta_10cm' ) THEN |
---|
2729 | unit = 'K' |
---|
2730 | ELSE IF ( var(1:9) == 'usm_surfz' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
2731 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' ) THEN |
---|
2732 | unit = '1' |
---|
2733 | ELSE |
---|
2734 | unit = 'illegal' |
---|
2735 | ENDIF |
---|
2736 | |
---|
2737 | END SUBROUTINE usm_check_data_output |
---|
2738 | |
---|
2739 | |
---|
2740 | !------------------------------------------------------------------------------! |
---|
2741 | ! Description: |
---|
2742 | ! ------------ |
---|
2743 | !> Check parameters routine for urban surface model |
---|
2744 | !------------------------------------------------------------------------------! |
---|
2745 | SUBROUTINE usm_check_parameters |
---|
2746 | |
---|
2747 | USE control_parameters, & |
---|
2748 | ONLY: bc_pt_b, bc_q_b, constant_flux_layer, large_scale_forcing, & |
---|
2749 | lsf_surf, topography |
---|
2750 | |
---|
2751 | ! |
---|
2752 | !-- Dirichlet boundary conditions are required as the surface fluxes are |
---|
2753 | !-- calculated from the temperature/humidity gradients in the urban surface |
---|
2754 | !-- model |
---|
2755 | IF ( bc_pt_b == 'neumann' .OR. bc_q_b == 'neumann' ) THEN |
---|
2756 | message_string = 'urban surface model requires setting of '// & |
---|
2757 | 'bc_pt_b = "dirichlet" and '// & |
---|
2758 | 'bc_q_b = "dirichlet"' |
---|
2759 | CALL message( 'usm_check_parameters', 'PA0590', 1, 2, 0, 6, 0 ) |
---|
2760 | ENDIF |
---|
2761 | |
---|
2762 | IF ( .NOT. constant_flux_layer ) THEN |
---|
2763 | message_string = 'urban surface model requires '// & |
---|
2764 | 'constant_flux_layer = .T.' |
---|
2765 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
2766 | ENDIF |
---|
2767 | |
---|
2768 | IF ( .NOT. radiation ) THEN |
---|
2769 | message_string = 'urban surface model requires '// & |
---|
2770 | 'the radiation model to be switched on' |
---|
2771 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
2772 | ENDIF |
---|
2773 | ! |
---|
2774 | !-- Surface forcing has to be disabled for LSF in case of enabled |
---|
2775 | !-- urban surface module |
---|
2776 | IF ( large_scale_forcing ) THEN |
---|
2777 | lsf_surf = .FALSE. |
---|
2778 | ENDIF |
---|
2779 | ! |
---|
2780 | !-- Topography |
---|
2781 | IF ( topography == 'flat' ) THEN |
---|
2782 | message_string = 'topography /= "flat" is required '// & |
---|
2783 | 'when using the urban surface model' |
---|
2784 | CALL message( 'check_parameters', 'PA0592', 1, 2, 0, 6, 0 ) |
---|
2785 | ENDIF |
---|
2786 | ! |
---|
2787 | !-- naheatlayers |
---|
2788 | IF ( naheatlayers > nzt ) THEN |
---|
2789 | message_string = 'number of anthropogenic heat layers '// & |
---|
2790 | '"naheatlayers" can not be larger than'// & |
---|
2791 | ' number of domain layers "nzt"' |
---|
2792 | CALL message( 'check_parameters', 'PA0593', 1, 2, 0, 6, 0 ) |
---|
2793 | ENDIF |
---|
2794 | |
---|
2795 | END SUBROUTINE usm_check_parameters |
---|
2796 | |
---|
2797 | |
---|
2798 | !------------------------------------------------------------------------------! |
---|
2799 | ! |
---|
2800 | ! Description: |
---|
2801 | ! ------------ |
---|
2802 | !> Output of the 3D-arrays in netCDF and/or AVS format |
---|
2803 | !> for variables of urban_surface model. |
---|
2804 | !> It resorts the urban surface module output quantities from surf style |
---|
2805 | !> indexing into temporary 3D array with indices (i,j,k). |
---|
2806 | !> It is called from subroutine data_output_3d. |
---|
2807 | !------------------------------------------------------------------------------! |
---|
2808 | SUBROUTINE usm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
2809 | |
---|
2810 | IMPLICIT NONE |
---|
2811 | |
---|
2812 | INTEGER(iwp), INTENT(IN) :: av !< |
---|
2813 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
2814 | INTEGER(iwp), INTENT(IN) :: nzb_do !< lower limit of the data output (usually 0) |
---|
2815 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) |
---|
2816 | LOGICAL, INTENT(OUT) :: found !< |
---|
2817 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< sp - it has to correspond to module data_output_3d |
---|
2818 | REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: temp_pf !< temp array for urban surface output procedure |
---|
2819 | |
---|
2820 | CHARACTER (len=varnamelength) :: var |
---|
2821 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
2822 | CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
2823 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
2824 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: diridx = (/ -1, 1, 0, 3, 2 /) |
---|
2825 | !< index for surf_*_v: 0:3 = (North, South, East, West) |
---|
2826 | INTEGER(iwp) :: ids,idsint,idsidx,isvf |
---|
2827 | INTEGER(iwp) :: i,j,k,iwl,istat, l, m |
---|
2828 | |
---|
2829 | found = .TRUE. |
---|
2830 | temp_pf = -1._wp |
---|
2831 | |
---|
2832 | ids = -1 |
---|
2833 | var = TRIM(variable) |
---|
2834 | DO i = 0, nd-1 |
---|
2835 | k = len(TRIM(var)) |
---|
2836 | j = len(TRIM(dirname(i))) |
---|
2837 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
2838 | ids = i |
---|
2839 | idsint = dirint(ids) |
---|
2840 | idsidx = diridx(ids) |
---|
2841 | var = var(:k-j) |
---|
2842 | EXIT |
---|
2843 | ENDIF |
---|
2844 | ENDDO |
---|
2845 | IF ( ids == -1 ) THEN |
---|
2846 | var = TRIM(variable) |
---|
2847 | ENDIF |
---|
2848 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
2849 | !-- wall layers |
---|
2850 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
2851 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2852 | var = var(1:10) |
---|
2853 | ENDIF |
---|
2854 | ENDIF |
---|
2855 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
2856 | !-- window layers |
---|
2857 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
2858 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2859 | var = var(1:12) |
---|
2860 | ENDIF |
---|
2861 | ENDIF |
---|
2862 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
2863 | !-- green layers |
---|
2864 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
2865 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2866 | var = var(1:11) |
---|
2867 | ENDIF |
---|
2868 | ENDIF |
---|
2869 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
2870 | !-- green layers soil water content |
---|
2871 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
2872 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2873 | var = var(1:7) |
---|
2874 | ENDIF |
---|
2875 | ENDIF |
---|
2876 | |
---|
2877 | SELECT CASE ( TRIM(var) ) |
---|
2878 | |
---|
2879 | CASE ( 'usm_surfz' ) |
---|
2880 | !-- array of surface height (z) |
---|
2881 | IF ( idsint == iup_u ) THEN |
---|
2882 | DO m = 1, surf_usm_h%ns |
---|
2883 | i = surf_usm_h%i(m) |
---|
2884 | j = surf_usm_h%j(m) |
---|
2885 | k = surf_usm_h%k(m) |
---|
2886 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) ) |
---|
2887 | ENDDO |
---|
2888 | ELSE |
---|
2889 | l = idsidx |
---|
2890 | DO m = 1, surf_usm_v(l)%ns |
---|
2891 | i = surf_usm_v(l)%i(m) |
---|
2892 | j = surf_usm_v(l)%j(m) |
---|
2893 | k = surf_usm_v(l)%k(m) |
---|
2894 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) + 1.0_wp ) |
---|
2895 | ENDDO |
---|
2896 | ENDIF |
---|
2897 | |
---|
2898 | CASE ( 'usm_surfcat' ) |
---|
2899 | !-- surface category |
---|
2900 | IF ( idsint == iup_u ) THEN |
---|
2901 | DO m = 1, surf_usm_h%ns |
---|
2902 | i = surf_usm_h%i(m) |
---|
2903 | j = surf_usm_h%j(m) |
---|
2904 | k = surf_usm_h%k(m) |
---|
2905 | temp_pf(k,j,i) = surf_usm_h%surface_types(m) |
---|
2906 | ENDDO |
---|
2907 | ELSE |
---|
2908 | l = idsidx |
---|
2909 | DO m = 1, surf_usm_v(l)%ns |
---|
2910 | i = surf_usm_v(l)%i(m) |
---|
2911 | j = surf_usm_v(l)%j(m) |
---|
2912 | k = surf_usm_v(l)%k(m) |
---|
2913 | temp_pf(k,j,i) = surf_usm_v(l)%surface_types(m) |
---|
2914 | ENDDO |
---|
2915 | ENDIF |
---|
2916 | |
---|
2917 | CASE ( 'usm_surfalb' ) |
---|
2918 | !-- surface albedo, weighted average |
---|
2919 | IF ( idsint == iup_u ) THEN |
---|
2920 | DO m = 1, surf_usm_h%ns |
---|
2921 | i = surf_usm_h%i(m) |
---|
2922 | j = surf_usm_h%j(m) |
---|
2923 | k = surf_usm_h%k(m) |
---|
2924 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
2925 | surf_usm_h%albedo(ind_veg_wall,m) + & |
---|
2926 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
2927 | surf_usm_h%albedo(ind_pav_green,m) + & |
---|
2928 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
2929 | surf_usm_h%albedo(ind_wat_win,m) |
---|
2930 | ENDDO |
---|
2931 | ELSE |
---|
2932 | l = idsidx |
---|
2933 | DO m = 1, surf_usm_v(l)%ns |
---|
2934 | i = surf_usm_v(l)%i(m) |
---|
2935 | j = surf_usm_v(l)%j(m) |
---|
2936 | k = surf_usm_v(l)%k(m) |
---|
2937 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
2938 | surf_usm_v(l)%albedo(ind_veg_wall,m) + & |
---|
2939 | surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
2940 | surf_usm_v(l)%albedo(ind_pav_green,m) + & |
---|
2941 | surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
2942 | surf_usm_v(l)%albedo(ind_wat_win,m) |
---|
2943 | ENDDO |
---|
2944 | ENDIF |
---|
2945 | |
---|
2946 | CASE ( 'usm_surfemis' ) |
---|
2947 | !-- surface emissivity, weighted average |
---|
2948 | IF ( idsint == iup_u ) THEN |
---|
2949 | DO m = 1, surf_usm_h%ns |
---|
2950 | i = surf_usm_h%i(m) |
---|
2951 | j = surf_usm_h%j(m) |
---|
2952 | k = surf_usm_h%k(m) |
---|
2953 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
2954 | surf_usm_h%emissivity(ind_veg_wall,m) + & |
---|
2955 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
2956 | surf_usm_h%emissivity(ind_pav_green,m) + & |
---|
2957 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
2958 | surf_usm_h%emissivity(ind_wat_win,m) |
---|
2959 | ENDDO |
---|
2960 | ELSE |
---|
2961 | l = idsidx |
---|
2962 | DO m = 1, surf_usm_v(l)%ns |
---|
2963 | i = surf_usm_v(l)%i(m) |
---|
2964 | j = surf_usm_v(l)%j(m) |
---|
2965 | k = surf_usm_v(l)%k(m) |
---|
2966 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) *& |
---|
2967 | surf_usm_v(l)%emissivity(ind_veg_wall,m) +& |
---|
2968 | surf_usm_v(l)%frac(ind_pav_green,m) *& |
---|
2969 | surf_usm_v(l)%emissivity(ind_pav_green,m)+& |
---|
2970 | surf_usm_v(l)%frac(ind_wat_win,m) *& |
---|
2971 | surf_usm_v(l)%emissivity(ind_wat_win,m) |
---|
2972 | ENDDO |
---|
2973 | ENDIF |
---|
2974 | |
---|
2975 | CASE ( 'usm_surfwintrans' ) |
---|
2976 | !-- transmissivity window tiles |
---|
2977 | IF ( idsint == iup_u ) THEN |
---|
2978 | DO m = 1, surf_usm_h%ns |
---|
2979 | i = surf_usm_h%i(m) |
---|
2980 | j = surf_usm_h%j(m) |
---|
2981 | k = surf_usm_h%k(m) |
---|
2982 | temp_pf(k,j,i) = surf_usm_h%transmissivity(m) |
---|
2983 | ENDDO |
---|
2984 | ELSE |
---|
2985 | l = idsidx |
---|
2986 | DO m = 1, surf_usm_v(l)%ns |
---|
2987 | i = surf_usm_v(l)%i(m) |
---|
2988 | j = surf_usm_v(l)%j(m) |
---|
2989 | k = surf_usm_v(l)%k(m) |
---|
2990 | temp_pf(k,j,i) = surf_usm_v(l)%transmissivity(m) |
---|
2991 | ENDDO |
---|
2992 | ENDIF |
---|
2993 | |
---|
2994 | CASE ( 'usm_wshf' ) |
---|
2995 | !-- array of sensible heat flux from surfaces |
---|
2996 | IF ( av == 0 ) THEN |
---|
2997 | IF ( idsint == iup_u ) THEN |
---|
2998 | DO m = 1, surf_usm_h%ns |
---|
2999 | i = surf_usm_h%i(m) |
---|
3000 | j = surf_usm_h%j(m) |
---|
3001 | k = surf_usm_h%k(m) |
---|
3002 | temp_pf(k,j,i) = surf_usm_h%wshf_eb(m) |
---|
3003 | ENDDO |
---|
3004 | ELSE |
---|
3005 | l = idsidx |
---|
3006 | DO m = 1, surf_usm_v(l)%ns |
---|
3007 | i = surf_usm_v(l)%i(m) |
---|
3008 | j = surf_usm_v(l)%j(m) |
---|
3009 | k = surf_usm_v(l)%k(m) |
---|
3010 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb(m) |
---|
3011 | ENDDO |
---|
3012 | ENDIF |
---|
3013 | ELSE |
---|
3014 | IF ( idsint == iup_u ) THEN |
---|
3015 | DO m = 1, surf_usm_h%ns |
---|
3016 | i = surf_usm_h%i(m) |
---|
3017 | j = surf_usm_h%j(m) |
---|
3018 | k = surf_usm_h%k(m) |
---|
3019 | temp_pf(k,j,i) = surf_usm_h%wshf_eb_av(m) |
---|
3020 | ENDDO |
---|
3021 | ELSE |
---|
3022 | l = idsidx |
---|
3023 | DO m = 1, surf_usm_v(l)%ns |
---|
3024 | i = surf_usm_v(l)%i(m) |
---|
3025 | j = surf_usm_v(l)%j(m) |
---|
3026 | k = surf_usm_v(l)%k(m) |
---|
3027 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb_av(m) |
---|
3028 | ENDDO |
---|
3029 | ENDIF |
---|
3030 | ENDIF |
---|
3031 | |
---|
3032 | |
---|
3033 | CASE ( 'usm_qsws' ) |
---|
3034 | !-- array of latent heat flux from surfaces |
---|
3035 | IF ( av == 0 ) THEN |
---|
3036 | IF ( idsint == iup_u ) THEN |
---|
3037 | DO m = 1, surf_usm_h%ns |
---|
3038 | i = surf_usm_h%i(m) |
---|
3039 | j = surf_usm_h%j(m) |
---|
3040 | k = surf_usm_h%k(m) |
---|
3041 | temp_pf(k,j,i) = surf_usm_h%qsws_eb(m) |
---|
3042 | ENDDO |
---|
3043 | ELSE |
---|
3044 | l = idsidx |
---|
3045 | DO m = 1, surf_usm_v(l)%ns |
---|
3046 | i = surf_usm_v(l)%i(m) |
---|
3047 | j = surf_usm_v(l)%j(m) |
---|
3048 | k = surf_usm_v(l)%k(m) |
---|
3049 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb(m) |
---|
3050 | ENDDO |
---|
3051 | ENDIF |
---|
3052 | ELSE |
---|
3053 | IF ( idsint == iup_u ) THEN |
---|
3054 | DO m = 1, surf_usm_h%ns |
---|
3055 | i = surf_usm_h%i(m) |
---|
3056 | j = surf_usm_h%j(m) |
---|
3057 | k = surf_usm_h%k(m) |
---|
3058 | temp_pf(k,j,i) = surf_usm_h%qsws_eb_av(m) |
---|
3059 | ENDDO |
---|
3060 | ELSE |
---|
3061 | l = idsidx |
---|
3062 | DO m = 1, surf_usm_v(l)%ns |
---|
3063 | i = surf_usm_v(l)%i(m) |
---|
3064 | j = surf_usm_v(l)%j(m) |
---|
3065 | k = surf_usm_v(l)%k(m) |
---|
3066 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb_av(m) |
---|
3067 | ENDDO |
---|
3068 | ENDIF |
---|
3069 | ENDIF |
---|
3070 | |
---|
3071 | CASE ( 'usm_qsws_veg' ) |
---|
3072 | !-- array of latent heat flux from vegetation surfaces |
---|
3073 | IF ( av == 0 ) THEN |
---|
3074 | IF ( idsint == iup_u ) THEN |
---|
3075 | DO m = 1, surf_usm_h%ns |
---|
3076 | i = surf_usm_h%i(m) |
---|
3077 | j = surf_usm_h%j(m) |
---|
3078 | k = surf_usm_h%k(m) |
---|
3079 | temp_pf(k,j,i) = surf_usm_h%qsws_veg(m) |
---|
3080 | ENDDO |
---|
3081 | ELSE |
---|
3082 | l = idsidx |
---|
3083 | DO m = 1, surf_usm_v(l)%ns |
---|
3084 | i = surf_usm_v(l)%i(m) |
---|
3085 | j = surf_usm_v(l)%j(m) |
---|
3086 | k = surf_usm_v(l)%k(m) |
---|
3087 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg(m) |
---|
3088 | ENDDO |
---|
3089 | ENDIF |
---|
3090 | ELSE |
---|
3091 | IF ( idsint == iup_u ) THEN |
---|
3092 | DO m = 1, surf_usm_h%ns |
---|
3093 | i = surf_usm_h%i(m) |
---|
3094 | j = surf_usm_h%j(m) |
---|
3095 | k = surf_usm_h%k(m) |
---|
3096 | temp_pf(k,j,i) = surf_usm_h%qsws_veg_av(m) |
---|
3097 | ENDDO |
---|
3098 | ELSE |
---|
3099 | l = idsidx |
---|
3100 | DO m = 1, surf_usm_v(l)%ns |
---|
3101 | i = surf_usm_v(l)%i(m) |
---|
3102 | j = surf_usm_v(l)%j(m) |
---|
3103 | k = surf_usm_v(l)%k(m) |
---|
3104 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_av(m) |
---|
3105 | ENDDO |
---|
3106 | ENDIF |
---|
3107 | ENDIF |
---|
3108 | |
---|
3109 | CASE ( 'usm_qsws_liq' ) |
---|
3110 | !-- array of latent heat flux from surfaces with liquid |
---|
3111 | IF ( av == 0 ) THEN |
---|
3112 | IF ( idsint == iup_u ) THEN |
---|
3113 | DO m = 1, surf_usm_h%ns |
---|
3114 | i = surf_usm_h%i(m) |
---|
3115 | j = surf_usm_h%j(m) |
---|
3116 | k = surf_usm_h%k(m) |
---|
3117 | temp_pf(k,j,i) = surf_usm_h%qsws_liq(m) |
---|
3118 | ENDDO |
---|
3119 | ELSE |
---|
3120 | l = idsidx |
---|
3121 | DO m = 1, surf_usm_v(l)%ns |
---|
3122 | i = surf_usm_v(l)%i(m) |
---|
3123 | j = surf_usm_v(l)%j(m) |
---|
3124 | k = surf_usm_v(l)%k(m) |
---|
3125 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq(m) |
---|
3126 | ENDDO |
---|
3127 | ENDIF |
---|
3128 | ELSE |
---|
3129 | IF ( idsint == iup_u ) THEN |
---|
3130 | DO m = 1, surf_usm_h%ns |
---|
3131 | i = surf_usm_h%i(m) |
---|
3132 | j = surf_usm_h%j(m) |
---|
3133 | k = surf_usm_h%k(m) |
---|
3134 | temp_pf(k,j,i) = surf_usm_h%qsws_liq_av(m) |
---|
3135 | ENDDO |
---|
3136 | ELSE |
---|
3137 | l = idsidx |
---|
3138 | DO m = 1, surf_usm_v(l)%ns |
---|
3139 | i = surf_usm_v(l)%i(m) |
---|
3140 | j = surf_usm_v(l)%j(m) |
---|
3141 | k = surf_usm_v(l)%k(m) |
---|
3142 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_av(m) |
---|
3143 | ENDDO |
---|
3144 | ENDIF |
---|
3145 | ENDIF |
---|
3146 | |
---|
3147 | CASE ( 'usm_wghf' ) |
---|
3148 | !-- array of heat flux from ground (land, wall, roof) |
---|
3149 | IF ( av == 0 ) THEN |
---|
3150 | IF ( idsint == iup_u ) THEN |
---|
3151 | DO m = 1, surf_usm_h%ns |
---|
3152 | i = surf_usm_h%i(m) |
---|
3153 | j = surf_usm_h%j(m) |
---|
3154 | k = surf_usm_h%k(m) |
---|
3155 | temp_pf(k,j,i) = surf_usm_h%wghf_eb(m) |
---|
3156 | ENDDO |
---|
3157 | ELSE |
---|
3158 | l = idsidx |
---|
3159 | DO m = 1, surf_usm_v(l)%ns |
---|
3160 | i = surf_usm_v(l)%i(m) |
---|
3161 | j = surf_usm_v(l)%j(m) |
---|
3162 | k = surf_usm_v(l)%k(m) |
---|
3163 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb(m) |
---|
3164 | ENDDO |
---|
3165 | ENDIF |
---|
3166 | ELSE |
---|
3167 | IF ( idsint == iup_u ) THEN |
---|
3168 | DO m = 1, surf_usm_h%ns |
---|
3169 | i = surf_usm_h%i(m) |
---|
3170 | j = surf_usm_h%j(m) |
---|
3171 | k = surf_usm_h%k(m) |
---|
3172 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_av(m) |
---|
3173 | ENDDO |
---|
3174 | ELSE |
---|
3175 | l = idsidx |
---|
3176 | DO m = 1, surf_usm_v(l)%ns |
---|
3177 | i = surf_usm_v(l)%i(m) |
---|
3178 | j = surf_usm_v(l)%j(m) |
---|
3179 | k = surf_usm_v(l)%k(m) |
---|
3180 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_av(m) |
---|
3181 | ENDDO |
---|
3182 | ENDIF |
---|
3183 | ENDIF |
---|
3184 | |
---|
3185 | CASE ( 'usm_wghf_window' ) |
---|
3186 | !-- array of heat flux from window ground (land, wall, roof) |
---|
3187 | |
---|
3188 | IF ( av == 0 ) THEN |
---|
3189 | IF ( idsint == iup_u ) THEN |
---|
3190 | DO m = 1, surf_usm_h%ns |
---|
3191 | i = surf_usm_h%i(m) |
---|
3192 | j = surf_usm_h%j(m) |
---|
3193 | k = surf_usm_h%k(m) |
---|
3194 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window(m) |
---|
3195 | ENDDO |
---|
3196 | ELSE |
---|
3197 | l = idsidx |
---|
3198 | DO m = 1, surf_usm_v(l)%ns |
---|
3199 | i = surf_usm_v(l)%i(m) |
---|
3200 | j = surf_usm_v(l)%j(m) |
---|
3201 | k = surf_usm_v(l)%k(m) |
---|
3202 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window(m) |
---|
3203 | ENDDO |
---|
3204 | ENDIF |
---|
3205 | ELSE |
---|
3206 | IF ( idsint == iup_u ) THEN |
---|
3207 | DO m = 1, surf_usm_h%ns |
---|
3208 | i = surf_usm_h%i(m) |
---|
3209 | j = surf_usm_h%j(m) |
---|
3210 | k = surf_usm_h%k(m) |
---|
3211 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window_av(m) |
---|
3212 | ENDDO |
---|
3213 | ELSE |
---|
3214 | l = idsidx |
---|
3215 | DO m = 1, surf_usm_v(l)%ns |
---|
3216 | i = surf_usm_v(l)%i(m) |
---|
3217 | j = surf_usm_v(l)%j(m) |
---|
3218 | k = surf_usm_v(l)%k(m) |
---|
3219 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window_av(m) |
---|
3220 | ENDDO |
---|
3221 | ENDIF |
---|
3222 | ENDIF |
---|
3223 | |
---|
3224 | CASE ( 'usm_wghf_green' ) |
---|
3225 | !-- array of heat flux from green ground (land, wall, roof) |
---|
3226 | |
---|
3227 | IF ( av == 0 ) THEN |
---|
3228 | IF ( idsint == iup_u ) THEN |
---|
3229 | DO m = 1, surf_usm_h%ns |
---|
3230 | i = surf_usm_h%i(m) |
---|
3231 | j = surf_usm_h%j(m) |
---|
3232 | k = surf_usm_h%k(m) |
---|
3233 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green(m) |
---|
3234 | ENDDO |
---|
3235 | ELSE |
---|
3236 | l = idsidx |
---|
3237 | DO m = 1, surf_usm_v(l)%ns |
---|
3238 | i = surf_usm_v(l)%i(m) |
---|
3239 | j = surf_usm_v(l)%j(m) |
---|
3240 | k = surf_usm_v(l)%k(m) |
---|
3241 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green(m) |
---|
3242 | ENDDO |
---|
3243 | ENDIF |
---|
3244 | ELSE |
---|
3245 | IF ( idsint == iup_u ) THEN |
---|
3246 | DO m = 1, surf_usm_h%ns |
---|
3247 | i = surf_usm_h%i(m) |
---|
3248 | j = surf_usm_h%j(m) |
---|
3249 | k = surf_usm_h%k(m) |
---|
3250 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green_av(m) |
---|
3251 | ENDDO |
---|
3252 | ELSE |
---|
3253 | l = idsidx |
---|
3254 | DO m = 1, surf_usm_v(l)%ns |
---|
3255 | i = surf_usm_v(l)%i(m) |
---|
3256 | j = surf_usm_v(l)%j(m) |
---|
3257 | k = surf_usm_v(l)%k(m) |
---|
3258 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green_av(m) |
---|
3259 | ENDDO |
---|
3260 | ENDIF |
---|
3261 | ENDIF |
---|
3262 | |
---|
3263 | CASE ( 'usm_iwghf' ) |
---|
3264 | !-- array of heat flux from indoor ground (land, wall, roof) |
---|
3265 | IF ( av == 0 ) THEN |
---|
3266 | IF ( idsint == iup_u ) THEN |
---|
3267 | DO m = 1, surf_usm_h%ns |
---|
3268 | i = surf_usm_h%i(m) |
---|
3269 | j = surf_usm_h%j(m) |
---|
3270 | k = surf_usm_h%k(m) |
---|
3271 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb(m) |
---|
3272 | ENDDO |
---|
3273 | ELSE |
---|
3274 | l = idsidx |
---|
3275 | DO m = 1, surf_usm_v(l)%ns |
---|
3276 | i = surf_usm_v(l)%i(m) |
---|
3277 | j = surf_usm_v(l)%j(m) |
---|
3278 | k = surf_usm_v(l)%k(m) |
---|
3279 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb(m) |
---|
3280 | ENDDO |
---|
3281 | ENDIF |
---|
3282 | ELSE |
---|
3283 | IF ( idsint == iup_u ) THEN |
---|
3284 | DO m = 1, surf_usm_h%ns |
---|
3285 | i = surf_usm_h%i(m) |
---|
3286 | j = surf_usm_h%j(m) |
---|
3287 | k = surf_usm_h%k(m) |
---|
3288 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_av(m) |
---|
3289 | ENDDO |
---|
3290 | ELSE |
---|
3291 | l = idsidx |
---|
3292 | DO m = 1, surf_usm_v(l)%ns |
---|
3293 | i = surf_usm_v(l)%i(m) |
---|
3294 | j = surf_usm_v(l)%j(m) |
---|
3295 | k = surf_usm_v(l)%k(m) |
---|
3296 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_av(m) |
---|
3297 | ENDDO |
---|
3298 | ENDIF |
---|
3299 | ENDIF |
---|
3300 | |
---|
3301 | CASE ( 'usm_iwghf_window' ) |
---|
3302 | !-- array of heat flux from indoor window ground (land, wall, roof) |
---|
3303 | |
---|
3304 | IF ( av == 0 ) THEN |
---|
3305 | IF ( idsint == iup_u ) THEN |
---|
3306 | DO m = 1, surf_usm_h%ns |
---|
3307 | i = surf_usm_h%i(m) |
---|
3308 | j = surf_usm_h%j(m) |
---|
3309 | k = surf_usm_h%k(m) |
---|
3310 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window(m) |
---|
3311 | ENDDO |
---|
3312 | ELSE |
---|
3313 | l = idsidx |
---|
3314 | DO m = 1, surf_usm_v(l)%ns |
---|
3315 | i = surf_usm_v(l)%i(m) |
---|
3316 | j = surf_usm_v(l)%j(m) |
---|
3317 | k = surf_usm_v(l)%k(m) |
---|
3318 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window(m) |
---|
3319 | ENDDO |
---|
3320 | ENDIF |
---|
3321 | ELSE |
---|
3322 | IF ( idsint == iup_u ) THEN |
---|
3323 | DO m = 1, surf_usm_h%ns |
---|
3324 | i = surf_usm_h%i(m) |
---|
3325 | j = surf_usm_h%j(m) |
---|
3326 | k = surf_usm_h%k(m) |
---|
3327 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window_av(m) |
---|
3328 | ENDDO |
---|
3329 | ELSE |
---|
3330 | l = idsidx |
---|
3331 | DO m = 1, surf_usm_v(l)%ns |
---|
3332 | i = surf_usm_v(l)%i(m) |
---|
3333 | j = surf_usm_v(l)%j(m) |
---|
3334 | k = surf_usm_v(l)%k(m) |
---|
3335 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window_av(m) |
---|
3336 | ENDDO |
---|
3337 | ENDIF |
---|
3338 | ENDIF |
---|
3339 | |
---|
3340 | CASE ( 'usm_t_surf_wall' ) |
---|
3341 | !-- surface temperature for surfaces |
---|
3342 | IF ( av == 0 ) THEN |
---|
3343 | IF ( idsint == iup_u ) THEN |
---|
3344 | DO m = 1, surf_usm_h%ns |
---|
3345 | i = surf_usm_h%i(m) |
---|
3346 | j = surf_usm_h%j(m) |
---|
3347 | k = surf_usm_h%k(m) |
---|
3348 | temp_pf(k,j,i) = t_surf_wall_h(m) |
---|
3349 | ENDDO |
---|
3350 | ELSE |
---|
3351 | l = idsidx |
---|
3352 | DO m = 1, surf_usm_v(l)%ns |
---|
3353 | i = surf_usm_v(l)%i(m) |
---|
3354 | j = surf_usm_v(l)%j(m) |
---|
3355 | k = surf_usm_v(l)%k(m) |
---|
3356 | temp_pf(k,j,i) = t_surf_wall_v(l)%t(m) |
---|
3357 | ENDDO |
---|
3358 | ENDIF |
---|
3359 | ELSE |
---|
3360 | IF ( idsint == iup_u ) THEN |
---|
3361 | DO m = 1, surf_usm_h%ns |
---|
3362 | i = surf_usm_h%i(m) |
---|
3363 | j = surf_usm_h%j(m) |
---|
3364 | k = surf_usm_h%k(m) |
---|
3365 | temp_pf(k,j,i) = surf_usm_h%t_surf_wall_av(m) |
---|
3366 | ENDDO |
---|
3367 | ELSE |
---|
3368 | l = idsidx |
---|
3369 | DO m = 1, surf_usm_v(l)%ns |
---|
3370 | i = surf_usm_v(l)%i(m) |
---|
3371 | j = surf_usm_v(l)%j(m) |
---|
3372 | k = surf_usm_v(l)%k(m) |
---|
3373 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_wall_av(m) |
---|
3374 | ENDDO |
---|
3375 | ENDIF |
---|
3376 | ENDIF |
---|
3377 | |
---|
3378 | CASE ( 'usm_t_surf_window' ) |
---|
3379 | !-- surface temperature for window surfaces |
---|
3380 | |
---|
3381 | IF ( av == 0 ) THEN |
---|
3382 | IF ( idsint == iup_u ) THEN |
---|
3383 | DO m = 1, surf_usm_h%ns |
---|
3384 | i = surf_usm_h%i(m) |
---|
3385 | j = surf_usm_h%j(m) |
---|
3386 | k = surf_usm_h%k(m) |
---|
3387 | temp_pf(k,j,i) = t_surf_window_h(m) |
---|
3388 | ENDDO |
---|
3389 | ELSE |
---|
3390 | l = idsidx |
---|
3391 | DO m = 1, surf_usm_v(l)%ns |
---|
3392 | i = surf_usm_v(l)%i(m) |
---|
3393 | j = surf_usm_v(l)%j(m) |
---|
3394 | k = surf_usm_v(l)%k(m) |
---|
3395 | temp_pf(k,j,i) = t_surf_window_v(l)%t(m) |
---|
3396 | ENDDO |
---|
3397 | ENDIF |
---|
3398 | |
---|
3399 | ELSE |
---|
3400 | IF ( idsint == iup_u ) THEN |
---|
3401 | DO m = 1, surf_usm_h%ns |
---|
3402 | i = surf_usm_h%i(m) |
---|
3403 | j = surf_usm_h%j(m) |
---|
3404 | k = surf_usm_h%k(m) |
---|
3405 | temp_pf(k,j,i) = surf_usm_h%t_surf_window_av(m) |
---|
3406 | ENDDO |
---|
3407 | ELSE |
---|
3408 | l = idsidx |
---|
3409 | DO m = 1, surf_usm_v(l)%ns |
---|
3410 | i = surf_usm_v(l)%i(m) |
---|
3411 | j = surf_usm_v(l)%j(m) |
---|
3412 | k = surf_usm_v(l)%k(m) |
---|
3413 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_window_av(m) |
---|
3414 | ENDDO |
---|
3415 | |
---|
3416 | ENDIF |
---|
3417 | |
---|
3418 | ENDIF |
---|
3419 | |
---|
3420 | CASE ( 'usm_t_surf_green' ) |
---|
3421 | !-- surface temperature for green surfaces |
---|
3422 | |
---|
3423 | IF ( av == 0 ) THEN |
---|
3424 | IF ( idsint == iup_u ) THEN |
---|
3425 | DO m = 1, surf_usm_h%ns |
---|
3426 | i = surf_usm_h%i(m) |
---|
3427 | j = surf_usm_h%j(m) |
---|
3428 | k = surf_usm_h%k(m) |
---|
3429 | temp_pf(k,j,i) = t_surf_green_h(m) |
---|
3430 | ENDDO |
---|
3431 | ELSE |
---|
3432 | l = idsidx |
---|
3433 | DO m = 1, surf_usm_v(l)%ns |
---|
3434 | i = surf_usm_v(l)%i(m) |
---|
3435 | j = surf_usm_v(l)%j(m) |
---|
3436 | k = surf_usm_v(l)%k(m) |
---|
3437 | temp_pf(k,j,i) = t_surf_green_v(l)%t(m) |
---|
3438 | ENDDO |
---|
3439 | ENDIF |
---|
3440 | |
---|
3441 | ELSE |
---|
3442 | IF ( idsint == iup_u ) THEN |
---|
3443 | DO m = 1, surf_usm_h%ns |
---|
3444 | i = surf_usm_h%i(m) |
---|
3445 | j = surf_usm_h%j(m) |
---|
3446 | k = surf_usm_h%k(m) |
---|
3447 | temp_pf(k,j,i) = surf_usm_h%t_surf_green_av(m) |
---|
3448 | ENDDO |
---|
3449 | ELSE |
---|
3450 | l = idsidx |
---|
3451 | DO m = 1, surf_usm_v(l)%ns |
---|
3452 | i = surf_usm_v(l)%i(m) |
---|
3453 | j = surf_usm_v(l)%j(m) |
---|
3454 | k = surf_usm_v(l)%k(m) |
---|
3455 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_green_av(m) |
---|
3456 | ENDDO |
---|
3457 | |
---|
3458 | ENDIF |
---|
3459 | |
---|
3460 | ENDIF |
---|
3461 | |
---|
3462 | CASE ( 'usm_theta_10cm' ) |
---|
3463 | !-- near surface temperature for whole surfaces |
---|
3464 | |
---|
3465 | IF ( av == 0 ) THEN |
---|
3466 | IF ( idsint == iup_u ) THEN |
---|
3467 | DO m = 1, surf_usm_h%ns |
---|
3468 | i = surf_usm_h%i(m) |
---|
3469 | j = surf_usm_h%j(m) |
---|
3470 | k = surf_usm_h%k(m) |
---|
3471 | temp_pf(k,j,i) = surf_usm_h%pt_10cm(m) |
---|
3472 | ENDDO |
---|
3473 | ELSE |
---|
3474 | l = idsidx |
---|
3475 | DO m = 1, surf_usm_v(l)%ns |
---|
3476 | i = surf_usm_v(l)%i(m) |
---|
3477 | j = surf_usm_v(l)%j(m) |
---|
3478 | k = surf_usm_v(l)%k(m) |
---|
3479 | temp_pf(k,j,i) = surf_usm_v(l)%pt_10cm(m) |
---|
3480 | ENDDO |
---|
3481 | ENDIF |
---|
3482 | |
---|
3483 | |
---|
3484 | ELSE |
---|
3485 | IF ( idsint == iup_u ) THEN |
---|
3486 | DO m = 1, surf_usm_h%ns |
---|
3487 | i = surf_usm_h%i(m) |
---|
3488 | j = surf_usm_h%j(m) |
---|
3489 | k = surf_usm_h%k(m) |
---|
3490 | temp_pf(k,j,i) = surf_usm_h%pt_10cm_av(m) |
---|
3491 | ENDDO |
---|
3492 | ELSE |
---|
3493 | l = idsidx |
---|
3494 | DO m = 1, surf_usm_v(l)%ns |
---|
3495 | i = surf_usm_v(l)%i(m) |
---|
3496 | j = surf_usm_v(l)%j(m) |
---|
3497 | k = surf_usm_v(l)%k(m) |
---|
3498 | temp_pf(k,j,i) = surf_usm_v(l)%pt_10cm_av(m) |
---|
3499 | ENDDO |
---|
3500 | |
---|
3501 | ENDIF |
---|
3502 | ENDIF |
---|
3503 | |
---|
3504 | CASE ( 'usm_t_wall' ) |
---|
3505 | !-- wall temperature for iwl layer of walls and land |
---|
3506 | IF ( av == 0 ) THEN |
---|
3507 | IF ( idsint == iup_u ) THEN |
---|
3508 | DO m = 1, surf_usm_h%ns |
---|
3509 | i = surf_usm_h%i(m) |
---|
3510 | j = surf_usm_h%j(m) |
---|
3511 | k = surf_usm_h%k(m) |
---|
3512 | temp_pf(k,j,i) = t_wall_h(iwl,m) |
---|
3513 | ENDDO |
---|
3514 | ELSE |
---|
3515 | l = idsidx |
---|
3516 | DO m = 1, surf_usm_v(l)%ns |
---|
3517 | i = surf_usm_v(l)%i(m) |
---|
3518 | j = surf_usm_v(l)%j(m) |
---|
3519 | k = surf_usm_v(l)%k(m) |
---|
3520 | temp_pf(k,j,i) = t_wall_v(l)%t(iwl,m) |
---|
3521 | ENDDO |
---|
3522 | ENDIF |
---|
3523 | ELSE |
---|
3524 | IF ( idsint == iup_u ) THEN |
---|
3525 | DO m = 1, surf_usm_h%ns |
---|
3526 | i = surf_usm_h%i(m) |
---|
3527 | j = surf_usm_h%j(m) |
---|
3528 | k = surf_usm_h%k(m) |
---|
3529 | temp_pf(k,j,i) = surf_usm_h%t_wall_av(iwl,m) |
---|
3530 | ENDDO |
---|
3531 | ELSE |
---|
3532 | l = idsidx |
---|
3533 | DO m = 1, surf_usm_v(l)%ns |
---|
3534 | i = surf_usm_v(l)%i(m) |
---|
3535 | j = surf_usm_v(l)%j(m) |
---|
3536 | k = surf_usm_v(l)%k(m) |
---|
3537 | temp_pf(k,j,i) = surf_usm_v(l)%t_wall_av(iwl,m) |
---|
3538 | ENDDO |
---|
3539 | ENDIF |
---|
3540 | ENDIF |
---|
3541 | |
---|
3542 | CASE ( 'usm_t_window' ) |
---|
3543 | !-- window temperature for iwl layer of walls and land |
---|
3544 | IF ( av == 0 ) THEN |
---|
3545 | IF ( idsint == iup_u ) THEN |
---|
3546 | DO m = 1, surf_usm_h%ns |
---|
3547 | i = surf_usm_h%i(m) |
---|
3548 | j = surf_usm_h%j(m) |
---|
3549 | k = surf_usm_h%k(m) |
---|
3550 | temp_pf(k,j,i) = t_window_h(iwl,m) |
---|
3551 | ENDDO |
---|
3552 | ELSE |
---|
3553 | l = idsidx |
---|
3554 | DO m = 1, surf_usm_v(l)%ns |
---|
3555 | i = surf_usm_v(l)%i(m) |
---|
3556 | j = surf_usm_v(l)%j(m) |
---|
3557 | k = surf_usm_v(l)%k(m) |
---|
3558 | temp_pf(k,j,i) = t_window_v(l)%t(iwl,m) |
---|
3559 | ENDDO |
---|
3560 | ENDIF |
---|
3561 | ELSE |
---|
3562 | IF ( idsint == iup_u ) THEN |
---|
3563 | DO m = 1, surf_usm_h%ns |
---|
3564 | i = surf_usm_h%i(m) |
---|
3565 | j = surf_usm_h%j(m) |
---|
3566 | k = surf_usm_h%k(m) |
---|
3567 | temp_pf(k,j,i) = surf_usm_h%t_window_av(iwl,m) |
---|
3568 | ENDDO |
---|
3569 | ELSE |
---|
3570 | l = idsidx |
---|
3571 | DO m = 1, surf_usm_v(l)%ns |
---|
3572 | i = surf_usm_v(l)%i(m) |
---|
3573 | j = surf_usm_v(l)%j(m) |
---|
3574 | k = surf_usm_v(l)%k(m) |
---|
3575 | temp_pf(k,j,i) = surf_usm_v(l)%t_window_av(iwl,m) |
---|
3576 | ENDDO |
---|
3577 | ENDIF |
---|
3578 | ENDIF |
---|
3579 | |
---|
3580 | CASE ( 'usm_t_green' ) |
---|
3581 | !-- green temperature for iwl layer of walls and land |
---|
3582 | IF ( av == 0 ) THEN |
---|
3583 | IF ( idsint == iup_u ) THEN |
---|
3584 | DO m = 1, surf_usm_h%ns |
---|
3585 | i = surf_usm_h%i(m) |
---|
3586 | j = surf_usm_h%j(m) |
---|
3587 | k = surf_usm_h%k(m) |
---|
3588 | temp_pf(k,j,i) = t_green_h(iwl,m) |
---|
3589 | ENDDO |
---|
3590 | ELSE |
---|
3591 | l = idsidx |
---|
3592 | DO m = 1, surf_usm_v(l)%ns |
---|
3593 | i = surf_usm_v(l)%i(m) |
---|
3594 | j = surf_usm_v(l)%j(m) |
---|
3595 | k = surf_usm_v(l)%k(m) |
---|
3596 | temp_pf(k,j,i) = t_green_v(l)%t(iwl,m) |
---|
3597 | ENDDO |
---|
3598 | ENDIF |
---|
3599 | ELSE |
---|
3600 | IF ( idsint == iup_u ) THEN |
---|
3601 | DO m = 1, surf_usm_h%ns |
---|
3602 | i = surf_usm_h%i(m) |
---|
3603 | j = surf_usm_h%j(m) |
---|
3604 | k = surf_usm_h%k(m) |
---|
3605 | temp_pf(k,j,i) = surf_usm_h%t_green_av(iwl,m) |
---|
3606 | ENDDO |
---|
3607 | ELSE |
---|
3608 | l = idsidx |
---|
3609 | DO m = 1, surf_usm_v(l)%ns |
---|
3610 | i = surf_usm_v(l)%i(m) |
---|
3611 | j = surf_usm_v(l)%j(m) |
---|
3612 | k = surf_usm_v(l)%k(m) |
---|
3613 | temp_pf(k,j,i) = surf_usm_v(l)%t_green_av(iwl,m) |
---|
3614 | ENDDO |
---|
3615 | ENDIF |
---|
3616 | ENDIF |
---|
3617 | |
---|
3618 | CASE ( 'usm_swc' ) |
---|
3619 | !-- soil water content for iwl layer of walls and land |
---|
3620 | IF ( av == 0 ) THEN |
---|
3621 | IF ( idsint == iup_u ) THEN |
---|
3622 | DO m = 1, surf_usm_h%ns |
---|
3623 | i = surf_usm_h%i(m) |
---|
3624 | j = surf_usm_h%j(m) |
---|
3625 | k = surf_usm_h%k(m) |
---|
3626 | temp_pf(k,j,i) = swc_h(iwl,m) |
---|
3627 | ENDDO |
---|
3628 | ELSE |
---|
3629 | l = idsidx |
---|
3630 | DO m = 1, surf_usm_v(l)%ns |
---|
3631 | i = surf_usm_v(l)%i(m) |
---|
3632 | j = surf_usm_v(l)%j(m) |
---|
3633 | k = surf_usm_v(l)%k(m) |
---|
3634 | temp_pf(k,j,i) = swc_v(l)%t(iwl,m) |
---|
3635 | ENDDO |
---|
3636 | ENDIF |
---|
3637 | ELSE |
---|
3638 | IF ( idsint == iup_u ) THEN |
---|
3639 | DO m = 1, surf_usm_h%ns |
---|
3640 | i = surf_usm_h%i(m) |
---|
3641 | j = surf_usm_h%j(m) |
---|
3642 | k = surf_usm_h%k(m) |
---|
3643 | temp_pf(k,j,i) = surf_usm_h%swc_av(iwl,m) |
---|
3644 | ENDDO |
---|
3645 | ELSE |
---|
3646 | l = idsidx |
---|
3647 | DO m = 1, surf_usm_v(l)%ns |
---|
3648 | i = surf_usm_v(l)%i(m) |
---|
3649 | j = surf_usm_v(l)%j(m) |
---|
3650 | k = surf_usm_v(l)%k(m) |
---|
3651 | temp_pf(k,j,i) = surf_usm_v(l)%swc_av(iwl,m) |
---|
3652 | ENDDO |
---|
3653 | ENDIF |
---|
3654 | ENDIF |
---|
3655 | |
---|
3656 | |
---|
3657 | CASE DEFAULT |
---|
3658 | found = .FALSE. |
---|
3659 | RETURN |
---|
3660 | END SELECT |
---|
3661 | |
---|
3662 | ! |
---|
3663 | !-- Rearrange dimensions for NetCDF output |
---|
3664 | !-- FIXME: this may generate FPE overflow upon conversion from DP to SP |
---|
3665 | DO j = nys, nyn |
---|
3666 | DO i = nxl, nxr |
---|
3667 | DO k = nzb_do, nzt_do |
---|
3668 | local_pf(i,j,k) = temp_pf(k,j,i) |
---|
3669 | ENDDO |
---|
3670 | ENDDO |
---|
3671 | ENDDO |
---|
3672 | |
---|
3673 | END SUBROUTINE usm_data_output_3d |
---|
3674 | |
---|
3675 | |
---|
3676 | !------------------------------------------------------------------------------! |
---|
3677 | ! |
---|
3678 | ! Description: |
---|
3679 | ! ------------ |
---|
3680 | !> Soubroutine defines appropriate grid for netcdf variables. |
---|
3681 | !> It is called out from subroutine netcdf. |
---|
3682 | !------------------------------------------------------------------------------! |
---|
3683 | SUBROUTINE usm_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) |
---|
3684 | |
---|
3685 | IMPLICIT NONE |
---|
3686 | |
---|
3687 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
3688 | LOGICAL, INTENT(OUT) :: found !< |
---|
3689 | CHARACTER (len=*), INTENT(OUT) :: grid_x !< |
---|
3690 | CHARACTER (len=*), INTENT(OUT) :: grid_y !< |
---|
3691 | CHARACTER (len=*), INTENT(OUT) :: grid_z !< |
---|
3692 | |
---|
3693 | CHARACTER (len=varnamelength) :: var |
---|
3694 | |
---|
3695 | var = TRIM(variable) |
---|
3696 | IF ( var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
3697 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
3698 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
3699 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
3700 | var(1:13) == 'usm_qsws_liq_' .OR. & |
---|
3701 | var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
3702 | var(1:17) == 'usm_t_surf_window' .OR. var(1:12) == 'usm_t_window' .OR. & |
---|
3703 | var(1:16) == 'usm_t_surf_green' .OR. var(1:11) == 'usm_t_green' .OR. & |
---|
3704 | var(1:15) == 'usm_theta_10cm' .OR. & |
---|
3705 | var(1:9) == 'usm_surfz' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
3706 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
3707 | var(1:16) == 'usm_surfwintrans' .OR. var(1:7) == 'usm_swc' ) THEN |
---|
3708 | |
---|
3709 | found = .TRUE. |
---|
3710 | grid_x = 'x' |
---|
3711 | grid_y = 'y' |
---|
3712 | grid_z = 'zu' |
---|
3713 | ELSE |
---|
3714 | found = .FALSE. |
---|
3715 | grid_x = 'none' |
---|
3716 | grid_y = 'none' |
---|
3717 | grid_z = 'none' |
---|
3718 | ENDIF |
---|
3719 | |
---|
3720 | END SUBROUTINE usm_define_netcdf_grid |
---|
3721 | |
---|
3722 | |
---|
3723 | !------------------------------------------------------------------------------! |
---|
3724 | ! Description: |
---|
3725 | ! ------------ |
---|
3726 | !> Initialization of the wall surface model |
---|
3727 | !------------------------------------------------------------------------------! |
---|
3728 | SUBROUTINE usm_init_material_model |
---|
3729 | |
---|
3730 | IMPLICIT NONE |
---|
3731 | |
---|
3732 | INTEGER(iwp) :: k, l, m !< running indices |
---|
3733 | |
---|
3734 | CALL location_message( ' initialization of wall surface model', .TRUE. ) |
---|
3735 | |
---|
3736 | !-- Calculate wall grid spacings. |
---|
3737 | !-- Temperature is defined at the center of the wall layers, |
---|
3738 | !-- whereas gradients/fluxes are defined at the edges (_stag) |
---|
3739 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
3740 | DO m = 1, surf_usm_h%ns |
---|
3741 | |
---|
3742 | surf_usm_h%dz_wall(nzb_wall,m) = surf_usm_h%zw(nzb_wall,m) |
---|
3743 | DO k = nzb_wall+1, nzt_wall |
---|
3744 | surf_usm_h%dz_wall(k,m) = surf_usm_h%zw(k,m) - & |
---|
3745 | surf_usm_h%zw(k-1,m) |
---|
3746 | ENDDO |
---|
3747 | surf_usm_h%dz_window(nzb_wall,m) = surf_usm_h%zw_window(nzb_wall,m) |
---|
3748 | DO k = nzb_wall+1, nzt_wall |
---|
3749 | surf_usm_h%dz_window(k,m) = surf_usm_h%zw_window(k,m) - & |
---|
3750 | surf_usm_h%zw_window(k-1,m) |
---|
3751 | ENDDO |
---|
3752 | ! surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
3753 | ! DO k = nzb_wall+1, nzt_wall |
---|
3754 | ! surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
3755 | ! surf_usm_h%zw_green(k-1,m) |
---|
3756 | ! ENDDO |
---|
3757 | |
---|
3758 | surf_usm_h%dz_wall(nzt_wall+1,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
3759 | |
---|
3760 | DO k = nzb_wall, nzt_wall-1 |
---|
3761 | surf_usm_h%dz_wall_stag(k,m) = 0.5 * ( & |
---|
3762 | surf_usm_h%dz_wall(k+1,m) + surf_usm_h%dz_wall(k,m) ) |
---|
3763 | ENDDO |
---|
3764 | surf_usm_h%dz_wall_stag(nzt_wall,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
3765 | |
---|
3766 | surf_usm_h%dz_window(nzt_wall+1,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
3767 | |
---|
3768 | DO k = nzb_wall, nzt_wall-1 |
---|
3769 | surf_usm_h%dz_window_stag(k,m) = 0.5 * ( & |
---|
3770 | surf_usm_h%dz_window(k+1,m) + surf_usm_h%dz_window(k,m) ) |
---|
3771 | ENDDO |
---|
3772 | surf_usm_h%dz_window_stag(nzt_wall,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
3773 | |
---|
3774 | ! surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3775 | ! |
---|
3776 | ! DO k = nzb_wall, nzt_wall-1 |
---|
3777 | ! surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
3778 | ! surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
3779 | ! ENDDO |
---|
3780 | ! surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3781 | !------------- |
---|
3782 | IF (surf_usm_h%green_type_roof(m) == 2.0_wp ) then |
---|
3783 | soil_type = 3 !extensiv green roof |
---|
3784 | surf_usm_h%lai(m) = 2.0_wp |
---|
3785 | |
---|
3786 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
3787 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
3788 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.15_wp |
---|
3789 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.20_wp |
---|
3790 | ELSE |
---|
3791 | soil_type = 6 !intensiv green roof |
---|
3792 | surf_usm_h%lai(m) = 4.0_wp |
---|
3793 | |
---|
3794 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
3795 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
3796 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.40_wp |
---|
3797 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.80_wp |
---|
3798 | ENDIF |
---|
3799 | |
---|
3800 | surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
3801 | DO k = nzb_wall+1, nzt_wall |
---|
3802 | surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
3803 | surf_usm_h%zw_green(k-1,m) |
---|
3804 | ENDDO |
---|
3805 | surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3806 | |
---|
3807 | DO k = nzb_wall, nzt_wall-1 |
---|
3808 | surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
3809 | surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
3810 | ENDDO |
---|
3811 | surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3812 | |
---|
3813 | IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
3814 | alpha_vangenuchten = soil_pars(0,soil_type) |
---|
3815 | ENDIF |
---|
3816 | |
---|
3817 | IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
3818 | l_vangenuchten = soil_pars(1,soil_type) |
---|
3819 | ENDIF |
---|
3820 | |
---|
3821 | IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
3822 | n_vangenuchten = soil_pars(2,soil_type) |
---|
3823 | ENDIF |
---|
3824 | |
---|
3825 | IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
3826 | hydraulic_conductivity = soil_pars(3,soil_type) |
---|
3827 | ENDIF |
---|
3828 | |
---|
3829 | IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
3830 | saturation_moisture = m_soil_pars(0,soil_type) |
---|
3831 | ENDIF |
---|
3832 | |
---|
3833 | IF ( field_capacity == 9999999.9_wp ) THEN |
---|
3834 | field_capacity = m_soil_pars(1,soil_type) |
---|
3835 | ENDIF |
---|
3836 | |
---|
3837 | IF ( wilting_point == 9999999.9_wp ) THEN |
---|
3838 | wilting_point = m_soil_pars(2,soil_type) |
---|
3839 | ENDIF |
---|
3840 | |
---|
3841 | IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
3842 | residual_moisture = m_soil_pars(3,soil_type) |
---|
3843 | ENDIF |
---|
3844 | |
---|
3845 | DO k = nzb_wall, nzt_wall+1 |
---|
3846 | swc_h(k,m) = field_capacity |
---|
3847 | rootfr_h(k,m) = 0.5_wp |
---|
3848 | surf_usm_h%alpha_vg_green(m) = alpha_vangenuchten |
---|
3849 | surf_usm_h%l_vg_green(m) = l_vangenuchten |
---|
3850 | surf_usm_h%n_vg_green(m) = n_vangenuchten |
---|
3851 | surf_usm_h%gamma_w_green_sat(k,m) = hydraulic_conductivity |
---|
3852 | swc_sat_h(k,m) = saturation_moisture |
---|
3853 | fc_h(k,m) = field_capacity |
---|
3854 | wilt_h(k,m) = wilting_point |
---|
3855 | swc_res_h(k,m) = residual_moisture |
---|
3856 | ENDDO |
---|
3857 | !------------------------------- |
---|
3858 | ENDDO |
---|
3859 | surf_usm_h%ddz_wall = 1.0_wp / surf_usm_h%dz_wall |
---|
3860 | surf_usm_h%ddz_wall_stag = 1.0_wp / surf_usm_h%dz_wall_stag |
---|
3861 | surf_usm_h%ddz_window = 1.0_wp / surf_usm_h%dz_window |
---|
3862 | surf_usm_h%ddz_window_stag = 1.0_wp / surf_usm_h%dz_window_stag |
---|
3863 | surf_usm_h%ddz_green = 1.0_wp / surf_usm_h%dz_green |
---|
3864 | surf_usm_h%ddz_green_stag = 1.0_wp / surf_usm_h%dz_green_stag |
---|
3865 | ! |
---|
3866 | !-- For vertical surfaces |
---|
3867 | DO l = 0, 3 |
---|
3868 | DO m = 1, surf_usm_v(l)%ns |
---|
3869 | surf_usm_v(l)%dz_wall(nzb_wall,m) = surf_usm_v(l)%zw(nzb_wall,m) |
---|
3870 | DO k = nzb_wall+1, nzt_wall |
---|
3871 | surf_usm_v(l)%dz_wall(k,m) = surf_usm_v(l)%zw(k,m) - & |
---|
3872 | surf_usm_v(l)%zw(k-1,m) |
---|
3873 | ENDDO |
---|
3874 | surf_usm_v(l)%dz_window(nzb_wall,m) = surf_usm_v(l)%zw_window(nzb_wall,m) |
---|
3875 | DO k = nzb_wall+1, nzt_wall |
---|
3876 | surf_usm_v(l)%dz_window(k,m) = surf_usm_v(l)%zw_window(k,m) - & |
---|
3877 | surf_usm_v(l)%zw_window(k-1,m) |
---|
3878 | ENDDO |
---|
3879 | surf_usm_v(l)%dz_green(nzb_wall,m) = surf_usm_v(l)%zw_green(nzb_wall,m) |
---|
3880 | DO k = nzb_wall+1, nzt_wall |
---|
3881 | surf_usm_v(l)%dz_green(k,m) = surf_usm_v(l)%zw_green(k,m) - & |
---|
3882 | surf_usm_v(l)%zw_green(k-1,m) |
---|
3883 | ENDDO |
---|
3884 | |
---|
3885 | surf_usm_v(l)%dz_wall(nzt_wall+1,m) = & |
---|
3886 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
3887 | |
---|
3888 | DO k = nzb_wall, nzt_wall-1 |
---|
3889 | surf_usm_v(l)%dz_wall_stag(k,m) = 0.5 * ( & |
---|
3890 | surf_usm_v(l)%dz_wall(k+1,m) + & |
---|
3891 | surf_usm_v(l)%dz_wall(k,m) ) |
---|
3892 | ENDDO |
---|
3893 | surf_usm_v(l)%dz_wall_stag(nzt_wall,m) = & |
---|
3894 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
3895 | surf_usm_v(l)%dz_window(nzt_wall+1,m) = & |
---|
3896 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
3897 | |
---|
3898 | DO k = nzb_wall, nzt_wall-1 |
---|
3899 | surf_usm_v(l)%dz_window_stag(k,m) = 0.5 * ( & |
---|
3900 | surf_usm_v(l)%dz_window(k+1,m) + & |
---|
3901 | surf_usm_v(l)%dz_window(k,m) ) |
---|
3902 | ENDDO |
---|
3903 | surf_usm_v(l)%dz_window_stag(nzt_wall,m) = & |
---|
3904 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
3905 | surf_usm_v(l)%dz_green(nzt_wall+1,m) = & |
---|
3906 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
3907 | |
---|
3908 | DO k = nzb_wall, nzt_wall-1 |
---|
3909 | surf_usm_v(l)%dz_green_stag(k,m) = 0.5 * ( & |
---|
3910 | surf_usm_v(l)%dz_green(k+1,m) + & |
---|
3911 | surf_usm_v(l)%dz_green(k,m) ) |
---|
3912 | ENDDO |
---|
3913 | surf_usm_v(l)%dz_green_stag(nzt_wall,m) = & |
---|
3914 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
3915 | ENDDO |
---|
3916 | surf_usm_v(l)%ddz_wall = 1.0_wp / surf_usm_v(l)%dz_wall |
---|
3917 | surf_usm_v(l)%ddz_wall_stag = 1.0_wp / surf_usm_v(l)%dz_wall_stag |
---|
3918 | surf_usm_v(l)%ddz_window = 1.0_wp / surf_usm_v(l)%dz_window |
---|
3919 | surf_usm_v(l)%ddz_window_stag = 1.0_wp / surf_usm_v(l)%dz_window_stag |
---|
3920 | surf_usm_v(l)%ddz_green = 1.0_wp / surf_usm_v(l)%dz_green |
---|
3921 | surf_usm_v(l)%ddz_green_stag = 1.0_wp / surf_usm_v(l)%dz_green_stag |
---|
3922 | ENDDO |
---|
3923 | |
---|
3924 | |
---|
3925 | ! soil_type = 6 |
---|
3926 | ! !-- Initialize standard soil types. It is possible to overwrite each |
---|
3927 | ! !-- parameter by setting the respecticy NAMELIST variable to a |
---|
3928 | ! !-- value /= 9999999.9. |
---|
3929 | ! IF ( soil_type /= 0 ) THEN |
---|
3930 | ! |
---|
3931 | ! IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
3932 | ! alpha_vangenuchten = soil_pars(0,soil_type) |
---|
3933 | ! ENDIF |
---|
3934 | ! |
---|
3935 | ! IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
3936 | ! l_vangenuchten = soil_pars(1,soil_type) |
---|
3937 | ! ENDIF |
---|
3938 | ! |
---|
3939 | ! IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
3940 | ! n_vangenuchten = soil_pars(2,soil_type) |
---|
3941 | ! ENDIF |
---|
3942 | ! |
---|
3943 | ! IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
3944 | ! hydraulic_conductivity = soil_pars(3,soil_type) |
---|
3945 | ! ENDIF |
---|
3946 | ! |
---|
3947 | ! IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
3948 | ! saturation_moisture = m_soil_pars(0,soil_type) |
---|
3949 | ! ENDIF |
---|
3950 | ! |
---|
3951 | ! IF ( field_capacity == 9999999.9_wp ) THEN |
---|
3952 | ! field_capacity = m_soil_pars(1,soil_type) |
---|
3953 | ! ENDIF |
---|
3954 | ! |
---|
3955 | ! IF ( wilting_point == 9999999.9_wp ) THEN |
---|
3956 | ! wilting_point = m_soil_pars(2,soil_type) |
---|
3957 | ! ENDIF |
---|
3958 | ! |
---|
3959 | ! IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
3960 | ! residual_moisture = m_soil_pars(3,soil_type) |
---|
3961 | ! ENDIF |
---|
3962 | ! |
---|
3963 | ! DO m = 1, surf_usm_h%ns |
---|
3964 | ! DO k = nzb_wall, nzt_wall+1 |
---|
3965 | ! swc_h(k,m) = field_capacity |
---|
3966 | ! rootfr_h(k,m) = 0.5_wp |
---|
3967 | ! ENDDO |
---|
3968 | ! ENDDO |
---|
3969 | ! ! ! |
---|
3970 | ! ! !-- Vertical surfaces |
---|
3971 | ! ! DO l = 0, 3 |
---|
3972 | ! ! DO m = 1, surf_usm_v(l)%ns |
---|
3973 | ! ! DO k = nzb_wall, nzt_wall+1 |
---|
3974 | ! ! swc_v(l)%t(k,m) = 0.5_wp |
---|
3975 | ! ! ENDDO |
---|
3976 | ! ! ENDDO |
---|
3977 | ! ! ENDDO |
---|
3978 | ! |
---|
3979 | ! ENDIF |
---|
3980 | ! |
---|
3981 | ! ! |
---|
3982 | ! !-- Map values to the respective 2D arrays |
---|
3983 | ! surf_usm_h%alpha_vg_green = alpha_vangenuchten |
---|
3984 | ! surf_usm_h%l_vg_green = l_vangenuchten |
---|
3985 | ! surf_usm_h%n_vg_green = n_vangenuchten |
---|
3986 | ! surf_usm_h%gamma_w_green_sat = hydraulic_conductivity |
---|
3987 | ! swc_sat_h = saturation_moisture |
---|
3988 | ! fc_h = field_capacity |
---|
3989 | ! wilt_h = wilting_point |
---|
3990 | ! swc_res_h = residual_moisture |
---|
3991 | ! ! r_soil_min = min_soil_resistance |
---|
3992 | |
---|
3993 | CALL location_message( ' wall structures filed out', .TRUE. ) |
---|
3994 | |
---|
3995 | CALL location_message( ' initialization of wall surface model finished', .TRUE. ) |
---|
3996 | |
---|
3997 | END SUBROUTINE usm_init_material_model |
---|
3998 | |
---|
3999 | |
---|
4000 | !------------------------------------------------------------------------------! |
---|
4001 | ! Description: |
---|
4002 | ! ------------ |
---|
4003 | !> Initialization of the urban surface model |
---|
4004 | !------------------------------------------------------------------------------! |
---|
4005 | SUBROUTINE usm_init_urban_surface |
---|
4006 | |
---|
4007 | USE arrays_3d, & |
---|
4008 | ONLY: zw |
---|
4009 | |
---|
4010 | USE netcdf_data_input_mod, & |
---|
4011 | ONLY: building_pars_f, building_type_f, terrain_height_f |
---|
4012 | |
---|
4013 | IMPLICIT NONE |
---|
4014 | |
---|
4015 | INTEGER(iwp) :: i !< loop index x-dirction |
---|
4016 | INTEGER(iwp) :: ind_alb_green !< index in input list for green albedo |
---|
4017 | INTEGER(iwp) :: ind_alb_wall !< index in input list for wall albedo |
---|
4018 | INTEGER(iwp) :: ind_alb_win !< index in input list for window albedo |
---|
4019 | INTEGER(iwp) :: ind_emis_wall !< index in input list for wall emissivity |
---|
4020 | INTEGER(iwp) :: ind_emis_green !< index in input list for green emissivity |
---|
4021 | INTEGER(iwp) :: ind_emis_win !< index in input list for window emissivity |
---|
4022 | INTEGER(iwp) :: ind_green_frac_w !< index in input list for green fraction on wall |
---|
4023 | INTEGER(iwp) :: ind_green_frac_r !< index in input list for green fraction on roof |
---|
4024 | INTEGER(iwp) :: ind_hc1 !< index in input list for heat capacity at first wall layer |
---|
4025 | INTEGER(iwp) :: ind_hc1_win !< index in input list for heat capacity at first window layer |
---|
4026 | INTEGER(iwp) :: ind_hc2 !< index in input list for heat capacity at second wall layer |
---|
4027 | INTEGER(iwp) :: ind_hc2_win !< index in input list for heat capacity at second window layer |
---|
4028 | INTEGER(iwp) :: ind_hc3 !< index in input list for heat capacity at third wall layer |
---|
4029 | INTEGER(iwp) :: ind_hc3_win !< index in input list for heat capacity at third window layer |
---|
4030 | INTEGER(iwp) :: ind_lai_r !< index in input list for LAI on roof |
---|
4031 | INTEGER(iwp) :: ind_lai_w !< index in input list for LAI on wall |
---|
4032 | INTEGER(iwp) :: ind_tc1 !< index in input list for thermal conductivity at first wall layer |
---|
4033 | INTEGER(iwp) :: ind_tc1_win !< index in input list for thermal conductivity at first window layer |
---|
4034 | INTEGER(iwp) :: ind_tc2 !< index in input list for thermal conductivity at second wall layer |
---|
4035 | INTEGER(iwp) :: ind_tc2_win !< index in input list for thermal conductivity at second window layer |
---|
4036 | INTEGER(iwp) :: ind_tc3 !< index in input list for thermal conductivity at third wall layer |
---|
4037 | INTEGER(iwp) :: ind_tc3_win !< index in input list for thermal conductivity at third window layer |
---|
4038 | INTEGER(iwp) :: ind_thick_1 !< index in input list for thickness of first wall layer |
---|
4039 | INTEGER(iwp) :: ind_thick_1_win !< index in input list for thickness of first window layer |
---|
4040 | INTEGER(iwp) :: ind_thick_2 !< index in input list for thickness of second wall layer |
---|
4041 | INTEGER(iwp) :: ind_thick_2_win !< index in input list for thickness of second window layer |
---|
4042 | INTEGER(iwp) :: ind_thick_3 !< index in input list for thickness of third wall layer |
---|
4043 | INTEGER(iwp) :: ind_thick_3_win !< index in input list for thickness of third window layer |
---|
4044 | INTEGER(iwp) :: ind_thick_4 !< index in input list for thickness of fourth wall layer |
---|
4045 | INTEGER(iwp) :: ind_thick_4_win !< index in input list for thickness of fourth window layer |
---|
4046 | INTEGER(iwp) :: ind_trans !< index in input list for window transmissivity |
---|
4047 | INTEGER(iwp) :: ind_wall_frac !< index in input list for wall fraction |
---|
4048 | INTEGER(iwp) :: ind_win_frac !< index in input list for window fraction |
---|
4049 | INTEGER(iwp) :: ind_z0 !< index in input list for z0 |
---|
4050 | INTEGER(iwp) :: ind_z0qh !< index in input list for z0h / z0q |
---|
4051 | INTEGER(iwp) :: j !< loop index y-dirction |
---|
4052 | INTEGER(iwp) :: k !< loop index z-dirction |
---|
4053 | INTEGER(iwp) :: l !< loop index surface orientation |
---|
4054 | INTEGER(iwp) :: m !< loop index surface element |
---|
4055 | INTEGER(iwp) :: st !< dummy |
---|
4056 | |
---|
4057 | REAL(wp) :: c, d, tin, twin |
---|
4058 | REAL(wp) :: ground_floor_level_l !< local height of ground floor level |
---|
4059 | REAL(wp) :: z_agl !< height above ground |
---|
4060 | |
---|
4061 | ! |
---|
4062 | !-- NOPOINTER version not implemented yet |
---|
4063 | #if defined( __nopointer ) |
---|
4064 | message_string = 'The urban surface module only runs with POINTER version' |
---|
4065 | CALL message( 'urban_surface_mod', 'PA0452', 1, 2, 0, 6, 0 ) |
---|
4066 | #endif |
---|
4067 | |
---|
4068 | CALL cpu_log( log_point_s(78), 'usm_init', 'start' ) |
---|
4069 | !-- surface forcing have to be disabled for LSF |
---|
4070 | !-- in case of enabled urban surface module |
---|
4071 | IF ( large_scale_forcing ) THEN |
---|
4072 | lsf_surf = .FALSE. |
---|
4073 | ENDIF |
---|
4074 | |
---|
4075 | ! |
---|
4076 | !-- Flag surface elements belonging to the ground floor level. Therefore, |
---|
4077 | !-- use terrain height array from file, if available. This flag is later used |
---|
4078 | !-- to control initialization of surface attributes. |
---|
4079 | !-- Todo: for the moment disable initialization of building roofs with |
---|
4080 | !-- ground-floor-level properties. |
---|
4081 | surf_usm_h%ground_level = .FALSE. |
---|
4082 | ! DO m = 1, surf_usm_h%ns |
---|
4083 | ! i = surf_usm_h%i(m) |
---|
4084 | ! j = surf_usm_h%j(m) |
---|
4085 | ! k = surf_usm_h%k(m) |
---|
4086 | ! ! |
---|
4087 | ! !-- Get local ground level. If no ground level is given in input file, |
---|
4088 | ! !-- use default value. |
---|
4089 | ! ground_floor_level_l = ground_floor_level |
---|
4090 | ! IF ( building_pars_f%from_file ) THEN |
---|
4091 | ! IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4092 | ! building_pars_f%fill ) & |
---|
4093 | ! ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4094 | ! ENDIF |
---|
4095 | ! ! |
---|
4096 | ! !-- Determine height of surface element above ground level |
---|
4097 | ! IF ( terrain_height_f%from_file ) THEN |
---|
4098 | ! z_agl = zw(k) - terrain_height_f%var(j,i) |
---|
4099 | ! ELSE |
---|
4100 | ! z_agl = zw(k) |
---|
4101 | ! ENDIF |
---|
4102 | ! ! |
---|
4103 | ! !-- Set flag for ground level |
---|
4104 | ! IF ( z_agl <= ground_floor_level_l ) & |
---|
4105 | ! surf_usm_h%ground_level(m) = .TRUE. |
---|
4106 | ! ENDDO |
---|
4107 | |
---|
4108 | DO l = 0, 3 |
---|
4109 | surf_usm_v(l)%ground_level = .FALSE. |
---|
4110 | DO m = 1, surf_usm_v(l)%ns |
---|
4111 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4112 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4113 | k = surf_usm_v(l)%k(m) |
---|
4114 | ! |
---|
4115 | !-- Get local ground level. If no ground level is given in input file, |
---|
4116 | !-- use default value. |
---|
4117 | ground_floor_level_l = ground_floor_level |
---|
4118 | IF ( building_pars_f%from_file ) THEN |
---|
4119 | IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4120 | building_pars_f%fill ) & |
---|
4121 | ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4122 | ENDIF |
---|
4123 | ! |
---|
4124 | !-- Determine height of surface element above ground level. Please |
---|
4125 | !-- note, height of surface element is determined with respect to |
---|
4126 | !-- its height of the adjoing atmospheric grid point. |
---|
4127 | IF ( terrain_height_f%from_file ) THEN |
---|
4128 | z_agl = zw(k) - terrain_height_f%var(j-surf_usm_v(l)%joff, & |
---|
4129 | i-surf_usm_v(l)%ioff) |
---|
4130 | ELSE |
---|
4131 | z_agl = zw(k) |
---|
4132 | ENDIF |
---|
4133 | ! |
---|
4134 | !-- Set flag for ground level |
---|
4135 | IF ( z_agl <= ground_floor_level_l ) & |
---|
4136 | surf_usm_v(l)%ground_level(m) = .TRUE. |
---|
4137 | |
---|
4138 | ENDDO |
---|
4139 | ENDDO |
---|
4140 | ! |
---|
4141 | !-- Initialization of resistances. |
---|
4142 | DO m = 1, surf_usm_h%ns |
---|
4143 | surf_usm_h%r_a(m) = 50.0_wp |
---|
4144 | surf_usm_h%r_a_green(m) = 50.0_wp |
---|
4145 | surf_usm_h%r_a_window(m) = 50.0_wp |
---|
4146 | ENDDO |
---|
4147 | DO l = 0, 3 |
---|
4148 | DO m = 1, surf_usm_v(l)%ns |
---|
4149 | surf_usm_v(l)%r_a(m) = 50.0_wp |
---|
4150 | surf_usm_v(l)%r_a_green(m) = 50.0_wp |
---|
4151 | surf_usm_v(l)%r_a_window(m) = 50.0_wp |
---|
4152 | ENDDO |
---|
4153 | ENDDO |
---|
4154 | |
---|
4155 | !--------------------------------------------------------------------------------------------- |
---|
4156 | ! |
---|
4157 | !-- Map values onto horizontal elemements |
---|
4158 | DO m = 1, surf_usm_h%ns |
---|
4159 | surf_usm_h%r_canopy_min(m) = 200.0_wp !min_canopy_resistance |
---|
4160 | surf_usm_h%g_d(m) = 0.0_wp !canopy_resistance_coefficient |
---|
4161 | ENDDO |
---|
4162 | ! |
---|
4163 | !-- Map values onto vertical elements, even though this does not make |
---|
4164 | !-- much sense. |
---|
4165 | DO l = 0, 3 |
---|
4166 | DO m = 1, surf_usm_v(l)%ns |
---|
4167 | surf_usm_v(l)%r_canopy_min(m) = 200.0_wp !min_canopy_resistance |
---|
4168 | surf_usm_v(l)%g_d(m) = 0.0_wp !canopy_resistance_coefficient |
---|
4169 | ENDDO |
---|
4170 | ENDDO |
---|
4171 | !--------------------------------------------------------------------------------------------- |
---|
4172 | ! |
---|
4173 | ! |
---|
4174 | !-- Initialize urban-type surface attribute. According to initialization in |
---|
4175 | !-- land-surface model, follow a 3-level approach. |
---|
4176 | !-- Level 1 - initialization via default attributes |
---|
4177 | DO m = 1, surf_usm_h%ns |
---|
4178 | ! |
---|
4179 | !-- Now, all horizontal surfaces are roof surfaces (?) |
---|
4180 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
4181 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
4182 | ! |
---|
4183 | !-- In order to distinguish between ground floor level and |
---|
4184 | !-- above-ground-floor level surfaces, set input indices. |
---|
4185 | |
---|
4186 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4187 | surf_usm_h%ground_level(m) ) |
---|
4188 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4189 | surf_usm_h%ground_level(m) ) |
---|
4190 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4191 | surf_usm_h%ground_level(m) ) |
---|
4192 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4193 | surf_usm_h%ground_level(m) ) |
---|
4194 | ! |
---|
4195 | !-- Store building type and its name on each surface element |
---|
4196 | surf_usm_h%building_type(m) = building_type |
---|
4197 | surf_usm_h%building_type_name(m) = building_type_name(building_type) |
---|
4198 | ! |
---|
4199 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4200 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,building_type) |
---|
4201 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,building_type) |
---|
4202 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,building_type) |
---|
4203 | surf_usm_h%lai(m) = building_pars(ind_lai_r,building_type) |
---|
4204 | |
---|
4205 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
4206 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
4207 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,building_type) |
---|
4208 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,building_type) |
---|
4209 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
4210 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
4211 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,building_type) |
---|
4212 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,building_type) |
---|
4213 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
4214 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
4215 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,building_type) |
---|
4216 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,building_type) |
---|
4217 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
4218 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
4219 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,building_type) |
---|
4220 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,building_type) |
---|
4221 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,building_type) |
---|
4222 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,building_type) |
---|
4223 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,building_type) |
---|
4224 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,building_type) |
---|
4225 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,building_type) |
---|
4226 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,building_type) |
---|
4227 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,building_type) |
---|
4228 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,building_type) |
---|
4229 | |
---|
4230 | surf_usm_h%target_temp_summer(m) = building_pars(117,building_type) |
---|
4231 | surf_usm_h%target_temp_winter(m) = building_pars(118,building_type) |
---|
4232 | ! |
---|
4233 | !-- emissivity of wall-, green- and window fraction |
---|
4234 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,building_type) |
---|
4235 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,building_type) |
---|
4236 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,building_type) |
---|
4237 | |
---|
4238 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,building_type) |
---|
4239 | |
---|
4240 | surf_usm_h%z0(m) = building_pars(ind_z0,building_type) |
---|
4241 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
4242 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
4243 | ! |
---|
4244 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
4245 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,building_type) ) |
---|
4246 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,building_type) ) |
---|
4247 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,building_type) ) |
---|
4248 | |
---|
4249 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
4250 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
4251 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
4252 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
4253 | |
---|
4254 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
4255 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
4256 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
4257 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
4258 | |
---|
4259 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,building_type) |
---|
4260 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,building_type) |
---|
4261 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,building_type) |
---|
4262 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,building_type) |
---|
4263 | |
---|
4264 | surf_usm_h%c_surface(m) = building_pars(0,building_type) |
---|
4265 | surf_usm_h%lambda_surf(m) = building_pars(3,building_type) |
---|
4266 | surf_usm_h%c_surface_green(m) = building_pars(2,building_type) |
---|
4267 | surf_usm_h%lambda_surf_green(m) = building_pars(5,building_type) |
---|
4268 | surf_usm_h%c_surface_window(m) = building_pars(1,building_type) |
---|
4269 | surf_usm_h%lambda_surf_window(m) = building_pars(4,building_type) |
---|
4270 | |
---|
4271 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,building_type) |
---|
4272 | |
---|
4273 | ENDDO |
---|
4274 | |
---|
4275 | DO l = 0, 3 |
---|
4276 | DO m = 1, surf_usm_v(l)%ns |
---|
4277 | |
---|
4278 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for root surface |
---|
4279 | ! |
---|
4280 | !-- In order to distinguish between ground floor level and |
---|
4281 | !-- above-ground-floor level surfaces, set input indices. |
---|
4282 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
4283 | surf_usm_v(l)%ground_level(m) ) |
---|
4284 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
4285 | surf_usm_v(l)%ground_level(m) ) |
---|
4286 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
4287 | surf_usm_v(l)%ground_level(m) ) |
---|
4288 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4289 | surf_usm_v(l)%ground_level(m) ) |
---|
4290 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4291 | surf_usm_v(l)%ground_level(m) ) |
---|
4292 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4293 | surf_usm_v(l)%ground_level(m) ) |
---|
4294 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4295 | surf_usm_v(l)%ground_level(m) ) |
---|
4296 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4297 | surf_usm_v(l)%ground_level(m) ) |
---|
4298 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4299 | surf_usm_v(l)%ground_level(m) ) |
---|
4300 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4301 | surf_usm_v(l)%ground_level(m) ) |
---|
4302 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
4303 | surf_usm_v(l)%ground_level(m) ) |
---|
4304 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4305 | surf_usm_v(l)%ground_level(m) ) |
---|
4306 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
4307 | surf_usm_v(l)%ground_level(m) ) |
---|
4308 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4309 | surf_usm_v(l)%ground_level(m) ) |
---|
4310 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
4311 | surf_usm_v(l)%ground_level(m) ) |
---|
4312 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4313 | surf_usm_v(l)%ground_level(m) ) |
---|
4314 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
4315 | surf_usm_v(l)%ground_level(m) ) |
---|
4316 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4317 | surf_usm_v(l)%ground_level(m) ) |
---|
4318 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
4319 | surf_usm_v(l)%ground_level(m) ) |
---|
4320 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4321 | surf_usm_v(l)%ground_level(m) ) |
---|
4322 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
4323 | surf_usm_v(l)%ground_level(m) ) |
---|
4324 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
4325 | surf_usm_v(l)%ground_level(m) ) |
---|
4326 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
4327 | surf_usm_v(l)%ground_level(m) ) |
---|
4328 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
4329 | surf_usm_v(l)%ground_level(m) ) |
---|
4330 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
4331 | surf_usm_v(l)%ground_level(m) ) |
---|
4332 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
4333 | surf_usm_v(l)%ground_level(m) ) |
---|
4334 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
4335 | surf_usm_v(l)%ground_level(m) ) |
---|
4336 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
4337 | surf_usm_v(l)%ground_level(m) ) |
---|
4338 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
4339 | surf_usm_v(l)%ground_level(m) ) |
---|
4340 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4341 | surf_usm_v(l)%ground_level(m) ) |
---|
4342 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4343 | surf_usm_v(l)%ground_level(m) ) |
---|
4344 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4345 | surf_usm_v(l)%ground_level(m) ) |
---|
4346 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4347 | surf_usm_v(l)%ground_level(m) ) |
---|
4348 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4349 | surf_usm_v(l)%ground_level(m) ) |
---|
4350 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4351 | surf_usm_v(l)%ground_level(m) ) |
---|
4352 | ! |
---|
4353 | !-- Store building type and its name on each surface element |
---|
4354 | surf_usm_v(l)%building_type(m) = building_type |
---|
4355 | surf_usm_v(l)%building_type_name(m) = building_type_name(building_type) |
---|
4356 | ! |
---|
4357 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4358 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,building_type) |
---|
4359 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,building_type) |
---|
4360 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,building_type) |
---|
4361 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,building_type) |
---|
4362 | |
---|
4363 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
4364 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
4365 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
4366 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
4367 | |
---|
4368 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
4369 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
4370 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,building_type) |
---|
4371 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,building_type) |
---|
4372 | |
---|
4373 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,building_type) |
---|
4374 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,building_type) |
---|
4375 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,building_type) |
---|
4376 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,building_type) |
---|
4377 | |
---|
4378 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
4379 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
4380 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
4381 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
4382 | |
---|
4383 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
4384 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
4385 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,building_type) |
---|
4386 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,building_type) |
---|
4387 | |
---|
4388 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,building_type) |
---|
4389 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,building_type) |
---|
4390 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,building_type) |
---|
4391 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,building_type) |
---|
4392 | |
---|
4393 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,building_type) |
---|
4394 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,building_type) |
---|
4395 | ! |
---|
4396 | !-- emissivity of wall-, green- and window fraction |
---|
4397 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,building_type) |
---|
4398 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,building_type) |
---|
4399 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,building_type) |
---|
4400 | |
---|
4401 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,building_type) |
---|
4402 | |
---|
4403 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,building_type) |
---|
4404 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
4405 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
4406 | |
---|
4407 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,building_type) ) |
---|
4408 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,building_type) ) |
---|
4409 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,building_type) ) |
---|
4410 | |
---|
4411 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
4412 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
4413 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
4414 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
4415 | |
---|
4416 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
4417 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
4418 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
4419 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
4420 | |
---|
4421 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,building_type) |
---|
4422 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,building_type) |
---|
4423 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,building_type) |
---|
4424 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,building_type) |
---|
4425 | |
---|
4426 | surf_usm_v(l)%c_surface(m) = building_pars(0,building_type) |
---|
4427 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,building_type) |
---|
4428 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,building_type) |
---|
4429 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,building_type) |
---|
4430 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,building_type) |
---|
4431 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,building_type) |
---|
4432 | |
---|
4433 | ENDDO |
---|
4434 | ENDDO |
---|
4435 | ! |
---|
4436 | !-- Level 2 - initialization via building type read from file |
---|
4437 | IF ( building_type_f%from_file ) THEN |
---|
4438 | DO m = 1, surf_usm_h%ns |
---|
4439 | i = surf_usm_h%i(m) |
---|
4440 | j = surf_usm_h%j(m) |
---|
4441 | ! |
---|
4442 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
4443 | st = building_type_f%var(j,i) |
---|
4444 | IF ( st /= building_type_f%fill ) THEN |
---|
4445 | |
---|
4446 | ! |
---|
4447 | !-- In order to distinguish between ground floor level and |
---|
4448 | !-- above-ground-floor level surfaces, set input indices. |
---|
4449 | |
---|
4450 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4451 | surf_usm_h%ground_level(m) ) |
---|
4452 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4453 | surf_usm_h%ground_level(m) ) |
---|
4454 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4455 | surf_usm_h%ground_level(m) ) |
---|
4456 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4457 | surf_usm_h%ground_level(m) ) |
---|
4458 | ! |
---|
4459 | !-- Store building type and its name on each surface element |
---|
4460 | surf_usm_h%building_type(m) = st |
---|
4461 | surf_usm_h%building_type_name(m) = building_type_name(st) |
---|
4462 | ! |
---|
4463 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4464 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,st) |
---|
4465 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,st) |
---|
4466 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,st) |
---|
4467 | surf_usm_h%lai(m) = building_pars(ind_lai_r,st) |
---|
4468 | |
---|
4469 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,st) |
---|
4470 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,st) |
---|
4471 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,st) |
---|
4472 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,st) |
---|
4473 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,st) |
---|
4474 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,st) |
---|
4475 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,st) |
---|
4476 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,st) |
---|
4477 | |
---|
4478 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
4479 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
4480 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,st) |
---|
4481 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,st) |
---|
4482 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
4483 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
4484 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,st) |
---|
4485 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,st) |
---|
4486 | |
---|
4487 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,st) |
---|
4488 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,st) |
---|
4489 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,st) |
---|
4490 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,st) |
---|
4491 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,st) |
---|
4492 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,st) |
---|
4493 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,st) |
---|
4494 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,st) |
---|
4495 | |
---|
4496 | surf_usm_h%target_temp_summer(m) = building_pars(117,st) |
---|
4497 | surf_usm_h%target_temp_winter(m) = building_pars(118,st) |
---|
4498 | ! |
---|
4499 | !-- emissivity of wall-, green- and window fraction |
---|
4500 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,st) |
---|
4501 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,st) |
---|
4502 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,st) |
---|
4503 | |
---|
4504 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,st) |
---|
4505 | |
---|
4506 | surf_usm_h%z0(m) = building_pars(ind_z0,st) |
---|
4507 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,st) |
---|
4508 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,st) |
---|
4509 | ! |
---|
4510 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
4511 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,st) ) |
---|
4512 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,st) ) |
---|
4513 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,st) ) |
---|
4514 | |
---|
4515 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
4516 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
4517 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
4518 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
4519 | |
---|
4520 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
4521 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
4522 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
4523 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
4524 | |
---|
4525 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,st) |
---|
4526 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,st) |
---|
4527 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,st) |
---|
4528 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,st) |
---|
4529 | |
---|
4530 | surf_usm_h%c_surface(m) = building_pars(0,st) |
---|
4531 | surf_usm_h%lambda_surf(m) = building_pars(3,st) |
---|
4532 | surf_usm_h%c_surface_green(m) = building_pars(2,st) |
---|
4533 | surf_usm_h%lambda_surf_green(m) = building_pars(5,st) |
---|
4534 | surf_usm_h%c_surface_window(m) = building_pars(1,st) |
---|
4535 | surf_usm_h%lambda_surf_window(m) = building_pars(4,st) |
---|
4536 | |
---|
4537 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,st) |
---|
4538 | |
---|
4539 | ENDIF |
---|
4540 | ENDDO |
---|
4541 | |
---|
4542 | DO l = 0, 3 |
---|
4543 | DO m = 1, surf_usm_v(l)%ns |
---|
4544 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4545 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4546 | ! |
---|
4547 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
4548 | |
---|
4549 | st = building_type_f%var(j,i) |
---|
4550 | IF ( st /= building_type_f%fill ) THEN |
---|
4551 | |
---|
4552 | ! |
---|
4553 | !-- In order to distinguish between ground floor level and |
---|
4554 | !-- above-ground-floor level surfaces, set input indices. |
---|
4555 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
4556 | surf_usm_v(l)%ground_level(m) ) |
---|
4557 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
4558 | surf_usm_v(l)%ground_level(m) ) |
---|
4559 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
4560 | surf_usm_v(l)%ground_level(m) ) |
---|
4561 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4562 | surf_usm_v(l)%ground_level(m) ) |
---|
4563 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4564 | surf_usm_v(l)%ground_level(m) ) |
---|
4565 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4566 | surf_usm_v(l)%ground_level(m) ) |
---|
4567 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4568 | surf_usm_v(l)%ground_level(m) ) |
---|
4569 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4570 | surf_usm_v(l)%ground_level(m) ) |
---|
4571 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4572 | surf_usm_v(l)%ground_level(m) ) |
---|
4573 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4574 | surf_usm_v(l)%ground_level(m) ) |
---|
4575 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
4576 | surf_usm_v(l)%ground_level(m) ) |
---|
4577 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4578 | surf_usm_v(l)%ground_level(m) ) |
---|
4579 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
4580 | surf_usm_v(l)%ground_level(m) ) |
---|
4581 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4582 | surf_usm_v(l)%ground_level(m) ) |
---|
4583 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
4584 | surf_usm_v(l)%ground_level(m) ) |
---|
4585 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4586 | surf_usm_v(l)%ground_level(m) ) |
---|
4587 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
4588 | surf_usm_v(l)%ground_level(m) ) |
---|
4589 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4590 | surf_usm_v(l)%ground_level(m) ) |
---|
4591 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
4592 | surf_usm_v(l)%ground_level(m) ) |
---|
4593 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4594 | surf_usm_v(l)%ground_level(m) ) |
---|
4595 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
4596 | surf_usm_v(l)%ground_level(m) ) |
---|
4597 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
4598 | surf_usm_v(l)%ground_level(m) ) |
---|
4599 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
4600 | surf_usm_v(l)%ground_level(m) ) |
---|
4601 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
4602 | surf_usm_v(l)%ground_level(m) ) |
---|
4603 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
4604 | surf_usm_v(l)%ground_level(m) ) |
---|
4605 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
4606 | surf_usm_v(l)%ground_level(m) ) |
---|
4607 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
4608 | surf_usm_v(l)%ground_level(m) ) |
---|
4609 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
4610 | surf_usm_v(l)%ground_level(m) ) |
---|
4611 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
4612 | surf_usm_v(l)%ground_level(m) ) |
---|
4613 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4614 | surf_usm_v(l)%ground_level(m) ) |
---|
4615 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4616 | surf_usm_v(l)%ground_level(m) ) |
---|
4617 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4618 | surf_usm_v(l)%ground_level(m) ) |
---|
4619 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4620 | surf_usm_v(l)%ground_level(m) ) |
---|
4621 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4622 | surf_usm_v(l)%ground_level(m) ) |
---|
4623 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4624 | surf_usm_v(l)%ground_level(m) ) |
---|
4625 | ! |
---|
4626 | !-- Store building type and its name on each surface element |
---|
4627 | surf_usm_v(l)%building_type(m) = st |
---|
4628 | surf_usm_v(l)%building_type_name(m) = building_type_name(st) |
---|
4629 | ! |
---|
4630 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4631 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,st) |
---|
4632 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,st) |
---|
4633 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,st) |
---|
4634 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,st) |
---|
4635 | |
---|
4636 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
4637 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
4638 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
4639 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
4640 | |
---|
4641 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
4642 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
4643 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,st) |
---|
4644 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,st) |
---|
4645 | |
---|
4646 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,st) |
---|
4647 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,st) |
---|
4648 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,st) |
---|
4649 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,st) |
---|
4650 | |
---|
4651 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
4652 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
4653 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
4654 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
4655 | |
---|
4656 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
4657 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
4658 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,st) |
---|
4659 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,st) |
---|
4660 | |
---|
4661 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,st) |
---|
4662 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,st) |
---|
4663 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,st) |
---|
4664 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,st) |
---|
4665 | |
---|
4666 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,st) |
---|
4667 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,st) |
---|
4668 | ! |
---|
4669 | !-- emissivity of wall-, green- and window fraction |
---|
4670 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,st) |
---|
4671 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,st) |
---|
4672 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,st) |
---|
4673 | |
---|
4674 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,st) |
---|
4675 | |
---|
4676 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,st) |
---|
4677 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,st) |
---|
4678 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,st) |
---|
4679 | |
---|
4680 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,st) ) |
---|
4681 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,st) ) |
---|
4682 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,st) ) |
---|
4683 | |
---|
4684 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4685 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4686 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4687 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4688 | |
---|
4689 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4690 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4691 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4692 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4693 | |
---|
4694 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,st) |
---|
4695 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,st) |
---|
4696 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,st) |
---|
4697 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,st) |
---|
4698 | |
---|
4699 | surf_usm_v(l)%c_surface(m) = building_pars(0,st) |
---|
4700 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,st) |
---|
4701 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,st) |
---|
4702 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,st) |
---|
4703 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,st) |
---|
4704 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,st) |
---|
4705 | |
---|
4706 | |
---|
4707 | ENDIF |
---|
4708 | ENDDO |
---|
4709 | ENDDO |
---|
4710 | ENDIF |
---|
4711 | |
---|
4712 | ! |
---|
4713 | !-- Level 3 - initialization via building_pars read from file |
---|
4714 | IF ( building_pars_f%from_file ) THEN |
---|
4715 | DO m = 1, surf_usm_h%ns |
---|
4716 | i = surf_usm_h%i(m) |
---|
4717 | j = surf_usm_h%j(m) |
---|
4718 | |
---|
4719 | ! |
---|
4720 | !-- In order to distinguish between ground floor level and |
---|
4721 | !-- above-ground-floor level surfaces, set input indices. |
---|
4722 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4723 | surf_usm_h%ground_level(m) ) |
---|
4724 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4725 | surf_usm_h%ground_level(m) ) |
---|
4726 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4727 | surf_usm_h%ground_level(m) ) |
---|
4728 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4729 | surf_usm_h%ground_level(m) ) |
---|
4730 | |
---|
4731 | ! |
---|
4732 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4733 | IF ( building_pars_f%pars_xy(ind_wall_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4734 | surf_usm_h%frac(ind_veg_wall,m) = building_pars_f%pars_xy(ind_wall_frac_r,j,i) |
---|
4735 | IF ( building_pars_f%pars_xy(ind_green_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4736 | surf_usm_h%frac(ind_pav_green,m) = building_pars_f%pars_xy(ind_green_frac_r,j,i) |
---|
4737 | IF ( building_pars_f%pars_xy(ind_win_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4738 | surf_usm_h%frac(ind_wat_win,m) = building_pars_f%pars_xy(ind_win_frac_r,j,i) |
---|
4739 | |
---|
4740 | |
---|
4741 | IF ( building_pars_f%pars_xy(ind_lai_r,j,i) /= building_pars_f%fill ) & |
---|
4742 | surf_usm_h%lai(m) = building_pars_f%pars_xy(ind_lai_r,j,i) |
---|
4743 | |
---|
4744 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4745 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4746 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4747 | ENDIF |
---|
4748 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4749 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
4750 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4751 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
4752 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4753 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4754 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
4755 | ENDIF |
---|
4756 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4757 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
4758 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4759 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
4760 | IF ( building_pars_f%pars_xy(ind_hc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
4761 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
4762 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
4763 | ENDIF |
---|
4764 | IF ( building_pars_f%pars_xy(ind_hc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
4765 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win_r,j,i) |
---|
4766 | IF ( building_pars_f%pars_xy(ind_hc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
4767 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win_r,j,i) |
---|
4768 | |
---|
4769 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4770 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
4771 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
4772 | ENDIF |
---|
4773 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4774 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_wall_r,j,i) |
---|
4775 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4776 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_wall_r,j,i) |
---|
4777 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
4778 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
4779 | 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) |
---|
4780 | ENDIF |
---|
4781 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4782 | 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) |
---|
4783 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4784 | 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) |
---|
4785 | IF ( building_pars_f%pars_xy(ind_tc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
4786 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
4787 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
4788 | ENDIF |
---|
4789 | IF ( building_pars_f%pars_xy(ind_tc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
4790 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win_r,j,i) |
---|
4791 | IF ( building_pars_f%pars_xy(ind_tc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
4792 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win_r,j,i) |
---|
4793 | |
---|
4794 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
4795 | surf_usm_h%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
4796 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
4797 | surf_usm_h%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
4798 | |
---|
4799 | IF ( building_pars_f%pars_xy(ind_emis_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4800 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall_r,j,i) |
---|
4801 | IF ( building_pars_f%pars_xy(ind_emis_green_r,j,i) /= building_pars_f%fill )& |
---|
4802 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green_r,j,i) |
---|
4803 | IF ( building_pars_f%pars_xy(ind_emis_win_r,j,i) /= building_pars_f%fill ) & |
---|
4804 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win_r,j,i) |
---|
4805 | |
---|
4806 | IF ( building_pars_f%pars_xy(ind_trans_r,j,i) /= building_pars_f%fill ) & |
---|
4807 | surf_usm_h%transmissivity(m) = building_pars_f%pars_xy(ind_trans_r,j,i) |
---|
4808 | |
---|
4809 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
4810 | surf_usm_h%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
4811 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4812 | surf_usm_h%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4813 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4814 | surf_usm_h%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4815 | |
---|
4816 | IF ( building_pars_f%pars_xy(ind_alb_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4817 | surf_usm_h%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall_r,j,i) |
---|
4818 | IF ( building_pars_f%pars_xy(ind_alb_green_r,j,i) /= building_pars_f%fill ) & |
---|
4819 | surf_usm_h%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green_r,j,i) |
---|
4820 | IF ( building_pars_f%pars_xy(ind_alb_win_r,j,i) /= building_pars_f%fill ) & |
---|
4821 | surf_usm_h%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win_r,j,i) |
---|
4822 | |
---|
4823 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4824 | surf_usm_h%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
4825 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4826 | surf_usm_h%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
4827 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4828 | surf_usm_h%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
4829 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4830 | surf_usm_h%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
4831 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4832 | surf_usm_h%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
4833 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4834 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
4835 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4836 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
4837 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
4838 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
4839 | IF ( building_pars_f%pars_xy(ind_thick_1_win_r,j,i) /= building_pars_f%fill ) & |
---|
4840 | surf_usm_h%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win_r,j,i) |
---|
4841 | IF ( building_pars_f%pars_xy(ind_thick_2_win_r,j,i) /= building_pars_f%fill ) & |
---|
4842 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win_r,j,i) |
---|
4843 | IF ( building_pars_f%pars_xy(ind_thick_3_win_r,j,i) /= building_pars_f%fill ) & |
---|
4844 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win_r,j,i) |
---|
4845 | IF ( building_pars_f%pars_xy(ind_thick_4_win_r,j,i) /= building_pars_f%fill ) & |
---|
4846 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win_r,j,i) |
---|
4847 | |
---|
4848 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
4849 | surf_usm_h%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
4850 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
4851 | surf_usm_h%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
4852 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
4853 | surf_usm_h%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
4854 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
4855 | surf_usm_h%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
4856 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
4857 | surf_usm_h%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
4858 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
4859 | surf_usm_h%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
4860 | |
---|
4861 | IF ( building_pars_f%pars_xy(ind_green_type_roof,j,i) /= building_pars_f%fill ) & |
---|
4862 | surf_usm_h%green_type_roof(m) = building_pars_f%pars_xy(ind_green_type_roof,j,i) |
---|
4863 | ENDDO |
---|
4864 | |
---|
4865 | |
---|
4866 | |
---|
4867 | DO l = 0, 3 |
---|
4868 | DO m = 1, surf_usm_v(l)%ns |
---|
4869 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4870 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4871 | |
---|
4872 | ! |
---|
4873 | !-- In order to distinguish between ground floor level and |
---|
4874 | !-- above-ground-floor level surfaces, set input indices. |
---|
4875 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
4876 | surf_usm_v(l)%ground_level(m) ) |
---|
4877 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
4878 | surf_usm_v(l)%ground_level(m) ) |
---|
4879 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
4880 | surf_usm_v(l)%ground_level(m) ) |
---|
4881 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4882 | surf_usm_v(l)%ground_level(m) ) |
---|
4883 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4884 | surf_usm_v(l)%ground_level(m) ) |
---|
4885 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4886 | surf_usm_v(l)%ground_level(m) ) |
---|
4887 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4888 | surf_usm_v(l)%ground_level(m) ) |
---|
4889 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4890 | surf_usm_v(l)%ground_level(m) ) |
---|
4891 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4892 | surf_usm_v(l)%ground_level(m) ) |
---|
4893 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4894 | surf_usm_v(l)%ground_level(m) ) |
---|
4895 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
4896 | surf_usm_v(l)%ground_level(m) ) |
---|
4897 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4898 | surf_usm_v(l)%ground_level(m) ) |
---|
4899 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
4900 | surf_usm_v(l)%ground_level(m) ) |
---|
4901 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4902 | surf_usm_v(l)%ground_level(m) ) |
---|
4903 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
4904 | surf_usm_v(l)%ground_level(m) ) |
---|
4905 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4906 | surf_usm_v(l)%ground_level(m) ) |
---|
4907 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
4908 | surf_usm_v(l)%ground_level(m) ) |
---|
4909 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4910 | surf_usm_v(l)%ground_level(m) ) |
---|
4911 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
4912 | surf_usm_v(l)%ground_level(m) ) |
---|
4913 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4914 | surf_usm_v(l)%ground_level(m) ) |
---|
4915 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
4916 | surf_usm_v(l)%ground_level(m) ) |
---|
4917 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
4918 | surf_usm_v(l)%ground_level(m) ) |
---|
4919 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
4920 | surf_usm_v(l)%ground_level(m) ) |
---|
4921 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
4922 | surf_usm_v(l)%ground_level(m) ) |
---|
4923 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
4924 | surf_usm_v(l)%ground_level(m) ) |
---|
4925 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
4926 | surf_usm_v(l)%ground_level(m) ) |
---|
4927 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
4928 | surf_usm_v(l)%ground_level(m) ) |
---|
4929 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
4930 | surf_usm_v(l)%ground_level(m) ) |
---|
4931 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
4932 | surf_usm_v(l)%ground_level(m) ) |
---|
4933 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4934 | surf_usm_v(l)%ground_level(m) ) |
---|
4935 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4936 | surf_usm_v(l)%ground_level(m) ) |
---|
4937 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4938 | surf_usm_v(l)%ground_level(m) ) |
---|
4939 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4940 | surf_usm_v(l)%ground_level(m) ) |
---|
4941 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4942 | surf_usm_v(l)%ground_level(m) ) |
---|
4943 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4944 | surf_usm_v(l)%ground_level(m) ) |
---|
4945 | |
---|
4946 | ! |
---|
4947 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4948 | IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= & |
---|
4949 | building_pars_f%fill ) & |
---|
4950 | surf_usm_v(l)%frac(ind_veg_wall,m) = & |
---|
4951 | building_pars_f%pars_xy(ind_wall_frac,j,i) |
---|
4952 | IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /= & |
---|
4953 | building_pars_f%fill ) & |
---|
4954 | surf_usm_v(l)%frac(ind_pav_green,m) = & |
---|
4955 | building_pars_f%pars_xy(ind_green_frac_w,j,i) |
---|
4956 | IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= & |
---|
4957 | building_pars_f%fill ) & |
---|
4958 | surf_usm_v(l)%frac(ind_wat_win,m) = & |
---|
4959 | building_pars_f%pars_xy(ind_win_frac,j,i) |
---|
4960 | |
---|
4961 | IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill ) & |
---|
4962 | surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i) |
---|
4963 | |
---|
4964 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) & |
---|
4965 | THEN |
---|
4966 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = & |
---|
4967 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4968 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = & |
---|
4969 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4970 | ENDIF |
---|
4971 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4972 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = & |
---|
4973 | building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4974 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4975 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = & |
---|
4976 | building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4977 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
4978 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = & |
---|
4979 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4980 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = & |
---|
4981 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4982 | ENDIF |
---|
4983 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4984 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4985 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4986 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4987 | IF ( building_pars_f%pars_xy(ind_hc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
4988 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
4989 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
4990 | ENDIF |
---|
4991 | IF ( building_pars_f%pars_xy(ind_hc2_win,j,i) /= building_pars_f%fill ) & |
---|
4992 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win,j,i) |
---|
4993 | IF ( building_pars_f%pars_xy(ind_hc3_win,j,i) /= building_pars_f%fill ) & |
---|
4994 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win,j,i) |
---|
4995 | |
---|
4996 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4997 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4998 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4999 | ENDIF |
---|
5000 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
5001 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
5002 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
5003 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
5004 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
5005 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5006 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5007 | ENDIF |
---|
5008 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
5009 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc2,j,i) |
---|
5010 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
5011 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc3,j,i) |
---|
5012 | IF ( building_pars_f%pars_xy(ind_tc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
5013 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
5014 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
5015 | ENDIF |
---|
5016 | IF ( building_pars_f%pars_xy(ind_tc2_win,j,i) /= building_pars_f%fill ) & |
---|
5017 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win,j,i) |
---|
5018 | IF ( building_pars_f%pars_xy(ind_tc3_win,j,i) /= building_pars_f%fill ) & |
---|
5019 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win,j,i) |
---|
5020 | |
---|
5021 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
5022 | surf_usm_v(l)%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
5023 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
5024 | surf_usm_v(l)%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
5025 | |
---|
5026 | IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill ) & |
---|
5027 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall,j,i) |
---|
5028 | IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )& |
---|
5029 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green,j,i) |
---|
5030 | IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill ) & |
---|
5031 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win,j,i) |
---|
5032 | |
---|
5033 | IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill ) & |
---|
5034 | surf_usm_v(l)%transmissivity(m) = building_pars_f%pars_xy(ind_trans,j,i) |
---|
5035 | |
---|
5036 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
5037 | surf_usm_v(l)%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
5038 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5039 | surf_usm_v(l)%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5040 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5041 | surf_usm_v(l)%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5042 | |
---|
5043 | IF ( building_pars_f%pars_xy(ind_alb_wall,j,i) /= building_pars_f%fill ) & |
---|
5044 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall,j,i) |
---|
5045 | IF ( building_pars_f%pars_xy(ind_alb_green,j,i) /= building_pars_f%fill ) & |
---|
5046 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green,j,i) |
---|
5047 | IF ( building_pars_f%pars_xy(ind_alb_win,j,i) /= building_pars_f%fill ) & |
---|
5048 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win,j,i) |
---|
5049 | |
---|
5050 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5051 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5052 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5053 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5054 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5055 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5056 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5057 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5058 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5059 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5060 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5061 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5062 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5063 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5064 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5065 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5066 | IF ( building_pars_f%pars_xy(ind_thick_1_win,j,i) /= building_pars_f%fill ) & |
---|
5067 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win,j,i) |
---|
5068 | IF ( building_pars_f%pars_xy(ind_thick_2_win,j,i) /= building_pars_f%fill ) & |
---|
5069 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win,j,i) |
---|
5070 | IF ( building_pars_f%pars_xy(ind_thick_3_win,j,i) /= building_pars_f%fill ) & |
---|
5071 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win,j,i) |
---|
5072 | IF ( building_pars_f%pars_xy(ind_thick_4_win,j,i) /= building_pars_f%fill ) & |
---|
5073 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win,j,i) |
---|
5074 | |
---|
5075 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
5076 | surf_usm_v(l)%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
5077 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
5078 | surf_usm_v(l)%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
5079 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
5080 | surf_usm_v(l)%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
5081 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
5082 | surf_usm_v(l)%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
5083 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
5084 | surf_usm_v(l)%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
5085 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
5086 | surf_usm_v(l)%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
5087 | |
---|
5088 | ENDDO |
---|
5089 | ENDDO |
---|
5090 | ENDIF |
---|
5091 | ! |
---|
5092 | !-- Read the surface_types array. |
---|
5093 | !-- Please note, here also initialization of surface attributes is done as |
---|
5094 | !-- long as _urbsurf and _surfpar files are available. Values from above |
---|
5095 | !-- will be overwritten. This might be removed later, but is still in the |
---|
5096 | !-- code to enable compatibility with older model version. |
---|
5097 | CALL usm_read_urban_surface_types() |
---|
5098 | |
---|
5099 | !-- init material heat model |
---|
5100 | CALL usm_init_material_model() |
---|
5101 | |
---|
5102 | !-- init anthropogenic sources of heat |
---|
5103 | IF ( usm_anthropogenic_heat ) THEN |
---|
5104 | !-- init anthropogenic sources of heat (from transportation for now) |
---|
5105 | CALL usm_read_anthropogenic_heat() |
---|
5106 | ENDIF |
---|
5107 | |
---|
5108 | ! |
---|
5109 | !-- Check for consistent initialization. |
---|
5110 | !-- Check if roughness length for momentum, or heat, exceed surface-layer |
---|
5111 | !-- height and decrease local roughness length where necessary. |
---|
5112 | DO m = 1, surf_usm_h%ns |
---|
5113 | IF ( surf_usm_h%z0(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5114 | |
---|
5115 | surf_usm_h%z0(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5116 | |
---|
5117 | WRITE( message_string, * ) 'z0 exceeds surface-layer height ' // & |
---|
5118 | 'at horizontal urban surface and is ' // & |
---|
5119 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5120 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
5121 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
5122 | 0, 0, 0, 6, 0 ) |
---|
5123 | ENDIF |
---|
5124 | IF ( surf_usm_h%z0h(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5125 | |
---|
5126 | surf_usm_h%z0h(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5127 | surf_usm_h%z0q(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5128 | |
---|
5129 | WRITE( message_string, * ) 'z0h exceeds surface-layer height ' // & |
---|
5130 | 'at horizontal urban surface and is ' // & |
---|
5131 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5132 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
5133 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
5134 | 0, 0, 0, 6, 0 ) |
---|
5135 | ENDIF |
---|
5136 | ENDDO |
---|
5137 | |
---|
5138 | DO l = 0, 3 |
---|
5139 | DO m = 1, surf_usm_v(l)%ns |
---|
5140 | IF ( surf_usm_v(l)%z0(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
5141 | |
---|
5142 | surf_usm_v(l)%z0(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
5143 | |
---|
5144 | WRITE( message_string, * ) 'z0 exceeds surface-layer height '//& |
---|
5145 | 'at vertical urban surface and is ' // & |
---|
5146 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5147 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
5148 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
5149 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
5150 | 0, 0, 0, 6, 0 ) |
---|
5151 | ENDIF |
---|
5152 | IF ( surf_usm_v(l)%z0h(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
5153 | |
---|
5154 | surf_usm_v(l)%z0h(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
5155 | surf_usm_v(l)%z0q(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
5156 | |
---|
5157 | WRITE( message_string, * ) 'z0h exceeds surface-layer height '//& |
---|
5158 | 'at vertical urban surface and is ' // & |
---|
5159 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5160 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
5161 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
5162 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
5163 | 0, 0, 0, 6, 0 ) |
---|
5164 | ENDIF |
---|
5165 | ENDDO |
---|
5166 | ENDDO |
---|
5167 | |
---|
5168 | !-- Intitialization of the surface and wall/ground/roof temperature |
---|
5169 | |
---|
5170 | !-- Initialization for restart runs |
---|
5171 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. & |
---|
5172 | TRIM( initializing_actions ) /= 'cyclic_fill' ) THEN |
---|
5173 | |
---|
5174 | ! |
---|
5175 | !-- At horizontal surfaces. Please note, t_surf_wall_h is defined on a |
---|
5176 | !-- different data type, but with the same dimension. |
---|
5177 | #if ! defined( __nopointer ) |
---|
5178 | DO m = 1, surf_usm_h%ns |
---|
5179 | i = surf_usm_h%i(m) |
---|
5180 | j = surf_usm_h%j(m) |
---|
5181 | k = surf_usm_h%k(m) |
---|
5182 | |
---|
5183 | t_surf_wall_h(m) = pt(k,j,i) * exner(k) |
---|
5184 | t_surf_window_h(m) = pt(k,j,i) * exner(k) |
---|
5185 | t_surf_green_h(m) = pt(k,j,i) * exner(k) |
---|
5186 | surf_usm_h%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
5187 | ENDDO |
---|
5188 | ! |
---|
5189 | !-- At vertical surfaces. |
---|
5190 | DO l = 0, 3 |
---|
5191 | DO m = 1, surf_usm_v(l)%ns |
---|
5192 | i = surf_usm_v(l)%i(m) |
---|
5193 | j = surf_usm_v(l)%j(m) |
---|
5194 | k = surf_usm_v(l)%k(m) |
---|
5195 | |
---|
5196 | t_surf_wall_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
5197 | t_surf_window_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
5198 | t_surf_green_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
5199 | surf_usm_v(l)%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
5200 | ENDDO |
---|
5201 | ENDDO |
---|
5202 | #endif |
---|
5203 | ! |
---|
5204 | !-- For the sake of correct initialization, set also q_surface. |
---|
5205 | !-- Note, at urban surfaces q_surface is initialized with 0. |
---|
5206 | IF ( humidity ) THEN |
---|
5207 | DO m = 1, surf_usm_h%ns |
---|
5208 | surf_usm_h%q_surface(m) = 0.0_wp |
---|
5209 | ENDDO |
---|
5210 | DO l = 0, 3 |
---|
5211 | DO m = 1, surf_usm_v(l)%ns |
---|
5212 | surf_usm_v(l)%q_surface(m) = 0.0_wp |
---|
5213 | ENDDO |
---|
5214 | ENDDO |
---|
5215 | ENDIF |
---|
5216 | |
---|
5217 | !-- initial values for t_wall |
---|
5218 | !-- outer value is set to surface temperature |
---|
5219 | !-- inner value is set to wall_inner_temperature |
---|
5220 | !-- and profile is logaritmic (linear in nz). |
---|
5221 | !-- Horizontal surfaces |
---|
5222 | DO m = 1, surf_usm_h%ns |
---|
5223 | ! |
---|
5224 | !-- Roof |
---|
5225 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
5226 | tin = roof_inner_temperature |
---|
5227 | twin = window_inner_temperature |
---|
5228 | ! |
---|
5229 | !-- Normal land surface |
---|
5230 | ELSE |
---|
5231 | tin = soil_inner_temperature |
---|
5232 | twin = window_inner_temperature |
---|
5233 | ENDIF |
---|
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 | |
---|
5239 | t_wall_h(k,m) = ( 1.0_wp - c ) * t_surf_wall_h(m) + c * tin |
---|
5240 | t_window_h(k,m) = ( 1.0_wp - c ) * t_surf_window_h(m) + c * twin |
---|
5241 | t_green_h(k,m) = t_surf_wall_h(m) |
---|
5242 | swc_h(k,m) = 0.5_wp |
---|
5243 | swc_sat_h(k,m) = 0.95_wp |
---|
5244 | swc_res_h(k,m) = 0.05_wp |
---|
5245 | rootfr_h(k,m) = 0.1_wp |
---|
5246 | wilt_h(k,m) = 0.1_wp |
---|
5247 | fc_h(k,m) = 0.9_wp |
---|
5248 | ENDDO |
---|
5249 | ENDDO |
---|
5250 | ! |
---|
5251 | !-- Vertical surfaces |
---|
5252 | DO l = 0, 3 |
---|
5253 | DO m = 1, surf_usm_v(l)%ns |
---|
5254 | ! |
---|
5255 | !-- Inner wall |
---|
5256 | tin = wall_inner_temperature |
---|
5257 | twin = window_inner_temperature |
---|
5258 | |
---|
5259 | DO k = nzb_wall, nzt_wall+1 |
---|
5260 | c = REAL( k - nzb_wall, wp ) / & |
---|
5261 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
5262 | t_wall_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_wall_v(l)%t(m) + c * tin |
---|
5263 | t_window_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_window_v(l)%t(m) + c * twin |
---|
5264 | t_green_v(l)%t(k,m) = t_surf_wall_v(l)%t(m) |
---|
5265 | swc_v(l)%t(k,m) = 0.5_wp |
---|
5266 | ENDDO |
---|
5267 | ENDDO |
---|
5268 | ENDDO |
---|
5269 | ENDIF |
---|
5270 | |
---|
5271 | !-- If specified, replace constant wall temperatures with fully 3D values from file |
---|
5272 | IF ( read_wall_temp_3d ) CALL usm_read_wall_temperature() |
---|
5273 | |
---|
5274 | !-- |
---|
5275 | !-- Possibly DO user-defined actions (e.g. define heterogeneous wall surface) |
---|
5276 | CALL user_init_urban_surface |
---|
5277 | |
---|
5278 | !-- initialize prognostic values for the first timestep |
---|
5279 | t_surf_wall_h_p = t_surf_wall_h |
---|
5280 | t_surf_wall_v_p = t_surf_wall_v |
---|
5281 | t_surf_window_h_p = t_surf_window_h |
---|
5282 | t_surf_window_v_p = t_surf_window_v |
---|
5283 | t_surf_green_h_p = t_surf_green_h |
---|
5284 | t_surf_green_v_p = t_surf_green_v |
---|
5285 | |
---|
5286 | t_wall_h_p = t_wall_h |
---|
5287 | t_wall_v_p = t_wall_v |
---|
5288 | t_window_h_p = t_window_h |
---|
5289 | t_window_v_p = t_window_v |
---|
5290 | t_green_h_p = t_green_h |
---|
5291 | t_green_v_p = t_green_v |
---|
5292 | |
---|
5293 | !-- Adjust radiative fluxes for urban surface at model start |
---|
5294 | !CALL radiation_interaction |
---|
5295 | !-- TODO: interaction should be called once before first output, |
---|
5296 | !-- that is not yet possible. |
---|
5297 | |
---|
5298 | m_liq_usm_h_p = m_liq_usm_h |
---|
5299 | m_liq_usm_v_p = m_liq_usm_v |
---|
5300 | !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
5301 | ! |
---|
5302 | !-- Set initial values for prognostic quantities |
---|
5303 | !-- Horizontal surfaces |
---|
5304 | tm_liq_usm_h_m%var_usm_1d = 0.0_wp |
---|
5305 | surf_usm_h%c_liq = 0.0_wp |
---|
5306 | |
---|
5307 | surf_usm_h%qsws_liq = 0.0_wp |
---|
5308 | surf_usm_h%qsws_veg = 0.0_wp |
---|
5309 | |
---|
5310 | ! |
---|
5311 | !-- Do the same for vertical surfaces |
---|
5312 | DO l = 0, 3 |
---|
5313 | tm_liq_usm_v_m(l)%var_usm_1d = 0.0_wp |
---|
5314 | surf_usm_v(l)%c_liq = 0.0_wp |
---|
5315 | |
---|
5316 | surf_usm_v(l)%qsws_liq = 0.0_wp |
---|
5317 | surf_usm_v(l)%qsws_veg = 0.0_wp |
---|
5318 | ENDDO |
---|
5319 | |
---|
5320 | ! |
---|
5321 | !-- Set initial values for prognostic soil quantities |
---|
5322 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN |
---|
5323 | m_liq_usm_h%var_usm_1d = 0.0_wp |
---|
5324 | |
---|
5325 | DO l = 0, 3 |
---|
5326 | m_liq_usm_v(l)%var_usm_1d = 0.0_wp |
---|
5327 | ENDDO |
---|
5328 | ENDIF |
---|
5329 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
5330 | |
---|
5331 | CALL cpu_log( log_point_s(78), 'usm_init', 'stop' ) |
---|
5332 | |
---|
5333 | END SUBROUTINE usm_init_urban_surface |
---|
5334 | |
---|
5335 | |
---|
5336 | !------------------------------------------------------------------------------! |
---|
5337 | ! Description: |
---|
5338 | ! ------------ |
---|
5339 | ! |
---|
5340 | !> Wall model as part of the urban surface model. The model predicts wall |
---|
5341 | !> temperature. |
---|
5342 | !------------------------------------------------------------------------------! |
---|
5343 | SUBROUTINE usm_material_heat_model( spinup ) |
---|
5344 | |
---|
5345 | |
---|
5346 | IMPLICIT NONE |
---|
5347 | |
---|
5348 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
5349 | |
---|
5350 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wtend, wintend !< tendency |
---|
5351 | REAL(wp) :: win_absorp !absorption coefficient from transmissivity |
---|
5352 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wall_mod |
---|
5353 | |
---|
5354 | LOGICAL :: spinup !if true, no calculation of window temperatures |
---|
5355 | |
---|
5356 | wall_mod=1.0_wp |
---|
5357 | if (usm_wall_mod .AND. spinup) then |
---|
5358 | do kw=nzb_wall,nzb_wall+1 |
---|
5359 | wall_mod(kw)=0.1_wp |
---|
5360 | enddo |
---|
5361 | endif |
---|
5362 | |
---|
5363 | ! |
---|
5364 | !-- For horizontal surfaces |
---|
5365 | DO m = 1, surf_usm_h%ns |
---|
5366 | ! |
---|
5367 | !-- Obtain indices |
---|
5368 | i = surf_usm_h%i(m) |
---|
5369 | j = surf_usm_h%j(m) |
---|
5370 | k = surf_usm_h%k(m) |
---|
5371 | ! |
---|
5372 | !-- prognostic equation for ground/roof temperature t_wall_h |
---|
5373 | wtend(:) = 0.0_wp |
---|
5374 | wtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzb_wall,m)) * & |
---|
5375 | ( surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
5376 | ( t_wall_h(nzb_wall+1,m) & |
---|
5377 | - t_wall_h(nzb_wall,m) ) * & |
---|
5378 | surf_usm_h%ddz_wall(nzb_wall+1,m) & |
---|
5379 | + surf_usm_h%frac(ind_veg_wall,m) & |
---|
5380 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
5381 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
5382 | * surf_usm_h%wghf_eb(m) & |
---|
5383 | - surf_usm_h%frac(ind_pav_green,m) & |
---|
5384 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
5385 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
5386 | * ( surf_usm_h%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
5387 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
5388 | + surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) & |
---|
5389 | * surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
5390 | / ( surf_usm_h%ddz_green(nzt_wall,m) & |
---|
5391 | + surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
5392 | * ( t_wall_h(nzb_wall,m) & |
---|
5393 | - t_green_h(nzt_wall,m) ) ) * & |
---|
5394 | surf_usm_h%ddz_wall_stag(nzb_wall,m) |
---|
5395 | |
---|
5396 | IF ( indoor_model ) then |
---|
5397 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5398 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
5399 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
5400 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
5401 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
5402 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5403 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
5404 | * surf_usm_h%ddz_wall(kw,m) & |
---|
5405 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
5406 | ENDDO |
---|
5407 | wtend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzt_wall,m)) * & |
---|
5408 | ( -surf_usm_h%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1) * & |
---|
5409 | ( t_wall_h(nzt_wall,m) & |
---|
5410 | - t_wall_h(nzt_wall-1,m) ) * & |
---|
5411 | surf_usm_h%ddz_wall(nzt_wall,m) & |
---|
5412 | + surf_usm_h%iwghf_eb(m) ) * & |
---|
5413 | surf_usm_h%ddz_wall_stag(nzt_wall,m) |
---|
5414 | ELSE |
---|
5415 | DO kw = nzb_wall+1, nzt_wall |
---|
5416 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
5417 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
5418 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
5419 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
5420 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5421 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
5422 | * surf_usm_h%ddz_wall(kw,m) & |
---|
5423 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
5424 | ENDDO |
---|
5425 | ENDIF |
---|
5426 | |
---|
5427 | t_wall_h_p(nzb_wall:nzt_wall,m) = t_wall_h(nzb_wall:nzt_wall,m) & |
---|
5428 | + dt_3d * ( tsc(2) & |
---|
5429 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5430 | * surf_usm_h%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
5431 | |
---|
5432 | if (.NOT. spinup) then |
---|
5433 | win_absorp = -log(surf_usm_h%transmissivity(m)) / surf_usm_h%zw_window(nzt_wall,m) |
---|
5434 | !-- prognostic equation for ground/roof window temperature t_window_h |
---|
5435 | wintend(:) = 0.0_wp |
---|
5436 | wintend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzb_wall,m)) * & |
---|
5437 | ( surf_usm_h%lambda_h_window(nzb_wall,m) * & |
---|
5438 | ( t_window_h(nzb_wall+1,m) & |
---|
5439 | - t_window_h(nzb_wall,m) ) * & |
---|
5440 | surf_usm_h%ddz_window(nzb_wall+1,m) & |
---|
5441 | + surf_usm_h%wghf_eb_window(m) & |
---|
5442 | + surf_usm_h%rad_sw_in(m) & |
---|
5443 | * (1.0_wp - exp(-win_absorp & |
---|
5444 | * surf_usm_h%zw_window(nzb_wall,m) ) ) & |
---|
5445 | ) * surf_usm_h%ddz_window_stag(nzb_wall,m) |
---|
5446 | |
---|
5447 | IF ( indoor_model ) then |
---|
5448 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5449 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
5450 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
5451 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
5452 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
5453 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
5454 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
5455 | * surf_usm_h%ddz_window(kw,m) & |
---|
5456 | + surf_usm_h%rad_sw_in(m) & |
---|
5457 | * (exp(-win_absorp & |
---|
5458 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
5459 | - exp(-win_absorp & |
---|
5460 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
5461 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
5462 | |
---|
5463 | ENDDO |
---|
5464 | wintend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzt_wall,m)) * & |
---|
5465 | ( -surf_usm_h%lambda_h_window(nzt_wall-1,m) * & |
---|
5466 | ( t_window_h(nzt_wall,m) & |
---|
5467 | - t_window_h(nzt_wall-1,m) ) * & |
---|
5468 | surf_usm_h%ddz_window(nzt_wall,m) & |
---|
5469 | + surf_usm_h%iwghf_eb_window(m) & |
---|
5470 | + surf_usm_h%rad_sw_in(m) & |
---|
5471 | * (exp(-win_absorp & |
---|
5472 | * surf_usm_h%zw_window(nzt_wall-1,m) ) & |
---|
5473 | - exp(-win_absorp & |
---|
5474 | * surf_usm_h%zw_window(nzt_wall,m) ) ) & |
---|
5475 | ) * surf_usm_h%ddz_window_stag(nzt_wall,m) |
---|
5476 | ELSE |
---|
5477 | DO kw = nzb_wall+1, nzt_wall |
---|
5478 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
5479 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
5480 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
5481 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
5482 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
5483 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
5484 | * surf_usm_h%ddz_window(kw,m) & |
---|
5485 | + surf_usm_h%rad_sw_in(m) & |
---|
5486 | * (exp(-win_absorp & |
---|
5487 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
5488 | - exp(-win_absorp & |
---|
5489 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
5490 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
5491 | |
---|
5492 | ENDDO |
---|
5493 | ENDIF |
---|
5494 | |
---|
5495 | t_window_h_p(nzb_wall:nzt_wall,m) = t_window_h(nzb_wall:nzt_wall,m) & |
---|
5496 | + dt_3d * ( tsc(2) & |
---|
5497 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5498 | * surf_usm_h%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
5499 | |
---|
5500 | endif |
---|
5501 | |
---|
5502 | ! |
---|
5503 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
5504 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5505 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5506 | DO kw = nzb_wall, nzt_wall |
---|
5507 | surf_usm_h%tt_wall_m(kw,m) = wtend(kw) |
---|
5508 | ENDDO |
---|
5509 | ELSEIF ( intermediate_timestep_count < & |
---|
5510 | intermediate_timestep_count_max ) THEN |
---|
5511 | DO kw = nzb_wall, nzt_wall |
---|
5512 | surf_usm_h%tt_wall_m(kw,m) = -9.5625_wp * wtend(kw) + & |
---|
5513 | 5.3125_wp * surf_usm_h%tt_wall_m(kw,m) |
---|
5514 | ENDDO |
---|
5515 | ENDIF |
---|
5516 | ENDIF |
---|
5517 | |
---|
5518 | if (.NOT. spinup) then |
---|
5519 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
5520 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5521 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5522 | DO kw = nzb_wall, nzt_wall |
---|
5523 | surf_usm_h%tt_window_m(kw,m) = wintend(kw) |
---|
5524 | ENDDO |
---|
5525 | ELSEIF ( intermediate_timestep_count < & |
---|
5526 | intermediate_timestep_count_max ) THEN |
---|
5527 | DO kw = nzb_wall, nzt_wall |
---|
5528 | surf_usm_h%tt_window_m(kw,m) = -9.5625_wp * wintend(kw) + & |
---|
5529 | 5.3125_wp * surf_usm_h%tt_window_m(kw,m) |
---|
5530 | ENDDO |
---|
5531 | ENDIF |
---|
5532 | ENDIF |
---|
5533 | |
---|
5534 | endif |
---|
5535 | |
---|
5536 | ENDDO |
---|
5537 | |
---|
5538 | ! |
---|
5539 | !-- For vertical surfaces |
---|
5540 | DO l = 0, 3 |
---|
5541 | DO m = 1, surf_usm_v(l)%ns |
---|
5542 | ! |
---|
5543 | !-- Obtain indices |
---|
5544 | i = surf_usm_v(l)%i(m) |
---|
5545 | j = surf_usm_v(l)%j(m) |
---|
5546 | k = surf_usm_v(l)%k(m) |
---|
5547 | ! |
---|
5548 | !-- prognostic equation for wall temperature t_wall_v |
---|
5549 | wtend(:) = 0.0_wp |
---|
5550 | |
---|
5551 | wtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzb_wall,m)) * & |
---|
5552 | ( surf_usm_v(l)%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
5553 | ( t_wall_v(l)%t(nzb_wall+1,m) & |
---|
5554 | - t_wall_v(l)%t(nzb_wall,m) ) * & |
---|
5555 | surf_usm_v(l)%ddz_wall(nzb_wall+1,m) & |
---|
5556 | + surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5557 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5558 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
5559 | * surf_usm_v(l)%wghf_eb(m) & |
---|
5560 | - surf_usm_v(l)%frac(ind_pav_green,m) & |
---|
5561 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5562 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
5563 | * ( surf_usm_v(l)%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
5564 | * surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
5565 | + surf_usm_v(l)%lambda_h(nzb_wall,m)* wall_mod(nzb_wall) & |
---|
5566 | * surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
5567 | / ( surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
5568 | + surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
5569 | * ( t_wall_v(l)%t(nzb_wall,m) & |
---|
5570 | - t_green_v(l)%t(nzt_wall,m) ) ) * & |
---|
5571 | surf_usm_v(l)%ddz_wall_stag(nzb_wall,m) |
---|
5572 | |
---|
5573 | IF ( indoor_model ) then |
---|
5574 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5575 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
5576 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
5577 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
5578 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
5579 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5580 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
5581 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
5582 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
5583 | ENDDO |
---|
5584 | wtend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzt_wall,m)) * & |
---|
5585 | ( -surf_usm_v(l)%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1)* & |
---|
5586 | ( t_wall_v(l)%t(nzt_wall,m) & |
---|
5587 | - t_wall_v(l)%t(nzt_wall-1,m) ) * & |
---|
5588 | surf_usm_v(l)%ddz_wall(nzt_wall,m) & |
---|
5589 | + surf_usm_v(l)%iwghf_eb(m) ) * & |
---|
5590 | surf_usm_v(l)%ddz_wall_stag(nzt_wall,m) |
---|
5591 | ELSE |
---|
5592 | DO kw = nzb_wall+1, nzt_wall |
---|
5593 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
5594 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
5595 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
5596 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
5597 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
5598 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
5599 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
5600 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
5601 | ENDDO |
---|
5602 | ENDIF |
---|
5603 | |
---|
5604 | t_wall_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
5605 | t_wall_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
5606 | + dt_3d * ( tsc(2) & |
---|
5607 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5608 | * surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
5609 | |
---|
5610 | if (.NOT. spinup) then |
---|
5611 | win_absorp = -log(surf_usm_v(l)%transmissivity(m)) / surf_usm_v(l)%zw_window(nzt_wall,m) |
---|
5612 | !-- prognostic equation for window temperature t_window_v |
---|
5613 | wintend(:) = 0.0_wp |
---|
5614 | wintend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzb_wall,m)) * & |
---|
5615 | ( surf_usm_v(l)%lambda_h_window(nzb_wall,m) * & |
---|
5616 | ( t_window_v(l)%t(nzb_wall+1,m) & |
---|
5617 | - t_window_v(l)%t(nzb_wall,m) ) * & |
---|
5618 | surf_usm_v(l)%ddz_window(nzb_wall+1,m) & |
---|
5619 | + surf_usm_v(l)%wghf_eb_window(m) & |
---|
5620 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5621 | * (1.0_wp - exp(-win_absorp & |
---|
5622 | * surf_usm_v(l)%zw_window(nzb_wall,m) ) ) & |
---|
5623 | ) * surf_usm_v(l)%ddz_window_stag(nzb_wall,m) |
---|
5624 | |
---|
5625 | IF ( indoor_model ) then |
---|
5626 | DO kw = nzb_wall+1, nzt_wall -1 |
---|
5627 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
5628 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
5629 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
5630 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
5631 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
5632 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
5633 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
5634 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5635 | * (exp(-win_absorp & |
---|
5636 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
5637 | - exp(-win_absorp & |
---|
5638 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
5639 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
5640 | ENDDO |
---|
5641 | wintend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzt_wall,m)) * & |
---|
5642 | ( -surf_usm_v(l)%lambda_h_window(nzt_wall-1,m) * & |
---|
5643 | ( t_window_v(l)%t(nzt_wall,m) & |
---|
5644 | - t_window_v(l)%t(nzt_wall-1,m) ) * & |
---|
5645 | surf_usm_v(l)%ddz_window(nzt_wall,m) & |
---|
5646 | + surf_usm_v(l)%iwghf_eb_window(m) & |
---|
5647 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5648 | * (exp(-win_absorp & |
---|
5649 | * surf_usm_v(l)%zw_window(nzt_wall-1,m) ) & |
---|
5650 | - exp(-win_absorp & |
---|
5651 | * surf_usm_v(l)%zw_window(nzt_wall,m) ) ) & |
---|
5652 | ) * surf_usm_v(l)%ddz_window_stag(nzt_wall,m) |
---|
5653 | ELSE |
---|
5654 | DO kw = nzb_wall+1, nzt_wall |
---|
5655 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
5656 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
5657 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
5658 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
5659 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
5660 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
5661 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
5662 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5663 | * (exp(-win_absorp & |
---|
5664 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
5665 | - exp(-win_absorp & |
---|
5666 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
5667 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
5668 | ENDDO |
---|
5669 | ENDIF |
---|
5670 | |
---|
5671 | t_window_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
5672 | t_window_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
5673 | + dt_3d * ( tsc(2) & |
---|
5674 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5675 | * surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
5676 | endif |
---|
5677 | |
---|
5678 | ! |
---|
5679 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
5680 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5681 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5682 | DO kw = nzb_wall, nzt_wall |
---|
5683 | surf_usm_v(l)%tt_wall_m(kw,m) = wtend(kw) |
---|
5684 | ENDDO |
---|
5685 | ELSEIF ( intermediate_timestep_count < & |
---|
5686 | intermediate_timestep_count_max ) THEN |
---|
5687 | DO kw = nzb_wall, nzt_wall |
---|
5688 | surf_usm_v(l)%tt_wall_m(kw,m) = & |
---|
5689 | - 9.5625_wp * wtend(kw) + & |
---|
5690 | 5.3125_wp * surf_usm_v(l)%tt_wall_m(kw,m) |
---|
5691 | ENDDO |
---|
5692 | ENDIF |
---|
5693 | ENDIF |
---|
5694 | |
---|
5695 | |
---|
5696 | if (.NOT. spinup) then |
---|
5697 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
5698 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5699 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5700 | DO kw = nzb_wall, nzt_wall |
---|
5701 | surf_usm_v(l)%tt_window_m(kw,m) = wintend(kw) |
---|
5702 | ENDDO |
---|
5703 | ELSEIF ( intermediate_timestep_count < & |
---|
5704 | intermediate_timestep_count_max ) THEN |
---|
5705 | DO kw = nzb_wall, nzt_wall |
---|
5706 | surf_usm_v(l)%tt_window_m(kw,m) = & |
---|
5707 | - 9.5625_wp * wintend(kw) + & |
---|
5708 | 5.3125_wp * surf_usm_v(l)%tt_window_m(kw,m) |
---|
5709 | ENDDO |
---|
5710 | ENDIF |
---|
5711 | ENDIF |
---|
5712 | endif |
---|
5713 | |
---|
5714 | ENDDO |
---|
5715 | ENDDO |
---|
5716 | |
---|
5717 | END SUBROUTINE usm_material_heat_model |
---|
5718 | |
---|
5719 | !------------------------------------------------------------------------------! |
---|
5720 | ! Description: |
---|
5721 | ! ------------ |
---|
5722 | ! |
---|
5723 | !> Green and substrate model as part of the urban surface model. The model predicts ground |
---|
5724 | !> temperatures. |
---|
5725 | !------------------------------------------------------------------------------! |
---|
5726 | SUBROUTINE usm_green_heat_model |
---|
5727 | |
---|
5728 | |
---|
5729 | IMPLICIT NONE |
---|
5730 | |
---|
5731 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
5732 | |
---|
5733 | REAL(wp) :: ke, lambda_h_green_sat |
---|
5734 | REAL(wp) :: h_vg !< Van Genuchten coef. h |
---|
5735 | REAL(wp) :: drho_l_lv |
---|
5736 | |
---|
5737 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: gtend,tend !< tendency |
---|
5738 | |
---|
5739 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: root_extr_green |
---|
5740 | |
---|
5741 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: lambda_green_temp !< temp. lambda |
---|
5742 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: gamma_green_temp !< temp. gamma |
---|
5743 | |
---|
5744 | LOGICAL :: conserve_water_content = .true. |
---|
5745 | |
---|
5746 | |
---|
5747 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
5748 | |
---|
5749 | ! |
---|
5750 | !-- For horizontal surfaces |
---|
5751 | DO m = 1, surf_usm_h%ns |
---|
5752 | |
---|
5753 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
5754 | ! |
---|
5755 | !-- Obtain indices |
---|
5756 | i = surf_usm_h%i(m) |
---|
5757 | j = surf_usm_h%j(m) |
---|
5758 | k = surf_usm_h%k(m) |
---|
5759 | |
---|
5760 | DO kw = nzb_wall, nzt_wall |
---|
5761 | ! |
---|
5762 | !-- Calculate volumetric heat capacity of the soil, taking |
---|
5763 | !-- into account water content |
---|
5764 | 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)) & |
---|
5765 | + rho_c_water * swc_h(kw,m)) |
---|
5766 | |
---|
5767 | ! |
---|
5768 | !-- Calculate soil heat conductivity at the center of the soil |
---|
5769 | !-- layers |
---|
5770 | lambda_h_green_sat = lambda_h_green_sm ** (1.0_wp - swc_sat_h(kw,m)) * & |
---|
5771 | lambda_h_water ** swc_h(kw,m) |
---|
5772 | |
---|
5773 | ke = 1.0_wp + LOG10(MAX(0.1_wp,swc_h(kw,m) & |
---|
5774 | / swc_sat_h(kw,m))) |
---|
5775 | |
---|
5776 | lambda_green_temp(kw) = ke * (lambda_h_green_sat - lambda_h_green_dry) + & |
---|
5777 | lambda_h_green_dry |
---|
5778 | |
---|
5779 | ENDDO |
---|
5780 | |
---|
5781 | |
---|
5782 | ! |
---|
5783 | !-- Calculate soil heat conductivity (lambda_h) at the _stag level |
---|
5784 | !-- using linear interpolation. For pavement surface, the |
---|
5785 | !-- true pavement depth is considered |
---|
5786 | DO kw = nzb_wall, nzt_wall |
---|
5787 | surf_usm_h%lambda_h_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
5788 | * 0.5_wp |
---|
5789 | ENDDO |
---|
5790 | ! surf_usm_h%lambda_h_green(nzt_wall+1,m) = lambda_green_temp(nzt_wall+1) |
---|
5791 | !-------------------------------------------------------------------------- |
---|
5792 | |
---|
5793 | t_green_h(nzt_wall+1,m) = t_wall_h(nzb_wall,m) |
---|
5794 | ! |
---|
5795 | !-- prognostic equation for ground/roof temperature t_green_h |
---|
5796 | gtend(:) = 0.0_wp |
---|
5797 | gtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_total_green(nzb_wall,m)) * & |
---|
5798 | ( surf_usm_h%lambda_h_green(nzb_wall,m) * & |
---|
5799 | ( t_green_h(nzb_wall+1,m) & |
---|
5800 | - t_green_h(nzb_wall,m) ) * & |
---|
5801 | surf_usm_h%ddz_green(nzb_wall+1,m) & |
---|
5802 | + surf_usm_h%wghf_eb_green(m) ) * & |
---|
5803 | surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
5804 | |
---|
5805 | DO kw = nzb_wall+1, nzt_wall |
---|
5806 | gtend(kw) = (1.0_wp / surf_usm_h%rho_c_total_green(kw,m)) & |
---|
5807 | * ( surf_usm_h%lambda_h_green(kw,m) & |
---|
5808 | * ( t_green_h(kw+1,m) - t_green_h(kw,m) ) & |
---|
5809 | * surf_usm_h%ddz_green(kw+1,m) & |
---|
5810 | - surf_usm_h%lambda_h_green(kw-1,m) & |
---|
5811 | * ( t_green_h(kw,m) - t_green_h(kw-1,m) ) & |
---|
5812 | * surf_usm_h%ddz_green(kw,m) & |
---|
5813 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
5814 | ENDDO |
---|
5815 | |
---|
5816 | t_green_h_p(nzb_wall:nzt_wall,m) = t_green_h(nzb_wall:nzt_wall,m) & |
---|
5817 | + dt_3d * ( tsc(2) & |
---|
5818 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5819 | * surf_usm_h%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
5820 | |
---|
5821 | |
---|
5822 | ! |
---|
5823 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
5824 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5825 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5826 | DO kw = nzb_wall, nzt_wall |
---|
5827 | surf_usm_h%tt_green_m(kw,m) = gtend(kw) |
---|
5828 | ENDDO |
---|
5829 | ELSEIF ( intermediate_timestep_count < & |
---|
5830 | intermediate_timestep_count_max ) THEN |
---|
5831 | DO kw = nzb_wall, nzt_wall |
---|
5832 | surf_usm_h%tt_green_m(kw,m) = -9.5625_wp * gtend(kw) + & |
---|
5833 | 5.3125_wp * surf_usm_h%tt_green_m(kw,m) |
---|
5834 | ENDDO |
---|
5835 | ENDIF |
---|
5836 | ENDIF |
---|
5837 | |
---|
5838 | !-------------------------------------------------------------- |
---|
5839 | DO kw = nzb_wall, nzt_wall |
---|
5840 | |
---|
5841 | ! |
---|
5842 | !-- Calculate soil diffusivity at the center of the soil layers |
---|
5843 | lambda_green_temp(kw) = (- b_ch * surf_usm_h%gamma_w_green_sat(kw,m) * psi_sat & |
---|
5844 | / swc_sat_h(kw,m) ) * ( MAX( swc_h(kw,m), & |
---|
5845 | wilt_h(kw,m) ) / swc_sat_h(kw,m) )**( & |
---|
5846 | b_ch + 2.0_wp ) |
---|
5847 | |
---|
5848 | ! |
---|
5849 | !-- Parametrization of Van Genuchten |
---|
5850 | IF ( soil_type /= 7 ) THEN |
---|
5851 | ! |
---|
5852 | !-- Calculate the hydraulic conductivity after Van Genuchten |
---|
5853 | !-- (1980) |
---|
5854 | h_vg = ( ( (swc_res_h(kw,m) - swc_sat_h(kw,m)) / ( swc_res_h(kw,m) - & |
---|
5855 | MAX( swc_h(kw,m), wilt_h(kw,m) ) ) )**( & |
---|
5856 | surf_usm_h%n_vg_green(m) / (surf_usm_h%n_vg_green(m) - 1.0_wp ) ) - 1.0_wp & |
---|
5857 | )**( 1.0_wp / surf_usm_h%n_vg_green(m) ) / surf_usm_h%alpha_vg_green(m) |
---|
5858 | |
---|
5859 | |
---|
5860 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( ( (1.0_wp + & |
---|
5861 | ( surf_usm_h%alpha_vg_green(m) * h_vg )**surf_usm_h%n_vg_green(m))**( & |
---|
5862 | 1.0_wp - 1.0_wp / surf_usm_h%n_vg_green(m) ) - ( & |
---|
5863 | surf_usm_h%alpha_vg_green(m) * h_vg )**( surf_usm_h%n_vg_green(m) & |
---|
5864 | - 1.0_wp) )**2 ) & |
---|
5865 | / ( ( 1.0_wp + ( surf_usm_h%alpha_vg_green(m) * h_vg & |
---|
5866 | )**surf_usm_h%n_vg_green(m) )**( ( 1.0_wp - 1.0_wp & |
---|
5867 | / surf_usm_h%n_vg_green(m) ) *( surf_usm_h%l_vg_green(m) + 2.0_wp) ) ) |
---|
5868 | |
---|
5869 | ! |
---|
5870 | !-- Parametrization of Clapp & Hornberger |
---|
5871 | ELSE |
---|
5872 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( swc_h(kw,m) & |
---|
5873 | / swc_sat_h(kw,m) )**(2.0_wp * b_ch + 3.0_wp) |
---|
5874 | ENDIF |
---|
5875 | |
---|
5876 | ENDDO |
---|
5877 | |
---|
5878 | ! |
---|
5879 | !-- Prognostic equation for soil moisture content. Only performed, |
---|
5880 | !-- when humidity is enabled in the atmosphere |
---|
5881 | IF ( humidity ) THEN |
---|
5882 | ! |
---|
5883 | !-- Calculate soil diffusivity (lambda_w) at the _stag level |
---|
5884 | !-- using linear interpolation. To do: replace this with |
---|
5885 | !-- ECMWF-IFS Eq. 8.81 |
---|
5886 | DO kw = nzb_wall, nzt_wall-1 |
---|
5887 | |
---|
5888 | surf_usm_h%lambda_w_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
5889 | * 0.5_wp |
---|
5890 | surf_usm_h%gamma_w_green(kw,m) = ( gamma_green_temp(kw+1) + gamma_green_temp(kw) ) & |
---|
5891 | * 0.5_wp |
---|
5892 | |
---|
5893 | ENDDO |
---|
5894 | |
---|
5895 | ! |
---|
5896 | ! |
---|
5897 | !-- In case of a closed bottom (= water content is conserved), |
---|
5898 | !-- set hydraulic conductivity to zero to that no water will be |
---|
5899 | !-- lost in the bottom layer. |
---|
5900 | IF ( conserve_water_content ) THEN |
---|
5901 | surf_usm_h%gamma_w_green(kw,m) = 0.0_wp |
---|
5902 | ELSE |
---|
5903 | surf_usm_h%gamma_w_green(kw,m) = gamma_green_temp(nzt_wall) |
---|
5904 | ENDIF |
---|
5905 | |
---|
5906 | !-- The root extraction (= root_extr * qsws_veg / (rho_l |
---|
5907 | !-- * l_v)) ensures the mass conservation for water. The |
---|
5908 | !-- transpiration of plants equals the cumulative withdrawals by |
---|
5909 | !-- the roots in the soil. The scheme takes into account the |
---|
5910 | !-- availability of water in the soil layers as well as the root |
---|
5911 | !-- fraction in the respective layer. Layer with moisture below |
---|
5912 | !-- wilting point will not contribute, which reflects the |
---|
5913 | !-- preference of plants to take water from moister layers. |
---|
5914 | |
---|
5915 | ! |
---|
5916 | !-- Calculate the root extraction (ECMWF 7.69, the sum of |
---|
5917 | !-- root_extr = 1). The energy balance solver guarantees a |
---|
5918 | !-- positive transpiration, so that there is no need for an |
---|
5919 | !-- additional check. |
---|
5920 | m_total = 0.0_wp |
---|
5921 | DO kw = nzb_wall, nzt_wall |
---|
5922 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
5923 | m_total = m_total + rootfr_h(kw,m) * swc_h(kw,m) |
---|
5924 | ENDIF |
---|
5925 | ENDDO |
---|
5926 | |
---|
5927 | IF ( m_total > 0.0_wp ) THEN |
---|
5928 | DO kw = nzb_wall, nzt_wall |
---|
5929 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
5930 | root_extr_green(kw) = rootfr_h(kw,m) * swc_h(kw,m) & |
---|
5931 | / m_total |
---|
5932 | ELSE |
---|
5933 | root_extr_green(kw) = 0.0_wp |
---|
5934 | ENDIF |
---|
5935 | ENDDO |
---|
5936 | ENDIF |
---|
5937 | |
---|
5938 | ! |
---|
5939 | !-- Prognostic equation for soil water content m_soil. |
---|
5940 | tend(:) = 0.0_wp |
---|
5941 | |
---|
5942 | tend(nzb_wall) = ( surf_usm_h%lambda_w_green(nzb_wall,m) * ( & |
---|
5943 | swc_h(nzb_wall+1,m) - swc_h(nzb_wall,m) ) & |
---|
5944 | * surf_usm_h%ddz_green(nzb_wall+1,m) - surf_usm_h%gamma_w_green(nzb_wall,m) - ( & |
---|
5945 | root_extr_green(nzb_wall) * surf_usm_h%qsws_veg(m) & |
---|
5946 | ! + surf_usm_h%qsws_soil_green(m) |
---|
5947 | ) * drho_l_lv ) & |
---|
5948 | * surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
5949 | |
---|
5950 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5951 | tend(kw) = ( surf_usm_h%lambda_w_green(kw,m) * ( swc_h(kw+1,m) & |
---|
5952 | - swc_h(kw,m) ) * surf_usm_h%ddz_green(kw+1,m) & |
---|
5953 | - surf_usm_h%gamma_w_green(kw,m) & |
---|
5954 | - surf_usm_h%lambda_w_green(kw-1,m) * (swc_h(kw,m) - & |
---|
5955 | swc_h(kw-1,m)) * surf_usm_h%ddz_green(kw,m) & |
---|
5956 | + surf_usm_h%gamma_w_green(kw-1,m) - (root_extr_green(kw) & |
---|
5957 | * surf_usm_h%qsws_veg(m) * drho_l_lv) & |
---|
5958 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
5959 | |
---|
5960 | ENDDO |
---|
5961 | tend(nzt_wall) = ( - surf_usm_h%gamma_w_green(nzt_wall,m) & |
---|
5962 | - surf_usm_h%lambda_w_green(nzt_wall-1,m) & |
---|
5963 | * (swc_h(nzt_wall,m) & |
---|
5964 | - swc_h(nzt_wall-1,m)) & |
---|
5965 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
5966 | + surf_usm_h%gamma_w_green(nzt_wall-1,m) - ( & |
---|
5967 | root_extr_green(nzt_wall) & |
---|
5968 | * surf_usm_h%qsws_veg(m) * drho_l_lv ) & |
---|
5969 | ) * surf_usm_h%ddz_green_stag(nzt_wall,m) |
---|
5970 | |
---|
5971 | swc_h_p(nzb_wall:nzt_wall,m) = swc_h(nzb_wall:nzt_wall,m)& |
---|
5972 | + dt_3d * ( tsc(2) * tend(:) & |
---|
5973 | + tsc(3) * surf_usm_h%tswc_h_m(:,m) ) |
---|
5974 | |
---|
5975 | ! |
---|
5976 | !-- Account for dry soils (find a better solution here!) |
---|
5977 | DO kw = nzb_wall, nzt_wall |
---|
5978 | IF ( swc_h_p(kw,m) < 0.0_wp ) swc_h_p(kw,m) = 0.0_wp |
---|
5979 | ENDDO |
---|
5980 | |
---|
5981 | ! |
---|
5982 | !-- Calculate m_soil tendencies for the next Runge-Kutta step |
---|
5983 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5984 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5985 | DO kw = nzb_wall, nzt_wall |
---|
5986 | surf_usm_h%tswc_h_m(kw,m) = tend(kw) |
---|
5987 | ENDDO |
---|
5988 | ELSEIF ( intermediate_timestep_count < & |
---|
5989 | intermediate_timestep_count_max ) THEN |
---|
5990 | DO kw = nzb_wall, nzt_wall |
---|
5991 | surf_usm_h%tswc_h_m(kw,m) = -9.5625_wp * tend(kw) + 5.3125_wp& |
---|
5992 | * surf_usm_h%tswc_h_m(kw,m) |
---|
5993 | ENDDO |
---|
5994 | ENDIF |
---|
5995 | ENDIF |
---|
5996 | ENDIF |
---|
5997 | !-------------------------------------------------------------- |
---|
5998 | ENDIF |
---|
5999 | |
---|
6000 | ENDDO |
---|
6001 | |
---|
6002 | ! |
---|
6003 | !-- For vertical surfaces |
---|
6004 | DO l = 0, 3 |
---|
6005 | DO m = 1, surf_usm_v(l)%ns |
---|
6006 | |
---|
6007 | if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
6008 | if (1.gt.2) then |
---|
6009 | ! |
---|
6010 | !-- Obtain indices |
---|
6011 | i = surf_usm_v(l)%i(m) |
---|
6012 | j = surf_usm_v(l)%j(m) |
---|
6013 | k = surf_usm_v(l)%k(m) |
---|
6014 | |
---|
6015 | t_green_v(l)%t(nzt_wall+1,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
6016 | ! |
---|
6017 | !-- prognostic equation for green temperature t_green_v |
---|
6018 | gtend(:) = 0.0_wp |
---|
6019 | gtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_green(nzb_wall,m)) * & |
---|
6020 | ( surf_usm_v(l)%lambda_h_green(nzb_wall,m) * & |
---|
6021 | ( t_green_v(l)%t(nzb_wall+1,m) & |
---|
6022 | - t_green_v(l)%t(nzb_wall,m) ) * & |
---|
6023 | surf_usm_v(l)%ddz_green(nzb_wall+1,m) & |
---|
6024 | + surf_usm_v(l)%wghf_eb(m) ) * & |
---|
6025 | surf_usm_v(l)%ddz_green_stag(nzb_wall,m) |
---|
6026 | |
---|
6027 | DO kw = nzb_wall+1, nzt_wall |
---|
6028 | gtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_green(kw,m)) & |
---|
6029 | * ( surf_usm_v(l)%lambda_h_green(kw,m) & |
---|
6030 | * ( t_green_v(l)%t(kw+1,m) - t_green_v(l)%t(kw,m) ) & |
---|
6031 | * surf_usm_v(l)%ddz_green(kw+1,m) & |
---|
6032 | - surf_usm_v(l)%lambda_h(kw-1,m) & |
---|
6033 | * ( t_green_v(l)%t(kw,m) - t_green_v(l)%t(kw-1,m) ) & |
---|
6034 | * surf_usm_v(l)%ddz_green(kw,m) ) & |
---|
6035 | * surf_usm_v(l)%ddz_green_stag(kw,m) |
---|
6036 | ENDDO |
---|
6037 | |
---|
6038 | t_green_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
6039 | t_green_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
6040 | + dt_3d * ( tsc(2) & |
---|
6041 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6042 | * surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
6043 | |
---|
6044 | ! |
---|
6045 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
6046 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6047 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6048 | DO kw = nzb_wall, nzt_wall |
---|
6049 | surf_usm_v(l)%tt_green_m(kw,m) = gtend(kw) |
---|
6050 | ENDDO |
---|
6051 | ELSEIF ( intermediate_timestep_count < & |
---|
6052 | intermediate_timestep_count_max ) THEN |
---|
6053 | DO kw = nzb_wall, nzt_wall |
---|
6054 | surf_usm_v(l)%tt_green_m(kw,m) = & |
---|
6055 | - 9.5625_wp * gtend(kw) + & |
---|
6056 | 5.3125_wp * surf_usm_v(l)%tt_green_m(kw,m) |
---|
6057 | ENDDO |
---|
6058 | ENDIF |
---|
6059 | ENDIF |
---|
6060 | endif |
---|
6061 | |
---|
6062 | DO kw = nzb_wall, nzt_wall+1 |
---|
6063 | t_green_v(l)%t(kw,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
6064 | ENDDO |
---|
6065 | |
---|
6066 | ENDIF |
---|
6067 | |
---|
6068 | ENDDO |
---|
6069 | ENDDO |
---|
6070 | |
---|
6071 | END SUBROUTINE usm_green_heat_model |
---|
6072 | |
---|
6073 | !------------------------------------------------------------------------------! |
---|
6074 | ! Description: |
---|
6075 | ! ------------ |
---|
6076 | !> Parin for &usm_par for urban surface model |
---|
6077 | !------------------------------------------------------------------------------! |
---|
6078 | SUBROUTINE usm_parin |
---|
6079 | |
---|
6080 | IMPLICIT NONE |
---|
6081 | |
---|
6082 | CHARACTER (LEN=80) :: line !< string containing current line of file PARIN |
---|
6083 | |
---|
6084 | NAMELIST /urban_surface_par/ & |
---|
6085 | building_type, & |
---|
6086 | land_category, & |
---|
6087 | naheatlayers, & |
---|
6088 | pedestrian_category, & |
---|
6089 | roughness_concrete, & |
---|
6090 | read_wall_temp_3d, & |
---|
6091 | roof_category, & |
---|
6092 | urban_surface, & |
---|
6093 | usm_anthropogenic_heat, & |
---|
6094 | usm_material_model, & |
---|
6095 | wall_category, & |
---|
6096 | indoor_model, & |
---|
6097 | wall_inner_temperature, & |
---|
6098 | roof_inner_temperature, & |
---|
6099 | soil_inner_temperature, & |
---|
6100 | window_inner_temperature, & |
---|
6101 | usm_wall_mod |
---|
6102 | |
---|
6103 | NAMELIST /urban_surface_parameters/ & |
---|
6104 | building_type, & |
---|
6105 | land_category, & |
---|
6106 | naheatlayers, & |
---|
6107 | pedestrian_category, & |
---|
6108 | roughness_concrete, & |
---|
6109 | read_wall_temp_3d, & |
---|
6110 | roof_category, & |
---|
6111 | urban_surface, & |
---|
6112 | usm_anthropogenic_heat, & |
---|
6113 | usm_material_model, & |
---|
6114 | wall_category, & |
---|
6115 | indoor_model, & |
---|
6116 | wall_inner_temperature, & |
---|
6117 | roof_inner_temperature, & |
---|
6118 | soil_inner_temperature, & |
---|
6119 | window_inner_temperature, & |
---|
6120 | usm_wall_mod |
---|
6121 | |
---|
6122 | |
---|
6123 | |
---|
6124 | ! |
---|
6125 | !-- Try to find urban surface model package |
---|
6126 | REWIND ( 11 ) |
---|
6127 | line = ' ' |
---|
6128 | DO WHILE ( INDEX( line, '&urban_surface_parameters' ) == 0 ) |
---|
6129 | READ ( 11, '(A)', END=12 ) line |
---|
6130 | ENDDO |
---|
6131 | BACKSPACE ( 11 ) |
---|
6132 | |
---|
6133 | ! |
---|
6134 | !-- Read user-defined namelist |
---|
6135 | READ ( 11, urban_surface_parameters, ERR = 10 ) |
---|
6136 | |
---|
6137 | ! |
---|
6138 | !-- Set flag that indicates that the urban surface model is switched on |
---|
6139 | urban_surface = .TRUE. |
---|
6140 | |
---|
6141 | GOTO 14 |
---|
6142 | |
---|
6143 | 10 BACKSPACE( 11 ) |
---|
6144 | READ( 11 , '(A)') line |
---|
6145 | CALL parin_fail_message( 'urban_surface_parameters', line ) |
---|
6146 | ! |
---|
6147 | !-- Try to find old namelist |
---|
6148 | 12 REWIND ( 11 ) |
---|
6149 | line = ' ' |
---|
6150 | DO WHILE ( INDEX( line, '&urban_surface_par' ) == 0 ) |
---|
6151 | READ ( 11, '(A)', END=14 ) line |
---|
6152 | ENDDO |
---|
6153 | BACKSPACE ( 11 ) |
---|
6154 | |
---|
6155 | ! |
---|
6156 | !-- Read user-defined namelist |
---|
6157 | READ ( 11, urban_surface_par, ERR = 13, END = 14 ) |
---|
6158 | |
---|
6159 | message_string = 'namelist urban_surface_par is deprecated and will be ' // & |
---|
6160 | 'removed in near future. Please use namelist ' // & |
---|
6161 | 'urban_surface_parameters instead' |
---|
6162 | CALL message( 'usm_parin', 'PA0487', 0, 1, 0, 6, 0 ) |
---|
6163 | |
---|
6164 | ! |
---|
6165 | !-- Set flag that indicates that the urban surface model is switched on |
---|
6166 | urban_surface = .TRUE. |
---|
6167 | |
---|
6168 | GOTO 14 |
---|
6169 | |
---|
6170 | 13 BACKSPACE( 11 ) |
---|
6171 | READ( 11 , '(A)') line |
---|
6172 | CALL parin_fail_message( 'urban_surface_par', line ) |
---|
6173 | |
---|
6174 | |
---|
6175 | 14 CONTINUE |
---|
6176 | |
---|
6177 | |
---|
6178 | END SUBROUTINE usm_parin |
---|
6179 | |
---|
6180 | |
---|
6181 | !------------------------------------------------------------------------------! |
---|
6182 | ! Description: |
---|
6183 | ! ------------ |
---|
6184 | ! |
---|
6185 | !> This subroutine is part of the urban surface model. |
---|
6186 | !> It reads daily heat produced by anthropogenic sources |
---|
6187 | !> and the diurnal cycle of the heat. |
---|
6188 | !------------------------------------------------------------------------------! |
---|
6189 | SUBROUTINE usm_read_anthropogenic_heat |
---|
6190 | |
---|
6191 | INTEGER(iwp) :: i,j,k,ii |
---|
6192 | REAL(wp) :: heat |
---|
6193 | |
---|
6194 | !-- allocation of array of sources of anthropogenic heat and their diural profile |
---|
6195 | ALLOCATE( aheat(naheatlayers,nys:nyn,nxl:nxr) ) |
---|
6196 | ALLOCATE( aheatprof(naheatlayers,0:24) ) |
---|
6197 | |
---|
6198 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
6199 | !-- read daily amount of heat and its daily cycle |
---|
6200 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
6201 | aheat = 0.0_wp |
---|
6202 | DO ii = 0, io_blocks-1 |
---|
6203 | IF ( ii == io_group ) THEN |
---|
6204 | |
---|
6205 | !-- open anthropogenic heat file |
---|
6206 | OPEN( 151, file='ANTHROPOGENIC_HEAT'//TRIM(coupling_char), action='read', & |
---|
6207 | status='old', form='formatted', err=11 ) |
---|
6208 | i = 0 |
---|
6209 | j = 0 |
---|
6210 | DO |
---|
6211 | READ( 151, *, err=12, end=13 ) i, j, k, heat |
---|
6212 | IF ( i >= nxl .AND. i <= nxr .AND. j >= nys .AND. j <= nyn ) THEN |
---|
6213 | IF ( k <= naheatlayers .AND. k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
6214 | !-- write heat into the array |
---|
6215 | aheat(k,j,i) = heat |
---|
6216 | ENDIF |
---|
6217 | ENDIF |
---|
6218 | CYCLE |
---|
6219 | 12 WRITE(message_string,'(a,2i4)') 'error in file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' after line ',i,j |
---|
6220 | CALL message( 'usm_read_anthropogenic_heat', 'PA0515', 0, 1, 0, 6, 0 ) |
---|
6221 | ENDDO |
---|
6222 | 13 CLOSE(151) |
---|
6223 | CYCLE |
---|
6224 | 11 message_string = 'file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' does not exist' |
---|
6225 | CALL message( 'usm_read_anthropogenic_heat', 'PA0516', 1, 2, 0, 6, 0 ) |
---|
6226 | ENDIF |
---|
6227 | |
---|
6228 | #if defined( __parallel ) |
---|
6229 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
6230 | #endif |
---|
6231 | ENDDO |
---|
6232 | |
---|
6233 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
6234 | !-- read diurnal profiles of heat sources |
---|
6235 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
6236 | aheatprof = 0.0_wp |
---|
6237 | DO ii = 0, io_blocks-1 |
---|
6238 | IF ( ii == io_group ) THEN |
---|
6239 | |
---|
6240 | !-- open anthropogenic heat profile file |
---|
6241 | OPEN( 151, file='ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char), action='read', & |
---|
6242 | status='old', form='formatted', err=21 ) |
---|
6243 | i = 0 |
---|
6244 | DO |
---|
6245 | READ( 151, *, err=22, end=23 ) i, k, heat |
---|
6246 | IF ( i >= 0 .AND. i <= 24 .AND. k <= naheatlayers ) THEN |
---|
6247 | !-- write heat into the array |
---|
6248 | aheatprof(k,i) = heat |
---|
6249 | ENDIF |
---|
6250 | CYCLE |
---|
6251 | 22 WRITE(message_string,'(a,i4)') 'error in file ANTHROPOGENIC_HEAT_PROFILE'// & |
---|
6252 | TRIM(coupling_char)//' after line ',i |
---|
6253 | CALL message( 'usm_read_anthropogenic_heat', 'PA0517', 0, 1, 0, 6, 0 ) |
---|
6254 | ENDDO |
---|
6255 | aheatprof(:,24) = aheatprof(:,0) |
---|
6256 | 23 CLOSE(151) |
---|
6257 | CYCLE |
---|
6258 | 21 message_string = 'file ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char)//' does not exist' |
---|
6259 | CALL message( 'usm_read_anthropogenic_heat', 'PA0518', 1, 2, 0, 6, 0 ) |
---|
6260 | ENDIF |
---|
6261 | |
---|
6262 | #if defined( __parallel ) |
---|
6263 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
6264 | #endif |
---|
6265 | ENDDO |
---|
6266 | |
---|
6267 | END SUBROUTINE usm_read_anthropogenic_heat |
---|
6268 | |
---|
6269 | |
---|
6270 | !------------------------------------------------------------------------------! |
---|
6271 | ! Description: |
---|
6272 | ! ------------ |
---|
6273 | !> Soubroutine reads t_surf and t_wall data from restart files |
---|
6274 | !------------------------------------------------------------------------------! |
---|
6275 | SUBROUTINE usm_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & |
---|
6276 | nxr_on_file, nynf, nync, nyn_on_file, nysf, nysc,& |
---|
6277 | nys_on_file, found ) |
---|
6278 | |
---|
6279 | |
---|
6280 | USE control_parameters, & |
---|
6281 | ONLY: length, restart_string |
---|
6282 | |
---|
6283 | IMPLICIT NONE |
---|
6284 | |
---|
6285 | INTEGER(iwp) :: l !< index variable for surface type |
---|
6286 | INTEGER(iwp) :: i !< running index over input files |
---|
6287 | INTEGER(iwp) :: k !< running index over previous input files covering current local domain |
---|
6288 | INTEGER(iwp) :: ns_h_on_file_usm !< number of horizontal surface elements (urban type) on file |
---|
6289 | INTEGER(iwp) :: nxlc !< index of left boundary on current subdomain |
---|
6290 | INTEGER(iwp) :: nxlf !< index of left boundary on former subdomain |
---|
6291 | INTEGER(iwp) :: nxl_on_file !< index of left boundary on former local domain |
---|
6292 | INTEGER(iwp) :: nxrc !< index of right boundary on current subdomain |
---|
6293 | INTEGER(iwp) :: nxrf !< index of right boundary on former subdomain |
---|
6294 | INTEGER(iwp) :: nxr_on_file !< index of right boundary on former local domain |
---|
6295 | INTEGER(iwp) :: nync !< index of north boundary on current subdomain |
---|
6296 | INTEGER(iwp) :: nynf !< index of north boundary on former subdomain |
---|
6297 | INTEGER(iwp) :: nyn_on_file !< index of north boundary on former local domain |
---|
6298 | INTEGER(iwp) :: nysc !< index of south boundary on current subdomain |
---|
6299 | INTEGER(iwp) :: nysf !< index of south boundary on former subdomain |
---|
6300 | INTEGER(iwp) :: nys_on_file !< index of south boundary on former local domain |
---|
6301 | |
---|
6302 | INTEGER(iwp) :: ns_v_on_file_usm(0:3) !< number of vertical surface elements (urban type) on file |
---|
6303 | |
---|
6304 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: start_index_on_file |
---|
6305 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: end_index_on_file |
---|
6306 | |
---|
6307 | LOGICAL, INTENT(OUT) :: found |
---|
6308 | |
---|
6309 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_wall_h, tmp_surf_window_h, tmp_surf_green_h |
---|
6310 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_wall_h, tmp_window_h, tmp_green_h |
---|
6311 | |
---|
6312 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_wall_v, tmp_surf_window_v, tmp_surf_green_v |
---|
6313 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_wall_v, tmp_window_v, 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 | |
---|
6334 | ! |
---|
6335 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
6336 | !-- the size of allocated surface elements do not necessarily |
---|
6337 | !-- need to match the size of present surface elements on |
---|
6338 | !-- current processor, as the number of processors between |
---|
6339 | !-- restarts can change. |
---|
6340 | ALLOCATE( tmp_surf_wall_h(1:ns_h_on_file_usm) ) |
---|
6341 | ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1, & |
---|
6342 | 1:ns_h_on_file_usm) ) |
---|
6343 | ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) ) |
---|
6344 | ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1, & |
---|
6345 | 1:ns_h_on_file_usm) ) |
---|
6346 | ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) ) |
---|
6347 | ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1, & |
---|
6348 | 1:ns_h_on_file_usm) ) |
---|
6349 | |
---|
6350 | ENDIF |
---|
6351 | |
---|
6352 | CASE ( 'ns_v_on_file_usm') |
---|
6353 | IF ( k == 1 ) THEN |
---|
6354 | READ ( 13 ) ns_v_on_file_usm |
---|
6355 | |
---|
6356 | DO l = 0, 3 |
---|
6357 | IF ( ALLOCATED( tmp_surf_wall_v(l)%t ) ) & |
---|
6358 | DEALLOCATE( tmp_surf_wall_v(l)%t ) |
---|
6359 | IF ( ALLOCATED( tmp_wall_v(l)%t ) ) & |
---|
6360 | DEALLOCATE( tmp_wall_v(l)%t ) |
---|
6361 | IF ( ALLOCATED( tmp_surf_window_v(l)%t ) ) & |
---|
6362 | DEALLOCATE( tmp_surf_window_v(l)%t ) |
---|
6363 | IF ( ALLOCATED( tmp_window_v(l)%t ) ) & |
---|
6364 | DEALLOCATE( tmp_window_v(l)%t ) |
---|
6365 | IF ( ALLOCATED( tmp_surf_green_v(l)%t ) ) & |
---|
6366 | DEALLOCATE( tmp_surf_green_v(l)%t ) |
---|
6367 | IF ( ALLOCATED( tmp_green_v(l)%t ) ) & |
---|
6368 | DEALLOCATE( tmp_green_v(l)%t ) |
---|
6369 | ENDDO |
---|
6370 | |
---|
6371 | ! |
---|
6372 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
6373 | !-- the size of allocated surface elements do not necessarily |
---|
6374 | !-- need to match the size of present surface elements on |
---|
6375 | !-- current processor, as the number of processors between |
---|
6376 | !-- restarts can change. |
---|
6377 | DO l = 0, 3 |
---|
6378 | ALLOCATE( tmp_surf_wall_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6379 | ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
6380 | 1:ns_v_on_file_usm(l) ) ) |
---|
6381 | ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6382 | ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
6383 | 1:ns_v_on_file_usm(l) ) ) |
---|
6384 | ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
6385 | ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
6386 | 1:ns_v_on_file_usm(l) ) ) |
---|
6387 | ENDDO |
---|
6388 | |
---|
6389 | ENDIF |
---|
6390 | |
---|
6391 | CASE ( 'usm_start_index_h', 'usm_start_index_v' ) |
---|
6392 | IF ( k == 1 ) THEN |
---|
6393 | |
---|
6394 | IF ( ALLOCATED( start_index_on_file ) ) & |
---|
6395 | DEALLOCATE( start_index_on_file ) |
---|
6396 | |
---|
6397 | ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file, & |
---|
6398 | nxl_on_file:nxr_on_file) ) |
---|
6399 | |
---|
6400 | READ ( 13 ) start_index_on_file |
---|
6401 | |
---|
6402 | ENDIF |
---|
6403 | |
---|
6404 | CASE ( 'usm_end_index_h', 'usm_end_index_v' ) |
---|
6405 | IF ( k == 1 ) THEN |
---|
6406 | |
---|
6407 | IF ( ALLOCATED( end_index_on_file ) ) & |
---|
6408 | DEALLOCATE( end_index_on_file ) |
---|
6409 | |
---|
6410 | ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file, & |
---|
6411 | nxl_on_file:nxr_on_file) ) |
---|
6412 | |
---|
6413 | READ ( 13 ) end_index_on_file |
---|
6414 | |
---|
6415 | ENDIF |
---|
6416 | |
---|
6417 | CASE ( 't_surf_wall_h' ) |
---|
6418 | #if defined( __nopointer ) |
---|
6419 | IF ( k == 1 ) THEN |
---|
6420 | IF ( .NOT. ALLOCATED( t_surf_wall_h ) ) & |
---|
6421 | ALLOCATE( t_surf_wall_h(1:surf_usm_h%ns) ) |
---|
6422 | READ ( 13 ) tmp_surf_wall_h |
---|
6423 | ENDIF |
---|
6424 | CALL surface_restore_elements( & |
---|
6425 | t_surf_wall_h, tmp_surf_wall_h, & |
---|
6426 | surf_usm_h%start_index, & |
---|
6427 | start_index_on_file, & |
---|
6428 | end_index_on_file, & |
---|
6429 | nxlc, nysc, & |
---|
6430 | nxlf, nxrf, nysf, nynf, & |
---|
6431 | nys_on_file, nyn_on_file, & |
---|
6432 | nxl_on_file,nxr_on_file ) |
---|
6433 | #else |
---|
6434 | IF ( k == 1 ) THEN |
---|
6435 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
6436 | ALLOCATE( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
6437 | READ ( 13 ) tmp_surf_wall_h |
---|
6438 | ENDIF |
---|
6439 | CALL surface_restore_elements( & |
---|
6440 | t_surf_wall_h_1, tmp_surf_wall_h, & |
---|
6441 | surf_usm_h%start_index, & |
---|
6442 | start_index_on_file, & |
---|
6443 | end_index_on_file, & |
---|
6444 | nxlc, nysc, & |
---|
6445 | nxlf, nxrf, nysf, nynf, & |
---|
6446 | nys_on_file, nyn_on_file, & |
---|
6447 | nxl_on_file,nxr_on_file ) |
---|
6448 | #endif |
---|
6449 | |
---|
6450 | CASE ( 't_surf_wall_v(0)' ) |
---|
6451 | #if defined( __nopointer ) |
---|
6452 | IF ( k == 1 ) THEN |
---|
6453 | IF ( .NOT. ALLOCATED( t_surf_wall_v(0)%t ) ) & |
---|
6454 | ALLOCATE( t_surf_wall_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6455 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
6456 | ENDIF |
---|
6457 | CALL surface_restore_elements( & |
---|
6458 | t_surf_wall_v(0)%t, tmp_surf_wall_v(0)%t, & |
---|
6459 | surf_usm_v(0)%start_index, & |
---|
6460 | start_index_on_file, & |
---|
6461 | end_index_on_file, & |
---|
6462 | nxlc, nysc, & |
---|
6463 | nxlf, nxrf, nysf, nynf, & |
---|
6464 | nys_on_file, nyn_on_file, & |
---|
6465 | nxl_on_file,nxr_on_file ) |
---|
6466 | #else |
---|
6467 | IF ( k == 1 ) THEN |
---|
6468 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(0)%t ) ) & |
---|
6469 | ALLOCATE( t_surf_wall_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6470 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
6471 | ENDIF |
---|
6472 | CALL surface_restore_elements( & |
---|
6473 | t_surf_wall_v_1(0)%t, tmp_surf_wall_v(0)%t, & |
---|
6474 | surf_usm_v(0)%start_index, & |
---|
6475 | start_index_on_file, & |
---|
6476 | end_index_on_file, & |
---|
6477 | nxlc, nysc, & |
---|
6478 | nxlf, nxrf, nysf, nynf, & |
---|
6479 | nys_on_file, nyn_on_file, & |
---|
6480 | nxl_on_file,nxr_on_file ) |
---|
6481 | #endif |
---|
6482 | |
---|
6483 | CASE ( 't_surf_wall_v(1)' ) |
---|
6484 | #if defined( __nopointer ) |
---|
6485 | IF ( k == 1 ) THEN |
---|
6486 | IF ( .NOT. ALLOCATED( t_surf_wall_v(1)%t ) ) & |
---|
6487 | ALLOCATE( t_surf_wall_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6488 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
6489 | ENDIF |
---|
6490 | CALL surface_restore_elements( & |
---|
6491 | t_surf_wall_v(1)%t, tmp_surf_wall_v(1)%t, & |
---|
6492 | surf_usm_v(1)%start_index, & |
---|
6493 | start_index_on_file, & |
---|
6494 | end_index_on_file, & |
---|
6495 | nxlc, nysc, & |
---|
6496 | nxlf, nxrf, nysf, nynf, & |
---|
6497 | nys_on_file, nyn_on_file, & |
---|
6498 | nxl_on_file,nxr_on_file ) |
---|
6499 | #else |
---|
6500 | IF ( k == 1 ) THEN |
---|
6501 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(1)%t ) ) & |
---|
6502 | ALLOCATE( t_surf_wall_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6503 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
6504 | ENDIF |
---|
6505 | CALL surface_restore_elements( & |
---|
6506 | t_surf_wall_v_1(1)%t, tmp_surf_wall_v(1)%t, & |
---|
6507 | surf_usm_v(1)%start_index, & |
---|
6508 | start_index_on_file, & |
---|
6509 | end_index_on_file, & |
---|
6510 | nxlc, nysc, & |
---|
6511 | nxlf, nxrf, nysf, nynf, & |
---|
6512 | nys_on_file, nyn_on_file, & |
---|
6513 | nxl_on_file,nxr_on_file ) |
---|
6514 | #endif |
---|
6515 | |
---|
6516 | CASE ( 't_surf_wall_v(2)' ) |
---|
6517 | #if defined( __nopointer ) |
---|
6518 | IF ( k == 1 ) THEN |
---|
6519 | IF ( .NOT. ALLOCATED( t_surf_wall_v(2)%t ) ) & |
---|
6520 | ALLOCATE( t_surf_wall_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6521 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
6522 | ENDIF |
---|
6523 | CALL surface_restore_elements( & |
---|
6524 | t_surf_wall_v(2)%t, tmp_surf_wall_v(2)%t, & |
---|
6525 | surf_usm_v(2)%start_index, & |
---|
6526 | start_index_on_file, & |
---|
6527 | end_index_on_file, & |
---|
6528 | nxlc, nysc, & |
---|
6529 | nxlf, nxrf, nysf, nynf, & |
---|
6530 | nys_on_file, nyn_on_file, & |
---|
6531 | nxl_on_file,nxr_on_file ) |
---|
6532 | #else |
---|
6533 | IF ( k == 1 ) THEN |
---|
6534 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(2)%t ) ) & |
---|
6535 | ALLOCATE( t_surf_wall_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6536 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
6537 | ENDIF |
---|
6538 | CALL surface_restore_elements( & |
---|
6539 | t_surf_wall_v_1(2)%t, tmp_surf_wall_v(2)%t, & |
---|
6540 | surf_usm_v(2)%start_index, & |
---|
6541 | start_index_on_file, & |
---|
6542 | end_index_on_file, & |
---|
6543 | nxlc, nysc, & |
---|
6544 | nxlf, nxrf, nysf, nynf, & |
---|
6545 | nys_on_file, nyn_on_file, & |
---|
6546 | nxl_on_file,nxr_on_file ) |
---|
6547 | #endif |
---|
6548 | |
---|
6549 | CASE ( 't_surf_wall_v(3)' ) |
---|
6550 | #if defined( __nopointer ) |
---|
6551 | IF ( k == 1 ) THEN |
---|
6552 | IF ( .NOT. ALLOCATED( t_surf_wall_v(3)%t ) ) & |
---|
6553 | ALLOCATE( t_surf_wall_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6554 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
6555 | ENDIF |
---|
6556 | CALL surface_restore_elements( & |
---|
6557 | t_surf_wall_v(3)%t, tmp_surf_wall_v(3)%t, & |
---|
6558 | surf_usm_v(3)%start_index, & |
---|
6559 | start_index_on_file, & |
---|
6560 | end_index_on_file, & |
---|
6561 | nxlc, nysc, & |
---|
6562 | nxlf, nxrf, nysf, nynf, & |
---|
6563 | nys_on_file, nyn_on_file, & |
---|
6564 | nxl_on_file,nxr_on_file ) |
---|
6565 | #else |
---|
6566 | IF ( k == 1 ) THEN |
---|
6567 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(3)%t ) ) & |
---|
6568 | ALLOCATE( t_surf_wall_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6569 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
6570 | ENDIF |
---|
6571 | CALL surface_restore_elements( & |
---|
6572 | t_surf_wall_v_1(3)%t, tmp_surf_wall_v(3)%t, & |
---|
6573 | surf_usm_v(3)%start_index, & |
---|
6574 | start_index_on_file, & |
---|
6575 | end_index_on_file, & |
---|
6576 | nxlc, nysc, & |
---|
6577 | nxlf, nxrf, nysf, nynf, & |
---|
6578 | nys_on_file, nyn_on_file, & |
---|
6579 | nxl_on_file,nxr_on_file ) |
---|
6580 | #endif |
---|
6581 | CASE ( 't_surf_green_h' ) |
---|
6582 | #if defined( __nopointer ) |
---|
6583 | IF ( k == 1 ) THEN |
---|
6584 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
6585 | ALLOCATE( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
6586 | READ ( 13 ) tmp_surf_green_h |
---|
6587 | ENDIF |
---|
6588 | CALL surface_restore_elements( & |
---|
6589 | t_surf_green_h, tmp_surf_green_h, & |
---|
6590 | surf_usm_h%start_index, & |
---|
6591 | start_index_on_file, & |
---|
6592 | end_index_on_file, & |
---|
6593 | nxlc, nysc, & |
---|
6594 | nxlf, nxrf, nysf, nynf, & |
---|
6595 | nys_on_file, nyn_on_file, & |
---|
6596 | nxl_on_file,nxr_on_file ) |
---|
6597 | #else |
---|
6598 | IF ( k == 1 ) THEN |
---|
6599 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
6600 | ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
6601 | READ ( 13 ) tmp_surf_green_h |
---|
6602 | ENDIF |
---|
6603 | CALL surface_restore_elements( & |
---|
6604 | t_surf_green_h_1, tmp_surf_green_h, & |
---|
6605 | surf_usm_h%start_index, & |
---|
6606 | start_index_on_file, & |
---|
6607 | end_index_on_file, & |
---|
6608 | nxlc, nysc, & |
---|
6609 | nxlf, nxrf, nysf, nynf, & |
---|
6610 | nys_on_file, nyn_on_file, & |
---|
6611 | nxl_on_file,nxr_on_file ) |
---|
6612 | #endif |
---|
6613 | |
---|
6614 | CASE ( 't_surf_green_v(0)' ) |
---|
6615 | #if defined( __nopointer ) |
---|
6616 | IF ( k == 1 ) THEN |
---|
6617 | IF ( .NOT. ALLOCATED( t_surf_green_v(0)%t ) ) & |
---|
6618 | ALLOCATE( t_surf_green_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6619 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
6620 | ENDIF |
---|
6621 | CALL surface_restore_elements( & |
---|
6622 | t_surf_green_v(0)%t, & |
---|
6623 | tmp_surf_green_v(0)%t, & |
---|
6624 | surf_usm_v(0)%start_index, & |
---|
6625 | start_index_on_file, & |
---|
6626 | end_index_on_file, & |
---|
6627 | nxlc, nysc, & |
---|
6628 | nxlf, nxrf, nysf, nynf, & |
---|
6629 | nys_on_file, nyn_on_file, & |
---|
6630 | nxl_on_file,nxr_on_file ) |
---|
6631 | #else |
---|
6632 | IF ( k == 1 ) THEN |
---|
6633 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(0)%t ) ) & |
---|
6634 | ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6635 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
6636 | ENDIF |
---|
6637 | CALL surface_restore_elements( & |
---|
6638 | t_surf_green_v_1(0)%t, & |
---|
6639 | tmp_surf_green_v(0)%t, & |
---|
6640 | surf_usm_v(0)%start_index, & |
---|
6641 | start_index_on_file, & |
---|
6642 | end_index_on_file, & |
---|
6643 | nxlc, nysc, & |
---|
6644 | nxlf, nxrf, nysf, nynf, & |
---|
6645 | nys_on_file, nyn_on_file, & |
---|
6646 | nxl_on_file,nxr_on_file ) |
---|
6647 | #endif |
---|
6648 | |
---|
6649 | CASE ( 't_surf_green_v(1)' ) |
---|
6650 | #if defined( __nopointer ) |
---|
6651 | IF ( k == 1 ) THEN |
---|
6652 | IF ( .NOT. ALLOCATED( t_surf_green_v(1)%t ) ) & |
---|
6653 | ALLOCATE( t_surf_green_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6654 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
6655 | ENDIF |
---|
6656 | CALL surface_restore_elements( & |
---|
6657 | t_surf_green_v(1)%t, & |
---|
6658 | tmp_surf_green_v(1)%t, & |
---|
6659 | surf_usm_v(1)%start_index, & |
---|
6660 | start_index_on_file, & |
---|
6661 | end_index_on_file, & |
---|
6662 | nxlc, nysc, & |
---|
6663 | nxlf, nxrf, nysf, nynf, & |
---|
6664 | nys_on_file, nyn_on_file, & |
---|
6665 | nxl_on_file,nxr_on_file ) |
---|
6666 | #else |
---|
6667 | IF ( k == 1 ) THEN |
---|
6668 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(1)%t ) ) & |
---|
6669 | ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6670 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
6671 | ENDIF |
---|
6672 | CALL surface_restore_elements( & |
---|
6673 | t_surf_green_v_1(1)%t, & |
---|
6674 | tmp_surf_green_v(1)%t, & |
---|
6675 | surf_usm_v(1)%start_index, & |
---|
6676 | start_index_on_file, & |
---|
6677 | end_index_on_file, & |
---|
6678 | nxlc, nysc, & |
---|
6679 | nxlf, nxrf, nysf, nynf, & |
---|
6680 | nys_on_file, nyn_on_file, & |
---|
6681 | nxl_on_file,nxr_on_file ) |
---|
6682 | #endif |
---|
6683 | |
---|
6684 | CASE ( 't_surf_green_v(2)' ) |
---|
6685 | #if defined( __nopointer ) |
---|
6686 | IF ( k == 1 ) THEN |
---|
6687 | IF ( .NOT. ALLOCATED( t_surf_green_v(2)%t ) ) & |
---|
6688 | ALLOCATE( t_surf_green_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6689 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
6690 | ENDIF |
---|
6691 | CALL surface_restore_elements( & |
---|
6692 | t_surf_green_v(2)%t, & |
---|
6693 | tmp_surf_green_v(2)%t, & |
---|
6694 | surf_usm_v(2)%start_index, & |
---|
6695 | start_index_on_file, & |
---|
6696 | end_index_on_file, & |
---|
6697 | nxlc, nysc, & |
---|
6698 | nxlf, nxrf, nysf, nynf, & |
---|
6699 | nys_on_file, nyn_on_file, & |
---|
6700 | nxl_on_file,nxr_on_file ) |
---|
6701 | #else |
---|
6702 | IF ( k == 1 ) THEN |
---|
6703 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(2)%t ) ) & |
---|
6704 | ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6705 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
6706 | ENDIF |
---|
6707 | CALL surface_restore_elements( & |
---|
6708 | t_surf_green_v_1(2)%t, & |
---|
6709 | tmp_surf_green_v(2)%t, & |
---|
6710 | surf_usm_v(2)%start_index, & |
---|
6711 | start_index_on_file, & |
---|
6712 | end_index_on_file, & |
---|
6713 | nxlc, nysc, & |
---|
6714 | nxlf, nxrf, nysf, nynf, & |
---|
6715 | nys_on_file, nyn_on_file, & |
---|
6716 | nxl_on_file,nxr_on_file ) |
---|
6717 | #endif |
---|
6718 | |
---|
6719 | CASE ( 't_surf_green_v(3)' ) |
---|
6720 | #if defined( __nopointer ) |
---|
6721 | IF ( k == 1 ) THEN |
---|
6722 | IF ( .NOT. ALLOCATED( t_surf_green_v(3)%t ) ) & |
---|
6723 | ALLOCATE( t_surf_green_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6724 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
6725 | ENDIF |
---|
6726 | CALL surface_restore_elements( & |
---|
6727 | t_surf_green_v(3)%t, & |
---|
6728 | tmp_surf_green_v(3)%t, & |
---|
6729 | surf_usm_v(3)%start_index, & |
---|
6730 | start_index_on_file, & |
---|
6731 | end_index_on_file, & |
---|
6732 | nxlc, nysc, & |
---|
6733 | nxlf, nxrf, nysf, nynf, & |
---|
6734 | nys_on_file, nyn_on_file, & |
---|
6735 | nxl_on_file,nxr_on_file ) |
---|
6736 | #else |
---|
6737 | IF ( k == 1 ) THEN |
---|
6738 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(3)%t ) ) & |
---|
6739 | ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6740 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
6741 | ENDIF |
---|
6742 | CALL surface_restore_elements( & |
---|
6743 | t_surf_green_v_1(3)%t, & |
---|
6744 | tmp_surf_green_v(3)%t, & |
---|
6745 | surf_usm_v(3)%start_index, & |
---|
6746 | start_index_on_file, & |
---|
6747 | end_index_on_file, & |
---|
6748 | nxlc, nysc, & |
---|
6749 | nxlf, nxrf, nysf, nynf, & |
---|
6750 | nys_on_file, nyn_on_file, & |
---|
6751 | nxl_on_file,nxr_on_file ) |
---|
6752 | #endif |
---|
6753 | CASE ( 't_surf_window_h' ) |
---|
6754 | #if defined( __nopointer ) |
---|
6755 | IF ( k == 1 ) THEN |
---|
6756 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
6757 | ALLOCATE( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
6758 | READ ( 13 ) tmp_surf_window_h |
---|
6759 | ENDIF |
---|
6760 | CALL surface_restore_elements( & |
---|
6761 | t_surf_window_h, tmp_surf_window_h, & |
---|
6762 | surf_usm_h%start_index, & |
---|
6763 | start_index_on_file, & |
---|
6764 | end_index_on_file, & |
---|
6765 | nxlc, nysc, & |
---|
6766 | nxlf, nxrf, nysf, nynf, & |
---|
6767 | nys_on_file, nyn_on_file, & |
---|
6768 | nxl_on_file,nxr_on_file ) |
---|
6769 | #else |
---|
6770 | IF ( k == 1 ) THEN |
---|
6771 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
6772 | ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
6773 | READ ( 13 ) tmp_surf_window_h |
---|
6774 | ENDIF |
---|
6775 | CALL surface_restore_elements( & |
---|
6776 | t_surf_window_h_1, & |
---|
6777 | tmp_surf_window_h, & |
---|
6778 | surf_usm_h%start_index, & |
---|
6779 | start_index_on_file, & |
---|
6780 | end_index_on_file, & |
---|
6781 | nxlc, nysc, & |
---|
6782 | nxlf, nxrf, nysf, nynf, & |
---|
6783 | nys_on_file, nyn_on_file, & |
---|
6784 | nxl_on_file,nxr_on_file ) |
---|
6785 | #endif |
---|
6786 | |
---|
6787 | CASE ( 't_surf_window_v(0)' ) |
---|
6788 | #if defined( __nopointer ) |
---|
6789 | IF ( k == 1 ) THEN |
---|
6790 | IF ( .NOT. ALLOCATED( t_surf_window_v(0)%t ) ) & |
---|
6791 | ALLOCATE( t_surf_window_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6792 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
6793 | ENDIF |
---|
6794 | CALL surface_restore_elements( & |
---|
6795 | t_surf_window_v(0)%t, & |
---|
6796 | tmp_surf_window_v(0)%t, & |
---|
6797 | surf_usm_v(0)%start_index, & |
---|
6798 | start_index_on_file, & |
---|
6799 | end_index_on_file, & |
---|
6800 | nxlc, nysc, & |
---|
6801 | nxlf, nxrf, nysf, nynf, & |
---|
6802 | nys_on_file, nyn_on_file, & |
---|
6803 | nxl_on_file,nxr_on_file ) |
---|
6804 | #else |
---|
6805 | IF ( k == 1 ) THEN |
---|
6806 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(0)%t ) ) & |
---|
6807 | ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6808 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
6809 | ENDIF |
---|
6810 | CALL surface_restore_elements( & |
---|
6811 | t_surf_window_v_1(0)%t, & |
---|
6812 | tmp_surf_window_v(0)%t, & |
---|
6813 | surf_usm_v(0)%start_index, & |
---|
6814 | start_index_on_file, & |
---|
6815 | end_index_on_file, & |
---|
6816 | nxlc, nysc, & |
---|
6817 | nxlf, nxrf, nysf, nynf, & |
---|
6818 | nys_on_file, nyn_on_file, & |
---|
6819 | nxl_on_file,nxr_on_file ) |
---|
6820 | #endif |
---|
6821 | |
---|
6822 | CASE ( 't_surf_window_v(1)' ) |
---|
6823 | #if defined( __nopointer ) |
---|
6824 | IF ( k == 1 ) THEN |
---|
6825 | IF ( .NOT. ALLOCATED( t_surf_window_v(1)%t ) ) & |
---|
6826 | ALLOCATE( t_surf_window_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6827 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
6828 | ENDIF |
---|
6829 | CALL surface_restore_elements( & |
---|
6830 | t_surf_window_v(1)%t, & |
---|
6831 | tmp_surf_window_v(1)%t, & |
---|
6832 | surf_usm_v(1)%start_index, & |
---|
6833 | start_index_on_file, & |
---|
6834 | end_index_on_file, & |
---|
6835 | nxlc, nysc, & |
---|
6836 | nxlf, nxrf, nysf, nynf, & |
---|
6837 | nys_on_file, nyn_on_file, & |
---|
6838 | nxl_on_file,nxr_on_file ) |
---|
6839 | #else |
---|
6840 | IF ( k == 1 ) THEN |
---|
6841 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(1)%t ) ) & |
---|
6842 | ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6843 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
6844 | ENDIF |
---|
6845 | CALL surface_restore_elements( & |
---|
6846 | t_surf_window_v_1(1)%t, & |
---|
6847 | tmp_surf_window_v(1)%t, & |
---|
6848 | surf_usm_v(1)%start_index, & |
---|
6849 | start_index_on_file, & |
---|
6850 | end_index_on_file, & |
---|
6851 | nxlc, nysc, & |
---|
6852 | nxlf, nxrf, nysf, nynf, & |
---|
6853 | nys_on_file, nyn_on_file, & |
---|
6854 | nxl_on_file,nxr_on_file ) |
---|
6855 | #endif |
---|
6856 | |
---|
6857 | CASE ( 't_surf_window_v(2)' ) |
---|
6858 | #if defined( __nopointer ) |
---|
6859 | IF ( k == 1 ) THEN |
---|
6860 | IF ( .NOT. ALLOCATED( t_surf_window_v(2)%t ) ) & |
---|
6861 | ALLOCATE( t_surf_window_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6862 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
6863 | ENDIF |
---|
6864 | CALL surface_restore_elements( & |
---|
6865 | t_surf_window_v(2)%t, & |
---|
6866 | tmp_surf_window_v(2)%t, & |
---|
6867 | surf_usm_v(2)%start_index, & |
---|
6868 | start_index_on_file, & |
---|
6869 | end_index_on_file, & |
---|
6870 | nxlc, nysc, & |
---|
6871 | nxlf, nxrf, nysf, nynf, & |
---|
6872 | nys_on_file, nyn_on_file, & |
---|
6873 | nxl_on_file,nxr_on_file ) |
---|
6874 | #else |
---|
6875 | IF ( k == 1 ) THEN |
---|
6876 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(2)%t ) ) & |
---|
6877 | ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6878 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
6879 | ENDIF |
---|
6880 | CALL surface_restore_elements( & |
---|
6881 | t_surf_window_v_1(2)%t, & |
---|
6882 | tmp_surf_window_v(2)%t, & |
---|
6883 | surf_usm_v(2)%start_index, & |
---|
6884 | start_index_on_file, & |
---|
6885 | end_index_on_file, & |
---|
6886 | nxlc, nysc, & |
---|
6887 | nxlf, nxrf, nysf, nynf, & |
---|
6888 | nys_on_file, nyn_on_file, & |
---|
6889 | nxl_on_file,nxr_on_file ) |
---|
6890 | #endif |
---|
6891 | |
---|
6892 | CASE ( 't_surf_window_v(3)' ) |
---|
6893 | #if defined( __nopointer ) |
---|
6894 | IF ( k == 1 ) THEN |
---|
6895 | IF ( .NOT. ALLOCATED( t_surf_window_v(3)%t ) ) & |
---|
6896 | ALLOCATE( t_surf_window_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6897 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
6898 | ENDIF |
---|
6899 | CALL surface_restore_elements( & |
---|
6900 | t_surf_window_v(3)%t, & |
---|
6901 | tmp_surf_window_v(3)%t, & |
---|
6902 | surf_usm_v(3)%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 | #else |
---|
6910 | IF ( k == 1 ) THEN |
---|
6911 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(3)%t ) ) & |
---|
6912 | ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6913 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
6914 | ENDIF |
---|
6915 | CALL surface_restore_elements( & |
---|
6916 | t_surf_window_v_1(3)%t, & |
---|
6917 | tmp_surf_window_v(3)%t, & |
---|
6918 | surf_usm_v(3)%start_index, & |
---|
6919 | start_index_on_file, & |
---|
6920 | end_index_on_file, & |
---|
6921 | nxlc, nysc, & |
---|
6922 | nxlf, nxrf, nysf, nynf, & |
---|
6923 | nys_on_file, nyn_on_file, & |
---|
6924 | nxl_on_file,nxr_on_file ) |
---|
6925 | #endif |
---|
6926 | CASE ( 't_wall_h' ) |
---|
6927 | #if defined( __nopointer ) |
---|
6928 | IF ( k == 1 ) THEN |
---|
6929 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
6930 | ALLOCATE( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
6931 | READ ( 13 ) tmp_wall_h |
---|
6932 | ENDIF |
---|
6933 | CALL surface_restore_elements( & |
---|
6934 | t_wall_h, tmp_wall_h, & |
---|
6935 | surf_usm_h%start_index, & |
---|
6936 | start_index_on_file, & |
---|
6937 | end_index_on_file, & |
---|
6938 | nxlc, nysc, & |
---|
6939 | nxlf, nxrf, nysf, nynf, & |
---|
6940 | nys_on_file, nyn_on_file, & |
---|
6941 | nxl_on_file,nxr_on_file ) |
---|
6942 | #else |
---|
6943 | IF ( k == 1 ) THEN |
---|
6944 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
6945 | ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1, & |
---|
6946 | 1:surf_usm_h%ns) ) |
---|
6947 | READ ( 13 ) tmp_wall_h |
---|
6948 | ENDIF |
---|
6949 | CALL surface_restore_elements( & |
---|
6950 | t_wall_h_1, tmp_wall_h, & |
---|
6951 | surf_usm_h%start_index, & |
---|
6952 | start_index_on_file, & |
---|
6953 | end_index_on_file, & |
---|
6954 | nxlc, nysc, & |
---|
6955 | nxlf, nxrf, nysf, nynf, & |
---|
6956 | nys_on_file, nyn_on_file, & |
---|
6957 | nxl_on_file,nxr_on_file ) |
---|
6958 | #endif |
---|
6959 | CASE ( 't_wall_v(0)' ) |
---|
6960 | #if defined( __nopointer ) |
---|
6961 | IF ( k == 1 ) THEN |
---|
6962 | IF ( .NOT. ALLOCATED( t_wall_v(0)%t ) ) & |
---|
6963 | ALLOCATE( t_wall_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
6964 | 1:surf_usm_v(0)%ns) ) |
---|
6965 | READ ( 13 ) tmp_wall_v(0)%t |
---|
6966 | ENDIF |
---|
6967 | CALL surface_restore_elements( & |
---|
6968 | t_wall_v(0)%t, tmp_wall_v(0)%t, & |
---|
6969 | surf_usm_v(0)%start_index, & |
---|
6970 | start_index_on_file, & |
---|
6971 | end_index_on_file, & |
---|
6972 | nxlc, nysc, & |
---|
6973 | nxlf, nxrf, nysf, nynf, & |
---|
6974 | nys_on_file, nyn_on_file, & |
---|
6975 | nxl_on_file,nxr_on_file ) |
---|
6976 | #else |
---|
6977 | IF ( k == 1 ) THEN |
---|
6978 | IF ( .NOT. ALLOCATED( t_wall_v_1(0)%t ) ) & |
---|
6979 | ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6980 | 1:surf_usm_v(0)%ns) ) |
---|
6981 | READ ( 13 ) tmp_wall_v(0)%t |
---|
6982 | ENDIF |
---|
6983 | CALL surface_restore_elements( & |
---|
6984 | t_wall_v_1(0)%t, tmp_wall_v(0)%t, & |
---|
6985 | surf_usm_v(0)%start_index, & |
---|
6986 | start_index_on_file, & |
---|
6987 | end_index_on_file, & |
---|
6988 | nxlc, nysc, & |
---|
6989 | nxlf, nxrf, nysf, nynf, & |
---|
6990 | nys_on_file, nyn_on_file, & |
---|
6991 | nxl_on_file,nxr_on_file ) |
---|
6992 | #endif |
---|
6993 | CASE ( 't_wall_v(1)' ) |
---|
6994 | #if defined( __nopointer ) |
---|
6995 | IF ( k == 1 ) THEN |
---|
6996 | IF ( .NOT. ALLOCATED( t_wall_v(1)%t ) ) & |
---|
6997 | ALLOCATE( t_wall_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
6998 | 1:surf_usm_v(1)%ns) ) |
---|
6999 | READ ( 13 ) tmp_wall_v(1)%t |
---|
7000 | ENDIF |
---|
7001 | CALL surface_restore_elements( & |
---|
7002 | t_wall_v(1)%t, tmp_wall_v(1)%t, & |
---|
7003 | surf_usm_v(1)%start_index, & |
---|
7004 | start_index_on_file, & |
---|
7005 | end_index_on_file , & |
---|
7006 | nxlc, nysc, & |
---|
7007 | nxlf, nxrf, nysf, nynf, & |
---|
7008 | nys_on_file, nyn_on_file, & |
---|
7009 | nxl_on_file, nxr_on_file ) |
---|
7010 | #else |
---|
7011 | IF ( k == 1 ) THEN |
---|
7012 | IF ( .NOT. ALLOCATED( t_wall_v_1(1)%t ) ) & |
---|
7013 | ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
7014 | 1:surf_usm_v(1)%ns) ) |
---|
7015 | READ ( 13 ) tmp_wall_v(1)%t |
---|
7016 | ENDIF |
---|
7017 | CALL surface_restore_elements( & |
---|
7018 | t_wall_v_1(1)%t, tmp_wall_v(1)%t, & |
---|
7019 | surf_usm_v(1)%start_index, & |
---|
7020 | start_index_on_file, & |
---|
7021 | end_index_on_file, & |
---|
7022 | nxlc, nysc, & |
---|
7023 | nxlf, nxrf, nysf, nynf, & |
---|
7024 | nys_on_file, nyn_on_file, & |
---|
7025 | nxl_on_file,nxr_on_file ) |
---|
7026 | #endif |
---|
7027 | CASE ( 't_wall_v(2)' ) |
---|
7028 | #if defined( __nopointer ) |
---|
7029 | IF ( k == 1 ) THEN |
---|
7030 | IF ( .NOT. ALLOCATED( t_wall_v(2)%t ) ) & |
---|
7031 | ALLOCATE( t_wall_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
7032 | 1:surf_usm_v(2)%ns) ) |
---|
7033 | READ ( 13 ) tmp_wall_v(2)%t |
---|
7034 | ENDIF |
---|
7035 | CALL surface_restore_elements( & |
---|
7036 | t_wall_v(2)%t, tmp_wall_v(2)%t, & |
---|
7037 | surf_usm_v(2)%start_index, & |
---|
7038 | start_index_on_file, & |
---|
7039 | end_index_on_file, & |
---|
7040 | nxlc, nysc, & |
---|
7041 | nxlf, nxrf, nysf, nynf, & |
---|
7042 | nys_on_file, nyn_on_file, & |
---|
7043 | nxl_on_file,nxr_on_file ) |
---|
7044 | #else |
---|
7045 | IF ( k == 1 ) THEN |
---|
7046 | IF ( .NOT. ALLOCATED( t_wall_v_1(2)%t ) ) & |
---|
7047 | ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
7048 | 1:surf_usm_v(2)%ns) ) |
---|
7049 | READ ( 13 ) tmp_wall_v(2)%t |
---|
7050 | ENDIF |
---|
7051 | CALL surface_restore_elements( & |
---|
7052 | t_wall_v_1(2)%t, tmp_wall_v(2)%t, & |
---|
7053 | surf_usm_v(2)%start_index, & |
---|
7054 | start_index_on_file, & |
---|
7055 | end_index_on_file , & |
---|
7056 | nxlc, nysc, & |
---|
7057 | nxlf, nxrf, nysf, nynf, & |
---|
7058 | nys_on_file, nyn_on_file, & |
---|
7059 | nxl_on_file,nxr_on_file ) |
---|
7060 | #endif |
---|
7061 | CASE ( 't_wall_v(3)' ) |
---|
7062 | #if defined( __nopointer ) |
---|
7063 | IF ( k == 1 ) THEN |
---|
7064 | IF ( .NOT. ALLOCATED( t_wall_v(3)%t ) ) & |
---|
7065 | ALLOCATE( t_wall_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
7066 | 1:surf_usm_v(3)%ns) ) |
---|
7067 | READ ( 13 ) tmp_wall_v(3)%t |
---|
7068 | ENDIF |
---|
7069 | CALL surface_restore_elements( & |
---|
7070 | t_wall_v(3)%t, tmp_wall_v(3)%t, & |
---|
7071 | surf_usm_v(3)%start_index, & |
---|
7072 | start_index_on_file, & |
---|
7073 | end_index_on_file, & |
---|
7074 | nxlc, nysc, & |
---|
7075 | nxlf, nxrf, nysf, nynf, & |
---|
7076 | nys_on_file, nyn_on_file, & |
---|
7077 | nxl_on_file,nxr_on_file ) |
---|
7078 | #else |
---|
7079 | IF ( k == 1 ) THEN |
---|
7080 | IF ( .NOT. ALLOCATED( t_wall_v_1(3)%t ) ) & |
---|
7081 | ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
7082 | 1:surf_usm_v(3)%ns) ) |
---|
7083 | READ ( 13 ) tmp_wall_v(3)%t |
---|
7084 | ENDIF |
---|
7085 | CALL surface_restore_elements( & |
---|
7086 | t_wall_v_1(3)%t, tmp_wall_v(3)%t, & |
---|
7087 | surf_usm_v(3)%start_index, & |
---|
7088 | start_index_on_file, & |
---|
7089 | end_index_on_file, & |
---|
7090 | nxlc, nysc, & |
---|
7091 | nxlf, nxrf, nysf, nynf, & |
---|
7092 | nys_on_file, nyn_on_file, & |
---|
7093 | nxl_on_file,nxr_on_file ) |
---|
7094 | #endif |
---|
7095 | CASE ( 't_green_h' ) |
---|
7096 | #if defined( __nopointer ) |
---|
7097 | IF ( k == 1 ) THEN |
---|
7098 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
7099 | ALLOCATE( t_green_h(nzb_wall:nzt_wall+1, & |
---|
7100 | 1:surf_usm_h%ns) ) |
---|
7101 | READ ( 13 ) tmp_green_h |
---|
7102 | ENDIF |
---|
7103 | CALL surface_restore_elements( & |
---|
7104 | t_green_h, tmp_green_h, & |
---|
7105 | surf_usm_h%start_index, & |
---|
7106 | start_index_on_file, & |
---|
7107 | end_index_on_file, & |
---|
7108 | nxlc, nysc, & |
---|
7109 | nxlf, nxrf, nysf, nynf, & |
---|
7110 | nys_on_file, nyn_on_file, & |
---|
7111 | nxl_on_file,nxr_on_file ) |
---|
7112 | #else |
---|
7113 | IF ( k == 1 ) THEN |
---|
7114 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
7115 | ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1, & |
---|
7116 | 1:surf_usm_h%ns) ) |
---|
7117 | READ ( 13 ) tmp_green_h |
---|
7118 | ENDIF |
---|
7119 | CALL surface_restore_elements( & |
---|
7120 | t_green_h_1, tmp_green_h, & |
---|
7121 | surf_usm_h%start_index, & |
---|
7122 | start_index_on_file, & |
---|
7123 | end_index_on_file, & |
---|
7124 | nxlc, nysc, & |
---|
7125 | nxlf, nxrf, nysf, nynf, & |
---|
7126 | nys_on_file, nyn_on_file, & |
---|
7127 | nxl_on_file,nxr_on_file ) |
---|
7128 | #endif |
---|
7129 | CASE ( 't_green_v(0)' ) |
---|
7130 | #if defined( __nopointer ) |
---|
7131 | IF ( k == 1 ) THEN |
---|
7132 | IF ( .NOT. ALLOCATED( t_green_v(0)%t ) ) & |
---|
7133 | ALLOCATE( t_green_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
7134 | 1:surf_usm_v(0)%ns) ) |
---|
7135 | READ ( 13 ) tmp_green_v(0)%t |
---|
7136 | ENDIF |
---|
7137 | CALL surface_restore_elements( & |
---|
7138 | t_green_v(0)%t, tmp_green_v(0)%t, & |
---|
7139 | surf_usm_v(0)%start_index, & |
---|
7140 | start_index_on_file, & |
---|
7141 | end_index_on_file, & |
---|
7142 | nxlc, nysc, & |
---|
7143 | nxlf, nxrf, nysf, nynf, & |
---|
7144 | nys_on_file, nyn_on_file, & |
---|
7145 | nxl_on_file,nxr_on_file ) |
---|
7146 | #else |
---|
7147 | IF ( k == 1 ) THEN |
---|
7148 | IF ( .NOT. ALLOCATED( t_green_v_1(0)%t ) ) & |
---|
7149 | ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
7150 | 1:surf_usm_v(0)%ns) ) |
---|
7151 | READ ( 13 ) tmp_green_v(0)%t |
---|
7152 | ENDIF |
---|
7153 | CALL surface_restore_elements( & |
---|
7154 | t_green_v_1(0)%t, tmp_green_v(0)%t, & |
---|
7155 | surf_usm_v(0)%start_index, & |
---|
7156 | start_index_on_file, & |
---|
7157 | end_index_on_file, & |
---|
7158 | nxlc, nysc, & |
---|
7159 | nxlf, nxrf, nysf, nynf, & |
---|
7160 | nys_on_file, nyn_on_file, & |
---|
7161 | nxl_on_file,nxr_on_file ) |
---|
7162 | #endif |
---|
7163 | CASE ( 't_green_v(1)' ) |
---|
7164 | #if defined( __nopointer ) |
---|
7165 | IF ( k == 1 ) THEN |
---|
7166 | IF ( .NOT. ALLOCATED( t_green_v(1)%t ) ) & |
---|
7167 | ALLOCATE( t_green_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
7168 | 1:surf_usm_v(1)%ns) ) |
---|
7169 | READ ( 13 ) tmp_green_v(1)%t |
---|
7170 | ENDIF |
---|
7171 | CALL surface_restore_elements( & |
---|
7172 | t_green_v(1)%t, tmp_green_v(1)%t, & |
---|
7173 | surf_usm_v(1)%start_index, & |
---|
7174 | start_index_on_file, & |
---|
7175 | end_index_on_file , & |
---|
7176 | nxlc, nysc, & |
---|
7177 | nxlf, nxrf, nysf, nynf, & |
---|
7178 | nys_on_file, nyn_on_file, & |
---|
7179 | nxl_on_file,nxr_on_file ) |
---|
7180 | #else |
---|
7181 | IF ( k == 1 ) THEN |
---|
7182 | IF ( .NOT. ALLOCATED( t_green_v_1(1)%t ) ) & |
---|
7183 | ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
7184 | 1:surf_usm_v(1)%ns) ) |
---|
7185 | READ ( 13 ) tmp_green_v(1)%t |
---|
7186 | ENDIF |
---|
7187 | CALL surface_restore_elements( & |
---|
7188 | t_green_v_1(1)%t, tmp_green_v(1)%t, & |
---|
7189 | surf_usm_v(1)%start_index, & |
---|
7190 | start_index_on_file, & |
---|
7191 | end_index_on_file, & |
---|
7192 | nxlc, nysc, & |
---|
7193 | nxlf, nxrf, nysf, nynf, & |
---|
7194 | nys_on_file, nyn_on_file, & |
---|
7195 | nxl_on_file,nxr_on_file ) |
---|
7196 | #endif |
---|
7197 | CASE ( 't_green_v(2)' ) |
---|
7198 | #if defined( __nopointer ) |
---|
7199 | IF ( k == 1 ) THEN |
---|
7200 | IF ( .NOT. ALLOCATED( t_green_v(2)%t ) ) & |
---|
7201 | ALLOCATE( t_green_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
7202 | 1:surf_usm_v(2)%ns) ) |
---|
7203 | READ ( 13 ) tmp_green_v(2)%t |
---|
7204 | ENDIF |
---|
7205 | CALL surface_restore_elements( & |
---|
7206 | t_green_v(2)%t, tmp_green_v(2)%t, & |
---|
7207 | surf_usm_v(2)%start_index, & |
---|
7208 | start_index_on_file, & |
---|
7209 | end_index_on_file, & |
---|
7210 | nxlc, nysc, & |
---|
7211 | nxlf, nxrf, nysf, nynf, & |
---|
7212 | nys_on_file, nyn_on_file, & |
---|
7213 | nxl_on_file,nxr_on_file ) |
---|
7214 | #else |
---|
7215 | IF ( k == 1 ) THEN |
---|
7216 | IF ( .NOT. ALLOCATED( t_green_v_1(2)%t ) ) & |
---|
7217 | ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
7218 | 1:surf_usm_v(2)%ns) ) |
---|
7219 | READ ( 13 ) tmp_green_v(2)%t |
---|
7220 | ENDIF |
---|
7221 | CALL surface_restore_elements( & |
---|
7222 | t_green_v_1(2)%t, tmp_green_v(2)%t, & |
---|
7223 | surf_usm_v(2)%start_index, & |
---|
7224 | start_index_on_file, & |
---|
7225 | end_index_on_file , & |
---|
7226 | nxlc, nysc, & |
---|
7227 | nxlf, nxrf, nysf, nynf, & |
---|
7228 | nys_on_file, nyn_on_file, & |
---|
7229 | nxl_on_file,nxr_on_file ) |
---|
7230 | #endif |
---|
7231 | CASE ( 't_green_v(3)' ) |
---|
7232 | #if defined( __nopointer ) |
---|
7233 | IF ( k == 1 ) THEN |
---|
7234 | IF ( .NOT. ALLOCATED( t_green_v(3)%t ) ) & |
---|
7235 | ALLOCATE( t_green_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
7236 | 1:surf_usm_v(3)%ns) ) |
---|
7237 | READ ( 13 ) tmp_green_v(3)%t |
---|
7238 | ENDIF |
---|
7239 | CALL surface_restore_elements( & |
---|
7240 | t_green_v(3)%t, tmp_green_v(3)%t, & |
---|
7241 | surf_usm_v(3)%start_index, & |
---|
7242 | start_index_on_file, & |
---|
7243 | end_index_on_file, & |
---|
7244 | nxlc, nysc, & |
---|
7245 | nxlf, nxrf, nysf, nynf, & |
---|
7246 | nys_on_file, nyn_on_file, & |
---|
7247 | nxl_on_file,nxr_on_file ) |
---|
7248 | #else |
---|
7249 | IF ( k == 1 ) THEN |
---|
7250 | IF ( .NOT. ALLOCATED( t_green_v_1(3)%t ) ) & |
---|
7251 | ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
7252 | 1:surf_usm_v(3)%ns) ) |
---|
7253 | READ ( 13 ) tmp_green_v(3)%t |
---|
7254 | ENDIF |
---|
7255 | CALL surface_restore_elements( & |
---|
7256 | t_green_v_1(3)%t, tmp_green_v(3)%t, & |
---|
7257 | surf_usm_v(3)%start_index, & |
---|
7258 | start_index_on_file, & |
---|
7259 | end_index_on_file, & |
---|
7260 | nxlc, nysc, & |
---|
7261 | nxlf, nxrf, nysf, nynf, & |
---|
7262 | nys_on_file, nyn_on_file, & |
---|
7263 | nxl_on_file,nxr_on_file ) |
---|
7264 | #endif |
---|
7265 | CASE ( 't_window_h' ) |
---|
7266 | #if defined( __nopointer ) |
---|
7267 | IF ( k == 1 ) THEN |
---|
7268 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
7269 | ALLOCATE( t_window_h(nzb_wall:nzt_wall+1, & |
---|
7270 | 1:surf_usm_h%ns) ) |
---|
7271 | READ ( 13 ) tmp_window_h |
---|
7272 | ENDIF |
---|
7273 | CALL surface_restore_elements( & |
---|
7274 | t_window_h, tmp_window_h, & |
---|
7275 | surf_usm_h%start_index, & |
---|
7276 | start_index_on_file, & |
---|
7277 | end_index_on_file, & |
---|
7278 | nxlc, nysc, & |
---|
7279 | nxlf, nxrf, nysf, nynf, & |
---|
7280 | nys_on_file, nyn_on_file, & |
---|
7281 | nxl_on_file,nxr_on_file ) |
---|
7282 | #else |
---|
7283 | IF ( k == 1 ) THEN |
---|
7284 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
7285 | ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1, & |
---|
7286 | 1:surf_usm_h%ns) ) |
---|
7287 | READ ( 13 ) tmp_window_h |
---|
7288 | ENDIF |
---|
7289 | CALL surface_restore_elements( & |
---|
7290 | t_window_h_1, tmp_window_h, & |
---|
7291 | surf_usm_h%start_index, & |
---|
7292 | start_index_on_file, & |
---|
7293 | end_index_on_file, & |
---|
7294 | nxlc, nysc, & |
---|
7295 | nxlf, nxrf, nysf, nynf, & |
---|
7296 | nys_on_file, nyn_on_file, & |
---|
7297 | nxl_on_file, nxr_on_file ) |
---|
7298 | #endif |
---|
7299 | CASE ( 't_window_v(0)' ) |
---|
7300 | #if defined( __nopointer ) |
---|
7301 | IF ( k == 1 ) THEN |
---|
7302 | IF ( .NOT. ALLOCATED( t_window_v(0)%t ) ) & |
---|
7303 | ALLOCATE( t_window_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
7304 | 1:surf_usm_v(0)%ns) ) |
---|
7305 | READ ( 13 ) tmp_window_v(0)%t |
---|
7306 | ENDIF |
---|
7307 | CALL surface_restore_elements( & |
---|
7308 | t_window_v(0)%t, tmp_window_v(0)%t, & |
---|
7309 | surf_usm_v(0)%start_index, & |
---|
7310 | start_index_on_file, & |
---|
7311 | end_index_on_file, & |
---|
7312 | nxlc, nysc, & |
---|
7313 | nxlf, nxrf, nysf, nynf, & |
---|
7314 | nys_on_file, nyn_on_file, & |
---|
7315 | nxl_on_file, nxr_on_file ) |
---|
7316 | #else |
---|
7317 | IF ( k == 1 ) THEN |
---|
7318 | IF ( .NOT. ALLOCATED( t_window_v_1(0)%t ) ) & |
---|
7319 | ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
7320 | 1:surf_usm_v(0)%ns) ) |
---|
7321 | READ ( 13 ) tmp_window_v(0)%t |
---|
7322 | ENDIF |
---|
7323 | CALL surface_restore_elements( & |
---|
7324 | t_window_v_1(0)%t, & |
---|
7325 | tmp_window_v(0)%t, & |
---|
7326 | surf_usm_v(0)%start_index, & |
---|
7327 | start_index_on_file, & |
---|
7328 | end_index_on_file, & |
---|
7329 | nxlc, nysc, & |
---|
7330 | nxlf, nxrf, nysf, nynf, & |
---|
7331 | nys_on_file, nyn_on_file, & |
---|
7332 | nxl_on_file,nxr_on_file ) |
---|
7333 | #endif |
---|
7334 | CASE ( 't_window_v(1)' ) |
---|
7335 | #if defined( __nopointer ) |
---|
7336 | IF ( k == 1 ) THEN |
---|
7337 | IF ( .NOT. ALLOCATED( t_window_v(1)%t ) ) & |
---|
7338 | ALLOCATE( t_window_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
7339 | 1:surf_usm_v(1)%ns) ) |
---|
7340 | READ ( 13 ) tmp_window_v(1)%t |
---|
7341 | ENDIF |
---|
7342 | CALL surface_restore_elements( & |
---|
7343 | t_window_v(1)%t, tmp_window_v(1)%t, & |
---|
7344 | surf_usm_v(1)%start_index, & |
---|
7345 | start_index_on_file, & |
---|
7346 | end_index_on_file , & |
---|
7347 | nxlc, nysc, & |
---|
7348 | nxlf, nxrf, nysf, nynf, & |
---|
7349 | nys_on_file, nyn_on_file, & |
---|
7350 | nxl_on_file, nxr_on_file ) |
---|
7351 | #else |
---|
7352 | IF ( k == 1 ) THEN |
---|
7353 | IF ( .NOT. ALLOCATED( t_window_v_1(1)%t ) ) & |
---|
7354 | ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
7355 | 1:surf_usm_v(1)%ns) ) |
---|
7356 | READ ( 13 ) tmp_window_v(1)%t |
---|
7357 | ENDIF |
---|
7358 | CALL surface_restore_elements( & |
---|
7359 | t_window_v_1(1)%t, & |
---|
7360 | tmp_window_v(1)%t, & |
---|
7361 | surf_usm_v(1)%start_index, & |
---|
7362 | start_index_on_file, & |
---|
7363 | end_index_on_file, & |
---|
7364 | nxlc, nysc, & |
---|
7365 | nxlf, nxrf, nysf, nynf, & |
---|
7366 | nys_on_file, nyn_on_file, & |
---|
7367 | nxl_on_file,nxr_on_file ) |
---|
7368 | #endif |
---|
7369 | CASE ( 't_window_v(2)' ) |
---|
7370 | #if defined( __nopointer ) |
---|
7371 | IF ( k == 1 ) THEN |
---|
7372 | IF ( .NOT. ALLOCATED( t_window_v(2)%t ) ) & |
---|
7373 | ALLOCATE( t_window_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
7374 | 1:surf_usm_v(2)%ns) ) |
---|
7375 | READ ( 13 ) tmp_window_v(2)%t |
---|
7376 | ENDIF |
---|
7377 | CALL surface_restore_elements( & |
---|
7378 | t_window_v(2)%t, tmp_window_v(2)%t, & |
---|
7379 | surf_usm_v(2)%start_index, & |
---|
7380 | start_index_on_file, & |
---|
7381 | end_index_on_file, & |
---|
7382 | nxlc, nysc, & |
---|
7383 | nxlf, nxrf, nysf, nynf, & |
---|
7384 | nys_on_file, nyn_on_file, & |
---|
7385 | nxl_on_file,nxr_on_file ) |
---|
7386 | #else |
---|
7387 | IF ( k == 1 ) THEN |
---|
7388 | IF ( .NOT. ALLOCATED( t_window_v_1(2)%t ) ) & |
---|
7389 | ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
7390 | 1:surf_usm_v(2)%ns) ) |
---|
7391 | READ ( 13 ) tmp_window_v(2)%t |
---|
7392 | ENDIF |
---|
7393 | CALL surface_restore_elements( & |
---|
7394 | t_window_v_1(2)%t, & |
---|
7395 | tmp_window_v(2)%t, & |
---|
7396 | surf_usm_v(2)%start_index, & |
---|
7397 | start_index_on_file, & |
---|
7398 | end_index_on_file , & |
---|
7399 | nxlc, nysc, & |
---|
7400 | nxlf, nxrf, nysf, nynf, & |
---|
7401 | nys_on_file, nyn_on_file, & |
---|
7402 | nxl_on_file,nxr_on_file ) |
---|
7403 | #endif |
---|
7404 | CASE ( 't_window_v(3)' ) |
---|
7405 | #if defined( __nopointer ) |
---|
7406 | IF ( k == 1 ) THEN |
---|
7407 | IF ( .NOT. ALLOCATED( t_window_v(3)%t ) ) & |
---|
7408 | ALLOCATE( t_window_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
7409 | 1:surf_usm_v(3)%ns) ) |
---|
7410 | READ ( 13 ) tmp_window_v(3)%t |
---|
7411 | ENDIF |
---|
7412 | CALL surface_restore_elements( & |
---|
7413 | t_window_v(3)%t, tmp_window_v(3)%t, & |
---|
7414 | surf_usm_v(3)%start_index, & |
---|
7415 | start_index_on_file, & |
---|
7416 | end_index_on_file, & |
---|
7417 | nxlc, nysc, & |
---|
7418 | nxlf, nxrf, nysf, nynf, & |
---|
7419 | nys_on_file, nyn_on_file, & |
---|
7420 | nxl_on_file,nxr_on_file ) |
---|
7421 | #else |
---|
7422 | IF ( k == 1 ) THEN |
---|
7423 | IF ( .NOT. ALLOCATED( t_window_v_1(3)%t ) ) & |
---|
7424 | ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) ) |
---|
7425 | READ ( 13 ) tmp_window_v(3)%t |
---|
7426 | ENDIF |
---|
7427 | CALL surface_restore_elements( & |
---|
7428 | t_window_v_1(3)%t, & |
---|
7429 | tmp_window_v(3)%t, & |
---|
7430 | surf_usm_v(3)%start_index, & |
---|
7431 | start_index_on_file, & |
---|
7432 | end_index_on_file, & |
---|
7433 | nxlc, nysc, & |
---|
7434 | nxlf, nxrf, nysf, nynf, & |
---|
7435 | nys_on_file, nyn_on_file, & |
---|
7436 | nxl_on_file,nxr_on_file ) |
---|
7437 | #endif |
---|
7438 | CASE DEFAULT |
---|
7439 | |
---|
7440 | found = .FALSE. |
---|
7441 | |
---|
7442 | END SELECT |
---|
7443 | |
---|
7444 | |
---|
7445 | END SUBROUTINE usm_rrd_local |
---|
7446 | |
---|
7447 | |
---|
7448 | |
---|
7449 | !------------------------------------------------------------------------------! |
---|
7450 | ! Description: |
---|
7451 | ! ------------ |
---|
7452 | ! |
---|
7453 | !> This subroutine reads walls, roofs and land categories and it parameters |
---|
7454 | !> from input files. |
---|
7455 | !------------------------------------------------------------------------------! |
---|
7456 | SUBROUTINE usm_read_urban_surface_types |
---|
7457 | |
---|
7458 | USE netcdf_data_input_mod, & |
---|
7459 | ONLY: building_pars_f, building_type_f |
---|
7460 | |
---|
7461 | IMPLICIT NONE |
---|
7462 | |
---|
7463 | CHARACTER(12) :: wtn |
---|
7464 | INTEGER(iwp) :: wtc |
---|
7465 | REAL(wp), DIMENSION(n_surface_params) :: wtp |
---|
7466 | LOGICAL :: ascii_file = .FALSE. |
---|
7467 | INTEGER(iwp), DIMENSION(0:17, nysg:nyng, nxlg:nxrg) :: usm_par |
---|
7468 | REAL(wp), DIMENSION(1:14, nysg:nyng, nxlg:nxrg) :: usm_val |
---|
7469 | INTEGER(iwp) :: k, l, iw, jw, kw, it, ip, ii, ij, m |
---|
7470 | INTEGER(iwp) :: i, j |
---|
7471 | INTEGER(iwp) :: nz, roof, dirwe, dirsn |
---|
7472 | INTEGER(iwp) :: category |
---|
7473 | INTEGER(iwp) :: weheight1, wecat1, snheight1, sncat1 |
---|
7474 | INTEGER(iwp) :: weheight2, wecat2, snheight2, sncat2 |
---|
7475 | INTEGER(iwp) :: weheight3, wecat3, snheight3, sncat3 |
---|
7476 | REAL(wp) :: height, albedo, thick |
---|
7477 | REAL(wp) :: wealbedo1, wethick1, snalbedo1, snthick1 |
---|
7478 | REAL(wp) :: wealbedo2, wethick2, snalbedo2, snthick2 |
---|
7479 | REAL(wp) :: wealbedo3, wethick3, snalbedo3, snthick3 |
---|
7480 | |
---|
7481 | ! |
---|
7482 | !-- If building_pars or building_type are already read from static input |
---|
7483 | !-- file, skip reading ASCII file. |
---|
7484 | IF ( building_type_f%from_file .OR. building_pars_f%from_file ) & |
---|
7485 | RETURN |
---|
7486 | ! |
---|
7487 | !-- Check if ASCII input file exists. If not, return and initialize USM |
---|
7488 | !-- with default settings. |
---|
7489 | INQUIRE( FILE = 'SURFACE_PARAMETERS' // coupling_char, & |
---|
7490 | EXIST = ascii_file ) |
---|
7491 | |
---|
7492 | IF ( .NOT. ascii_file ) RETURN |
---|
7493 | |
---|
7494 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7495 | !-- read categories of walls and their parameters |
---|
7496 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7497 | DO ii = 0, io_blocks-1 |
---|
7498 | IF ( ii == io_group ) THEN |
---|
7499 | |
---|
7500 | !-- open urban surface file |
---|
7501 | OPEN( 151, file='SURFACE_PARAMETERS'//coupling_char, action='read', & |
---|
7502 | status='old', form='formatted', err=15 ) |
---|
7503 | !-- first test and get n_surface_types |
---|
7504 | k = 0 |
---|
7505 | l = 0 |
---|
7506 | DO |
---|
7507 | l = l+1 |
---|
7508 | READ( 151, *, err=11, end=12 ) wtc, wtp, wtn |
---|
7509 | k = k+1 |
---|
7510 | CYCLE |
---|
7511 | 11 CONTINUE |
---|
7512 | ENDDO |
---|
7513 | 12 n_surface_types = k |
---|
7514 | ALLOCATE( surface_type_names(n_surface_types) ) |
---|
7515 | ALLOCATE( surface_type_codes(n_surface_types) ) |
---|
7516 | ALLOCATE( surface_params(n_surface_params, n_surface_types) ) |
---|
7517 | !-- real reading |
---|
7518 | rewind( 151 ) |
---|
7519 | k = 0 |
---|
7520 | DO |
---|
7521 | READ( 151, *, err=13, end=14 ) wtc, wtp, wtn |
---|
7522 | k = k+1 |
---|
7523 | surface_type_codes(k) = wtc |
---|
7524 | surface_params(:,k) = wtp |
---|
7525 | surface_type_names(k) = wtn |
---|
7526 | CYCLE |
---|
7527 | 13 WRITE(6,'(i3,a,2i5)') myid, 'readparams2 error k=', k |
---|
7528 | FLUSH(6) |
---|
7529 | CONTINUE |
---|
7530 | ENDDO |
---|
7531 | 14 CLOSE(151) |
---|
7532 | CYCLE |
---|
7533 | 15 message_string = 'file SURFACE_PARAMETERS'//TRIM(coupling_char)//' does not exist' |
---|
7534 | CALL message( 'usm_read_urban_surface_types', 'PA0513', 1, 2, 0, 6, 0 ) |
---|
7535 | ENDIF |
---|
7536 | ENDDO |
---|
7537 | |
---|
7538 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7539 | !-- read types of surfaces |
---|
7540 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7541 | usm_par = 0 |
---|
7542 | DO ii = 0, io_blocks-1 |
---|
7543 | IF ( ii == io_group ) THEN |
---|
7544 | |
---|
7545 | ! |
---|
7546 | !-- open csv urban surface file |
---|
7547 | OPEN( 151, file='URBAN_SURFACE'//TRIM(coupling_char), action='read', & |
---|
7548 | status='old', form='formatted', err=23 ) |
---|
7549 | |
---|
7550 | l = 0 |
---|
7551 | DO |
---|
7552 | l = l+1 |
---|
7553 | !-- i, j, height, nz, roof, dirwe, dirsn, category, soilcat, |
---|
7554 | !-- weheight1, wecat1, snheight1, sncat1, weheight2, wecat2, snheight2, sncat2, |
---|
7555 | !-- weheight3, wecat3, snheight3, sncat3 |
---|
7556 | READ( 151, *, err=21, end=25 ) i, j, height, nz, roof, dirwe, dirsn, & |
---|
7557 | category, albedo, thick, & |
---|
7558 | weheight1, wecat1, wealbedo1, wethick1, & |
---|
7559 | weheight2, wecat2, wealbedo2, wethick2, & |
---|
7560 | weheight3, wecat3, wealbedo3, wethick3, & |
---|
7561 | snheight1, sncat1, snalbedo1, snthick1, & |
---|
7562 | snheight2, sncat2, snalbedo2, snthick2, & |
---|
7563 | snheight3, sncat3, snalbedo3, snthick3 |
---|
7564 | |
---|
7565 | IF ( i >= nxlg .AND. i <= nxrg .AND. j >= nysg .AND. j <= nyng ) THEN |
---|
7566 | !-- write integer variables into array |
---|
7567 | usm_par(:,j,i) = (/1, nz, roof, dirwe, dirsn, category, & |
---|
7568 | weheight1, wecat1, weheight2, wecat2, weheight3, wecat3, & |
---|
7569 | snheight1, sncat1, snheight2, sncat2, snheight3, sncat3 /) |
---|
7570 | !-- write real values into array |
---|
7571 | usm_val(:,j,i) = (/ albedo, thick, & |
---|
7572 | wealbedo1, wethick1, wealbedo2, wethick2, & |
---|
7573 | wealbedo3, wethick3, snalbedo1, snthick1, & |
---|
7574 | snalbedo2, snthick2, snalbedo3, snthick3 /) |
---|
7575 | ENDIF |
---|
7576 | CYCLE |
---|
7577 | 21 WRITE (message_string, "(A,I5)") 'errors in file URBAN_SURFACE'//TRIM(coupling_char)//' on line ', l |
---|
7578 | CALL message( 'usm_read_urban_surface_types', 'PA0512', 0, 1, 0, 6, 0 ) |
---|
7579 | ENDDO |
---|
7580 | |
---|
7581 | 23 message_string = 'file URBAN_SURFACE'//TRIM(coupling_char)//' does not exist' |
---|
7582 | CALL message( 'usm_read_urban_surface_types', 'PA0514', 1, 2, 0, 6, 0 ) |
---|
7583 | |
---|
7584 | 25 CLOSE( 151 ) |
---|
7585 | |
---|
7586 | ENDIF |
---|
7587 | #if defined( __parallel ) |
---|
7588 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7589 | #endif |
---|
7590 | ENDDO |
---|
7591 | |
---|
7592 | ! |
---|
7593 | !-- check completeness and formal correctness of the data |
---|
7594 | DO i = nxlg, nxrg |
---|
7595 | DO j = nysg, nyng |
---|
7596 | IF ( usm_par(0,j,i) /= 0 .AND. ( & !< incomplete data,supply default values later |
---|
7597 | usm_par(1,j,i) < nzb .OR. & |
---|
7598 | usm_par(1,j,i) > nzt .OR. & !< incorrect height (nz < nzb .OR. nz > nzt) |
---|
7599 | usm_par(2,j,i) < 0 .OR. & |
---|
7600 | usm_par(2,j,i) > 1 .OR. & !< incorrect roof sign |
---|
7601 | usm_par(3,j,i) < nzb-nzt .OR. & |
---|
7602 | usm_par(3,j,i) > nzt-nzb .OR. & !< incorrect west-east wall direction sign |
---|
7603 | usm_par(4,j,i) < nzb-nzt .OR. & |
---|
7604 | usm_par(4,j,i) > nzt-nzb .OR. & !< incorrect south-north wall direction sign |
---|
7605 | usm_par(6,j,i) < nzb .OR. & |
---|
7606 | usm_par(6,j,i) > nzt .OR. & !< incorrect pedestrian level height for west-east wall |
---|
7607 | usm_par(8,j,i) > nzt .OR. & |
---|
7608 | usm_par(10,j,i) > nzt .OR. & !< incorrect wall or roof level height for west-east wall |
---|
7609 | usm_par(12,j,i) < nzb .OR. & |
---|
7610 | usm_par(12,j,i) > nzt .OR. & !< incorrect pedestrian level height for south-north wall |
---|
7611 | usm_par(14,j,i) > nzt .OR. & |
---|
7612 | usm_par(16,j,i) > nzt & !< incorrect wall or roof level height for south-north wall |
---|
7613 | ) ) THEN |
---|
7614 | !-- incorrect input data |
---|
7615 | WRITE (message_string, "(A,2I5)") 'missing or incorrect data in file URBAN_SURFACE'// & |
---|
7616 | TRIM(coupling_char)//' for i,j=', i,j |
---|
7617 | CALL message( 'usm_read_urban_surface', 'PA0504', 1, 2, 0, 6, 0 ) |
---|
7618 | ENDIF |
---|
7619 | |
---|
7620 | ENDDO |
---|
7621 | ENDDO |
---|
7622 | ! |
---|
7623 | !-- Assign the surface types to the respective data type. |
---|
7624 | !-- First, for horizontal upward-facing surfaces. |
---|
7625 | !-- Further, set flag indicating that albedo is initialized via ASCII |
---|
7626 | !-- format, else it would be overwritten in the radiation model. |
---|
7627 | surf_usm_h%albedo_from_ascii = .TRUE. |
---|
7628 | DO m = 1, surf_usm_h%ns |
---|
7629 | iw = surf_usm_h%i(m) |
---|
7630 | jw = surf_usm_h%j(m) |
---|
7631 | kw = surf_usm_h%k(m) |
---|
7632 | |
---|
7633 | IF ( usm_par(5,jw,iw) == 0 ) THEN |
---|
7634 | #if ! defined( __nopointer ) |
---|
7635 | IF ( zu(kw) >= roof_height_limit ) THEN |
---|
7636 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
7637 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
7638 | ELSE |
---|
7639 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
7640 | surf_usm_h%surface_types(m) = land_category !< default category for land surface |
---|
7641 | ENDIF |
---|
7642 | #endif |
---|
7643 | surf_usm_h%albedo(:,m) = -1.0_wp |
---|
7644 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
7645 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
7646 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
7647 | ELSE |
---|
7648 | IF ( usm_par(2,jw,iw)==0 ) THEN |
---|
7649 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
7650 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
7651 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
7652 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
7653 | ELSE |
---|
7654 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
7655 | surf_usm_h%thickness_wall(m) = usm_val(2,jw,iw) |
---|
7656 | surf_usm_h%thickness_window(m) = usm_val(2,jw,iw) |
---|
7657 | surf_usm_h%thickness_green(m) = usm_val(2,jw,iw) |
---|
7658 | ENDIF |
---|
7659 | surf_usm_h%surface_types(m) = usm_par(5,jw,iw) |
---|
7660 | surf_usm_h%albedo(:,m) = usm_val(1,jw,iw) |
---|
7661 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
7662 | ENDIF |
---|
7663 | ! |
---|
7664 | !-- Find the type position |
---|
7665 | it = surf_usm_h%surface_types(m) |
---|
7666 | ip = -99999 |
---|
7667 | DO k = 1, n_surface_types |
---|
7668 | IF ( surface_type_codes(k) == it ) THEN |
---|
7669 | ip = k |
---|
7670 | EXIT |
---|
7671 | ENDIF |
---|
7672 | ENDDO |
---|
7673 | IF ( ip == -99999 ) THEN |
---|
7674 | !-- land/roof category not found |
---|
7675 | WRITE (9,"(A,I5,A,3I5)") 'land/roof category ', it, & |
---|
7676 | ' not found for i,j,k=', iw,jw,kw |
---|
7677 | FLUSH(9) |
---|
7678 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
7679 | category = roof_category |
---|
7680 | ELSE |
---|
7681 | category = land_category |
---|
7682 | ENDIF |
---|
7683 | DO k = 1, n_surface_types |
---|
7684 | IF ( surface_type_codes(k) == roof_category ) THEN |
---|
7685 | ip = k |
---|
7686 | EXIT |
---|
7687 | ENDIF |
---|
7688 | ENDDO |
---|
7689 | IF ( ip == -99999 ) THEN |
---|
7690 | !-- default land/roof category not found |
---|
7691 | WRITE (9,"(A,I5,A,3I5)") 'Default land/roof category', category, ' not found!' |
---|
7692 | FLUSH(9) |
---|
7693 | ip = 1 |
---|
7694 | ENDIF |
---|
7695 | ENDIF |
---|
7696 | ! |
---|
7697 | !-- Albedo |
---|
7698 | IF ( surf_usm_h%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
7699 | surf_usm_h%albedo(:,m) = surface_params(ialbedo,ip) |
---|
7700 | ENDIF |
---|
7701 | !-- Albedo type is 0 (custom), others are replaced later |
---|
7702 | surf_usm_h%albedo_type(:,m) = 0 |
---|
7703 | !-- Transmissivity |
---|
7704 | IF ( surf_usm_h%transmissivity(m) < 0.0_wp ) THEN |
---|
7705 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
7706 | ENDIF |
---|
7707 | ! |
---|
7708 | !-- emissivity of the wall |
---|
7709 | surf_usm_h%emissivity(:,m) = surface_params(iemiss,ip) |
---|
7710 | ! |
---|
7711 | !-- heat conductivity λS between air and wall ( W mâ2 Kâ1 ) |
---|
7712 | surf_usm_h%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
7713 | surf_usm_h%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
7714 | surf_usm_h%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
7715 | ! |
---|
7716 | !-- roughness length for momentum, heat and humidity |
---|
7717 | surf_usm_h%z0(m) = surface_params(irough,ip) |
---|
7718 | surf_usm_h%z0h(m) = surface_params(iroughh,ip) |
---|
7719 | surf_usm_h%z0q(m) = surface_params(iroughh,ip) |
---|
7720 | ! |
---|
7721 | !-- Surface skin layer heat capacity (J mâ2 Kâ1 ) |
---|
7722 | surf_usm_h%c_surface(m) = surface_params(icsurf,ip) |
---|
7723 | surf_usm_h%c_surface_window(m) = surface_params(icsurf,ip) |
---|
7724 | surf_usm_h%c_surface_green(m) = surface_params(icsurf,ip) |
---|
7725 | ! |
---|
7726 | !-- wall material parameters: |
---|
7727 | !-- thickness of the wall (m) |
---|
7728 | !-- missing values are replaced by default value for category |
---|
7729 | IF ( surf_usm_h%thickness_wall(m) <= 0.001_wp ) THEN |
---|
7730 | surf_usm_h%thickness_wall(m) = surface_params(ithick,ip) |
---|
7731 | ENDIF |
---|
7732 | IF ( surf_usm_h%thickness_window(m) <= 0.001_wp ) THEN |
---|
7733 | surf_usm_h%thickness_window(m) = surface_params(ithick,ip) |
---|
7734 | ENDIF |
---|
7735 | IF ( surf_usm_h%thickness_green(m) <= 0.001_wp ) THEN |
---|
7736 | surf_usm_h%thickness_green(m) = surface_params(ithick,ip) |
---|
7737 | ENDIF |
---|
7738 | ! |
---|
7739 | !-- volumetric heat capacity rho*C of the wall ( J mâ3 Kâ1 ) |
---|
7740 | surf_usm_h%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
7741 | surf_usm_h%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
7742 | surf_usm_h%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
7743 | ! |
---|
7744 | !-- thermal conductivity λH of the wall (W mâ1 Kâ1 ) |
---|
7745 | surf_usm_h%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
7746 | surf_usm_h%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
7747 | surf_usm_h%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
7748 | |
---|
7749 | ENDDO |
---|
7750 | ! |
---|
7751 | !-- For vertical surface elements ( 0 -- northward-facing, 1 -- southward-facing, |
---|
7752 | !-- 2 -- eastward-facing, 3 -- westward-facing ) |
---|
7753 | DO l = 0, 3 |
---|
7754 | ! |
---|
7755 | !-- Set flag indicating that albedo is initialized via ASCII format. |
---|
7756 | !-- Else it would be overwritten in the radiation model. |
---|
7757 | surf_usm_v(l)%albedo_from_ascii = .TRUE. |
---|
7758 | DO m = 1, surf_usm_v(l)%ns |
---|
7759 | i = surf_usm_v(l)%i(m) |
---|
7760 | j = surf_usm_v(l)%j(m) |
---|
7761 | kw = surf_usm_v(l)%k(m) |
---|
7762 | |
---|
7763 | IF ( l == 3 ) THEN ! westward facing |
---|
7764 | iw = i |
---|
7765 | jw = j |
---|
7766 | ii = 6 |
---|
7767 | ij = 3 |
---|
7768 | ELSEIF ( l == 2 ) THEN |
---|
7769 | iw = i-1 |
---|
7770 | jw = j |
---|
7771 | ii = 6 |
---|
7772 | ij = 3 |
---|
7773 | ELSEIF ( l == 1 ) THEN |
---|
7774 | iw = i |
---|
7775 | jw = j |
---|
7776 | ii = 12 |
---|
7777 | ij = 9 |
---|
7778 | ELSEIF ( l == 0 ) THEN |
---|
7779 | iw = i |
---|
7780 | jw = j-1 |
---|
7781 | ii = 12 |
---|
7782 | ij = 9 |
---|
7783 | ENDIF |
---|
7784 | |
---|
7785 | IF ( iw < 0 .OR. jw < 0 ) THEN |
---|
7786 | !-- wall on west or south border of the domain - assign default category |
---|
7787 | IF ( kw <= roof_height_limit ) THEN |
---|
7788 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
7789 | ELSE |
---|
7790 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
7791 | END IF |
---|
7792 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7793 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7794 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7795 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7796 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7797 | ELSE IF ( kw <= usm_par(ii,jw,iw) ) THEN |
---|
7798 | !-- pedestrian zone |
---|
7799 | IF ( usm_par(ii+1,jw,iw) == 0 ) THEN |
---|
7800 | surf_usm_v(l)%surface_types(m) = pedestrian_category !< default category for wall surface in pedestrian zone |
---|
7801 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7802 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7803 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7804 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7805 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7806 | ELSE |
---|
7807 | surf_usm_v(l)%surface_types(m) = usm_par(ii+1,jw,iw) |
---|
7808 | surf_usm_v(l)%albedo(:,m) = usm_val(ij,jw,iw) |
---|
7809 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+1,jw,iw) |
---|
7810 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+1,jw,iw) |
---|
7811 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+1,jw,iw) |
---|
7812 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7813 | ENDIF |
---|
7814 | ELSE IF ( kw <= usm_par(ii+2,jw,iw) ) THEN |
---|
7815 | !-- wall zone |
---|
7816 | IF ( usm_par(ii+3,jw,iw) == 0 ) THEN |
---|
7817 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface |
---|
7818 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7819 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7820 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7821 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7822 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7823 | ELSE |
---|
7824 | surf_usm_v(l)%surface_types(m) = usm_par(ii+3,jw,iw) |
---|
7825 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+2,jw,iw) |
---|
7826 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+3,jw,iw) |
---|
7827 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+3,jw,iw) |
---|
7828 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+3,jw,iw) |
---|
7829 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7830 | ENDIF |
---|
7831 | ELSE IF ( kw <= usm_par(ii+4,jw,iw) ) THEN |
---|
7832 | !-- roof zone |
---|
7833 | IF ( usm_par(ii+5,jw,iw) == 0 ) THEN |
---|
7834 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for roof surface |
---|
7835 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7836 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7837 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7838 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7839 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7840 | ELSE |
---|
7841 | surf_usm_v(l)%surface_types(m) = usm_par(ii+5,jw,iw) |
---|
7842 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+4,jw,iw) |
---|
7843 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+5,jw,iw) |
---|
7844 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+5,jw,iw) |
---|
7845 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+5,jw,iw) |
---|
7846 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7847 | ENDIF |
---|
7848 | ELSE |
---|
7849 | ! |
---|
7850 | WRITE(9,*) 'Problem reading USM data:' |
---|
7851 | WRITE(9,*) l,i,j,kw,get_topography_top_index_ji( j, i, 's' ) |
---|
7852 | WRITE(9,*) ii,iw,jw,kw,get_topography_top_index_ji( jw, iw, 's' ) |
---|
7853 | WRITE(9,*) usm_par(ii,jw,iw),usm_par(ii+1,jw,iw) |
---|
7854 | WRITE(9,*) usm_par(ii+2,jw,iw),usm_par(ii+3,jw,iw) |
---|
7855 | WRITE(9,*) usm_par(ii+4,jw,iw),usm_par(ii+5,jw,iw) |
---|
7856 | WRITE(9,*) kw,roof_height_limit,wall_category,roof_category |
---|
7857 | FLUSH(9) |
---|
7858 | !-- supply the default category |
---|
7859 | IF ( kw <= roof_height_limit ) THEN |
---|
7860 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
7861 | ELSE |
---|
7862 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
7863 | END IF |
---|
7864 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7865 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7866 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7867 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7868 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7869 | ENDIF |
---|
7870 | ! |
---|
7871 | !-- Find the type position |
---|
7872 | it = surf_usm_v(l)%surface_types(m) |
---|
7873 | ip = -99999 |
---|
7874 | DO k = 1, n_surface_types |
---|
7875 | IF ( surface_type_codes(k) == it ) THEN |
---|
7876 | ip = k |
---|
7877 | EXIT |
---|
7878 | ENDIF |
---|
7879 | ENDDO |
---|
7880 | IF ( ip == -99999 ) THEN |
---|
7881 | !-- wall category not found |
---|
7882 | WRITE (9, "(A,I7,A,3I5)") 'wall category ', it, & |
---|
7883 | ' not found for i,j,k=', iw,jw,kw |
---|
7884 | FLUSH(9) |
---|
7885 | category = wall_category |
---|
7886 | DO k = 1, n_surface_types |
---|
7887 | IF ( surface_type_codes(k) == category ) THEN |
---|
7888 | ip = k |
---|
7889 | EXIT |
---|
7890 | ENDIF |
---|
7891 | ENDDO |
---|
7892 | IF ( ip == -99999 ) THEN |
---|
7893 | !-- default wall category not found |
---|
7894 | WRITE (9, "(A,I5,A,3I5)") 'Default wall category', category, ' not found!' |
---|
7895 | FLUSH(9) |
---|
7896 | ip = 1 |
---|
7897 | ENDIF |
---|
7898 | ENDIF |
---|
7899 | |
---|
7900 | ! |
---|
7901 | !-- Albedo |
---|
7902 | IF ( surf_usm_v(l)%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
7903 | surf_usm_v(l)%albedo(:,m) = surface_params(ialbedo,ip) |
---|
7904 | ENDIF |
---|
7905 | !-- Albedo type is 0 (custom), others are replaced later |
---|
7906 | surf_usm_v(l)%albedo_type(:,m) = 0 |
---|
7907 | !-- Transmissivity of the windows |
---|
7908 | IF ( surf_usm_v(l)%transmissivity(m) < 0.0_wp ) THEN |
---|
7909 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7910 | ENDIF |
---|
7911 | ! |
---|
7912 | !-- emissivity of the wall |
---|
7913 | surf_usm_v(l)%emissivity(:,m) = surface_params(iemiss,ip) |
---|
7914 | ! |
---|
7915 | !-- heat conductivity lambda S between air and wall ( W m-2 K-1 ) |
---|
7916 | surf_usm_v(l)%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
7917 | surf_usm_v(l)%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
7918 | surf_usm_v(l)%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
7919 | ! |
---|
7920 | !-- roughness length |
---|
7921 | surf_usm_v(l)%z0(m) = surface_params(irough,ip) |
---|
7922 | surf_usm_v(l)%z0h(m) = surface_params(iroughh,ip) |
---|
7923 | surf_usm_v(l)%z0q(m) = surface_params(iroughh,ip) |
---|
7924 | ! |
---|
7925 | !-- Surface skin layer heat capacity (J m-2 K-1 ) |
---|
7926 | surf_usm_v(l)%c_surface(m) = surface_params(icsurf,ip) |
---|
7927 | surf_usm_v(l)%c_surface_window(m) = surface_params(icsurf,ip) |
---|
7928 | surf_usm_v(l)%c_surface_green(m) = surface_params(icsurf,ip) |
---|
7929 | ! |
---|
7930 | !-- wall material parameters: |
---|
7931 | !-- thickness of the wall (m) |
---|
7932 | !-- missing values are replaced by default value for category |
---|
7933 | IF ( surf_usm_v(l)%thickness_wall(m) <= 0.001_wp ) THEN |
---|
7934 | surf_usm_v(l)%thickness_wall(m) = surface_params(ithick,ip) |
---|
7935 | ENDIF |
---|
7936 | IF ( surf_usm_v(l)%thickness_window(m) <= 0.001_wp ) THEN |
---|
7937 | surf_usm_v(l)%thickness_window(m) = surface_params(ithick,ip) |
---|
7938 | ENDIF |
---|
7939 | IF ( surf_usm_v(l)%thickness_green(m) <= 0.001_wp ) THEN |
---|
7940 | surf_usm_v(l)%thickness_green(m) = surface_params(ithick,ip) |
---|
7941 | ENDIF |
---|
7942 | ! |
---|
7943 | !-- volumetric heat capacity rho*C of the wall ( J m-3 K-1 ) |
---|
7944 | surf_usm_v(l)%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
7945 | surf_usm_v(l)%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
7946 | surf_usm_v(l)%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
7947 | ! |
---|
7948 | !-- thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
7949 | surf_usm_v(l)%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
7950 | surf_usm_v(l)%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
7951 | surf_usm_v(l)%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
7952 | |
---|
7953 | ENDDO |
---|
7954 | ENDDO |
---|
7955 | |
---|
7956 | ! |
---|
7957 | !-- Initialize wall layer thicknesses. Please note, this will be removed |
---|
7958 | !-- after migration to Palm input data standard. |
---|
7959 | DO k = nzb_wall, nzt_wall |
---|
7960 | zwn(k) = zwn_default(k) |
---|
7961 | zwn_green(k) = zwn_default_green(k) |
---|
7962 | zwn_window(k) = zwn_default_window(k) |
---|
7963 | ENDDO |
---|
7964 | ! |
---|
7965 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
7966 | DO m = 1, surf_usm_h%ns |
---|
7967 | surf_usm_h%zw(:,m) = zwn(:) * surf_usm_h%thickness_wall(m) |
---|
7968 | surf_usm_h%zw_green(:,m) = zwn_green(:) * surf_usm_h%thickness_green(m) |
---|
7969 | surf_usm_h%zw_window(:,m) = zwn_window(:) * surf_usm_h%thickness_window(m) |
---|
7970 | ENDDO |
---|
7971 | DO l = 0, 3 |
---|
7972 | DO m = 1, surf_usm_v(l)%ns |
---|
7973 | surf_usm_v(l)%zw(:,m) = zwn(:) * surf_usm_v(l)%thickness_wall(m) |
---|
7974 | surf_usm_v(l)%zw_green(:,m) = zwn_green(:) * surf_usm_v(l)%thickness_green(m) |
---|
7975 | surf_usm_v(l)%zw_window(:,m) = zwn_window(:) * surf_usm_v(l)%thickness_window(m) |
---|
7976 | ENDDO |
---|
7977 | ENDDO |
---|
7978 | |
---|
7979 | |
---|
7980 | WRITE(9,*) 'Urban surfaces read' |
---|
7981 | FLUSH(9) |
---|
7982 | |
---|
7983 | CALL location_message( ' types and parameters of urban surfaces read', .TRUE. ) |
---|
7984 | |
---|
7985 | END SUBROUTINE usm_read_urban_surface_types |
---|
7986 | |
---|
7987 | |
---|
7988 | !------------------------------------------------------------------------------! |
---|
7989 | ! Description: |
---|
7990 | ! ------------ |
---|
7991 | ! |
---|
7992 | !> This function advances through the list of local surfaces to find given |
---|
7993 | !> x, y, d, z coordinates |
---|
7994 | !------------------------------------------------------------------------------! |
---|
7995 | PURE FUNCTION find_surface( x, y, z, d ) result(isurfl) |
---|
7996 | |
---|
7997 | INTEGER(iwp), INTENT(in) :: x, y, z, d |
---|
7998 | INTEGER(iwp) :: isurfl |
---|
7999 | INTEGER(iwp) :: isx, isy, isz |
---|
8000 | |
---|
8001 | IF ( d == 0 ) THEN |
---|
8002 | DO isurfl = 1, surf_usm_h%ns |
---|
8003 | isx = surf_usm_h%i(isurfl) |
---|
8004 | isy = surf_usm_h%j(isurfl) |
---|
8005 | isz = surf_usm_h%k(isurfl) |
---|
8006 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
8007 | ENDDO |
---|
8008 | ELSE |
---|
8009 | DO isurfl = 1, surf_usm_v(d-1)%ns |
---|
8010 | isx = surf_usm_v(d-1)%i(isurfl) |
---|
8011 | isy = surf_usm_v(d-1)%j(isurfl) |
---|
8012 | isz = surf_usm_v(d-1)%k(isurfl) |
---|
8013 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
8014 | ENDDO |
---|
8015 | ENDIF |
---|
8016 | |
---|
8017 | !-- coordinate not found |
---|
8018 | isurfl = -1 |
---|
8019 | |
---|
8020 | END FUNCTION |
---|
8021 | |
---|
8022 | |
---|
8023 | !------------------------------------------------------------------------------! |
---|
8024 | ! Description: |
---|
8025 | ! ------------ |
---|
8026 | ! |
---|
8027 | !> This subroutine reads temperatures of respective material layers in walls, |
---|
8028 | !> roofs and ground from input files. Data in the input file must be in |
---|
8029 | !> standard order, i.e. horizontal surfaces first ordered by x, y and then |
---|
8030 | !> vertical surfaces ordered by x, y, direction, z |
---|
8031 | !------------------------------------------------------------------------------! |
---|
8032 | SUBROUTINE usm_read_wall_temperature |
---|
8033 | |
---|
8034 | INTEGER(iwp) :: i, j, k, d, ii, iline |
---|
8035 | INTEGER(iwp) :: isurfl |
---|
8036 | REAL(wp) :: rtsurf |
---|
8037 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: rtwall |
---|
8038 | |
---|
8039 | |
---|
8040 | |
---|
8041 | |
---|
8042 | DO ii = 0, io_blocks-1 |
---|
8043 | IF ( ii == io_group ) THEN |
---|
8044 | |
---|
8045 | !-- open wall temperature file |
---|
8046 | OPEN( 152, file='WALL_TEMPERATURE'//coupling_char, action='read', & |
---|
8047 | status='old', form='formatted', err=15 ) |
---|
8048 | |
---|
8049 | isurfl = 0 |
---|
8050 | iline = 1 |
---|
8051 | DO |
---|
8052 | rtwall = -9999.0_wp !< for incomplete lines |
---|
8053 | READ( 152, *, err=13, end=14 ) i, j, k, d, rtsurf, rtwall |
---|
8054 | |
---|
8055 | IF ( nxl <= i .and. i <= nxr .and. & |
---|
8056 | nys <= j .and. j <= nyn) THEN !< local processor |
---|
8057 | !-- identify surface id |
---|
8058 | isurfl = find_surface( i, j, k, d ) |
---|
8059 | IF ( isurfl == -1 ) THEN |
---|
8060 | WRITE(message_string, '(a,4i5,a,i5,a)') 'Coordinates (xyzd) ', i, j, k, d, & |
---|
8061 | ' on line ', iline, & |
---|
8062 | ' in file WALL_TEMPERATURE are either not present or out of standard order of surfaces.' |
---|
8063 | CALL message( 'usm_read_wall_temperature', 'PA0521', 1, 2, 0, 6, 0 ) |
---|
8064 | ENDIF |
---|
8065 | |
---|
8066 | !-- assign temperatures |
---|
8067 | IF ( d == 0 ) THEN |
---|
8068 | t_surf_wall_h(isurfl) = rtsurf |
---|
8069 | t_wall_h(:,isurfl) = rtwall(:) |
---|
8070 | t_window_h(:,isurfl) = rtwall(:) |
---|
8071 | t_green_h(:,isurfl) = rtwall(:) |
---|
8072 | ELSE |
---|
8073 | t_surf_wall_v(d-1)%t(isurfl) = rtsurf |
---|
8074 | t_wall_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
8075 | t_window_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
8076 | t_green_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
8077 | ENDIF |
---|
8078 | ENDIF |
---|
8079 | |
---|
8080 | iline = iline + 1 |
---|
8081 | CYCLE |
---|
8082 | 13 WRITE(message_string, '(a,i5,a)') 'Error reading line ', iline, & |
---|
8083 | ' in file WALL_TEMPERATURE.' |
---|
8084 | CALL message( 'usm_read_wall_temperature', 'PA0522', 1, 2, 0, 6, 0 ) |
---|
8085 | ENDDO |
---|
8086 | 14 CLOSE(152) |
---|
8087 | CYCLE |
---|
8088 | 15 message_string = 'file WALL_TEMPERATURE'//TRIM(coupling_char)//' does not exist' |
---|
8089 | CALL message( 'usm_read_wall_temperature', 'PA0523', 1, 2, 0, 6, 0 ) |
---|
8090 | ENDIF |
---|
8091 | #if defined( __parallel ) |
---|
8092 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
8093 | #endif |
---|
8094 | ENDDO |
---|
8095 | |
---|
8096 | CALL location_message( ' wall layer temperatures read', .TRUE. ) |
---|
8097 | |
---|
8098 | END SUBROUTINE usm_read_wall_temperature |
---|
8099 | |
---|
8100 | |
---|
8101 | |
---|
8102 | !------------------------------------------------------------------------------! |
---|
8103 | ! Description: |
---|
8104 | ! ------------ |
---|
8105 | !> Solver for the energy balance at the ground/roof/wall surface. |
---|
8106 | !> It follows basic ideas and structure of lsm_energy_balance |
---|
8107 | !> with many simplifications and adjustments. |
---|
8108 | !> TODO better description |
---|
8109 | !------------------------------------------------------------------------------! |
---|
8110 | SUBROUTINE usm_surface_energy_balance( spinup ) |
---|
8111 | |
---|
8112 | |
---|
8113 | IMPLICIT NONE |
---|
8114 | |
---|
8115 | INTEGER(iwp) :: i, j, k, l, m !< running indices |
---|
8116 | |
---|
8117 | INTEGER(iwp) :: i_off !< offset to determine index of surface element, seen from atmospheric grid point, for x |
---|
8118 | INTEGER(iwp) :: j_off !< offset to determine index of surface element, seen from atmospheric grid point, for y |
---|
8119 | INTEGER(iwp) :: k_off !< offset to determine index of surface element, seen from atmospheric grid point, for z |
---|
8120 | |
---|
8121 | LOGICAL :: spinup !true during spinup |
---|
8122 | |
---|
8123 | REAL(wp) :: stend_wall !< surface tendency |
---|
8124 | |
---|
8125 | REAL(wp) :: stend_window !< surface tendency |
---|
8126 | REAL(wp) :: stend_green !< surface tendency |
---|
8127 | REAL(wp) :: coef_1 !< first coeficient for prognostic equation |
---|
8128 | REAL(wp) :: coef_window_1 !< first coeficient for prognostic window equation |
---|
8129 | REAL(wp) :: coef_green_1 !< first coeficient for prognostic green wall equation |
---|
8130 | REAL(wp) :: coef_2 !< second coeficient for prognostic equation |
---|
8131 | REAL(wp) :: coef_window_2 !< second coeficient for prognostic window equation |
---|
8132 | REAL(wp) :: coef_green_2 !< second coeficient for prognostic green wall equation |
---|
8133 | REAL(wp) :: rho_cp !< rho_wall_surface * c_p |
---|
8134 | REAL(wp) :: f_shf !< factor for shf_eb |
---|
8135 | REAL(wp) :: f_shf_window !< factor for shf_eb window |
---|
8136 | REAL(wp) :: f_shf_green !< factor for shf_eb green wall |
---|
8137 | REAL(wp) :: lambda_surface !< current value of lambda_surface (heat conductivity between air and wall) |
---|
8138 | REAL(wp) :: lambda_surface_window !< current value of lambda_surface (heat conductivity between air and window) |
---|
8139 | REAL(wp) :: lambda_surface_green !< current value of lambda_surface (heat conductivity between air and greeb wall) |
---|
8140 | |
---|
8141 | REAL(wp) :: dtime !< simulated time of day (in UTC) |
---|
8142 | INTEGER(iwp) :: dhour !< simulated hour of day (in UTC) |
---|
8143 | REAL(wp) :: acoef !< actual coefficient of diurnal profile of anthropogenic heat |
---|
8144 | REAL(wp) :: f1, & !< resistance correction term 1 |
---|
8145 | f2, & !< resistance correction term 2 |
---|
8146 | f3, & !< resistance correction term 3 |
---|
8147 | e, & !< water vapour pressure |
---|
8148 | e_s, & !< water vapour saturation pressure |
---|
8149 | e_s_dt, & !< derivate of e_s with respect to T |
---|
8150 | tend, & !< tendency |
---|
8151 | dq_s_dt, & !< derivate of q_s with respect to T |
---|
8152 | f_qsws, & !< factor for qsws |
---|
8153 | f_qsws_veg, & !< factor for qsws_veg |
---|
8154 | f_qsws_liq, & !< factor for qsws_liq |
---|
8155 | m_liq_max, & !< maxmimum value of the liq. water reservoir |
---|
8156 | qv1, & !< specific humidity at first grid level |
---|
8157 | m_max_depth = 0.0002_wp, & ! Maximum capacity of the water reservoir (m) |
---|
8158 | rho_lv, & |
---|
8159 | drho_l_lv, & |
---|
8160 | q_s |
---|
8161 | |
---|
8162 | ! |
---|
8163 | !-- Index offset of surface element point with respect to adjoining |
---|
8164 | !-- atmospheric grid point |
---|
8165 | k_off = surf_usm_h%koff |
---|
8166 | j_off = surf_usm_h%joff |
---|
8167 | i_off = surf_usm_h%ioff |
---|
8168 | |
---|
8169 | ! |
---|
8170 | !-- First, treat horizontal surface elements |
---|
8171 | DO m = 1, surf_usm_h%ns |
---|
8172 | ! |
---|
8173 | !-- Get indices of respective grid point |
---|
8174 | i = surf_usm_h%i(m) |
---|
8175 | j = surf_usm_h%j(m) |
---|
8176 | k = surf_usm_h%k(m) |
---|
8177 | ! |
---|
8178 | !-- TODO - how to calculate lambda_surface for horizontal surfaces |
---|
8179 | !-- (lambda_surface is set according to stratification in land surface model) |
---|
8180 | !-- MS: ??? |
---|
8181 | IF ( surf_usm_h%ol(m) >= 0.0_wp ) THEN |
---|
8182 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
8183 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
8184 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
8185 | ELSE |
---|
8186 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
8187 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
8188 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
8189 | ENDIF |
---|
8190 | #if ! defined( __nopointer ) |
---|
8191 | ! pt1 = pt(k,j,i) |
---|
8192 | IF ( humidity ) THEN |
---|
8193 | qv1 = q(k,j,i) |
---|
8194 | ELSE |
---|
8195 | qv1 = 0.0_wp |
---|
8196 | ENDIF |
---|
8197 | ! |
---|
8198 | !-- calculate rho * c_p coefficient at surface layer |
---|
8199 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_h%pt1(m) * exner(k) ) |
---|
8200 | |
---|
8201 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
8202 | ! |
---|
8203 | !-- Calculate frequently used parameters |
---|
8204 | rho_lv = rho_cp / c_p * l_v |
---|
8205 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
8206 | endif |
---|
8207 | #endif |
---|
8208 | ! |
---|
8209 | !-- Calculate aerodyamic resistance. |
---|
8210 | !-- Calculation for horizontal surfaces follows LSM formulation |
---|
8211 | !-- pt, us, ts are not available for the prognostic time step, |
---|
8212 | !-- data from the last time step is used here. |
---|
8213 | |
---|
8214 | !-- Workaround: use single r_a as stability is only treated for the |
---|
8215 | !-- average temperature |
---|
8216 | surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /& |
---|
8217 | ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
8218 | surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m) |
---|
8219 | surf_usm_h%r_a_green(m) = surf_usm_h%r_a(m) |
---|
8220 | |
---|
8221 | ! r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exner(k) ) / & |
---|
8222 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
8223 | ! r_a_window = ( surf_usm_h%pt1(m) - t_surf_window_h(m) / exner(k) ) / & |
---|
8224 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
8225 | ! r_a_green = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
8226 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
8227 | |
---|
8228 | !-- Make sure that the resistance does not drop to zero |
---|
8229 | IF ( surf_usm_h%r_a(m) < 1.0_wp ) & |
---|
8230 | surf_usm_h%r_a(m) = 1.0_wp |
---|
8231 | IF ( surf_usm_h%r_a_green(m) < 1.0_wp ) & |
---|
8232 | surf_usm_h%r_a_green(m) = 1.0_wp |
---|
8233 | IF ( surf_usm_h%r_a_window(m) < 1.0_wp ) & |
---|
8234 | surf_usm_h%r_a_window(m) = 1.0_wp |
---|
8235 | |
---|
8236 | ! |
---|
8237 | !-- Make sure that the resistacne does not exceed a maxmium value in case |
---|
8238 | !-- of zero velocities |
---|
8239 | IF ( surf_usm_h%r_a(m) > 300.0_wp ) & |
---|
8240 | surf_usm_h%r_a(m) = 300.0_wp |
---|
8241 | IF ( surf_usm_h%r_a_green(m) > 300.0_wp ) & |
---|
8242 | surf_usm_h%r_a_green(m) = 300.0_wp |
---|
8243 | IF ( surf_usm_h%r_a_window(m) > 300.0_wp ) & |
---|
8244 | surf_usm_h%r_a_window(m) = 300.0_wp |
---|
8245 | |
---|
8246 | |
---|
8247 | !-- factor for shf_eb |
---|
8248 | f_shf = rho_cp / surf_usm_h%r_a(m) |
---|
8249 | f_shf_window = rho_cp / surf_usm_h%r_a_window(m) |
---|
8250 | f_shf_green = rho_cp / surf_usm_h%r_a_green(m) |
---|
8251 | |
---|
8252 | !*************************************************************************************** |
---|
8253 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
8254 | !-- Adapted from LSM: |
---|
8255 | !-- Second step: calculate canopy resistance r_canopy |
---|
8256 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
8257 | |
---|
8258 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
8259 | !-- night) |
---|
8260 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_h%rad_sw_in(m) + 0.05_wp ) / & |
---|
8261 | (0.81_wp * (0.004_wp * surf_usm_h%rad_sw_in(m) & |
---|
8262 | + 1.0_wp)) ) |
---|
8263 | ! |
---|
8264 | !-- f2: correction for soil moisture availability to plants (the |
---|
8265 | !-- integrated soil moisture must thus be considered here) |
---|
8266 | !-- f2 = 0 for very dry soils |
---|
8267 | m_total = 0.0_wp |
---|
8268 | DO k = nzb_wall, nzt_wall+1 |
---|
8269 | m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
8270 | * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
8271 | ENDDO |
---|
8272 | |
---|
8273 | IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
8274 | f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
8275 | ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
8276 | f2 = 1.0_wp |
---|
8277 | ELSE |
---|
8278 | f2 = 1.0E-20_wp |
---|
8279 | ENDIF |
---|
8280 | |
---|
8281 | ! |
---|
8282 | !-- Calculate water vapour pressure at saturation |
---|
8283 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_h(m) & |
---|
8284 | - 273.16_wp ) / ( t_surf_green_h(m) - 35.86_wp ) ) |
---|
8285 | ! |
---|
8286 | !-- f3: correction for vapour pressure deficit |
---|
8287 | IF ( surf_usm_h%g_d(m) /= 0.0_wp ) THEN |
---|
8288 | ! |
---|
8289 | !-- Calculate vapour pressure |
---|
8290 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
8291 | f3 = EXP ( - surf_usm_h%g_d(m) * (e_s - e) ) |
---|
8292 | ELSE |
---|
8293 | f3 = 1.0_wp |
---|
8294 | ENDIF |
---|
8295 | |
---|
8296 | ! |
---|
8297 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
8298 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
8299 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
8300 | surf_usm_h%r_canopy(m) = surf_usm_h%r_canopy_min(m) / & |
---|
8301 | ( surf_usm_h%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
8302 | |
---|
8303 | ! |
---|
8304 | !-- Calculate the maximum possible liquid water amount on plants and |
---|
8305 | !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
8306 | !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
8307 | !-- liquid water fraction for paved surfaces is calculated after |
---|
8308 | !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
8309 | !-- vegetated surfaces and bare soils. |
---|
8310 | m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
8311 | surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
8312 | ! |
---|
8313 | !-- Calculate saturation specific humidity |
---|
8314 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
8315 | ! |
---|
8316 | !-- In case of dewfall, set evapotranspiration to zero |
---|
8317 | !-- All super-saturated water is then removed from the air |
---|
8318 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
8319 | surf_usm_h%r_canopy(m) = 0.0_wp |
---|
8320 | ENDIF |
---|
8321 | |
---|
8322 | ! |
---|
8323 | !-- Calculate coefficients for the total evapotranspiration |
---|
8324 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
8325 | !-- For pavements, only evaporation of liquid water is possible. |
---|
8326 | f_qsws_veg = rho_lv * & |
---|
8327 | ( 1.0_wp - surf_usm_h%c_liq(m) ) / & |
---|
8328 | ( surf_usm_h%r_a_green(m) + surf_usm_h%r_canopy(m) ) |
---|
8329 | f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
8330 | surf_usm_h%r_a_green(m) |
---|
8331 | |
---|
8332 | f_qsws = f_qsws_veg + f_qsws_liq |
---|
8333 | ! |
---|
8334 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
8335 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_h(m) - 35.86_wp) - & |
---|
8336 | 17.269_wp*( t_surf_green_h(m) - 273.16_wp) & |
---|
8337 | / ( t_surf_green_h(m) - 35.86_wp)**2 ) |
---|
8338 | |
---|
8339 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
8340 | endif |
---|
8341 | !*********************************************************************************** |
---|
8342 | !-- add LW up so that it can be removed in prognostic equation |
---|
8343 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_sw_in(m) - & |
---|
8344 | surf_usm_h%rad_sw_out(m) + & |
---|
8345 | surf_usm_h%rad_lw_in(m) - & |
---|
8346 | surf_usm_h%rad_lw_out(m) |
---|
8347 | |
---|
8348 | !-- numerator of the prognostic equation |
---|
8349 | !-- Todo: Adjust to tile approach. So far, emissivity for wall (element 0) |
---|
8350 | !-- is used |
---|
8351 | coef_1 = surf_usm_h%rad_net_l(m) + & |
---|
8352 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
8353 | sigma_sb * t_surf_wall_h(m) ** 4 + & |
---|
8354 | f_shf * surf_usm_h%pt1(m) + & |
---|
8355 | lambda_surface * t_wall_h(nzb_wall,m) |
---|
8356 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
8357 | coef_window_1 = surf_usm_h%rad_net_l(m) + & |
---|
8358 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_wat_win,m) & |
---|
8359 | * sigma_sb * t_surf_window_h(m) ** 4 + & |
---|
8360 | f_shf_window * surf_usm_h%pt1(m) + & |
---|
8361 | lambda_surface_window * t_window_h(nzb_wall,m) |
---|
8362 | endif |
---|
8363 | IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
8364 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
8365 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8366 | t_surf_green_h(m) ** 4 + & |
---|
8367 | f_shf_green * surf_usm_h%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
8368 | + dq_s_dt * t_surf_green_h(m) ) & |
---|
8369 | +lambda_surface_green * t_green_h(nzb_wall,m) |
---|
8370 | ELSE |
---|
8371 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
8372 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) *& |
---|
8373 | sigma_sb * t_surf_green_h(m) ** 4 + & |
---|
8374 | f_shf_green * surf_usm_h%pt1(m) + & |
---|
8375 | lambda_surface_green * t_green_h(nzb_wall,m) |
---|
8376 | ENDIF |
---|
8377 | |
---|
8378 | !-- denominator of the prognostic equation |
---|
8379 | coef_2 = 4.0_wp * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
8380 | sigma_sb * t_surf_wall_h(m) ** 3 & |
---|
8381 | + lambda_surface + f_shf / exner(k) |
---|
8382 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
8383 | coef_window_2 = 4.0_wp * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
8384 | sigma_sb * t_surf_window_h(m) ** 3 & |
---|
8385 | + lambda_surface_window + f_shf_window / exner(k) |
---|
8386 | endif |
---|
8387 | IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
8388 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8389 | t_surf_green_h(m) ** 3 + f_qsws * dq_s_dt & |
---|
8390 | + lambda_surface_green + f_shf_green / exner(k) |
---|
8391 | ELSE |
---|
8392 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8393 | t_surf_green_h(m) ** 3 & |
---|
8394 | + lambda_surface_green + f_shf_green / exner(k) |
---|
8395 | ENDIF |
---|
8396 | |
---|
8397 | !-- implicit solution when the surface layer has no heat capacity, |
---|
8398 | !-- otherwise use RK3 scheme. |
---|
8399 | t_surf_wall_h_p(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
8400 | surf_usm_h%c_surface(m) * t_surf_wall_h(m) ) / & |
---|
8401 | ( surf_usm_h%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
8402 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
8403 | t_surf_window_h_p(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
8404 | surf_usm_h%c_surface_window(m) * t_surf_window_h(m) ) / & |
---|
8405 | ( surf_usm_h%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
8406 | endif |
---|
8407 | t_surf_green_h_p(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
8408 | surf_usm_h%c_surface_green(m) * t_surf_green_h(m) ) / & |
---|
8409 | ( surf_usm_h%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
8410 | |
---|
8411 | !-- add RK3 term |
---|
8412 | t_surf_wall_h_p(m) = t_surf_wall_h_p(m) + dt_3d * tsc(3) * & |
---|
8413 | surf_usm_h%tt_surface_wall_m(m) |
---|
8414 | |
---|
8415 | t_surf_window_h_p(m) = t_surf_window_h_p(m) + dt_3d * tsc(3) * & |
---|
8416 | surf_usm_h%tt_surface_window_m(m) |
---|
8417 | |
---|
8418 | t_surf_green_h_p(m) = t_surf_green_h_p(m) + dt_3d * tsc(3) * & |
---|
8419 | surf_usm_h%tt_surface_green_m(m) |
---|
8420 | ! |
---|
8421 | !-- Store surface temperature on pt_surface. Further, in case humidity is used |
---|
8422 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
8423 | !-- assumed to be the surface temperature. |
---|
8424 | surf_usm_h%pt_surface(m) = ( surf_usm_h%frac(ind_veg_wall,m) * t_surf_wall_h_p(m) & |
---|
8425 | + surf_usm_h%frac(ind_wat_win,m) * t_surf_window_h_p(m) & |
---|
8426 | + surf_usm_h%frac(ind_pav_green,m) * t_surf_green_h_p(m) ) & |
---|
8427 | / exner(k) |
---|
8428 | |
---|
8429 | IF ( humidity ) surf_usm_h%vpt_surface(m) = & |
---|
8430 | surf_usm_h%pt_surface(m) |
---|
8431 | |
---|
8432 | !-- calculate true tendency |
---|
8433 | stend_wall = ( t_surf_wall_h_p(m) - t_surf_wall_h(m) - dt_3d * tsc(3) * & |
---|
8434 | surf_usm_h%tt_surface_wall_m(m)) / ( dt_3d * tsc(2) ) |
---|
8435 | stend_window = ( t_surf_window_h_p(m) - t_surf_window_h(m) - dt_3d * tsc(3) * & |
---|
8436 | surf_usm_h%tt_surface_window_m(m)) / ( dt_3d * tsc(2) ) |
---|
8437 | stend_green = ( t_surf_green_h_p(m) - t_surf_green_h(m) - dt_3d * tsc(3) * & |
---|
8438 | surf_usm_h%tt_surface_green_m(m)) / ( dt_3d * tsc(2) ) |
---|
8439 | |
---|
8440 | !-- calculate t_surf tendencies for the next Runge-Kutta step |
---|
8441 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
8442 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
8443 | surf_usm_h%tt_surface_wall_m(m) = stend_wall |
---|
8444 | surf_usm_h%tt_surface_window_m(m) = stend_window |
---|
8445 | surf_usm_h%tt_surface_green_m(m) = stend_green |
---|
8446 | ELSEIF ( intermediate_timestep_count < & |
---|
8447 | intermediate_timestep_count_max ) THEN |
---|
8448 | surf_usm_h%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
8449 | 5.3125_wp * surf_usm_h%tt_surface_wall_m(m) |
---|
8450 | surf_usm_h%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
8451 | 5.3125_wp * surf_usm_h%tt_surface_window_m(m) |
---|
8452 | surf_usm_h%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
8453 | 5.3125_wp * surf_usm_h%tt_surface_green_m(m) |
---|
8454 | ENDIF |
---|
8455 | ENDIF |
---|
8456 | |
---|
8457 | !-- in case of fast changes in the skin temperature, it is required to |
---|
8458 | !-- update the radiative fluxes in order to keep the solution stable |
---|
8459 | IF ( ( ( ABS( t_surf_wall_h_p(m) - t_surf_wall_h(m) ) > 1.0_wp ) .OR. & |
---|
8460 | ( ABS( t_surf_green_h_p(m) - t_surf_green_h(m) ) > 1.0_wp ) .OR. & |
---|
8461 | ( ABS( t_surf_window_h_p(m) - t_surf_window_h(m) ) > 1.0_wp ) ) & |
---|
8462 | .AND. unscheduled_radiation_calls ) THEN |
---|
8463 | force_radiation_call_l = .TRUE. |
---|
8464 | ENDIF |
---|
8465 | ! |
---|
8466 | !-- calculate fluxes |
---|
8467 | !-- rad_net_l is never used! |
---|
8468 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_net_l(m) + & |
---|
8469 | surf_usm_h%frac(ind_veg_wall,m) * & |
---|
8470 | sigma_sb * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
8471 | ( t_surf_wall_h_p(m)**4 - t_surf_wall_h(m)**4 ) & |
---|
8472 | + surf_usm_h%frac(ind_wat_win,m) * & |
---|
8473 | sigma_sb * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
8474 | ( t_surf_window_h_p(m)**4 - t_surf_window_h(m)**4 ) & |
---|
8475 | + surf_usm_h%frac(ind_pav_green,m) * & |
---|
8476 | sigma_sb * surf_usm_h%emissivity(ind_pav_green,m) * & |
---|
8477 | ( t_surf_green_h_p(m)**4 - t_surf_green_h(m)**4 ) |
---|
8478 | |
---|
8479 | surf_usm_h%wghf_eb(m) = lambda_surface * & |
---|
8480 | ( t_surf_wall_h_p(m) - t_wall_h(nzb_wall,m) ) |
---|
8481 | surf_usm_h%wghf_eb_green(m) = lambda_surface_green * & |
---|
8482 | ( t_surf_green_h_p(m) - t_green_h(nzb_wall,m) ) |
---|
8483 | surf_usm_h%wghf_eb_window(m) = lambda_surface_window * & |
---|
8484 | ( t_surf_window_h_p(m) - t_window_h(nzb_wall,m) ) |
---|
8485 | |
---|
8486 | ! |
---|
8487 | !-- ground/wall/roof surface heat flux |
---|
8488 | surf_usm_h%wshf_eb(m) = - f_shf * ( surf_usm_h%pt1(m) - t_surf_wall_h_p(m) / exner(k) ) * & |
---|
8489 | surf_usm_h%frac(ind_veg_wall,m) & |
---|
8490 | - f_shf_window * ( surf_usm_h%pt1(m) - t_surf_window_h_p(m) / exner(k) ) * & |
---|
8491 | surf_usm_h%frac(ind_wat_win,m) & |
---|
8492 | - f_shf_green * ( surf_usm_h%pt1(m) - t_surf_green_h_p(m) / exner(k) ) * & |
---|
8493 | surf_usm_h%frac(ind_pav_green,m) |
---|
8494 | ! |
---|
8495 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
8496 | !-- diffusion_s, surface_layer_fluxes,... |
---|
8497 | surf_usm_h%shf(m) = surf_usm_h%wshf_eb(m) / c_p |
---|
8498 | |
---|
8499 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
8500 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
8501 | |
---|
8502 | ! print*, "tsurfroofgreen",m,t_surf_green_h_p(m),i,j,k,surf_usm_h%wghf_eb_green(m),surf_usm_h%rad_net_l(m),& |
---|
8503 | ! surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt |
---|
8504 | ! print*, "B",surf_usm_h%rad_sw_in(m),surf_usm_h%rad_sw_out(m),surf_usm_h%rad_lw_in(m),surf_usm_h%rad_lw_out(m) |
---|
8505 | ! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k |
---|
8506 | ! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m) |
---|
8507 | if ((t_surf_green_h_p(m).gt.370.0_wp).or.(t_surf_green_h_p(m).lt.250.0_wp)) then |
---|
8508 | print*, t_surf_green_h_p(m),m,i,j,k |
---|
8509 | stop |
---|
8510 | endif |
---|
8511 | |
---|
8512 | IF ( humidity ) THEN |
---|
8513 | surf_usm_h%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
8514 | * t_surf_green_h(m) - dq_s_dt * & |
---|
8515 | t_surf_green_h_p(m) ) |
---|
8516 | |
---|
8517 | surf_usm_h%qsws(m) = surf_usm_h%qsws_eb(m) / rho_lv |
---|
8518 | |
---|
8519 | surf_usm_h%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
8520 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
8521 | * t_surf_green_h_p(m) ) |
---|
8522 | |
---|
8523 | surf_usm_h%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
8524 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
8525 | * t_surf_green_h_p(m) ) |
---|
8526 | ENDIF |
---|
8527 | |
---|
8528 | ! |
---|
8529 | !-- Calculate the true surface resistance |
---|
8530 | IF ( .NOT. humidity ) THEN |
---|
8531 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
8532 | ELSE |
---|
8533 | surf_usm_h%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
8534 | * t_surf_green_h(m) - dq_s_dt * & |
---|
8535 | t_surf_green_h_p(m) ) / & |
---|
8536 | (surf_usm_h%qsws(m) + 1.0E-20) - surf_usm_h%r_a_green(m) |
---|
8537 | ENDIF |
---|
8538 | |
---|
8539 | ! |
---|
8540 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
8541 | !-- evaporation of liquid water |
---|
8542 | IF ( humidity ) THEN |
---|
8543 | ! |
---|
8544 | !-- If precipitation is activated, add rain water to qsws_liq |
---|
8545 | !-- and qsws_soil according the the vegetation coverage. |
---|
8546 | !-- precipitation_rate is given in mm. |
---|
8547 | IF ( precipitation ) THEN |
---|
8548 | |
---|
8549 | ! |
---|
8550 | !-- Add precipitation to liquid water reservoir, if possible. |
---|
8551 | !-- Otherwise, add the water to soil. In case of |
---|
8552 | !-- pavements, the exceeding water amount is implicitely removed |
---|
8553 | !-- as runoff as qsws_soil is then not used in the soil model |
---|
8554 | IF ( m_liq_usm_h%var_usm_1d(m) /= m_liq_max ) THEN |
---|
8555 | surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) & |
---|
8556 | + surf_usm_h%frac(ind_pav_green,m) * prr(k+k_off,j+j_off,i+i_off)& |
---|
8557 | * hyrho(k+k_off) & |
---|
8558 | * 0.001_wp * rho_l * l_v |
---|
8559 | ENDIF |
---|
8560 | |
---|
8561 | ENDIF |
---|
8562 | |
---|
8563 | ! |
---|
8564 | !-- If the air is saturated, check the reservoir water level |
---|
8565 | IF ( surf_usm_h%qsws(m) < 0.0_wp ) THEN |
---|
8566 | ! |
---|
8567 | !-- Check if reservoir is full (avoid values > m_liq_max) |
---|
8568 | !-- In that case, qsws_liq goes to qsws_soil. In this |
---|
8569 | !-- case qsws_veg is zero anyway (because c_liq = 1), |
---|
8570 | !-- so that tend is zero and no further check is needed |
---|
8571 | IF ( m_liq_usm_h%var_usm_1d(m) == m_liq_max ) THEN |
---|
8572 | ! surf_usm_h%qsws_soil(m) = surf_usm_h%qsws_soil(m) + surf_usm_h%qsws_liq(m) |
---|
8573 | |
---|
8574 | surf_usm_h%qsws_liq(m) = 0.0_wp |
---|
8575 | ENDIF |
---|
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_h%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_h%qsws_veg(m) = 0.0_wp |
---|
8584 | ENDIF |
---|
8585 | ENDIF |
---|
8586 | |
---|
8587 | surf_usm_h%qsws(m) = surf_usm_h%qsws(m) / l_v |
---|
8588 | |
---|
8589 | tend = - surf_usm_h%qsws_liq(m) * drho_l_lv |
---|
8590 | m_liq_usm_h_p%var_usm_1d(m) = m_liq_usm_h%var_usm_1d(m) + dt_3d * & |
---|
8591 | ( tsc(2) * tend + & |
---|
8592 | tsc(3) * tm_liq_usm_h_m%var_usm_1d(m) ) |
---|
8593 | ! |
---|
8594 | !-- Check if reservoir is overfull -> reduce to maximum |
---|
8595 | !-- (conservation of water is violated here) |
---|
8596 | m_liq_usm_h_p%var_usm_1d(m) = MIN( m_liq_usm_h_p%var_usm_1d(m),m_liq_max ) |
---|
8597 | |
---|
8598 | ! |
---|
8599 | !-- Check if reservoir is empty (avoid values < 0.0) |
---|
8600 | !-- (conservation of water is violated here) |
---|
8601 | m_liq_usm_h_p%var_usm_1d(m) = MAX( m_liq_usm_h_p%var_usm_1d(m), 0.0_wp ) |
---|
8602 | ! |
---|
8603 | !-- Calculate m_liq tendencies for the next Runge-Kutta step |
---|
8604 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
8605 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
8606 | tm_liq_usm_h_m%var_usm_1d(m) = tend |
---|
8607 | ELSEIF ( intermediate_timestep_count < & |
---|
8608 | intermediate_timestep_count_max ) THEN |
---|
8609 | tm_liq_usm_h_m%var_usm_1d(m) = -9.5625_wp * tend + & |
---|
8610 | 5.3125_wp * tm_liq_usm_h_m%var_usm_1d(m) |
---|
8611 | ENDIF |
---|
8612 | ENDIF |
---|
8613 | |
---|
8614 | ENDIF |
---|
8615 | else |
---|
8616 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
8617 | endif |
---|
8618 | |
---|
8619 | ENDDO |
---|
8620 | ! |
---|
8621 | !-- Now, treat vertical surface elements |
---|
8622 | DO l = 0, 3 |
---|
8623 | DO m = 1, surf_usm_v(l)%ns |
---|
8624 | ! |
---|
8625 | !-- Get indices of respective grid point |
---|
8626 | i = surf_usm_v(l)%i(m) |
---|
8627 | j = surf_usm_v(l)%j(m) |
---|
8628 | k = surf_usm_v(l)%k(m) |
---|
8629 | |
---|
8630 | ! |
---|
8631 | !-- TODO - how to calculate lambda_surface for horizontal (??? do you mean verical ???) surfaces |
---|
8632 | !-- (lambda_surface is set according to stratification in land surface model). |
---|
8633 | !-- Please note, for vertical surfaces no ol is defined, since |
---|
8634 | !-- stratification is not considered in this case. |
---|
8635 | lambda_surface = surf_usm_v(l)%lambda_surf(m) |
---|
8636 | lambda_surface_window = surf_usm_v(l)%lambda_surf_window(m) |
---|
8637 | lambda_surface_green = surf_usm_v(l)%lambda_surf_green(m) |
---|
8638 | |
---|
8639 | #if ! defined( __nopointer ) |
---|
8640 | ! pt1 = pt(k,j,i) |
---|
8641 | IF ( humidity ) THEN |
---|
8642 | qv1 = q(k,j,i) |
---|
8643 | ELSE |
---|
8644 | qv1 = 0.0_wp |
---|
8645 | ENDIF |
---|
8646 | ! |
---|
8647 | !-- calculate rho * c_p coefficient at wall layer |
---|
8648 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_v(l)%pt1(m) * exner(k) ) |
---|
8649 | |
---|
8650 | if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then |
---|
8651 | ! |
---|
8652 | !-- Calculate frequently used parameters |
---|
8653 | rho_lv = rho_cp / c_p * l_v |
---|
8654 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
8655 | endif |
---|
8656 | #endif |
---|
8657 | |
---|
8658 | !-- Calculation of r_a for vertical surfaces |
---|
8659 | !-- |
---|
8660 | !-- heat transfer coefficient for forced convection along vertical walls |
---|
8661 | !-- follows formulation in TUF3d model (Krayenhoff & Voogt, 2006) |
---|
8662 | !-- |
---|
8663 | !-- H = httc (Tsfc - Tair) |
---|
8664 | !-- httc = rw * (11.8 + 4.2 * Ueff) - 4.0 |
---|
8665 | !-- |
---|
8666 | !-- rw: wall patch roughness relative to 1.0 for concrete |
---|
8667 | !-- Ueff: effective wind speed |
---|
8668 | !-- - 4.0 is a reduction of Rowley et al (1930) formulation based on |
---|
8669 | !-- Cole and Sturrock (1977) |
---|
8670 | !-- |
---|
8671 | !-- Ucan: Canyon wind speed |
---|
8672 | !-- wstar: convective velocity |
---|
8673 | !-- Qs: surface heat flux |
---|
8674 | !-- zH: height of the convective layer |
---|
8675 | !-- wstar = (g/Tcan*Qs*zH)**(1./3.) |
---|
8676 | |
---|
8677 | !-- Effective velocity components must always |
---|
8678 | !-- be defined at scalar grid point. The wall normal component is |
---|
8679 | !-- obtained by simple linear interpolation. ( An alternative would |
---|
8680 | !-- be an logarithmic interpolation. ) |
---|
8681 | !-- Parameter roughness_concrete (default value = 0.001) is used |
---|
8682 | !-- to calculation of roughness relative to concrete |
---|
8683 | surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) / & |
---|
8684 | roughness_concrete * ( 11.8_wp + 4.2_wp * & |
---|
8685 | SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & |
---|
8686 | ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & |
---|
8687 | ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2, & |
---|
8688 | 0.01_wp ) ) & |
---|
8689 | ) - 4.0_wp ) |
---|
8690 | ! |
---|
8691 | !-- Limit aerodynamic resistance |
---|
8692 | IF ( surf_usm_v(l)%r_a(m) < 1.0_wp ) surf_usm_v(l)%r_a(m) = 1.0_wp |
---|
8693 | |
---|
8694 | |
---|
8695 | f_shf = rho_cp / surf_usm_v(l)%r_a(m) |
---|
8696 | f_shf_window = rho_cp / surf_usm_v(l)%r_a(m) |
---|
8697 | f_shf_green = rho_cp / surf_usm_v(l)%r_a(m) |
---|
8698 | |
---|
8699 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8700 | if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then |
---|
8701 | !-- Adapted from LSM: |
---|
8702 | !-- Second step: calculate canopy resistance r_canopy |
---|
8703 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
8704 | |
---|
8705 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
8706 | !-- night) |
---|
8707 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_v(l)%rad_sw_in(m) + 0.05_wp ) / & |
---|
8708 | (0.81_wp * (0.004_wp * surf_usm_v(l)%rad_sw_in(m) & |
---|
8709 | + 1.0_wp)) ) |
---|
8710 | ! |
---|
8711 | !-- f2: correction for soil moisture availability to plants (the |
---|
8712 | !-- integrated soil moisture must thus be considered here) |
---|
8713 | !-- f2 = 0 for very dry soils |
---|
8714 | |
---|
8715 | f2=1.0_wp |
---|
8716 | ! m_total = 0.0_wp |
---|
8717 | ! DO k = nzb_wall, nzt_wall+1 |
---|
8718 | ! m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
8719 | ! * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
8720 | ! ENDDO |
---|
8721 | ! |
---|
8722 | ! IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
8723 | ! f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
8724 | ! ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
8725 | ! f2 = 1.0_wp |
---|
8726 | ! ELSE |
---|
8727 | ! f2 = 1.0E-20_wp |
---|
8728 | ! ENDIF |
---|
8729 | |
---|
8730 | ! |
---|
8731 | !-- Calculate water vapour pressure at saturation |
---|
8732 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_v_p(l)%t(m) & |
---|
8733 | - 273.16_wp ) / ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) ) |
---|
8734 | ! |
---|
8735 | !-- f3: correction for vapour pressure deficit |
---|
8736 | IF ( surf_usm_v(l)%g_d(m) /= 0.0_wp ) THEN |
---|
8737 | ! |
---|
8738 | !-- Calculate vapour pressure |
---|
8739 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
8740 | f3 = EXP ( - surf_usm_v(l)%g_d(m) * (e_s - e) ) |
---|
8741 | ELSE |
---|
8742 | f3 = 1.0_wp |
---|
8743 | ENDIF |
---|
8744 | ! |
---|
8745 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
8746 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
8747 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
8748 | surf_usm_v(l)%r_canopy(m) = surf_usm_v(l)%r_canopy_min(m) / & |
---|
8749 | ( surf_usm_v(l)%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
8750 | |
---|
8751 | ! !-- Calculate the maximum possible liquid water amount on plants and |
---|
8752 | ! !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
8753 | ! !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
8754 | ! !-- liquid water fraction for paved surfaces is calculated after |
---|
8755 | ! !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
8756 | ! !-- vegetated surfaces and bare soils. |
---|
8757 | ! ! surf_usm_h%lai(m)=4.0_wp |
---|
8758 | ! m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
8759 | ! surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
8760 | ! |
---|
8761 | !-- Calculate saturation specific humidity |
---|
8762 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
8763 | ! |
---|
8764 | !-- In case of dewfall, set evapotranspiration to zero |
---|
8765 | !-- All super-saturated water is then removed from the air |
---|
8766 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
8767 | surf_usm_v(l)%r_canopy(m) = 0.0_wp |
---|
8768 | ENDIF |
---|
8769 | |
---|
8770 | ! |
---|
8771 | !-- Calculate coefficients for the total evapotranspiration |
---|
8772 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
8773 | !-- For pavements, only evaporation of liquid water is possible. |
---|
8774 | f_qsws_veg = rho_lv * & |
---|
8775 | ( 1.0_wp - 0.0_wp ) / & !surf_usm_h%c_liq(m) ) / & |
---|
8776 | ( surf_usm_v(l)%r_a(m) + surf_usm_v(l)%r_canopy(m) ) |
---|
8777 | ! f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
8778 | ! surf_usm_h%r_a_green(m) |
---|
8779 | |
---|
8780 | f_qsws = f_qsws_veg! + f_qsws_liq |
---|
8781 | ! |
---|
8782 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
8783 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_v_p(l)%t(m) - 35.86_wp) - & |
---|
8784 | 17.269_wp*( t_surf_green_v_p(l)%t(m) - 273.16_wp) & |
---|
8785 | / ( t_surf_green_v_p(l)%t(m) - 35.86_wp)**2 ) |
---|
8786 | |
---|
8787 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
8788 | endif |
---|
8789 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8790 | |
---|
8791 | !-- add LW up so that it can be removed in prognostic equation |
---|
8792 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%rad_sw_in(m) - & |
---|
8793 | surf_usm_v(l)%rad_sw_out(m) + & |
---|
8794 | surf_usm_v(l)%rad_lw_in(m) - & |
---|
8795 | surf_usm_v(l)%rad_lw_out(m) |
---|
8796 | |
---|
8797 | !-- numerator of the prognostic equation |
---|
8798 | coef_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
8799 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_veg_wall,m) * & |
---|
8800 | sigma_sb * t_surf_wall_v(l)%t(m) ** 4 + & |
---|
8801 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
8802 | lambda_surface * t_wall_v(l)%t(nzb_wall,m) |
---|
8803 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
8804 | coef_window_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
8805 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_wat_win,m) * & |
---|
8806 | sigma_sb * t_surf_window_v(l)%t(m) ** 4 + & |
---|
8807 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
8808 | lambda_surface_window * t_window_v(l)%t(nzb_wall,m) |
---|
8809 | endif |
---|
8810 | IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
8811 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
8812 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8813 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
8814 | f_shf * surf_usm_v(l)%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
8815 | + dq_s_dt * t_surf_green_v(l)%t(m) ) + & |
---|
8816 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
8817 | ELSE |
---|
8818 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
8819 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8820 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
8821 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
8822 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
8823 | ENDIF |
---|
8824 | |
---|
8825 | |
---|
8826 | !-- denominator of the prognostic equation |
---|
8827 | coef_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_veg_wall,m) * sigma_sb * & |
---|
8828 | t_surf_wall_v(l)%t(m) ** 3 & |
---|
8829 | + lambda_surface + f_shf / exner(k) |
---|
8830 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
8831 | coef_window_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_wat_win,m) * sigma_sb * & |
---|
8832 | t_surf_window_v(l)%t(m) ** 3 & |
---|
8833 | + lambda_surface_window + f_shf / exner(k) |
---|
8834 | endif |
---|
8835 | IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
8836 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8837 | t_surf_green_v(l)%t(m) ** 3 + f_qsws * dq_s_dt & |
---|
8838 | + lambda_surface_green + f_shf / exner(k) |
---|
8839 | ELSE |
---|
8840 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
8841 | t_surf_green_v(l)%t(m) ** 3 & |
---|
8842 | + lambda_surface_green + f_shf / exner(k) |
---|
8843 | ENDIF |
---|
8844 | |
---|
8845 | !-- implicit solution when the surface layer has no heat capacity, |
---|
8846 | !-- otherwise use RK3 scheme. |
---|
8847 | t_surf_wall_v_p(l)%t(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
8848 | surf_usm_v(l)%c_surface(m) * t_surf_wall_v(l)%t(m) ) / & |
---|
8849 | ( surf_usm_v(l)%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
8850 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
8851 | t_surf_window_v_p(l)%t(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
8852 | surf_usm_v(l)%c_surface_window(m) * t_surf_window_v(l)%t(m) ) / & |
---|
8853 | ( surf_usm_v(l)%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
8854 | endif |
---|
8855 | t_surf_green_v_p(l)%t(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
8856 | surf_usm_v(l)%c_surface_green(m) * t_surf_green_v(l)%t(m) ) / & |
---|
8857 | ( surf_usm_v(l)%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
8858 | |
---|
8859 | !-- add RK3 term |
---|
8860 | t_surf_wall_v_p(l)%t(m) = t_surf_wall_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
8861 | surf_usm_v(l)%tt_surface_wall_m(m) |
---|
8862 | t_surf_window_v_p(l)%t(m) = t_surf_window_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
8863 | surf_usm_v(l)%tt_surface_window_m(m) |
---|
8864 | t_surf_green_v_p(l)%t(m) = t_surf_green_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
8865 | surf_usm_v(l)%tt_surface_green_m(m) |
---|
8866 | ! |
---|
8867 | !-- Store surface temperature. Further, in case humidity is used |
---|
8868 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
8869 | !-- assumed to be the surface temperature. |
---|
8870 | surf_usm_v(l)%pt_surface(m) = ( surf_usm_v(l)%frac(ind_veg_wall,m) * t_surf_wall_v_p(l)%t(m) & |
---|
8871 | + surf_usm_v(l)%frac(ind_wat_win,m) * t_surf_window_v_p(l)%t(m) & |
---|
8872 | + surf_usm_v(l)%frac(ind_pav_green,m) * t_surf_green_v_p(l)%t(m) ) & |
---|
8873 | / exner(k) |
---|
8874 | |
---|
8875 | IF ( humidity ) surf_usm_v(l)%vpt_surface(m) = & |
---|
8876 | surf_usm_v(l)%pt_surface(m) |
---|
8877 | |
---|
8878 | !-- calculate true tendency |
---|
8879 | stend_wall = ( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
8880 | surf_usm_v(l)%tt_surface_wall_m(m) ) / ( dt_3d * tsc(2) ) |
---|
8881 | stend_window = ( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
8882 | surf_usm_v(l)%tt_surface_window_m(m) ) / ( dt_3d * tsc(2) ) |
---|
8883 | stend_green = ( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) - dt_3d * tsc(3) * & |
---|
8884 | surf_usm_v(l)%tt_surface_green_m(m) ) / ( dt_3d * tsc(2) ) |
---|
8885 | |
---|
8886 | !-- calculate t_surf_* tendencies for the next Runge-Kutta step |
---|
8887 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
8888 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
8889 | surf_usm_v(l)%tt_surface_wall_m(m) = stend_wall |
---|
8890 | surf_usm_v(l)%tt_surface_window_m(m) = stend_window |
---|
8891 | surf_usm_v(l)%tt_surface_green_m(m) = stend_green |
---|
8892 | ELSEIF ( intermediate_timestep_count < & |
---|
8893 | intermediate_timestep_count_max ) THEN |
---|
8894 | surf_usm_v(l)%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
8895 | 5.3125_wp * surf_usm_v(l)%tt_surface_wall_m(m) |
---|
8896 | surf_usm_v(l)%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
8897 | 5.3125_wp * surf_usm_v(l)%tt_surface_green_m(m) |
---|
8898 | surf_usm_v(l)%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
8899 | 5.3125_wp * surf_usm_v(l)%tt_surface_window_m(m) |
---|
8900 | ENDIF |
---|
8901 | ENDIF |
---|
8902 | |
---|
8903 | !-- in case of fast changes in the skin temperature, it is required to |
---|
8904 | !-- update the radiative fluxes in order to keep the solution stable |
---|
8905 | |
---|
8906 | IF ( ( ( ABS( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
8907 | ( ABS( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
8908 | ( ABS( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) ) > 1.0_wp ) ) & |
---|
8909 | .AND. unscheduled_radiation_calls ) THEN |
---|
8910 | force_radiation_call_l = .TRUE. |
---|
8911 | ENDIF |
---|
8912 | |
---|
8913 | !-- calculate fluxes |
---|
8914 | !-- prognostic rad_net_l is used just for output! |
---|
8915 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
8916 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
8917 | 3.0_wp * sigma_sb * & |
---|
8918 | t_surf_wall_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
8919 | t_surf_wall_v(l)%t(m)**3 * t_surf_wall_v_p(l)%t(m) ) & |
---|
8920 | + surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
8921 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
8922 | 3.0_wp * sigma_sb * & |
---|
8923 | t_surf_window_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
8924 | t_surf_window_v(l)%t(m)**3 * t_surf_window_v_p(l)%t(m) ) & |
---|
8925 | + surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
8926 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
8927 | 3.0_wp * sigma_sb * & |
---|
8928 | t_surf_green_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
8929 | t_surf_green_v(l)%t(m)**3 * t_surf_green_v_p(l)%t(m) ) |
---|
8930 | |
---|
8931 | surf_usm_v(l)%wghf_eb_window(m) = lambda_surface_window * & |
---|
8932 | ( t_surf_window_v_p(l)%t(m) - t_window_v(l)%t(nzb_wall,m) ) |
---|
8933 | surf_usm_v(l)%wghf_eb(m) = lambda_surface * & |
---|
8934 | ( t_surf_wall_v_p(l)%t(m) - t_wall_v(l)%t(nzb_wall,m) ) |
---|
8935 | surf_usm_v(l)%wghf_eb_green(m) = lambda_surface_green * & |
---|
8936 | ( t_surf_green_v_p(l)%t(m) - t_green_v(l)%t(nzb_wall,m) ) |
---|
8937 | |
---|
8938 | !-- ground/wall/roof surface heat flux |
---|
8939 | surf_usm_v(l)%wshf_eb(m) = & |
---|
8940 | - f_shf * ( surf_usm_v(l)%pt1(m) - & |
---|
8941 | t_surf_wall_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
8942 | - f_shf_window * ( surf_usm_v(l)%pt1(m) - & |
---|
8943 | t_surf_window_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_wat_win,m)& |
---|
8944 | - f_shf_green * ( surf_usm_v(l)%pt1(m) - & |
---|
8945 | t_surf_green_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_pav_green,m) |
---|
8946 | |
---|
8947 | ! |
---|
8948 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
8949 | !-- diffusion_s, surface_layer_fluxes,... |
---|
8950 | surf_usm_v(l)%shf(m) = surf_usm_v(l)%wshf_eb(m) / c_p |
---|
8951 | |
---|
8952 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8953 | if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then !111 |
---|
8954 | |
---|
8955 | ! print*, "tsurfroofgreen",m,t_surf_green_h_p(m),i,j,k,surf_usm_h%wghf_eb_green(m),surf_usm_h%rad_net_l(m),& |
---|
8956 | ! surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt |
---|
8957 | ! print*, "B",surf_usm_h%rad_sw_in(m),surf_usm_h%rad_sw_out(m),surf_usm_h%rad_lw_in(m),surf_usm_h%rad_lw_out(m) |
---|
8958 | ! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k |
---|
8959 | ! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m) |
---|
8960 | if ((t_surf_green_v_p(l)%t(m).gt.370.0_wp).or.(t_surf_green_v_p(l)%t(m).lt.250.0_wp)) then |
---|
8961 | print*, t_surf_green_v_p(l)%t(m),m,i,j,k |
---|
8962 | stop |
---|
8963 | endif |
---|
8964 | |
---|
8965 | IF ( humidity ) THEN |
---|
8966 | surf_usm_v(l)%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
8967 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
8968 | t_surf_green_v_p(l)%t(m) ) |
---|
8969 | |
---|
8970 | surf_usm_v(l)%qsws(m) = surf_usm_v(l)%qsws_eb(m) / rho_lv |
---|
8971 | |
---|
8972 | surf_usm_v(l)%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
8973 | + dq_s_dt * t_surf_green_v(l)%t(m) - dq_s_dt & |
---|
8974 | * t_surf_green_v_p(l)%t(m) ) |
---|
8975 | |
---|
8976 | ! surf_usm_h%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
8977 | ! + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
8978 | ! * t_surf_green_h_p(m) ) |
---|
8979 | ENDIF |
---|
8980 | |
---|
8981 | ! |
---|
8982 | !-- Calculate the true surface resistance |
---|
8983 | IF ( .NOT. humidity ) THEN |
---|
8984 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
8985 | ELSE |
---|
8986 | surf_usm_v(l)%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
8987 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
8988 | t_surf_green_v_p(l)%t(m) ) / & |
---|
8989 | (surf_usm_v(l)%qsws(m) + 1.0E-20) - surf_usm_v(l)%r_a(m) |
---|
8990 | ENDIF |
---|
8991 | |
---|
8992 | |
---|
8993 | ! |
---|
8994 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
8995 | !-- evaporation of liquid water |
---|
8996 | IF ( humidity ) THEN |
---|
8997 | ! |
---|
8998 | !-- If the air is saturated, check the reservoir water level |
---|
8999 | IF ( surf_usm_v(l)%qsws(m) < 0.0_wp ) THEN |
---|
9000 | |
---|
9001 | ! |
---|
9002 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
9003 | !-- let the water enter the liquid water reservoir as dew on the |
---|
9004 | !-- plant |
---|
9005 | IF ( surf_usm_v(l)%qsws_veg(m) < 0.0_wp ) THEN |
---|
9006 | ! surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) + surf_usm_h%qsws_veg(m) |
---|
9007 | surf_usm_v(l)%qsws_veg(m) = 0.0_wp |
---|
9008 | ENDIF |
---|
9009 | ENDIF |
---|
9010 | ENDIF |
---|
9011 | else |
---|
9012 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
9013 | endif !111 |
---|
9014 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
9015 | |
---|
9016 | |
---|
9017 | ENDDO |
---|
9018 | |
---|
9019 | ENDDO |
---|
9020 | ! |
---|
9021 | !-- Add-up anthropogenic heat, for now only at upward-facing surfaces |
---|
9022 | IF ( usm_anthropogenic_heat .AND. & |
---|
9023 | intermediate_timestep_count == intermediate_timestep_count_max ) THEN |
---|
9024 | !-- application of the additional anthropogenic heat sources |
---|
9025 | !-- we considere the traffic for now so all heat is absorbed |
---|
9026 | !-- to the first layer, generalization would be worth. |
---|
9027 | |
---|
9028 | !-- calculation of actual profile coefficient |
---|
9029 | !-- ??? check time_since_reference_point ??? |
---|
9030 | dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp) |
---|
9031 | dhour = INT(dtime/3600.0_wp) |
---|
9032 | DO i = nxl, nxr |
---|
9033 | DO j = nys, nyn |
---|
9034 | DO k = nzub, min(nzut,naheatlayers) |
---|
9035 | IF ( k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
9036 | !-- increase of pt in box i,j,k in time dt_3d |
---|
9037 | !-- given to anthropogenic heat aheat*acoef (W*m-2) |
---|
9038 | !-- linear interpolation of coeficient |
---|
9039 | acoef = (REAL(dhour+1,wp)-dtime/3600.0_wp)*aheatprof(k,dhour) + & |
---|
9040 | (dtime/3600.0_wp-REAL(dhour,wp))*aheatprof(k,dhour+1) |
---|
9041 | IF ( aheat(k,j,i) > 0.0_wp ) THEN |
---|
9042 | !-- calculate rho * c_p coefficient at layer k |
---|
9043 | rho_cp = c_p * hyp(k) / ( r_d * pt(k+1,j,i) * exner(k) ) |
---|
9044 | pt(k,j,i) = pt(k,j,i) + aheat(k,j,i)*acoef*dt_3d/(exner(k)*rho_cp*dz(1)) |
---|
9045 | ENDIF |
---|
9046 | ENDIF |
---|
9047 | ENDDO |
---|
9048 | ENDDO |
---|
9049 | ENDDO |
---|
9050 | |
---|
9051 | ENDIF |
---|
9052 | |
---|
9053 | !-- pt and shf are defined on nxlg:nxrg,nysg:nyng |
---|
9054 | !-- get the borders from neighbours |
---|
9055 | #if ! defined( __nopointer ) |
---|
9056 | CALL exchange_horiz( pt, nbgp ) |
---|
9057 | #endif |
---|
9058 | |
---|
9059 | !-- calculation of force_radiation_call: |
---|
9060 | !-- Make logical OR for all processes. |
---|
9061 | !-- Force radiation call if at least one processor forces it. |
---|
9062 | IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )& |
---|
9063 | THEN |
---|
9064 | #if defined( __parallel ) |
---|
9065 | IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) |
---|
9066 | CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call, & |
---|
9067 | 1, MPI_LOGICAL, MPI_LOR, comm2d, ierr ) |
---|
9068 | #else |
---|
9069 | force_radiation_call = force_radiation_call_l |
---|
9070 | #endif |
---|
9071 | force_radiation_call_l = .FALSE. |
---|
9072 | ENDIF |
---|
9073 | |
---|
9074 | ! ! |
---|
9075 | ! !-- Calculate surface specific humidity |
---|
9076 | ! IF ( humidity ) THEN |
---|
9077 | ! CALL calc_q_surface_usm |
---|
9078 | ! ENDIF |
---|
9079 | |
---|
9080 | |
---|
9081 | CONTAINS |
---|
9082 | !------------------------------------------------------------------------------! |
---|
9083 | ! Description: |
---|
9084 | ! ------------ |
---|
9085 | !> Calculation of specific humidity of the skin layer (surface). It is assumend |
---|
9086 | !> that the skin is always saturated. |
---|
9087 | !------------------------------------------------------------------------------! |
---|
9088 | SUBROUTINE calc_q_surface_usm |
---|
9089 | |
---|
9090 | IMPLICIT NONE |
---|
9091 | |
---|
9092 | REAL(wp) :: resistance !< aerodynamic and soil resistance term |
---|
9093 | |
---|
9094 | DO m = 1, surf_usm_h%ns |
---|
9095 | |
---|
9096 | i = surf_usm_h%i(m) |
---|
9097 | j = surf_usm_h%j(m) |
---|
9098 | k = surf_usm_h%k(m) |
---|
9099 | |
---|
9100 | ! |
---|
9101 | !-- Calculate water vapour pressure at saturation |
---|
9102 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
9103 | ( t_surf_green_h_p(m) - 273.16_wp ) / & |
---|
9104 | ( t_surf_green_h_p(m) - 35.86_wp ) & |
---|
9105 | ) |
---|
9106 | |
---|
9107 | ! |
---|
9108 | !-- Calculate specific humidity at saturation |
---|
9109 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
9110 | |
---|
9111 | ! surf_usm_h%r_a_green(m) = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
9112 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-10_wp ) |
---|
9113 | ! |
---|
9114 | ! !-- make sure that the resistance does not drop to zero |
---|
9115 | ! IF ( ABS(surf_usm_h%r_a_green(m)) < 1.0E-10_wp ) surf_usm_h%r_a_green(m) = 1.0E-10_wp |
---|
9116 | |
---|
9117 | resistance = surf_usm_h%r_a_green(m) / ( surf_usm_h%r_a_green(m) + surf_usm_h%r_s(m) + 1E-5_wp ) |
---|
9118 | |
---|
9119 | ! |
---|
9120 | !-- Calculate specific humidity at surface |
---|
9121 | IF ( bulk_cloud_model ) THEN |
---|
9122 | q(k,j,i) = resistance * q_s + & |
---|
9123 | ( 1.0_wp - resistance ) * & |
---|
9124 | ( q(k,j,i) - ql(k,j,i) ) |
---|
9125 | ELSE |
---|
9126 | q(k,j,i) = resistance * q_s + & |
---|
9127 | ( 1.0_wp - resistance ) * & |
---|
9128 | q(k,j,i) |
---|
9129 | ENDIF |
---|
9130 | |
---|
9131 | ! |
---|
9132 | !-- Update virtual potential temperature |
---|
9133 | vpt(k,j,i) = pt(k,j,i) * & |
---|
9134 | ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
9135 | |
---|
9136 | ENDDO |
---|
9137 | |
---|
9138 | !-- Now, treat vertical surface elements |
---|
9139 | DO l = 0, 3 |
---|
9140 | DO m = 1, surf_usm_v(l)%ns |
---|
9141 | ! |
---|
9142 | !-- Get indices of respective grid point |
---|
9143 | i = surf_usm_v(l)%i(m) |
---|
9144 | j = surf_usm_v(l)%j(m) |
---|
9145 | k = surf_usm_v(l)%k(m) |
---|
9146 | |
---|
9147 | ! |
---|
9148 | !-- Calculate water vapour pressure at saturation |
---|
9149 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
9150 | ( t_surf_green_v_p(l)%t(m) - 273.16_wp ) / & |
---|
9151 | ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) & |
---|
9152 | ) |
---|
9153 | |
---|
9154 | ! |
---|
9155 | !-- Calculate specific humidity at saturation |
---|
9156 | q_s = 0.622_wp * e_s / ( surface_pressure -e_s ) |
---|
9157 | |
---|
9158 | ! |
---|
9159 | !-- Calculate specific humidity at surface |
---|
9160 | IF ( bulk_cloud_model ) THEN |
---|
9161 | q(k,j,i) = ( q(k,j,i) - ql(k,j,i) ) |
---|
9162 | ELSE |
---|
9163 | q(k,j,i) = q(k,j,i) |
---|
9164 | ENDIF |
---|
9165 | ! |
---|
9166 | !-- Update virtual potential temperature |
---|
9167 | vpt(k,j,i) = pt(k,j,i) * & |
---|
9168 | ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
9169 | |
---|
9170 | ENDDO |
---|
9171 | |
---|
9172 | ENDDO |
---|
9173 | |
---|
9174 | END SUBROUTINE calc_q_surface_usm |
---|
9175 | |
---|
9176 | END SUBROUTINE usm_surface_energy_balance |
---|
9177 | |
---|
9178 | |
---|
9179 | !------------------------------------------------------------------------------! |
---|
9180 | ! Description: |
---|
9181 | ! ------------ |
---|
9182 | !> Swapping of timelevels for t_surf and t_wall |
---|
9183 | !> called out from subroutine swap_timelevel |
---|
9184 | !------------------------------------------------------------------------------! |
---|
9185 | SUBROUTINE usm_swap_timelevel( mod_count ) |
---|
9186 | |
---|
9187 | IMPLICIT NONE |
---|
9188 | |
---|
9189 | INTEGER(iwp), INTENT(IN) :: mod_count |
---|
9190 | |
---|
9191 | #if defined( __nopointer ) |
---|
9192 | t_surf_wall_h = t_surf_wall_h_p |
---|
9193 | t_wall_h = t_wall_h_p |
---|
9194 | t_surf_wall_v = t_surf_wall_v_p |
---|
9195 | t_wall_v = t_wall_v_p |
---|
9196 | t_surf_window_h = t_surf_window_h_p |
---|
9197 | t_window_h = t_window_h_p |
---|
9198 | t_surf_window_v = t_surf_window_v_p |
---|
9199 | t_window_v = t_window_v_p |
---|
9200 | t_surf_green_h = t_surf_green_h_p |
---|
9201 | t_surf_green_v = t_surf_green_v_p |
---|
9202 | t_green_h = t_green_h_p |
---|
9203 | t_green_v = t_green_v_p |
---|
9204 | #else |
---|
9205 | SELECT CASE ( mod_count ) |
---|
9206 | CASE ( 0 ) |
---|
9207 | ! |
---|
9208 | !-- Horizontal surfaces |
---|
9209 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
9210 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
9211 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
9212 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
9213 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
9214 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
9215 | ! |
---|
9216 | !-- Vertical surfaces |
---|
9217 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
9218 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
9219 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
9220 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
9221 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
9222 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
9223 | CASE ( 1 ) |
---|
9224 | ! |
---|
9225 | !-- Horizontal surfaces |
---|
9226 | t_surf_wall_h => t_surf_wall_h_2; t_surf_wall_h_p => t_surf_wall_h_1 |
---|
9227 | t_wall_h => t_wall_h_2; t_wall_h_p => t_wall_h_1 |
---|
9228 | t_surf_window_h => t_surf_window_h_2; t_surf_window_h_p => t_surf_window_h_1 |
---|
9229 | t_window_h => t_window_h_2; t_window_h_p => t_window_h_1 |
---|
9230 | t_surf_green_h => t_surf_green_h_2; t_surf_green_h_p => t_surf_green_h_1 |
---|
9231 | t_green_h => t_green_h_2; t_green_h_p => t_green_h_1 |
---|
9232 | ! |
---|
9233 | !-- Vertical surfaces |
---|
9234 | t_surf_wall_v => t_surf_wall_v_2; t_surf_wall_v_p => t_surf_wall_v_1 |
---|
9235 | t_wall_v => t_wall_v_2; t_wall_v_p => t_wall_v_1 |
---|
9236 | t_surf_window_v => t_surf_window_v_2; t_surf_window_v_p => t_surf_window_v_1 |
---|
9237 | t_window_v => t_window_v_2; t_window_v_p => t_window_v_1 |
---|
9238 | t_surf_green_v => t_surf_green_v_2; t_surf_green_v_p => t_surf_green_v_1 |
---|
9239 | t_green_v => t_green_v_2; t_green_v_p => t_green_v_1 |
---|
9240 | END SELECT |
---|
9241 | #endif |
---|
9242 | |
---|
9243 | END SUBROUTINE usm_swap_timelevel |
---|
9244 | |
---|
9245 | !------------------------------------------------------------------------------! |
---|
9246 | ! Description: |
---|
9247 | ! ------------ |
---|
9248 | !> Subroutine writes t_surf and t_wall data into restart files |
---|
9249 | !------------------------------------------------------------------------------! |
---|
9250 | SUBROUTINE usm_wrd_local |
---|
9251 | |
---|
9252 | |
---|
9253 | IMPLICIT NONE |
---|
9254 | |
---|
9255 | CHARACTER(LEN=1) :: dum !< dummy string to create output-variable name |
---|
9256 | INTEGER(iwp) :: l !< index surface type orientation |
---|
9257 | |
---|
9258 | CALL wrd_write_string( 'ns_h_on_file_usm' ) |
---|
9259 | WRITE ( 14 ) surf_usm_h%ns |
---|
9260 | |
---|
9261 | CALL wrd_write_string( 'ns_v_on_file_usm' ) |
---|
9262 | WRITE ( 14 ) surf_usm_v(0:3)%ns |
---|
9263 | |
---|
9264 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
9265 | WRITE ( 14 ) surf_usm_h%start_index |
---|
9266 | |
---|
9267 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
9268 | WRITE ( 14 ) surf_usm_h%end_index |
---|
9269 | |
---|
9270 | CALL wrd_write_string( 't_surf_wall_h' ) |
---|
9271 | WRITE ( 14 ) t_surf_wall_h |
---|
9272 | |
---|
9273 | CALL wrd_write_string( 't_surf_window_h' ) |
---|
9274 | WRITE ( 14 ) t_surf_window_h |
---|
9275 | |
---|
9276 | CALL wrd_write_string( 't_surf_green_h' ) |
---|
9277 | WRITE ( 14 ) t_surf_green_h |
---|
9278 | |
---|
9279 | DO l = 0, 3 |
---|
9280 | |
---|
9281 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
9282 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
9283 | |
---|
9284 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
9285 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
9286 | |
---|
9287 | WRITE( dum, '(I1)') l |
---|
9288 | |
---|
9289 | CALL wrd_write_string( 't_surf_wall_v(' // dum // ')' ) |
---|
9290 | WRITE ( 14 ) t_surf_wall_v(l)%t |
---|
9291 | |
---|
9292 | CALL wrd_write_string( 't_surf_window_v(' // dum // ')' ) |
---|
9293 | WRITE ( 14 ) t_surf_window_v(l)%t |
---|
9294 | |
---|
9295 | CALL wrd_write_string( 't_surf_green_v(' // dum // ')' ) |
---|
9296 | WRITE ( 14 ) t_surf_green_v(l)%t |
---|
9297 | |
---|
9298 | ENDDO |
---|
9299 | |
---|
9300 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
9301 | WRITE ( 14 ) surf_usm_h%start_index |
---|
9302 | |
---|
9303 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
9304 | WRITE ( 14 ) surf_usm_h%end_index |
---|
9305 | |
---|
9306 | CALL wrd_write_string( 't_wall_h' ) |
---|
9307 | WRITE ( 14 ) t_wall_h |
---|
9308 | |
---|
9309 | CALL wrd_write_string( 't_window_h' ) |
---|
9310 | WRITE ( 14 ) t_window_h |
---|
9311 | |
---|
9312 | CALL wrd_write_string( 't_green_h' ) |
---|
9313 | WRITE ( 14 ) t_green_h |
---|
9314 | |
---|
9315 | DO l = 0, 3 |
---|
9316 | |
---|
9317 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
9318 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
9319 | |
---|
9320 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
9321 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
9322 | |
---|
9323 | WRITE( dum, '(I1)') l |
---|
9324 | |
---|
9325 | CALL wrd_write_string( 't_wall_v(' // dum // ')' ) |
---|
9326 | WRITE ( 14 ) t_wall_v(l)%t |
---|
9327 | |
---|
9328 | CALL wrd_write_string( 't_window_v(' // dum // ')' ) |
---|
9329 | WRITE ( 14 ) t_window_v(l)%t |
---|
9330 | |
---|
9331 | CALL wrd_write_string( 't_green_v(' // dum // ')' ) |
---|
9332 | WRITE ( 14 ) t_green_v(l)%t |
---|
9333 | |
---|
9334 | ENDDO |
---|
9335 | |
---|
9336 | |
---|
9337 | END SUBROUTINE usm_wrd_local |
---|
9338 | |
---|
9339 | |
---|
9340 | END MODULE urban_surface_mod |
---|