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 3524 2018-11-14 13:36:44Z knoop $ |
---|
30 | ! bugfix concerning allocation of t_surf_wall_v |
---|
31 | ! |
---|
32 | ! 3502 2018-11-07 14:45:23Z suehring |
---|
33 | ! Disable initialization of building roofs with ground-floor-level properties, |
---|
34 | ! since this causes strong oscillations of surface temperature during the |
---|
35 | ! spinup. |
---|
36 | ! |
---|
37 | ! 3469 2018-10-30 20:05:07Z kanani |
---|
38 | ! Add missing PUBLIC variables for new indoor model |
---|
39 | ! |
---|
40 | ! 3449 2018-10-29 19:36:56Z suehring |
---|
41 | ! Bugfix: Fix average arrays allocations in usm_average_3d_data (J.Resler) |
---|
42 | ! Bugfix: Fix reading wall temperatures (J.Resler) |
---|
43 | ! Bugfix: Fix treating of outputs for wall temperature and sky view factors (J.Resler) |
---|
44 | ! |
---|
45 | ! |
---|
46 | ! 3435 2018-10-26 18:25:44Z gronemeier |
---|
47 | ! Bugfix: allocate gamma_w_green_sat until nzt_wall+1 |
---|
48 | ! |
---|
49 | ! 3418 2018-10-24 16:07:39Z kanani |
---|
50 | ! (rvtils, srissman) |
---|
51 | ! -Updated building databse, two green roof types (ind_green_type_roof) |
---|
52 | ! -Latent heat flux for green walls and roofs, new output of latent heatflux |
---|
53 | ! and soil water content of green roof substrate |
---|
54 | ! -t_surf changed to t_surf_wall |
---|
55 | ! -Added namelist parameter usm_wall_mod for lower wall tendency |
---|
56 | ! of first two wall layers during spinup |
---|
57 | ! -Window calculations deactivated during spinup |
---|
58 | ! |
---|
59 | ! 3382 2018-10-19 13:10:32Z knoop |
---|
60 | ! Bugix: made array declaration Fortran Standard conform |
---|
61 | ! |
---|
62 | ! 3378 2018-10-19 12:34:59Z kanani |
---|
63 | ! merge from radiation branch (r3362) into trunk |
---|
64 | ! (moh.hefny): |
---|
65 | ! - check the requested output variables if they are correct |
---|
66 | ! - added unscheduled_radiation_calls switch to control force_radiation_call |
---|
67 | ! - minor formate changes |
---|
68 | ! |
---|
69 | ! 3371 2018-10-18 13:40:12Z knoop |
---|
70 | ! Set flag indicating that albedo at urban surfaces is already initialized |
---|
71 | ! |
---|
72 | ! 3347 2018-10-15 14:21:08Z suehring |
---|
73 | ! Enable USM initialization with default building parameters in case no static |
---|
74 | ! input file exist. |
---|
75 | ! |
---|
76 | ! 3343 2018-10-15 10:38:52Z suehring |
---|
77 | ! Add output variables usm_rad_pc_inlw, usm_rad_pc_insw* |
---|
78 | ! |
---|
79 | ! 3274 2018-09-24 15:42:55Z knoop |
---|
80 | ! Modularization of all bulk cloud physics code components |
---|
81 | ! |
---|
82 | ! 3248 2018-09-14 09:42:06Z sward |
---|
83 | ! Minor formating changes |
---|
84 | ! |
---|
85 | ! 3246 2018-09-13 15:14:50Z sward |
---|
86 | ! Added error handling for input namelist via parin_fail_message |
---|
87 | ! |
---|
88 | ! 3241 2018-09-12 15:02:00Z raasch |
---|
89 | ! unused variables removed |
---|
90 | ! |
---|
91 | ! 3223 2018-08-30 13:48:17Z suehring |
---|
92 | ! Bugfix for commit 3222 |
---|
93 | ! |
---|
94 | ! 3222 2018-08-30 13:35:35Z suehring |
---|
95 | ! Introduction of surface array for type and its name |
---|
96 | ! |
---|
97 | ! 3203 2018-08-23 10:48:36Z suehring |
---|
98 | ! Revise bulk parameter for emissivity at ground-floor level |
---|
99 | ! |
---|
100 | ! 3196 2018-08-13 12:26:14Z maronga |
---|
101 | ! Added maximum aerodynamic resistance of 300 for horiztonal surfaces. |
---|
102 | ! |
---|
103 | ! 3176 2018-07-26 17:12:48Z suehring |
---|
104 | ! Bugfix, update virtual potential surface temparture, else heat fluxes on |
---|
105 | ! roofs might become unphysical |
---|
106 | ! |
---|
107 | ! 3152 2018-07-19 13:26:52Z suehring |
---|
108 | ! Initialize q_surface, which might be used in surface_layer_fluxes |
---|
109 | ! |
---|
110 | ! 3151 2018-07-19 08:45:38Z raasch |
---|
111 | ! remaining preprocessor define strings __check removed |
---|
112 | ! |
---|
113 | ! 3136 2018-07-16 14:48:21Z suehring |
---|
114 | ! Limit also roughness length for heat and moisture where necessary |
---|
115 | ! |
---|
116 | ! 3123 2018-07-12 16:21:53Z suehring |
---|
117 | ! Correct working precision for INTEGER number |
---|
118 | ! |
---|
119 | ! 3115 2018-07-10 12:49:26Z suehring |
---|
120 | ! Additional building type to represent bridges |
---|
121 | ! |
---|
122 | ! 3091 2018-06-28 16:20:35Z suehring |
---|
123 | ! - Limit aerodynamic resistance at vertical walls. |
---|
124 | ! - Add check for local roughness length not exceeding surface-layer height and |
---|
125 | ! limit roughness length where necessary. |
---|
126 | ! |
---|
127 | ! 3065 2018-06-12 07:03:02Z Giersch |
---|
128 | ! Unused array dxdir was removed, dz was replaced by dzu to consider vertical |
---|
129 | ! grid stretching |
---|
130 | ! |
---|
131 | ! 3049 2018-05-29 13:52:36Z Giersch |
---|
132 | ! Error messages revised |
---|
133 | ! |
---|
134 | ! 3045 2018-05-28 07:55:41Z Giersch |
---|
135 | ! Error message added |
---|
136 | ! |
---|
137 | ! 3029 2018-05-23 12:19:17Z raasch |
---|
138 | ! bugfix: close unit 151 instead of 90 |
---|
139 | ! |
---|
140 | ! 3014 2018-05-09 08:42:38Z maronga |
---|
141 | ! Added pc_transpiration_rate |
---|
142 | ! |
---|
143 | ! 2977 2018-04-17 10:27:57Z kanani |
---|
144 | ! Implement changes from branch radiation (r2948-2971) with minor modifications. |
---|
145 | ! (moh.hefny): |
---|
146 | ! Extended exn for all model domain height to avoid the need to get nzut. |
---|
147 | ! |
---|
148 | ! 2963 2018-04-12 14:47:44Z suehring |
---|
149 | ! Introduce index for vegetation/wall, pavement/green-wall and water/window |
---|
150 | ! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. . |
---|
151 | ! |
---|
152 | ! 2943 2018-04-03 16:17:10Z suehring |
---|
153 | ! Calculate exner function at all height levels and remove some un-used |
---|
154 | ! variables. |
---|
155 | ! |
---|
156 | ! 2932 2018-03-26 09:39:22Z maronga |
---|
157 | ! renamed urban_surface_par to urban_surface_parameters |
---|
158 | ! |
---|
159 | ! 2921 2018-03-22 15:05:23Z Giersch |
---|
160 | ! The activation of spinup has been moved to parin |
---|
161 | ! |
---|
162 | ! 2920 2018-03-22 11:22:01Z kanani |
---|
163 | ! Remove unused pcbl, npcbl from ONLY list |
---|
164 | ! moh.hefny: |
---|
165 | ! Fixed bugs introduced by new structures and by moving radiation interaction |
---|
166 | ! into radiation_model_mod.f90. |
---|
167 | ! Bugfix: usm data output 3D didn't respect directions |
---|
168 | ! |
---|
169 | ! 2906 2018-03-19 08:56:40Z Giersch |
---|
170 | ! Local variable ids has to be initialized with a value of -1 in |
---|
171 | ! usm_average_3d_data |
---|
172 | ! |
---|
173 | ! 2894 2018-03-15 09:17:58Z Giersch |
---|
174 | ! Calculations of the index range of the subdomain on file which overlaps with |
---|
175 | ! the current subdomain are already done in read_restart_data_mod, |
---|
176 | ! usm_read/write_restart_data have been renamed to usm_r/wrd_local, variable |
---|
177 | ! named found has been introduced for checking if restart data was found, |
---|
178 | ! reading of restart strings has been moved completely to |
---|
179 | ! read_restart_data_mod, usm_rrd_local is already inside the overlap loop |
---|
180 | ! programmed in read_restart_data_mod, SAVE attribute added where necessary, |
---|
181 | ! deallocation and allocation of some arrays have been changed to take care of |
---|
182 | ! different restart files that can be opened (index i), the marker *** end usm |
---|
183 | ! *** is not necessary anymore, strings and their respective lengths are |
---|
184 | ! written out and read now in case of restart runs to get rid of prescribed |
---|
185 | ! character lengths |
---|
186 | ! |
---|
187 | ! 2805 2018-02-14 17:00:09Z suehring |
---|
188 | ! Initialization of resistances. |
---|
189 | ! |
---|
190 | ! 2797 2018-02-08 13:24:35Z suehring |
---|
191 | ! Comment concerning output of ground-heat flux added. |
---|
192 | ! |
---|
193 | ! 2766 2018-01-22 17:17:47Z kanani |
---|
194 | ! Removed redundant commas, added some blanks |
---|
195 | ! |
---|
196 | ! 2765 2018-01-22 11:34:58Z maronga |
---|
197 | ! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in |
---|
198 | ! building_pars |
---|
199 | ! |
---|
200 | ! 2750 2018-01-15 16:26:51Z knoop |
---|
201 | ! Move flag plant canopy to modules |
---|
202 | ! |
---|
203 | ! 2737 2018-01-11 14:58:11Z kanani |
---|
204 | ! Removed unused variables t_surf_whole... |
---|
205 | ! |
---|
206 | ! 2735 2018-01-11 12:01:27Z suehring |
---|
207 | ! resistances are saved in surface attributes |
---|
208 | ! |
---|
209 | ! 2723 2018-01-05 09:27:03Z maronga |
---|
210 | ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) |
---|
211 | ! |
---|
212 | ! 2720 2018-01-02 16:27:15Z kanani |
---|
213 | ! Correction of comment |
---|
214 | ! |
---|
215 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
216 | ! Corrected "Former revisions" section |
---|
217 | ! |
---|
218 | ! 2705 2017-12-18 11:26:23Z maronga |
---|
219 | ! Changes from last commit documented |
---|
220 | ! |
---|
221 | ! 2703 2017-12-15 20:12:38Z maronga |
---|
222 | ! Workaround for calculation of r_a |
---|
223 | ! |
---|
224 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
225 | ! - Change in file header (GPL part) |
---|
226 | ! - Bugfix in calculation of pt_surface and related fluxes. (BM) |
---|
227 | ! - Do not write surface temperatures onto pt array as this might cause |
---|
228 | ! problems with nesting. (MS) |
---|
229 | ! - Revised calculation of pt1 (now done in surface_layer_fluxes). |
---|
230 | ! Bugfix, f_shf_window and f_shf_green were not set at vertical surface |
---|
231 | ! elements. (MS) |
---|
232 | ! - merged with branch ebsolver |
---|
233 | ! green building surfaces do not evaporate yet |
---|
234 | ! properties of green wall layers and window layers are taken from wall layers |
---|
235 | ! this input data is missing. (RvT) |
---|
236 | ! - Merged with branch radiation (developed by Mohamed Salim) |
---|
237 | ! - Revised initialization. (MS) |
---|
238 | ! - Rename emiss_surf into emissivity, roughness_wall into z0, albedo_surf into |
---|
239 | ! albedo. (MS) |
---|
240 | ! - Move first call of usm_radiatin from usm_init to init_3d_model |
---|
241 | ! - fixed problem with near surface temperature |
---|
242 | ! - added near surface temperature t_surf_10cm_h(m), t_surf_10cm_v(l)%t(m) |
---|
243 | ! - does not work with temp profile including stability, ol |
---|
244 | ! t_surf_10cm = pt1 now |
---|
245 | ! - merged with 2357 bugfix, error message for nopointer version |
---|
246 | ! - added indoor model coupling with wall heat flux |
---|
247 | ! - added green substrate/ dry vegetation layer for buildings |
---|
248 | ! - merged with 2232 new surface-type structure |
---|
249 | ! - added transmissivity of window tiles |
---|
250 | ! - added MOSAIK tile approach for 3 different surfaces (RvT) |
---|
251 | ! |
---|
252 | ! 2583 2017-10-26 13:58:38Z knoop |
---|
253 | ! Bugfix: reverted MPI_Win_allocate_cptr introduction in last commit |
---|
254 | ! |
---|
255 | ! 2582 2017-10-26 13:19:46Z hellstea |
---|
256 | ! Workaround for gnufortran compiler added in usm_calc_svf. CALL MPI_Win_allocate is |
---|
257 | ! replaced by CALL MPI_Win_allocate_cptr if defined ( __gnufortran ). |
---|
258 | ! |
---|
259 | ! 2544 2017-10-13 18:09:32Z maronga |
---|
260 | ! Date and time quantities are now read from date_and_time_mod. Solar constant is |
---|
261 | ! read from radiation_model_mod |
---|
262 | ! |
---|
263 | ! 2516 2017-10-04 11:03:04Z suehring |
---|
264 | ! Remove tabs |
---|
265 | ! |
---|
266 | ! 2514 2017-10-04 09:52:37Z suehring |
---|
267 | ! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny |
---|
268 | ! no output of ghost layer data |
---|
269 | ! |
---|
270 | ! 2350 2017-08-15 11:48:26Z kanani |
---|
271 | ! Bugfix and error message for nopointer version. |
---|
272 | ! Additional "! defined(__nopointer)" as workaround to enable compilation of |
---|
273 | ! nopointer version. |
---|
274 | ! |
---|
275 | ! 2318 2017-07-20 17:27:44Z suehring |
---|
276 | ! Get topography top index via Function call |
---|
277 | ! |
---|
278 | ! 2317 2017-07-20 17:27:19Z suehring |
---|
279 | ! Bugfix: adjust output of shf. Added support for spinups |
---|
280 | ! |
---|
281 | ! 2287 2017-06-15 16:46:30Z suehring |
---|
282 | ! Bugfix in determination topography-top index |
---|
283 | ! |
---|
284 | ! 2269 2017-06-09 11:57:32Z suehring |
---|
285 | ! Enable restart runs with different number of PEs |
---|
286 | ! Bugfixes nopointer branch |
---|
287 | ! |
---|
288 | ! 2258 2017-06-08 07:55:13Z suehring |
---|
289 | ! Bugfix, add pre-preprocessor directives to enable non-parrallel mode |
---|
290 | ! |
---|
291 | ! 2233 2017-05-30 18:08:54Z suehring |
---|
292 | ! |
---|
293 | ! 2232 2017-05-30 17:47:52Z suehring |
---|
294 | ! Adjustments according to new surface-type structure. Remove usm_wall_heat_flux; |
---|
295 | ! insteat, heat fluxes are directly applied in diffusion_s. |
---|
296 | ! |
---|
297 | ! 2213 2017-04-24 15:10:35Z kanani |
---|
298 | ! Removal of output quantities usm_lad and usm_canopy_hr |
---|
299 | ! |
---|
300 | ! 2209 2017-04-19 09:34:46Z kanani |
---|
301 | ! cpp switch __mpi3 removed, |
---|
302 | ! minor formatting, |
---|
303 | ! small bugfix for division by zero (Krc) |
---|
304 | ! |
---|
305 | ! 2113 2017-01-12 13:40:46Z kanani |
---|
306 | ! cpp switch __mpi3 added for MPI-3 standard code (Ketelsen) |
---|
307 | ! |
---|
308 | ! 2071 2016-11-17 11:22:14Z maronga |
---|
309 | ! Small bugfix (Resler) |
---|
310 | ! |
---|
311 | ! 2031 2016-10-21 15:11:58Z knoop |
---|
312 | ! renamed variable rho to rho_ocean |
---|
313 | ! |
---|
314 | ! 2024 2016-10-12 16:42:37Z kanani |
---|
315 | ! Bugfixes in deallocation of array plantt and reading of csf/csfsurf, |
---|
316 | ! optimization of MPI-RMA operations, |
---|
317 | ! declaration of pcbl as integer, |
---|
318 | ! renamed usm_radnet -> usm_rad_net, usm_canopy_khf -> usm_canopy_hr, |
---|
319 | ! splitted arrays svf -> svf & csf, svfsurf -> svfsurf & csfsurf, |
---|
320 | ! use of new control parameter varnamelength, |
---|
321 | ! added output variables usm_rad_ressw, usm_rad_reslw, |
---|
322 | ! minor formatting changes, |
---|
323 | ! minor optimizations. |
---|
324 | ! |
---|
325 | ! 2011 2016-09-19 17:29:57Z kanani |
---|
326 | ! Major reformatting according to PALM coding standard (comments, blanks, |
---|
327 | ! alphabetical ordering, etc.), |
---|
328 | ! removed debug_prints, |
---|
329 | ! removed auxiliary SUBROUTINE get_usm_info, instead, USM flag urban_surface is |
---|
330 | ! defined in MODULE control_parameters (modules.f90) to avoid circular |
---|
331 | ! dependencies, |
---|
332 | ! renamed canopy_heat_flux to pc_heating_rate, as meaning of quantity changed. |
---|
333 | ! |
---|
334 | ! 2007 2016-08-24 15:47:17Z kanani |
---|
335 | ! Initial revision |
---|
336 | ! |
---|
337 | ! |
---|
338 | ! Description: |
---|
339 | ! ------------ |
---|
340 | ! 2016/6/9 - Initial version of the USM (Urban Surface Model) |
---|
341 | ! authors: Jaroslav Resler, Pavel Krc |
---|
342 | ! (Czech Technical University in Prague and Institute of |
---|
343 | ! Computer Science of the Czech Academy of Sciences, Prague) |
---|
344 | ! with contributions: Michal Belda, Nina Benesova, Ondrej Vlcek |
---|
345 | ! partly inspired by PALM LSM (B. Maronga) |
---|
346 | ! parameterizations of Ra checked with TUF3D (E. S. Krayenhoff) |
---|
347 | !> Module for Urban Surface Model (USM) |
---|
348 | !> The module includes: |
---|
349 | !> 1. radiation model with direct/diffuse radiation, shading, reflections |
---|
350 | !> and integration with plant canopy |
---|
351 | !> 2. wall and wall surface model |
---|
352 | !> 3. surface layer energy balance |
---|
353 | !> 4. anthropogenic heat (only from transportation so far) |
---|
354 | !> 5. necessary auxiliary subroutines (reading inputs, writing outputs, |
---|
355 | !> restart simulations, ...) |
---|
356 | !> It also make use of standard radiation and integrates it into |
---|
357 | !> urban surface model. |
---|
358 | !> |
---|
359 | !> Further work: |
---|
360 | !> ------------- |
---|
361 | !> 1. Remove global arrays surfouts, surfoutl and only keep track of radiosity |
---|
362 | !> from surfaces that are visible from local surfaces (i.e. there is a SVF |
---|
363 | !> where target is local). To do that, radiosity will be exchanged after each |
---|
364 | !> reflection step using MPI_Alltoall instead of current MPI_Allgather. |
---|
365 | !> |
---|
366 | !> 2. Temporarily large values of surface heat flux can be observed, up to |
---|
367 | !> 1.2 Km/s, which seem to be not realistic. |
---|
368 | !> |
---|
369 | !> @todo Output of _av variables in case of restarts |
---|
370 | !> @todo Revise flux conversion in energy-balance solver |
---|
371 | !> @todo Bugfixing in nopointer branch |
---|
372 | !> @todo Check optimizations for RMA operations |
---|
373 | !> @todo Alternatives for MPI_WIN_ALLOCATE? (causes problems with openmpi) |
---|
374 | !> @todo Check for load imbalances in CPU measures, e.g. for exchange_horiz_prog |
---|
375 | !> factor 3 between min and max time |
---|
376 | !> @todo Move setting of flag indoor_model to indoor_model_mod once available |
---|
377 | !> @todo Check divisions in wtend (etc.) calculations for possible division |
---|
378 | !> by zero, e.g. in case fraq(0,m) + fraq(1,m) = 0?! |
---|
379 | !> @todo Use unit 90 for OPEN/CLOSE of input files (FK) |
---|
380 | !> @todo Move plant canopy stuff into plant canopy code |
---|
381 | !------------------------------------------------------------------------------! |
---|
382 | MODULE urban_surface_mod |
---|
383 | |
---|
384 | USE arrays_3d, & |
---|
385 | #if ! defined( __nopointer ) |
---|
386 | ONLY: hyp, zu, pt, p, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
387 | #else |
---|
388 | ONLY: hyp, pt, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
389 | #endif |
---|
390 | USE calc_mean_profile_mod, & |
---|
391 | ONLY: calc_mean_profile |
---|
392 | |
---|
393 | USE basic_constants_and_equations_mod, & |
---|
394 | ONLY: c_p, g, kappa, pi, r_d, rho_l, l_v |
---|
395 | |
---|
396 | USE control_parameters, & |
---|
397 | ONLY: coupling_start_time, topography, dt_3d, humidity, & |
---|
398 | intermediate_timestep_count, initializing_actions, & |
---|
399 | intermediate_timestep_count_max, simulated_time, end_time, & |
---|
400 | timestep_scheme, tsc, coupling_char, io_blocks, io_group, & |
---|
401 | message_string, time_since_reference_point, surface_pressure, & |
---|
402 | pt_surface, large_scale_forcing, lsf_surf, spinup, & |
---|
403 | spinup_pt_mean, spinup_time, time_do3d, dt_do3d, & |
---|
404 | average_count_3d, varnamelength, urban_surface, & |
---|
405 | plant_canopy, dz |
---|
406 | |
---|
407 | USE bulk_cloud_model_mod, & |
---|
408 | ONLY: bulk_cloud_model, precipitation |
---|
409 | |
---|
410 | USE cpulog, & |
---|
411 | ONLY: cpu_log, log_point, log_point_s |
---|
412 | |
---|
413 | USE date_and_time_mod, & |
---|
414 | ONLY: time_utc_init |
---|
415 | |
---|
416 | USE grid_variables, & |
---|
417 | ONLY: dx, dy, ddx, ddy, ddx2, ddy2 |
---|
418 | |
---|
419 | USE indices, & |
---|
420 | ONLY: nx, ny, nnx, nny, nnz, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, & |
---|
421 | nysg, nzb, nzt, nbgp, wall_flags_0 |
---|
422 | |
---|
423 | USE, INTRINSIC :: iso_c_binding |
---|
424 | |
---|
425 | USE kinds |
---|
426 | |
---|
427 | USE pegrid |
---|
428 | |
---|
429 | USE plant_canopy_model_mod, & |
---|
430 | ONLY: pc_heating_rate, pc_transpiration_rate, pc_latent_rate |
---|
431 | |
---|
432 | USE radiation_model_mod, & |
---|
433 | ONLY: albedo_type, radiation_interaction, calc_zenith, zenith, & |
---|
434 | radiation, rad_sw_in, rad_lw_in, rad_sw_out, rad_lw_out, & |
---|
435 | sigma_sb, sun_direction, sun_dir_lat, sun_dir_lon, & |
---|
436 | force_radiation_call, surfinsw, surfinlw, surfinswdir, & |
---|
437 | surfinswdif, surfoutsw, surfoutlw, surfins,nsvfl, svf, svfsurf, & |
---|
438 | surfinl, surfinlwdif, rad_sw_in_dir, rad_sw_in_diff, & |
---|
439 | rad_lw_in_diff, surfouts, surfoutl, surfoutsl, surfoutll, surf, & |
---|
440 | surfl, nsurfl, pcbinsw, pcbinlw, pcbinswdir, & |
---|
441 | pcbinswdif, iup_u, inorth_u, isouth_u, ieast_u, iwest_u, iup_l, & |
---|
442 | inorth_l, isouth_l, ieast_l, iwest_l, id, & |
---|
443 | iz, iy, ix, nsurf, idsvf, ndsvf, & |
---|
444 | idcsf, ndcsf, kdcsf, pct, & |
---|
445 | startland, endland, startwall, endwall, skyvf, skyvft, nzub, & |
---|
446 | nzut, npcbl, pcbl, unscheduled_radiation_calls |
---|
447 | |
---|
448 | USE statistics, & |
---|
449 | ONLY: hom, statistic_regions |
---|
450 | |
---|
451 | USE surface_mod, & |
---|
452 | ONLY: get_topography_top_index_ji, get_topography_top_index, & |
---|
453 | ind_pav_green, ind_veg_wall, ind_wat_win, surf_usm_h, & |
---|
454 | surf_usm_v, surface_restore_elements |
---|
455 | |
---|
456 | |
---|
457 | IMPLICIT NONE |
---|
458 | |
---|
459 | ! |
---|
460 | !-- USM model constants |
---|
461 | |
---|
462 | REAL(wp), PARAMETER :: & |
---|
463 | b_ch = 6.04_wp, & ! Clapp & Hornberger exponent |
---|
464 | lambda_h_green_dry = 0.19_wp, & ! heat conductivity for dry soil |
---|
465 | lambda_h_green_sm = 3.44_wp, & ! heat conductivity of the soil matrix |
---|
466 | lambda_h_water = 0.57_wp, & ! heat conductivity of water |
---|
467 | psi_sat = -0.388_wp, & ! soil matrix potential at saturation |
---|
468 | rho_c_soil = 2.19E6_wp, & ! volumetric heat capacity of soil |
---|
469 | rho_c_water = 4.20E6_wp !, & ! volumetric heat capacity of water |
---|
470 | ! m_max_depth = 0.0002_wp ! Maximum capacity of the water reservoir (m) |
---|
471 | |
---|
472 | ! |
---|
473 | !-- Soil parameters I alpha_vg, l_vg_green, n_vg, gamma_w_green_sat |
---|
474 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: soil_pars = RESHAPE( (/ & |
---|
475 | 3.83_wp, 1.250_wp, 1.38_wp, 6.94E-6_wp, & ! 1 |
---|
476 | 3.14_wp, -2.342_wp, 1.28_wp, 1.16E-6_wp, & ! 2 |
---|
477 | 0.83_wp, -0.588_wp, 1.25_wp, 0.26E-6_wp, & ! 3 |
---|
478 | 3.67_wp, -1.977_wp, 1.10_wp, 2.87E-6_wp, & ! 4 |
---|
479 | 2.65_wp, 2.500_wp, 1.10_wp, 1.74E-6_wp, & ! 5 |
---|
480 | 1.30_wp, 0.400_wp, 1.20_wp, 0.93E-6_wp, & ! 6 |
---|
481 | 0.00_wp, 0.00_wp, 0.00_wp, 0.57E-6_wp & ! 7 |
---|
482 | /), (/ 4, 7 /) ) |
---|
483 | |
---|
484 | ! |
---|
485 | !-- Soil parameters II swc_sat, fc, wilt, swc_res |
---|
486 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: m_soil_pars = RESHAPE( (/ & |
---|
487 | 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp, & ! 1 |
---|
488 | 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp, & ! 2 |
---|
489 | 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp, & ! 3 |
---|
490 | 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp, & ! 4 |
---|
491 | 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp, & ! 5 |
---|
492 | 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp, & ! 6 |
---|
493 | 0.472_wp, 0.323_wp, 0.171_wp, 0.000_wp & ! 7 |
---|
494 | /), (/ 4, 7 /) ) |
---|
495 | |
---|
496 | ! value 9999999.9_wp -> generic available or user-defined value must be set |
---|
497 | ! otherwise -> no generic variable and user setting is optional |
---|
498 | REAL(wp) :: alpha_vangenuchten = 9999999.9_wp, & !< NAMELIST alpha_vg |
---|
499 | field_capacity = 9999999.9_wp, & !< NAMELIST fc |
---|
500 | hydraulic_conductivity = 9999999.9_wp, & !< NAMELIST gamma_w_green_sat |
---|
501 | lambda_h_green_sat = 0.0_wp, & !< heat conductivity for saturated soil |
---|
502 | l_vangenuchten = 9999999.9_wp, & !< NAMELIST l_vg |
---|
503 | n_vangenuchten = 9999999.9_wp, & !< NAMELIST n_vg |
---|
504 | residual_moisture = 9999999.9_wp, & !< NAMELIST m_res |
---|
505 | saturation_moisture = 9999999.9_wp, & !< NAMELIST m_sat |
---|
506 | wilting_point = 9999999.9_wp!, & !< NAMELIST m_wilt |
---|
507 | |
---|
508 | |
---|
509 | !-- configuration parameters (they can be setup in PALM config) |
---|
510 | LOGICAL :: usm_material_model = .TRUE. !< flag parameter indicating wheather the model of heat in materials is used |
---|
511 | LOGICAL :: usm_anthropogenic_heat = .FALSE. !< flag parameter indicating wheather the anthropogenic heat sources (e.g.transportation) are used |
---|
512 | LOGICAL :: force_radiation_call_l = .FALSE. !< flag parameter for unscheduled radiation model calls |
---|
513 | LOGICAL :: indoor_model = .FALSE. !< whether to use the indoor model |
---|
514 | LOGICAL :: read_wall_temp_3d = .FALSE. |
---|
515 | LOGICAL :: usm_wall_mod = .FALSE. !< reduces conductivity of the first 2 wall layers by factor 0.1 |
---|
516 | |
---|
517 | |
---|
518 | INTEGER(iwp) :: building_type = 1 !< default building type (preleminary setting) |
---|
519 | INTEGER(iwp) :: land_category = 2 !< default category for land surface |
---|
520 | INTEGER(iwp) :: wall_category = 2 !< default category for wall surface over pedestrian zone |
---|
521 | INTEGER(iwp) :: pedestrian_category = 2 !< default category for wall surface in pedestrian zone |
---|
522 | INTEGER(iwp) :: roof_category = 2 !< default category for root surface |
---|
523 | REAL(wp) :: roughness_concrete = 0.001_wp !< roughness length of average concrete surface |
---|
524 | ! |
---|
525 | !-- Indices of input attributes for (above) ground floor level |
---|
526 | INTEGER(iwp) :: ind_alb_wall_agfl = 65 !< index in input list for albedo_type of wall above ground floor level |
---|
527 | INTEGER(iwp) :: ind_alb_wall_gfl = 32 !< index in input list for albedo_type of wall ground floor level |
---|
528 | INTEGER(iwp) :: ind_alb_wall_r = 96 !< index in input list for albedo_type of wall roof |
---|
529 | INTEGER(iwp) :: ind_alb_green_agfl = 83 !< index in input list for albedo_type of green above ground floor level |
---|
530 | INTEGER(iwp) :: ind_alb_green_gfl = 50 !< index in input list for albedo_type of green ground floor level |
---|
531 | INTEGER(iwp) :: ind_alb_green_r = 115 !< index in input list for albedo_type of green roof |
---|
532 | INTEGER(iwp) :: ind_alb_win_agfl = 79 !< index in input list for albedo_type of window fraction above ground floor level |
---|
533 | INTEGER(iwp) :: ind_alb_win_gfl = 46 !< index in input list for albedo_type of window fraction ground floor level |
---|
534 | INTEGER(iwp) :: ind_alb_win_r = 110 !< index in input list for albedo_type of window fraction roof |
---|
535 | INTEGER(iwp) :: ind_emis_wall_agfl = 64 !< index in input list for wall emissivity, above ground floor level |
---|
536 | INTEGER(iwp) :: ind_emis_wall_gfl = 31 !< index in input list for wall emissivity, ground floor level |
---|
537 | INTEGER(iwp) :: ind_emis_wall_r = 95 !< index in input list for wall emissivity, roof |
---|
538 | INTEGER(iwp) :: ind_emis_green_agfl = 82 !< index in input list for green emissivity, above ground floor level |
---|
539 | INTEGER(iwp) :: ind_emis_green_gfl = 49 !< index in input list for green emissivity, ground floor level |
---|
540 | INTEGER(iwp) :: ind_emis_green_r = 114 !< index in input list for green emissivity, roof |
---|
541 | INTEGER(iwp) :: ind_emis_win_agfl = 77 !< index in input list for window emissivity, above ground floor level |
---|
542 | INTEGER(iwp) :: ind_emis_win_gfl = 44 !< index in input list for window emissivity, ground floor level |
---|
543 | INTEGER(iwp) :: ind_emis_win_r = 108 !< index in input list for window emissivity, roof |
---|
544 | INTEGER(iwp) :: ind_green_frac_w_agfl = 80 !< index in input list for green fraction on wall, above ground floor level |
---|
545 | INTEGER(iwp) :: ind_green_frac_w_gfl = 47 !< index in input list for green fraction on wall, ground floor level |
---|
546 | INTEGER(iwp) :: ind_green_frac_r_agfl = 112 !< index in input list for green fraction on roof, above ground floor level |
---|
547 | INTEGER(iwp) :: ind_green_frac_r_gfl = 111 !< index in input list for green fraction on roof, ground floor level |
---|
548 | INTEGER(iwp) :: ind_hc1_agfl = 58 !< index in input list for heat capacity at first wall layer, above ground floor level |
---|
549 | INTEGER(iwp) :: ind_hc1_gfl = 25 !< index in input list for heat capacity at first wall layer, ground floor level |
---|
550 | INTEGER(iwp) :: ind_hc1_wall_r = 89 !< index in input list for heat capacity at first wall layer, roof |
---|
551 | INTEGER(iwp) :: ind_hc1_win_agfl = 71 !< index in input list for heat capacity at first window layer, above ground floor level |
---|
552 | INTEGER(iwp) :: ind_hc1_win_gfl = 38 !< index in input list for heat capacity at first window layer, ground floor level |
---|
553 | INTEGER(iwp) :: ind_hc1_win_r = 102 !< index in input list for heat capacity at first window layer, roof |
---|
554 | INTEGER(iwp) :: ind_hc2_agfl = 59 !< index in input list for heat capacity at second wall layer, above ground floor level |
---|
555 | INTEGER(iwp) :: ind_hc2_gfl = 26 !< index in input list for heat capacity at second wall layer, ground floor level |
---|
556 | INTEGER(iwp) :: ind_hc2_wall_r = 90 !< index in input list for heat capacity at second wall layer, roof |
---|
557 | INTEGER(iwp) :: ind_hc2_win_agfl = 72 !< index in input list for heat capacity at second window layer, above ground floor level |
---|
558 | INTEGER(iwp) :: ind_hc2_win_gfl = 39 !< index in input list for heat capacity at second window layer, ground floor level |
---|
559 | INTEGER(iwp) :: ind_hc2_win_r = 103 !< index in input list for heat capacity at second window layer, roof |
---|
560 | INTEGER(iwp) :: ind_hc3_agfl = 60 !< index in input list for heat capacity at third wall layer, above ground floor level |
---|
561 | INTEGER(iwp) :: ind_hc3_gfl = 27 !< index in input list for heat capacity at third wall layer, ground floor level |
---|
562 | INTEGER(iwp) :: ind_hc3_wall_r = 91 !< index in input list for heat capacity at third wall layer, roof |
---|
563 | INTEGER(iwp) :: ind_hc3_win_agfl = 73 !< index in input list for heat capacity at third window layer, above ground floor level |
---|
564 | INTEGER(iwp) :: ind_hc3_win_gfl = 40 !< index in input list for heat capacity at third window layer, ground floor level |
---|
565 | INTEGER(iwp) :: ind_hc3_win_r = 104 !< index in input list for heat capacity at third window layer, roof |
---|
566 | INTEGER(iwp) :: ind_gflh = 17 !< index in input list for ground floor level height |
---|
567 | INTEGER(iwp) :: ind_lai_r_agfl = 113 !< index in input list for LAI on roof, above ground floor level |
---|
568 | INTEGER(iwp) :: ind_lai_r_gfl = 113 !< index in input list for LAI on roof, ground floor level |
---|
569 | INTEGER(iwp) :: ind_lai_w_agfl = 81 !< index in input list for LAI on wall, above ground floor level |
---|
570 | INTEGER(iwp) :: ind_lai_w_gfl = 48 !< index in input list for LAI on wall, ground floor level |
---|
571 | INTEGER(iwp) :: ind_tc1_agfl = 61 !< index in input list for thermal conductivity at first wall layer, above ground floor level |
---|
572 | INTEGER(iwp) :: ind_tc1_gfl = 28 !< index in input list for thermal conductivity at first wall layer, ground floor level |
---|
573 | INTEGER(iwp) :: ind_tc1_wall_r = 92 !< index in input list for thermal conductivity at first wall layer, roof |
---|
574 | INTEGER(iwp) :: ind_tc1_win_agfl = 74 !< index in input list for thermal conductivity at first window layer, above ground floor level |
---|
575 | INTEGER(iwp) :: ind_tc1_win_gfl = 41 !< index in input list for thermal conductivity at first window layer, ground floor level |
---|
576 | INTEGER(iwp) :: ind_tc1_win_r = 105 !< index in input list for thermal conductivity at first window layer, roof |
---|
577 | INTEGER(iwp) :: ind_tc2_agfl = 62 !< index in input list for thermal conductivity at second wall layer, above ground floor level |
---|
578 | INTEGER(iwp) :: ind_tc2_gfl = 29 !< index in input list for thermal conductivity at second wall layer, ground floor level |
---|
579 | INTEGER(iwp) :: ind_tc2_wall_r = 93 !< index in input list for thermal conductivity at second wall layer, roof |
---|
580 | INTEGER(iwp) :: ind_tc2_win_agfl = 75 !< index in input list for thermal conductivity at second window layer, above ground floor level |
---|
581 | INTEGER(iwp) :: ind_tc2_win_gfl = 42 !< index in input list for thermal conductivity at second window layer, ground floor level |
---|
582 | INTEGER(iwp) :: ind_tc2_win_r = 106 !< index in input list for thermal conductivity at second window layer, ground floor level |
---|
583 | INTEGER(iwp) :: ind_tc3_agfl = 63 !< index in input list for thermal conductivity at third wall layer, above ground floor level |
---|
584 | INTEGER(iwp) :: ind_tc3_gfl = 30 !< index in input list for thermal conductivity at third wall layer, ground floor level |
---|
585 | INTEGER(iwp) :: ind_tc3_wall_r = 94 !< index in input list for thermal conductivity at third wall layer, roof |
---|
586 | INTEGER(iwp) :: ind_tc3_win_agfl = 76 !< index in input list for thermal conductivity at third window layer, above ground floor level |
---|
587 | INTEGER(iwp) :: ind_tc3_win_gfl = 43 !< index in input list for thermal conductivity at third window layer, ground floor level |
---|
588 | INTEGER(iwp) :: ind_tc3_win_r = 107 !< index in input list for thermal conductivity at third window layer, roof |
---|
589 | INTEGER(iwp) :: ind_thick_1_agfl = 54 !< index for wall layer thickness - 1st layer above ground floor level |
---|
590 | INTEGER(iwp) :: ind_thick_1_gfl = 21 !< index for wall layer thickness - 1st layer ground floor level |
---|
591 | INTEGER(iwp) :: ind_thick_1_wall_r = 85 !< index for wall layer thickness - 1st layer roof |
---|
592 | INTEGER(iwp) :: ind_thick_1_win_agfl = 67 !< index for window layer thickness - 1st layer above ground floor level |
---|
593 | INTEGER(iwp) :: ind_thick_1_win_gfl = 34 !< index for window layer thickness - 1st layer ground floor level |
---|
594 | INTEGER(iwp) :: ind_thick_1_win_r = 98 !< index for window layer thickness - 1st layer roof |
---|
595 | INTEGER(iwp) :: ind_thick_2_agfl = 55 !< index for wall layer thickness - 2nd layer above ground floor level |
---|
596 | INTEGER(iwp) :: ind_thick_2_gfl = 22 !< index for wall layer thickness - 2nd layer ground floor level |
---|
597 | INTEGER(iwp) :: ind_thick_2_wall_r = 86 !< index for wall layer thickness - 2nd layer roof |
---|
598 | INTEGER(iwp) :: ind_thick_2_win_agfl = 68 !< index for window layer thickness - 2nd layer above ground floor level |
---|
599 | INTEGER(iwp) :: ind_thick_2_win_gfl = 35 !< index for window layer thickness - 2nd layer ground floor level |
---|
600 | INTEGER(iwp) :: ind_thick_2_win_r = 99 !< index for window layer thickness - 2nd layer roof |
---|
601 | INTEGER(iwp) :: ind_thick_3_agfl = 56 !< index for wall layer thickness - 3rd layer above ground floor level |
---|
602 | INTEGER(iwp) :: ind_thick_3_gfl = 23 !< index for wall layer thickness - 3rd layer ground floor level |
---|
603 | INTEGER(iwp) :: ind_thick_3_wall_r = 87 !< index for wall layer thickness - 3rd layer roof |
---|
604 | INTEGER(iwp) :: ind_thick_3_win_agfl = 69 !< index for window layer thickness - 3rd layer above ground floor level |
---|
605 | INTEGER(iwp) :: ind_thick_3_win_gfl = 36 !< index for window layer thickness - 3rd layer ground floor level |
---|
606 | INTEGER(iwp) :: ind_thick_3_win_r = 100 !< index for window layer thickness - 3rd layer roof |
---|
607 | INTEGER(iwp) :: ind_thick_4_agfl = 57 !< index for wall layer thickness - 4th layer above ground floor level |
---|
608 | INTEGER(iwp) :: ind_thick_4_gfl = 24 !< index for wall layer thickness - 4th layer ground floor level |
---|
609 | INTEGER(iwp) :: ind_thick_4_wall_r = 88 !< index for wall layer thickness - 4st layer roof |
---|
610 | INTEGER(iwp) :: ind_thick_4_win_agfl = 70 !< index for window layer thickness - 4th layer above ground floor level |
---|
611 | INTEGER(iwp) :: ind_thick_4_win_gfl = 37 !< index for window layer thickness - 4th layer ground floor level |
---|
612 | INTEGER(iwp) :: ind_thick_4_win_r = 101 !< index for window layer thickness - 4th layer roof |
---|
613 | INTEGER(iwp) :: ind_trans_agfl = 78 !< index in input list for window transmissivity, above ground floor level |
---|
614 | INTEGER(iwp) :: ind_trans_gfl = 45 !< index in input list for window transmissivity, ground floor level |
---|
615 | INTEGER(iwp) :: ind_trans_r = 109 !< index in input list for window transmissivity, roof |
---|
616 | INTEGER(iwp) :: ind_wall_frac_agfl = 53 !< index in input list for wall fraction, above ground floor level |
---|
617 | INTEGER(iwp) :: ind_wall_frac_gfl = 20 !< index in input list for wall fraction, ground floor level |
---|
618 | INTEGER(iwp) :: ind_wall_frac_r = 84 !< index in input list for wall fraction, roof |
---|
619 | INTEGER(iwp) :: ind_win_frac_agfl = 66 !< index in input list for window fraction, above ground floor level |
---|
620 | INTEGER(iwp) :: ind_win_frac_gfl = 33 !< index in input list for window fraction, ground floor level |
---|
621 | INTEGER(iwp) :: ind_win_frac_r = 97 !< index in input list for window fraction, roof |
---|
622 | INTEGER(iwp) :: ind_z0_agfl = 51 !< index in input list for z0, above ground floor level |
---|
623 | INTEGER(iwp) :: ind_z0_gfl = 18 !< index in input list for z0, ground floor level |
---|
624 | INTEGER(iwp) :: ind_z0qh_agfl = 52 !< index in input list for z0h / z0q, above ground floor level |
---|
625 | INTEGER(iwp) :: ind_z0qh_gfl = 19 !< index in input list for z0h / z0q, ground floor level |
---|
626 | INTEGER(iwp) :: ind_green_type_roof = 116 !< index in input list for type of green roof |
---|
627 | |
---|
628 | |
---|
629 | REAL(wp) :: roof_height_limit = 4.0_wp !< height for distinguish between land surfaces and roofs |
---|
630 | REAL(wp) :: ground_floor_level = 4.0_wp !< default ground floor level |
---|
631 | |
---|
632 | |
---|
633 | CHARACTER(37), DIMENSION(0:7), PARAMETER :: building_type_name = (/ & |
---|
634 | 'user-defined ', & ! 0 |
---|
635 | 'residential - 1950 ', & ! 1 |
---|
636 | 'residential 1951 - 2000 ', & ! 2 |
---|
637 | 'residential 2001 - ', & ! 3 |
---|
638 | 'office - 1950 ', & ! 4 |
---|
639 | 'office 1951 - 2000 ', & ! 5 |
---|
640 | 'office 2001 - ', & ! 6 |
---|
641 | 'bridges ' & ! 7 |
---|
642 | /) |
---|
643 | ! |
---|
644 | !-- building parameters, 6 different types |
---|
645 | !-- Parameter for urban surface model |
---|
646 | !-- 0 - heat capacity wall surface, 1 - heat capacity of window surface, 2 - heat capacity of green surface |
---|
647 | !-- 3 - thermal conductivity of wall surface, 4 - thermal conductivity of window surface, |
---|
648 | !-- 5 - thermal conductivty of green surface, 6 - wall fraction ground plate, |
---|
649 | !-- 7 - 1st wall layer thickness ground plate, 8 - 2nd wall layer thickness ground plate |
---|
650 | !-- 9 - 3rd wall layer thickness ground plate, 10 - 4th wall layer thickness ground plate, |
---|
651 | !-- 11 - heat capacity 1st/2nd wall layer ground plate, 12 - heat capacity 3rd wall layer ground plate |
---|
652 | !-- 13 - heat capacity 4th wall layer ground plate, 14 - thermal conductivity 1st/2nd wall layer ground plate, |
---|
653 | !-- 15 - thermal conductivity 3rd wall layer ground plate, 16 - thermal conductivity 4th wall layer ground plate |
---|
654 | !-- 17 - ground floor level height, 18 - z0 roughness ground floor level, 19 - z0h/z0g roughness heaat/humidity, |
---|
655 | !-- 20 - wall fraction ground floor level, 21 - 1st wall layer thickness ground floor level, |
---|
656 | !-- 22 - 2nd wall layer thickness ground floor level, 23 - 3rd wall layer thickness ground floor level, |
---|
657 | !-- 24 - 4th wall layer thickness ground floor level, 25 - heat capacity 1st/2nd wall layer ground floor level, |
---|
658 | !-- 26 - heat capacity 3rd wall layer ground floor level, 27 - heat capacity 4th wall layer ground floor level, |
---|
659 | !-- 28 - thermal conductivity 1st/2nd wall layer ground floor level, |
---|
660 | !-- 29 - thermal conductivity 3rd wall layer ground floor level, 30 - thermal conductivity 4th wall layer ground floor level |
---|
661 | !-- 31 - wall emissivity ground floor level, 32 - wall albedo ground floor level, 33 - window fraction ground floor level, |
---|
662 | !-- 34 - 1st window layer thickness ground floor level, 35 - 2nd window layer thickness ground floor level, |
---|
663 | !-- 36 - 3rd window layer thickness ground floor level, 37 - 4th window layer thickness ground floor level, |
---|
664 | !-- 38 - heat capacity 1st/2nd window layer ground floor level, 39 - heat capacity 3rd window layer ground floor level, |
---|
665 | !-- 40 - heat capacity 4th window layer ground floor level, |
---|
666 | !-- 41 - thermal conductivity 1st/2nd window layer ground floor level, |
---|
667 | !-- 42 - thermal conductivity 3rd window layer ground floor level, |
---|
668 | !-- 43 - thermal conductivity 4th window layer ground floor level, 44 - window emissivity ground floor level, |
---|
669 | !-- 45 - window transmissivity ground floor level, 46 - window albedo ground floor level, |
---|
670 | !-- 47 - green fraction ground floor level, 48 - LAI on wall ground floor level, 49 - green emissivity ground floor level, |
---|
671 | !-- 50 - green albedo ground floor level, 51 - z0 roughness above ground floor level, |
---|
672 | !-- 52 - z0h/z0g roughness heat/humidity above ground floor level, 53 - wall fraction above ground floor level |
---|
673 | !-- 54 - 1st wall layer thickness above ground floor level, 55 - 2nd wall layer thickness above ground floor level |
---|
674 | !-- 56 - 3rd wall layer thickness above ground floor level, 57 - 4th wall layer thickness above ground floor level |
---|
675 | !-- 58 - heat capacity 1st/2nd wall layer above ground floor level, |
---|
676 | !-- 59 - heat capacity 3rd wall layer above ground floor level, |
---|
677 | !-- 60 - heat capacity 4th wall layer above ground floor level, |
---|
678 | !-- 61 - thermal conductivity 1st/2nd wall layer above ground floor level, |
---|
679 | !-- 62 - thermal conductivity 3rd wall layer above ground floor level, |
---|
680 | !-- 63 - thermal conductivity 4th wall layer above ground floor level, |
---|
681 | !-- 64 - wall emissivity above ground floor level, 65 - wall albedo above ground floor level, |
---|
682 | !-- 66 - window fraction above ground floor level, 67 - 1st window layer thickness above ground floor level, |
---|
683 | !-- 68 - 2nd thickness window layer above ground floor level, 69 - 3rd window layer thickness above ground floor level, |
---|
684 | !-- 70 - 4th window layer thickness above ground floor level, |
---|
685 | !-- 71 - heat capacity 1st/2nd window layer above ground floor level, |
---|
686 | !-- 72 - heat capacity 3rd window layer above ground floor level, |
---|
687 | !-- 73 - heat capacity 4th window layer above ground floor level, |
---|
688 | !-- 74 - conductivity 1st/2nd window layer above ground floor level, |
---|
689 | !-- 75 - thermal conductivity 3rd window layer above ground floor level, |
---|
690 | !-- 76 - thermal conductivity 4th window layer above ground floor level, 77 - window emissivity above ground floor level, |
---|
691 | !-- 78 - window transmissivity above ground floor level, 79 - window albedo above ground floor level, |
---|
692 | !-- 80 - green fraction above ground floor level, 81 - LAI on wall above ground floor level, |
---|
693 | !-- 82 - green emissivity above ground floor level, 83 - green albedo above ground floor level, |
---|
694 | !-- 84 - wall fraction roof, 85 - 1st wall layer thickness roof, 86 - 2nd wall layer thickness roof, |
---|
695 | !-- 87 - 3rd wall layer thickness roof, 88 - 4th wall layer thickness roof, |
---|
696 | !-- 89 - heat capacity 1st/2nd wall layer roof, 90 - heat capacity 3rd wall layer roof, |
---|
697 | !-- 91 - heat capacity 4th wall layer roof, 92 - thermal conductivity 1st/2nd wall layer roof, |
---|
698 | !-- 93 - thermal conductivity 3rd wall layer roof, 94 - thermal conductivity 4th wall layer roof, |
---|
699 | !-- 95 - wall emissivity roof, 96 - wall albedo roof, 97 - window fraction roof, |
---|
700 | !-- 98 - window 1st layer thickness roof, 99 - window 2nd layer thickness roof, 100 - window 3rd layer thickness roof, |
---|
701 | !-- 101 - window 4th layer thickness, 102 - heat capacity 1st/2nd window layer roof, |
---|
702 | !-- 103 - heat capacity 3rd window layer roof, 104 - heat capacity 4th window layer roof, |
---|
703 | !-- 105 - thermal conductivity 1st/2nd window layer roof, 106 - thermal conductivity 3rd window layer roof, |
---|
704 | !-- 107 - thermal conductivity 4th window layer roof, 108 - window emissivity roof, 109 - window transmissivity roof, |
---|
705 | !-- 110 - window albedo roof, 111 - green fraction roof ground floor level, |
---|
706 | !-- 112 - green fraction roof above ground floor level, 113 - LAI roof, 114 - green emissivity roof, |
---|
707 | !-- 115 - green albedo roof, 116 - green type roof, |
---|
708 | !-- Parameter for indoor model |
---|
709 | !-- 117 - indoor target summer temperature, 118 - indoor target winter temperature, |
---|
710 | !-- 119 - shading factor, 120 - g-value windows, 121 - u-value windows, 122 - basical airflow without occupancy of the room, |
---|
711 | !-- 123 - additional airflow depend of occupancy of the room, 124 - heat recovery efficiency, |
---|
712 | !-- 125 - dynamic parameter specific effective surface, 126 - dynamic parameter innner heatstorage, |
---|
713 | !-- 127 - ratio internal surface/floor area, 128 - maximal heating capacity, 129 - maximal cooling capacity, |
---|
714 | !-- 130 - additional internal heat gains dependent on occupancy of the room, |
---|
715 | !-- 131 - basic internal heat gains without occupancy of the room, 132 - storey height, 133 - ceiling construction height |
---|
716 | |
---|
717 | |
---|
718 | REAL(wp), DIMENSION(0:133,1:7), PARAMETER :: building_pars = RESHAPE( (/ & |
---|
719 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
720 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
721 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
722 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
723 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
724 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
725 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
726 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
727 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
728 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
729 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
730 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
731 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
732 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
733 | 2.1_wp, 0.93_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
734 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
735 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
736 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
737 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
738 | 0.005_wp, 0.01_wp, 0.31_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
739 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
740 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
741 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
742 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
743 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
744 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
745 | 0.1_wp, 0.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
746 | 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 |
---|
747 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
748 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.42_wp, 2000000.0_wp, & !parameter 6-11 |
---|
749 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
750 | 0.01_wp, 0.001_wp, 0.78_wp, & !parameter 18-20 |
---|
751 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
752 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
753 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
754 | 27.0_wp, 0.22_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
755 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
756 | 0.11_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 41-44 |
---|
757 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
758 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.73_wp, 0.005_wp, & !parameter 50-54 |
---|
759 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
760 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
761 | 0.04_wp, 0.92_wp, 27.0_wp, 0.27_wp, & !parameter 63-66 |
---|
762 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
763 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
764 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
765 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
766 | 0.005_wp, 0.01_wp, 0.5_wp, 0.79_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
767 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
768 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
769 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
770 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
771 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
772 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
773 | 0.1_wp, 0.5_wp, 0.0_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
774 | 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 |
---|
775 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
776 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
777 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
778 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
779 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
780 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
781 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
782 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
783 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
784 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
785 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
786 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
787 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
788 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
789 | 0.035_wp, 0.92_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
790 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
791 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
792 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
793 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
794 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
795 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
796 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
797 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
798 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
799 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
800 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
801 | 0.1_wp, 0.5_wp, 0.8_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
802 | 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 |
---|
803 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
804 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
805 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
806 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
807 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
808 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
809 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
810 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
811 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
812 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
813 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
814 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
815 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
816 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
817 | 2.1_wp, 0.93_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
818 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
819 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
820 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
821 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
822 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
823 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
824 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
825 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
826 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
827 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
828 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
829 | 0.1_wp, 1.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
830 | 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 |
---|
831 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
832 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 6-11 |
---|
833 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
834 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
835 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
836 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
837 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
838 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
839 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
840 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, & !parameter 41-44 |
---|
841 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
842 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
843 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
844 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
845 | 0.04_wp, 0.92_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
846 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
847 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
848 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
849 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
850 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
851 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
852 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
853 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
854 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
855 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
856 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
857 | 0.1_wp, 1.5_wp, 0.65_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
858 | 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 |
---|
859 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
860 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
861 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
862 | 0.01_wp, 0.001_wp, 0.475_wp, & !parameter 18-20 |
---|
863 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
864 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
865 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
866 | 27.0_wp, 0.525_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
867 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
868 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
869 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
870 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.425_wp, 0.005_wp, & !parameter 50-54 |
---|
871 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
872 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
873 | 0.035_wp, 0.92_wp, 27.0_wp, 0.575_wp, & !parameter 63-66 |
---|
874 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
875 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
876 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
877 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
878 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
879 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
880 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
881 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
882 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
883 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
884 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
885 | 0.1_wp, 1.5_wp, 0.9_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
886 | 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 |
---|
887 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
888 | 1.0_wp, 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 6-11 |
---|
889 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 4.0_wp, & !parameter 12-17 |
---|
890 | 0.01_wp, 0.001_wp, 1.0_wp, & !parameter 18-20 |
---|
891 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 21-25 |
---|
892 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, & !parameter 26-28 |
---|
893 | 1.0_wp, 1.0_wp, 0.9_wp, & !parameter 29-31 |
---|
894 | 27.0_wp, 0.0_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
895 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
896 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, & !parameter 41-44 |
---|
897 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
898 | 5.0_wp, 0.001_wp, 0.0001_wp, 1.0_wp, 0.29_wp, & !parameter 50-54 |
---|
899 | 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 55-58 |
---|
900 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, & !parameter 59-62 |
---|
901 | 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 63-66 |
---|
902 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
903 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
904 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
905 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
906 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, 1848000.0_wp, & !parameter 85-90 |
---|
907 | 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
908 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
909 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
910 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
911 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
912 | 299.15_wp, 293.15_wp, 0.8_wp, 100.0_wp, 100.0_wp, & !parameter 117-121 |
---|
913 | 20.0_wp, 20.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 4.5_wp, & !parameter 122-127 |
---|
914 | 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) |
---|
915 | /), & |
---|
916 | (/134, 7/) ) |
---|
917 | |
---|
918 | ! |
---|
919 | !-- Type for surface temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
920 | TYPE t_surf_vertical |
---|
921 | REAL(wp), DIMENSION(:), ALLOCATABLE :: t |
---|
922 | END TYPE t_surf_vertical |
---|
923 | ! |
---|
924 | !-- Type for wall temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
925 | TYPE t_wall_vertical |
---|
926 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t |
---|
927 | END TYPE t_wall_vertical |
---|
928 | |
---|
929 | TYPE surf_type_usm |
---|
930 | REAL(wp), DIMENSION(:), ALLOCATABLE :: var_usm_1d !< 1D prognostic variable |
---|
931 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: var_usm_2d !< 2D prognostic variable |
---|
932 | END TYPE surf_type_usm |
---|
933 | |
---|
934 | #if defined( __nopointer ) |
---|
935 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
936 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
937 | |
---|
938 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
939 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
940 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
941 | #else |
---|
942 | TYPE(surf_type_usm), POINTER :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
943 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
944 | |
---|
945 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h_1, & !< |
---|
946 | m_liq_usm_h_2 !< |
---|
947 | |
---|
948 | TYPE(surf_type_usm), DIMENSION(:), POINTER :: & |
---|
949 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
950 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
951 | |
---|
952 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
953 | m_liq_usm_v_1, & !< |
---|
954 | m_liq_usm_v_2 !< |
---|
955 | #endif |
---|
956 | |
---|
957 | TYPE(surf_type_usm), TARGET :: tm_liq_usm_h_m !< liquid water reservoir tendency (m), horizontal surface elements |
---|
958 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: tm_liq_usm_v_m !< liquid water reservoir tendency (m), vertical surface elements |
---|
959 | |
---|
960 | |
---|
961 | !-- arrays for time averages |
---|
962 | !-- Attention: the variable rad_net_av is also used in the 3d field variable in radiation_model_mod.f90. It may be better to rename it |
---|
963 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinsw_av !< average of sw radiation falling to local surface including radiation from reflections |
---|
964 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlw_av !< average of lw radiation falling to local surface including radiation from reflections |
---|
965 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswdir_av !< average of direct sw radiation falling to local surface |
---|
966 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswdif_av !< average of diffuse sw radiation from sky and model boundary falling to local surface |
---|
967 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlwdif_av !< average of diffuse lw radiation from sky and model boundary falling to local surface |
---|
968 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswref_av !< average of sw radiation falling to surface from reflections |
---|
969 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlwref_av !< average of lw radiation falling to surface from reflections |
---|
970 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfoutsw_av !< average of total sw radiation outgoing from nonvirtual surfaces surfaces after all reflection |
---|
971 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfoutlw_av !< average of total lw radiation outgoing from nonvirtual surfaces surfaces after all reflection |
---|
972 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfins_av !< average of array of residua of sw radiation absorbed in surface after last reflection |
---|
973 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinl_av !< average of array of residua of lw radiation absorbed in surface after last reflection |
---|
974 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinlw_av !< Average of pcbinlw |
---|
975 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinsw_av !< Average of pcbinsw |
---|
976 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinswdir_av !< Average of pcbinswdir |
---|
977 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinswdif_av !< Average of pcbinswdif |
---|
978 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinswref_av !< Average of pcbinswref |
---|
979 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfhf_av !< average of total radiation flux incoming to minus outgoing from local surface |
---|
980 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_av !< average of wghf_eb |
---|
981 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wshf_eb_av !< average of wshf_eb |
---|
982 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_wall_av !< Average of t_wall |
---|
983 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_green_av !< average of wghf_eb_green |
---|
984 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_green_av !< Average of t_green |
---|
985 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_window_av !< average of wghf_eb_window |
---|
986 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_window_av !< Average of t_window |
---|
987 | REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_eb_av !< average of qsws_eb |
---|
988 | REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg_eb_av !< average of qsws_veg_eb |
---|
989 | REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq_eb_av !< average of qsws_liq_eb |
---|
990 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: swc_av !< Average of swc |
---|
991 | |
---|
992 | |
---|
993 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
994 | !-- anthropogenic heat sources |
---|
995 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
996 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: aheat !< daily average of anthropogenic heat (W/m2) |
---|
997 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: aheatprof !< diurnal profiles of anthropogenic heat for particular layers |
---|
998 | INTEGER(iwp) :: naheatlayers = 1 !< number of layers of anthropogenic heat |
---|
999 | |
---|
1000 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1001 | !-- wall surface model |
---|
1002 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1003 | !-- wall surface model constants |
---|
1004 | INTEGER(iwp), PARAMETER :: nzb_wall = 0 !< inner side of the wall model (to be switched) |
---|
1005 | INTEGER(iwp), PARAMETER :: nzt_wall = 3 !< outer side of the wall model (to be switched) |
---|
1006 | INTEGER(iwp), PARAMETER :: nzw = 4 !< number of wall layers (fixed for now) |
---|
1007 | |
---|
1008 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
1009 | !< normalized soil, wall and roof layer depths (m/m) |
---|
1010 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
1011 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
1012 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
1013 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
1014 | !< normalized window layer depths (m/m) |
---|
1015 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
1016 | !< normalized green layer depths (m/m) |
---|
1017 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
1018 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
1019 | |
---|
1020 | |
---|
1021 | REAL(wp) :: wall_inner_temperature = 295.0_wp !< temperature of the inner wall surface (~22 degrees C) (K) |
---|
1022 | REAL(wp) :: roof_inner_temperature = 295.0_wp !< temperature of the inner roof surface (~22 degrees C) (K) |
---|
1023 | REAL(wp) :: soil_inner_temperature = 288.0_wp !< temperature of the deep soil (~15 degrees C) (K) |
---|
1024 | REAL(wp) :: window_inner_temperature = 295.0_wp !< temperature of the inner window surface (~22 degrees C) (K) |
---|
1025 | |
---|
1026 | REAL(wp) :: m_total = 0.0_wp !< weighted total water content of the soil (m3/m3) |
---|
1027 | INTEGER(iwp) :: soil_type |
---|
1028 | |
---|
1029 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1030 | !-- surface and material model variables for walls, ground, roofs |
---|
1031 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1032 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn !< normalized wall layer depths (m) |
---|
1033 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_window !< normalized window layer depths (m) |
---|
1034 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_green !< normalized green layer depths (m) |
---|
1035 | |
---|
1036 | #if defined( __nopointer ) |
---|
1037 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h !< wall surface temperature (K) at horizontal walls |
---|
1038 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_p !< progn. wall surface temperature (K) at horizontal walls |
---|
1039 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h !< window surface temperature (K) at horizontal walls |
---|
1040 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_p !< progn. window surface temperature (K) at horizontal walls |
---|
1041 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h !< green surface temperature (K) at horizontal walls |
---|
1042 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_p !< progn. green surface temperature (K) at horizontal walls |
---|
1043 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h !< near surface temperature (10cm) (K) at horizontal walls |
---|
1044 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_p !< progn. near surface temperature (10cm) (K) at horizontal walls |
---|
1045 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v |
---|
1046 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_p |
---|
1047 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v |
---|
1048 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_p |
---|
1049 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v |
---|
1050 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_p |
---|
1051 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v |
---|
1052 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_p |
---|
1053 | #else |
---|
1054 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h |
---|
1055 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h_p |
---|
1056 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h |
---|
1057 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h_p |
---|
1058 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h |
---|
1059 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h_p |
---|
1060 | REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h |
---|
1061 | REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h_p |
---|
1062 | |
---|
1063 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_1 |
---|
1064 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_2 |
---|
1065 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_1 |
---|
1066 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_2 |
---|
1067 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_1 |
---|
1068 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_2 |
---|
1069 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_1 |
---|
1070 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_2 |
---|
1071 | |
---|
1072 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v |
---|
1073 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v_p |
---|
1074 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v |
---|
1075 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v_p |
---|
1076 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v |
---|
1077 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v_p |
---|
1078 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v |
---|
1079 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v_p |
---|
1080 | |
---|
1081 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_1 |
---|
1082 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_2 |
---|
1083 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_1 |
---|
1084 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_2 |
---|
1085 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_1 |
---|
1086 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_2 |
---|
1087 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_1 |
---|
1088 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_2 |
---|
1089 | |
---|
1090 | #endif |
---|
1091 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_av !< average of wall surface temperature (K) |
---|
1092 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_av !< average of window surface temperature (K) |
---|
1093 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_av !< average of green wall surface temperature (K) |
---|
1094 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_av !< average of whole wall surface temperature (K) |
---|
1095 | |
---|
1096 | !-- Temporal tendencies for time stepping |
---|
1097 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_wall_m !< surface temperature tendency of wall (K) |
---|
1098 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_window_m !< surface temperature tendency of window (K) |
---|
1099 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_green_m !< surface temperature tendency of green wall (K) |
---|
1100 | |
---|
1101 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1102 | !-- Energy balance variables |
---|
1103 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1104 | !-- parameters of the land, roof and wall surfaces |
---|
1105 | |
---|
1106 | #if defined( __nopointer ) |
---|
1107 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h !< Wall temperature (K) |
---|
1108 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_av !< Average of t_wall |
---|
1109 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_p !< Prog. wall temperature (K) |
---|
1110 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h !< Window temperature (K) |
---|
1111 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_av !< Average of t_window |
---|
1112 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_p !< Prog. window temperature (K) |
---|
1113 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h !< Green temperature (K) |
---|
1114 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_av !< Average of t_green |
---|
1115 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_p !< Prog. green temperature (K) |
---|
1116 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h !< soil water content green building layer |
---|
1117 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_av !< avg of soil water content green building layer |
---|
1118 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_p !< Prog. soil water content green building layer |
---|
1119 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_sat_h !< soil water content green building layer at saturation |
---|
1120 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_res_h !< soil water content green building layer residual |
---|
1121 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: rootfr_h !< root fraction green green building layer |
---|
1122 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: wilt_h !< wilting point green building layer |
---|
1123 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: fc_h !< field capacity green building layer |
---|
1124 | |
---|
1125 | |
---|
1126 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v !< Wall temperature (K) |
---|
1127 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_av !< Average of t_wall |
---|
1128 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_p !< Prog. wall temperature (K) |
---|
1129 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v !< Window temperature (K) |
---|
1130 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_av !< Average of t_window |
---|
1131 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_p !< Prog. window temperature (K) |
---|
1132 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v !< Green temperature (K) |
---|
1133 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_av !< Average of t_green |
---|
1134 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_p !< Prog. green temperature (K) |
---|
1135 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v !< Wall swc |
---|
1136 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_av !< Average of swc |
---|
1137 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_p !< Prog. swc |
---|
1138 | |
---|
1139 | #else |
---|
1140 | REAL(wp), DIMENSION(:,:), POINTER :: t_wall_h, t_wall_h_p |
---|
1141 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_av, t_wall_h_1, t_wall_h_2 |
---|
1142 | REAL(wp), DIMENSION(:,:), POINTER :: t_window_h, t_window_h_p |
---|
1143 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_av, t_window_h_1, t_window_h_2 |
---|
1144 | REAL(wp), DIMENSION(:,:), POINTER :: t_green_h, t_green_h_p |
---|
1145 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_av, t_green_h_1, t_green_h_2 |
---|
1146 | REAL(wp), DIMENSION(:,:), POINTER :: swc_h, rootfr_h, wilt_h, fc_h, swc_sat_h, swc_h_p, swc_res_h |
---|
1147 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_1, rootfr_h_1, & |
---|
1148 | wilt_h_1, fc_h_1, swc_sat_h_1, swc_h_2, swc_res_h_1 |
---|
1149 | |
---|
1150 | |
---|
1151 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_wall_v, t_wall_v_p |
---|
1152 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_av, t_wall_v_1, t_wall_v_2 |
---|
1153 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_window_v, t_window_v_p |
---|
1154 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_av, t_window_v_1, t_window_v_2 |
---|
1155 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_green_v, t_green_v_p |
---|
1156 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_av, t_green_v_1, t_green_v_2 |
---|
1157 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: swc_v, swc_v_p |
---|
1158 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_av, swc_v_1, swc_v_2 |
---|
1159 | #endif |
---|
1160 | |
---|
1161 | !-- Wall temporal tendencies for time stepping |
---|
1162 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_wall_m !< t_wall prognostic array |
---|
1163 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_window_m !< t_window prognostic array |
---|
1164 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_green_m !< t_green prognostic array |
---|
1165 | |
---|
1166 | !-- Surface and material parameters classes (surface_type) |
---|
1167 | !-- albedo, emissivity, lambda_surf, roughness, thickness, volumetric heat capacity, thermal conductivity |
---|
1168 | INTEGER(iwp) :: n_surface_types !< number of the wall type categories |
---|
1169 | INTEGER(iwp), PARAMETER :: n_surface_params = 9 !< number of parameters for each type of the wall |
---|
1170 | INTEGER(iwp), PARAMETER :: ialbedo = 1 !< albedo of the surface |
---|
1171 | INTEGER(iwp), PARAMETER :: iemiss = 2 !< emissivity of the surface |
---|
1172 | INTEGER(iwp), PARAMETER :: ilambdas = 3 !< heat conductivity lambda S between surface and material ( W m-2 K-1 ) |
---|
1173 | INTEGER(iwp), PARAMETER :: irough = 4 !< roughness length z0 for movements |
---|
1174 | INTEGER(iwp), PARAMETER :: iroughh = 5 !< roughness length z0h for scalars (heat, humidity,...) |
---|
1175 | INTEGER(iwp), PARAMETER :: icsurf = 6 !< Surface skin layer heat capacity (J m-2 K-1 ) |
---|
1176 | INTEGER(iwp), PARAMETER :: ithick = 7 !< thickness of the surface (wall, roof, land) ( m ) |
---|
1177 | INTEGER(iwp), PARAMETER :: irhoC = 8 !< volumetric heat capacity rho*C of the material ( J m-3 K-1 ) |
---|
1178 | INTEGER(iwp), PARAMETER :: ilambdah = 9 !< thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
1179 | CHARACTER(12), DIMENSION(:), ALLOCATABLE :: surface_type_names !< names of wall types (used only for reports) |
---|
1180 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: surface_type_codes !< codes of wall types |
---|
1181 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: surface_params !< parameters of wall types |
---|
1182 | |
---|
1183 | |
---|
1184 | !-- interfaces of subroutines accessed from outside of this module |
---|
1185 | INTERFACE usm_boundary_condition |
---|
1186 | MODULE PROCEDURE usm_boundary_condition |
---|
1187 | END INTERFACE usm_boundary_condition |
---|
1188 | |
---|
1189 | INTERFACE usm_check_data_output |
---|
1190 | MODULE PROCEDURE usm_check_data_output |
---|
1191 | END INTERFACE usm_check_data_output |
---|
1192 | |
---|
1193 | INTERFACE usm_check_parameters |
---|
1194 | MODULE PROCEDURE usm_check_parameters |
---|
1195 | END INTERFACE usm_check_parameters |
---|
1196 | |
---|
1197 | INTERFACE usm_data_output_3d |
---|
1198 | MODULE PROCEDURE usm_data_output_3d |
---|
1199 | END INTERFACE usm_data_output_3d |
---|
1200 | |
---|
1201 | INTERFACE usm_define_netcdf_grid |
---|
1202 | MODULE PROCEDURE usm_define_netcdf_grid |
---|
1203 | END INTERFACE usm_define_netcdf_grid |
---|
1204 | |
---|
1205 | INTERFACE usm_init_urban_surface |
---|
1206 | MODULE PROCEDURE usm_init_urban_surface |
---|
1207 | END INTERFACE usm_init_urban_surface |
---|
1208 | |
---|
1209 | INTERFACE usm_material_heat_model |
---|
1210 | MODULE PROCEDURE usm_material_heat_model |
---|
1211 | END INTERFACE usm_material_heat_model |
---|
1212 | |
---|
1213 | INTERFACE usm_green_heat_model |
---|
1214 | MODULE PROCEDURE usm_green_heat_model |
---|
1215 | END INTERFACE usm_green_heat_model |
---|
1216 | |
---|
1217 | INTERFACE usm_parin |
---|
1218 | MODULE PROCEDURE usm_parin |
---|
1219 | END INTERFACE usm_parin |
---|
1220 | |
---|
1221 | INTERFACE usm_temperature_near_surface |
---|
1222 | MODULE PROCEDURE usm_temperature_near_surface |
---|
1223 | END INTERFACE usm_temperature_near_surface |
---|
1224 | |
---|
1225 | INTERFACE usm_rrd_local |
---|
1226 | MODULE PROCEDURE usm_rrd_local |
---|
1227 | END INTERFACE usm_rrd_local |
---|
1228 | |
---|
1229 | INTERFACE usm_surface_energy_balance |
---|
1230 | MODULE PROCEDURE usm_surface_energy_balance |
---|
1231 | END INTERFACE usm_surface_energy_balance |
---|
1232 | |
---|
1233 | INTERFACE usm_swap_timelevel |
---|
1234 | MODULE PROCEDURE usm_swap_timelevel |
---|
1235 | END INTERFACE usm_swap_timelevel |
---|
1236 | |
---|
1237 | INTERFACE usm_wrd_local |
---|
1238 | MODULE PROCEDURE usm_wrd_local |
---|
1239 | END INTERFACE usm_wrd_local |
---|
1240 | |
---|
1241 | INTERFACE usm_allocate_surface |
---|
1242 | MODULE PROCEDURE usm_allocate_surface |
---|
1243 | END INTERFACE usm_allocate_surface |
---|
1244 | |
---|
1245 | INTERFACE usm_average_3d_data |
---|
1246 | MODULE PROCEDURE usm_average_3d_data |
---|
1247 | END INTERFACE usm_average_3d_data |
---|
1248 | |
---|
1249 | |
---|
1250 | SAVE |
---|
1251 | |
---|
1252 | PRIVATE |
---|
1253 | |
---|
1254 | !-- Public functions |
---|
1255 | PUBLIC usm_boundary_condition, usm_check_parameters, usm_init_urban_surface,& |
---|
1256 | usm_rrd_local, & |
---|
1257 | usm_surface_energy_balance, usm_material_heat_model, & |
---|
1258 | usm_swap_timelevel, usm_check_data_output, usm_average_3d_data, & |
---|
1259 | usm_data_output_3d, usm_define_netcdf_grid, usm_parin, & |
---|
1260 | usm_wrd_local, usm_allocate_surface |
---|
1261 | |
---|
1262 | !-- Public parameters, constants and initial values |
---|
1263 | PUBLIC usm_anthropogenic_heat, usm_material_model, usm_wall_mod, & |
---|
1264 | usm_green_heat_model, usm_temperature_near_surface, building_pars, & |
---|
1265 | nzt_wall, t_surf_10cm_h, t_surf_10cm_v, t_wall_h, t_wall_v, & |
---|
1266 | t_window_h, t_window_v, building_type |
---|
1267 | |
---|
1268 | |
---|
1269 | |
---|
1270 | CONTAINS |
---|
1271 | |
---|
1272 | !------------------------------------------------------------------------------! |
---|
1273 | ! Description: |
---|
1274 | ! ------------ |
---|
1275 | !> This subroutine creates the necessary indices of the urban surfaces |
---|
1276 | !> and plant canopy and it allocates the needed arrays for USM |
---|
1277 | !------------------------------------------------------------------------------! |
---|
1278 | SUBROUTINE usm_allocate_surface |
---|
1279 | |
---|
1280 | IMPLICIT NONE |
---|
1281 | |
---|
1282 | INTEGER(iwp) :: l |
---|
1283 | |
---|
1284 | ! |
---|
1285 | !-- Allocate radiation arrays which are part of the new data type. |
---|
1286 | !-- For horizontal surfaces. |
---|
1287 | ALLOCATE( surf_usm_h%surfhf(1:surf_usm_h%ns) ) |
---|
1288 | ALLOCATE( surf_usm_h%rad_net_l(1:surf_usm_h%ns) ) |
---|
1289 | ! |
---|
1290 | !-- For vertical surfaces |
---|
1291 | DO l = 0, 3 |
---|
1292 | ALLOCATE( surf_usm_v(l)%surfhf(1:surf_usm_v(l)%ns) ) |
---|
1293 | ALLOCATE( surf_usm_v(l)%rad_net_l(1:surf_usm_v(l)%ns) ) |
---|
1294 | ENDDO |
---|
1295 | |
---|
1296 | !-- Wall surface model |
---|
1297 | !-- allocate arrays for wall surface model and define pointers |
---|
1298 | |
---|
1299 | !-- allocate array of wall types and wall parameters |
---|
1300 | ALLOCATE ( surf_usm_h%surface_types(1:surf_usm_h%ns) ) |
---|
1301 | ALLOCATE ( surf_usm_h%building_type(1:surf_usm_h%ns) ) |
---|
1302 | ALLOCATE ( surf_usm_h%building_type_name(1:surf_usm_h%ns) ) |
---|
1303 | surf_usm_h%building_type = 0 |
---|
1304 | surf_usm_h%building_type_name = 'none' |
---|
1305 | DO l = 0, 3 |
---|
1306 | ALLOCATE( surf_usm_v(l)%surface_types(1:surf_usm_v(l)%ns) ) |
---|
1307 | ALLOCATE ( surf_usm_v(l)%building_type(1:surf_usm_v(l)%ns) ) |
---|
1308 | ALLOCATE ( surf_usm_v(l)%building_type_name(1:surf_usm_v(l)%ns) ) |
---|
1309 | surf_usm_v(l)%building_type = 0 |
---|
1310 | surf_usm_v(l)%building_type_name = 'none' |
---|
1311 | ENDDO |
---|
1312 | ! |
---|
1313 | !-- Allocate albedo_type and albedo. Each surface element |
---|
1314 | !-- has 3 values, 0: wall fraction, 1: green fraction, 2: window fraction. |
---|
1315 | ALLOCATE( surf_usm_h%albedo_type(0:2,1:surf_usm_h%ns) ) |
---|
1316 | ALLOCATE( surf_usm_h%albedo(0:2,1:surf_usm_h%ns) ) |
---|
1317 | surf_usm_h%albedo_type = albedo_type |
---|
1318 | DO l = 0, 3 |
---|
1319 | ALLOCATE( surf_usm_v(l)%albedo_type(0:2,1:surf_usm_v(l)%ns) ) |
---|
1320 | ALLOCATE( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns) ) |
---|
1321 | surf_usm_v(l)%albedo_type = albedo_type |
---|
1322 | ENDDO |
---|
1323 | |
---|
1324 | |
---|
1325 | ! |
---|
1326 | !-- Allocate indoor target temperature for summer and winter |
---|
1327 | ALLOCATE( surf_usm_h%target_temp_summer(1:surf_usm_h%ns) ) |
---|
1328 | ALLOCATE( surf_usm_h%target_temp_winter(1:surf_usm_h%ns) ) |
---|
1329 | DO l = 0, 3 |
---|
1330 | ALLOCATE( surf_usm_v(l)%target_temp_summer(1:surf_usm_v(l)%ns) ) |
---|
1331 | ALLOCATE( surf_usm_v(l)%target_temp_winter(1:surf_usm_v(l)%ns) ) |
---|
1332 | ENDDO |
---|
1333 | ! |
---|
1334 | !-- Allocate flag indicating ground floor level surface elements |
---|
1335 | ALLOCATE ( surf_usm_h%ground_level(1:surf_usm_h%ns) ) |
---|
1336 | DO l = 0, 3 |
---|
1337 | ALLOCATE( surf_usm_v(l)%ground_level(1:surf_usm_v(l)%ns) ) |
---|
1338 | ENDDO |
---|
1339 | ! |
---|
1340 | !-- Allocate arrays for relative surface fraction. |
---|
1341 | !-- 0 - wall fraction, 1 - green fraction, 2 - window fraction |
---|
1342 | ALLOCATE( surf_usm_h%frac(0:2,1:surf_usm_h%ns) ) |
---|
1343 | surf_usm_h%frac = 0.0_wp |
---|
1344 | DO l = 0, 3 |
---|
1345 | ALLOCATE( surf_usm_v(l)%frac(0:2,1:surf_usm_v(l)%ns) ) |
---|
1346 | surf_usm_v(l)%frac = 0.0_wp |
---|
1347 | ENDDO |
---|
1348 | |
---|
1349 | !-- wall and roof surface parameters. First for horizontal surfaces |
---|
1350 | ALLOCATE ( surf_usm_h%isroof_surf(1:surf_usm_h%ns) ) |
---|
1351 | ALLOCATE ( surf_usm_h%lambda_surf(1:surf_usm_h%ns) ) |
---|
1352 | ALLOCATE ( surf_usm_h%lambda_surf_window(1:surf_usm_h%ns) ) |
---|
1353 | ALLOCATE ( surf_usm_h%lambda_surf_green(1:surf_usm_h%ns) ) |
---|
1354 | ALLOCATE ( surf_usm_h%c_surface(1:surf_usm_h%ns) ) |
---|
1355 | ALLOCATE ( surf_usm_h%c_surface_window(1:surf_usm_h%ns) ) |
---|
1356 | ALLOCATE ( surf_usm_h%c_surface_green(1:surf_usm_h%ns) ) |
---|
1357 | ALLOCATE ( surf_usm_h%transmissivity(1:surf_usm_h%ns) ) |
---|
1358 | ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns) ) |
---|
1359 | ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns) ) |
---|
1360 | ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns) ) |
---|
1361 | ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns) ) |
---|
1362 | ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns) ) |
---|
1363 | ALLOCATE ( surf_usm_h%green_type_roof(1:surf_usm_h%ns) ) |
---|
1364 | ALLOCATE ( surf_usm_h%r_s(1:surf_usm_h%ns) ) |
---|
1365 | ! |
---|
1366 | !-- For vertical surfaces. |
---|
1367 | DO l = 0, 3 |
---|
1368 | ALLOCATE ( surf_usm_v(l)%lambda_surf(1:surf_usm_v(l)%ns) ) |
---|
1369 | ALLOCATE ( surf_usm_v(l)%c_surface(1:surf_usm_v(l)%ns) ) |
---|
1370 | ALLOCATE ( surf_usm_v(l)%lambda_surf_window(1:surf_usm_v(l)%ns) ) |
---|
1371 | ALLOCATE ( surf_usm_v(l)%c_surface_window(1:surf_usm_v(l)%ns) ) |
---|
1372 | ALLOCATE ( surf_usm_v(l)%lambda_surf_green(1:surf_usm_v(l)%ns) ) |
---|
1373 | ALLOCATE ( surf_usm_v(l)%c_surface_green(1:surf_usm_v(l)%ns) ) |
---|
1374 | ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns) ) |
---|
1375 | ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns) ) |
---|
1376 | ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns) ) |
---|
1377 | ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) |
---|
1378 | ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) |
---|
1379 | ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) |
---|
1380 | |
---|
1381 | ALLOCATE ( surf_usm_v(l)%r_s(1:surf_usm_v(l)%ns) ) |
---|
1382 | ENDDO |
---|
1383 | |
---|
1384 | ! |
---|
1385 | !-- allocate wall and roof material parameters. First for horizontal surfaces |
---|
1386 | ALLOCATE ( surf_usm_h%thickness_wall(1:surf_usm_h%ns) ) |
---|
1387 | ALLOCATE ( surf_usm_h%thickness_window(1:surf_usm_h%ns) ) |
---|
1388 | ALLOCATE ( surf_usm_h%thickness_green(1:surf_usm_h%ns) ) |
---|
1389 | ALLOCATE ( surf_usm_h%lambda_h(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1390 | ALLOCATE ( surf_usm_h%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1391 | ALLOCATE ( surf_usm_h%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1392 | ALLOCATE ( surf_usm_h%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1393 | ALLOCATE ( surf_usm_h%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1394 | ALLOCATE ( surf_usm_h%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1395 | |
---|
1396 | ALLOCATE ( surf_usm_h%rho_c_total_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1397 | ALLOCATE ( surf_usm_h%n_vg_green(1:surf_usm_h%ns) ) |
---|
1398 | ALLOCATE ( surf_usm_h%alpha_vg_green(1:surf_usm_h%ns) ) |
---|
1399 | ALLOCATE ( surf_usm_h%l_vg_green(1:surf_usm_h%ns) ) |
---|
1400 | ALLOCATE ( surf_usm_h%gamma_w_green_sat(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1401 | ALLOCATE ( surf_usm_h%lambda_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1402 | ALLOCATE ( surf_usm_h%gamma_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1403 | ALLOCATE ( surf_usm_h%tswc_h_m(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1404 | |
---|
1405 | ! |
---|
1406 | !-- For vertical surfaces. |
---|
1407 | DO l = 0, 3 |
---|
1408 | ALLOCATE ( surf_usm_v(l)%thickness_wall(1:surf_usm_v(l)%ns) ) |
---|
1409 | ALLOCATE ( surf_usm_v(l)%thickness_window(1:surf_usm_v(l)%ns) ) |
---|
1410 | ALLOCATE ( surf_usm_v(l)%thickness_green(1:surf_usm_v(l)%ns) ) |
---|
1411 | ALLOCATE ( surf_usm_v(l)%lambda_h(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1412 | ALLOCATE ( surf_usm_v(l)%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1413 | ALLOCATE ( surf_usm_v(l)%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1414 | ALLOCATE ( surf_usm_v(l)%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1415 | ALLOCATE ( surf_usm_v(l)%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1416 | ALLOCATE ( surf_usm_v(l)%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1417 | ENDDO |
---|
1418 | |
---|
1419 | ! |
---|
1420 | !-- allocate green wall and roof vegetation and soil parameters. First horizontal surfaces |
---|
1421 | ALLOCATE ( surf_usm_h%g_d(1:surf_usm_h%ns) ) |
---|
1422 | ALLOCATE ( surf_usm_h%c_liq(1:surf_usm_h%ns) ) |
---|
1423 | ALLOCATE ( surf_usm_h%qsws_liq_eb(1:surf_usm_h%ns) ) |
---|
1424 | ALLOCATE ( surf_usm_h%qsws_veg_eb(1:surf_usm_h%ns) ) |
---|
1425 | ALLOCATE ( surf_usm_h%r_canopy(1:surf_usm_h%ns) ) |
---|
1426 | ALLOCATE ( surf_usm_h%r_canopy_min(1:surf_usm_h%ns) ) |
---|
1427 | ALLOCATE ( surf_usm_h%qsws_eb(1:surf_usm_h%ns) ) |
---|
1428 | |
---|
1429 | ! |
---|
1430 | !-- For vertical surfaces. |
---|
1431 | DO l = 0, 3 |
---|
1432 | ALLOCATE ( surf_usm_v(l)%g_d(1:surf_usm_v(l)%ns) ) |
---|
1433 | ALLOCATE ( surf_usm_v(l)%c_liq(1:surf_usm_v(l)%ns) ) |
---|
1434 | ALLOCATE ( surf_usm_v(l)%qsws_liq_eb(1:surf_usm_v(l)%ns) ) |
---|
1435 | ALLOCATE ( surf_usm_v(l)%qsws_veg_eb(1:surf_usm_v(l)%ns) ) |
---|
1436 | ALLOCATE ( surf_usm_v(l)%qsws_eb(1:surf_usm_v(l)%ns) ) |
---|
1437 | ALLOCATE ( surf_usm_v(l)%r_canopy(1:surf_usm_v(l)%ns) ) |
---|
1438 | ALLOCATE ( surf_usm_v(l)%r_canopy_min(1:surf_usm_v(l)%ns) ) |
---|
1439 | ENDDO |
---|
1440 | |
---|
1441 | !-- allocate wall and roof layers sizes. For horizontal surfaces. |
---|
1442 | ALLOCATE ( zwn(nzb_wall:nzt_wall) ) |
---|
1443 | ALLOCATE ( surf_usm_h%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1444 | ALLOCATE ( zwn_window(nzb_wall:nzt_wall) ) |
---|
1445 | ALLOCATE ( surf_usm_h%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1446 | ALLOCATE ( zwn_green(nzb_wall:nzt_wall) ) |
---|
1447 | ALLOCATE ( surf_usm_h%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1448 | ALLOCATE ( surf_usm_h%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1449 | ALLOCATE ( surf_usm_h%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1450 | ALLOCATE ( surf_usm_h%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1451 | ALLOCATE ( surf_usm_h%zw(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1452 | ALLOCATE ( surf_usm_h%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1453 | ALLOCATE ( surf_usm_h%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1454 | ALLOCATE ( surf_usm_h%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1455 | ALLOCATE ( surf_usm_h%zw_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1456 | ALLOCATE ( surf_usm_h%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1457 | ALLOCATE ( surf_usm_h%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1458 | ALLOCATE ( surf_usm_h%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1459 | ALLOCATE ( surf_usm_h%zw_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1460 | ! |
---|
1461 | !-- For vertical surfaces. |
---|
1462 | DO l = 0, 3 |
---|
1463 | ALLOCATE ( surf_usm_v(l)%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1464 | ALLOCATE ( surf_usm_v(l)%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1465 | ALLOCATE ( surf_usm_v(l)%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1466 | ALLOCATE ( surf_usm_v(l)%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1467 | ALLOCATE ( surf_usm_v(l)%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1468 | ALLOCATE ( surf_usm_v(l)%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1469 | ALLOCATE ( surf_usm_v(l)%zw(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1470 | ALLOCATE ( surf_usm_v(l)%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1471 | ALLOCATE ( surf_usm_v(l)%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1472 | ALLOCATE ( surf_usm_v(l)%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1473 | ALLOCATE ( surf_usm_v(l)%zw_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1474 | ALLOCATE ( surf_usm_v(l)%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1475 | ALLOCATE ( surf_usm_v(l)%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1476 | ALLOCATE ( surf_usm_v(l)%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1477 | ALLOCATE ( surf_usm_v(l)%zw_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1478 | ENDDO |
---|
1479 | |
---|
1480 | !-- allocate wall and roof temperature arrays, for horizontal walls |
---|
1481 | #if defined( __nopointer ) |
---|
1482 | IF ( .NOT. ALLOCATED( t_surf_wall_h ) ) & |
---|
1483 | ALLOCATE ( t_surf_wall_h(1:surf_usm_h%ns) ) |
---|
1484 | IF ( .NOT. ALLOCATED( t_surf_wall_h_p ) ) & |
---|
1485 | ALLOCATE ( t_surf_wall_h_p(1:surf_usm_h%ns) ) |
---|
1486 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
1487 | ALLOCATE ( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1488 | IF ( .NOT. ALLOCATED( t_wall_h_p ) ) & |
---|
1489 | ALLOCATE ( t_wall_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1490 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
1491 | ALLOCATE ( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
1492 | IF ( .NOT. ALLOCATED( t_surf_window_h_p ) ) & |
---|
1493 | ALLOCATE ( t_surf_window_h_p(1:surf_usm_h%ns) ) |
---|
1494 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
1495 | ALLOCATE ( t_window_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1496 | IF ( .NOT. ALLOCATED( t_window_h_p ) ) & |
---|
1497 | ALLOCATE ( t_window_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1498 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
1499 | ALLOCATE ( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
1500 | IF ( .NOT. ALLOCATED( t_surf_green_h_p ) ) & |
---|
1501 | ALLOCATE ( t_surf_green_h_p(1:surf_usm_h%ns) ) |
---|
1502 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
1503 | ALLOCATE ( t_green_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1504 | IF ( .NOT. ALLOCATED( t_green_h_p ) ) & |
---|
1505 | ALLOCATE ( t_green_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1506 | IF ( .NOT. ALLOCATED( t_surf_10cm_h ) ) & |
---|
1507 | ALLOCATE ( t_surf_10cm_h(1:surf_usm_h%ns) ) |
---|
1508 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_p ) ) & |
---|
1509 | ALLOCATE ( t_surf_10cm_h_p(1:surf_usm_h%ns) ) |
---|
1510 | IF ( .NOT. ALLOCATED( swc_h ) ) & |
---|
1511 | ALLOCATE ( swc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1512 | IF ( .NOT. ALLOCATED( swc_sat_h ) ) & |
---|
1513 | ALLOCATE ( swc_sat_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1514 | IF ( .NOT. ALLOCATED( swc_res_h ) ) & |
---|
1515 | ALLOCATE ( swc_res_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1516 | IF ( .NOT. ALLOCATED( rootfr_h ) ) & |
---|
1517 | ALLOCATE ( rootfr_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1518 | IF ( .NOT. ALLOCATED( wilt_h ) ) & |
---|
1519 | ALLOCATE ( wilt_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1520 | IF ( .NOT. ALLOCATED( fc_h ) ) & |
---|
1521 | ALLOCATE ( fc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1522 | |
---|
1523 | IF ( .NOT. ALLOCATED( m_liq_usm_h%var_usm_1d ) ) & |
---|
1524 | ALLOCATE ( m_liq_usm_h%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1525 | |
---|
1526 | !-- Horizontal surfaces |
---|
1527 | ALLOCATE ( m_liq_usm_h_p%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1528 | ! |
---|
1529 | !-- Vertical surfaces |
---|
1530 | DO l = 0, 3 |
---|
1531 | ALLOCATE ( m_liq_usm_v_p(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1532 | ENDDO |
---|
1533 | |
---|
1534 | #else |
---|
1535 | ! |
---|
1536 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1537 | !-- might be already allocated. |
---|
1538 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
1539 | ALLOCATE ( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
1540 | IF ( .NOT. ALLOCATED( t_surf_wall_h_2 ) ) & |
---|
1541 | ALLOCATE ( t_surf_wall_h_2(1:surf_usm_h%ns) ) |
---|
1542 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
1543 | ALLOCATE ( t_wall_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1544 | IF ( .NOT. ALLOCATED( t_wall_h_2 ) ) & |
---|
1545 | ALLOCATE ( t_wall_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1546 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
1547 | ALLOCATE ( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
1548 | IF ( .NOT. ALLOCATED( t_surf_window_h_2 ) ) & |
---|
1549 | ALLOCATE ( t_surf_window_h_2(1:surf_usm_h%ns) ) |
---|
1550 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
1551 | ALLOCATE ( t_window_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1552 | IF ( .NOT. ALLOCATED( t_window_h_2 ) ) & |
---|
1553 | ALLOCATE ( t_window_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1554 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
1555 | ALLOCATE ( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
1556 | IF ( .NOT. ALLOCATED( t_surf_green_h_2 ) ) & |
---|
1557 | ALLOCATE ( t_surf_green_h_2(1:surf_usm_h%ns) ) |
---|
1558 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
1559 | ALLOCATE ( t_green_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1560 | IF ( .NOT. ALLOCATED( t_green_h_2 ) ) & |
---|
1561 | ALLOCATE ( t_green_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1562 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_1 ) ) & |
---|
1563 | ALLOCATE ( t_surf_10cm_h_1(1:surf_usm_h%ns) ) |
---|
1564 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_2 ) ) & |
---|
1565 | ALLOCATE ( t_surf_10cm_h_2(1:surf_usm_h%ns) ) |
---|
1566 | IF ( .NOT. ALLOCATED( swc_h_1 ) ) & |
---|
1567 | ALLOCATE ( swc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1568 | IF ( .NOT. ALLOCATED( swc_sat_h_1 ) ) & |
---|
1569 | ALLOCATE ( swc_sat_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1570 | IF ( .NOT. ALLOCATED( swc_res_h_1 ) ) & |
---|
1571 | ALLOCATE ( swc_res_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1572 | IF ( .NOT. ALLOCATED( swc_h_2 ) ) & |
---|
1573 | ALLOCATE ( swc_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1574 | IF ( .NOT. ALLOCATED( rootfr_h_1 ) ) & |
---|
1575 | ALLOCATE ( rootfr_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1576 | IF ( .NOT. ALLOCATED( wilt_h_1 ) ) & |
---|
1577 | ALLOCATE ( wilt_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1578 | IF ( .NOT. ALLOCATED( fc_h_1 ) ) & |
---|
1579 | ALLOCATE ( fc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1580 | |
---|
1581 | IF ( .NOT. ALLOCATED( m_liq_usm_h_1%var_usm_1d ) ) & |
---|
1582 | ALLOCATE ( m_liq_usm_h_1%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1583 | IF ( .NOT. ALLOCATED( m_liq_usm_h_2%var_usm_1d ) ) & |
---|
1584 | ALLOCATE ( m_liq_usm_h_2%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1585 | |
---|
1586 | ! |
---|
1587 | !-- initial assignment of the pointers |
---|
1588 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
1589 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
1590 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
1591 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
1592 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
1593 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
1594 | t_surf_10cm_h => t_surf_10cm_h_1; t_surf_10cm_h_p => t_surf_10cm_h_2 |
---|
1595 | m_liq_usm_h => m_liq_usm_h_1; m_liq_usm_h_p => m_liq_usm_h_2 |
---|
1596 | swc_h => swc_h_1; swc_h_p => swc_h_2 |
---|
1597 | swc_sat_h => swc_sat_h_1 |
---|
1598 | swc_res_h => swc_res_h_1 |
---|
1599 | rootfr_h => rootfr_h_1 |
---|
1600 | wilt_h => wilt_h_1 |
---|
1601 | fc_h => fc_h_1 |
---|
1602 | |
---|
1603 | #endif |
---|
1604 | |
---|
1605 | !-- allocate wall and roof temperature arrays, for vertical walls if required |
---|
1606 | #if defined( __nopointer ) |
---|
1607 | DO l = 0, 3 |
---|
1608 | IF ( .NOT. ALLOCATED( t_surf_wall_v(l)%t ) ) & |
---|
1609 | ALLOCATE ( t_surf_wall_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1610 | IF ( .NOT. ALLOCATED( t_surf_wall_v_p(l)%t ) ) & |
---|
1611 | ALLOCATE ( t_surf_wall_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1612 | IF ( .NOT. ALLOCATED( t_wall_v(l)%t ) ) & |
---|
1613 | ALLOCATE ( t_wall_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1614 | IF ( .NOT. ALLOCATED( t_wall_v_p(l)%t ) ) & |
---|
1615 | ALLOCATE ( t_wall_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1616 | IF ( .NOT. ALLOCATED( t_surf_window_v(l)%t ) ) & |
---|
1617 | ALLOCATE ( t_surf_window_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1618 | IF ( .NOT. ALLOCATED( t_surf_window_v_p(l)%t ) ) & |
---|
1619 | ALLOCATE ( t_surf_window_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1620 | IF ( .NOT. ALLOCATED( t_window_v(l)%t ) ) & |
---|
1621 | ALLOCATE ( t_window_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1622 | IF ( .NOT. ALLOCATED( t_window_v_p(l)%t ) ) & |
---|
1623 | ALLOCATE ( t_window_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1624 | IF ( .NOT. ALLOCATED( t_green_v(l)%t ) ) & |
---|
1625 | ALLOCATE ( t_green_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1626 | IF ( .NOT. ALLOCATED( t_green_v_p(l)%t ) ) & |
---|
1627 | ALLOCATE ( t_green_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1628 | IF ( .NOT. ALLOCATED( t_surf_green_v(l)%t ) ) & |
---|
1629 | ALLOCATE ( t_surf_green_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1630 | IF ( .NOT. ALLOCATED( t_surf_green_v_p(l)%t ) ) & |
---|
1631 | ALLOCATE ( t_surf_green_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1632 | IF ( .NOT. ALLOCATED( t_surf_10cm_v(l)%t ) ) & |
---|
1633 | ALLOCATE ( t_surf_10cm_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1634 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_p(l)%t ) ) & |
---|
1635 | ALLOCATE ( t_surf_10cm_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1636 | IF ( .NOT. ALLOCATED( m_liq_usm_v(l)%var_usm_1d ) ) & |
---|
1637 | ALLOCATE ( m_liq_usm_v(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1638 | IF ( .NOT. ALLOCATED( swc_v(l)%t ) ) & |
---|
1639 | ALLOCATE ( swc_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1640 | IF ( .NOT. ALLOCATED( swc_v_p(l)%t ) ) & |
---|
1641 | ALLOCATE ( swc_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1642 | ENDDO |
---|
1643 | #else |
---|
1644 | ! |
---|
1645 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1646 | !-- might be already allocated. |
---|
1647 | DO l = 0, 3 |
---|
1648 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(l)%t ) ) & |
---|
1649 | ALLOCATE ( t_surf_wall_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1650 | IF ( .NOT. ALLOCATED( t_surf_wall_v_2(l)%t ) ) & |
---|
1651 | ALLOCATE ( t_surf_wall_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1652 | IF ( .NOT. ALLOCATED( t_wall_v_1(l)%t ) ) & |
---|
1653 | ALLOCATE ( t_wall_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1654 | IF ( .NOT. ALLOCATED( t_wall_v_2(l)%t ) ) & |
---|
1655 | ALLOCATE ( t_wall_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1656 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(l)%t ) ) & |
---|
1657 | ALLOCATE ( t_surf_window_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1658 | IF ( .NOT. ALLOCATED( t_surf_window_v_2(l)%t ) ) & |
---|
1659 | ALLOCATE ( t_surf_window_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1660 | IF ( .NOT. ALLOCATED( t_window_v_1(l)%t ) ) & |
---|
1661 | ALLOCATE ( t_window_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1662 | IF ( .NOT. ALLOCATED( t_window_v_2(l)%t ) ) & |
---|
1663 | ALLOCATE ( t_window_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1664 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(l)%t ) ) & |
---|
1665 | ALLOCATE ( t_surf_green_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1666 | IF ( .NOT. ALLOCATED( t_surf_green_v_2(l)%t ) ) & |
---|
1667 | ALLOCATE ( t_surf_green_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1668 | IF ( .NOT. ALLOCATED( t_green_v_1(l)%t ) ) & |
---|
1669 | ALLOCATE ( t_green_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1670 | IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) ) & |
---|
1671 | ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1672 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_1(l)%t ) ) & |
---|
1673 | ALLOCATE ( t_surf_10cm_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1674 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_2(l)%t ) ) & |
---|
1675 | ALLOCATE ( t_surf_10cm_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1676 | IF ( .NOT. ALLOCATED( m_liq_usm_v_1(l)%var_usm_1d ) ) & |
---|
1677 | ALLOCATE ( m_liq_usm_v_1(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1678 | IF ( .NOT. ALLOCATED( m_liq_usm_v_2(l)%var_usm_1d ) ) & |
---|
1679 | ALLOCATE ( m_liq_usm_v_2(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1680 | IF ( .NOT. ALLOCATED( swc_v_1(l)%t ) ) & |
---|
1681 | ALLOCATE ( swc_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1682 | IF ( .NOT. ALLOCATED( swc_v_2(l)%t ) ) & |
---|
1683 | ALLOCATE ( swc_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1684 | ENDDO |
---|
1685 | ! |
---|
1686 | !-- initial assignment of the pointers |
---|
1687 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
1688 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
1689 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
1690 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
1691 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
1692 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
1693 | t_surf_10cm_v => t_surf_10cm_v_1; t_surf_10cm_v_p => t_surf_10cm_v_2 |
---|
1694 | m_liq_usm_v => m_liq_usm_v_1; m_liq_usm_v_p => m_liq_usm_v_2 |
---|
1695 | swc_v => swc_v_1; swc_v_p => swc_v_2 |
---|
1696 | |
---|
1697 | #endif |
---|
1698 | ! |
---|
1699 | !-- Allocate intermediate timestep arrays. For horizontal surfaces. |
---|
1700 | ALLOCATE ( surf_usm_h%tt_surface_wall_m(1:surf_usm_h%ns) ) |
---|
1701 | ALLOCATE ( surf_usm_h%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1702 | ALLOCATE ( surf_usm_h%tt_surface_window_m(1:surf_usm_h%ns) ) |
---|
1703 | ALLOCATE ( surf_usm_h%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1704 | ALLOCATE ( surf_usm_h%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1705 | ALLOCATE ( surf_usm_h%tt_surface_green_m(1:surf_usm_h%ns) ) |
---|
1706 | |
---|
1707 | ! |
---|
1708 | !-- Allocate intermediate timestep arrays |
---|
1709 | !-- Horizontal surfaces |
---|
1710 | ALLOCATE ( tm_liq_usm_h_m%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1711 | ! |
---|
1712 | !-- Horizontal surfaces |
---|
1713 | DO l = 0, 3 |
---|
1714 | ALLOCATE ( tm_liq_usm_v_m(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1715 | ENDDO |
---|
1716 | |
---|
1717 | ! |
---|
1718 | !-- Set inital values for prognostic quantities |
---|
1719 | IF ( ALLOCATED( surf_usm_h%tt_surface_wall_m ) ) surf_usm_h%tt_surface_wall_m = 0.0_wp |
---|
1720 | IF ( ALLOCATED( surf_usm_h%tt_wall_m ) ) surf_usm_h%tt_wall_m = 0.0_wp |
---|
1721 | IF ( ALLOCATED( surf_usm_h%tt_surface_window_m ) ) surf_usm_h%tt_surface_window_m = 0.0_wp |
---|
1722 | IF ( ALLOCATED( surf_usm_h%tt_window_m ) ) surf_usm_h%tt_window_m = 0.0_wp |
---|
1723 | IF ( ALLOCATED( surf_usm_h%tt_green_m ) ) surf_usm_h%tt_green_m = 0.0_wp |
---|
1724 | IF ( ALLOCATED( surf_usm_h%tt_surface_green_m ) ) surf_usm_h%tt_surface_green_m = 0.0_wp |
---|
1725 | ! |
---|
1726 | !-- Now, for vertical surfaces |
---|
1727 | DO l = 0, 3 |
---|
1728 | ALLOCATE ( surf_usm_v(l)%tt_surface_wall_m(1:surf_usm_v(l)%ns) ) |
---|
1729 | ALLOCATE ( surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1730 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_wall_m ) ) surf_usm_v(l)%tt_surface_wall_m = 0.0_wp |
---|
1731 | IF ( ALLOCATED( surf_usm_v(l)%tt_wall_m ) ) surf_usm_v(l)%tt_wall_m = 0.0_wp |
---|
1732 | ALLOCATE ( surf_usm_v(l)%tt_surface_window_m(1:surf_usm_v(l)%ns) ) |
---|
1733 | ALLOCATE ( surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1734 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_window_m ) ) surf_usm_v(l)%tt_surface_window_m = 0.0_wp |
---|
1735 | IF ( ALLOCATED( surf_usm_v(l)%tt_window_m ) ) surf_usm_v(l)%tt_window_m = 0.0_wp |
---|
1736 | ALLOCATE ( surf_usm_v(l)%tt_surface_green_m(1:surf_usm_v(l)%ns) ) |
---|
1737 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_green_m ) ) surf_usm_v(l)%tt_surface_green_m = 0.0_wp |
---|
1738 | ALLOCATE ( surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1739 | IF ( ALLOCATED( surf_usm_v(l)%tt_green_m ) ) surf_usm_v(l)%tt_green_m = 0.0_wp |
---|
1740 | ENDDO |
---|
1741 | |
---|
1742 | !-- allocate wall heat flux output array and set initial values. For horizontal surfaces |
---|
1743 | ! ALLOCATE ( surf_usm_h%wshf(1:surf_usm_h%ns) ) !can be removed |
---|
1744 | ALLOCATE ( surf_usm_h%wshf_eb(1:surf_usm_h%ns) ) |
---|
1745 | ALLOCATE ( surf_usm_h%wghf_eb(1:surf_usm_h%ns) ) |
---|
1746 | ALLOCATE ( surf_usm_h%wghf_eb_window(1:surf_usm_h%ns) ) |
---|
1747 | ALLOCATE ( surf_usm_h%wghf_eb_green(1:surf_usm_h%ns) ) |
---|
1748 | ALLOCATE ( surf_usm_h%iwghf_eb(1:surf_usm_h%ns) ) |
---|
1749 | ALLOCATE ( surf_usm_h%iwghf_eb_window(1:surf_usm_h%ns) ) |
---|
1750 | IF ( ALLOCATED( surf_usm_h%wshf ) ) surf_usm_h%wshf = 0.0_wp |
---|
1751 | IF ( ALLOCATED( surf_usm_h%wshf_eb ) ) surf_usm_h%wshf_eb = 0.0_wp |
---|
1752 | IF ( ALLOCATED( surf_usm_h%wghf_eb ) ) surf_usm_h%wghf_eb = 0.0_wp |
---|
1753 | IF ( ALLOCATED( surf_usm_h%wghf_eb_window ) ) surf_usm_h%wghf_eb_window = 0.0_wp |
---|
1754 | IF ( ALLOCATED( surf_usm_h%wghf_eb_green ) ) surf_usm_h%wghf_eb_green = 0.0_wp |
---|
1755 | IF ( ALLOCATED( surf_usm_h%iwghf_eb ) ) surf_usm_h%iwghf_eb = 0.0_wp |
---|
1756 | IF ( ALLOCATED( surf_usm_h%iwghf_eb_window ) ) surf_usm_h%iwghf_eb_window = 0.0_wp |
---|
1757 | ! |
---|
1758 | !-- Now, for vertical surfaces |
---|
1759 | DO l = 0, 3 |
---|
1760 | ! ALLOCATE ( surf_usm_v(l)%wshf(1:surf_usm_v(l)%ns) ) ! can be removed |
---|
1761 | ALLOCATE ( surf_usm_v(l)%wshf_eb(1:surf_usm_v(l)%ns) ) |
---|
1762 | ALLOCATE ( surf_usm_v(l)%wghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1763 | ALLOCATE ( surf_usm_v(l)%wghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1764 | ALLOCATE ( surf_usm_v(l)%wghf_eb_green(1:surf_usm_v(l)%ns) ) |
---|
1765 | ALLOCATE ( surf_usm_v(l)%iwghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1766 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1767 | IF ( ALLOCATED( surf_usm_v(l)%wshf ) ) surf_usm_v(l)%wshf = 0.0_wp |
---|
1768 | IF ( ALLOCATED( surf_usm_v(l)%wshf_eb ) ) surf_usm_v(l)%wshf_eb = 0.0_wp |
---|
1769 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb ) ) surf_usm_v(l)%wghf_eb = 0.0_wp |
---|
1770 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_window ) ) surf_usm_v(l)%wghf_eb_window = 0.0_wp |
---|
1771 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_green ) ) surf_usm_v(l)%wghf_eb_green = 0.0_wp |
---|
1772 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb ) ) surf_usm_v(l)%iwghf_eb = 0.0_wp |
---|
1773 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) ) surf_usm_v(l)%iwghf_eb_window = 0.0_wp |
---|
1774 | ENDDO |
---|
1775 | |
---|
1776 | END SUBROUTINE usm_allocate_surface |
---|
1777 | |
---|
1778 | |
---|
1779 | !------------------------------------------------------------------------------! |
---|
1780 | ! Description: |
---|
1781 | ! ------------ |
---|
1782 | !> Sum up and time-average urban surface output quantities as well as allocate |
---|
1783 | !> the array necessary for storing the average. |
---|
1784 | !------------------------------------------------------------------------------! |
---|
1785 | SUBROUTINE usm_average_3d_data( mode, variable ) |
---|
1786 | |
---|
1787 | IMPLICIT NONE |
---|
1788 | |
---|
1789 | CHARACTER(LEN=*), INTENT(IN) :: mode |
---|
1790 | CHARACTER(LEN=*), INTENT(IN) :: variable |
---|
1791 | |
---|
1792 | INTEGER(iwp) :: i, j, k, l, m, ids, idsint, iwl, istat |
---|
1793 | CHARACTER(LEN=varnamelength) :: var |
---|
1794 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
1795 | CHARACTER(LEN=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
1796 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
1797 | |
---|
1798 | !-- find the real name of the variable |
---|
1799 | ids = -1 |
---|
1800 | l = -1 |
---|
1801 | var = TRIM(variable) |
---|
1802 | DO i = 0, nd-1 |
---|
1803 | k = len(TRIM(var)) |
---|
1804 | j = len(TRIM(dirname(i))) |
---|
1805 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
1806 | ids = i |
---|
1807 | idsint = dirint(ids) |
---|
1808 | var = var(:k-j) |
---|
1809 | EXIT |
---|
1810 | ENDIF |
---|
1811 | ENDDO |
---|
1812 | l = idsint - 2 ! horisontal direction index - terible hack ! |
---|
1813 | IF ( l < 0 .OR. l > 3 ) THEN |
---|
1814 | l = -1 |
---|
1815 | END IF |
---|
1816 | IF ( ids == -1 ) THEN |
---|
1817 | var = TRIM(variable) |
---|
1818 | ENDIF |
---|
1819 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
1820 | !-- wall layers |
---|
1821 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
1822 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1823 | var = var(1:10) |
---|
1824 | ELSE |
---|
1825 | !-- wrong wall layer index |
---|
1826 | RETURN |
---|
1827 | ENDIF |
---|
1828 | ENDIF |
---|
1829 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
1830 | !-- wall layers |
---|
1831 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
1832 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1833 | var = var(1:12) |
---|
1834 | ELSE |
---|
1835 | !-- wrong window layer index |
---|
1836 | RETURN |
---|
1837 | ENDIF |
---|
1838 | ENDIF |
---|
1839 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
1840 | !-- wall layers |
---|
1841 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
1842 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1843 | var = var(1:11) |
---|
1844 | ELSE |
---|
1845 | !-- wrong green layer index |
---|
1846 | RETURN |
---|
1847 | ENDIF |
---|
1848 | ENDIF |
---|
1849 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
1850 | !-- swc layers |
---|
1851 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
1852 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1853 | var = var(1:7) |
---|
1854 | ELSE |
---|
1855 | !-- wrong swc layer index |
---|
1856 | RETURN |
---|
1857 | ENDIF |
---|
1858 | ENDIF |
---|
1859 | |
---|
1860 | IF ( mode == 'allocate' ) THEN |
---|
1861 | |
---|
1862 | SELECT CASE ( TRIM( var ) ) |
---|
1863 | |
---|
1864 | CASE ( 'usm_rad_net' ) |
---|
1865 | !-- array of complete radiation balance |
---|
1866 | IF ( l == -1 ) THEN |
---|
1867 | IF ( .NOT. ALLOCATED(surf_usm_h%rad_net_av) ) THEN |
---|
1868 | ALLOCATE( surf_usm_h%rad_net_av(1:surf_usm_h%ns) ) |
---|
1869 | surf_usm_h%rad_net_av = 0.0_wp |
---|
1870 | ENDIF |
---|
1871 | ELSE |
---|
1872 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%rad_net_av) ) THEN |
---|
1873 | ALLOCATE( surf_usm_v(l)%rad_net_av(1:surf_usm_v(l)%ns) ) |
---|
1874 | surf_usm_v(l)%rad_net_av = 0.0_wp |
---|
1875 | ENDIF |
---|
1876 | ENDIF |
---|
1877 | |
---|
1878 | CASE ( 'usm_rad_insw' ) |
---|
1879 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1880 | IF ( .NOT. ALLOCATED(surfinsw_av) ) THEN |
---|
1881 | ALLOCATE( surfinsw_av(nsurfl) ) |
---|
1882 | surfinsw_av = 0.0_wp |
---|
1883 | ENDIF |
---|
1884 | |
---|
1885 | CASE ( 'usm_rad_inlw' ) |
---|
1886 | !-- array of lw radiation falling to surface after i-th reflection |
---|
1887 | IF ( .NOT. ALLOCATED(surfinlw_av) ) THEN |
---|
1888 | ALLOCATE( surfinlw_av(nsurfl) ) |
---|
1889 | surfinlw_av = 0.0_wp |
---|
1890 | ENDIF |
---|
1891 | |
---|
1892 | CASE ( 'usm_rad_inswdir' ) |
---|
1893 | !-- array of direct sw radiation falling to surface from sun |
---|
1894 | IF ( .NOT. ALLOCATED(surfinswdir_av) ) THEN |
---|
1895 | ALLOCATE( surfinswdir_av(nsurfl) ) |
---|
1896 | surfinswdir_av = 0.0_wp |
---|
1897 | ENDIF |
---|
1898 | |
---|
1899 | CASE ( 'usm_rad_inswdif' ) |
---|
1900 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
1901 | IF ( .NOT. ALLOCATED(surfinswdif_av) ) THEN |
---|
1902 | ALLOCATE( surfinswdif_av(nsurfl) ) |
---|
1903 | surfinswdif_av = 0.0_wp |
---|
1904 | ENDIF |
---|
1905 | |
---|
1906 | CASE ( 'usm_rad_inswref' ) |
---|
1907 | !-- array of sw radiation falling to surface from reflections |
---|
1908 | IF ( .NOT. ALLOCATED(surfinswref_av) ) THEN |
---|
1909 | ALLOCATE( surfinswref_av(nsurfl) ) |
---|
1910 | surfinswref_av = 0.0_wp |
---|
1911 | ENDIF |
---|
1912 | |
---|
1913 | CASE ( 'usm_rad_inlwdif' ) |
---|
1914 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1915 | IF ( .NOT. ALLOCATED(surfinlwdif_av) ) THEN |
---|
1916 | ALLOCATE( surfinlwdif_av(nsurfl) ) |
---|
1917 | surfinlwdif_av = 0.0_wp |
---|
1918 | ENDIF |
---|
1919 | |
---|
1920 | CASE ( 'usm_rad_inlwref' ) |
---|
1921 | !-- array of lw radiation falling to surface from reflections |
---|
1922 | IF ( .NOT. ALLOCATED(surfinlwref_av) ) THEN |
---|
1923 | ALLOCATE( surfinlwref_av(nsurfl) ) |
---|
1924 | surfinlwref_av = 0.0_wp |
---|
1925 | ENDIF |
---|
1926 | |
---|
1927 | CASE ( 'usm_rad_outsw' ) |
---|
1928 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
1929 | IF ( .NOT. ALLOCATED(surfoutsw_av) ) THEN |
---|
1930 | ALLOCATE( surfoutsw_av(nsurfl) ) |
---|
1931 | surfoutsw_av = 0.0_wp |
---|
1932 | ENDIF |
---|
1933 | |
---|
1934 | CASE ( 'usm_rad_outlw' ) |
---|
1935 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
1936 | IF ( .NOT. ALLOCATED(surfoutlw_av) ) THEN |
---|
1937 | ALLOCATE( surfoutlw_av(nsurfl) ) |
---|
1938 | surfoutlw_av = 0.0_wp |
---|
1939 | ENDIF |
---|
1940 | CASE ( 'usm_rad_ressw' ) |
---|
1941 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
1942 | IF ( .NOT. ALLOCATED(surfins_av) ) THEN |
---|
1943 | ALLOCATE( surfins_av(nsurfl) ) |
---|
1944 | surfins_av = 0.0_wp |
---|
1945 | ENDIF |
---|
1946 | |
---|
1947 | CASE ( 'usm_rad_reslw' ) |
---|
1948 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
1949 | IF ( .NOT. ALLOCATED(surfinl_av) ) THEN |
---|
1950 | ALLOCATE( surfinl_av(nsurfl) ) |
---|
1951 | surfinl_av = 0.0_wp |
---|
1952 | ENDIF |
---|
1953 | |
---|
1954 | CASE ( 'usm_rad_pc_inlw' ) |
---|
1955 | !-- array of of lw radiation absorbed in plant canopy |
---|
1956 | IF ( .NOT. ALLOCATED(pcbinlw_av) ) THEN |
---|
1957 | ALLOCATE( pcbinlw_av(1:npcbl) ) |
---|
1958 | pcbinlw_av = 0.0_wp |
---|
1959 | ENDIF |
---|
1960 | |
---|
1961 | CASE ( 'usm_rad_pc_insw' ) |
---|
1962 | !-- array of of sw radiation absorbed in plant canopy |
---|
1963 | IF ( .NOT. ALLOCATED(pcbinsw_av) ) THEN |
---|
1964 | ALLOCATE( pcbinsw_av(1:npcbl) ) |
---|
1965 | pcbinsw_av = 0.0_wp |
---|
1966 | ENDIF |
---|
1967 | |
---|
1968 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
1969 | !-- array of of direct sw radiation absorbed in plant canopy |
---|
1970 | IF ( .NOT. ALLOCATED(pcbinswdir_av) ) THEN |
---|
1971 | ALLOCATE( pcbinswdir_av(1:npcbl) ) |
---|
1972 | pcbinswdir_av = 0.0_wp |
---|
1973 | ENDIF |
---|
1974 | |
---|
1975 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
1976 | !-- array of of diffuse sw radiation absorbed in plant canopy |
---|
1977 | IF ( .NOT. ALLOCATED(pcbinswdif_av) ) THEN |
---|
1978 | ALLOCATE( pcbinswdif_av(1:npcbl) ) |
---|
1979 | pcbinswdif_av = 0.0_wp |
---|
1980 | ENDIF |
---|
1981 | |
---|
1982 | CASE ( 'usm_rad_pc_inswref' ) |
---|
1983 | !-- array of of reflected sw radiation absorbed in plant canopy |
---|
1984 | IF ( .NOT. ALLOCATED(pcbinswref_av) ) THEN |
---|
1985 | ALLOCATE( pcbinswref_av(1:npcbl) ) |
---|
1986 | pcbinswref_av = 0.0_wp |
---|
1987 | ENDIF |
---|
1988 | |
---|
1989 | CASE ( 'usm_rad_hf' ) |
---|
1990 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
1991 | IF ( l == -1 ) THEN |
---|
1992 | IF ( .NOT. ALLOCATED(surf_usm_h%surfhf_av) ) THEN |
---|
1993 | ALLOCATE( surf_usm_h%surfhf_av(1:surf_usm_h%ns) ) |
---|
1994 | surf_usm_h%surfhf_av = 0.0_wp |
---|
1995 | ENDIF |
---|
1996 | ELSE |
---|
1997 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%surfhf_av) ) THEN |
---|
1998 | ALLOCATE( surf_usm_v(l)%surfhf_av(1:surf_usm_v(l)%ns) ) |
---|
1999 | surf_usm_v(l)%surfhf_av = 0.0_wp |
---|
2000 | ENDIF |
---|
2001 | ENDIF |
---|
2002 | |
---|
2003 | CASE ( 'usm_wshf' ) |
---|
2004 | !-- array of sensible heat flux from surfaces |
---|
2005 | !-- land surfaces |
---|
2006 | IF ( l == -1 ) THEN |
---|
2007 | IF ( .NOT. ALLOCATED(surf_usm_h%wshf_eb_av) ) THEN |
---|
2008 | ALLOCATE( surf_usm_h%wshf_eb_av(1:surf_usm_h%ns) ) |
---|
2009 | surf_usm_h%wshf_eb_av = 0.0_wp |
---|
2010 | ENDIF |
---|
2011 | ELSE |
---|
2012 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wshf_eb_av) ) THEN |
---|
2013 | ALLOCATE( surf_usm_v(l)%wshf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2014 | surf_usm_v(l)%wshf_eb_av = 0.0_wp |
---|
2015 | ENDIF |
---|
2016 | ENDIF |
---|
2017 | |
---|
2018 | CASE ( 'usm_qsws' ) |
---|
2019 | !-- array of latent heat flux from surfaces |
---|
2020 | !-- land surfaces |
---|
2021 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_eb_av) ) THEN |
---|
2022 | ALLOCATE( surf_usm_h%qsws_eb_av(1:surf_usm_h%ns) ) |
---|
2023 | surf_usm_h%qsws_eb_av = 0.0_wp |
---|
2024 | ELSE |
---|
2025 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_eb_av) ) THEN |
---|
2026 | ALLOCATE( surf_usm_v(l)%qsws_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2027 | surf_usm_v(l)%qsws_eb_av = 0.0_wp |
---|
2028 | ENDIF |
---|
2029 | ENDIF |
---|
2030 | |
---|
2031 | CASE ( 'usm_qsws_veg' ) |
---|
2032 | !-- array of latent heat flux from vegetation surfaces |
---|
2033 | !-- land surfaces |
---|
2034 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_veg_eb_av) ) THEN |
---|
2035 | ALLOCATE( surf_usm_h%qsws_veg_eb_av(1:surf_usm_h%ns) ) |
---|
2036 | surf_usm_h%qsws_veg_eb_av = 0.0_wp |
---|
2037 | ELSE |
---|
2038 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_veg_eb_av) ) THEN |
---|
2039 | ALLOCATE( surf_usm_v(l)%qsws_veg_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2040 | surf_usm_v(l)%qsws_veg_eb_av = 0.0_wp |
---|
2041 | ENDIF |
---|
2042 | ENDIF |
---|
2043 | |
---|
2044 | CASE ( 'usm_qsws_liq' ) |
---|
2045 | !-- array of latent heat flux from surfaces with liquid |
---|
2046 | !-- land surfaces |
---|
2047 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_liq_eb_av) ) THEN |
---|
2048 | ALLOCATE( surf_usm_h%qsws_liq_eb_av(1:surf_usm_h%ns) ) |
---|
2049 | surf_usm_h%qsws_liq_eb_av = 0.0_wp |
---|
2050 | ELSE |
---|
2051 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_liq_eb_av) ) THEN |
---|
2052 | ALLOCATE( surf_usm_v(l)%qsws_liq_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2053 | surf_usm_v(l)%qsws_liq_eb_av = 0.0_wp |
---|
2054 | ENDIF |
---|
2055 | ENDIF |
---|
2056 | ! |
---|
2057 | !-- Please note, the following output quantities belongs to the |
---|
2058 | !-- individual tile fractions - ground heat flux at wall-, window-, |
---|
2059 | !-- and green fraction. Aggregated ground-heat flux is treated |
---|
2060 | !-- accordingly in average_3d_data, sum_up_3d_data, etc.. |
---|
2061 | CASE ( 'usm_wghf' ) |
---|
2062 | !-- array of heat flux from ground (wall, roof, land) |
---|
2063 | IF ( l == -1 ) THEN |
---|
2064 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_av) ) THEN |
---|
2065 | ALLOCATE( surf_usm_h%wghf_eb_av(1:surf_usm_h%ns) ) |
---|
2066 | surf_usm_h%wghf_eb_av = 0.0_wp |
---|
2067 | ENDIF |
---|
2068 | ELSE |
---|
2069 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_av) ) THEN |
---|
2070 | ALLOCATE( surf_usm_v(l)%wghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2071 | surf_usm_v(l)%wghf_eb_av = 0.0_wp |
---|
2072 | ENDIF |
---|
2073 | ENDIF |
---|
2074 | |
---|
2075 | CASE ( 'usm_wghf_window' ) |
---|
2076 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2077 | IF ( l == -1 ) THEN |
---|
2078 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_window_av) ) THEN |
---|
2079 | ALLOCATE( surf_usm_h%wghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
2080 | surf_usm_h%wghf_eb_window_av = 0.0_wp |
---|
2081 | ENDIF |
---|
2082 | ELSE |
---|
2083 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_window_av) ) THEN |
---|
2084 | ALLOCATE( surf_usm_v(l)%wghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
2085 | surf_usm_v(l)%wghf_eb_window_av = 0.0_wp |
---|
2086 | ENDIF |
---|
2087 | ENDIF |
---|
2088 | |
---|
2089 | CASE ( 'usm_wghf_green' ) |
---|
2090 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2091 | IF ( l == -1 ) THEN |
---|
2092 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_green_av) ) THEN |
---|
2093 | ALLOCATE( surf_usm_h%wghf_eb_green_av(1:surf_usm_h%ns) ) |
---|
2094 | surf_usm_h%wghf_eb_green_av = 0.0_wp |
---|
2095 | ENDIF |
---|
2096 | ELSE |
---|
2097 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_green_av) ) THEN |
---|
2098 | ALLOCATE( surf_usm_v(l)%wghf_eb_green_av(1:surf_usm_v(l)%ns) ) |
---|
2099 | surf_usm_v(l)%wghf_eb_green_av = 0.0_wp |
---|
2100 | ENDIF |
---|
2101 | ENDIF |
---|
2102 | |
---|
2103 | CASE ( 'usm_iwghf' ) |
---|
2104 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2105 | IF ( l == -1 ) THEN |
---|
2106 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_av) ) THEN |
---|
2107 | ALLOCATE( surf_usm_h%iwghf_eb_av(1:surf_usm_h%ns) ) |
---|
2108 | surf_usm_h%iwghf_eb_av = 0.0_wp |
---|
2109 | ENDIF |
---|
2110 | ELSE |
---|
2111 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_av) ) THEN |
---|
2112 | ALLOCATE( surf_usm_v(l)%iwghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2113 | surf_usm_v(l)%iwghf_eb_av = 0.0_wp |
---|
2114 | ENDIF |
---|
2115 | ENDIF |
---|
2116 | |
---|
2117 | CASE ( 'usm_iwghf_window' ) |
---|
2118 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2119 | IF ( l == -1 ) THEN |
---|
2120 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_window_av) ) THEN |
---|
2121 | ALLOCATE( surf_usm_h%iwghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
2122 | surf_usm_h%iwghf_eb_window_av = 0.0_wp |
---|
2123 | ENDIF |
---|
2124 | ELSE |
---|
2125 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_window_av) ) THEN |
---|
2126 | ALLOCATE( surf_usm_v(l)%iwghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
2127 | surf_usm_v(l)%iwghf_eb_window_av = 0.0_wp |
---|
2128 | ENDIF |
---|
2129 | ENDIF |
---|
2130 | |
---|
2131 | CASE ( 'usm_t_surf_wall' ) |
---|
2132 | !-- surface temperature for surfaces |
---|
2133 | IF ( l == -1 ) THEN |
---|
2134 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_wall_av) ) THEN |
---|
2135 | ALLOCATE( surf_usm_h%t_surf_wall_av(1:surf_usm_h%ns) ) |
---|
2136 | surf_usm_h%t_surf_wall_av = 0.0_wp |
---|
2137 | ENDIF |
---|
2138 | ELSE |
---|
2139 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_wall_av) ) THEN |
---|
2140 | ALLOCATE( surf_usm_v(l)%t_surf_wall_av(1:surf_usm_v(l)%ns) ) |
---|
2141 | surf_usm_v(l)%t_surf_wall_av = 0.0_wp |
---|
2142 | ENDIF |
---|
2143 | ENDIF |
---|
2144 | |
---|
2145 | CASE ( 'usm_t_surf_window' ) |
---|
2146 | !-- surface temperature for window surfaces |
---|
2147 | IF ( l == -1 ) THEN |
---|
2148 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_window_av) ) THEN |
---|
2149 | ALLOCATE( surf_usm_h%t_surf_window_av(1:surf_usm_h%ns) ) |
---|
2150 | surf_usm_h%t_surf_window_av = 0.0_wp |
---|
2151 | ENDIF |
---|
2152 | ELSE |
---|
2153 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_window_av) ) THEN |
---|
2154 | ALLOCATE( surf_usm_v(l)%t_surf_window_av(1:surf_usm_v(l)%ns) ) |
---|
2155 | surf_usm_v(l)%t_surf_window_av = 0.0_wp |
---|
2156 | ENDIF |
---|
2157 | ENDIF |
---|
2158 | |
---|
2159 | CASE ( 'usm_t_surf_green' ) |
---|
2160 | !-- surface temperature for green surfaces |
---|
2161 | IF ( l == -1 ) THEN |
---|
2162 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_green_av) ) THEN |
---|
2163 | ALLOCATE( surf_usm_h%t_surf_green_av(1:surf_usm_h%ns) ) |
---|
2164 | surf_usm_h%t_surf_green_av = 0.0_wp |
---|
2165 | ENDIF |
---|
2166 | ELSE |
---|
2167 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_green_av) ) THEN |
---|
2168 | ALLOCATE( surf_usm_v(l)%t_surf_green_av(1:surf_usm_v(l)%ns) ) |
---|
2169 | surf_usm_v(l)%t_surf_green_av = 0.0_wp |
---|
2170 | ENDIF |
---|
2171 | ENDIF |
---|
2172 | |
---|
2173 | CASE ( 'usm_t_surf_10cm' ) |
---|
2174 | !-- near surface temperature for whole surfaces |
---|
2175 | IF ( l == -1 ) THEN |
---|
2176 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_10cm_av) ) THEN |
---|
2177 | ALLOCATE( surf_usm_h%t_surf_10cm_av(1:surf_usm_h%ns) ) |
---|
2178 | surf_usm_h%t_surf_10cm_av = 0.0_wp |
---|
2179 | ENDIF |
---|
2180 | ELSE |
---|
2181 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_10cm_av) ) THEN |
---|
2182 | ALLOCATE( surf_usm_v(l)%t_surf_10cm_av(1:surf_usm_v(l)%ns) ) |
---|
2183 | surf_usm_v(l)%t_surf_10cm_av = 0.0_wp |
---|
2184 | ENDIF |
---|
2185 | ENDIF |
---|
2186 | |
---|
2187 | CASE ( 'usm_t_wall' ) |
---|
2188 | !-- wall temperature for iwl layer of walls and land |
---|
2189 | IF ( l == -1 ) THEN |
---|
2190 | IF ( .NOT. ALLOCATED(surf_usm_h%t_wall_av) ) THEN |
---|
2191 | ALLOCATE( surf_usm_h%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2192 | surf_usm_h%t_wall_av = 0.0_wp |
---|
2193 | ENDIF |
---|
2194 | ELSE |
---|
2195 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_wall_av) ) THEN |
---|
2196 | ALLOCATE( surf_usm_v(l)%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2197 | surf_usm_v(l)%t_wall_av = 0.0_wp |
---|
2198 | ENDIF |
---|
2199 | ENDIF |
---|
2200 | |
---|
2201 | CASE ( 'usm_t_window' ) |
---|
2202 | !-- window temperature for iwl layer of walls and land |
---|
2203 | IF ( l == -1 ) THEN |
---|
2204 | IF ( .NOT. ALLOCATED(surf_usm_h%t_window_av) ) THEN |
---|
2205 | ALLOCATE( surf_usm_h%t_window_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2206 | surf_usm_h%t_window_av = 0.0_wp |
---|
2207 | ENDIF |
---|
2208 | ELSE |
---|
2209 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_window_av) ) THEN |
---|
2210 | ALLOCATE( surf_usm_v(l)%t_window_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2211 | surf_usm_v(l)%t_window_av = 0.0_wp |
---|
2212 | ENDIF |
---|
2213 | ENDIF |
---|
2214 | |
---|
2215 | CASE ( 'usm_t_green' ) |
---|
2216 | !-- green temperature for iwl layer of walls and land |
---|
2217 | IF ( l == -1 ) THEN |
---|
2218 | IF ( .NOT. ALLOCATED(surf_usm_h%t_green_av) ) THEN |
---|
2219 | ALLOCATE( surf_usm_h%t_green_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2220 | surf_usm_h%t_green_av = 0.0_wp |
---|
2221 | ENDIF |
---|
2222 | ELSE |
---|
2223 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_green_av) ) THEN |
---|
2224 | ALLOCATE( surf_usm_v(l)%t_green_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2225 | surf_usm_v(l)%t_green_av = 0.0_wp |
---|
2226 | ENDIF |
---|
2227 | ENDIF |
---|
2228 | CASE ( 'usm_swc' ) |
---|
2229 | !-- soil water content for iwl layer of walls and land |
---|
2230 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%swc_av) ) THEN |
---|
2231 | ALLOCATE( surf_usm_h%swc_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2232 | surf_usm_h%swc_av = 0.0_wp |
---|
2233 | ELSE |
---|
2234 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%swc_av) ) THEN |
---|
2235 | ALLOCATE( surf_usm_v(l)%swc_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2236 | surf_usm_v(l)%swc_av = 0.0_wp |
---|
2237 | ENDIF |
---|
2238 | ENDIF |
---|
2239 | |
---|
2240 | CASE DEFAULT |
---|
2241 | CONTINUE |
---|
2242 | |
---|
2243 | END SELECT |
---|
2244 | |
---|
2245 | ELSEIF ( mode == 'sum' ) THEN |
---|
2246 | |
---|
2247 | SELECT CASE ( TRIM( var ) ) |
---|
2248 | |
---|
2249 | CASE ( 'usm_rad_net' ) |
---|
2250 | !-- array of complete radiation balance |
---|
2251 | IF ( l == -1 ) THEN |
---|
2252 | DO m = 1, surf_usm_h%ns |
---|
2253 | surf_usm_h%rad_net_av(m) = & |
---|
2254 | surf_usm_h%rad_net_av(m) + & |
---|
2255 | surf_usm_h%rad_net_l(m) |
---|
2256 | ENDDO |
---|
2257 | ELSE |
---|
2258 | DO m = 1, surf_usm_v(l)%ns |
---|
2259 | surf_usm_v(l)%rad_net_av(m) = & |
---|
2260 | surf_usm_v(l)%rad_net_av(m) + & |
---|
2261 | surf_usm_v(l)%rad_net_l(m) |
---|
2262 | ENDDO |
---|
2263 | ENDIF |
---|
2264 | |
---|
2265 | CASE ( 'usm_rad_insw' ) |
---|
2266 | !-- array of sw radiation falling to surface after i-th reflection |
---|
2267 | DO l = 1, nsurfl |
---|
2268 | IF ( surfl(id,l) == idsint ) THEN |
---|
2269 | surfinsw_av(l) = surfinsw_av(l) + surfinsw(l) |
---|
2270 | ENDIF |
---|
2271 | ENDDO |
---|
2272 | |
---|
2273 | CASE ( 'usm_rad_inlw' ) |
---|
2274 | !-- array of lw radiation falling to surface after i-th reflection |
---|
2275 | DO l = 1, nsurfl |
---|
2276 | IF ( surfl(id,l) == idsint ) THEN |
---|
2277 | surfinlw_av(l) = surfinlw_av(l) + surfinlw(l) |
---|
2278 | ENDIF |
---|
2279 | ENDDO |
---|
2280 | |
---|
2281 | CASE ( 'usm_rad_inswdir' ) |
---|
2282 | !-- array of direct sw radiation falling to surface from sun |
---|
2283 | DO l = 1, nsurfl |
---|
2284 | IF ( surfl(id,l) == idsint ) THEN |
---|
2285 | surfinswdir_av(l) = surfinswdir_av(l) + surfinswdir(l) |
---|
2286 | ENDIF |
---|
2287 | ENDDO |
---|
2288 | |
---|
2289 | CASE ( 'usm_rad_inswdif' ) |
---|
2290 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
2291 | DO l = 1, nsurfl |
---|
2292 | IF ( surfl(id,l) == idsint ) THEN |
---|
2293 | surfinswdif_av(l) = surfinswdif_av(l) + surfinswdif(l) |
---|
2294 | ENDIF |
---|
2295 | ENDDO |
---|
2296 | |
---|
2297 | CASE ( 'usm_rad_inswref' ) |
---|
2298 | !-- array of sw radiation falling to surface from reflections |
---|
2299 | DO l = 1, nsurfl |
---|
2300 | IF ( surfl(id,l) == idsint ) THEN |
---|
2301 | surfinswref_av(l) = surfinswref_av(l) + surfinsw(l) - & |
---|
2302 | surfinswdir(l) - surfinswdif(l) |
---|
2303 | ENDIF |
---|
2304 | ENDDO |
---|
2305 | |
---|
2306 | |
---|
2307 | CASE ( 'usm_rad_inlwdif' ) |
---|
2308 | !-- array of sw radiation falling to surface after i-th reflection |
---|
2309 | DO l = 1, nsurfl |
---|
2310 | IF ( surfl(id,l) == idsint ) THEN |
---|
2311 | surfinlwdif_av(l) = surfinlwdif_av(l) + surfinlwdif(l) |
---|
2312 | ENDIF |
---|
2313 | ENDDO |
---|
2314 | ! |
---|
2315 | CASE ( 'usm_rad_inlwref' ) |
---|
2316 | !-- array of lw radiation falling to surface from reflections |
---|
2317 | DO l = 1, nsurfl |
---|
2318 | IF ( surfl(id,l) == idsint ) THEN |
---|
2319 | surfinlwref_av(l) = surfinlwref_av(l) + & |
---|
2320 | surfinlw(l) - surfinlwdif(l) |
---|
2321 | ENDIF |
---|
2322 | ENDDO |
---|
2323 | |
---|
2324 | CASE ( 'usm_rad_outsw' ) |
---|
2325 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
2326 | DO l = 1, nsurfl |
---|
2327 | IF ( surfl(id,l) == idsint ) THEN |
---|
2328 | surfoutsw_av(l) = surfoutsw_av(l) + surfoutsw(l) |
---|
2329 | ENDIF |
---|
2330 | ENDDO |
---|
2331 | |
---|
2332 | CASE ( 'usm_rad_outlw' ) |
---|
2333 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
2334 | DO l = 1, nsurfl |
---|
2335 | IF ( surfl(id,l) == idsint ) THEN |
---|
2336 | surfoutlw_av(l) = surfoutlw_av(l) + surfoutlw(l) |
---|
2337 | ENDIF |
---|
2338 | ENDDO |
---|
2339 | |
---|
2340 | CASE ( 'usm_rad_ressw' ) |
---|
2341 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
2342 | DO l = 1, nsurfl |
---|
2343 | IF ( surfl(id,l) == idsint ) THEN |
---|
2344 | surfins_av(l) = surfins_av(l) + surfins(l) |
---|
2345 | ENDIF |
---|
2346 | ENDDO |
---|
2347 | |
---|
2348 | CASE ( 'usm_rad_reslw' ) |
---|
2349 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
2350 | DO l = 1, nsurfl |
---|
2351 | IF ( surfl(id,l) == idsint ) THEN |
---|
2352 | surfinl_av(l) = surfinl_av(l) + surfinl(l) |
---|
2353 | ENDIF |
---|
2354 | ENDDO |
---|
2355 | |
---|
2356 | CASE ( 'usm_rad_pc_inlw' ) |
---|
2357 | pcbinlw_av(:) = pcbinlw_av(:) + pcbinlw(:) |
---|
2358 | |
---|
2359 | CASE ( 'usm_rad_pc_insw' ) |
---|
2360 | pcbinsw_av(:) = pcbinsw_av(:) + pcbinsw(:) |
---|
2361 | |
---|
2362 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
2363 | pcbinswdir_av(:) = pcbinswdir_av(:) + pcbinswdir(:) |
---|
2364 | |
---|
2365 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
2366 | pcbinswdif_av(:) = pcbinswdif_av(:) + pcbinswdif(:) |
---|
2367 | |
---|
2368 | CASE ( 'usm_rad_pc_inswref' ) |
---|
2369 | pcbinswref_av(:) = pcbinswref_av(:) + pcbinsw(:) & |
---|
2370 | - pcbinswdir(:) & |
---|
2371 | - pcbinswdif(:) |
---|
2372 | |
---|
2373 | CASE ( 'usm_rad_hf' ) |
---|
2374 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
2375 | IF ( l == -1 ) THEN |
---|
2376 | DO m = 1, surf_usm_h%ns |
---|
2377 | surf_usm_h%surfhf_av(m) = & |
---|
2378 | surf_usm_h%surfhf_av(m) + & |
---|
2379 | surf_usm_h%surfhf(m) |
---|
2380 | ENDDO |
---|
2381 | ELSE |
---|
2382 | DO m = 1, surf_usm_v(l)%ns |
---|
2383 | surf_usm_v(l)%surfhf_av(m) = & |
---|
2384 | surf_usm_v(l)%surfhf_av(m) + & |
---|
2385 | surf_usm_v(l)%surfhf(m) |
---|
2386 | ENDDO |
---|
2387 | ENDIF |
---|
2388 | |
---|
2389 | CASE ( 'usm_wshf' ) |
---|
2390 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2391 | IF ( l == -1 ) THEN |
---|
2392 | DO m = 1, surf_usm_h%ns |
---|
2393 | surf_usm_h%wshf_eb_av(m) = & |
---|
2394 | surf_usm_h%wshf_eb_av(m) + & |
---|
2395 | surf_usm_h%wshf_eb(m) |
---|
2396 | ENDDO |
---|
2397 | ELSE |
---|
2398 | DO m = 1, surf_usm_v(l)%ns |
---|
2399 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2400 | surf_usm_v(l)%wshf_eb_av(m) + & |
---|
2401 | surf_usm_v(l)%wshf_eb(m) |
---|
2402 | ENDDO |
---|
2403 | ENDIF |
---|
2404 | |
---|
2405 | CASE ( 'usm_qsws' ) |
---|
2406 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2407 | IF ( l == -1 ) THEN |
---|
2408 | DO m = 1, surf_usm_h%ns |
---|
2409 | surf_usm_h%qsws_eb_av(m) = & |
---|
2410 | surf_usm_h%qsws_eb_av(m) + & |
---|
2411 | surf_usm_h%qsws_eb(m) |
---|
2412 | ENDDO |
---|
2413 | ELSE |
---|
2414 | DO m = 1, surf_usm_v(l)%ns |
---|
2415 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2416 | surf_usm_v(l)%qsws_eb_av(m) + & |
---|
2417 | surf_usm_v(l)%qsws_eb(m) |
---|
2418 | ENDDO |
---|
2419 | ENDIF |
---|
2420 | |
---|
2421 | CASE ( 'usm_qsws_veg' ) |
---|
2422 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2423 | IF ( l == -1 ) THEN |
---|
2424 | DO m = 1, surf_usm_h%ns |
---|
2425 | surf_usm_h%qsws_veg_eb_av(m) = & |
---|
2426 | surf_usm_h%qsws_veg_eb_av(m) + & |
---|
2427 | surf_usm_h%qsws_veg_eb(m) |
---|
2428 | ENDDO |
---|
2429 | ELSE |
---|
2430 | DO m = 1, surf_usm_v(l)%ns |
---|
2431 | surf_usm_v(l)%qsws_veg_eb_av(m) = & |
---|
2432 | surf_usm_v(l)%qsws_veg_eb_av(m) + & |
---|
2433 | surf_usm_v(l)%qsws_veg_eb(m) |
---|
2434 | ENDDO |
---|
2435 | ENDIF |
---|
2436 | |
---|
2437 | CASE ( 'usm_qsws_liq' ) |
---|
2438 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2439 | IF ( l == -1 ) THEN |
---|
2440 | DO m = 1, surf_usm_h%ns |
---|
2441 | surf_usm_h%qsws_liq_eb_av(m) = & |
---|
2442 | surf_usm_h%qsws_liq_eb_av(m) + & |
---|
2443 | surf_usm_h%qsws_liq_eb(m) |
---|
2444 | ENDDO |
---|
2445 | ELSE |
---|
2446 | DO m = 1, surf_usm_v(l)%ns |
---|
2447 | surf_usm_v(l)%qsws_liq_eb_av(m) = & |
---|
2448 | surf_usm_v(l)%qsws_liq_eb_av(m) + & |
---|
2449 | surf_usm_v(l)%qsws_liq_eb(m) |
---|
2450 | ENDDO |
---|
2451 | ENDIF |
---|
2452 | |
---|
2453 | CASE ( 'usm_wghf' ) |
---|
2454 | !-- array of heat flux from ground (wall, roof, land) |
---|
2455 | IF ( l == -1 ) THEN |
---|
2456 | DO m = 1, surf_usm_h%ns |
---|
2457 | surf_usm_h%wghf_eb_av(m) = & |
---|
2458 | surf_usm_h%wghf_eb_av(m) + & |
---|
2459 | surf_usm_h%wghf_eb(m) |
---|
2460 | ENDDO |
---|
2461 | ELSE |
---|
2462 | DO m = 1, surf_usm_v(l)%ns |
---|
2463 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2464 | surf_usm_v(l)%wghf_eb_av(m) + & |
---|
2465 | surf_usm_v(l)%wghf_eb(m) |
---|
2466 | ENDDO |
---|
2467 | ENDIF |
---|
2468 | |
---|
2469 | CASE ( 'usm_wghf_window' ) |
---|
2470 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2471 | IF ( l == -1 ) THEN |
---|
2472 | DO m = 1, surf_usm_h%ns |
---|
2473 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2474 | surf_usm_h%wghf_eb_window_av(m) + & |
---|
2475 | surf_usm_h%wghf_eb_window(m) |
---|
2476 | ENDDO |
---|
2477 | ELSE |
---|
2478 | DO m = 1, surf_usm_v(l)%ns |
---|
2479 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2480 | surf_usm_v(l)%wghf_eb_window_av(m) + & |
---|
2481 | surf_usm_v(l)%wghf_eb_window(m) |
---|
2482 | ENDDO |
---|
2483 | ENDIF |
---|
2484 | |
---|
2485 | CASE ( 'usm_wghf_green' ) |
---|
2486 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2487 | IF ( l == -1 ) THEN |
---|
2488 | DO m = 1, surf_usm_h%ns |
---|
2489 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2490 | surf_usm_h%wghf_eb_green_av(m) + & |
---|
2491 | surf_usm_h%wghf_eb_green(m) |
---|
2492 | ENDDO |
---|
2493 | ELSE |
---|
2494 | DO m = 1, surf_usm_v(l)%ns |
---|
2495 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2496 | surf_usm_v(l)%wghf_eb_green_av(m) + & |
---|
2497 | surf_usm_v(l)%wghf_eb_green(m) |
---|
2498 | ENDDO |
---|
2499 | ENDIF |
---|
2500 | |
---|
2501 | CASE ( 'usm_iwghf' ) |
---|
2502 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2503 | IF ( l == -1 ) THEN |
---|
2504 | DO m = 1, surf_usm_h%ns |
---|
2505 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2506 | surf_usm_h%iwghf_eb_av(m) + & |
---|
2507 | surf_usm_h%iwghf_eb(m) |
---|
2508 | ENDDO |
---|
2509 | ELSE |
---|
2510 | DO m = 1, surf_usm_v(l)%ns |
---|
2511 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2512 | surf_usm_v(l)%iwghf_eb_av(m) + & |
---|
2513 | surf_usm_v(l)%iwghf_eb(m) |
---|
2514 | ENDDO |
---|
2515 | ENDIF |
---|
2516 | |
---|
2517 | CASE ( 'usm_iwghf_window' ) |
---|
2518 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2519 | IF ( l == -1 ) THEN |
---|
2520 | DO m = 1, surf_usm_h%ns |
---|
2521 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2522 | surf_usm_h%iwghf_eb_window_av(m) + & |
---|
2523 | surf_usm_h%iwghf_eb_window(m) |
---|
2524 | ENDDO |
---|
2525 | ELSE |
---|
2526 | DO m = 1, surf_usm_v(l)%ns |
---|
2527 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2528 | surf_usm_v(l)%iwghf_eb_window_av(m) + & |
---|
2529 | surf_usm_v(l)%iwghf_eb_window(m) |
---|
2530 | ENDDO |
---|
2531 | ENDIF |
---|
2532 | |
---|
2533 | CASE ( 'usm_t_surf_wall' ) |
---|
2534 | !-- surface temperature for surfaces |
---|
2535 | IF ( l == -1 ) THEN |
---|
2536 | DO m = 1, surf_usm_h%ns |
---|
2537 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2538 | surf_usm_h%t_surf_wall_av(m) + & |
---|
2539 | t_surf_wall_h(m) |
---|
2540 | ENDDO |
---|
2541 | ELSE |
---|
2542 | DO m = 1, surf_usm_v(l)%ns |
---|
2543 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2544 | surf_usm_v(l)%t_surf_wall_av(m) + & |
---|
2545 | t_surf_wall_v(l)%t(m) |
---|
2546 | ENDDO |
---|
2547 | ENDIF |
---|
2548 | |
---|
2549 | CASE ( 'usm_t_surf_window' ) |
---|
2550 | !-- surface temperature for window surfaces |
---|
2551 | IF ( l == -1 ) THEN |
---|
2552 | DO m = 1, surf_usm_h%ns |
---|
2553 | surf_usm_h%t_surf_window_av(m) = & |
---|
2554 | surf_usm_h%t_surf_window_av(m) + & |
---|
2555 | t_surf_window_h(m) |
---|
2556 | ENDDO |
---|
2557 | ELSE |
---|
2558 | DO m = 1, surf_usm_v(l)%ns |
---|
2559 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2560 | surf_usm_v(l)%t_surf_window_av(m) + & |
---|
2561 | t_surf_window_v(l)%t(m) |
---|
2562 | ENDDO |
---|
2563 | ENDIF |
---|
2564 | |
---|
2565 | CASE ( 'usm_t_surf_green' ) |
---|
2566 | !-- surface temperature for green surfaces |
---|
2567 | IF ( l == -1 ) THEN |
---|
2568 | DO m = 1, surf_usm_h%ns |
---|
2569 | surf_usm_h%t_surf_green_av(m) = & |
---|
2570 | surf_usm_h%t_surf_green_av(m) + & |
---|
2571 | t_surf_green_h(m) |
---|
2572 | ENDDO |
---|
2573 | ELSE |
---|
2574 | DO m = 1, surf_usm_v(l)%ns |
---|
2575 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2576 | surf_usm_v(l)%t_surf_green_av(m) + & |
---|
2577 | t_surf_green_v(l)%t(m) |
---|
2578 | ENDDO |
---|
2579 | ENDIF |
---|
2580 | |
---|
2581 | CASE ( 'usm_t_surf_10cm' ) |
---|
2582 | !-- near surface temperature for whole surfaces |
---|
2583 | IF ( l == -1 ) THEN |
---|
2584 | DO m = 1, surf_usm_h%ns |
---|
2585 | surf_usm_h%t_surf_10cm_av(m) = & |
---|
2586 | surf_usm_h%t_surf_10cm_av(m) + & |
---|
2587 | t_surf_10cm_h(m) |
---|
2588 | ENDDO |
---|
2589 | ELSE |
---|
2590 | DO m = 1, surf_usm_v(l)%ns |
---|
2591 | surf_usm_v(l)%t_surf_10cm_av(m) = & |
---|
2592 | surf_usm_v(l)%t_surf_10cm_av(m) + & |
---|
2593 | t_surf_10cm_v(l)%t(m) |
---|
2594 | ENDDO |
---|
2595 | ENDIF |
---|
2596 | |
---|
2597 | |
---|
2598 | CASE ( 'usm_t_wall' ) |
---|
2599 | !-- wall temperature for iwl layer of walls and land |
---|
2600 | IF ( l == -1 ) THEN |
---|
2601 | DO m = 1, surf_usm_h%ns |
---|
2602 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
2603 | surf_usm_h%t_wall_av(iwl,m) + & |
---|
2604 | t_wall_h(iwl,m) |
---|
2605 | ENDDO |
---|
2606 | ELSE |
---|
2607 | DO m = 1, surf_usm_v(l)%ns |
---|
2608 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
2609 | surf_usm_v(l)%t_wall_av(iwl,m) + & |
---|
2610 | t_wall_v(l)%t(iwl,m) |
---|
2611 | ENDDO |
---|
2612 | ENDIF |
---|
2613 | |
---|
2614 | CASE ( 'usm_t_window' ) |
---|
2615 | !-- window temperature for iwl layer of walls and land |
---|
2616 | IF ( l == -1 ) THEN |
---|
2617 | DO m = 1, surf_usm_h%ns |
---|
2618 | surf_usm_h%t_window_av(iwl,m) = & |
---|
2619 | surf_usm_h%t_window_av(iwl,m) + & |
---|
2620 | t_window_h(iwl,m) |
---|
2621 | ENDDO |
---|
2622 | ELSE |
---|
2623 | DO m = 1, surf_usm_v(l)%ns |
---|
2624 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
2625 | surf_usm_v(l)%t_window_av(iwl,m) + & |
---|
2626 | t_window_v(l)%t(iwl,m) |
---|
2627 | ENDDO |
---|
2628 | ENDIF |
---|
2629 | |
---|
2630 | CASE ( 'usm_t_green' ) |
---|
2631 | !-- green temperature for iwl layer of walls and land |
---|
2632 | IF ( l == -1 ) THEN |
---|
2633 | DO m = 1, surf_usm_h%ns |
---|
2634 | surf_usm_h%t_green_av(iwl,m) = & |
---|
2635 | surf_usm_h%t_green_av(iwl,m) + & |
---|
2636 | t_green_h(iwl,m) |
---|
2637 | ENDDO |
---|
2638 | ELSE |
---|
2639 | DO m = 1, surf_usm_v(l)%ns |
---|
2640 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
2641 | surf_usm_v(l)%t_green_av(iwl,m) + & |
---|
2642 | t_green_v(l)%t(iwl,m) |
---|
2643 | ENDDO |
---|
2644 | ENDIF |
---|
2645 | |
---|
2646 | CASE ( 'usm_swc' ) |
---|
2647 | !-- soil water content for iwl layer of walls and land |
---|
2648 | IF ( l == -1 ) THEN |
---|
2649 | DO m = 1, surf_usm_h%ns |
---|
2650 | surf_usm_h%swc_av(iwl,m) = & |
---|
2651 | surf_usm_h%swc_av(iwl,m) + & |
---|
2652 | swc_h(iwl,m) |
---|
2653 | ENDDO |
---|
2654 | ELSE |
---|
2655 | DO m = 1, surf_usm_v(l)%ns |
---|
2656 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
2657 | surf_usm_v(l)%swc_av(iwl,m) + & |
---|
2658 | swc_v(l)%t(iwl,m) |
---|
2659 | ENDDO |
---|
2660 | ENDIF |
---|
2661 | |
---|
2662 | CASE DEFAULT |
---|
2663 | CONTINUE |
---|
2664 | |
---|
2665 | END SELECT |
---|
2666 | |
---|
2667 | ELSEIF ( mode == 'average' ) THEN |
---|
2668 | |
---|
2669 | SELECT CASE ( TRIM( var ) ) |
---|
2670 | |
---|
2671 | CASE ( 'usm_rad_net' ) |
---|
2672 | !-- array of complete radiation balance |
---|
2673 | IF ( l == -1 ) THEN |
---|
2674 | DO m = 1, surf_usm_h%ns |
---|
2675 | surf_usm_h%rad_net_av(m) = & |
---|
2676 | surf_usm_h%rad_net_av(m) / & |
---|
2677 | REAL( average_count_3d, kind=wp ) |
---|
2678 | ENDDO |
---|
2679 | ELSE |
---|
2680 | DO m = 1, surf_usm_v(l)%ns |
---|
2681 | surf_usm_v(l)%rad_net_av(m) = & |
---|
2682 | surf_usm_v(l)%rad_net_av(m) / & |
---|
2683 | REAL( average_count_3d, kind=wp ) |
---|
2684 | ENDDO |
---|
2685 | ENDIF |
---|
2686 | |
---|
2687 | CASE ( 'usm_rad_insw' ) |
---|
2688 | !-- array of sw radiation falling to surface after i-th reflection |
---|
2689 | DO l = 1, nsurfl |
---|
2690 | IF ( surfl(id,l) == idsint ) THEN |
---|
2691 | surfinsw_av(l) = surfinsw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2692 | ENDIF |
---|
2693 | ENDDO |
---|
2694 | |
---|
2695 | CASE ( 'usm_rad_inlw' ) |
---|
2696 | !-- array of lw radiation falling to surface after i-th reflection |
---|
2697 | DO l = 1, nsurfl |
---|
2698 | IF ( surfl(id,l) == idsint ) THEN |
---|
2699 | surfinlw_av(l) = surfinlw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2700 | ENDIF |
---|
2701 | ENDDO |
---|
2702 | |
---|
2703 | CASE ( 'usm_rad_inswdir' ) |
---|
2704 | !-- array of direct sw radiation falling to surface from sun |
---|
2705 | DO l = 1, nsurfl |
---|
2706 | IF ( surfl(id,l) == idsint ) THEN |
---|
2707 | surfinswdir_av(l) = surfinswdir_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2708 | ENDIF |
---|
2709 | ENDDO |
---|
2710 | |
---|
2711 | CASE ( 'usm_rad_inswdif' ) |
---|
2712 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
2713 | DO l = 1, nsurfl |
---|
2714 | IF ( surfl(id,l) == idsint ) THEN |
---|
2715 | surfinswdif_av(l) = surfinswdif_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2716 | ENDIF |
---|
2717 | ENDDO |
---|
2718 | |
---|
2719 | CASE ( 'usm_rad_inswref' ) |
---|
2720 | !-- array of sw radiation falling to surface from reflections |
---|
2721 | DO l = 1, nsurfl |
---|
2722 | IF ( surfl(id,l) == idsint ) THEN |
---|
2723 | surfinswref_av(l) = surfinswref_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2724 | ENDIF |
---|
2725 | ENDDO |
---|
2726 | |
---|
2727 | CASE ( 'usm_rad_inlwdif' ) |
---|
2728 | !-- array of sw radiation falling to surface after i-th reflection |
---|
2729 | DO l = 1, nsurfl |
---|
2730 | IF ( surfl(id,l) == idsint ) THEN |
---|
2731 | surfinlwdif_av(l) = surfinlwdif_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2732 | ENDIF |
---|
2733 | ENDDO |
---|
2734 | |
---|
2735 | CASE ( 'usm_rad_inlwref' ) |
---|
2736 | !-- array of lw radiation falling to surface from reflections |
---|
2737 | DO l = 1, nsurfl |
---|
2738 | IF ( surfl(id,l) == idsint ) THEN |
---|
2739 | surfinlwref_av(l) = surfinlwref_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2740 | ENDIF |
---|
2741 | ENDDO |
---|
2742 | |
---|
2743 | CASE ( 'usm_rad_outsw' ) |
---|
2744 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
2745 | DO l = 1, nsurfl |
---|
2746 | IF ( surfl(id,l) == idsint ) THEN |
---|
2747 | surfoutsw_av(l) = surfoutsw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2748 | ENDIF |
---|
2749 | ENDDO |
---|
2750 | |
---|
2751 | CASE ( 'usm_rad_outlw' ) |
---|
2752 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
2753 | DO l = 1, nsurfl |
---|
2754 | IF ( surfl(id,l) == idsint ) THEN |
---|
2755 | surfoutlw_av(l) = surfoutlw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2756 | ENDIF |
---|
2757 | ENDDO |
---|
2758 | |
---|
2759 | CASE ( 'usm_rad_ressw' ) |
---|
2760 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
2761 | DO l = 1, nsurfl |
---|
2762 | IF ( surfl(id,l) == idsint ) THEN |
---|
2763 | surfins_av(l) = surfins_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2764 | ENDIF |
---|
2765 | ENDDO |
---|
2766 | |
---|
2767 | CASE ( 'usm_rad_reslw' ) |
---|
2768 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
2769 | DO l = 1, nsurfl |
---|
2770 | IF ( surfl(id,l) == idsint ) THEN |
---|
2771 | surfinl_av(l) = surfinl_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2772 | ENDIF |
---|
2773 | ENDDO |
---|
2774 | |
---|
2775 | CASE ( 'usm_rad_pc_inlw' ) |
---|
2776 | pcbinlw_av(:) = pcbinlw_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2777 | |
---|
2778 | CASE ( 'usm_rad_pc_insw' ) |
---|
2779 | pcbinsw_av(:) = pcbinsw_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2780 | |
---|
2781 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
2782 | pcbinswdir_av(:) = pcbinswdir_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2783 | |
---|
2784 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
2785 | pcbinswdif_av(:) = pcbinswdif_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2786 | |
---|
2787 | CASE ( 'usm_rad_pc_inswref' ) |
---|
2788 | pcbinswref_av(:) = pcbinswref_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2789 | |
---|
2790 | CASE ( 'usm_rad_hf' ) |
---|
2791 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
2792 | IF ( l == -1 ) THEN |
---|
2793 | DO m = 1, surf_usm_h%ns |
---|
2794 | surf_usm_h%surfhf_av(m) = & |
---|
2795 | surf_usm_h%surfhf_av(m) / & |
---|
2796 | REAL( average_count_3d, kind=wp ) |
---|
2797 | ENDDO |
---|
2798 | ELSE |
---|
2799 | DO m = 1, surf_usm_v(l)%ns |
---|
2800 | surf_usm_v(l)%surfhf_av(m) = & |
---|
2801 | surf_usm_v(l)%surfhf_av(m) / & |
---|
2802 | REAL( average_count_3d, kind=wp ) |
---|
2803 | ENDDO |
---|
2804 | ENDIF |
---|
2805 | |
---|
2806 | CASE ( 'usm_wshf' ) |
---|
2807 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2808 | IF ( l == -1 ) THEN |
---|
2809 | DO m = 1, surf_usm_h%ns |
---|
2810 | surf_usm_h%wshf_eb_av(m) = & |
---|
2811 | surf_usm_h%wshf_eb_av(m) / & |
---|
2812 | REAL( average_count_3d, kind=wp ) |
---|
2813 | ENDDO |
---|
2814 | ELSE |
---|
2815 | DO m = 1, surf_usm_v(l)%ns |
---|
2816 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2817 | surf_usm_v(l)%wshf_eb_av(m) / & |
---|
2818 | REAL( average_count_3d, kind=wp ) |
---|
2819 | ENDDO |
---|
2820 | ENDIF |
---|
2821 | |
---|
2822 | CASE ( 'usm_qsws' ) |
---|
2823 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2824 | IF ( l == -1 ) THEN |
---|
2825 | DO m = 1, surf_usm_h%ns |
---|
2826 | surf_usm_h%qsws_eb_av(m) = & |
---|
2827 | surf_usm_h%qsws_eb_av(m) / & |
---|
2828 | REAL( average_count_3d, kind=wp ) |
---|
2829 | ENDDO |
---|
2830 | ELSE |
---|
2831 | DO m = 1, surf_usm_v(l)%ns |
---|
2832 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2833 | surf_usm_v(l)%qsws_eb_av(m) / & |
---|
2834 | REAL( average_count_3d, kind=wp ) |
---|
2835 | ENDDO |
---|
2836 | ENDIF |
---|
2837 | |
---|
2838 | CASE ( 'usm_qsws_veg' ) |
---|
2839 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2840 | IF ( l == -1 ) THEN |
---|
2841 | DO m = 1, surf_usm_h%ns |
---|
2842 | surf_usm_h%qsws_veg_eb_av(m) = & |
---|
2843 | surf_usm_h%qsws_veg_eb_av(m) / & |
---|
2844 | REAL( average_count_3d, kind=wp ) |
---|
2845 | ENDDO |
---|
2846 | ELSE |
---|
2847 | DO m = 1, surf_usm_v(l)%ns |
---|
2848 | surf_usm_v(l)%qsws_veg_eb_av(m) = & |
---|
2849 | surf_usm_v(l)%qsws_veg_eb_av(m) / & |
---|
2850 | REAL( average_count_3d, kind=wp ) |
---|
2851 | ENDDO |
---|
2852 | ENDIF |
---|
2853 | |
---|
2854 | CASE ( 'usm_qsws_liq' ) |
---|
2855 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2856 | IF ( l == -1 ) THEN |
---|
2857 | DO m = 1, surf_usm_h%ns |
---|
2858 | surf_usm_h%qsws_liq_eb_av(m) = & |
---|
2859 | surf_usm_h%qsws_liq_eb_av(m) / & |
---|
2860 | REAL( average_count_3d, kind=wp ) |
---|
2861 | ENDDO |
---|
2862 | ELSE |
---|
2863 | DO m = 1, surf_usm_v(l)%ns |
---|
2864 | surf_usm_v(l)%qsws_liq_eb_av(m) = & |
---|
2865 | surf_usm_v(l)%qsws_liq_eb_av(m) / & |
---|
2866 | REAL( average_count_3d, kind=wp ) |
---|
2867 | ENDDO |
---|
2868 | ENDIF |
---|
2869 | |
---|
2870 | CASE ( 'usm_wghf' ) |
---|
2871 | !-- array of heat flux from ground (wall, roof, land) |
---|
2872 | IF ( l == -1 ) THEN |
---|
2873 | DO m = 1, surf_usm_h%ns |
---|
2874 | surf_usm_h%wghf_eb_av(m) = & |
---|
2875 | surf_usm_h%wghf_eb_av(m) / & |
---|
2876 | REAL( average_count_3d, kind=wp ) |
---|
2877 | ENDDO |
---|
2878 | ELSE |
---|
2879 | DO m = 1, surf_usm_v(l)%ns |
---|
2880 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2881 | surf_usm_v(l)%wghf_eb_av(m) / & |
---|
2882 | REAL( average_count_3d, kind=wp ) |
---|
2883 | ENDDO |
---|
2884 | ENDIF |
---|
2885 | |
---|
2886 | CASE ( 'usm_wghf_window' ) |
---|
2887 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2888 | IF ( l == -1 ) THEN |
---|
2889 | DO m = 1, surf_usm_h%ns |
---|
2890 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2891 | surf_usm_h%wghf_eb_window_av(m) / & |
---|
2892 | REAL( average_count_3d, kind=wp ) |
---|
2893 | ENDDO |
---|
2894 | ELSE |
---|
2895 | DO m = 1, surf_usm_v(l)%ns |
---|
2896 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2897 | surf_usm_v(l)%wghf_eb_window_av(m) / & |
---|
2898 | REAL( average_count_3d, kind=wp ) |
---|
2899 | ENDDO |
---|
2900 | ENDIF |
---|
2901 | |
---|
2902 | CASE ( 'usm_wghf_green' ) |
---|
2903 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2904 | IF ( l == -1 ) THEN |
---|
2905 | DO m = 1, surf_usm_h%ns |
---|
2906 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2907 | surf_usm_h%wghf_eb_green_av(m) / & |
---|
2908 | REAL( average_count_3d, kind=wp ) |
---|
2909 | ENDDO |
---|
2910 | ELSE |
---|
2911 | DO m = 1, surf_usm_v(l)%ns |
---|
2912 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2913 | surf_usm_v(l)%wghf_eb_green_av(m) / & |
---|
2914 | REAL( average_count_3d, kind=wp ) |
---|
2915 | ENDDO |
---|
2916 | ENDIF |
---|
2917 | |
---|
2918 | CASE ( 'usm_iwghf' ) |
---|
2919 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2920 | IF ( l == -1 ) THEN |
---|
2921 | DO m = 1, surf_usm_h%ns |
---|
2922 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2923 | surf_usm_h%iwghf_eb_av(m) / & |
---|
2924 | REAL( average_count_3d, kind=wp ) |
---|
2925 | ENDDO |
---|
2926 | ELSE |
---|
2927 | DO m = 1, surf_usm_v(l)%ns |
---|
2928 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2929 | surf_usm_v(l)%iwghf_eb_av(m) / & |
---|
2930 | REAL( average_count_3d, kind=wp ) |
---|
2931 | ENDDO |
---|
2932 | ENDIF |
---|
2933 | |
---|
2934 | CASE ( 'usm_iwghf_window' ) |
---|
2935 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2936 | IF ( l == -1 ) THEN |
---|
2937 | DO m = 1, surf_usm_h%ns |
---|
2938 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2939 | surf_usm_h%iwghf_eb_window_av(m) / & |
---|
2940 | REAL( average_count_3d, kind=wp ) |
---|
2941 | ENDDO |
---|
2942 | ELSE |
---|
2943 | DO m = 1, surf_usm_v(l)%ns |
---|
2944 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2945 | surf_usm_v(l)%iwghf_eb_window_av(m) / & |
---|
2946 | REAL( average_count_3d, kind=wp ) |
---|
2947 | ENDDO |
---|
2948 | ENDIF |
---|
2949 | |
---|
2950 | CASE ( 'usm_t_surf_wall' ) |
---|
2951 | !-- surface temperature for surfaces |
---|
2952 | IF ( l == -1 ) THEN |
---|
2953 | DO m = 1, surf_usm_h%ns |
---|
2954 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2955 | surf_usm_h%t_surf_wall_av(m) / & |
---|
2956 | REAL( average_count_3d, kind=wp ) |
---|
2957 | ENDDO |
---|
2958 | ELSE |
---|
2959 | DO m = 1, surf_usm_v(l)%ns |
---|
2960 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2961 | surf_usm_v(l)%t_surf_wall_av(m) / & |
---|
2962 | REAL( average_count_3d, kind=wp ) |
---|
2963 | ENDDO |
---|
2964 | ENDIF |
---|
2965 | |
---|
2966 | CASE ( 'usm_t_surf_window' ) |
---|
2967 | !-- surface temperature for window surfaces |
---|
2968 | IF ( l == -1 ) THEN |
---|
2969 | DO m = 1, surf_usm_h%ns |
---|
2970 | surf_usm_h%t_surf_window_av(m) = & |
---|
2971 | surf_usm_h%t_surf_window_av(m) / & |
---|
2972 | REAL( average_count_3d, kind=wp ) |
---|
2973 | ENDDO |
---|
2974 | ELSE |
---|
2975 | DO m = 1, surf_usm_v(l)%ns |
---|
2976 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2977 | surf_usm_v(l)%t_surf_window_av(m) / & |
---|
2978 | REAL( average_count_3d, kind=wp ) |
---|
2979 | ENDDO |
---|
2980 | ENDIF |
---|
2981 | |
---|
2982 | CASE ( 'usm_t_surf_green' ) |
---|
2983 | !-- surface temperature for green surfaces |
---|
2984 | IF ( l == -1 ) THEN |
---|
2985 | DO m = 1, surf_usm_h%ns |
---|
2986 | surf_usm_h%t_surf_green_av(m) = & |
---|
2987 | surf_usm_h%t_surf_green_av(m) / & |
---|
2988 | REAL( average_count_3d, kind=wp ) |
---|
2989 | ENDDO |
---|
2990 | ELSE |
---|
2991 | DO m = 1, surf_usm_v(l)%ns |
---|
2992 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2993 | surf_usm_v(l)%t_surf_green_av(m) / & |
---|
2994 | REAL( average_count_3d, kind=wp ) |
---|
2995 | ENDDO |
---|
2996 | ENDIF |
---|
2997 | |
---|
2998 | CASE ( 'usm_t_surf_10cm' ) |
---|
2999 | !-- near surface temperature for whole surfaces |
---|
3000 | IF ( l == -1 ) THEN |
---|
3001 | DO m = 1, surf_usm_h%ns |
---|
3002 | surf_usm_h%t_surf_10cm_av(m) = & |
---|
3003 | surf_usm_h%t_surf_10cm_av(m) / & |
---|
3004 | REAL( average_count_3d, kind=wp ) |
---|
3005 | ENDDO |
---|
3006 | ELSE |
---|
3007 | DO m = 1, surf_usm_v(l)%ns |
---|
3008 | surf_usm_v(l)%t_surf_10cm_av(m) = & |
---|
3009 | surf_usm_v(l)%t_surf_10cm_av(m) / & |
---|
3010 | REAL( average_count_3d, kind=wp ) |
---|
3011 | ENDDO |
---|
3012 | ENDIF |
---|
3013 | |
---|
3014 | CASE ( 'usm_t_wall' ) |
---|
3015 | !-- wall temperature for iwl layer of walls and land |
---|
3016 | IF ( l == -1 ) THEN |
---|
3017 | DO m = 1, surf_usm_h%ns |
---|
3018 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
3019 | surf_usm_h%t_wall_av(iwl,m) / & |
---|
3020 | REAL( average_count_3d, kind=wp ) |
---|
3021 | ENDDO |
---|
3022 | ELSE |
---|
3023 | DO m = 1, surf_usm_v(l)%ns |
---|
3024 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
3025 | surf_usm_v(l)%t_wall_av(iwl,m) / & |
---|
3026 | REAL( average_count_3d, kind=wp ) |
---|
3027 | ENDDO |
---|
3028 | ENDIF |
---|
3029 | |
---|
3030 | CASE ( 'usm_t_window' ) |
---|
3031 | !-- window temperature for iwl layer of walls and land |
---|
3032 | IF ( l == -1 ) THEN |
---|
3033 | DO m = 1, surf_usm_h%ns |
---|
3034 | surf_usm_h%t_window_av(iwl,m) = & |
---|
3035 | surf_usm_h%t_window_av(iwl,m) / & |
---|
3036 | REAL( average_count_3d, kind=wp ) |
---|
3037 | ENDDO |
---|
3038 | ELSE |
---|
3039 | DO m = 1, surf_usm_v(l)%ns |
---|
3040 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
3041 | surf_usm_v(l)%t_window_av(iwl,m) / & |
---|
3042 | REAL( average_count_3d, kind=wp ) |
---|
3043 | ENDDO |
---|
3044 | ENDIF |
---|
3045 | |
---|
3046 | CASE ( 'usm_t_green' ) |
---|
3047 | !-- green temperature for iwl layer of walls and land |
---|
3048 | IF ( l == -1 ) THEN |
---|
3049 | DO m = 1, surf_usm_h%ns |
---|
3050 | surf_usm_h%t_green_av(iwl,m) = & |
---|
3051 | surf_usm_h%t_green_av(iwl,m) / & |
---|
3052 | REAL( average_count_3d, kind=wp ) |
---|
3053 | ENDDO |
---|
3054 | ELSE |
---|
3055 | DO m = 1, surf_usm_v(l)%ns |
---|
3056 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
3057 | surf_usm_v(l)%t_green_av(iwl,m) / & |
---|
3058 | REAL( average_count_3d, kind=wp ) |
---|
3059 | ENDDO |
---|
3060 | ENDIF |
---|
3061 | |
---|
3062 | CASE ( 'usm_swc' ) |
---|
3063 | !-- soil water content for iwl layer of walls and land |
---|
3064 | IF ( l == -1 ) THEN |
---|
3065 | DO m = 1, surf_usm_h%ns |
---|
3066 | surf_usm_h%swc_av(iwl,m) = & |
---|
3067 | surf_usm_h%swc_av(iwl,m) / & |
---|
3068 | REAL( average_count_3d, kind=wp ) |
---|
3069 | ENDDO |
---|
3070 | ELSE |
---|
3071 | DO m = 1, surf_usm_v(l)%ns |
---|
3072 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
3073 | surf_usm_v(l)%swc_av(iwl,m) / & |
---|
3074 | REAL( average_count_3d, kind=wp ) |
---|
3075 | ENDDO |
---|
3076 | ENDIF |
---|
3077 | |
---|
3078 | |
---|
3079 | END SELECT |
---|
3080 | |
---|
3081 | ENDIF |
---|
3082 | |
---|
3083 | END SUBROUTINE usm_average_3d_data |
---|
3084 | |
---|
3085 | |
---|
3086 | |
---|
3087 | !------------------------------------------------------------------------------! |
---|
3088 | ! Description: |
---|
3089 | ! ------------ |
---|
3090 | !> Set internal Neumann boundary condition at outer soil grid points |
---|
3091 | !> for temperature and humidity. |
---|
3092 | !------------------------------------------------------------------------------! |
---|
3093 | SUBROUTINE usm_boundary_condition |
---|
3094 | |
---|
3095 | IMPLICIT NONE |
---|
3096 | |
---|
3097 | INTEGER(iwp) :: i !< grid index x-direction |
---|
3098 | INTEGER(iwp) :: ioff !< offset index x-direction indicating location of soil grid point |
---|
3099 | INTEGER(iwp) :: j !< grid index y-direction |
---|
3100 | INTEGER(iwp) :: joff !< offset index x-direction indicating location of soil grid point |
---|
3101 | INTEGER(iwp) :: k !< grid index z-direction |
---|
3102 | INTEGER(iwp) :: koff !< offset index x-direction indicating location of soil grid point |
---|
3103 | INTEGER(iwp) :: l !< running index surface-orientation |
---|
3104 | INTEGER(iwp) :: m !< running index surface elements |
---|
3105 | |
---|
3106 | koff = surf_usm_h%koff |
---|
3107 | DO m = 1, surf_usm_h%ns |
---|
3108 | i = surf_usm_h%i(m) |
---|
3109 | j = surf_usm_h%j(m) |
---|
3110 | k = surf_usm_h%k(m) |
---|
3111 | pt(k+koff,j,i) = pt(k,j,i) |
---|
3112 | ENDDO |
---|
3113 | |
---|
3114 | DO l = 0, 3 |
---|
3115 | ioff = surf_usm_v(l)%ioff |
---|
3116 | joff = surf_usm_v(l)%joff |
---|
3117 | DO m = 1, surf_usm_v(l)%ns |
---|
3118 | i = surf_usm_v(l)%i(m) |
---|
3119 | j = surf_usm_v(l)%j(m) |
---|
3120 | k = surf_usm_v(l)%k(m) |
---|
3121 | pt(k,j+joff,i+ioff) = pt(k,j,i) |
---|
3122 | ENDDO |
---|
3123 | ENDDO |
---|
3124 | |
---|
3125 | END SUBROUTINE usm_boundary_condition |
---|
3126 | |
---|
3127 | |
---|
3128 | !------------------------------------------------------------------------------! |
---|
3129 | ! |
---|
3130 | ! Description: |
---|
3131 | ! ------------ |
---|
3132 | !> Subroutine checks variables and assigns units. |
---|
3133 | !> It is called out from subroutine check_parameters. |
---|
3134 | !------------------------------------------------------------------------------! |
---|
3135 | SUBROUTINE usm_check_data_output( variable, unit ) |
---|
3136 | |
---|
3137 | IMPLICIT NONE |
---|
3138 | |
---|
3139 | CHARACTER(LEN=*),INTENT(IN) :: variable !< |
---|
3140 | CHARACTER(LEN=*),INTENT(OUT) :: unit !< |
---|
3141 | |
---|
3142 | INTEGER(iwp) :: i,j,l !< index |
---|
3143 | CHARACTER(LEN=2) :: ls |
---|
3144 | CHARACTER(LEN=varnamelength) :: var !< TRIM(variable) |
---|
3145 | INTEGER(iwp), PARAMETER :: nl1 = 31 !< number of directional usm variables |
---|
3146 | CHARACTER(LEN=varnamelength), DIMENSION(nl1) :: varlist1 = & !< list of directional usm variables |
---|
3147 | (/'usm_rad_net ', & |
---|
3148 | 'usm_rad_insw ', & |
---|
3149 | 'usm_rad_inlw ', & |
---|
3150 | 'usm_rad_inswdir ', & |
---|
3151 | 'usm_rad_inswdif ', & |
---|
3152 | 'usm_rad_inswref ', & |
---|
3153 | 'usm_rad_inlwdif ', & |
---|
3154 | 'usm_wshf ', & |
---|
3155 | 'usm_rad_inlwref ', & |
---|
3156 | 'usm_rad_outsw ', & |
---|
3157 | 'usm_rad_outlw ', & |
---|
3158 | 'usm_rad_hf ', & |
---|
3159 | 'usm_rad_ressw ', & |
---|
3160 | 'usm_rad_reslw ', & |
---|
3161 | 'usm_wghf ', & |
---|
3162 | 'usm_wghf_window ', & |
---|
3163 | 'usm_wghf_green ', & |
---|
3164 | 'usm_iwghf ', & |
---|
3165 | 'usm_iwghf_window ', & |
---|
3166 | 'usm_surfz ', & |
---|
3167 | 'usm_surfwintrans ', & |
---|
3168 | 'usm_surfcat ', & |
---|
3169 | 'usm_surfalb ', & |
---|
3170 | 'usm_surfemis ', & |
---|
3171 | 'usm_t_surf_wall ', & |
---|
3172 | 'usm_t_surf_window ', & |
---|
3173 | 'usm_t_surf_green ', & |
---|
3174 | 'usm_t_green ', & |
---|
3175 | 'usm_t_surf_10cm ', & |
---|
3176 | 'usm_skyvf ', & |
---|
3177 | 'usm_skyvft '/) |
---|
3178 | |
---|
3179 | INTEGER(iwp), PARAMETER :: nl2 = 7 !< number of other variables |
---|
3180 | CHARACTER(LEN=varnamelength), DIMENSION(nl2) :: varlist2 = & !< list of other usm variables |
---|
3181 | (/'usm_svf ', & |
---|
3182 | 'usm_dif ', & |
---|
3183 | 'usm_rad_pc_inlw ', & |
---|
3184 | 'usm_rad_pc_insw ', & |
---|
3185 | 'usm_rad_pc_inswdir ', & |
---|
3186 | 'usm_rad_pc_inswdif ', & |
---|
3187 | 'usm_rad_pc_inswref '/) |
---|
3188 | |
---|
3189 | INTEGER(iwp), PARAMETER :: nl3 = 3 !< number of directional layer usm variables |
---|
3190 | CHARACTER(LEN=varnamelength), DIMENSION(nl3) :: varlist3 = & !< list of directional layer usm variables |
---|
3191 | (/'usm_t_wall ', & |
---|
3192 | 'usm_t_window ', & |
---|
3193 | 'usm_t_green '/) |
---|
3194 | |
---|
3195 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
3196 | CHARACTER(LEN=6), DIMENSION(nd), PARAMETER :: dirname = & !< direction names |
---|
3197 | (/'_roof ','_south','_north','_west ','_east '/) |
---|
3198 | LOGICAL :: lfound !< flag if the variable is found |
---|
3199 | |
---|
3200 | |
---|
3201 | lfound = .FALSE. |
---|
3202 | |
---|
3203 | var = TRIM(variable) |
---|
3204 | |
---|
3205 | !-- check if variable exists |
---|
3206 | ! directional variables |
---|
3207 | DO i = 1, nl1 |
---|
3208 | DO j = 1, nd |
---|
3209 | IF ( TRIM(var) == TRIM(varlist1(i))//TRIM(dirname(j)) ) THEN |
---|
3210 | lfound = .TRUE. |
---|
3211 | EXIT |
---|
3212 | ENDIF |
---|
3213 | IF ( lfound ) EXIT |
---|
3214 | ENDDO |
---|
3215 | ENDDO |
---|
3216 | IF ( lfound ) GOTO 10 |
---|
3217 | ! directional layer variables |
---|
3218 | DO i = 1, nl3 |
---|
3219 | DO j = 1, nd |
---|
3220 | DO l = nzb_wall, nzt_wall |
---|
3221 | WRITE(ls,'(A1,I1)') '_',l |
---|
3222 | IF ( TRIM(var) == TRIM(varlist3(i))//TRIM(ls)//TRIM(dirname(j)) ) THEN |
---|
3223 | lfound = .TRUE. |
---|
3224 | EXIT |
---|
3225 | ENDIF |
---|
3226 | ENDDO |
---|
3227 | IF ( lfound ) EXIT |
---|
3228 | ENDDO |
---|
3229 | ENDDO |
---|
3230 | IF ( lfound ) GOTO 10 |
---|
3231 | ! other variables |
---|
3232 | DO i = 1, nl2 |
---|
3233 | IF ( TRIM(var) == TRIM(varlist2(i)) ) THEN |
---|
3234 | lfound = .TRUE. |
---|
3235 | EXIT |
---|
3236 | ENDIF |
---|
3237 | ENDDO |
---|
3238 | IF ( .NOT. lfound ) THEN |
---|
3239 | unit = 'illegal' |
---|
3240 | RETURN |
---|
3241 | ENDIF |
---|
3242 | 10 CONTINUE |
---|
3243 | |
---|
3244 | IF ( var(1:12) == 'usm_rad_net_' .OR. var(1:13) == 'usm_rad_insw_' .OR. & |
---|
3245 | var(1:13) == 'usm_rad_inlw_' .OR. var(1:16) == 'usm_rad_inswdir_' .OR. & |
---|
3246 | var(1:16) == 'usm_rad_inswdif_' .OR. var(1:16) == 'usm_rad_inswref_' .OR. & |
---|
3247 | var(1:16) == 'usm_rad_inlwdif_' .OR. var(1:16) == 'usm_rad_inlwref_' .OR. & |
---|
3248 | var(1:14) == 'usm_rad_outsw_' .OR. var(1:14) == 'usm_rad_outlw_' .OR. & |
---|
3249 | var(1:14) == 'usm_rad_ressw_' .OR. var(1:14) == 'usm_rad_reslw_' .OR. & |
---|
3250 | var(1:11) == 'usm_rad_hf_' .OR. & |
---|
3251 | var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
3252 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
3253 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
3254 | var(1:17) == 'usm_surfwintrans_' .OR. & |
---|
3255 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
3256 | var(1:13) == 'usm_qsws_liq_' ) THEN |
---|
3257 | unit = 'W/m2' |
---|
3258 | ELSE IF ( var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
3259 | var(1:12) == 'usm_t_window' .OR. var(1:17) == 'usm_t_surf_window' .OR. & |
---|
3260 | var(1:16) == 'usm_t_surf_green' .OR. & |
---|
3261 | var(1:11) == 'usm_t_green' .OR. var(1:7) == 'usm_swc' .OR. & |
---|
3262 | var(1:15) == 'usm_t_surf_10cm' ) THEN |
---|
3263 | unit = 'K' |
---|
3264 | ELSE IF ( var == 'usm_rad_pc_inlw' .OR. var == 'usm_rad_pc_insw' .OR. & |
---|
3265 | var == 'usm_rad_pc_inswdir' .OR. var == 'usm_rad_pc_inswdif' .OR. & |
---|
3266 | var == 'usm_rad_pc_inswref' ) THEN |
---|
3267 | unit = 'W' |
---|
3268 | ELSE IF ( var(1:9) == 'usm_surfz' .OR. var(1:7) == 'usm_svf' .OR. & |
---|
3269 | var(1:7) == 'usm_dif' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
3270 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
3271 | var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' ) THEN |
---|
3272 | unit = '1' |
---|
3273 | ELSE |
---|
3274 | unit = 'illegal' |
---|
3275 | ENDIF |
---|
3276 | |
---|
3277 | END SUBROUTINE usm_check_data_output |
---|
3278 | |
---|
3279 | |
---|
3280 | !------------------------------------------------------------------------------! |
---|
3281 | ! Description: |
---|
3282 | ! ------------ |
---|
3283 | !> Check parameters routine for urban surface model |
---|
3284 | !------------------------------------------------------------------------------! |
---|
3285 | SUBROUTINE usm_check_parameters |
---|
3286 | |
---|
3287 | USE control_parameters, & |
---|
3288 | ONLY: bc_pt_b, bc_q_b, constant_flux_layer, large_scale_forcing, & |
---|
3289 | lsf_surf, topography |
---|
3290 | |
---|
3291 | ! |
---|
3292 | !-- Dirichlet boundary conditions are required as the surface fluxes are |
---|
3293 | !-- calculated from the temperature/humidity gradients in the urban surface |
---|
3294 | !-- model |
---|
3295 | IF ( bc_pt_b == 'neumann' .OR. bc_q_b == 'neumann' ) THEN |
---|
3296 | message_string = 'urban surface model requires setting of '// & |
---|
3297 | 'bc_pt_b = "dirichlet" and '// & |
---|
3298 | 'bc_q_b = "dirichlet"' |
---|
3299 | CALL message( 'usm_check_parameters', 'PA0590', 1, 2, 0, 6, 0 ) |
---|
3300 | ENDIF |
---|
3301 | |
---|
3302 | IF ( .NOT. constant_flux_layer ) THEN |
---|
3303 | message_string = 'urban surface model requires '// & |
---|
3304 | 'constant_flux_layer = .T.' |
---|
3305 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
3306 | ENDIF |
---|
3307 | |
---|
3308 | IF ( .NOT. radiation ) THEN |
---|
3309 | message_string = 'urban surface model requires '// & |
---|
3310 | 'the radiation model to be switched on' |
---|
3311 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
3312 | ENDIF |
---|
3313 | ! |
---|
3314 | !-- Surface forcing has to be disabled for LSF in case of enabled |
---|
3315 | !-- urban surface module |
---|
3316 | IF ( large_scale_forcing ) THEN |
---|
3317 | lsf_surf = .FALSE. |
---|
3318 | ENDIF |
---|
3319 | ! |
---|
3320 | !-- Topography |
---|
3321 | IF ( topography == 'flat' ) THEN |
---|
3322 | message_string = 'topography /= "flat" is required '// & |
---|
3323 | 'when using the urban surface model' |
---|
3324 | CALL message( 'check_parameters', 'PA0592', 1, 2, 0, 6, 0 ) |
---|
3325 | ENDIF |
---|
3326 | ! |
---|
3327 | !-- naheatlayers |
---|
3328 | IF ( naheatlayers > nzt ) THEN |
---|
3329 | message_string = 'number of anthropogenic heat layers '// & |
---|
3330 | '"naheatlayers" can not be larger than'// & |
---|
3331 | ' number of domain layers "nzt"' |
---|
3332 | CALL message( 'check_parameters', 'PA0593', 1, 2, 0, 6, 0 ) |
---|
3333 | ENDIF |
---|
3334 | |
---|
3335 | END SUBROUTINE usm_check_parameters |
---|
3336 | |
---|
3337 | |
---|
3338 | !------------------------------------------------------------------------------! |
---|
3339 | ! |
---|
3340 | ! Description: |
---|
3341 | ! ------------ |
---|
3342 | !> Output of the 3D-arrays in netCDF and/or AVS format |
---|
3343 | !> for variables of urban_surface model. |
---|
3344 | !> It resorts the urban surface module output quantities from surf style |
---|
3345 | !> indexing into temporary 3D array with indices (i,j,k). |
---|
3346 | !> It is called from subroutine data_output_3d. |
---|
3347 | !------------------------------------------------------------------------------! |
---|
3348 | SUBROUTINE usm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
3349 | |
---|
3350 | IMPLICIT NONE |
---|
3351 | |
---|
3352 | INTEGER(iwp), INTENT(IN) :: av !< |
---|
3353 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
3354 | INTEGER(iwp), INTENT(IN) :: nzb_do !< lower limit of the data output (usually 0) |
---|
3355 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) |
---|
3356 | LOGICAL, INTENT(OUT) :: found !< |
---|
3357 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< sp - it has to correspond to module data_output_3d |
---|
3358 | REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: temp_pf !< temp array for urban surface output procedure |
---|
3359 | |
---|
3360 | CHARACTER (len=varnamelength) :: var, surfid |
---|
3361 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
3362 | CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
3363 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
3364 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: diridx = (/ -1, 1, 0, 3, 2 /) |
---|
3365 | !< index for surf_*_v: 0:3 = (North, South, East, West) |
---|
3366 | INTEGER(iwp), DIMENSION(0:nd-1) :: dirstart |
---|
3367 | INTEGER(iwp), DIMENSION(0:nd-1) :: dirend |
---|
3368 | INTEGER(iwp) :: ids,idsint,idsidx,isurf,isvf,isurfs,isurflt,ipcgb |
---|
3369 | INTEGER(iwp) :: is,js,ks,i,j,k,iwl,istat, l, m |
---|
3370 | |
---|
3371 | dirstart = (/ startland, startwall, startwall, startwall, startwall /) |
---|
3372 | dirend = (/ endland, endwall, endwall, endwall, endwall /) |
---|
3373 | |
---|
3374 | found = .TRUE. |
---|
3375 | temp_pf = -1._wp |
---|
3376 | |
---|
3377 | ids = -1 |
---|
3378 | var = TRIM(variable) |
---|
3379 | DO i = 0, nd-1 |
---|
3380 | k = len(TRIM(var)) |
---|
3381 | j = len(TRIM(dirname(i))) |
---|
3382 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
3383 | ids = i |
---|
3384 | idsint = dirint(ids) |
---|
3385 | idsidx = diridx(ids) |
---|
3386 | var = var(:k-j) |
---|
3387 | EXIT |
---|
3388 | ENDIF |
---|
3389 | ENDDO |
---|
3390 | IF ( ids == -1 ) THEN |
---|
3391 | var = TRIM(variable) |
---|
3392 | ENDIF |
---|
3393 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
3394 | !-- wall layers |
---|
3395 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
3396 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
3397 | var = var(1:10) |
---|
3398 | ENDIF |
---|
3399 | ENDIF |
---|
3400 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
3401 | !-- window layers |
---|
3402 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
3403 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
3404 | var = var(1:12) |
---|
3405 | ENDIF |
---|
3406 | ENDIF |
---|
3407 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
3408 | !-- green layers |
---|
3409 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
3410 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
3411 | var = var(1:11) |
---|
3412 | ENDIF |
---|
3413 | ENDIF |
---|
3414 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
3415 | !-- green layers soil water content |
---|
3416 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
3417 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
3418 | var = var(1:7) |
---|
3419 | ENDIF |
---|
3420 | ENDIF |
---|
3421 | IF ( (var(1:8) == 'usm_svf_' .OR. var(1:8) == 'usm_dif_') .AND. len(TRIM(var)) >= 13 ) THEN |
---|
3422 | !-- svf values to particular surface |
---|
3423 | surfid = var(9:) |
---|
3424 | i = index(surfid,'_') |
---|
3425 | j = index(surfid(i+1:),'_') |
---|
3426 | READ(surfid(1:i-1),*, iostat=istat ) is |
---|
3427 | IF ( istat == 0 ) THEN |
---|
3428 | READ(surfid(i+1:i+j-1),*, iostat=istat ) js |
---|
3429 | ENDIF |
---|
3430 | IF ( istat == 0 ) THEN |
---|
3431 | READ(surfid(i+j+1:),*, iostat=istat ) ks |
---|
3432 | ENDIF |
---|
3433 | IF ( istat == 0 ) THEN |
---|
3434 | var = var(1:7) |
---|
3435 | ENDIF |
---|
3436 | ENDIF |
---|
3437 | |
---|
3438 | SELECT CASE ( TRIM(var) ) |
---|
3439 | |
---|
3440 | CASE ( 'usm_surfz' ) |
---|
3441 | !-- array of surface height (z) |
---|
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(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) ) |
---|
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(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) + 1.0_wp ) |
---|
3456 | ENDDO |
---|
3457 | ENDIF |
---|
3458 | |
---|
3459 | CASE ( 'usm_surfcat' ) |
---|
3460 | !-- surface category |
---|
3461 | IF ( idsint == iup_u ) THEN |
---|
3462 | DO m = 1, surf_usm_h%ns |
---|
3463 | i = surf_usm_h%i(m) |
---|
3464 | j = surf_usm_h%j(m) |
---|
3465 | k = surf_usm_h%k(m) |
---|
3466 | temp_pf(k,j,i) = surf_usm_h%surface_types(m) |
---|
3467 | ENDDO |
---|
3468 | ELSE |
---|
3469 | l = idsidx |
---|
3470 | DO m = 1, surf_usm_v(l)%ns |
---|
3471 | i = surf_usm_v(l)%i(m) |
---|
3472 | j = surf_usm_v(l)%j(m) |
---|
3473 | k = surf_usm_v(l)%k(m) |
---|
3474 | temp_pf(k,j,i) = surf_usm_v(l)%surface_types(m) |
---|
3475 | ENDDO |
---|
3476 | ENDIF |
---|
3477 | |
---|
3478 | CASE ( 'usm_surfalb' ) |
---|
3479 | !-- surface albedo, weighted average |
---|
3480 | IF ( idsint == iup_u ) THEN |
---|
3481 | DO m = 1, surf_usm_h%ns |
---|
3482 | i = surf_usm_h%i(m) |
---|
3483 | j = surf_usm_h%j(m) |
---|
3484 | k = surf_usm_h%k(m) |
---|
3485 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
3486 | surf_usm_h%albedo(ind_veg_wall,m) + & |
---|
3487 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
3488 | surf_usm_h%albedo(ind_pav_green,m) + & |
---|
3489 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
3490 | surf_usm_h%albedo(ind_wat_win,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)%frac(ind_veg_wall,m) * & |
---|
3499 | surf_usm_v(l)%albedo(ind_veg_wall,m) + & |
---|
3500 | surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
3501 | surf_usm_v(l)%albedo(ind_pav_green,m) + & |
---|
3502 | surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
3503 | surf_usm_v(l)%albedo(ind_wat_win,m) |
---|
3504 | ENDDO |
---|
3505 | ENDIF |
---|
3506 | |
---|
3507 | CASE ( 'usm_surfemis' ) |
---|
3508 | !-- surface emissivity, weighted average |
---|
3509 | IF ( idsint == iup_u ) THEN |
---|
3510 | DO m = 1, surf_usm_h%ns |
---|
3511 | i = surf_usm_h%i(m) |
---|
3512 | j = surf_usm_h%j(m) |
---|
3513 | k = surf_usm_h%k(m) |
---|
3514 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
3515 | surf_usm_h%emissivity(ind_veg_wall,m) + & |
---|
3516 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
3517 | surf_usm_h%emissivity(ind_pav_green,m) + & |
---|
3518 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
3519 | surf_usm_h%emissivity(ind_wat_win,m) |
---|
3520 | ENDDO |
---|
3521 | ELSE |
---|
3522 | l = idsidx |
---|
3523 | DO m = 1, surf_usm_v(l)%ns |
---|
3524 | i = surf_usm_v(l)%i(m) |
---|
3525 | j = surf_usm_v(l)%j(m) |
---|
3526 | k = surf_usm_v(l)%k(m) |
---|
3527 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) *& |
---|
3528 | surf_usm_v(l)%emissivity(ind_veg_wall,m) +& |
---|
3529 | surf_usm_v(l)%frac(ind_pav_green,m) *& |
---|
3530 | surf_usm_v(l)%emissivity(ind_pav_green,m)+& |
---|
3531 | surf_usm_v(l)%frac(ind_wat_win,m) *& |
---|
3532 | surf_usm_v(l)%emissivity(ind_wat_win,m) |
---|
3533 | ENDDO |
---|
3534 | ENDIF |
---|
3535 | |
---|
3536 | CASE ( 'usm_surfwintrans' ) |
---|
3537 | !-- transmissivity window tiles |
---|
3538 | IF ( idsint == iup_u ) THEN |
---|
3539 | DO m = 1, surf_usm_h%ns |
---|
3540 | i = surf_usm_h%i(m) |
---|
3541 | j = surf_usm_h%j(m) |
---|
3542 | k = surf_usm_h%k(m) |
---|
3543 | temp_pf(k,j,i) = surf_usm_h%transmissivity(m) |
---|
3544 | ENDDO |
---|
3545 | ELSE |
---|
3546 | l = idsidx |
---|
3547 | DO m = 1, surf_usm_v(l)%ns |
---|
3548 | i = surf_usm_v(l)%i(m) |
---|
3549 | j = surf_usm_v(l)%j(m) |
---|
3550 | k = surf_usm_v(l)%k(m) |
---|
3551 | temp_pf(k,j,i) = surf_usm_v(l)%transmissivity(m) |
---|
3552 | ENDDO |
---|
3553 | ENDIF |
---|
3554 | |
---|
3555 | CASE ( 'usm_skyvf' ) |
---|
3556 | !-- sky view factor |
---|
3557 | DO isurf = dirstart(ids), dirend(ids) |
---|
3558 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3559 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvf(isurf) |
---|
3560 | ENDIF |
---|
3561 | ENDDO |
---|
3562 | |
---|
3563 | CASE ( 'usm_skyvft' ) |
---|
3564 | !-- sky view factor |
---|
3565 | DO isurf = dirstart(ids), dirend(ids) |
---|
3566 | IF ( surfl(id,isurf) == ids ) THEN |
---|
3567 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvft(isurf) |
---|
3568 | ENDIF |
---|
3569 | ENDDO |
---|
3570 | |
---|
3571 | ! |
---|
3572 | !-- Not adjusted so far |
---|
3573 | CASE ( 'usm_svf', 'usm_dif' ) |
---|
3574 | !-- shape view factors or iradiance factors to selected surface |
---|
3575 | IF ( TRIM(var)=='usm_svf' ) THEN |
---|
3576 | k = 1 |
---|
3577 | ELSE |
---|
3578 | k = 2 |
---|
3579 | ENDIF |
---|
3580 | DO isvf = 1, nsvfl |
---|
3581 | isurflt = svfsurf(1, isvf) |
---|
3582 | isurfs = svfsurf(2, isvf) |
---|
3583 | |
---|
3584 | IF ( surf(ix,isurfs) == is .AND. surf(iy,isurfs) == js .AND. & |
---|
3585 | surf(iz,isurfs) == ks .AND. surf(id,isurfs) == idsint ) THEN |
---|
3586 | !-- correct source surface |
---|
3587 | temp_pf(surfl(iz,isurflt),surfl(iy,isurflt),surfl(ix,isurflt)) = svf(k,isvf) |
---|
3588 | ENDIF |
---|
3589 | ENDDO |
---|
3590 | |
---|
3591 | CASE ( 'usm_rad_net' ) |
---|
3592 | !-- array of complete radiation balance |
---|
3593 | IF ( av == 0 ) THEN |
---|
3594 | IF ( idsint == iup_u ) THEN |
---|
3595 | DO m = 1, surf_usm_h%ns |
---|
3596 | i = surf_usm_h%i(m) |
---|
3597 | j = surf_usm_h%j(m) |
---|
3598 | k = surf_usm_h%k(m) |
---|
3599 | temp_pf(k,j,i) = surf_usm_h%rad_net_l(m) |
---|
3600 | ENDDO |
---|
3601 | ELSE |
---|
3602 | l = idsidx |
---|
3603 | DO m = 1, surf_usm_v(l)%ns |
---|
3604 | i = surf_usm_v(l)%i(m) |
---|
3605 | j = surf_usm_v(l)%j(m) |
---|
3606 | k = surf_usm_v(l)%k(m) |
---|
3607 | temp_pf(k,j,i) = surf_usm_v(l)%rad_net_l(m) |
---|
3608 | ENDDO |
---|
3609 | ENDIF |
---|
3610 | ELSE |
---|
3611 | IF ( idsint == iup_u ) THEN |
---|
3612 | DO m = 1, surf_usm_h%ns |
---|
3613 | i = surf_usm_h%i(m) |
---|
3614 | j = surf_usm_h%j(m) |
---|
3615 | k = surf_usm_h%k(m) |
---|
3616 | temp_pf(k,j,i) = surf_usm_h%rad_net_av(m) |
---|
3617 | ENDDO |
---|
3618 | ELSE |
---|
3619 | l = idsidx |
---|
3620 | DO m = 1, surf_usm_v(l)%ns |
---|
3621 | i = surf_usm_v(l)%i(m) |
---|
3622 | j = surf_usm_v(l)%j(m) |
---|
3623 | k = surf_usm_v(l)%k(m) |
---|
3624 | temp_pf(k,j,i) = surf_usm_v(l)%rad_net_av(m) |
---|
3625 | ENDDO |
---|
3626 | ENDIF |
---|
3627 | ENDIF |
---|
3628 | |
---|
3629 | CASE ( 'usm_rad_insw' ) |
---|
3630 | !-- array of sw radiation falling to surface after i-th reflection |
---|
3631 | DO isurf = dirstart(ids), dirend(ids) |
---|
3632 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3633 | IF ( av == 0 ) THEN |
---|
3634 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw(isurf) |
---|
3635 | ELSE |
---|
3636 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw_av(isurf) |
---|
3637 | ENDIF |
---|
3638 | ENDIF |
---|
3639 | ENDDO |
---|
3640 | |
---|
3641 | CASE ( 'usm_rad_inlw' ) |
---|
3642 | !-- array of lw radiation falling to surface after i-th reflection |
---|
3643 | DO isurf = dirstart(ids), dirend(ids) |
---|
3644 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3645 | IF ( av == 0 ) THEN |
---|
3646 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf) |
---|
3647 | ELSE |
---|
3648 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw_av(isurf) |
---|
3649 | ENDIF |
---|
3650 | ENDIF |
---|
3651 | ENDDO |
---|
3652 | |
---|
3653 | CASE ( 'usm_rad_inswdir' ) |
---|
3654 | !-- array of direct sw radiation falling to surface from sun |
---|
3655 | DO isurf = dirstart(ids), dirend(ids) |
---|
3656 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3657 | IF ( av == 0 ) THEN |
---|
3658 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir(isurf) |
---|
3659 | ELSE |
---|
3660 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir_av(isurf) |
---|
3661 | ENDIF |
---|
3662 | ENDIF |
---|
3663 | ENDDO |
---|
3664 | |
---|
3665 | CASE ( 'usm_rad_inswdif' ) |
---|
3666 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
3667 | DO isurf = dirstart(ids), dirend(ids) |
---|
3668 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3669 | IF ( av == 0 ) THEN |
---|
3670 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif(isurf) |
---|
3671 | ELSE |
---|
3672 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif_av(isurf) |
---|
3673 | ENDIF |
---|
3674 | ENDIF |
---|
3675 | ENDDO |
---|
3676 | |
---|
3677 | CASE ( 'usm_rad_inswref' ) |
---|
3678 | !-- array of sw radiation falling to surface from reflections |
---|
3679 | DO isurf = dirstart(ids), dirend(ids) |
---|
3680 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3681 | IF ( av == 0 ) THEN |
---|
3682 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = & |
---|
3683 | surfinsw(isurf) - surfinswdir(isurf) - surfinswdif(isurf) |
---|
3684 | ELSE |
---|
3685 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswref_av(isurf) |
---|
3686 | ENDIF |
---|
3687 | ENDIF |
---|
3688 | ENDDO |
---|
3689 | |
---|
3690 | CASE ( 'usm_rad_inlwdif' ) |
---|
3691 | !-- array of difusion lw radiation falling to surface from sky and borders of the domain |
---|
3692 | DO isurf = dirstart(ids), dirend(ids) |
---|
3693 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3694 | IF ( av == 0 ) THEN |
---|
3695 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif(isurf) |
---|
3696 | ELSE |
---|
3697 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif_av(isurf) |
---|
3698 | ENDIF |
---|
3699 | ENDIF |
---|
3700 | ENDDO |
---|
3701 | |
---|
3702 | CASE ( 'usm_rad_inlwref' ) |
---|
3703 | !-- array of lw radiation falling to surface from reflections |
---|
3704 | DO isurf = dirstart(ids), dirend(ids) |
---|
3705 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3706 | IF ( av == 0 ) THEN |
---|
3707 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf) - surfinlwdif(isurf) |
---|
3708 | ELSE |
---|
3709 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwref_av(isurf) |
---|
3710 | ENDIF |
---|
3711 | ENDIF |
---|
3712 | ENDDO |
---|
3713 | |
---|
3714 | CASE ( 'usm_rad_outsw' ) |
---|
3715 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
3716 | DO isurf = dirstart(ids), dirend(ids) |
---|
3717 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3718 | IF ( av == 0 ) THEN |
---|
3719 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw(isurf) |
---|
3720 | ELSE |
---|
3721 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw_av(isurf) |
---|
3722 | ENDIF |
---|
3723 | ENDIF |
---|
3724 | ENDDO |
---|
3725 | |
---|
3726 | CASE ( 'usm_rad_outlw' ) |
---|
3727 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
3728 | DO isurf = dirstart(ids), dirend(ids) |
---|
3729 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3730 | IF ( av == 0 ) THEN |
---|
3731 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw(isurf) |
---|
3732 | ELSE |
---|
3733 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw_av(isurf) |
---|
3734 | ENDIF |
---|
3735 | ENDIF |
---|
3736 | ENDDO |
---|
3737 | |
---|
3738 | CASE ( 'usm_rad_ressw' ) |
---|
3739 | !-- average of array of residua of sw radiation absorbed in surface after last reflection |
---|
3740 | DO isurf = dirstart(ids), dirend(ids) |
---|
3741 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3742 | IF ( av == 0 ) THEN |
---|
3743 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins(isurf) |
---|
3744 | ELSE |
---|
3745 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins_av(isurf) |
---|
3746 | ENDIF |
---|
3747 | ENDIF |
---|
3748 | ENDDO |
---|
3749 | |
---|
3750 | CASE ( 'usm_rad_reslw' ) |
---|
3751 | !-- average of array of residua of lw radiation absorbed in surface after last reflection |
---|
3752 | DO isurf = dirstart(ids), dirend(ids) |
---|
3753 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3754 | IF ( av == 0 ) THEN |
---|
3755 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl(isurf) |
---|
3756 | ELSE |
---|
3757 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl_av(isurf) |
---|
3758 | ENDIF |
---|
3759 | ENDIF |
---|
3760 | ENDDO |
---|
3761 | |
---|
3762 | CASE ( 'usm_rad_pc_inlw' ) |
---|
3763 | !-- array of lw radiation absorbed by plant canopy |
---|
3764 | DO ipcgb = 1, npcbl |
---|
3765 | IF ( av == 0 ) THEN |
---|
3766 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinlw(ipcgb) |
---|
3767 | ELSE |
---|
3768 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinlw_av(ipcgb) |
---|
3769 | ENDIF |
---|
3770 | ENDDO |
---|
3771 | |
---|
3772 | CASE ( 'usm_rad_pc_insw' ) |
---|
3773 | !-- array of sw radiation absorbed by plant canopy |
---|
3774 | DO ipcgb = 1, npcbl |
---|
3775 | IF ( av == 0 ) THEN |
---|
3776 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw(ipcgb) |
---|
3777 | ELSE |
---|
3778 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw_av(ipcgb) |
---|
3779 | ENDIF |
---|
3780 | ENDDO |
---|
3781 | |
---|
3782 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
3783 | !-- array of direct sw radiation absorbed by plant canopy |
---|
3784 | DO ipcgb = 1, npcbl |
---|
3785 | IF ( av == 0 ) THEN |
---|
3786 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdir(ipcgb) |
---|
3787 | ELSE |
---|
3788 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdir_av(ipcgb) |
---|
3789 | ENDIF |
---|
3790 | ENDDO |
---|
3791 | |
---|
3792 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
3793 | !-- array of diffuse sw radiation absorbed by plant canopy |
---|
3794 | DO ipcgb = 1, npcbl |
---|
3795 | IF ( av == 0 ) THEN |
---|
3796 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdif(ipcgb) |
---|
3797 | ELSE |
---|
3798 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdif_av(ipcgb) |
---|
3799 | ENDIF |
---|
3800 | ENDDO |
---|
3801 | |
---|
3802 | CASE ( 'usm_rad_pc_inswref' ) |
---|
3803 | !-- array of reflected sw radiation absorbed by plant canopy |
---|
3804 | DO ipcgb = 1, npcbl |
---|
3805 | IF ( av == 0 ) THEN |
---|
3806 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw(ipcgb) & |
---|
3807 | - pcbinswdir(ipcgb) & |
---|
3808 | - pcbinswdif(ipcgb) |
---|
3809 | ELSE |
---|
3810 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswref_av(ipcgb) |
---|
3811 | ENDIF |
---|
3812 | ENDDO |
---|
3813 | |
---|
3814 | CASE ( 'usm_rad_hf' ) |
---|
3815 | !-- array of heat flux from radiation for surfaces after all reflections |
---|
3816 | IF ( av == 0 ) THEN |
---|
3817 | IF ( idsint == iup_u ) THEN |
---|
3818 | DO m = 1, surf_usm_h%ns |
---|
3819 | i = surf_usm_h%i(m) |
---|
3820 | j = surf_usm_h%j(m) |
---|
3821 | k = surf_usm_h%k(m) |
---|
3822 | temp_pf(k,j,i) = surf_usm_h%surfhf(m) |
---|
3823 | ENDDO |
---|
3824 | ELSE |
---|
3825 | l = idsidx |
---|
3826 | DO m = 1, surf_usm_v(l)%ns |
---|
3827 | i = surf_usm_v(l)%i(m) |
---|
3828 | j = surf_usm_v(l)%j(m) |
---|
3829 | k = surf_usm_v(l)%k(m) |
---|
3830 | temp_pf(k,j,i) = surf_usm_v(l)%surfhf(m) |
---|
3831 | ENDDO |
---|
3832 | ENDIF |
---|
3833 | ELSE |
---|
3834 | IF ( idsint == iup_u ) THEN |
---|
3835 | DO m = 1, surf_usm_h%ns |
---|
3836 | i = surf_usm_h%i(m) |
---|
3837 | j = surf_usm_h%j(m) |
---|
3838 | k = surf_usm_h%k(m) |
---|
3839 | temp_pf(k,j,i) = surf_usm_h%surfhf_av(m) |
---|
3840 | ENDDO |
---|
3841 | ELSE |
---|
3842 | l = idsidx |
---|
3843 | DO m = 1, surf_usm_v(l)%ns |
---|
3844 | i = surf_usm_v(l)%i(m) |
---|
3845 | j = surf_usm_v(l)%j(m) |
---|
3846 | k = surf_usm_v(l)%k(m) |
---|
3847 | temp_pf(k,j,i) = surf_usm_v(l)%surfhf_av(m) |
---|
3848 | ENDDO |
---|
3849 | ENDIF |
---|
3850 | ENDIF |
---|
3851 | |
---|
3852 | CASE ( 'usm_wshf' ) |
---|
3853 | !-- array of sensible heat flux from surfaces |
---|
3854 | IF ( av == 0 ) THEN |
---|
3855 | IF ( idsint == iup_u ) THEN |
---|
3856 | DO m = 1, surf_usm_h%ns |
---|
3857 | i = surf_usm_h%i(m) |
---|
3858 | j = surf_usm_h%j(m) |
---|
3859 | k = surf_usm_h%k(m) |
---|
3860 | temp_pf(k,j,i) = surf_usm_h%wshf_eb(m) |
---|
3861 | ENDDO |
---|
3862 | ELSE |
---|
3863 | l = idsidx |
---|
3864 | DO m = 1, surf_usm_v(l)%ns |
---|
3865 | i = surf_usm_v(l)%i(m) |
---|
3866 | j = surf_usm_v(l)%j(m) |
---|
3867 | k = surf_usm_v(l)%k(m) |
---|
3868 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb(m) |
---|
3869 | ENDDO |
---|
3870 | ENDIF |
---|
3871 | ELSE |
---|
3872 | IF ( idsint == iup_u ) THEN |
---|
3873 | DO m = 1, surf_usm_h%ns |
---|
3874 | i = surf_usm_h%i(m) |
---|
3875 | j = surf_usm_h%j(m) |
---|
3876 | k = surf_usm_h%k(m) |
---|
3877 | temp_pf(k,j,i) = surf_usm_h%wshf_eb_av(m) |
---|
3878 | ENDDO |
---|
3879 | ELSE |
---|
3880 | l = idsidx |
---|
3881 | DO m = 1, surf_usm_v(l)%ns |
---|
3882 | i = surf_usm_v(l)%i(m) |
---|
3883 | j = surf_usm_v(l)%j(m) |
---|
3884 | k = surf_usm_v(l)%k(m) |
---|
3885 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb_av(m) |
---|
3886 | ENDDO |
---|
3887 | ENDIF |
---|
3888 | ENDIF |
---|
3889 | |
---|
3890 | |
---|
3891 | CASE ( 'usm_qsws' ) |
---|
3892 | !-- array of latent heat flux from surfaces |
---|
3893 | IF ( av == 0 ) THEN |
---|
3894 | IF ( idsint == iup_u ) THEN |
---|
3895 | DO m = 1, surf_usm_h%ns |
---|
3896 | i = surf_usm_h%i(m) |
---|
3897 | j = surf_usm_h%j(m) |
---|
3898 | k = surf_usm_h%k(m) |
---|
3899 | temp_pf(k,j,i) = surf_usm_h%qsws_eb(m) |
---|
3900 | ENDDO |
---|
3901 | ELSE |
---|
3902 | l = idsidx |
---|
3903 | DO m = 1, surf_usm_v(l)%ns |
---|
3904 | i = surf_usm_v(l)%i(m) |
---|
3905 | j = surf_usm_v(l)%j(m) |
---|
3906 | k = surf_usm_v(l)%k(m) |
---|
3907 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb(m) |
---|
3908 | ENDDO |
---|
3909 | ENDIF |
---|
3910 | ELSE |
---|
3911 | IF ( idsint == iup_u ) THEN |
---|
3912 | DO m = 1, surf_usm_h%ns |
---|
3913 | i = surf_usm_h%i(m) |
---|
3914 | j = surf_usm_h%j(m) |
---|
3915 | k = surf_usm_h%k(m) |
---|
3916 | temp_pf(k,j,i) = surf_usm_h%qsws_eb_av(m) |
---|
3917 | ENDDO |
---|
3918 | ELSE |
---|
3919 | l = idsidx |
---|
3920 | DO m = 1, surf_usm_v(l)%ns |
---|
3921 | i = surf_usm_v(l)%i(m) |
---|
3922 | j = surf_usm_v(l)%j(m) |
---|
3923 | k = surf_usm_v(l)%k(m) |
---|
3924 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb_av(m) |
---|
3925 | ENDDO |
---|
3926 | ENDIF |
---|
3927 | ENDIF |
---|
3928 | |
---|
3929 | CASE ( 'usm_qsws_veg' ) |
---|
3930 | !-- array of latent heat flux from vegetation surfaces |
---|
3931 | IF ( av == 0 ) THEN |
---|
3932 | IF ( idsint == iup_u ) THEN |
---|
3933 | DO m = 1, surf_usm_h%ns |
---|
3934 | i = surf_usm_h%i(m) |
---|
3935 | j = surf_usm_h%j(m) |
---|
3936 | k = surf_usm_h%k(m) |
---|
3937 | temp_pf(k,j,i) = surf_usm_h%qsws_veg_eb(m) |
---|
3938 | ENDDO |
---|
3939 | ELSE |
---|
3940 | l = idsidx |
---|
3941 | DO m = 1, surf_usm_v(l)%ns |
---|
3942 | i = surf_usm_v(l)%i(m) |
---|
3943 | j = surf_usm_v(l)%j(m) |
---|
3944 | k = surf_usm_v(l)%k(m) |
---|
3945 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_eb(m) |
---|
3946 | ENDDO |
---|
3947 | ENDIF |
---|
3948 | ELSE |
---|
3949 | IF ( idsint == iup_u ) THEN |
---|
3950 | DO m = 1, surf_usm_h%ns |
---|
3951 | i = surf_usm_h%i(m) |
---|
3952 | j = surf_usm_h%j(m) |
---|
3953 | k = surf_usm_h%k(m) |
---|
3954 | temp_pf(k,j,i) = surf_usm_h%qsws_veg_eb_av(m) |
---|
3955 | ENDDO |
---|
3956 | ELSE |
---|
3957 | l = idsidx |
---|
3958 | DO m = 1, surf_usm_v(l)%ns |
---|
3959 | i = surf_usm_v(l)%i(m) |
---|
3960 | j = surf_usm_v(l)%j(m) |
---|
3961 | k = surf_usm_v(l)%k(m) |
---|
3962 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_eb_av(m) |
---|
3963 | ENDDO |
---|
3964 | ENDIF |
---|
3965 | ENDIF |
---|
3966 | |
---|
3967 | CASE ( 'usm_qsws_liq' ) |
---|
3968 | !-- array of latent heat flux from surfaces with liquid |
---|
3969 | IF ( av == 0 ) THEN |
---|
3970 | IF ( idsint == iup_u ) THEN |
---|
3971 | DO m = 1, surf_usm_h%ns |
---|
3972 | i = surf_usm_h%i(m) |
---|
3973 | j = surf_usm_h%j(m) |
---|
3974 | k = surf_usm_h%k(m) |
---|
3975 | temp_pf(k,j,i) = surf_usm_h%qsws_liq_eb(m) |
---|
3976 | ENDDO |
---|
3977 | ELSE |
---|
3978 | l = idsidx |
---|
3979 | DO m = 1, surf_usm_v(l)%ns |
---|
3980 | i = surf_usm_v(l)%i(m) |
---|
3981 | j = surf_usm_v(l)%j(m) |
---|
3982 | k = surf_usm_v(l)%k(m) |
---|
3983 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_eb(m) |
---|
3984 | ENDDO |
---|
3985 | ENDIF |
---|
3986 | ELSE |
---|
3987 | IF ( idsint == iup_u ) THEN |
---|
3988 | DO m = 1, surf_usm_h%ns |
---|
3989 | i = surf_usm_h%i(m) |
---|
3990 | j = surf_usm_h%j(m) |
---|
3991 | k = surf_usm_h%k(m) |
---|
3992 | temp_pf(k,j,i) = surf_usm_h%qsws_liq_eb_av(m) |
---|
3993 | ENDDO |
---|
3994 | ELSE |
---|
3995 | l = idsidx |
---|
3996 | DO m = 1, surf_usm_v(l)%ns |
---|
3997 | i = surf_usm_v(l)%i(m) |
---|
3998 | j = surf_usm_v(l)%j(m) |
---|
3999 | k = surf_usm_v(l)%k(m) |
---|
4000 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_eb_av(m) |
---|
4001 | ENDDO |
---|
4002 | ENDIF |
---|
4003 | ENDIF |
---|
4004 | |
---|
4005 | |
---|
4006 | |
---|
4007 | |
---|
4008 | CASE ( 'usm_wghf' ) |
---|
4009 | !-- array of heat flux from ground (land, wall, roof) |
---|
4010 | IF ( av == 0 ) THEN |
---|
4011 | IF ( idsint == iup_u ) THEN |
---|
4012 | DO m = 1, surf_usm_h%ns |
---|
4013 | i = surf_usm_h%i(m) |
---|
4014 | j = surf_usm_h%j(m) |
---|
4015 | k = surf_usm_h%k(m) |
---|
4016 | temp_pf(k,j,i) = surf_usm_h%wghf_eb(m) |
---|
4017 | ENDDO |
---|
4018 | ELSE |
---|
4019 | l = idsidx |
---|
4020 | DO m = 1, surf_usm_v(l)%ns |
---|
4021 | i = surf_usm_v(l)%i(m) |
---|
4022 | j = surf_usm_v(l)%j(m) |
---|
4023 | k = surf_usm_v(l)%k(m) |
---|
4024 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb(m) |
---|
4025 | ENDDO |
---|
4026 | ENDIF |
---|
4027 | ELSE |
---|
4028 | IF ( idsint == iup_u ) THEN |
---|
4029 | DO m = 1, surf_usm_h%ns |
---|
4030 | i = surf_usm_h%i(m) |
---|
4031 | j = surf_usm_h%j(m) |
---|
4032 | k = surf_usm_h%k(m) |
---|
4033 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_av(m) |
---|
4034 | ENDDO |
---|
4035 | ELSE |
---|
4036 | l = idsidx |
---|
4037 | DO m = 1, surf_usm_v(l)%ns |
---|
4038 | i = surf_usm_v(l)%i(m) |
---|
4039 | j = surf_usm_v(l)%j(m) |
---|
4040 | k = surf_usm_v(l)%k(m) |
---|
4041 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_av(m) |
---|
4042 | ENDDO |
---|
4043 | ENDIF |
---|
4044 | ENDIF |
---|
4045 | |
---|
4046 | CASE ( 'usm_wghf_window' ) |
---|
4047 | !-- array of heat flux from window ground (land, wall, roof) |
---|
4048 | |
---|
4049 | IF ( av == 0 ) THEN |
---|
4050 | IF ( idsint == iup_u ) THEN |
---|
4051 | DO m = 1, surf_usm_h%ns |
---|
4052 | i = surf_usm_h%i(m) |
---|
4053 | j = surf_usm_h%j(m) |
---|
4054 | k = surf_usm_h%k(m) |
---|
4055 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window(m) |
---|
4056 | ENDDO |
---|
4057 | ELSE |
---|
4058 | l = idsidx |
---|
4059 | DO m = 1, surf_usm_v(l)%ns |
---|
4060 | i = surf_usm_v(l)%i(m) |
---|
4061 | j = surf_usm_v(l)%j(m) |
---|
4062 | k = surf_usm_v(l)%k(m) |
---|
4063 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window(m) |
---|
4064 | ENDDO |
---|
4065 | ENDIF |
---|
4066 | ELSE |
---|
4067 | IF ( idsint == iup_u ) THEN |
---|
4068 | DO m = 1, surf_usm_h%ns |
---|
4069 | i = surf_usm_h%i(m) |
---|
4070 | j = surf_usm_h%j(m) |
---|
4071 | k = surf_usm_h%k(m) |
---|
4072 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window_av(m) |
---|
4073 | ENDDO |
---|
4074 | ELSE |
---|
4075 | l = idsidx |
---|
4076 | DO m = 1, surf_usm_v(l)%ns |
---|
4077 | i = surf_usm_v(l)%i(m) |
---|
4078 | j = surf_usm_v(l)%j(m) |
---|
4079 | k = surf_usm_v(l)%k(m) |
---|
4080 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window_av(m) |
---|
4081 | ENDDO |
---|
4082 | ENDIF |
---|
4083 | ENDIF |
---|
4084 | |
---|
4085 | CASE ( 'usm_wghf_green' ) |
---|
4086 | !-- array of heat flux from green ground (land, wall, roof) |
---|
4087 | |
---|
4088 | IF ( av == 0 ) THEN |
---|
4089 | IF ( idsint == iup_u ) THEN |
---|
4090 | DO m = 1, surf_usm_h%ns |
---|
4091 | i = surf_usm_h%i(m) |
---|
4092 | j = surf_usm_h%j(m) |
---|
4093 | k = surf_usm_h%k(m) |
---|
4094 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green(m) |
---|
4095 | ENDDO |
---|
4096 | ELSE |
---|
4097 | l = idsidx |
---|
4098 | DO m = 1, surf_usm_v(l)%ns |
---|
4099 | i = surf_usm_v(l)%i(m) |
---|
4100 | j = surf_usm_v(l)%j(m) |
---|
4101 | k = surf_usm_v(l)%k(m) |
---|
4102 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green(m) |
---|
4103 | ENDDO |
---|
4104 | ENDIF |
---|
4105 | ELSE |
---|
4106 | IF ( idsint == iup_u ) THEN |
---|
4107 | DO m = 1, surf_usm_h%ns |
---|
4108 | i = surf_usm_h%i(m) |
---|
4109 | j = surf_usm_h%j(m) |
---|
4110 | k = surf_usm_h%k(m) |
---|
4111 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green_av(m) |
---|
4112 | ENDDO |
---|
4113 | ELSE |
---|
4114 | l = idsidx |
---|
4115 | DO m = 1, surf_usm_v(l)%ns |
---|
4116 | i = surf_usm_v(l)%i(m) |
---|
4117 | j = surf_usm_v(l)%j(m) |
---|
4118 | k = surf_usm_v(l)%k(m) |
---|
4119 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green_av(m) |
---|
4120 | ENDDO |
---|
4121 | ENDIF |
---|
4122 | ENDIF |
---|
4123 | |
---|
4124 | CASE ( 'usm_iwghf' ) |
---|
4125 | !-- array of heat flux from indoor ground (land, wall, roof) |
---|
4126 | IF ( av == 0 ) THEN |
---|
4127 | IF ( idsint == iup_u ) THEN |
---|
4128 | DO m = 1, surf_usm_h%ns |
---|
4129 | i = surf_usm_h%i(m) |
---|
4130 | j = surf_usm_h%j(m) |
---|
4131 | k = surf_usm_h%k(m) |
---|
4132 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb(m) |
---|
4133 | ENDDO |
---|
4134 | ELSE |
---|
4135 | l = idsidx |
---|
4136 | DO m = 1, surf_usm_v(l)%ns |
---|
4137 | i = surf_usm_v(l)%i(m) |
---|
4138 | j = surf_usm_v(l)%j(m) |
---|
4139 | k = surf_usm_v(l)%k(m) |
---|
4140 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb(m) |
---|
4141 | ENDDO |
---|
4142 | ENDIF |
---|
4143 | ELSE |
---|
4144 | IF ( idsint == iup_u ) THEN |
---|
4145 | DO m = 1, surf_usm_h%ns |
---|
4146 | i = surf_usm_h%i(m) |
---|
4147 | j = surf_usm_h%j(m) |
---|
4148 | k = surf_usm_h%k(m) |
---|
4149 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_av(m) |
---|
4150 | ENDDO |
---|
4151 | ELSE |
---|
4152 | l = idsidx |
---|
4153 | DO m = 1, surf_usm_v(l)%ns |
---|
4154 | i = surf_usm_v(l)%i(m) |
---|
4155 | j = surf_usm_v(l)%j(m) |
---|
4156 | k = surf_usm_v(l)%k(m) |
---|
4157 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_av(m) |
---|
4158 | ENDDO |
---|
4159 | ENDIF |
---|
4160 | ENDIF |
---|
4161 | |
---|
4162 | CASE ( 'usm_iwghf_window' ) |
---|
4163 | !-- array of heat flux from indoor window ground (land, wall, roof) |
---|
4164 | |
---|
4165 | IF ( av == 0 ) THEN |
---|
4166 | IF ( idsint == iup_u ) THEN |
---|
4167 | DO m = 1, surf_usm_h%ns |
---|
4168 | i = surf_usm_h%i(m) |
---|
4169 | j = surf_usm_h%j(m) |
---|
4170 | k = surf_usm_h%k(m) |
---|
4171 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window(m) |
---|
4172 | ENDDO |
---|
4173 | ELSE |
---|
4174 | l = idsidx |
---|
4175 | DO m = 1, surf_usm_v(l)%ns |
---|
4176 | i = surf_usm_v(l)%i(m) |
---|
4177 | j = surf_usm_v(l)%j(m) |
---|
4178 | k = surf_usm_v(l)%k(m) |
---|
4179 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window(m) |
---|
4180 | ENDDO |
---|
4181 | ENDIF |
---|
4182 | ELSE |
---|
4183 | IF ( idsint == iup_u ) THEN |
---|
4184 | DO m = 1, surf_usm_h%ns |
---|
4185 | i = surf_usm_h%i(m) |
---|
4186 | j = surf_usm_h%j(m) |
---|
4187 | k = surf_usm_h%k(m) |
---|
4188 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window_av(m) |
---|
4189 | ENDDO |
---|
4190 | ELSE |
---|
4191 | l = idsidx |
---|
4192 | DO m = 1, surf_usm_v(l)%ns |
---|
4193 | i = surf_usm_v(l)%i(m) |
---|
4194 | j = surf_usm_v(l)%j(m) |
---|
4195 | k = surf_usm_v(l)%k(m) |
---|
4196 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window_av(m) |
---|
4197 | ENDDO |
---|
4198 | ENDIF |
---|
4199 | ENDIF |
---|
4200 | |
---|
4201 | CASE ( 'usm_t_surf_wall' ) |
---|
4202 | !-- surface temperature for surfaces |
---|
4203 | IF ( av == 0 ) THEN |
---|
4204 | IF ( idsint == iup_u ) THEN |
---|
4205 | DO m = 1, surf_usm_h%ns |
---|
4206 | i = surf_usm_h%i(m) |
---|
4207 | j = surf_usm_h%j(m) |
---|
4208 | k = surf_usm_h%k(m) |
---|
4209 | temp_pf(k,j,i) = t_surf_wall_h(m) |
---|
4210 | ENDDO |
---|
4211 | ELSE |
---|
4212 | l = idsidx |
---|
4213 | DO m = 1, surf_usm_v(l)%ns |
---|
4214 | i = surf_usm_v(l)%i(m) |
---|
4215 | j = surf_usm_v(l)%j(m) |
---|
4216 | k = surf_usm_v(l)%k(m) |
---|
4217 | temp_pf(k,j,i) = t_surf_wall_v(l)%t(m) |
---|
4218 | ENDDO |
---|
4219 | ENDIF |
---|
4220 | ELSE |
---|
4221 | IF ( idsint == iup_u ) THEN |
---|
4222 | DO m = 1, surf_usm_h%ns |
---|
4223 | i = surf_usm_h%i(m) |
---|
4224 | j = surf_usm_h%j(m) |
---|
4225 | k = surf_usm_h%k(m) |
---|
4226 | temp_pf(k,j,i) = surf_usm_h%t_surf_wall_av(m) |
---|
4227 | ENDDO |
---|
4228 | ELSE |
---|
4229 | l = idsidx |
---|
4230 | DO m = 1, surf_usm_v(l)%ns |
---|
4231 | i = surf_usm_v(l)%i(m) |
---|
4232 | j = surf_usm_v(l)%j(m) |
---|
4233 | k = surf_usm_v(l)%k(m) |
---|
4234 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_wall_av(m) |
---|
4235 | ENDDO |
---|
4236 | ENDIF |
---|
4237 | ENDIF |
---|
4238 | |
---|
4239 | CASE ( 'usm_t_surf_window' ) |
---|
4240 | !-- surface temperature for window surfaces |
---|
4241 | |
---|
4242 | IF ( av == 0 ) THEN |
---|
4243 | IF ( idsint == iup_u ) THEN |
---|
4244 | DO m = 1, surf_usm_h%ns |
---|
4245 | i = surf_usm_h%i(m) |
---|
4246 | j = surf_usm_h%j(m) |
---|
4247 | k = surf_usm_h%k(m) |
---|
4248 | temp_pf(k,j,i) = t_surf_window_h(m) |
---|
4249 | ENDDO |
---|
4250 | ELSE |
---|
4251 | l = idsidx |
---|
4252 | DO m = 1, surf_usm_v(l)%ns |
---|
4253 | i = surf_usm_v(l)%i(m) |
---|
4254 | j = surf_usm_v(l)%j(m) |
---|
4255 | k = surf_usm_v(l)%k(m) |
---|
4256 | temp_pf(k,j,i) = t_surf_window_v(l)%t(m) |
---|
4257 | ENDDO |
---|
4258 | ENDIF |
---|
4259 | |
---|
4260 | ELSE |
---|
4261 | IF ( idsint == iup_u ) THEN |
---|
4262 | DO m = 1, surf_usm_h%ns |
---|
4263 | i = surf_usm_h%i(m) |
---|
4264 | j = surf_usm_h%j(m) |
---|
4265 | k = surf_usm_h%k(m) |
---|
4266 | temp_pf(k,j,i) = surf_usm_h%t_surf_window_av(m) |
---|
4267 | ENDDO |
---|
4268 | ELSE |
---|
4269 | l = idsidx |
---|
4270 | DO m = 1, surf_usm_v(l)%ns |
---|
4271 | i = surf_usm_v(l)%i(m) |
---|
4272 | j = surf_usm_v(l)%j(m) |
---|
4273 | k = surf_usm_v(l)%k(m) |
---|
4274 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_window_av(m) |
---|
4275 | ENDDO |
---|
4276 | |
---|
4277 | ENDIF |
---|
4278 | |
---|
4279 | ENDIF |
---|
4280 | |
---|
4281 | CASE ( 'usm_t_surf_green' ) |
---|
4282 | !-- surface temperature for green surfaces |
---|
4283 | |
---|
4284 | IF ( av == 0 ) THEN |
---|
4285 | IF ( idsint == iup_u ) THEN |
---|
4286 | DO m = 1, surf_usm_h%ns |
---|
4287 | i = surf_usm_h%i(m) |
---|
4288 | j = surf_usm_h%j(m) |
---|
4289 | k = surf_usm_h%k(m) |
---|
4290 | temp_pf(k,j,i) = t_surf_green_h(m) |
---|
4291 | ENDDO |
---|
4292 | ELSE |
---|
4293 | l = idsidx |
---|
4294 | DO m = 1, surf_usm_v(l)%ns |
---|
4295 | i = surf_usm_v(l)%i(m) |
---|
4296 | j = surf_usm_v(l)%j(m) |
---|
4297 | k = surf_usm_v(l)%k(m) |
---|
4298 | temp_pf(k,j,i) = t_surf_green_v(l)%t(m) |
---|
4299 | ENDDO |
---|
4300 | ENDIF |
---|
4301 | |
---|
4302 | ELSE |
---|
4303 | IF ( idsint == iup_u ) THEN |
---|
4304 | DO m = 1, surf_usm_h%ns |
---|
4305 | i = surf_usm_h%i(m) |
---|
4306 | j = surf_usm_h%j(m) |
---|
4307 | k = surf_usm_h%k(m) |
---|
4308 | temp_pf(k,j,i) = surf_usm_h%t_surf_green_av(m) |
---|
4309 | ENDDO |
---|
4310 | ELSE |
---|
4311 | l = idsidx |
---|
4312 | DO m = 1, surf_usm_v(l)%ns |
---|
4313 | i = surf_usm_v(l)%i(m) |
---|
4314 | j = surf_usm_v(l)%j(m) |
---|
4315 | k = surf_usm_v(l)%k(m) |
---|
4316 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_green_av(m) |
---|
4317 | ENDDO |
---|
4318 | |
---|
4319 | ENDIF |
---|
4320 | |
---|
4321 | ENDIF |
---|
4322 | |
---|
4323 | CASE ( 'usm_t_surf_10cm' ) |
---|
4324 | !-- near surface temperature for whole surfaces |
---|
4325 | |
---|
4326 | IF ( av == 0 ) THEN |
---|
4327 | IF ( idsint == iup_u ) THEN |
---|
4328 | DO m = 1, surf_usm_h%ns |
---|
4329 | i = surf_usm_h%i(m) |
---|
4330 | j = surf_usm_h%j(m) |
---|
4331 | k = surf_usm_h%k(m) |
---|
4332 | temp_pf(k,j,i) = t_surf_10cm_h(m) |
---|
4333 | ENDDO |
---|
4334 | ELSE |
---|
4335 | l = idsidx |
---|
4336 | DO m = 1, surf_usm_v(l)%ns |
---|
4337 | i = surf_usm_v(l)%i(m) |
---|
4338 | j = surf_usm_v(l)%j(m) |
---|
4339 | k = surf_usm_v(l)%k(m) |
---|
4340 | temp_pf(k,j,i) = t_surf_10cm_v(l)%t(m) |
---|
4341 | ENDDO |
---|
4342 | ENDIF |
---|
4343 | |
---|
4344 | ELSE |
---|
4345 | IF ( idsint == iup_u ) THEN |
---|
4346 | DO m = 1, surf_usm_h%ns |
---|
4347 | i = surf_usm_h%i(m) |
---|
4348 | j = surf_usm_h%j(m) |
---|
4349 | k = surf_usm_h%k(m) |
---|
4350 | temp_pf(k,j,i) = surf_usm_h%t_surf_10cm_av(m) |
---|
4351 | ENDDO |
---|
4352 | ELSE |
---|
4353 | l = idsidx |
---|
4354 | DO m = 1, surf_usm_v(l)%ns |
---|
4355 | i = surf_usm_v(l)%i(m) |
---|
4356 | j = surf_usm_v(l)%j(m) |
---|
4357 | k = surf_usm_v(l)%k(m) |
---|
4358 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_10cm_av(m) |
---|
4359 | ENDDO |
---|
4360 | |
---|
4361 | ENDIF |
---|
4362 | |
---|
4363 | ENDIF |
---|
4364 | |
---|
4365 | |
---|
4366 | CASE ( 'usm_t_wall' ) |
---|
4367 | !-- wall temperature for iwl layer of walls and land |
---|
4368 | IF ( av == 0 ) THEN |
---|
4369 | IF ( idsint == iup_u ) THEN |
---|
4370 | DO m = 1, surf_usm_h%ns |
---|
4371 | i = surf_usm_h%i(m) |
---|
4372 | j = surf_usm_h%j(m) |
---|
4373 | k = surf_usm_h%k(m) |
---|
4374 | temp_pf(k,j,i) = t_wall_h(iwl,m) |
---|
4375 | ENDDO |
---|
4376 | ELSE |
---|
4377 | l = idsidx |
---|
4378 | DO m = 1, surf_usm_v(l)%ns |
---|
4379 | i = surf_usm_v(l)%i(m) |
---|
4380 | j = surf_usm_v(l)%j(m) |
---|
4381 | k = surf_usm_v(l)%k(m) |
---|
4382 | temp_pf(k,j,i) = t_wall_v(l)%t(iwl,m) |
---|
4383 | ENDDO |
---|
4384 | ENDIF |
---|
4385 | ELSE |
---|
4386 | IF ( idsint == iup_u ) THEN |
---|
4387 | DO m = 1, surf_usm_h%ns |
---|
4388 | i = surf_usm_h%i(m) |
---|
4389 | j = surf_usm_h%j(m) |
---|
4390 | k = surf_usm_h%k(m) |
---|
4391 | temp_pf(k,j,i) = surf_usm_h%t_wall_av(iwl,m) |
---|
4392 | ENDDO |
---|
4393 | ELSE |
---|
4394 | l = idsidx |
---|
4395 | DO m = 1, surf_usm_v(l)%ns |
---|
4396 | i = surf_usm_v(l)%i(m) |
---|
4397 | j = surf_usm_v(l)%j(m) |
---|
4398 | k = surf_usm_v(l)%k(m) |
---|
4399 | temp_pf(k,j,i) = surf_usm_v(l)%t_wall_av(iwl,m) |
---|
4400 | ENDDO |
---|
4401 | ENDIF |
---|
4402 | ENDIF |
---|
4403 | |
---|
4404 | CASE ( 'usm_t_window' ) |
---|
4405 | !-- window temperature for iwl layer of walls and land |
---|
4406 | IF ( av == 0 ) THEN |
---|
4407 | IF ( idsint == iup_u ) THEN |
---|
4408 | DO m = 1, surf_usm_h%ns |
---|
4409 | i = surf_usm_h%i(m) |
---|
4410 | j = surf_usm_h%j(m) |
---|
4411 | k = surf_usm_h%k(m) |
---|
4412 | temp_pf(k,j,i) = t_window_h(iwl,m) |
---|
4413 | ENDDO |
---|
4414 | ELSE |
---|
4415 | l = idsidx |
---|
4416 | DO m = 1, surf_usm_v(l)%ns |
---|
4417 | i = surf_usm_v(l)%i(m) |
---|
4418 | j = surf_usm_v(l)%j(m) |
---|
4419 | k = surf_usm_v(l)%k(m) |
---|
4420 | temp_pf(k,j,i) = t_window_v(l)%t(iwl,m) |
---|
4421 | ENDDO |
---|
4422 | ENDIF |
---|
4423 | ELSE |
---|
4424 | IF ( idsint == iup_u ) THEN |
---|
4425 | DO m = 1, surf_usm_h%ns |
---|
4426 | i = surf_usm_h%i(m) |
---|
4427 | j = surf_usm_h%j(m) |
---|
4428 | k = surf_usm_h%k(m) |
---|
4429 | temp_pf(k,j,i) = surf_usm_h%t_window_av(iwl,m) |
---|
4430 | ENDDO |
---|
4431 | ELSE |
---|
4432 | l = idsidx |
---|
4433 | DO m = 1, surf_usm_v(l)%ns |
---|
4434 | i = surf_usm_v(l)%i(m) |
---|
4435 | j = surf_usm_v(l)%j(m) |
---|
4436 | k = surf_usm_v(l)%k(m) |
---|
4437 | temp_pf(k,j,i) = surf_usm_v(l)%t_window_av(iwl,m) |
---|
4438 | ENDDO |
---|
4439 | ENDIF |
---|
4440 | ENDIF |
---|
4441 | |
---|
4442 | CASE ( 'usm_t_green' ) |
---|
4443 | !-- green temperature for iwl layer of walls and land |
---|
4444 | IF ( av == 0 ) THEN |
---|
4445 | IF ( idsint == iup_u ) THEN |
---|
4446 | DO m = 1, surf_usm_h%ns |
---|
4447 | i = surf_usm_h%i(m) |
---|
4448 | j = surf_usm_h%j(m) |
---|
4449 | k = surf_usm_h%k(m) |
---|
4450 | temp_pf(k,j,i) = t_green_h(iwl,m) |
---|
4451 | ENDDO |
---|
4452 | ELSE |
---|
4453 | l = idsidx |
---|
4454 | DO m = 1, surf_usm_v(l)%ns |
---|
4455 | i = surf_usm_v(l)%i(m) |
---|
4456 | j = surf_usm_v(l)%j(m) |
---|
4457 | k = surf_usm_v(l)%k(m) |
---|
4458 | temp_pf(k,j,i) = t_green_v(l)%t(iwl,m) |
---|
4459 | ENDDO |
---|
4460 | ENDIF |
---|
4461 | ELSE |
---|
4462 | IF ( idsint == iup_u ) THEN |
---|
4463 | DO m = 1, surf_usm_h%ns |
---|
4464 | i = surf_usm_h%i(m) |
---|
4465 | j = surf_usm_h%j(m) |
---|
4466 | k = surf_usm_h%k(m) |
---|
4467 | temp_pf(k,j,i) = surf_usm_h%t_green_av(iwl,m) |
---|
4468 | ENDDO |
---|
4469 | ELSE |
---|
4470 | l = idsidx |
---|
4471 | DO m = 1, surf_usm_v(l)%ns |
---|
4472 | i = surf_usm_v(l)%i(m) |
---|
4473 | j = surf_usm_v(l)%j(m) |
---|
4474 | k = surf_usm_v(l)%k(m) |
---|
4475 | temp_pf(k,j,i) = surf_usm_v(l)%t_green_av(iwl,m) |
---|
4476 | ENDDO |
---|
4477 | ENDIF |
---|
4478 | ENDIF |
---|
4479 | |
---|
4480 | CASE ( 'usm_swc' ) |
---|
4481 | !-- soil water content for iwl layer of walls and land |
---|
4482 | IF ( av == 0 ) THEN |
---|
4483 | IF ( idsint == iup_u ) THEN |
---|
4484 | DO m = 1, surf_usm_h%ns |
---|
4485 | i = surf_usm_h%i(m) |
---|
4486 | j = surf_usm_h%j(m) |
---|
4487 | k = surf_usm_h%k(m) |
---|
4488 | temp_pf(k,j,i) = swc_h(iwl,m) |
---|
4489 | ENDDO |
---|
4490 | ELSE |
---|
4491 | l = idsidx |
---|
4492 | DO m = 1, surf_usm_v(l)%ns |
---|
4493 | i = surf_usm_v(l)%i(m) |
---|
4494 | j = surf_usm_v(l)%j(m) |
---|
4495 | k = surf_usm_v(l)%k(m) |
---|
4496 | temp_pf(k,j,i) = swc_v(l)%t(iwl,m) |
---|
4497 | ENDDO |
---|
4498 | ENDIF |
---|
4499 | ELSE |
---|
4500 | IF ( idsint == iup_u ) THEN |
---|
4501 | DO m = 1, surf_usm_h%ns |
---|
4502 | i = surf_usm_h%i(m) |
---|
4503 | j = surf_usm_h%j(m) |
---|
4504 | k = surf_usm_h%k(m) |
---|
4505 | temp_pf(k,j,i) = surf_usm_h%swc_av(iwl,m) |
---|
4506 | ENDDO |
---|
4507 | ELSE |
---|
4508 | l = idsidx |
---|
4509 | DO m = 1, surf_usm_v(l)%ns |
---|
4510 | i = surf_usm_v(l)%i(m) |
---|
4511 | j = surf_usm_v(l)%j(m) |
---|
4512 | k = surf_usm_v(l)%k(m) |
---|
4513 | temp_pf(k,j,i) = surf_usm_v(l)%swc_av(iwl,m) |
---|
4514 | ENDDO |
---|
4515 | ENDIF |
---|
4516 | ENDIF |
---|
4517 | |
---|
4518 | |
---|
4519 | CASE DEFAULT |
---|
4520 | found = .FALSE. |
---|
4521 | RETURN |
---|
4522 | END SELECT |
---|
4523 | |
---|
4524 | ! |
---|
4525 | !-- Rearrange dimensions for NetCDF output |
---|
4526 | !-- FIXME: this may generate FPE overflow upon conversion from DP to SP |
---|
4527 | DO j = nys, nyn |
---|
4528 | DO i = nxl, nxr |
---|
4529 | DO k = nzb_do, nzt_do |
---|
4530 | local_pf(i,j,k) = temp_pf(k,j,i) |
---|
4531 | ENDDO |
---|
4532 | ENDDO |
---|
4533 | ENDDO |
---|
4534 | |
---|
4535 | END SUBROUTINE usm_data_output_3d |
---|
4536 | |
---|
4537 | |
---|
4538 | !------------------------------------------------------------------------------! |
---|
4539 | ! |
---|
4540 | ! Description: |
---|
4541 | ! ------------ |
---|
4542 | !> Soubroutine defines appropriate grid for netcdf variables. |
---|
4543 | !> It is called out from subroutine netcdf. |
---|
4544 | !------------------------------------------------------------------------------! |
---|
4545 | SUBROUTINE usm_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) |
---|
4546 | |
---|
4547 | IMPLICIT NONE |
---|
4548 | |
---|
4549 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
4550 | LOGICAL, INTENT(OUT) :: found !< |
---|
4551 | CHARACTER (len=*), INTENT(OUT) :: grid_x !< |
---|
4552 | CHARACTER (len=*), INTENT(OUT) :: grid_y !< |
---|
4553 | CHARACTER (len=*), INTENT(OUT) :: grid_z !< |
---|
4554 | |
---|
4555 | CHARACTER (len=varnamelength) :: var |
---|
4556 | |
---|
4557 | var = TRIM(variable) |
---|
4558 | IF ( var(1:12) == 'usm_rad_net_' .OR. var(1:13) == 'usm_rad_insw_' .OR. & |
---|
4559 | var(1:13) == 'usm_rad_inlw_' .OR. var(1:16) == 'usm_rad_inswdir_' .OR. & |
---|
4560 | var(1:16) == 'usm_rad_inswdif_' .OR. var(1:16) == 'usm_rad_inswref_' .OR. & |
---|
4561 | var(1:16) == 'usm_rad_inlwdif_' .OR. var(1:16) == 'usm_rad_inlwref_' .OR. & |
---|
4562 | var(1:14) == 'usm_rad_outsw_' .OR. var(1:14) == 'usm_rad_outlw_' .OR. & |
---|
4563 | var(1:14) == 'usm_rad_ressw_' .OR. var(1:14) == 'usm_rad_reslw_' .OR. & |
---|
4564 | var(1:11) == 'usm_rad_hf_' .OR. var == 'usm_rad_pc_inlw' .OR. & |
---|
4565 | var == 'usm_rad_pc_insw' .OR. var == 'usm_rad_pc_inswdir' .OR. & |
---|
4566 | var == 'usm_rad_pc_inswdif' .OR. var == 'usm_rad_pc_inswref' .OR. & |
---|
4567 | var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
4568 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
4569 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
4570 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
4571 | var(1:13) == 'usm_qsws_liq_' .OR. & |
---|
4572 | var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
4573 | var(1:17) == 'usm_t_surf_window' .OR. var(1:12) == 'usm_t_window' .OR. & |
---|
4574 | var(1:16) == 'usm_t_surf_green' .OR. var(1:11) == 'usm_t_green' .OR. & |
---|
4575 | var(1:15) == 'usm_t_surf_10cm' .OR. & |
---|
4576 | var(1:9) == 'usm_surfz' .OR. var(1:7) == 'usm_svf' .OR. & |
---|
4577 | var(1:7) == 'usm_dif' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
4578 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
4579 | var(1:16) == 'usm_surfwintrans' .OR. var(1:7) == 'usm_swc' .OR. & |
---|
4580 | var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' ) THEN |
---|
4581 | |
---|
4582 | found = .TRUE. |
---|
4583 | grid_x = 'x' |
---|
4584 | grid_y = 'y' |
---|
4585 | grid_z = 'zu' |
---|
4586 | ELSE |
---|
4587 | found = .FALSE. |
---|
4588 | grid_x = 'none' |
---|
4589 | grid_y = 'none' |
---|
4590 | grid_z = 'none' |
---|
4591 | ENDIF |
---|
4592 | |
---|
4593 | END SUBROUTINE usm_define_netcdf_grid |
---|
4594 | |
---|
4595 | |
---|
4596 | !------------------------------------------------------------------------------! |
---|
4597 | ! Description: |
---|
4598 | ! ------------ |
---|
4599 | !> Initialization of the wall surface model |
---|
4600 | !------------------------------------------------------------------------------! |
---|
4601 | SUBROUTINE usm_init_material_model |
---|
4602 | |
---|
4603 | IMPLICIT NONE |
---|
4604 | |
---|
4605 | INTEGER(iwp) :: k, l, m !< running indices |
---|
4606 | |
---|
4607 | CALL location_message( ' initialization of wall surface model', .TRUE. ) |
---|
4608 | |
---|
4609 | !-- Calculate wall grid spacings. |
---|
4610 | !-- Temperature is defined at the center of the wall layers, |
---|
4611 | !-- whereas gradients/fluxes are defined at the edges (_stag) |
---|
4612 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
4613 | DO m = 1, surf_usm_h%ns |
---|
4614 | |
---|
4615 | surf_usm_h%dz_wall(nzb_wall,m) = surf_usm_h%zw(nzb_wall,m) |
---|
4616 | DO k = nzb_wall+1, nzt_wall |
---|
4617 | surf_usm_h%dz_wall(k,m) = surf_usm_h%zw(k,m) - & |
---|
4618 | surf_usm_h%zw(k-1,m) |
---|
4619 | ENDDO |
---|
4620 | surf_usm_h%dz_window(nzb_wall,m) = surf_usm_h%zw_window(nzb_wall,m) |
---|
4621 | DO k = nzb_wall+1, nzt_wall |
---|
4622 | surf_usm_h%dz_window(k,m) = surf_usm_h%zw_window(k,m) - & |
---|
4623 | surf_usm_h%zw_window(k-1,m) |
---|
4624 | ENDDO |
---|
4625 | ! surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
4626 | ! DO k = nzb_wall+1, nzt_wall |
---|
4627 | ! surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
4628 | ! surf_usm_h%zw_green(k-1,m) |
---|
4629 | ! ENDDO |
---|
4630 | |
---|
4631 | surf_usm_h%dz_wall(nzt_wall+1,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
4632 | |
---|
4633 | DO k = nzb_wall, nzt_wall-1 |
---|
4634 | surf_usm_h%dz_wall_stag(k,m) = 0.5 * ( & |
---|
4635 | surf_usm_h%dz_wall(k+1,m) + surf_usm_h%dz_wall(k,m) ) |
---|
4636 | ENDDO |
---|
4637 | surf_usm_h%dz_wall_stag(nzt_wall,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
4638 | |
---|
4639 | surf_usm_h%dz_window(nzt_wall+1,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
4640 | |
---|
4641 | DO k = nzb_wall, nzt_wall-1 |
---|
4642 | surf_usm_h%dz_window_stag(k,m) = 0.5 * ( & |
---|
4643 | surf_usm_h%dz_window(k+1,m) + surf_usm_h%dz_window(k,m) ) |
---|
4644 | ENDDO |
---|
4645 | surf_usm_h%dz_window_stag(nzt_wall,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
4646 | |
---|
4647 | ! surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
4648 | ! |
---|
4649 | ! DO k = nzb_wall, nzt_wall-1 |
---|
4650 | ! surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
4651 | ! surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
4652 | ! ENDDO |
---|
4653 | ! surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
4654 | !------------- |
---|
4655 | IF (surf_usm_h%green_type_roof(m) == 2.0_wp ) then |
---|
4656 | soil_type = 3 !extensiv green roof |
---|
4657 | surf_usm_h%lai(m) = 2.0_wp |
---|
4658 | |
---|
4659 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
4660 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
4661 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.15_wp |
---|
4662 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.20_wp |
---|
4663 | ELSE |
---|
4664 | soil_type = 6 !intensiv green roof |
---|
4665 | surf_usm_h%lai(m) = 4.0_wp |
---|
4666 | |
---|
4667 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
4668 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
4669 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.40_wp |
---|
4670 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.80_wp |
---|
4671 | ENDIF |
---|
4672 | |
---|
4673 | surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
4674 | DO k = nzb_wall+1, nzt_wall |
---|
4675 | surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
4676 | surf_usm_h%zw_green(k-1,m) |
---|
4677 | ENDDO |
---|
4678 | surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
4679 | |
---|
4680 | DO k = nzb_wall, nzt_wall-1 |
---|
4681 | surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
4682 | surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
4683 | ENDDO |
---|
4684 | surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
4685 | |
---|
4686 | IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
4687 | alpha_vangenuchten = soil_pars(0,soil_type) |
---|
4688 | ENDIF |
---|
4689 | |
---|
4690 | IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
4691 | l_vangenuchten = soil_pars(1,soil_type) |
---|
4692 | ENDIF |
---|
4693 | |
---|
4694 | IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
4695 | n_vangenuchten = soil_pars(2,soil_type) |
---|
4696 | ENDIF |
---|
4697 | |
---|
4698 | IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
4699 | hydraulic_conductivity = soil_pars(3,soil_type) |
---|
4700 | ENDIF |
---|
4701 | |
---|
4702 | IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
4703 | saturation_moisture = m_soil_pars(0,soil_type) |
---|
4704 | ENDIF |
---|
4705 | |
---|
4706 | IF ( field_capacity == 9999999.9_wp ) THEN |
---|
4707 | field_capacity = m_soil_pars(1,soil_type) |
---|
4708 | ENDIF |
---|
4709 | |
---|
4710 | IF ( wilting_point == 9999999.9_wp ) THEN |
---|
4711 | wilting_point = m_soil_pars(2,soil_type) |
---|
4712 | ENDIF |
---|
4713 | |
---|
4714 | IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
4715 | residual_moisture = m_soil_pars(3,soil_type) |
---|
4716 | ENDIF |
---|
4717 | |
---|
4718 | DO k = nzb_wall, nzt_wall+1 |
---|
4719 | swc_h(k,m) = field_capacity |
---|
4720 | rootfr_h(k,m) = 0.5_wp |
---|
4721 | surf_usm_h%alpha_vg_green(m) = alpha_vangenuchten |
---|
4722 | surf_usm_h%l_vg_green(m) = l_vangenuchten |
---|
4723 | surf_usm_h%n_vg_green(m) = n_vangenuchten |
---|
4724 | surf_usm_h%gamma_w_green_sat(k,m) = hydraulic_conductivity |
---|
4725 | swc_sat_h(k,m) = saturation_moisture |
---|
4726 | fc_h(k,m) = field_capacity |
---|
4727 | wilt_h(k,m) = wilting_point |
---|
4728 | swc_res_h(k,m) = residual_moisture |
---|
4729 | ENDDO |
---|
4730 | !------------------------------- |
---|
4731 | ENDDO |
---|
4732 | surf_usm_h%ddz_wall = 1.0_wp / surf_usm_h%dz_wall |
---|
4733 | surf_usm_h%ddz_wall_stag = 1.0_wp / surf_usm_h%dz_wall_stag |
---|
4734 | surf_usm_h%ddz_window = 1.0_wp / surf_usm_h%dz_window |
---|
4735 | surf_usm_h%ddz_window_stag = 1.0_wp / surf_usm_h%dz_window_stag |
---|
4736 | surf_usm_h%ddz_green = 1.0_wp / surf_usm_h%dz_green |
---|
4737 | surf_usm_h%ddz_green_stag = 1.0_wp / surf_usm_h%dz_green_stag |
---|
4738 | ! |
---|
4739 | !-- For vertical surfaces |
---|
4740 | DO l = 0, 3 |
---|
4741 | DO m = 1, surf_usm_v(l)%ns |
---|
4742 | surf_usm_v(l)%dz_wall(nzb_wall,m) = surf_usm_v(l)%zw(nzb_wall,m) |
---|
4743 | DO k = nzb_wall+1, nzt_wall |
---|
4744 | surf_usm_v(l)%dz_wall(k,m) = surf_usm_v(l)%zw(k,m) - & |
---|
4745 | surf_usm_v(l)%zw(k-1,m) |
---|
4746 | ENDDO |
---|
4747 | surf_usm_v(l)%dz_window(nzb_wall,m) = surf_usm_v(l)%zw_window(nzb_wall,m) |
---|
4748 | DO k = nzb_wall+1, nzt_wall |
---|
4749 | surf_usm_v(l)%dz_window(k,m) = surf_usm_v(l)%zw_window(k,m) - & |
---|
4750 | surf_usm_v(l)%zw_window(k-1,m) |
---|
4751 | ENDDO |
---|
4752 | surf_usm_v(l)%dz_green(nzb_wall,m) = surf_usm_v(l)%zw_green(nzb_wall,m) |
---|
4753 | DO k = nzb_wall+1, nzt_wall |
---|
4754 | surf_usm_v(l)%dz_green(k,m) = surf_usm_v(l)%zw_green(k,m) - & |
---|
4755 | surf_usm_v(l)%zw_green(k-1,m) |
---|
4756 | ENDDO |
---|
4757 | |
---|
4758 | surf_usm_v(l)%dz_wall(nzt_wall+1,m) = & |
---|
4759 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
4760 | |
---|
4761 | DO k = nzb_wall, nzt_wall-1 |
---|
4762 | surf_usm_v(l)%dz_wall_stag(k,m) = 0.5 * ( & |
---|
4763 | surf_usm_v(l)%dz_wall(k+1,m) + & |
---|
4764 | surf_usm_v(l)%dz_wall(k,m) ) |
---|
4765 | ENDDO |
---|
4766 | surf_usm_v(l)%dz_wall_stag(nzt_wall,m) = & |
---|
4767 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
4768 | surf_usm_v(l)%dz_window(nzt_wall+1,m) = & |
---|
4769 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
4770 | |
---|
4771 | DO k = nzb_wall, nzt_wall-1 |
---|
4772 | surf_usm_v(l)%dz_window_stag(k,m) = 0.5 * ( & |
---|
4773 | surf_usm_v(l)%dz_window(k+1,m) + & |
---|
4774 | surf_usm_v(l)%dz_window(k,m) ) |
---|
4775 | ENDDO |
---|
4776 | surf_usm_v(l)%dz_window_stag(nzt_wall,m) = & |
---|
4777 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
4778 | surf_usm_v(l)%dz_green(nzt_wall+1,m) = & |
---|
4779 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
4780 | |
---|
4781 | DO k = nzb_wall, nzt_wall-1 |
---|
4782 | surf_usm_v(l)%dz_green_stag(k,m) = 0.5 * ( & |
---|
4783 | surf_usm_v(l)%dz_green(k+1,m) + & |
---|
4784 | surf_usm_v(l)%dz_green(k,m) ) |
---|
4785 | ENDDO |
---|
4786 | surf_usm_v(l)%dz_green_stag(nzt_wall,m) = & |
---|
4787 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
4788 | ENDDO |
---|
4789 | surf_usm_v(l)%ddz_wall = 1.0_wp / surf_usm_v(l)%dz_wall |
---|
4790 | surf_usm_v(l)%ddz_wall_stag = 1.0_wp / surf_usm_v(l)%dz_wall_stag |
---|
4791 | surf_usm_v(l)%ddz_window = 1.0_wp / surf_usm_v(l)%dz_window |
---|
4792 | surf_usm_v(l)%ddz_window_stag = 1.0_wp / surf_usm_v(l)%dz_window_stag |
---|
4793 | surf_usm_v(l)%ddz_green = 1.0_wp / surf_usm_v(l)%dz_green |
---|
4794 | surf_usm_v(l)%ddz_green_stag = 1.0_wp / surf_usm_v(l)%dz_green_stag |
---|
4795 | ENDDO |
---|
4796 | |
---|
4797 | |
---|
4798 | ! soil_type = 6 |
---|
4799 | ! !-- Initialize standard soil types. It is possible to overwrite each |
---|
4800 | ! !-- parameter by setting the respecticy NAMELIST variable to a |
---|
4801 | ! !-- value /= 9999999.9. |
---|
4802 | ! IF ( soil_type /= 0 ) THEN |
---|
4803 | ! |
---|
4804 | ! IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
4805 | ! alpha_vangenuchten = soil_pars(0,soil_type) |
---|
4806 | ! ENDIF |
---|
4807 | ! |
---|
4808 | ! IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
4809 | ! l_vangenuchten = soil_pars(1,soil_type) |
---|
4810 | ! ENDIF |
---|
4811 | ! |
---|
4812 | ! IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
4813 | ! n_vangenuchten = soil_pars(2,soil_type) |
---|
4814 | ! ENDIF |
---|
4815 | ! |
---|
4816 | ! IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
4817 | ! hydraulic_conductivity = soil_pars(3,soil_type) |
---|
4818 | ! ENDIF |
---|
4819 | ! |
---|
4820 | ! IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
4821 | ! saturation_moisture = m_soil_pars(0,soil_type) |
---|
4822 | ! ENDIF |
---|
4823 | ! |
---|
4824 | ! IF ( field_capacity == 9999999.9_wp ) THEN |
---|
4825 | ! field_capacity = m_soil_pars(1,soil_type) |
---|
4826 | ! ENDIF |
---|
4827 | ! |
---|
4828 | ! IF ( wilting_point == 9999999.9_wp ) THEN |
---|
4829 | ! wilting_point = m_soil_pars(2,soil_type) |
---|
4830 | ! ENDIF |
---|
4831 | ! |
---|
4832 | ! IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
4833 | ! residual_moisture = m_soil_pars(3,soil_type) |
---|
4834 | ! ENDIF |
---|
4835 | ! |
---|
4836 | ! DO m = 1, surf_usm_h%ns |
---|
4837 | ! DO k = nzb_wall, nzt_wall+1 |
---|
4838 | ! swc_h(k,m) = field_capacity |
---|
4839 | ! rootfr_h(k,m) = 0.5_wp |
---|
4840 | ! ENDDO |
---|
4841 | ! ENDDO |
---|
4842 | ! ! ! |
---|
4843 | ! ! !-- Vertical surfaces |
---|
4844 | ! ! DO l = 0, 3 |
---|
4845 | ! ! DO m = 1, surf_usm_v(l)%ns |
---|
4846 | ! ! DO k = nzb_wall, nzt_wall+1 |
---|
4847 | ! ! swc_v(l)%t(k,m) = 0.5_wp |
---|
4848 | ! ! ENDDO |
---|
4849 | ! ! ENDDO |
---|
4850 | ! ! ENDDO |
---|
4851 | ! |
---|
4852 | ! ENDIF |
---|
4853 | ! |
---|
4854 | ! ! |
---|
4855 | ! !-- Map values to the respective 2D arrays |
---|
4856 | ! surf_usm_h%alpha_vg_green = alpha_vangenuchten |
---|
4857 | ! surf_usm_h%l_vg_green = l_vangenuchten |
---|
4858 | ! surf_usm_h%n_vg_green = n_vangenuchten |
---|
4859 | ! surf_usm_h%gamma_w_green_sat = hydraulic_conductivity |
---|
4860 | ! swc_sat_h = saturation_moisture |
---|
4861 | ! fc_h = field_capacity |
---|
4862 | ! wilt_h = wilting_point |
---|
4863 | ! swc_res_h = residual_moisture |
---|
4864 | ! ! r_soil_min = min_soil_resistance |
---|
4865 | |
---|
4866 | CALL location_message( ' wall structures filed out', .TRUE. ) |
---|
4867 | |
---|
4868 | CALL location_message( ' initialization of wall surface model finished', .TRUE. ) |
---|
4869 | |
---|
4870 | END SUBROUTINE usm_init_material_model |
---|
4871 | |
---|
4872 | |
---|
4873 | !------------------------------------------------------------------------------! |
---|
4874 | ! Description: |
---|
4875 | ! ------------ |
---|
4876 | !> Initialization of the urban surface model |
---|
4877 | !------------------------------------------------------------------------------! |
---|
4878 | SUBROUTINE usm_init_urban_surface |
---|
4879 | |
---|
4880 | USE arrays_3d, & |
---|
4881 | ONLY: zw |
---|
4882 | |
---|
4883 | USE netcdf_data_input_mod, & |
---|
4884 | ONLY: building_pars_f, building_type_f, terrain_height_f |
---|
4885 | |
---|
4886 | IMPLICIT NONE |
---|
4887 | |
---|
4888 | INTEGER(iwp) :: i !< loop index x-dirction |
---|
4889 | INTEGER(iwp) :: ind_alb_green !< index in input list for green albedo |
---|
4890 | INTEGER(iwp) :: ind_alb_wall !< index in input list for wall albedo |
---|
4891 | INTEGER(iwp) :: ind_alb_win !< index in input list for window albedo |
---|
4892 | INTEGER(iwp) :: ind_emis_wall !< index in input list for wall emissivity |
---|
4893 | INTEGER(iwp) :: ind_emis_green !< index in input list for green emissivity |
---|
4894 | INTEGER(iwp) :: ind_emis_win !< index in input list for window emissivity |
---|
4895 | INTEGER(iwp) :: ind_green_frac_w !< index in input list for green fraction on wall |
---|
4896 | INTEGER(iwp) :: ind_green_frac_r !< index in input list for green fraction on roof |
---|
4897 | INTEGER(iwp) :: ind_hc1 !< index in input list for heat capacity at first wall layer |
---|
4898 | INTEGER(iwp) :: ind_hc1_win !< index in input list for heat capacity at first window layer |
---|
4899 | INTEGER(iwp) :: ind_hc2 !< index in input list for heat capacity at second wall layer |
---|
4900 | INTEGER(iwp) :: ind_hc2_win !< index in input list for heat capacity at second window layer |
---|
4901 | INTEGER(iwp) :: ind_hc3 !< index in input list for heat capacity at third wall layer |
---|
4902 | INTEGER(iwp) :: ind_hc3_win !< index in input list for heat capacity at third window layer |
---|
4903 | INTEGER(iwp) :: ind_lai_r !< index in input list for LAI on roof |
---|
4904 | INTEGER(iwp) :: ind_lai_w !< index in input list for LAI on wall |
---|
4905 | INTEGER(iwp) :: ind_tc1 !< index in input list for thermal conductivity at first wall layer |
---|
4906 | INTEGER(iwp) :: ind_tc1_win !< index in input list for thermal conductivity at first window layer |
---|
4907 | INTEGER(iwp) :: ind_tc2 !< index in input list for thermal conductivity at second wall layer |
---|
4908 | INTEGER(iwp) :: ind_tc2_win !< index in input list for thermal conductivity at second window layer |
---|
4909 | INTEGER(iwp) :: ind_tc3 !< index in input list for thermal conductivity at third wall layer |
---|
4910 | INTEGER(iwp) :: ind_tc3_win !< index in input list for thermal conductivity at third window layer |
---|
4911 | INTEGER(iwp) :: ind_thick_1 !< index in input list for thickness of first wall layer |
---|
4912 | INTEGER(iwp) :: ind_thick_1_win !< index in input list for thickness of first window layer |
---|
4913 | INTEGER(iwp) :: ind_thick_2 !< index in input list for thickness of second wall layer |
---|
4914 | INTEGER(iwp) :: ind_thick_2_win !< index in input list for thickness of second window layer |
---|
4915 | INTEGER(iwp) :: ind_thick_3 !< index in input list for thickness of third wall layer |
---|
4916 | INTEGER(iwp) :: ind_thick_3_win !< index in input list for thickness of third window layer |
---|
4917 | INTEGER(iwp) :: ind_thick_4 !< index in input list for thickness of fourth wall layer |
---|
4918 | INTEGER(iwp) :: ind_thick_4_win !< index in input list for thickness of fourth window layer |
---|
4919 | INTEGER(iwp) :: ind_trans !< index in input list for window transmissivity |
---|
4920 | INTEGER(iwp) :: ind_wall_frac !< index in input list for wall fraction |
---|
4921 | INTEGER(iwp) :: ind_win_frac !< index in input list for window fraction |
---|
4922 | INTEGER(iwp) :: ind_z0 !< index in input list for z0 |
---|
4923 | INTEGER(iwp) :: ind_z0qh !< index in input list for z0h / z0q |
---|
4924 | INTEGER(iwp) :: j !< loop index y-dirction |
---|
4925 | INTEGER(iwp) :: k !< loop index z-dirction |
---|
4926 | INTEGER(iwp) :: l !< loop index surface orientation |
---|
4927 | INTEGER(iwp) :: m !< loop index surface element |
---|
4928 | INTEGER(iwp) :: st !< dummy |
---|
4929 | |
---|
4930 | REAL(wp) :: c, d, tin, twin |
---|
4931 | REAL(wp) :: ground_floor_level_l !< local height of ground floor level |
---|
4932 | REAL(wp) :: z_agl !< height above ground |
---|
4933 | |
---|
4934 | ! |
---|
4935 | !-- NOPOINTER version not implemented yet |
---|
4936 | #if defined( __nopointer ) |
---|
4937 | message_string = 'The urban surface module only runs with POINTER version' |
---|
4938 | CALL message( 'urban_surface_mod', 'PA0452', 1, 2, 0, 6, 0 ) |
---|
4939 | #endif |
---|
4940 | |
---|
4941 | CALL cpu_log( log_point_s(78), 'usm_init', 'start' ) |
---|
4942 | !-- surface forcing have to be disabled for LSF |
---|
4943 | !-- in case of enabled urban surface module |
---|
4944 | IF ( large_scale_forcing ) THEN |
---|
4945 | lsf_surf = .FALSE. |
---|
4946 | ENDIF |
---|
4947 | |
---|
4948 | ! |
---|
4949 | !-- Flag surface elements belonging to the ground floor level. Therefore, |
---|
4950 | !-- use terrain height array from file, if available. This flag is later used |
---|
4951 | !-- to control initialization of surface attributes. |
---|
4952 | !-- Todo: for the moment disable initialization of building roofs with |
---|
4953 | !-- ground-floor-level properties. |
---|
4954 | surf_usm_h%ground_level = .FALSE. |
---|
4955 | ! DO m = 1, surf_usm_h%ns |
---|
4956 | ! i = surf_usm_h%i(m) |
---|
4957 | ! j = surf_usm_h%j(m) |
---|
4958 | ! k = surf_usm_h%k(m) |
---|
4959 | ! ! |
---|
4960 | ! !-- Get local ground level. If no ground level is given in input file, |
---|
4961 | ! !-- use default value. |
---|
4962 | ! ground_floor_level_l = ground_floor_level |
---|
4963 | ! IF ( building_pars_f%from_file ) THEN |
---|
4964 | ! IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4965 | ! building_pars_f%fill ) & |
---|
4966 | ! ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4967 | ! ENDIF |
---|
4968 | ! ! |
---|
4969 | ! !-- Determine height of surface element above ground level |
---|
4970 | ! IF ( terrain_height_f%from_file ) THEN |
---|
4971 | ! z_agl = zw(k) - terrain_height_f%var(j,i) |
---|
4972 | ! ELSE |
---|
4973 | ! z_agl = zw(k) |
---|
4974 | ! ENDIF |
---|
4975 | ! ! |
---|
4976 | ! !-- Set flag for ground level |
---|
4977 | ! IF ( z_agl <= ground_floor_level_l ) & |
---|
4978 | ! surf_usm_h%ground_level(m) = .TRUE. |
---|
4979 | ! ENDDO |
---|
4980 | |
---|
4981 | DO l = 0, 3 |
---|
4982 | surf_usm_v(l)%ground_level = .FALSE. |
---|
4983 | DO m = 1, surf_usm_v(l)%ns |
---|
4984 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4985 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4986 | k = surf_usm_v(l)%k(m) |
---|
4987 | ! |
---|
4988 | !-- Get local ground level. If no ground level is given in input file, |
---|
4989 | !-- use default value. |
---|
4990 | ground_floor_level_l = ground_floor_level |
---|
4991 | IF ( building_pars_f%from_file ) THEN |
---|
4992 | IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4993 | building_pars_f%fill ) & |
---|
4994 | ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4995 | ENDIF |
---|
4996 | ! |
---|
4997 | !-- Determine height of surface element above ground level. Please |
---|
4998 | !-- note, height of surface element is determined with respect to |
---|
4999 | !-- its height of the adjoing atmospheric grid point. |
---|
5000 | IF ( terrain_height_f%from_file ) THEN |
---|
5001 | z_agl = zw(k) - terrain_height_f%var(j-surf_usm_v(l)%joff, & |
---|
5002 | i-surf_usm_v(l)%ioff) |
---|
5003 | ELSE |
---|
5004 | z_agl = zw(k) |
---|
5005 | ENDIF |
---|
5006 | ! |
---|
5007 | !-- Set flag for ground level |
---|
5008 | IF ( z_agl <= ground_floor_level_l ) & |
---|
5009 | surf_usm_v(l)%ground_level(m) = .TRUE. |
---|
5010 | |
---|
5011 | ENDDO |
---|
5012 | ENDDO |
---|
5013 | ! |
---|
5014 | !-- Initialization of resistances. |
---|
5015 | DO m = 1, surf_usm_h%ns |
---|
5016 | surf_usm_h%r_a(m) = 50.0_wp |
---|
5017 | surf_usm_h%r_a_green(m) = 50.0_wp |
---|
5018 | surf_usm_h%r_a_window(m) = 50.0_wp |
---|
5019 | ENDDO |
---|
5020 | DO l = 0, 3 |
---|
5021 | DO m = 1, surf_usm_v(l)%ns |
---|
5022 | surf_usm_v(l)%r_a(m) = 50.0_wp |
---|
5023 | surf_usm_v(l)%r_a_green(m) = 50.0_wp |
---|
5024 | surf_usm_v(l)%r_a_window(m) = 50.0_wp |
---|
5025 | ENDDO |
---|
5026 | ENDDO |
---|
5027 | |
---|
5028 | !--------------------------------------------------------------------------------------------- |
---|
5029 | ! |
---|
5030 | !-- Map values onto horizontal elemements |
---|
5031 | DO m = 1, surf_usm_h%ns |
---|
5032 | surf_usm_h%r_canopy_min(m) = 200.0_wp !min_canopy_resistance |
---|
5033 | surf_usm_h%g_d(m) = 0.0_wp !canopy_resistance_coefficient |
---|
5034 | ENDDO |
---|
5035 | ! |
---|
5036 | !-- Map values onto vertical elements, even though this does not make |
---|
5037 | !-- much sense. |
---|
5038 | DO l = 0, 3 |
---|
5039 | DO m = 1, surf_usm_v(l)%ns |
---|
5040 | surf_usm_v(l)%r_canopy_min(m) = 200.0_wp !min_canopy_resistance |
---|
5041 | surf_usm_v(l)%g_d(m) = 0.0_wp !canopy_resistance_coefficient |
---|
5042 | ENDDO |
---|
5043 | ENDDO |
---|
5044 | !--------------------------------------------------------------------------------------------- |
---|
5045 | ! |
---|
5046 | ! |
---|
5047 | !-- Initialize urban-type surface attribute. According to initialization in |
---|
5048 | !-- land-surface model, follow a 3-level approach. |
---|
5049 | !-- Level 1 - initialization via default attributes |
---|
5050 | DO m = 1, surf_usm_h%ns |
---|
5051 | ! |
---|
5052 | !-- Now, all horizontal surfaces are roof surfaces (?) |
---|
5053 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
5054 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
5055 | ! |
---|
5056 | !-- In order to distinguish between ground floor level and |
---|
5057 | !-- above-ground-floor level surfaces, set input indices. |
---|
5058 | |
---|
5059 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5060 | surf_usm_h%ground_level(m) ) |
---|
5061 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5062 | surf_usm_h%ground_level(m) ) |
---|
5063 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5064 | surf_usm_h%ground_level(m) ) |
---|
5065 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5066 | surf_usm_h%ground_level(m) ) |
---|
5067 | ! |
---|
5068 | !-- Store building type and its name on each surface element |
---|
5069 | surf_usm_h%building_type(m) = building_type |
---|
5070 | surf_usm_h%building_type_name(m) = building_type_name(building_type) |
---|
5071 | ! |
---|
5072 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5073 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,building_type) |
---|
5074 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,building_type) |
---|
5075 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,building_type) |
---|
5076 | surf_usm_h%lai(m) = building_pars(ind_lai_r,building_type) |
---|
5077 | |
---|
5078 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
5079 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
5080 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,building_type) |
---|
5081 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,building_type) |
---|
5082 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
5083 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
5084 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,building_type) |
---|
5085 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,building_type) |
---|
5086 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
5087 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
5088 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,building_type) |
---|
5089 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,building_type) |
---|
5090 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
5091 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
5092 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,building_type) |
---|
5093 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,building_type) |
---|
5094 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,building_type) |
---|
5095 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,building_type) |
---|
5096 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,building_type) |
---|
5097 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,building_type) |
---|
5098 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,building_type) |
---|
5099 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,building_type) |
---|
5100 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,building_type) |
---|
5101 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,building_type) |
---|
5102 | |
---|
5103 | surf_usm_h%target_temp_summer(m) = building_pars(117,building_type) |
---|
5104 | surf_usm_h%target_temp_winter(m) = building_pars(118,building_type) |
---|
5105 | ! |
---|
5106 | !-- emissivity of wall-, green- and window fraction |
---|
5107 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,building_type) |
---|
5108 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,building_type) |
---|
5109 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,building_type) |
---|
5110 | |
---|
5111 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,building_type) |
---|
5112 | |
---|
5113 | surf_usm_h%z0(m) = building_pars(ind_z0,building_type) |
---|
5114 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
5115 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
5116 | ! |
---|
5117 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
5118 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,building_type) ) |
---|
5119 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,building_type) ) |
---|
5120 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,building_type) ) |
---|
5121 | |
---|
5122 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
5123 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
5124 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
5125 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
5126 | |
---|
5127 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
5128 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
5129 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
5130 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
5131 | |
---|
5132 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,building_type) |
---|
5133 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,building_type) |
---|
5134 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,building_type) |
---|
5135 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,building_type) |
---|
5136 | |
---|
5137 | surf_usm_h%c_surface(m) = building_pars(0,building_type) |
---|
5138 | surf_usm_h%lambda_surf(m) = building_pars(3,building_type) |
---|
5139 | surf_usm_h%c_surface_green(m) = building_pars(2,building_type) |
---|
5140 | surf_usm_h%lambda_surf_green(m) = building_pars(5,building_type) |
---|
5141 | surf_usm_h%c_surface_window(m) = building_pars(1,building_type) |
---|
5142 | surf_usm_h%lambda_surf_window(m) = building_pars(4,building_type) |
---|
5143 | |
---|
5144 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,building_type) |
---|
5145 | |
---|
5146 | ENDDO |
---|
5147 | |
---|
5148 | DO l = 0, 3 |
---|
5149 | DO m = 1, surf_usm_v(l)%ns |
---|
5150 | |
---|
5151 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for root surface |
---|
5152 | ! |
---|
5153 | !-- In order to distinguish between ground floor level and |
---|
5154 | !-- above-ground-floor level surfaces, set input indices. |
---|
5155 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
5156 | surf_usm_v(l)%ground_level(m) ) |
---|
5157 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
5158 | surf_usm_v(l)%ground_level(m) ) |
---|
5159 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
5160 | surf_usm_v(l)%ground_level(m) ) |
---|
5161 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
5162 | surf_usm_v(l)%ground_level(m) ) |
---|
5163 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
5164 | surf_usm_v(l)%ground_level(m) ) |
---|
5165 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
5166 | surf_usm_v(l)%ground_level(m) ) |
---|
5167 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5168 | surf_usm_v(l)%ground_level(m) ) |
---|
5169 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5170 | surf_usm_v(l)%ground_level(m) ) |
---|
5171 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
5172 | surf_usm_v(l)%ground_level(m) ) |
---|
5173 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
5174 | surf_usm_v(l)%ground_level(m) ) |
---|
5175 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
5176 | surf_usm_v(l)%ground_level(m) ) |
---|
5177 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
5178 | surf_usm_v(l)%ground_level(m) ) |
---|
5179 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
5180 | surf_usm_v(l)%ground_level(m) ) |
---|
5181 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
5182 | surf_usm_v(l)%ground_level(m) ) |
---|
5183 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
5184 | surf_usm_v(l)%ground_level(m) ) |
---|
5185 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
5186 | surf_usm_v(l)%ground_level(m) ) |
---|
5187 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
5188 | surf_usm_v(l)%ground_level(m) ) |
---|
5189 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
5190 | surf_usm_v(l)%ground_level(m) ) |
---|
5191 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
5192 | surf_usm_v(l)%ground_level(m) ) |
---|
5193 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
5194 | surf_usm_v(l)%ground_level(m) ) |
---|
5195 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
5196 | surf_usm_v(l)%ground_level(m) ) |
---|
5197 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
5198 | surf_usm_v(l)%ground_level(m) ) |
---|
5199 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
5200 | surf_usm_v(l)%ground_level(m) ) |
---|
5201 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
5202 | surf_usm_v(l)%ground_level(m) ) |
---|
5203 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
5204 | surf_usm_v(l)%ground_level(m) ) |
---|
5205 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
5206 | surf_usm_v(l)%ground_level(m) ) |
---|
5207 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
5208 | surf_usm_v(l)%ground_level(m) ) |
---|
5209 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
5210 | surf_usm_v(l)%ground_level(m) ) |
---|
5211 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
5212 | surf_usm_v(l)%ground_level(m) ) |
---|
5213 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
5214 | surf_usm_v(l)%ground_level(m) ) |
---|
5215 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
5216 | surf_usm_v(l)%ground_level(m) ) |
---|
5217 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
5218 | surf_usm_v(l)%ground_level(m) ) |
---|
5219 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
5220 | surf_usm_v(l)%ground_level(m) ) |
---|
5221 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5222 | surf_usm_v(l)%ground_level(m) ) |
---|
5223 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5224 | surf_usm_v(l)%ground_level(m) ) |
---|
5225 | ! |
---|
5226 | !-- Store building type and its name on each surface element |
---|
5227 | surf_usm_v(l)%building_type(m) = building_type |
---|
5228 | surf_usm_v(l)%building_type_name(m) = building_type_name(building_type) |
---|
5229 | ! |
---|
5230 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5231 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,building_type) |
---|
5232 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,building_type) |
---|
5233 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,building_type) |
---|
5234 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,building_type) |
---|
5235 | |
---|
5236 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
5237 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
5238 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
5239 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
5240 | |
---|
5241 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
5242 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
5243 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,building_type) |
---|
5244 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,building_type) |
---|
5245 | |
---|
5246 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,building_type) |
---|
5247 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,building_type) |
---|
5248 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,building_type) |
---|
5249 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,building_type) |
---|
5250 | |
---|
5251 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
5252 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
5253 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
5254 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
5255 | |
---|
5256 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
5257 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
5258 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,building_type) |
---|
5259 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,building_type) |
---|
5260 | |
---|
5261 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,building_type) |
---|
5262 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,building_type) |
---|
5263 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,building_type) |
---|
5264 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,building_type) |
---|
5265 | |
---|
5266 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,building_type) |
---|
5267 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,building_type) |
---|
5268 | ! |
---|
5269 | !-- emissivity of wall-, green- and window fraction |
---|
5270 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,building_type) |
---|
5271 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,building_type) |
---|
5272 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,building_type) |
---|
5273 | |
---|
5274 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,building_type) |
---|
5275 | |
---|
5276 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,building_type) |
---|
5277 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
5278 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
5279 | |
---|
5280 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,building_type) ) |
---|
5281 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,building_type) ) |
---|
5282 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,building_type) ) |
---|
5283 | |
---|
5284 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
5285 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
5286 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
5287 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
5288 | |
---|
5289 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
5290 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
5291 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
5292 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
5293 | |
---|
5294 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,building_type) |
---|
5295 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,building_type) |
---|
5296 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,building_type) |
---|
5297 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,building_type) |
---|
5298 | |
---|
5299 | surf_usm_v(l)%c_surface(m) = building_pars(0,building_type) |
---|
5300 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,building_type) |
---|
5301 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,building_type) |
---|
5302 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,building_type) |
---|
5303 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,building_type) |
---|
5304 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,building_type) |
---|
5305 | |
---|
5306 | ENDDO |
---|
5307 | ENDDO |
---|
5308 | ! |
---|
5309 | !-- Level 2 - initialization via building type read from file |
---|
5310 | IF ( building_type_f%from_file ) THEN |
---|
5311 | DO m = 1, surf_usm_h%ns |
---|
5312 | i = surf_usm_h%i(m) |
---|
5313 | j = surf_usm_h%j(m) |
---|
5314 | ! |
---|
5315 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
5316 | st = building_type_f%var(j,i) |
---|
5317 | IF ( st /= building_type_f%fill ) THEN |
---|
5318 | |
---|
5319 | ! |
---|
5320 | !-- In order to distinguish between ground floor level and |
---|
5321 | !-- above-ground-floor level surfaces, set input indices. |
---|
5322 | |
---|
5323 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5324 | surf_usm_h%ground_level(m) ) |
---|
5325 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5326 | surf_usm_h%ground_level(m) ) |
---|
5327 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5328 | surf_usm_h%ground_level(m) ) |
---|
5329 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5330 | surf_usm_h%ground_level(m) ) |
---|
5331 | ! |
---|
5332 | !-- Store building type and its name on each surface element |
---|
5333 | surf_usm_h%building_type(m) = st |
---|
5334 | surf_usm_h%building_type_name(m) = building_type_name(st) |
---|
5335 | ! |
---|
5336 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5337 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,st) |
---|
5338 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,st) |
---|
5339 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,st) |
---|
5340 | surf_usm_h%lai(m) = building_pars(ind_lai_r,st) |
---|
5341 | |
---|
5342 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,st) |
---|
5343 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,st) |
---|
5344 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,st) |
---|
5345 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,st) |
---|
5346 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,st) |
---|
5347 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,st) |
---|
5348 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,st) |
---|
5349 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,st) |
---|
5350 | |
---|
5351 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
5352 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
5353 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,st) |
---|
5354 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,st) |
---|
5355 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
5356 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
5357 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,st) |
---|
5358 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,st) |
---|
5359 | |
---|
5360 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,st) |
---|
5361 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,st) |
---|
5362 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,st) |
---|
5363 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,st) |
---|
5364 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,st) |
---|
5365 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,st) |
---|
5366 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,st) |
---|
5367 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,st) |
---|
5368 | |
---|
5369 | surf_usm_h%target_temp_summer(m) = building_pars(117,st) |
---|
5370 | surf_usm_h%target_temp_winter(m) = building_pars(118,st) |
---|
5371 | ! |
---|
5372 | !-- emissivity of wall-, green- and window fraction |
---|
5373 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,st) |
---|
5374 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,st) |
---|
5375 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,st) |
---|
5376 | |
---|
5377 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,st) |
---|
5378 | |
---|
5379 | surf_usm_h%z0(m) = building_pars(ind_z0,st) |
---|
5380 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,st) |
---|
5381 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,st) |
---|
5382 | ! |
---|
5383 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
5384 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,st) ) |
---|
5385 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,st) ) |
---|
5386 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,st) ) |
---|
5387 | |
---|
5388 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
5389 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
5390 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
5391 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
5392 | |
---|
5393 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
5394 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
5395 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
5396 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
5397 | |
---|
5398 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,st) |
---|
5399 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,st) |
---|
5400 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,st) |
---|
5401 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,st) |
---|
5402 | |
---|
5403 | surf_usm_h%c_surface(m) = building_pars(0,st) |
---|
5404 | surf_usm_h%lambda_surf(m) = building_pars(3,st) |
---|
5405 | surf_usm_h%c_surface_green(m) = building_pars(2,st) |
---|
5406 | surf_usm_h%lambda_surf_green(m) = building_pars(5,st) |
---|
5407 | surf_usm_h%c_surface_window(m) = building_pars(1,st) |
---|
5408 | surf_usm_h%lambda_surf_window(m) = building_pars(4,st) |
---|
5409 | |
---|
5410 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,st) |
---|
5411 | |
---|
5412 | ENDIF |
---|
5413 | ENDDO |
---|
5414 | |
---|
5415 | DO l = 0, 3 |
---|
5416 | DO m = 1, surf_usm_v(l)%ns |
---|
5417 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
5418 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
5419 | ! |
---|
5420 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
5421 | |
---|
5422 | st = building_type_f%var(j,i) |
---|
5423 | IF ( st /= building_type_f%fill ) THEN |
---|
5424 | |
---|
5425 | ! |
---|
5426 | !-- In order to distinguish between ground floor level and |
---|
5427 | !-- above-ground-floor level surfaces, set input indices. |
---|
5428 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
5429 | surf_usm_v(l)%ground_level(m) ) |
---|
5430 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
5431 | surf_usm_v(l)%ground_level(m) ) |
---|
5432 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
5433 | surf_usm_v(l)%ground_level(m) ) |
---|
5434 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
5435 | surf_usm_v(l)%ground_level(m) ) |
---|
5436 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
5437 | surf_usm_v(l)%ground_level(m) ) |
---|
5438 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
5439 | surf_usm_v(l)%ground_level(m) ) |
---|
5440 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5441 | surf_usm_v(l)%ground_level(m) ) |
---|
5442 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5443 | surf_usm_v(l)%ground_level(m) ) |
---|
5444 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
5445 | surf_usm_v(l)%ground_level(m) ) |
---|
5446 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
5447 | surf_usm_v(l)%ground_level(m) ) |
---|
5448 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
5449 | surf_usm_v(l)%ground_level(m) ) |
---|
5450 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
5451 | surf_usm_v(l)%ground_level(m) ) |
---|
5452 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
5453 | surf_usm_v(l)%ground_level(m) ) |
---|
5454 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
5455 | surf_usm_v(l)%ground_level(m) ) |
---|
5456 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
5457 | surf_usm_v(l)%ground_level(m) ) |
---|
5458 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
5459 | surf_usm_v(l)%ground_level(m) ) |
---|
5460 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
5461 | surf_usm_v(l)%ground_level(m) ) |
---|
5462 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
5463 | surf_usm_v(l)%ground_level(m) ) |
---|
5464 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
5465 | surf_usm_v(l)%ground_level(m) ) |
---|
5466 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
5467 | surf_usm_v(l)%ground_level(m) ) |
---|
5468 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
5469 | surf_usm_v(l)%ground_level(m) ) |
---|
5470 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
5471 | surf_usm_v(l)%ground_level(m) ) |
---|
5472 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
5473 | surf_usm_v(l)%ground_level(m) ) |
---|
5474 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
5475 | surf_usm_v(l)%ground_level(m) ) |
---|
5476 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
5477 | surf_usm_v(l)%ground_level(m) ) |
---|
5478 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
5479 | surf_usm_v(l)%ground_level(m) ) |
---|
5480 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
5481 | surf_usm_v(l)%ground_level(m) ) |
---|
5482 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
5483 | surf_usm_v(l)%ground_level(m) ) |
---|
5484 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
5485 | surf_usm_v(l)%ground_level(m) ) |
---|
5486 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
5487 | surf_usm_v(l)%ground_level(m) ) |
---|
5488 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
5489 | surf_usm_v(l)%ground_level(m) ) |
---|
5490 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
5491 | surf_usm_v(l)%ground_level(m) ) |
---|
5492 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
5493 | surf_usm_v(l)%ground_level(m) ) |
---|
5494 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5495 | surf_usm_v(l)%ground_level(m) ) |
---|
5496 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5497 | surf_usm_v(l)%ground_level(m) ) |
---|
5498 | ! |
---|
5499 | !-- Store building type and its name on each surface element |
---|
5500 | surf_usm_v(l)%building_type(m) = st |
---|
5501 | surf_usm_v(l)%building_type_name(m) = building_type_name(st) |
---|
5502 | ! |
---|
5503 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5504 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,st) |
---|
5505 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,st) |
---|
5506 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,st) |
---|
5507 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,st) |
---|
5508 | |
---|
5509 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
5510 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
5511 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
5512 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
5513 | |
---|
5514 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
5515 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
5516 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,st) |
---|
5517 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,st) |
---|
5518 | |
---|
5519 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,st) |
---|
5520 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,st) |
---|
5521 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,st) |
---|
5522 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,st) |
---|
5523 | |
---|
5524 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
5525 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
5526 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
5527 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
5528 | |
---|
5529 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
5530 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
5531 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,st) |
---|
5532 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,st) |
---|
5533 | |
---|
5534 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,st) |
---|
5535 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,st) |
---|
5536 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,st) |
---|
5537 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,st) |
---|
5538 | |
---|
5539 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,st) |
---|
5540 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,st) |
---|
5541 | ! |
---|
5542 | !-- emissivity of wall-, green- and window fraction |
---|
5543 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,st) |
---|
5544 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,st) |
---|
5545 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,st) |
---|
5546 | |
---|
5547 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,st) |
---|
5548 | |
---|
5549 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,st) |
---|
5550 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,st) |
---|
5551 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,st) |
---|
5552 | |
---|
5553 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,st) ) |
---|
5554 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,st) ) |
---|
5555 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,st) ) |
---|
5556 | |
---|
5557 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
5558 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
5559 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
5560 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
5561 | |
---|
5562 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
5563 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
5564 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
5565 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
5566 | |
---|
5567 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,st) |
---|
5568 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,st) |
---|
5569 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,st) |
---|
5570 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,st) |
---|
5571 | |
---|
5572 | surf_usm_v(l)%c_surface(m) = building_pars(0,st) |
---|
5573 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,st) |
---|
5574 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,st) |
---|
5575 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,st) |
---|
5576 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,st) |
---|
5577 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,st) |
---|
5578 | |
---|
5579 | |
---|
5580 | ENDIF |
---|
5581 | ENDDO |
---|
5582 | ENDDO |
---|
5583 | ENDIF |
---|
5584 | |
---|
5585 | ! |
---|
5586 | !-- Level 3 - initialization via building_pars read from file |
---|
5587 | IF ( building_pars_f%from_file ) THEN |
---|
5588 | DO m = 1, surf_usm_h%ns |
---|
5589 | i = surf_usm_h%i(m) |
---|
5590 | j = surf_usm_h%j(m) |
---|
5591 | |
---|
5592 | ! |
---|
5593 | !-- In order to distinguish between ground floor level and |
---|
5594 | !-- above-ground-floor level surfaces, set input indices. |
---|
5595 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5596 | surf_usm_h%ground_level(m) ) |
---|
5597 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5598 | surf_usm_h%ground_level(m) ) |
---|
5599 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5600 | surf_usm_h%ground_level(m) ) |
---|
5601 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5602 | surf_usm_h%ground_level(m) ) |
---|
5603 | |
---|
5604 | ! |
---|
5605 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5606 | IF ( building_pars_f%pars_xy(ind_wall_frac_r,j,i) /= building_pars_f%fill ) & |
---|
5607 | surf_usm_h%frac(ind_veg_wall,m) = building_pars_f%pars_xy(ind_wall_frac_r,j,i) |
---|
5608 | IF ( building_pars_f%pars_xy(ind_green_frac_r,j,i) /= building_pars_f%fill ) & |
---|
5609 | surf_usm_h%frac(ind_pav_green,m) = building_pars_f%pars_xy(ind_green_frac_r,j,i) |
---|
5610 | IF ( building_pars_f%pars_xy(ind_win_frac_r,j,i) /= building_pars_f%fill ) & |
---|
5611 | surf_usm_h%frac(ind_wat_win,m) = building_pars_f%pars_xy(ind_win_frac_r,j,i) |
---|
5612 | |
---|
5613 | |
---|
5614 | IF ( building_pars_f%pars_xy(ind_lai_r,j,i) /= building_pars_f%fill ) & |
---|
5615 | surf_usm_h%lai(m) = building_pars_f%pars_xy(ind_lai_r,j,i) |
---|
5616 | |
---|
5617 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
5618 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
5619 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
5620 | ENDIF |
---|
5621 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5622 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
5623 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5624 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
5625 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
5626 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
5627 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
5628 | ENDIF |
---|
5629 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5630 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
5631 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5632 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
5633 | IF ( building_pars_f%pars_xy(ind_hc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
5634 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
5635 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
5636 | ENDIF |
---|
5637 | IF ( building_pars_f%pars_xy(ind_hc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
5638 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win_r,j,i) |
---|
5639 | IF ( building_pars_f%pars_xy(ind_hc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
5640 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win_r,j,i) |
---|
5641 | |
---|
5642 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
5643 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
5644 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
5645 | ENDIF |
---|
5646 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5647 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_wall_r,j,i) |
---|
5648 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5649 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_wall_r,j,i) |
---|
5650 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
5651 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
5652 | 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) |
---|
5653 | ENDIF |
---|
5654 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5655 | 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) |
---|
5656 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5657 | 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) |
---|
5658 | IF ( building_pars_f%pars_xy(ind_tc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
5659 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
5660 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
5661 | ENDIF |
---|
5662 | IF ( building_pars_f%pars_xy(ind_tc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
5663 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win_r,j,i) |
---|
5664 | IF ( building_pars_f%pars_xy(ind_tc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
5665 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win_r,j,i) |
---|
5666 | |
---|
5667 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
5668 | surf_usm_h%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
5669 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
5670 | surf_usm_h%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
5671 | |
---|
5672 | IF ( building_pars_f%pars_xy(ind_emis_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5673 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall_r,j,i) |
---|
5674 | IF ( building_pars_f%pars_xy(ind_emis_green_r,j,i) /= building_pars_f%fill )& |
---|
5675 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green_r,j,i) |
---|
5676 | IF ( building_pars_f%pars_xy(ind_emis_win_r,j,i) /= building_pars_f%fill ) & |
---|
5677 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win_r,j,i) |
---|
5678 | |
---|
5679 | IF ( building_pars_f%pars_xy(ind_trans_r,j,i) /= building_pars_f%fill ) & |
---|
5680 | surf_usm_h%transmissivity(m) = building_pars_f%pars_xy(ind_trans_r,j,i) |
---|
5681 | |
---|
5682 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
5683 | surf_usm_h%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
5684 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5685 | surf_usm_h%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5686 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5687 | surf_usm_h%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5688 | |
---|
5689 | IF ( building_pars_f%pars_xy(ind_alb_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5690 | surf_usm_h%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall_r,j,i) |
---|
5691 | IF ( building_pars_f%pars_xy(ind_alb_green_r,j,i) /= building_pars_f%fill ) & |
---|
5692 | surf_usm_h%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green_r,j,i) |
---|
5693 | IF ( building_pars_f%pars_xy(ind_alb_win_r,j,i) /= building_pars_f%fill ) & |
---|
5694 | surf_usm_h%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win_r,j,i) |
---|
5695 | |
---|
5696 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5697 | surf_usm_h%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
5698 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5699 | surf_usm_h%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
5700 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5701 | surf_usm_h%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
5702 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5703 | surf_usm_h%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
5704 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5705 | surf_usm_h%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
5706 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5707 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
5708 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5709 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
5710 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5711 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
5712 | IF ( building_pars_f%pars_xy(ind_thick_1_win_r,j,i) /= building_pars_f%fill ) & |
---|
5713 | surf_usm_h%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win_r,j,i) |
---|
5714 | IF ( building_pars_f%pars_xy(ind_thick_2_win_r,j,i) /= building_pars_f%fill ) & |
---|
5715 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win_r,j,i) |
---|
5716 | IF ( building_pars_f%pars_xy(ind_thick_3_win_r,j,i) /= building_pars_f%fill ) & |
---|
5717 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win_r,j,i) |
---|
5718 | IF ( building_pars_f%pars_xy(ind_thick_4_win_r,j,i) /= building_pars_f%fill ) & |
---|
5719 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win_r,j,i) |
---|
5720 | |
---|
5721 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
5722 | surf_usm_h%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
5723 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
5724 | surf_usm_h%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
5725 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
5726 | surf_usm_h%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
5727 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
5728 | surf_usm_h%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
5729 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
5730 | surf_usm_h%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
5731 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
5732 | surf_usm_h%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
5733 | |
---|
5734 | IF ( building_pars_f%pars_xy(ind_green_type_roof,j,i) /= building_pars_f%fill ) & |
---|
5735 | surf_usm_h%green_type_roof(m) = building_pars_f%pars_xy(ind_green_type_roof,j,i) |
---|
5736 | ENDDO |
---|
5737 | |
---|
5738 | |
---|
5739 | |
---|
5740 | DO l = 0, 3 |
---|
5741 | DO m = 1, surf_usm_v(l)%ns |
---|
5742 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
5743 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
5744 | |
---|
5745 | ! |
---|
5746 | !-- In order to distinguish between ground floor level and |
---|
5747 | !-- above-ground-floor level surfaces, set input indices. |
---|
5748 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
5749 | surf_usm_v(l)%ground_level(m) ) |
---|
5750 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
5751 | surf_usm_v(l)%ground_level(m) ) |
---|
5752 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
5753 | surf_usm_v(l)%ground_level(m) ) |
---|
5754 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
5755 | surf_usm_v(l)%ground_level(m) ) |
---|
5756 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
5757 | surf_usm_v(l)%ground_level(m) ) |
---|
5758 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
5759 | surf_usm_v(l)%ground_level(m) ) |
---|
5760 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5761 | surf_usm_v(l)%ground_level(m) ) |
---|
5762 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5763 | surf_usm_v(l)%ground_level(m) ) |
---|
5764 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
5765 | surf_usm_v(l)%ground_level(m) ) |
---|
5766 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
5767 | surf_usm_v(l)%ground_level(m) ) |
---|
5768 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
5769 | surf_usm_v(l)%ground_level(m) ) |
---|
5770 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
5771 | surf_usm_v(l)%ground_level(m) ) |
---|
5772 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
5773 | surf_usm_v(l)%ground_level(m) ) |
---|
5774 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
5775 | surf_usm_v(l)%ground_level(m) ) |
---|
5776 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
5777 | surf_usm_v(l)%ground_level(m) ) |
---|
5778 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
5779 | surf_usm_v(l)%ground_level(m) ) |
---|
5780 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
5781 | surf_usm_v(l)%ground_level(m) ) |
---|
5782 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
5783 | surf_usm_v(l)%ground_level(m) ) |
---|
5784 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
5785 | surf_usm_v(l)%ground_level(m) ) |
---|
5786 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
5787 | surf_usm_v(l)%ground_level(m) ) |
---|
5788 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
5789 | surf_usm_v(l)%ground_level(m) ) |
---|
5790 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
5791 | surf_usm_v(l)%ground_level(m) ) |
---|
5792 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
5793 | surf_usm_v(l)%ground_level(m) ) |
---|
5794 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
5795 | surf_usm_v(l)%ground_level(m) ) |
---|
5796 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
5797 | surf_usm_v(l)%ground_level(m) ) |
---|
5798 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
5799 | surf_usm_v(l)%ground_level(m) ) |
---|
5800 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
5801 | surf_usm_v(l)%ground_level(m) ) |
---|
5802 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
5803 | surf_usm_v(l)%ground_level(m) ) |
---|
5804 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
5805 | surf_usm_v(l)%ground_level(m) ) |
---|
5806 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
5807 | surf_usm_v(l)%ground_level(m) ) |
---|
5808 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
5809 | surf_usm_v(l)%ground_level(m) ) |
---|
5810 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
5811 | surf_usm_v(l)%ground_level(m) ) |
---|
5812 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
5813 | surf_usm_v(l)%ground_level(m) ) |
---|
5814 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5815 | surf_usm_v(l)%ground_level(m) ) |
---|
5816 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5817 | surf_usm_v(l)%ground_level(m) ) |
---|
5818 | |
---|
5819 | ! |
---|
5820 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5821 | IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= & |
---|
5822 | building_pars_f%fill ) & |
---|
5823 | surf_usm_v(l)%frac(ind_veg_wall,m) = & |
---|
5824 | building_pars_f%pars_xy(ind_wall_frac,j,i) |
---|
5825 | IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /= & |
---|
5826 | building_pars_f%fill ) & |
---|
5827 | surf_usm_v(l)%frac(ind_pav_green,m) = & |
---|
5828 | building_pars_f%pars_xy(ind_green_frac_w,j,i) |
---|
5829 | IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= & |
---|
5830 | building_pars_f%fill ) & |
---|
5831 | surf_usm_v(l)%frac(ind_wat_win,m) = & |
---|
5832 | building_pars_f%pars_xy(ind_win_frac,j,i) |
---|
5833 | |
---|
5834 | IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill ) & |
---|
5835 | surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i) |
---|
5836 | |
---|
5837 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) & |
---|
5838 | THEN |
---|
5839 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = & |
---|
5840 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
5841 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = & |
---|
5842 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
5843 | ENDIF |
---|
5844 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
5845 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = & |
---|
5846 | building_pars_f%pars_xy(ind_hc2,j,i) |
---|
5847 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
5848 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = & |
---|
5849 | building_pars_f%pars_xy(ind_hc3,j,i) |
---|
5850 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
5851 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = & |
---|
5852 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
5853 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = & |
---|
5854 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
5855 | ENDIF |
---|
5856 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
5857 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2,j,i) |
---|
5858 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
5859 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3,j,i) |
---|
5860 | IF ( building_pars_f%pars_xy(ind_hc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
5861 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
5862 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
5863 | ENDIF |
---|
5864 | IF ( building_pars_f%pars_xy(ind_hc2_win,j,i) /= building_pars_f%fill ) & |
---|
5865 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win,j,i) |
---|
5866 | IF ( building_pars_f%pars_xy(ind_hc3_win,j,i) /= building_pars_f%fill ) & |
---|
5867 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win,j,i) |
---|
5868 | |
---|
5869 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
5870 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5871 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5872 | ENDIF |
---|
5873 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
5874 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
5875 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
5876 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
5877 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
5878 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5879 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5880 | ENDIF |
---|
5881 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
5882 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc2,j,i) |
---|
5883 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
5884 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc3,j,i) |
---|
5885 | IF ( building_pars_f%pars_xy(ind_tc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
5886 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
5887 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
5888 | ENDIF |
---|
5889 | IF ( building_pars_f%pars_xy(ind_tc2_win,j,i) /= building_pars_f%fill ) & |
---|
5890 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win,j,i) |
---|
5891 | IF ( building_pars_f%pars_xy(ind_tc3_win,j,i) /= building_pars_f%fill ) & |
---|
5892 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win,j,i) |
---|
5893 | |
---|
5894 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
5895 | surf_usm_v(l)%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
5896 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
5897 | surf_usm_v(l)%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
5898 | |
---|
5899 | IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill ) & |
---|
5900 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall,j,i) |
---|
5901 | IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )& |
---|
5902 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green,j,i) |
---|
5903 | IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill ) & |
---|
5904 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win,j,i) |
---|
5905 | |
---|
5906 | IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill ) & |
---|
5907 | surf_usm_v(l)%transmissivity(m) = building_pars_f%pars_xy(ind_trans,j,i) |
---|
5908 | |
---|
5909 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
5910 | surf_usm_v(l)%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
5911 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5912 | surf_usm_v(l)%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5913 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5914 | surf_usm_v(l)%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5915 | |
---|
5916 | IF ( building_pars_f%pars_xy(ind_alb_wall,j,i) /= building_pars_f%fill ) & |
---|
5917 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall,j,i) |
---|
5918 | IF ( building_pars_f%pars_xy(ind_alb_green,j,i) /= building_pars_f%fill ) & |
---|
5919 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green,j,i) |
---|
5920 | IF ( building_pars_f%pars_xy(ind_alb_win,j,i) /= building_pars_f%fill ) & |
---|
5921 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win,j,i) |
---|
5922 | |
---|
5923 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5924 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5925 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5926 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5927 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5928 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5929 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5930 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5931 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5932 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5933 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5934 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5935 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5936 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5937 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5938 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5939 | IF ( building_pars_f%pars_xy(ind_thick_1_win,j,i) /= building_pars_f%fill ) & |
---|
5940 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win,j,i) |
---|
5941 | IF ( building_pars_f%pars_xy(ind_thick_2_win,j,i) /= building_pars_f%fill ) & |
---|
5942 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win,j,i) |
---|
5943 | IF ( building_pars_f%pars_xy(ind_thick_3_win,j,i) /= building_pars_f%fill ) & |
---|
5944 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win,j,i) |
---|
5945 | IF ( building_pars_f%pars_xy(ind_thick_4_win,j,i) /= building_pars_f%fill ) & |
---|
5946 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win,j,i) |
---|
5947 | |
---|
5948 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
5949 | surf_usm_v(l)%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
5950 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
5951 | surf_usm_v(l)%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
5952 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
5953 | surf_usm_v(l)%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
5954 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
5955 | surf_usm_v(l)%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
5956 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
5957 | surf_usm_v(l)%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
5958 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
5959 | surf_usm_v(l)%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
5960 | |
---|
5961 | ENDDO |
---|
5962 | ENDDO |
---|
5963 | ENDIF |
---|
5964 | ! |
---|
5965 | !-- Read the surface_types array. |
---|
5966 | !-- Please note, here also initialization of surface attributes is done as |
---|
5967 | !-- long as _urbsurf and _surfpar files are available. Values from above |
---|
5968 | !-- will be overwritten. This might be removed later, but is still in the |
---|
5969 | !-- code to enable compatibility with older model version. |
---|
5970 | CALL usm_read_urban_surface_types() |
---|
5971 | |
---|
5972 | !-- init material heat model |
---|
5973 | CALL usm_init_material_model() |
---|
5974 | |
---|
5975 | !-- init anthropogenic sources of heat |
---|
5976 | IF ( usm_anthropogenic_heat ) THEN |
---|
5977 | !-- init anthropogenic sources of heat (from transportation for now) |
---|
5978 | CALL usm_read_anthropogenic_heat() |
---|
5979 | ENDIF |
---|
5980 | |
---|
5981 | ! |
---|
5982 | !-- Check for consistent initialization. |
---|
5983 | !-- Check if roughness length for momentum, or heat, exceed surface-layer |
---|
5984 | !-- height and decrease local roughness length where necessary. |
---|
5985 | DO m = 1, surf_usm_h%ns |
---|
5986 | IF ( surf_usm_h%z0(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5987 | |
---|
5988 | surf_usm_h%z0(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5989 | |
---|
5990 | WRITE( message_string, * ) 'z0 exceeds surface-layer height ' // & |
---|
5991 | 'at horizontal urban surface and is ' // & |
---|
5992 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5993 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
5994 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
5995 | 0, 0, 0, 6, 0 ) |
---|
5996 | ENDIF |
---|
5997 | IF ( surf_usm_h%z0h(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5998 | |
---|
5999 | surf_usm_h%z0h(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
6000 | surf_usm_h%z0q(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
6001 | |
---|
6002 | WRITE( message_string, * ) 'z0h exceeds surface-layer height ' // & |
---|
6003 | 'at horizontal urban surface and is ' // & |
---|
6004 | 'decreased appropriately at grid point (i,j) = ', & |
---|
6005 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
6006 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
6007 | 0, 0, 0, 6, 0 ) |
---|
6008 | ENDIF |
---|
6009 | ENDDO |
---|
6010 | |
---|
6011 | DO l = 0, 3 |
---|
6012 | DO m = 1, surf_usm_v(l)%ns |
---|
6013 | IF ( surf_usm_v(l)%z0(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
6014 | |
---|
6015 | surf_usm_v(l)%z0(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
6016 | |
---|
6017 | WRITE( message_string, * ) 'z0 exceeds surface-layer height '//& |
---|
6018 | 'at vertical urban surface and is ' // & |
---|
6019 | 'decreased appropriately at grid point (i,j) = ', & |
---|
6020 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
6021 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
6022 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
6023 | 0, 0, 0, 6, 0 ) |
---|
6024 | ENDIF |
---|
6025 | IF ( surf_usm_v(l)%z0h(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
6026 | |
---|
6027 | surf_usm_v(l)%z0h(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
6028 | surf_usm_v(l)%z0q(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
6029 | |
---|
6030 | WRITE( message_string, * ) 'z0h exceeds surface-layer height '//& |
---|
6031 | 'at vertical urban surface and is ' // & |
---|
6032 | 'decreased appropriately at grid point (i,j) = ', & |
---|
6033 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
6034 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
6035 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
6036 | 0, 0, 0, 6, 0 ) |
---|
6037 | ENDIF |
---|
6038 | ENDDO |
---|
6039 | ENDDO |
---|
6040 | |
---|
6041 | !-- Intitialization of the surface and wall/ground/roof temperature |
---|
6042 | |
---|
6043 | !-- Initialization for restart runs |
---|
6044 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. & |
---|
6045 | TRIM( initializing_actions ) /= 'cyclic_fill' ) THEN |
---|
6046 | |
---|
6047 | ! |
---|
6048 | !-- At horizontal surfaces. Please note, t_surf_wall_h is defined on a |
---|
6049 | !-- different data type, but with the same dimension. |
---|
6050 | #if ! defined( __nopointer ) |
---|
6051 | DO m = 1, surf_usm_h%ns |
---|
6052 | i = surf_usm_h%i(m) |
---|
6053 | j = surf_usm_h%j(m) |
---|
6054 | k = surf_usm_h%k(m) |
---|
6055 | |
---|
6056 | t_surf_wall_h(m) = pt(k,j,i) * exner(k) |
---|
6057 | t_surf_window_h(m) = pt(k,j,i) * exner(k) |
---|
6058 | t_surf_green_h(m) = pt(k,j,i) * exner(k) |
---|
6059 | surf_usm_h%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
6060 | ENDDO |
---|
6061 | ! |
---|
6062 | !-- At vertical surfaces. |
---|
6063 | DO l = 0, 3 |
---|
6064 | DO m = 1, surf_usm_v(l)%ns |
---|
6065 | i = surf_usm_v(l)%i(m) |
---|
6066 | j = surf_usm_v(l)%j(m) |
---|
6067 | k = surf_usm_v(l)%k(m) |
---|
6068 | |
---|
6069 | t_surf_wall_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
6070 | t_surf_window_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
6071 | t_surf_green_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
6072 | surf_usm_v(l)%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
6073 | ENDDO |
---|
6074 | ENDDO |
---|
6075 | #endif |
---|
6076 | ! |
---|
6077 | !-- For the sake of correct initialization, set also q_surface. |
---|
6078 | !-- Note, at urban surfaces q_surface is initialized with 0. |
---|
6079 | IF ( humidity ) THEN |
---|
6080 | DO m = 1, surf_usm_h%ns |
---|
6081 | surf_usm_h%q_surface(m) = 0.0_wp |
---|
6082 | ENDDO |
---|
6083 | DO l = 0, 3 |
---|
6084 | DO m = 1, surf_usm_v(l)%ns |
---|
6085 | surf_usm_v(l)%q_surface(m) = 0.0_wp |
---|
6086 | ENDDO |
---|
6087 | ENDDO |
---|
6088 | ENDIF |
---|
6089 | |
---|
6090 | !-- initial values for t_wall |
---|
6091 | !-- outer value is set to surface temperature |
---|
6092 | !-- inner value is set to wall_inner_temperature |
---|
6093 | !-- and profile is logaritmic (linear in nz). |
---|
6094 | !-- Horizontal surfaces |
---|
6095 | DO m = 1, surf_usm_h%ns |
---|
6096 | ! |
---|
6097 | !-- Roof |
---|
6098 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
6099 | tin = roof_inner_temperature |
---|
6100 | twin = window_inner_temperature |
---|
6101 | ! |
---|
6102 | !-- Normal land surface |
---|
6103 | ELSE |
---|
6104 | tin = soil_inner_temperature |
---|
6105 | twin = window_inner_temperature |
---|
6106 | ENDIF |
---|
6107 | |
---|
6108 | DO k = nzb_wall, nzt_wall+1 |
---|
6109 | c = REAL( k - nzb_wall, wp ) / & |
---|
6110 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
6111 | |
---|
6112 | t_wall_h(k,m) = ( 1.0_wp - c ) * t_surf_wall_h(m) + c * tin |
---|
6113 | t_window_h(k,m) = ( 1.0_wp - c ) * t_surf_window_h(m) + c * twin |
---|
6114 | t_green_h(k,m) = t_surf_wall_h(m) |
---|
6115 | swc_h(k,m) = 0.5_wp |
---|
6116 | swc_sat_h(k,m) = 0.95_wp |
---|
6117 | swc_res_h(k,m) = 0.05_wp |
---|
6118 | rootfr_h(k,m) = 0.1_wp |
---|
6119 | wilt_h(k,m) = 0.1_wp |
---|
6120 | fc_h(k,m) = 0.9_wp |
---|
6121 | ENDDO |
---|
6122 | ENDDO |
---|
6123 | ! |
---|
6124 | !-- Vertical surfaces |
---|
6125 | DO l = 0, 3 |
---|
6126 | DO m = 1, surf_usm_v(l)%ns |
---|
6127 | ! |
---|
6128 | !-- Inner wall |
---|
6129 | tin = wall_inner_temperature |
---|
6130 | twin = window_inner_temperature |
---|
6131 | |
---|
6132 | DO k = nzb_wall, nzt_wall+1 |
---|
6133 | c = REAL( k - nzb_wall, wp ) / & |
---|
6134 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
6135 | t_wall_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_wall_v(l)%t(m) + c * tin |
---|
6136 | t_window_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_window_v(l)%t(m) + c * twin |
---|
6137 | t_green_v(l)%t(k,m) = t_surf_wall_v(l)%t(m) |
---|
6138 | swc_v(l)%t(k,m) = 0.5_wp |
---|
6139 | ENDDO |
---|
6140 | ENDDO |
---|
6141 | ENDDO |
---|
6142 | ENDIF |
---|
6143 | |
---|
6144 | !-- If specified, replace constant wall temperatures with fully 3D values from file |
---|
6145 | IF ( read_wall_temp_3d ) CALL usm_read_wall_temperature() |
---|
6146 | |
---|
6147 | !-- |
---|
6148 | !-- Possibly DO user-defined actions (e.g. define heterogeneous wall surface) |
---|
6149 | CALL user_init_urban_surface |
---|
6150 | |
---|
6151 | !-- initialize prognostic values for the first timestep |
---|
6152 | t_surf_wall_h_p = t_surf_wall_h |
---|
6153 | t_surf_wall_v_p = t_surf_wall_v |
---|
6154 | t_surf_window_h_p = t_surf_window_h |
---|
6155 | t_surf_window_v_p = t_surf_window_v |
---|
6156 | t_surf_green_h_p = t_surf_green_h |
---|
6157 | t_surf_green_v_p = t_surf_green_v |
---|
6158 | t_surf_10cm_h_p = t_surf_10cm_h |
---|
6159 | t_surf_10cm_v_p = t_surf_10cm_v |
---|
6160 | |
---|
6161 | t_wall_h_p = t_wall_h |
---|
6162 | t_wall_v_p = t_wall_v |
---|
6163 | t_window_h_p = t_window_h |
---|
6164 | t_window_v_p = t_window_v |
---|
6165 | t_green_h_p = t_green_h |
---|
6166 | t_green_v_p = t_green_v |
---|
6167 | |
---|
6168 | !-- Adjust radiative fluxes for urban surface at model start |
---|
6169 | !CALL radiation_interaction |
---|
6170 | !-- TODO: interaction should be called once before first output, |
---|
6171 | !-- that is not yet possible. |
---|
6172 | |
---|
6173 | m_liq_usm_h_p = m_liq_usm_h |
---|
6174 | m_liq_usm_v_p = m_liq_usm_v |
---|
6175 | !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
6176 | ! |
---|
6177 | !-- Set initial values for prognostic quantities |
---|
6178 | !-- Horizontal surfaces |
---|
6179 | tm_liq_usm_h_m%var_usm_1d = 0.0_wp |
---|
6180 | surf_usm_h%c_liq = 0.0_wp |
---|
6181 | |
---|
6182 | surf_usm_h%qsws_liq_eb = 0.0_wp |
---|
6183 | surf_usm_h%qsws_veg_eb = 0.0_wp |
---|
6184 | |
---|
6185 | ! |
---|
6186 | !-- Do the same for vertical surfaces |
---|
6187 | DO l = 0, 3 |
---|
6188 | tm_liq_usm_v_m(l)%var_usm_1d = 0.0_wp |
---|
6189 | surf_usm_v(l)%c_liq = 0.0_wp |
---|
6190 | |
---|
6191 | surf_usm_v(l)%qsws_liq_eb = 0.0_wp |
---|
6192 | surf_usm_v(l)%qsws_veg_eb = 0.0_wp |
---|
6193 | ENDDO |
---|
6194 | |
---|
6195 | ! |
---|
6196 | !-- Set initial values for prognostic soil quantities |
---|
6197 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN |
---|
6198 | m_liq_usm_h%var_usm_1d = 0.0_wp |
---|
6199 | |
---|
6200 | DO l = 0, 3 |
---|
6201 | m_liq_usm_v(l)%var_usm_1d = 0.0_wp |
---|
6202 | ENDDO |
---|
6203 | ENDIF |
---|
6204 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
6205 | |
---|
6206 | CALL cpu_log( log_point_s(78), 'usm_init', 'stop' ) |
---|
6207 | |
---|
6208 | END SUBROUTINE usm_init_urban_surface |
---|
6209 | |
---|
6210 | |
---|
6211 | !------------------------------------------------------------------------------! |
---|
6212 | ! Description: |
---|
6213 | ! ------------ |
---|
6214 | ! |
---|
6215 | !> Wall model as part of the urban surface model. The model predicts wall |
---|
6216 | !> temperature. |
---|
6217 | !------------------------------------------------------------------------------! |
---|
6218 | SUBROUTINE usm_material_heat_model( spinup ) |
---|
6219 | |
---|
6220 | |
---|
6221 | IMPLICIT NONE |
---|
6222 | |
---|
6223 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
6224 | |
---|
6225 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wtend, wintend !< tendency |
---|
6226 | REAL(wp) :: win_absorp !absorption coefficient from transmissivity |
---|
6227 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wall_mod |
---|
6228 | |
---|
6229 | LOGICAL :: spinup !if true, no calculation of window temperatures |
---|
6230 | |
---|
6231 | wall_mod=1.0_wp |
---|
6232 | if (usm_wall_mod .AND. spinup) then |
---|
6233 | do kw=nzb_wall,nzb_wall+1 |
---|
6234 | wall_mod(kw)=0.1_wp |
---|
6235 | enddo |
---|
6236 | endif |
---|
6237 | |
---|
6238 | ! |
---|
6239 | !-- For horizontal surfaces |
---|
6240 | DO m = 1, surf_usm_h%ns |
---|
6241 | ! |
---|
6242 | !-- Obtain indices |
---|
6243 | i = surf_usm_h%i(m) |
---|
6244 | j = surf_usm_h%j(m) |
---|
6245 | k = surf_usm_h%k(m) |
---|
6246 | ! |
---|
6247 | !-- prognostic equation for ground/roof temperature t_wall_h |
---|
6248 | wtend(:) = 0.0_wp |
---|
6249 | wtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzb_wall,m)) * & |
---|
6250 | ( surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
6251 | ( t_wall_h(nzb_wall+1,m) & |
---|
6252 | - t_wall_h(nzb_wall,m) ) * & |
---|
6253 | surf_usm_h%ddz_wall(nzb_wall+1,m) & |
---|
6254 | + surf_usm_h%frac(ind_veg_wall,m) & |
---|
6255 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
6256 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
6257 | * surf_usm_h%wghf_eb(m) & |
---|
6258 | - surf_usm_h%frac(ind_pav_green,m) & |
---|
6259 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
6260 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
6261 | * ( surf_usm_h%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
6262 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
6263 | + surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) & |
---|
6264 | * surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
6265 | / ( surf_usm_h%ddz_green(nzt_wall,m) & |
---|
6266 | + surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
6267 | * ( t_wall_h(nzb_wall,m) & |
---|
6268 | - t_green_h(nzt_wall,m) ) ) * & |
---|
6269 | surf_usm_h%ddz_wall_stag(nzb_wall,m) |
---|
6270 | |
---|
6271 | IF ( indoor_model ) then |
---|
6272 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
6273 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
6274 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
6275 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
6276 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
6277 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
6278 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
6279 | * surf_usm_h%ddz_wall(kw,m) & |
---|
6280 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
6281 | ENDDO |
---|
6282 | wtend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzt_wall,m)) * & |
---|
6283 | ( -surf_usm_h%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1) * & |
---|
6284 | ( t_wall_h(nzt_wall,m) & |
---|
6285 | - t_wall_h(nzt_wall-1,m) ) * & |
---|
6286 | surf_usm_h%ddz_wall(nzt_wall,m) & |
---|
6287 | + surf_usm_h%iwghf_eb(m) ) * & |
---|
6288 | surf_usm_h%ddz_wall_stag(nzt_wall,m) |
---|
6289 | ELSE |
---|
6290 | DO kw = nzb_wall+1, nzt_wall |
---|
6291 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
6292 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
6293 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
6294 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
6295 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
6296 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
6297 | * surf_usm_h%ddz_wall(kw,m) & |
---|
6298 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
6299 | ENDDO |
---|
6300 | ENDIF |
---|
6301 | |
---|
6302 | t_wall_h_p(nzb_wall:nzt_wall,m) = t_wall_h(nzb_wall:nzt_wall,m) & |
---|
6303 | + dt_3d * ( tsc(2) & |
---|
6304 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6305 | * surf_usm_h%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
6306 | |
---|
6307 | if (.NOT. spinup) then |
---|
6308 | win_absorp = -log(surf_usm_h%transmissivity(m)) / surf_usm_h%zw_window(nzt_wall,m) |
---|
6309 | !-- prognostic equation for ground/roof window temperature t_window_h |
---|
6310 | wintend(:) = 0.0_wp |
---|
6311 | wintend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzb_wall,m)) * & |
---|
6312 | ( surf_usm_h%lambda_h_window(nzb_wall,m) * & |
---|
6313 | ( t_window_h(nzb_wall+1,m) & |
---|
6314 | - t_window_h(nzb_wall,m) ) * & |
---|
6315 | surf_usm_h%ddz_window(nzb_wall+1,m) & |
---|
6316 | + surf_usm_h%wghf_eb_window(m) & |
---|
6317 | + surf_usm_h%rad_sw_in(m) & |
---|
6318 | * (1.0_wp - exp(-win_absorp & |
---|
6319 | * surf_usm_h%zw_window(nzb_wall,m) ) ) & |
---|
6320 | ) * surf_usm_h%ddz_window_stag(nzb_wall,m) |
---|
6321 | |
---|
6322 | IF ( indoor_model ) then |
---|
6323 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
6324 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
6325 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
6326 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
6327 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
6328 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
6329 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
6330 | * surf_usm_h%ddz_window(kw,m) & |
---|
6331 | + surf_usm_h%rad_sw_in(m) & |
---|
6332 | * (exp(-win_absorp & |
---|
6333 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
6334 | - exp(-win_absorp & |
---|
6335 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
6336 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
6337 | |
---|
6338 | ENDDO |
---|
6339 | wintend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzt_wall,m)) * & |
---|
6340 | ( -surf_usm_h%lambda_h_window(nzt_wall-1,m) * & |
---|
6341 | ( t_window_h(nzt_wall,m) & |
---|
6342 | - t_window_h(nzt_wall-1,m) ) * & |
---|
6343 | surf_usm_h%ddz_window(nzt_wall,m) & |
---|
6344 | + surf_usm_h%iwghf_eb_window(m) & |
---|
6345 | + surf_usm_h%rad_sw_in(m) & |
---|
6346 | * (exp(-win_absorp & |
---|
6347 | * surf_usm_h%zw_window(nzt_wall-1,m) ) & |
---|
6348 | - exp(-win_absorp & |
---|
6349 | * surf_usm_h%zw_window(nzt_wall,m) ) ) & |
---|
6350 | ) * surf_usm_h%ddz_window_stag(nzt_wall,m) |
---|
6351 | ELSE |
---|
6352 | DO kw = nzb_wall+1, nzt_wall |
---|
6353 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
6354 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
6355 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
6356 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
6357 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
6358 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
6359 | * surf_usm_h%ddz_window(kw,m) & |
---|
6360 | + surf_usm_h%rad_sw_in(m) & |
---|
6361 | * (exp(-win_absorp & |
---|
6362 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
6363 | - exp(-win_absorp & |
---|
6364 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
6365 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
6366 | |
---|
6367 | ENDDO |
---|
6368 | ENDIF |
---|
6369 | |
---|
6370 | t_window_h_p(nzb_wall:nzt_wall,m) = t_window_h(nzb_wall:nzt_wall,m) & |
---|
6371 | + dt_3d * ( tsc(2) & |
---|
6372 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6373 | * surf_usm_h%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
6374 | |
---|
6375 | endif |
---|
6376 | |
---|
6377 | ! |
---|
6378 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
6379 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6380 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6381 | DO kw = nzb_wall, nzt_wall |
---|
6382 | surf_usm_h%tt_wall_m(kw,m) = wtend(kw) |
---|
6383 | ENDDO |
---|
6384 | ELSEIF ( intermediate_timestep_count < & |
---|
6385 | intermediate_timestep_count_max ) THEN |
---|
6386 | DO kw = nzb_wall, nzt_wall |
---|
6387 | surf_usm_h%tt_wall_m(kw,m) = -9.5625_wp * wtend(kw) + & |
---|
6388 | 5.3125_wp * surf_usm_h%tt_wall_m(kw,m) |
---|
6389 | ENDDO |
---|
6390 | ENDIF |
---|
6391 | ENDIF |
---|
6392 | |
---|
6393 | if (.NOT. spinup) then |
---|
6394 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
6395 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6396 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6397 | DO kw = nzb_wall, nzt_wall |
---|
6398 | surf_usm_h%tt_window_m(kw,m) = wintend(kw) |
---|
6399 | ENDDO |
---|
6400 | ELSEIF ( intermediate_timestep_count < & |
---|
6401 | intermediate_timestep_count_max ) THEN |
---|
6402 | DO kw = nzb_wall, nzt_wall |
---|
6403 | surf_usm_h%tt_window_m(kw,m) = -9.5625_wp * wintend(kw) + & |
---|
6404 | 5.3125_wp * surf_usm_h%tt_window_m(kw,m) |
---|
6405 | ENDDO |
---|
6406 | ENDIF |
---|
6407 | ENDIF |
---|
6408 | |
---|
6409 | endif |
---|
6410 | |
---|
6411 | ENDDO |
---|
6412 | |
---|
6413 | ! |
---|
6414 | !-- For vertical surfaces |
---|
6415 | DO l = 0, 3 |
---|
6416 | DO m = 1, surf_usm_v(l)%ns |
---|
6417 | ! |
---|
6418 | !-- Obtain indices |
---|
6419 | i = surf_usm_v(l)%i(m) |
---|
6420 | j = surf_usm_v(l)%j(m) |
---|
6421 | k = surf_usm_v(l)%k(m) |
---|
6422 | ! |
---|
6423 | !-- prognostic equation for wall temperature t_wall_v |
---|
6424 | wtend(:) = 0.0_wp |
---|
6425 | |
---|
6426 | wtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzb_wall,m)) * & |
---|
6427 | ( surf_usm_v(l)%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
6428 | ( t_wall_v(l)%t(nzb_wall+1,m) & |
---|
6429 | - t_wall_v(l)%t(nzb_wall,m) ) * & |
---|
6430 | surf_usm_v(l)%ddz_wall(nzb_wall+1,m) & |
---|
6431 | + surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
6432 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
6433 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
6434 | * surf_usm_v(l)%wghf_eb(m) & |
---|
6435 | - surf_usm_v(l)%frac(ind_pav_green,m) & |
---|
6436 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
6437 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
6438 | * ( surf_usm_v(l)%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
6439 | * surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
6440 | + surf_usm_v(l)%lambda_h(nzb_wall,m)* wall_mod(nzb_wall) & |
---|
6441 | * surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
6442 | / ( surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
6443 | + surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
6444 | * ( t_wall_v(l)%t(nzb_wall,m) & |
---|
6445 | - t_green_v(l)%t(nzt_wall,m) ) ) * & |
---|
6446 | surf_usm_v(l)%ddz_wall_stag(nzb_wall,m) |
---|
6447 | |
---|
6448 | IF ( indoor_model ) then |
---|
6449 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
6450 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
6451 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
6452 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
6453 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
6454 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
6455 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
6456 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
6457 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
6458 | ENDDO |
---|
6459 | wtend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzt_wall,m)) * & |
---|
6460 | ( -surf_usm_v(l)%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1)* & |
---|
6461 | ( t_wall_v(l)%t(nzt_wall,m) & |
---|
6462 | - t_wall_v(l)%t(nzt_wall-1,m) ) * & |
---|
6463 | surf_usm_v(l)%ddz_wall(nzt_wall,m) & |
---|
6464 | + surf_usm_v(l)%iwghf_eb(m) ) * & |
---|
6465 | surf_usm_v(l)%ddz_wall_stag(nzt_wall,m) |
---|
6466 | ELSE |
---|
6467 | DO kw = nzb_wall+1, nzt_wall |
---|
6468 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
6469 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
6470 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
6471 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
6472 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
6473 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
6474 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
6475 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
6476 | ENDDO |
---|
6477 | ENDIF |
---|
6478 | |
---|
6479 | t_wall_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
6480 | t_wall_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
6481 | + dt_3d * ( tsc(2) & |
---|
6482 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6483 | * surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
6484 | |
---|
6485 | if (.NOT. spinup) then |
---|
6486 | win_absorp = -log(surf_usm_v(l)%transmissivity(m)) / surf_usm_v(l)%zw_window(nzt_wall,m) |
---|
6487 | !-- prognostic equation for window temperature t_window_v |
---|
6488 | wintend(:) = 0.0_wp |
---|
6489 | wintend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzb_wall,m)) * & |
---|
6490 | ( surf_usm_v(l)%lambda_h_window(nzb_wall,m) * & |
---|
6491 | ( t_window_v(l)%t(nzb_wall+1,m) & |
---|
6492 | - t_window_v(l)%t(nzb_wall,m) ) * & |
---|
6493 | surf_usm_v(l)%ddz_window(nzb_wall+1,m) & |
---|
6494 | + surf_usm_v(l)%wghf_eb_window(m) & |
---|
6495 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
6496 | * (1.0_wp - exp(-win_absorp & |
---|
6497 | * surf_usm_v(l)%zw_window(nzb_wall,m) ) ) & |
---|
6498 | ) * surf_usm_v(l)%ddz_window_stag(nzb_wall,m) |
---|
6499 | |
---|
6500 | IF ( indoor_model ) then |
---|
6501 | DO kw = nzb_wall+1, nzt_wall -1 |
---|
6502 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
6503 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
6504 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
6505 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
6506 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
6507 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
6508 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
6509 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
6510 | * (exp(-win_absorp & |
---|
6511 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
6512 | - exp(-win_absorp & |
---|
6513 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
6514 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
6515 | ENDDO |
---|
6516 | wintend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzt_wall,m)) * & |
---|
6517 | ( -surf_usm_v(l)%lambda_h_window(nzt_wall-1,m) * & |
---|
6518 | ( t_window_v(l)%t(nzt_wall,m) & |
---|
6519 | - t_window_v(l)%t(nzt_wall-1,m) ) * & |
---|
6520 | surf_usm_v(l)%ddz_window(nzt_wall,m) & |
---|
6521 | + surf_usm_v(l)%iwghf_eb_window(m) & |
---|
6522 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
6523 | * (exp(-win_absorp & |
---|
6524 | * surf_usm_v(l)%zw_window(nzt_wall-1,m) ) & |
---|
6525 | - exp(-win_absorp & |
---|
6526 | * surf_usm_v(l)%zw_window(nzt_wall,m) ) ) & |
---|
6527 | ) * surf_usm_v(l)%ddz_window_stag(nzt_wall,m) |
---|
6528 | ELSE |
---|
6529 | DO kw = nzb_wall+1, nzt_wall |
---|
6530 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
6531 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
6532 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
6533 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
6534 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
6535 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
6536 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
6537 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
6538 | * (exp(-win_absorp & |
---|
6539 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
6540 | - exp(-win_absorp & |
---|
6541 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
6542 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
6543 | ENDDO |
---|
6544 | ENDIF |
---|
6545 | |
---|
6546 | t_window_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
6547 | t_window_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
6548 | + dt_3d * ( tsc(2) & |
---|
6549 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6550 | * surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
6551 | endif |
---|
6552 | |
---|
6553 | ! |
---|
6554 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
6555 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6556 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6557 | DO kw = nzb_wall, nzt_wall |
---|
6558 | surf_usm_v(l)%tt_wall_m(kw,m) = wtend(kw) |
---|
6559 | ENDDO |
---|
6560 | ELSEIF ( intermediate_timestep_count < & |
---|
6561 | intermediate_timestep_count_max ) THEN |
---|
6562 | DO kw = nzb_wall, nzt_wall |
---|
6563 | surf_usm_v(l)%tt_wall_m(kw,m) = & |
---|
6564 | - 9.5625_wp * wtend(kw) + & |
---|
6565 | 5.3125_wp * surf_usm_v(l)%tt_wall_m(kw,m) |
---|
6566 | ENDDO |
---|
6567 | ENDIF |
---|
6568 | ENDIF |
---|
6569 | |
---|
6570 | |
---|
6571 | if (.NOT. spinup) then |
---|
6572 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
6573 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6574 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6575 | DO kw = nzb_wall, nzt_wall |
---|
6576 | surf_usm_v(l)%tt_window_m(kw,m) = wintend(kw) |
---|
6577 | ENDDO |
---|
6578 | ELSEIF ( intermediate_timestep_count < & |
---|
6579 | intermediate_timestep_count_max ) THEN |
---|
6580 | DO kw = nzb_wall, nzt_wall |
---|
6581 | surf_usm_v(l)%tt_window_m(kw,m) = & |
---|
6582 | - 9.5625_wp * wintend(kw) + & |
---|
6583 | 5.3125_wp * surf_usm_v(l)%tt_window_m(kw,m) |
---|
6584 | ENDDO |
---|
6585 | ENDIF |
---|
6586 | ENDIF |
---|
6587 | endif |
---|
6588 | |
---|
6589 | ENDDO |
---|
6590 | ENDDO |
---|
6591 | |
---|
6592 | END SUBROUTINE usm_material_heat_model |
---|
6593 | |
---|
6594 | !------------------------------------------------------------------------------! |
---|
6595 | ! Description: |
---|
6596 | ! ------------ |
---|
6597 | ! |
---|
6598 | !> Green and substrate model as part of the urban surface model. The model predicts ground |
---|
6599 | !> temperatures. |
---|
6600 | !------------------------------------------------------------------------------! |
---|
6601 | SUBROUTINE usm_green_heat_model |
---|
6602 | |
---|
6603 | |
---|
6604 | IMPLICIT NONE |
---|
6605 | |
---|
6606 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
6607 | |
---|
6608 | REAL(wp) :: ke, lambda_h_green_sat |
---|
6609 | REAL(wp) :: h_vg !< Van Genuchten coef. h |
---|
6610 | REAL(wp) :: drho_l_lv |
---|
6611 | |
---|
6612 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: gtend,tend !< tendency |
---|
6613 | |
---|
6614 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: root_extr_green |
---|
6615 | |
---|
6616 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: lambda_green_temp !< temp. lambda |
---|
6617 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: gamma_green_temp !< temp. gamma |
---|
6618 | |
---|
6619 | LOGICAL :: conserve_water_content = .true. |
---|
6620 | |
---|
6621 | |
---|
6622 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
6623 | |
---|
6624 | ! |
---|
6625 | !-- For horizontal surfaces |
---|
6626 | DO m = 1, surf_usm_h%ns |
---|
6627 | |
---|
6628 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
6629 | ! |
---|
6630 | !-- Obtain indices |
---|
6631 | i = surf_usm_h%i(m) |
---|
6632 | j = surf_usm_h%j(m) |
---|
6633 | k = surf_usm_h%k(m) |
---|
6634 | |
---|
6635 | DO kw = nzb_wall, nzt_wall |
---|
6636 | ! |
---|
6637 | !-- Calculate volumetric heat capacity of the soil, taking |
---|
6638 | !-- into account water content |
---|
6639 | 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)) & |
---|
6640 | + rho_c_water * swc_h(kw,m)) |
---|
6641 | |
---|
6642 | ! |
---|
6643 | !-- Calculate soil heat conductivity at the center of the soil |
---|
6644 | !-- layers |
---|
6645 | lambda_h_green_sat = lambda_h_green_sm ** (1.0_wp - swc_sat_h(kw,m)) * & |
---|
6646 | lambda_h_water ** swc_h(kw,m) |
---|
6647 | |
---|
6648 | ke = 1.0_wp + LOG10(MAX(0.1_wp,swc_h(kw,m) & |
---|
6649 | / swc_sat_h(kw,m))) |
---|
6650 | |
---|
6651 | lambda_green_temp(kw) = ke * (lambda_h_green_sat - lambda_h_green_dry) + & |
---|
6652 | lambda_h_green_dry |
---|
6653 | |
---|
6654 | ENDDO |
---|
6655 | |
---|
6656 | |
---|
6657 | ! |
---|
6658 | !-- Calculate soil heat conductivity (lambda_h) at the _stag level |
---|
6659 | !-- using linear interpolation. For pavement surface, the |
---|
6660 | !-- true pavement depth is considered |
---|
6661 | DO kw = nzb_wall, nzt_wall |
---|
6662 | surf_usm_h%lambda_h_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
6663 | * 0.5_wp |
---|
6664 | ENDDO |
---|
6665 | ! surf_usm_h%lambda_h_green(nzt_wall+1,m) = lambda_green_temp(nzt_wall+1) |
---|
6666 | !-------------------------------------------------------------------------- |
---|
6667 | |
---|
6668 | t_green_h(nzt_wall+1,m) = t_wall_h(nzb_wall,m) |
---|
6669 | ! |
---|
6670 | !-- prognostic equation for ground/roof temperature t_green_h |
---|
6671 | gtend(:) = 0.0_wp |
---|
6672 | gtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_total_green(nzb_wall,m)) * & |
---|
6673 | ( surf_usm_h%lambda_h_green(nzb_wall,m) * & |
---|
6674 | ( t_green_h(nzb_wall+1,m) & |
---|
6675 | - t_green_h(nzb_wall,m) ) * & |
---|
6676 | surf_usm_h%ddz_green(nzb_wall+1,m) & |
---|
6677 | + surf_usm_h%wghf_eb_green(m) ) * & |
---|
6678 | surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
6679 | |
---|
6680 | DO kw = nzb_wall+1, nzt_wall |
---|
6681 | gtend(kw) = (1.0_wp / surf_usm_h%rho_c_total_green(kw,m)) & |
---|
6682 | * ( surf_usm_h%lambda_h_green(kw,m) & |
---|
6683 | * ( t_green_h(kw+1,m) - t_green_h(kw,m) ) & |
---|
6684 | * surf_usm_h%ddz_green(kw+1,m) & |
---|
6685 | - surf_usm_h%lambda_h_green(kw-1,m) & |
---|
6686 | * ( t_green_h(kw,m) - t_green_h(kw-1,m) ) & |
---|
6687 | * surf_usm_h%ddz_green(kw,m) & |
---|
6688 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
6689 | ENDDO |
---|
6690 | |
---|
6691 | t_green_h_p(nzb_wall:nzt_wall,m) = t_green_h(nzb_wall:nzt_wall,m) & |
---|
6692 | + dt_3d * ( tsc(2) & |
---|
6693 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6694 | * surf_usm_h%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
6695 | |
---|
6696 | |
---|
6697 | ! |
---|
6698 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
6699 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6700 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6701 | DO kw = nzb_wall, nzt_wall |
---|
6702 | surf_usm_h%tt_green_m(kw,m) = gtend(kw) |
---|
6703 | ENDDO |
---|
6704 | ELSEIF ( intermediate_timestep_count < & |
---|
6705 | intermediate_timestep_count_max ) THEN |
---|
6706 | DO kw = nzb_wall, nzt_wall |
---|
6707 | surf_usm_h%tt_green_m(kw,m) = -9.5625_wp * gtend(kw) + & |
---|
6708 | 5.3125_wp * surf_usm_h%tt_green_m(kw,m) |
---|
6709 | ENDDO |
---|
6710 | ENDIF |
---|
6711 | ENDIF |
---|
6712 | |
---|
6713 | !-------------------------------------------------------------- |
---|
6714 | DO kw = nzb_wall, nzt_wall |
---|
6715 | |
---|
6716 | ! |
---|
6717 | !-- Calculate soil diffusivity at the center of the soil layers |
---|
6718 | lambda_green_temp(kw) = (- b_ch * surf_usm_h%gamma_w_green_sat(kw,m) * psi_sat & |
---|
6719 | / swc_sat_h(kw,m) ) * ( MAX( swc_h(kw,m), & |
---|
6720 | wilt_h(kw,m) ) / swc_sat_h(kw,m) )**( & |
---|
6721 | b_ch + 2.0_wp ) |
---|
6722 | |
---|
6723 | ! |
---|
6724 | !-- Parametrization of Van Genuchten |
---|
6725 | IF ( soil_type /= 7 ) THEN |
---|
6726 | ! |
---|
6727 | !-- Calculate the hydraulic conductivity after Van Genuchten |
---|
6728 | !-- (1980) |
---|
6729 | h_vg = ( ( (swc_res_h(kw,m) - swc_sat_h(kw,m)) / ( swc_res_h(kw,m) - & |
---|
6730 | MAX( swc_h(kw,m), wilt_h(kw,m) ) ) )**( & |
---|
6731 | surf_usm_h%n_vg_green(m) / (surf_usm_h%n_vg_green(m) - 1.0_wp ) ) - 1.0_wp & |
---|
6732 | )**( 1.0_wp / surf_usm_h%n_vg_green(m) ) / surf_usm_h%alpha_vg_green(m) |
---|
6733 | |
---|
6734 | |
---|
6735 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( ( (1.0_wp + & |
---|
6736 | ( surf_usm_h%alpha_vg_green(m) * h_vg )**surf_usm_h%n_vg_green(m))**( & |
---|
6737 | 1.0_wp - 1.0_wp / surf_usm_h%n_vg_green(m) ) - ( & |
---|
6738 | surf_usm_h%alpha_vg_green(m) * h_vg )**( surf_usm_h%n_vg_green(m) & |
---|
6739 | - 1.0_wp) )**2 ) & |
---|
6740 | / ( ( 1.0_wp + ( surf_usm_h%alpha_vg_green(m) * h_vg & |
---|
6741 | )**surf_usm_h%n_vg_green(m) )**( ( 1.0_wp - 1.0_wp & |
---|
6742 | / surf_usm_h%n_vg_green(m) ) *( surf_usm_h%l_vg_green(m) + 2.0_wp) ) ) |
---|
6743 | |
---|
6744 | ! |
---|
6745 | !-- Parametrization of Clapp & Hornberger |
---|
6746 | ELSE |
---|
6747 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( swc_h(kw,m) & |
---|
6748 | / swc_sat_h(kw,m) )**(2.0_wp * b_ch + 3.0_wp) |
---|
6749 | ENDIF |
---|
6750 | |
---|
6751 | ENDDO |
---|
6752 | |
---|
6753 | ! |
---|
6754 | !-- Prognostic equation for soil moisture content. Only performed, |
---|
6755 | !-- when humidity is enabled in the atmosphere |
---|
6756 | IF ( humidity ) THEN |
---|
6757 | ! |
---|
6758 | !-- Calculate soil diffusivity (lambda_w) at the _stag level |
---|
6759 | !-- using linear interpolation. To do: replace this with |
---|
6760 | !-- ECMWF-IFS Eq. 8.81 |
---|
6761 | DO kw = nzb_wall, nzt_wall-1 |
---|
6762 | |
---|
6763 | surf_usm_h%lambda_w_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
6764 | * 0.5_wp |
---|
6765 | surf_usm_h%gamma_w_green(kw,m) = ( gamma_green_temp(kw+1) + gamma_green_temp(kw) ) & |
---|
6766 | * 0.5_wp |
---|
6767 | |
---|
6768 | ENDDO |
---|
6769 | |
---|
6770 | ! |
---|
6771 | ! |
---|
6772 | !-- In case of a closed bottom (= water content is conserved), |
---|
6773 | !-- set hydraulic conductivity to zero to that no water will be |
---|
6774 | !-- lost in the bottom layer. |
---|
6775 | IF ( conserve_water_content ) THEN |
---|
6776 | surf_usm_h%gamma_w_green(kw,m) = 0.0_wp |
---|
6777 | ELSE |
---|
6778 | surf_usm_h%gamma_w_green(kw,m) = gamma_green_temp(nzt_wall) |
---|
6779 | ENDIF |
---|
6780 | |
---|
6781 | !-- The root extraction (= root_extr * qsws_veg_eb / (rho_l |
---|
6782 | !-- * l_v)) ensures the mass conservation for water. The |
---|
6783 | !-- transpiration of plants equals the cumulative withdrawals by |
---|
6784 | !-- the roots in the soil. The scheme takes into account the |
---|
6785 | !-- availability of water in the soil layers as well as the root |
---|
6786 | !-- fraction in the respective layer. Layer with moisture below |
---|
6787 | !-- wilting point will not contribute, which reflects the |
---|
6788 | !-- preference of plants to take water from moister layers. |
---|
6789 | |
---|
6790 | ! |
---|
6791 | !-- Calculate the root extraction (ECMWF 7.69, the sum of |
---|
6792 | !-- root_extr = 1). The energy balance solver guarantees a |
---|
6793 | !-- positive transpiration, so that there is no need for an |
---|
6794 | !-- additional check. |
---|
6795 | m_total = 0.0_wp |
---|
6796 | DO kw = nzb_wall, nzt_wall |
---|
6797 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
6798 | m_total = m_total + rootfr_h(kw,m) * swc_h(kw,m) |
---|
6799 | ENDIF |
---|
6800 | ENDDO |
---|
6801 | |
---|
6802 | IF ( m_total > 0.0_wp ) THEN |
---|
6803 | DO kw = nzb_wall, nzt_wall |
---|
6804 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
6805 | root_extr_green(kw) = rootfr_h(kw,m) * swc_h(kw,m) & |
---|
6806 | / m_total |
---|
6807 | ELSE |
---|
6808 | root_extr_green(kw) = 0.0_wp |
---|
6809 | ENDIF |
---|
6810 | ENDDO |
---|
6811 | ENDIF |
---|
6812 | |
---|
6813 | ! |
---|
6814 | !-- Prognostic equation for soil water content m_soil. |
---|
6815 | tend(:) = 0.0_wp |
---|
6816 | |
---|
6817 | tend(nzb_wall) = ( surf_usm_h%lambda_w_green(nzb_wall,m) * ( & |
---|
6818 | swc_h(nzb_wall+1,m) - swc_h(nzb_wall,m) ) & |
---|
6819 | * surf_usm_h%ddz_green(nzb_wall+1,m) - surf_usm_h%gamma_w_green(nzb_wall,m) - ( & |
---|
6820 | root_extr_green(nzb_wall) * surf_usm_h%qsws_veg_eb(m) & |
---|
6821 | ! + surf_usm_h%qsws_soil_eb_green(m) |
---|
6822 | ) * drho_l_lv ) & |
---|
6823 | * surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
6824 | |
---|
6825 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
6826 | tend(kw) = ( surf_usm_h%lambda_w_green(kw,m) * ( swc_h(kw+1,m) & |
---|
6827 | - swc_h(kw,m) ) * surf_usm_h%ddz_green(kw+1,m) & |
---|
6828 | - surf_usm_h%gamma_w_green(kw,m) & |
---|
6829 | - surf_usm_h%lambda_w_green(kw-1,m) * (swc_h(kw,m) - & |
---|
6830 | swc_h(kw-1,m)) * surf_usm_h%ddz_green(kw,m) & |
---|
6831 | + surf_usm_h%gamma_w_green(kw-1,m) - (root_extr_green(kw) & |
---|
6832 | * surf_usm_h%qsws_veg_eb(m) * drho_l_lv) & |
---|
6833 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
6834 | |
---|
6835 | ENDDO |
---|
6836 | tend(nzt_wall) = ( - surf_usm_h%gamma_w_green(nzt_wall,m) & |
---|
6837 | - surf_usm_h%lambda_w_green(nzt_wall-1,m) & |
---|
6838 | * (swc_h(nzt_wall,m) & |
---|
6839 | - swc_h(nzt_wall-1,m)) & |
---|
6840 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
6841 | + surf_usm_h%gamma_w_green(nzt_wall-1,m) - ( & |
---|
6842 | root_extr_green(nzt_wall) & |
---|
6843 | * surf_usm_h%qsws_veg_eb(m) * drho_l_lv ) & |
---|
6844 | ) * surf_usm_h%ddz_green_stag(nzt_wall,m) |
---|
6845 | |
---|
6846 | swc_h_p(nzb_wall:nzt_wall,m) = swc_h(nzb_wall:nzt_wall,m)& |
---|
6847 | + dt_3d * ( tsc(2) * tend(:) & |
---|
6848 | + tsc(3) * surf_usm_h%tswc_h_m(:,m) ) |
---|
6849 | |
---|
6850 | ! |
---|
6851 | !-- Account for dry soils (find a better solution here!) |
---|
6852 | DO kw = nzb_wall, nzt_wall |
---|
6853 | IF ( swc_h_p(kw,m) < 0.0_wp ) swc_h_p(kw,m) = 0.0_wp |
---|
6854 | ENDDO |
---|
6855 | |
---|
6856 | ! |
---|
6857 | !-- Calculate m_soil tendencies for the next Runge-Kutta step |
---|
6858 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6859 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6860 | DO kw = nzb_wall, nzt_wall |
---|
6861 | surf_usm_h%tswc_h_m(kw,m) = tend(kw) |
---|
6862 | ENDDO |
---|
6863 | ELSEIF ( intermediate_timestep_count < & |
---|
6864 | intermediate_timestep_count_max ) THEN |
---|
6865 | DO kw = nzb_wall, nzt_wall |
---|
6866 | surf_usm_h%tswc_h_m(kw,m) = -9.5625_wp * tend(kw) + 5.3125_wp& |
---|
6867 | * surf_usm_h%tswc_h_m(kw,m) |
---|
6868 | ENDDO |
---|
6869 | ENDIF |
---|
6870 | ENDIF |
---|
6871 | ENDIF |
---|
6872 | !-------------------------------------------------------------- |
---|
6873 | ENDIF |
---|
6874 | |
---|
6875 | ENDDO |
---|
6876 | |
---|
6877 | ! |
---|
6878 | !-- For vertical surfaces |
---|
6879 | DO l = 0, 3 |
---|
6880 | DO m = 1, surf_usm_v(l)%ns |
---|
6881 | |
---|
6882 | if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
6883 | if (1.gt.2) then |
---|
6884 | ! |
---|
6885 | !-- Obtain indices |
---|
6886 | i = surf_usm_v(l)%i(m) |
---|
6887 | j = surf_usm_v(l)%j(m) |
---|
6888 | k = surf_usm_v(l)%k(m) |
---|
6889 | |
---|
6890 | t_green_v(l)%t(nzt_wall+1,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
6891 | ! |
---|
6892 | !-- prognostic equation for green temperature t_green_v |
---|
6893 | gtend(:) = 0.0_wp |
---|
6894 | gtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_green(nzb_wall,m)) * & |
---|
6895 | ( surf_usm_v(l)%lambda_h_green(nzb_wall,m) * & |
---|
6896 | ( t_green_v(l)%t(nzb_wall+1,m) & |
---|
6897 | - t_green_v(l)%t(nzb_wall,m) ) * & |
---|
6898 | surf_usm_v(l)%ddz_green(nzb_wall+1,m) & |
---|
6899 | + surf_usm_v(l)%wghf_eb(m) ) * & |
---|
6900 | surf_usm_v(l)%ddz_green_stag(nzb_wall,m) |
---|
6901 | |
---|
6902 | DO kw = nzb_wall+1, nzt_wall |
---|
6903 | gtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_green(kw,m)) & |
---|
6904 | * ( surf_usm_v(l)%lambda_h_green(kw,m) & |
---|
6905 | * ( t_green_v(l)%t(kw+1,m) - t_green_v(l)%t(kw,m) ) & |
---|
6906 | * surf_usm_v(l)%ddz_green(kw+1,m) & |
---|
6907 | - surf_usm_v(l)%lambda_h(kw-1,m) & |
---|
6908 | * ( t_green_v(l)%t(kw,m) - t_green_v(l)%t(kw-1,m) ) & |
---|
6909 | * surf_usm_v(l)%ddz_green(kw,m) ) & |
---|
6910 | * surf_usm_v(l)%ddz_green_stag(kw,m) |
---|
6911 | ENDDO |
---|
6912 | |
---|
6913 | t_green_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
6914 | t_green_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
6915 | + dt_3d * ( tsc(2) & |
---|
6916 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6917 | * surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
6918 | |
---|
6919 | ! |
---|
6920 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
6921 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6922 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6923 | DO kw = nzb_wall, nzt_wall |
---|
6924 | surf_usm_v(l)%tt_green_m(kw,m) = gtend(kw) |
---|
6925 | ENDDO |
---|
6926 | ELSEIF ( intermediate_timestep_count < & |
---|
6927 | intermediate_timestep_count_max ) THEN |
---|
6928 | DO kw = nzb_wall, nzt_wall |
---|
6929 | surf_usm_v(l)%tt_green_m(kw,m) = & |
---|
6930 | - 9.5625_wp * gtend(kw) + & |
---|
6931 | 5.3125_wp * surf_usm_v(l)%tt_green_m(kw,m) |
---|
6932 | ENDDO |
---|
6933 | ENDIF |
---|
6934 | ENDIF |
---|
6935 | endif |
---|
6936 | |
---|
6937 | DO kw = nzb_wall, nzt_wall+1 |
---|
6938 | t_green_v(l)%t(kw,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
6939 | ENDDO |
---|
6940 | |
---|
6941 | ENDIF |
---|
6942 | |
---|
6943 | ENDDO |
---|
6944 | ENDDO |
---|
6945 | |
---|
6946 | END SUBROUTINE usm_green_heat_model |
---|
6947 | |
---|
6948 | !------------------------------------------------------------------------------! |
---|
6949 | ! Description: |
---|
6950 | ! ------------ |
---|
6951 | !> Parin for &usm_par for urban surface model |
---|
6952 | !------------------------------------------------------------------------------! |
---|
6953 | SUBROUTINE usm_parin |
---|
6954 | |
---|
6955 | IMPLICIT NONE |
---|
6956 | |
---|
6957 | CHARACTER (LEN=80) :: line !< string containing current line of file PARIN |
---|
6958 | |
---|
6959 | NAMELIST /urban_surface_par/ & |
---|
6960 | building_type, & |
---|
6961 | land_category, & |
---|
6962 | naheatlayers, & |
---|
6963 | pedestrian_category, & |
---|
6964 | roughness_concrete, & |
---|
6965 | read_wall_temp_3d, & |
---|
6966 | roof_category, & |
---|
6967 | urban_surface, & |
---|
6968 | usm_anthropogenic_heat, & |
---|
6969 | usm_material_model, & |
---|
6970 | wall_category, & |
---|
6971 | indoor_model, & |
---|
6972 | wall_inner_temperature, & |
---|
6973 | roof_inner_temperature, & |
---|
6974 | soil_inner_temperature, & |
---|
6975 | window_inner_temperature, & |
---|
6976 | usm_wall_mod |
---|
6977 | |
---|
6978 | NAMELIST /urban_surface_parameters/ & |
---|
6979 | building_type, & |
---|
6980 | land_category, & |
---|
6981 | naheatlayers, & |
---|
6982 | pedestrian_category, & |
---|
6983 | roughness_concrete, & |
---|
6984 | read_wall_temp_3d, & |
---|
6985 | roof_category, & |
---|
6986 | urban_surface, & |
---|
6987 | usm_anthropogenic_heat, & |
---|
6988 | usm_material_model, & |
---|
6989 | wall_category, & |
---|
6990 | indoor_model, & |
---|
6991 | wall_inner_temperature, & |
---|
6992 | roof_inner_temperature, & |
---|
6993 | soil_inner_temperature, & |
---|
6994 | window_inner_temperature, & |
---|
6995 | usm_wall_mod |
---|
6996 | |
---|
6997 | |
---|
6998 | |
---|
6999 | ! |
---|
7000 | !-- Try to find urban surface model package |
---|
7001 | REWIND ( 11 ) |
---|
7002 | line = ' ' |
---|
7003 | DO WHILE ( INDEX( line, '&urban_surface_parameters' ) == 0 ) |
---|
7004 | READ ( 11, '(A)', END=12 ) line |
---|
7005 | ENDDO |
---|
7006 | BACKSPACE ( 11 ) |
---|
7007 | |
---|
7008 | ! |
---|
7009 | !-- Read user-defined namelist |
---|
7010 | READ ( 11, urban_surface_parameters, ERR = 10 ) |
---|
7011 | |
---|
7012 | ! |
---|
7013 | !-- Set flag that indicates that the urban surface model is switched on |
---|
7014 | urban_surface = .TRUE. |
---|
7015 | |
---|
7016 | GOTO 14 |
---|
7017 | |
---|
7018 | 10 BACKSPACE( 11 ) |
---|
7019 | READ( 11 , '(A)') line |
---|
7020 | CALL parin_fail_message( 'urban_surface_parameters', line ) |
---|
7021 | ! |
---|
7022 | !-- Try to find old namelist |
---|
7023 | 12 REWIND ( 11 ) |
---|
7024 | line = ' ' |
---|
7025 | DO WHILE ( INDEX( line, '&urban_surface_par' ) == 0 ) |
---|
7026 | READ ( 11, '(A)', END=14 ) line |
---|
7027 | ENDDO |
---|
7028 | BACKSPACE ( 11 ) |
---|
7029 | |
---|
7030 | ! |
---|
7031 | !-- Read user-defined namelist |
---|
7032 | READ ( 11, urban_surface_par, ERR = 13, END = 14 ) |
---|
7033 | |
---|
7034 | message_string = 'namelist urban_surface_par is deprecated and will be ' // & |
---|
7035 | 'removed in near future. Please use namelist ' // & |
---|
7036 | 'urban_surface_parameters instead' |
---|
7037 | CALL message( 'usm_parin', 'PA0487', 0, 1, 0, 6, 0 ) |
---|
7038 | |
---|
7039 | ! |
---|
7040 | !-- Set flag that indicates that the urban surface model is switched on |
---|
7041 | urban_surface = .TRUE. |
---|
7042 | |
---|
7043 | GOTO 14 |
---|
7044 | |
---|
7045 | 13 BACKSPACE( 11 ) |
---|
7046 | READ( 11 , '(A)') line |
---|
7047 | CALL parin_fail_message( 'urban_surface_par', line ) |
---|
7048 | |
---|
7049 | |
---|
7050 | 14 CONTINUE |
---|
7051 | |
---|
7052 | |
---|
7053 | END SUBROUTINE usm_parin |
---|
7054 | |
---|
7055 | !------------------------------------------------------------------------------! |
---|
7056 | ! Description: |
---|
7057 | ! ------------ |
---|
7058 | !> Calculates temperature near surface (10 cm) for indoor model |
---|
7059 | !------------------------------------------------------------------------------! |
---|
7060 | SUBROUTINE usm_temperature_near_surface |
---|
7061 | |
---|
7062 | IMPLICIT NONE |
---|
7063 | |
---|
7064 | INTEGER(iwp) :: i, j, k, l, m !< running indices |
---|
7065 | |
---|
7066 | ! |
---|
7067 | !-- First, treat horizontal surface elements |
---|
7068 | DO m = 1, surf_usm_h%ns |
---|
7069 | |
---|
7070 | !-- Get indices of respective grid point |
---|
7071 | i = surf_usm_h%i(m) |
---|
7072 | j = surf_usm_h%j(m) |
---|
7073 | k = surf_usm_h%k(m) |
---|
7074 | |
---|
7075 | t_surf_10cm_h(m) = surf_usm_h%pt_surface(m) + surf_usm_h%ts(m) / kappa & |
---|
7076 | * ( log( 0.1_wp / surf_usm_h%z0h(m) ) & |
---|
7077 | - psi_h( 0.1_wp / surf_usm_h%ol(m) ) & |
---|
7078 | + psi_h( surf_usm_h%z0h(m) / surf_usm_h%ol(m) ) ) |
---|
7079 | |
---|
7080 | ENDDO |
---|
7081 | ! |
---|
7082 | !-- Now, treat vertical surface elements |
---|
7083 | DO l = 0, 3 |
---|
7084 | DO m = 1, surf_usm_v(l)%ns |
---|
7085 | |
---|
7086 | !-- Get indices of respective grid point |
---|
7087 | i = surf_usm_v(l)%i(m) |
---|
7088 | j = surf_usm_v(l)%j(m) |
---|
7089 | k = surf_usm_v(l)%k(m) |
---|
7090 | |
---|
7091 | t_surf_10cm_v(l)%t(m) =surf_usm_v(l)%pt_surface(m) + surf_usm_v(l)%ts(m) / kappa & |
---|
7092 | * ( log( 0.1_wp / surf_usm_v(l)%z0h(m) ) & |
---|
7093 | - psi_h( 0.1_wp / surf_usm_v(l)%ol(m) ) & |
---|
7094 | + psi_h( surf_usm_v(l)%z0h(m) / surf_usm_v(l)%ol(m) ) ) |
---|
7095 | |
---|
7096 | ENDDO |
---|
7097 | |
---|
7098 | ENDDO |
---|
7099 | |
---|
7100 | |
---|
7101 | END SUBROUTINE usm_temperature_near_surface |
---|
7102 | |
---|
7103 | |
---|
7104 | |
---|
7105 | !------------------------------------------------------------------------------! |
---|
7106 | ! Description: |
---|
7107 | ! ------------ |
---|
7108 | ! |
---|
7109 | !> This subroutine is part of the urban surface model. |
---|
7110 | !> It reads daily heat produced by anthropogenic sources |
---|
7111 | !> and the diurnal cycle of the heat. |
---|
7112 | !------------------------------------------------------------------------------! |
---|
7113 | SUBROUTINE usm_read_anthropogenic_heat |
---|
7114 | |
---|
7115 | INTEGER(iwp) :: i,j,k,ii |
---|
7116 | REAL(wp) :: heat |
---|
7117 | |
---|
7118 | !-- allocation of array of sources of anthropogenic heat and their diural profile |
---|
7119 | ALLOCATE( aheat(naheatlayers,nys:nyn,nxl:nxr) ) |
---|
7120 | ALLOCATE( aheatprof(naheatlayers,0:24) ) |
---|
7121 | |
---|
7122 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7123 | !-- read daily amount of heat and its daily cycle |
---|
7124 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7125 | aheat = 0.0_wp |
---|
7126 | DO ii = 0, io_blocks-1 |
---|
7127 | IF ( ii == io_group ) THEN |
---|
7128 | |
---|
7129 | !-- open anthropogenic heat file |
---|
7130 | OPEN( 151, file='ANTHROPOGENIC_HEAT'//TRIM(coupling_char), action='read', & |
---|
7131 | status='old', form='formatted', err=11 ) |
---|
7132 | i = 0 |
---|
7133 | j = 0 |
---|
7134 | DO |
---|
7135 | READ( 151, *, err=12, end=13 ) i, j, k, heat |
---|
7136 | IF ( i >= nxl .AND. i <= nxr .AND. j >= nys .AND. j <= nyn ) THEN |
---|
7137 | IF ( k <= naheatlayers .AND. k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
7138 | !-- write heat into the array |
---|
7139 | aheat(k,j,i) = heat |
---|
7140 | ENDIF |
---|
7141 | ENDIF |
---|
7142 | CYCLE |
---|
7143 | 12 WRITE(message_string,'(a,2i4)') 'error in file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' after line ',i,j |
---|
7144 | CALL message( 'usm_read_anthropogenic_heat', 'PA0515', 0, 1, 0, 6, 0 ) |
---|
7145 | ENDDO |
---|
7146 | 13 CLOSE(151) |
---|
7147 | CYCLE |
---|
7148 | 11 message_string = 'file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' does not exist' |
---|
7149 | CALL message( 'usm_read_anthropogenic_heat', 'PA0516', 1, 2, 0, 6, 0 ) |
---|
7150 | ENDIF |
---|
7151 | |
---|
7152 | #if defined( __parallel ) |
---|
7153 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7154 | #endif |
---|
7155 | ENDDO |
---|
7156 | |
---|
7157 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7158 | !-- read diurnal profiles of heat sources |
---|
7159 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7160 | aheatprof = 0.0_wp |
---|
7161 | DO ii = 0, io_blocks-1 |
---|
7162 | IF ( ii == io_group ) THEN |
---|
7163 | |
---|
7164 | !-- open anthropogenic heat profile file |
---|
7165 | OPEN( 151, file='ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char), action='read', & |
---|
7166 | status='old', form='formatted', err=21 ) |
---|
7167 | i = 0 |
---|
7168 | DO |
---|
7169 | READ( 151, *, err=22, end=23 ) i, k, heat |
---|
7170 | IF ( i >= 0 .AND. i <= 24 .AND. k <= naheatlayers ) THEN |
---|
7171 | !-- write heat into the array |
---|
7172 | aheatprof(k,i) = heat |
---|
7173 | ENDIF |
---|
7174 | CYCLE |
---|
7175 | 22 WRITE(message_string,'(a,i4)') 'error in file ANTHROPOGENIC_HEAT_PROFILE'// & |
---|
7176 | TRIM(coupling_char)//' after line ',i |
---|
7177 | CALL message( 'usm_read_anthropogenic_heat', 'PA0517', 0, 1, 0, 6, 0 ) |
---|
7178 | ENDDO |
---|
7179 | aheatprof(:,24) = aheatprof(:,0) |
---|
7180 | 23 CLOSE(151) |
---|
7181 | CYCLE |
---|
7182 | 21 message_string = 'file ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char)//' does not exist' |
---|
7183 | CALL message( 'usm_read_anthropogenic_heat', 'PA0518', 1, 2, 0, 6, 0 ) |
---|
7184 | ENDIF |
---|
7185 | |
---|
7186 | #if defined( __parallel ) |
---|
7187 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7188 | #endif |
---|
7189 | ENDDO |
---|
7190 | |
---|
7191 | END SUBROUTINE usm_read_anthropogenic_heat |
---|
7192 | |
---|
7193 | |
---|
7194 | !------------------------------------------------------------------------------! |
---|
7195 | ! Description: |
---|
7196 | ! ------------ |
---|
7197 | !> Soubroutine reads t_surf and t_wall data from restart files |
---|
7198 | !------------------------------------------------------------------------------! |
---|
7199 | SUBROUTINE usm_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & |
---|
7200 | nxr_on_file, nynf, nync, nyn_on_file, nysf, nysc,& |
---|
7201 | nys_on_file, found ) |
---|
7202 | |
---|
7203 | |
---|
7204 | USE control_parameters, & |
---|
7205 | ONLY: length, restart_string |
---|
7206 | |
---|
7207 | IMPLICIT NONE |
---|
7208 | |
---|
7209 | INTEGER(iwp) :: l !< index variable for surface type |
---|
7210 | INTEGER(iwp) :: i !< running index over input files |
---|
7211 | INTEGER(iwp) :: k !< running index over previous input files covering current local domain |
---|
7212 | INTEGER(iwp) :: ns_h_on_file_usm !< number of horizontal surface elements (urban type) on file |
---|
7213 | INTEGER(iwp) :: nxlc !< index of left boundary on current subdomain |
---|
7214 | INTEGER(iwp) :: nxlf !< index of left boundary on former subdomain |
---|
7215 | INTEGER(iwp) :: nxl_on_file !< index of left boundary on former local domain |
---|
7216 | INTEGER(iwp) :: nxrc !< index of right boundary on current subdomain |
---|
7217 | INTEGER(iwp) :: nxrf !< index of right boundary on former subdomain |
---|
7218 | INTEGER(iwp) :: nxr_on_file !< index of right boundary on former local domain |
---|
7219 | INTEGER(iwp) :: nync !< index of north boundary on current subdomain |
---|
7220 | INTEGER(iwp) :: nynf !< index of north boundary on former subdomain |
---|
7221 | INTEGER(iwp) :: nyn_on_file !< index of north boundary on former local domain |
---|
7222 | INTEGER(iwp) :: nysc !< index of south boundary on current subdomain |
---|
7223 | INTEGER(iwp) :: nysf !< index of south boundary on former subdomain |
---|
7224 | INTEGER(iwp) :: nys_on_file !< index of south boundary on former local domain |
---|
7225 | |
---|
7226 | INTEGER(iwp) :: ns_v_on_file_usm(0:3) !< number of vertical surface elements (urban type) on file |
---|
7227 | |
---|
7228 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: start_index_on_file |
---|
7229 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: end_index_on_file |
---|
7230 | |
---|
7231 | LOGICAL, INTENT(OUT) :: found |
---|
7232 | |
---|
7233 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_wall_h, tmp_surf_window_h, tmp_surf_green_h |
---|
7234 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_wall_h, tmp_window_h, tmp_green_h |
---|
7235 | |
---|
7236 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_wall_v, tmp_surf_window_v, tmp_surf_green_v |
---|
7237 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_wall_v, tmp_window_v, tmp_green_v |
---|
7238 | |
---|
7239 | |
---|
7240 | found = .TRUE. |
---|
7241 | |
---|
7242 | |
---|
7243 | SELECT CASE ( restart_string(1:length) ) |
---|
7244 | |
---|
7245 | CASE ( 'ns_h_on_file_usm') |
---|
7246 | IF ( k == 1 ) THEN |
---|
7247 | READ ( 13 ) ns_h_on_file_usm |
---|
7248 | |
---|
7249 | IF ( ALLOCATED( tmp_surf_wall_h ) ) DEALLOCATE( tmp_surf_wall_h ) |
---|
7250 | IF ( ALLOCATED( tmp_wall_h ) ) DEALLOCATE( tmp_wall_h ) |
---|
7251 | IF ( ALLOCATED( tmp_surf_window_h ) ) & |
---|
7252 | DEALLOCATE( tmp_surf_window_h ) |
---|
7253 | IF ( ALLOCATED( tmp_window_h) ) DEALLOCATE( tmp_window_h ) |
---|
7254 | IF ( ALLOCATED( tmp_surf_green_h) ) & |
---|
7255 | DEALLOCATE( tmp_surf_green_h ) |
---|
7256 | IF ( ALLOCATED( tmp_green_h) ) DEALLOCATE( tmp_green_h ) |
---|
7257 | |
---|
7258 | ! |
---|
7259 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
7260 | !-- the size of allocated surface elements do not necessarily |
---|
7261 | !-- need to match the size of present surface elements on |
---|
7262 | !-- current processor, as the number of processors between |
---|
7263 | !-- restarts can change. |
---|
7264 | ALLOCATE( tmp_surf_wall_h(1:ns_h_on_file_usm) ) |
---|
7265 | ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1, & |
---|
7266 | 1:ns_h_on_file_usm) ) |
---|
7267 | ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) ) |
---|
7268 | ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1, & |
---|
7269 | 1:ns_h_on_file_usm) ) |
---|
7270 | ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) ) |
---|
7271 | ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1, & |
---|
7272 | 1:ns_h_on_file_usm) ) |
---|
7273 | |
---|
7274 | ENDIF |
---|
7275 | |
---|
7276 | CASE ( 'ns_v_on_file_usm') |
---|
7277 | IF ( k == 1 ) THEN |
---|
7278 | READ ( 13 ) ns_v_on_file_usm |
---|
7279 | |
---|
7280 | DO l = 0, 3 |
---|
7281 | IF ( ALLOCATED( tmp_surf_wall_v(l)%t ) ) & |
---|
7282 | DEALLOCATE( tmp_surf_wall_v(l)%t ) |
---|
7283 | IF ( ALLOCATED( tmp_wall_v(l)%t ) ) & |
---|
7284 | DEALLOCATE( tmp_wall_v(l)%t ) |
---|
7285 | IF ( ALLOCATED( tmp_surf_window_v(l)%t ) ) & |
---|
7286 | DEALLOCATE( tmp_surf_window_v(l)%t ) |
---|
7287 | IF ( ALLOCATED( tmp_window_v(l)%t ) ) & |
---|
7288 | DEALLOCATE( tmp_window_v(l)%t ) |
---|
7289 | IF ( ALLOCATED( tmp_surf_green_v(l)%t ) ) & |
---|
7290 | DEALLOCATE( tmp_surf_green_v(l)%t ) |
---|
7291 | IF ( ALLOCATED( tmp_green_v(l)%t ) ) & |
---|
7292 | DEALLOCATE( tmp_green_v(l)%t ) |
---|
7293 | ENDDO |
---|
7294 | |
---|
7295 | ! |
---|
7296 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
7297 | !-- the size of allocated surface elements do not necessarily |
---|
7298 | !-- need to match the size of present surface elements on |
---|
7299 | !-- current processor, as the number of processors between |
---|
7300 | !-- restarts can change. |
---|
7301 | DO l = 0, 3 |
---|
7302 | ALLOCATE( tmp_surf_wall_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
7303 | ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
7304 | 1:ns_v_on_file_usm(l) ) ) |
---|
7305 | ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
7306 | ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
7307 | 1:ns_v_on_file_usm(l) ) ) |
---|
7308 | ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
7309 | ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
7310 | 1:ns_v_on_file_usm(l) ) ) |
---|
7311 | ENDDO |
---|
7312 | |
---|
7313 | ENDIF |
---|
7314 | |
---|
7315 | CASE ( 'usm_start_index_h', 'usm_start_index_v' ) |
---|
7316 | IF ( k == 1 ) THEN |
---|
7317 | |
---|
7318 | IF ( ALLOCATED( start_index_on_file ) ) & |
---|
7319 | DEALLOCATE( start_index_on_file ) |
---|
7320 | |
---|
7321 | ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file, & |
---|
7322 | nxl_on_file:nxr_on_file) ) |
---|
7323 | |
---|
7324 | READ ( 13 ) start_index_on_file |
---|
7325 | |
---|
7326 | ENDIF |
---|
7327 | |
---|
7328 | CASE ( 'usm_end_index_h', 'usm_end_index_v' ) |
---|
7329 | IF ( k == 1 ) THEN |
---|
7330 | |
---|
7331 | IF ( ALLOCATED( end_index_on_file ) ) & |
---|
7332 | DEALLOCATE( end_index_on_file ) |
---|
7333 | |
---|
7334 | ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file, & |
---|
7335 | nxl_on_file:nxr_on_file) ) |
---|
7336 | |
---|
7337 | READ ( 13 ) end_index_on_file |
---|
7338 | |
---|
7339 | ENDIF |
---|
7340 | |
---|
7341 | CASE ( 't_surf_wall_h' ) |
---|
7342 | #if defined( __nopointer ) |
---|
7343 | IF ( k == 1 ) THEN |
---|
7344 | IF ( .NOT. ALLOCATED( t_surf_wall_h ) ) & |
---|
7345 | ALLOCATE( t_surf_wall_h(1:surf_usm_h%ns) ) |
---|
7346 | READ ( 13 ) tmp_surf_wall_h |
---|
7347 | ENDIF |
---|
7348 | CALL surface_restore_elements( & |
---|
7349 | t_surf_wall_h, tmp_surf_wall_h, & |
---|
7350 | surf_usm_h%start_index, & |
---|
7351 | start_index_on_file, & |
---|
7352 | end_index_on_file, & |
---|
7353 | nxlc, nysc, & |
---|
7354 | nxlf, nxrf, nysf, nynf, & |
---|
7355 | nys_on_file, nyn_on_file, & |
---|
7356 | nxl_on_file,nxr_on_file ) |
---|
7357 | #else |
---|
7358 | IF ( k == 1 ) THEN |
---|
7359 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
7360 | ALLOCATE( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
7361 | READ ( 13 ) tmp_surf_wall_h |
---|
7362 | ENDIF |
---|
7363 | CALL surface_restore_elements( & |
---|
7364 | t_surf_wall_h_1, tmp_surf_wall_h, & |
---|
7365 | surf_usm_h%start_index, & |
---|
7366 | start_index_on_file, & |
---|
7367 | end_index_on_file, & |
---|
7368 | nxlc, nysc, & |
---|
7369 | nxlf, nxrf, nysf, nynf, & |
---|
7370 | nys_on_file, nyn_on_file, & |
---|
7371 | nxl_on_file,nxr_on_file ) |
---|
7372 | #endif |
---|
7373 | |
---|
7374 | CASE ( 't_surf_wall_v(0)' ) |
---|
7375 | #if defined( __nopointer ) |
---|
7376 | IF ( k == 1 ) THEN |
---|
7377 | IF ( .NOT. ALLOCATED( t_surf_wall_v(0)%t ) ) & |
---|
7378 | ALLOCATE( t_surf_wall_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7379 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
7380 | ENDIF |
---|
7381 | CALL surface_restore_elements( & |
---|
7382 | t_surf_wall_v(0)%t, tmp_surf_wall_v(0)%t, & |
---|
7383 | surf_usm_v(0)%start_index, & |
---|
7384 | start_index_on_file, & |
---|
7385 | end_index_on_file, & |
---|
7386 | nxlc, nysc, & |
---|
7387 | nxlf, nxrf, nysf, nynf, & |
---|
7388 | nys_on_file, nyn_on_file, & |
---|
7389 | nxl_on_file,nxr_on_file ) |
---|
7390 | #else |
---|
7391 | IF ( k == 1 ) THEN |
---|
7392 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(0)%t ) ) & |
---|
7393 | ALLOCATE( t_surf_wall_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7394 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
7395 | ENDIF |
---|
7396 | CALL surface_restore_elements( & |
---|
7397 | t_surf_wall_v_1(0)%t, tmp_surf_wall_v(0)%t, & |
---|
7398 | surf_usm_v(0)%start_index, & |
---|
7399 | start_index_on_file, & |
---|
7400 | end_index_on_file, & |
---|
7401 | nxlc, nysc, & |
---|
7402 | nxlf, nxrf, nysf, nynf, & |
---|
7403 | nys_on_file, nyn_on_file, & |
---|
7404 | nxl_on_file,nxr_on_file ) |
---|
7405 | #endif |
---|
7406 | |
---|
7407 | CASE ( 't_surf_wall_v(1)' ) |
---|
7408 | #if defined( __nopointer ) |
---|
7409 | IF ( k == 1 ) THEN |
---|
7410 | IF ( .NOT. ALLOCATED( t_surf_wall_v(1)%t ) ) & |
---|
7411 | ALLOCATE( t_surf_wall_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7412 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
7413 | ENDIF |
---|
7414 | CALL surface_restore_elements( & |
---|
7415 | t_surf_wall_v(1)%t, tmp_surf_wall_v(1)%t, & |
---|
7416 | surf_usm_v(1)%start_index, & |
---|
7417 | start_index_on_file, & |
---|
7418 | end_index_on_file, & |
---|
7419 | nxlc, nysc, & |
---|
7420 | nxlf, nxrf, nysf, nynf, & |
---|
7421 | nys_on_file, nyn_on_file, & |
---|
7422 | nxl_on_file,nxr_on_file ) |
---|
7423 | #else |
---|
7424 | IF ( k == 1 ) THEN |
---|
7425 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(1)%t ) ) & |
---|
7426 | ALLOCATE( t_surf_wall_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7427 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
7428 | ENDIF |
---|
7429 | CALL surface_restore_elements( & |
---|
7430 | t_surf_wall_v_1(1)%t, tmp_surf_wall_v(1)%t, & |
---|
7431 | surf_usm_v(1)%start_index, & |
---|
7432 | start_index_on_file, & |
---|
7433 | end_index_on_file, & |
---|
7434 | nxlc, nysc, & |
---|
7435 | nxlf, nxrf, nysf, nynf, & |
---|
7436 | nys_on_file, nyn_on_file, & |
---|
7437 | nxl_on_file,nxr_on_file ) |
---|
7438 | #endif |
---|
7439 | |
---|
7440 | CASE ( 't_surf_wall_v(2)' ) |
---|
7441 | #if defined( __nopointer ) |
---|
7442 | IF ( k == 1 ) THEN |
---|
7443 | IF ( .NOT. ALLOCATED( t_surf_wall_v(2)%t ) ) & |
---|
7444 | ALLOCATE( t_surf_wall_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7445 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
7446 | ENDIF |
---|
7447 | CALL surface_restore_elements( & |
---|
7448 | t_surf_wall_v(2)%t, tmp_surf_wall_v(2)%t, & |
---|
7449 | surf_usm_v(2)%start_index, & |
---|
7450 | start_index_on_file, & |
---|
7451 | end_index_on_file, & |
---|
7452 | nxlc, nysc, & |
---|
7453 | nxlf, nxrf, nysf, nynf, & |
---|
7454 | nys_on_file, nyn_on_file, & |
---|
7455 | nxl_on_file,nxr_on_file ) |
---|
7456 | #else |
---|
7457 | IF ( k == 1 ) THEN |
---|
7458 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(2)%t ) ) & |
---|
7459 | ALLOCATE( t_surf_wall_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7460 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
7461 | ENDIF |
---|
7462 | CALL surface_restore_elements( & |
---|
7463 | t_surf_wall_v_1(2)%t, tmp_surf_wall_v(2)%t, & |
---|
7464 | surf_usm_v(2)%start_index, & |
---|
7465 | start_index_on_file, & |
---|
7466 | end_index_on_file, & |
---|
7467 | nxlc, nysc, & |
---|
7468 | nxlf, nxrf, nysf, nynf, & |
---|
7469 | nys_on_file, nyn_on_file, & |
---|
7470 | nxl_on_file,nxr_on_file ) |
---|
7471 | #endif |
---|
7472 | |
---|
7473 | CASE ( 't_surf_wall_v(3)' ) |
---|
7474 | #if defined( __nopointer ) |
---|
7475 | IF ( k == 1 ) THEN |
---|
7476 | IF ( .NOT. ALLOCATED( t_surf_wall_v(3)%t ) ) & |
---|
7477 | ALLOCATE( t_surf_wall_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7478 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
7479 | ENDIF |
---|
7480 | CALL surface_restore_elements( & |
---|
7481 | t_surf_wall_v(3)%t, tmp_surf_wall_v(3)%t, & |
---|
7482 | surf_usm_v(3)%start_index, & |
---|
7483 | start_index_on_file, & |
---|
7484 | end_index_on_file, & |
---|
7485 | nxlc, nysc, & |
---|
7486 | nxlf, nxrf, nysf, nynf, & |
---|
7487 | nys_on_file, nyn_on_file, & |
---|
7488 | nxl_on_file,nxr_on_file ) |
---|
7489 | #else |
---|
7490 | IF ( k == 1 ) THEN |
---|
7491 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(3)%t ) ) & |
---|
7492 | ALLOCATE( t_surf_wall_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7493 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
7494 | ENDIF |
---|
7495 | CALL surface_restore_elements( & |
---|
7496 | t_surf_wall_v_1(3)%t, tmp_surf_wall_v(3)%t, & |
---|
7497 | surf_usm_v(3)%start_index, & |
---|
7498 | start_index_on_file, & |
---|
7499 | end_index_on_file, & |
---|
7500 | nxlc, nysc, & |
---|
7501 | nxlf, nxrf, nysf, nynf, & |
---|
7502 | nys_on_file, nyn_on_file, & |
---|
7503 | nxl_on_file,nxr_on_file ) |
---|
7504 | #endif |
---|
7505 | CASE ( 't_surf_green_h' ) |
---|
7506 | #if defined( __nopointer ) |
---|
7507 | IF ( k == 1 ) THEN |
---|
7508 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
7509 | ALLOCATE( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
7510 | READ ( 13 ) tmp_surf_green_h |
---|
7511 | ENDIF |
---|
7512 | CALL surface_restore_elements( & |
---|
7513 | t_surf_green_h, tmp_surf_green_h, & |
---|
7514 | surf_usm_h%start_index, & |
---|
7515 | start_index_on_file, & |
---|
7516 | end_index_on_file, & |
---|
7517 | nxlc, nysc, & |
---|
7518 | nxlf, nxrf, nysf, nynf, & |
---|
7519 | nys_on_file, nyn_on_file, & |
---|
7520 | nxl_on_file,nxr_on_file ) |
---|
7521 | #else |
---|
7522 | IF ( k == 1 ) THEN |
---|
7523 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
7524 | ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
7525 | READ ( 13 ) tmp_surf_green_h |
---|
7526 | ENDIF |
---|
7527 | CALL surface_restore_elements( & |
---|
7528 | t_surf_green_h_1, tmp_surf_green_h, & |
---|
7529 | surf_usm_h%start_index, & |
---|
7530 | start_index_on_file, & |
---|
7531 | end_index_on_file, & |
---|
7532 | nxlc, nysc, & |
---|
7533 | nxlf, nxrf, nysf, nynf, & |
---|
7534 | nys_on_file, nyn_on_file, & |
---|
7535 | nxl_on_file,nxr_on_file ) |
---|
7536 | #endif |
---|
7537 | |
---|
7538 | CASE ( 't_surf_green_v(0)' ) |
---|
7539 | #if defined( __nopointer ) |
---|
7540 | IF ( k == 1 ) THEN |
---|
7541 | IF ( .NOT. ALLOCATED( t_surf_green_v(0)%t ) ) & |
---|
7542 | ALLOCATE( t_surf_green_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7543 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
7544 | ENDIF |
---|
7545 | CALL surface_restore_elements( & |
---|
7546 | t_surf_green_v(0)%t, & |
---|
7547 | tmp_surf_green_v(0)%t, & |
---|
7548 | surf_usm_v(0)%start_index, & |
---|
7549 | start_index_on_file, & |
---|
7550 | end_index_on_file, & |
---|
7551 | nxlc, nysc, & |
---|
7552 | nxlf, nxrf, nysf, nynf, & |
---|
7553 | nys_on_file, nyn_on_file, & |
---|
7554 | nxl_on_file,nxr_on_file ) |
---|
7555 | #else |
---|
7556 | IF ( k == 1 ) THEN |
---|
7557 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(0)%t ) ) & |
---|
7558 | ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7559 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
7560 | ENDIF |
---|
7561 | CALL surface_restore_elements( & |
---|
7562 | t_surf_green_v_1(0)%t, & |
---|
7563 | tmp_surf_green_v(0)%t, & |
---|
7564 | surf_usm_v(0)%start_index, & |
---|
7565 | start_index_on_file, & |
---|
7566 | end_index_on_file, & |
---|
7567 | nxlc, nysc, & |
---|
7568 | nxlf, nxrf, nysf, nynf, & |
---|
7569 | nys_on_file, nyn_on_file, & |
---|
7570 | nxl_on_file,nxr_on_file ) |
---|
7571 | #endif |
---|
7572 | |
---|
7573 | CASE ( 't_surf_green_v(1)' ) |
---|
7574 | #if defined( __nopointer ) |
---|
7575 | IF ( k == 1 ) THEN |
---|
7576 | IF ( .NOT. ALLOCATED( t_surf_green_v(1)%t ) ) & |
---|
7577 | ALLOCATE( t_surf_green_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7578 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
7579 | ENDIF |
---|
7580 | CALL surface_restore_elements( & |
---|
7581 | t_surf_green_v(1)%t, & |
---|
7582 | tmp_surf_green_v(1)%t, & |
---|
7583 | surf_usm_v(1)%start_index, & |
---|
7584 | start_index_on_file, & |
---|
7585 | end_index_on_file, & |
---|
7586 | nxlc, nysc, & |
---|
7587 | nxlf, nxrf, nysf, nynf, & |
---|
7588 | nys_on_file, nyn_on_file, & |
---|
7589 | nxl_on_file,nxr_on_file ) |
---|
7590 | #else |
---|
7591 | IF ( k == 1 ) THEN |
---|
7592 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(1)%t ) ) & |
---|
7593 | ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7594 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
7595 | ENDIF |
---|
7596 | CALL surface_restore_elements( & |
---|
7597 | t_surf_green_v_1(1)%t, & |
---|
7598 | tmp_surf_green_v(1)%t, & |
---|
7599 | surf_usm_v(1)%start_index, & |
---|
7600 | start_index_on_file, & |
---|
7601 | end_index_on_file, & |
---|
7602 | nxlc, nysc, & |
---|
7603 | nxlf, nxrf, nysf, nynf, & |
---|
7604 | nys_on_file, nyn_on_file, & |
---|
7605 | nxl_on_file,nxr_on_file ) |
---|
7606 | #endif |
---|
7607 | |
---|
7608 | CASE ( 't_surf_green_v(2)' ) |
---|
7609 | #if defined( __nopointer ) |
---|
7610 | IF ( k == 1 ) THEN |
---|
7611 | IF ( .NOT. ALLOCATED( t_surf_green_v(2)%t ) ) & |
---|
7612 | ALLOCATE( t_surf_green_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7613 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
7614 | ENDIF |
---|
7615 | CALL surface_restore_elements( & |
---|
7616 | t_surf_green_v(2)%t, & |
---|
7617 | tmp_surf_green_v(2)%t, & |
---|
7618 | surf_usm_v(2)%start_index, & |
---|
7619 | start_index_on_file, & |
---|
7620 | end_index_on_file, & |
---|
7621 | nxlc, nysc, & |
---|
7622 | nxlf, nxrf, nysf, nynf, & |
---|
7623 | nys_on_file, nyn_on_file, & |
---|
7624 | nxl_on_file,nxr_on_file ) |
---|
7625 | #else |
---|
7626 | IF ( k == 1 ) THEN |
---|
7627 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(2)%t ) ) & |
---|
7628 | ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7629 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
7630 | ENDIF |
---|
7631 | CALL surface_restore_elements( & |
---|
7632 | t_surf_green_v_1(2)%t, & |
---|
7633 | tmp_surf_green_v(2)%t, & |
---|
7634 | surf_usm_v(2)%start_index, & |
---|
7635 | start_index_on_file, & |
---|
7636 | end_index_on_file, & |
---|
7637 | nxlc, nysc, & |
---|
7638 | nxlf, nxrf, nysf, nynf, & |
---|
7639 | nys_on_file, nyn_on_file, & |
---|
7640 | nxl_on_file,nxr_on_file ) |
---|
7641 | #endif |
---|
7642 | |
---|
7643 | CASE ( 't_surf_green_v(3)' ) |
---|
7644 | #if defined( __nopointer ) |
---|
7645 | IF ( k == 1 ) THEN |
---|
7646 | IF ( .NOT. ALLOCATED( t_surf_green_v(3)%t ) ) & |
---|
7647 | ALLOCATE( t_surf_green_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7648 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
7649 | ENDIF |
---|
7650 | CALL surface_restore_elements( & |
---|
7651 | t_surf_green_v(3)%t, & |
---|
7652 | tmp_surf_green_v(3)%t, & |
---|
7653 | surf_usm_v(3)%start_index, & |
---|
7654 | start_index_on_file, & |
---|
7655 | end_index_on_file, & |
---|
7656 | nxlc, nysc, & |
---|
7657 | nxlf, nxrf, nysf, nynf, & |
---|
7658 | nys_on_file, nyn_on_file, & |
---|
7659 | nxl_on_file,nxr_on_file ) |
---|
7660 | #else |
---|
7661 | IF ( k == 1 ) THEN |
---|
7662 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(3)%t ) ) & |
---|
7663 | ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7664 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
7665 | ENDIF |
---|
7666 | CALL surface_restore_elements( & |
---|
7667 | t_surf_green_v_1(3)%t, & |
---|
7668 | tmp_surf_green_v(3)%t, & |
---|
7669 | surf_usm_v(3)%start_index, & |
---|
7670 | start_index_on_file, & |
---|
7671 | end_index_on_file, & |
---|
7672 | nxlc, nysc, & |
---|
7673 | nxlf, nxrf, nysf, nynf, & |
---|
7674 | nys_on_file, nyn_on_file, & |
---|
7675 | nxl_on_file,nxr_on_file ) |
---|
7676 | #endif |
---|
7677 | CASE ( 't_surf_window_h' ) |
---|
7678 | #if defined( __nopointer ) |
---|
7679 | IF ( k == 1 ) THEN |
---|
7680 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
7681 | ALLOCATE( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
7682 | READ ( 13 ) tmp_surf_window_h |
---|
7683 | ENDIF |
---|
7684 | CALL surface_restore_elements( & |
---|
7685 | t_surf_window_h, tmp_surf_window_h, & |
---|
7686 | surf_usm_h%start_index, & |
---|
7687 | start_index_on_file, & |
---|
7688 | end_index_on_file, & |
---|
7689 | nxlc, nysc, & |
---|
7690 | nxlf, nxrf, nysf, nynf, & |
---|
7691 | nys_on_file, nyn_on_file, & |
---|
7692 | nxl_on_file,nxr_on_file ) |
---|
7693 | #else |
---|
7694 | IF ( k == 1 ) THEN |
---|
7695 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
7696 | ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
7697 | READ ( 13 ) tmp_surf_window_h |
---|
7698 | ENDIF |
---|
7699 | CALL surface_restore_elements( & |
---|
7700 | t_surf_window_h_1, & |
---|
7701 | tmp_surf_window_h, & |
---|
7702 | surf_usm_h%start_index, & |
---|
7703 | start_index_on_file, & |
---|
7704 | end_index_on_file, & |
---|
7705 | nxlc, nysc, & |
---|
7706 | nxlf, nxrf, nysf, nynf, & |
---|
7707 | nys_on_file, nyn_on_file, & |
---|
7708 | nxl_on_file,nxr_on_file ) |
---|
7709 | #endif |
---|
7710 | |
---|
7711 | CASE ( 't_surf_window_v(0)' ) |
---|
7712 | #if defined( __nopointer ) |
---|
7713 | IF ( k == 1 ) THEN |
---|
7714 | IF ( .NOT. ALLOCATED( t_surf_window_v(0)%t ) ) & |
---|
7715 | ALLOCATE( t_surf_window_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7716 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
7717 | ENDIF |
---|
7718 | CALL surface_restore_elements( & |
---|
7719 | t_surf_window_v(0)%t, & |
---|
7720 | tmp_surf_window_v(0)%t, & |
---|
7721 | surf_usm_v(0)%start_index, & |
---|
7722 | start_index_on_file, & |
---|
7723 | end_index_on_file, & |
---|
7724 | nxlc, nysc, & |
---|
7725 | nxlf, nxrf, nysf, nynf, & |
---|
7726 | nys_on_file, nyn_on_file, & |
---|
7727 | nxl_on_file,nxr_on_file ) |
---|
7728 | #else |
---|
7729 | IF ( k == 1 ) THEN |
---|
7730 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(0)%t ) ) & |
---|
7731 | ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7732 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
7733 | ENDIF |
---|
7734 | CALL surface_restore_elements( & |
---|
7735 | t_surf_window_v_1(0)%t, & |
---|
7736 | tmp_surf_window_v(0)%t, & |
---|
7737 | surf_usm_v(0)%start_index, & |
---|
7738 | start_index_on_file, & |
---|
7739 | end_index_on_file, & |
---|
7740 | nxlc, nysc, & |
---|
7741 | nxlf, nxrf, nysf, nynf, & |
---|
7742 | nys_on_file, nyn_on_file, & |
---|
7743 | nxl_on_file,nxr_on_file ) |
---|
7744 | #endif |
---|
7745 | |
---|
7746 | CASE ( 't_surf_window_v(1)' ) |
---|
7747 | #if defined( __nopointer ) |
---|
7748 | IF ( k == 1 ) THEN |
---|
7749 | IF ( .NOT. ALLOCATED( t_surf_window_v(1)%t ) ) & |
---|
7750 | ALLOCATE( t_surf_window_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7751 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
7752 | ENDIF |
---|
7753 | CALL surface_restore_elements( & |
---|
7754 | t_surf_window_v(1)%t, & |
---|
7755 | tmp_surf_window_v(1)%t, & |
---|
7756 | surf_usm_v(1)%start_index, & |
---|
7757 | start_index_on_file, & |
---|
7758 | end_index_on_file, & |
---|
7759 | nxlc, nysc, & |
---|
7760 | nxlf, nxrf, nysf, nynf, & |
---|
7761 | nys_on_file, nyn_on_file, & |
---|
7762 | nxl_on_file,nxr_on_file ) |
---|
7763 | #else |
---|
7764 | IF ( k == 1 ) THEN |
---|
7765 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(1)%t ) ) & |
---|
7766 | ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7767 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
7768 | ENDIF |
---|
7769 | CALL surface_restore_elements( & |
---|
7770 | t_surf_window_v_1(1)%t, & |
---|
7771 | tmp_surf_window_v(1)%t, & |
---|
7772 | surf_usm_v(1)%start_index, & |
---|
7773 | start_index_on_file, & |
---|
7774 | end_index_on_file, & |
---|
7775 | nxlc, nysc, & |
---|
7776 | nxlf, nxrf, nysf, nynf, & |
---|
7777 | nys_on_file, nyn_on_file, & |
---|
7778 | nxl_on_file,nxr_on_file ) |
---|
7779 | #endif |
---|
7780 | |
---|
7781 | CASE ( 't_surf_window_v(2)' ) |
---|
7782 | #if defined( __nopointer ) |
---|
7783 | IF ( k == 1 ) THEN |
---|
7784 | IF ( .NOT. ALLOCATED( t_surf_window_v(2)%t ) ) & |
---|
7785 | ALLOCATE( t_surf_window_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7786 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
7787 | ENDIF |
---|
7788 | CALL surface_restore_elements( & |
---|
7789 | t_surf_window_v(2)%t, & |
---|
7790 | tmp_surf_window_v(2)%t, & |
---|
7791 | surf_usm_v(2)%start_index, & |
---|
7792 | start_index_on_file, & |
---|
7793 | end_index_on_file, & |
---|
7794 | nxlc, nysc, & |
---|
7795 | nxlf, nxrf, nysf, nynf, & |
---|
7796 | nys_on_file, nyn_on_file, & |
---|
7797 | nxl_on_file,nxr_on_file ) |
---|
7798 | #else |
---|
7799 | IF ( k == 1 ) THEN |
---|
7800 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(2)%t ) ) & |
---|
7801 | ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7802 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
7803 | ENDIF |
---|
7804 | CALL surface_restore_elements( & |
---|
7805 | t_surf_window_v_1(2)%t, & |
---|
7806 | tmp_surf_window_v(2)%t, & |
---|
7807 | surf_usm_v(2)%start_index, & |
---|
7808 | start_index_on_file, & |
---|
7809 | end_index_on_file, & |
---|
7810 | nxlc, nysc, & |
---|
7811 | nxlf, nxrf, nysf, nynf, & |
---|
7812 | nys_on_file, nyn_on_file, & |
---|
7813 | nxl_on_file,nxr_on_file ) |
---|
7814 | #endif |
---|
7815 | |
---|
7816 | CASE ( 't_surf_window_v(3)' ) |
---|
7817 | #if defined( __nopointer ) |
---|
7818 | IF ( k == 1 ) THEN |
---|
7819 | IF ( .NOT. ALLOCATED( t_surf_window_v(3)%t ) ) & |
---|
7820 | ALLOCATE( t_surf_window_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7821 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
7822 | ENDIF |
---|
7823 | CALL surface_restore_elements( & |
---|
7824 | t_surf_window_v(3)%t, & |
---|
7825 | tmp_surf_window_v(3)%t, & |
---|
7826 | surf_usm_v(3)%start_index, & |
---|
7827 | start_index_on_file, & |
---|
7828 | end_index_on_file, & |
---|
7829 | nxlc, nysc, & |
---|
7830 | nxlf, nxrf, nysf, nynf, & |
---|
7831 | nys_on_file, nyn_on_file, & |
---|
7832 | nxl_on_file,nxr_on_file ) |
---|
7833 | #else |
---|
7834 | IF ( k == 1 ) THEN |
---|
7835 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(3)%t ) ) & |
---|
7836 | ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7837 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
7838 | ENDIF |
---|
7839 | CALL surface_restore_elements( & |
---|
7840 | t_surf_window_v_1(3)%t, & |
---|
7841 | tmp_surf_window_v(3)%t, & |
---|
7842 | surf_usm_v(3)%start_index, & |
---|
7843 | start_index_on_file, & |
---|
7844 | end_index_on_file, & |
---|
7845 | nxlc, nysc, & |
---|
7846 | nxlf, nxrf, nysf, nynf, & |
---|
7847 | nys_on_file, nyn_on_file, & |
---|
7848 | nxl_on_file,nxr_on_file ) |
---|
7849 | #endif |
---|
7850 | CASE ( 't_wall_h' ) |
---|
7851 | #if defined( __nopointer ) |
---|
7852 | IF ( k == 1 ) THEN |
---|
7853 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
7854 | ALLOCATE( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
7855 | READ ( 13 ) tmp_wall_h |
---|
7856 | ENDIF |
---|
7857 | CALL surface_restore_elements( & |
---|
7858 | t_wall_h, tmp_wall_h, & |
---|
7859 | surf_usm_h%start_index, & |
---|
7860 | start_index_on_file, & |
---|
7861 | end_index_on_file, & |
---|
7862 | nxlc, nysc, & |
---|
7863 | nxlf, nxrf, nysf, nynf, & |
---|
7864 | nys_on_file, nyn_on_file, & |
---|
7865 | nxl_on_file,nxr_on_file ) |
---|
7866 | #else |
---|
7867 | IF ( k == 1 ) THEN |
---|
7868 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
7869 | ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1, & |
---|
7870 | 1:surf_usm_h%ns) ) |
---|
7871 | READ ( 13 ) tmp_wall_h |
---|
7872 | ENDIF |
---|
7873 | CALL surface_restore_elements( & |
---|
7874 | t_wall_h_1, tmp_wall_h, & |
---|
7875 | surf_usm_h%start_index, & |
---|
7876 | start_index_on_file, & |
---|
7877 | end_index_on_file, & |
---|
7878 | nxlc, nysc, & |
---|
7879 | nxlf, nxrf, nysf, nynf, & |
---|
7880 | nys_on_file, nyn_on_file, & |
---|
7881 | nxl_on_file,nxr_on_file ) |
---|
7882 | #endif |
---|
7883 | CASE ( 't_wall_v(0)' ) |
---|
7884 | #if defined( __nopointer ) |
---|
7885 | IF ( k == 1 ) THEN |
---|
7886 | IF ( .NOT. ALLOCATED( t_wall_v(0)%t ) ) & |
---|
7887 | ALLOCATE( t_wall_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
7888 | 1:surf_usm_v(0)%ns) ) |
---|
7889 | READ ( 13 ) tmp_wall_v(0)%t |
---|
7890 | ENDIF |
---|
7891 | CALL surface_restore_elements( & |
---|
7892 | t_wall_v(0)%t, tmp_wall_v(0)%t, & |
---|
7893 | surf_usm_v(0)%start_index, & |
---|
7894 | start_index_on_file, & |
---|
7895 | end_index_on_file, & |
---|
7896 | nxlc, nysc, & |
---|
7897 | nxlf, nxrf, nysf, nynf, & |
---|
7898 | nys_on_file, nyn_on_file, & |
---|
7899 | nxl_on_file,nxr_on_file ) |
---|
7900 | #else |
---|
7901 | IF ( k == 1 ) THEN |
---|
7902 | IF ( .NOT. ALLOCATED( t_wall_v_1(0)%t ) ) & |
---|
7903 | ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
7904 | 1:surf_usm_v(0)%ns) ) |
---|
7905 | READ ( 13 ) tmp_wall_v(0)%t |
---|
7906 | ENDIF |
---|
7907 | CALL surface_restore_elements( & |
---|
7908 | t_wall_v_1(0)%t, tmp_wall_v(0)%t, & |
---|
7909 | surf_usm_v(0)%start_index, & |
---|
7910 | start_index_on_file, & |
---|
7911 | end_index_on_file, & |
---|
7912 | nxlc, nysc, & |
---|
7913 | nxlf, nxrf, nysf, nynf, & |
---|
7914 | nys_on_file, nyn_on_file, & |
---|
7915 | nxl_on_file,nxr_on_file ) |
---|
7916 | #endif |
---|
7917 | CASE ( 't_wall_v(1)' ) |
---|
7918 | #if defined( __nopointer ) |
---|
7919 | IF ( k == 1 ) THEN |
---|
7920 | IF ( .NOT. ALLOCATED( t_wall_v(1)%t ) ) & |
---|
7921 | ALLOCATE( t_wall_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
7922 | 1:surf_usm_v(1)%ns) ) |
---|
7923 | READ ( 13 ) tmp_wall_v(1)%t |
---|
7924 | ENDIF |
---|
7925 | CALL surface_restore_elements( & |
---|
7926 | t_wall_v(1)%t, tmp_wall_v(1)%t, & |
---|
7927 | surf_usm_v(1)%start_index, & |
---|
7928 | start_index_on_file, & |
---|
7929 | end_index_on_file , & |
---|
7930 | nxlc, nysc, & |
---|
7931 | nxlf, nxrf, nysf, nynf, & |
---|
7932 | nys_on_file, nyn_on_file, & |
---|
7933 | nxl_on_file, nxr_on_file ) |
---|
7934 | #else |
---|
7935 | IF ( k == 1 ) THEN |
---|
7936 | IF ( .NOT. ALLOCATED( t_wall_v_1(1)%t ) ) & |
---|
7937 | ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
7938 | 1:surf_usm_v(1)%ns) ) |
---|
7939 | READ ( 13 ) tmp_wall_v(1)%t |
---|
7940 | ENDIF |
---|
7941 | CALL surface_restore_elements( & |
---|
7942 | t_wall_v_1(1)%t, tmp_wall_v(1)%t, & |
---|
7943 | surf_usm_v(1)%start_index, & |
---|
7944 | start_index_on_file, & |
---|
7945 | end_index_on_file, & |
---|
7946 | nxlc, nysc, & |
---|
7947 | nxlf, nxrf, nysf, nynf, & |
---|
7948 | nys_on_file, nyn_on_file, & |
---|
7949 | nxl_on_file,nxr_on_file ) |
---|
7950 | #endif |
---|
7951 | CASE ( 't_wall_v(2)' ) |
---|
7952 | #if defined( __nopointer ) |
---|
7953 | IF ( k == 1 ) THEN |
---|
7954 | IF ( .NOT. ALLOCATED( t_wall_v(2)%t ) ) & |
---|
7955 | ALLOCATE( t_wall_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
7956 | 1:surf_usm_v(2)%ns) ) |
---|
7957 | READ ( 13 ) tmp_wall_v(2)%t |
---|
7958 | ENDIF |
---|
7959 | CALL surface_restore_elements( & |
---|
7960 | t_wall_v(2)%t, tmp_wall_v(2)%t, & |
---|
7961 | surf_usm_v(2)%start_index, & |
---|
7962 | start_index_on_file, & |
---|
7963 | end_index_on_file, & |
---|
7964 | nxlc, nysc, & |
---|
7965 | nxlf, nxrf, nysf, nynf, & |
---|
7966 | nys_on_file, nyn_on_file, & |
---|
7967 | nxl_on_file,nxr_on_file ) |
---|
7968 | #else |
---|
7969 | IF ( k == 1 ) THEN |
---|
7970 | IF ( .NOT. ALLOCATED( t_wall_v_1(2)%t ) ) & |
---|
7971 | ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
7972 | 1:surf_usm_v(2)%ns) ) |
---|
7973 | READ ( 13 ) tmp_wall_v(2)%t |
---|
7974 | ENDIF |
---|
7975 | CALL surface_restore_elements( & |
---|
7976 | t_wall_v_1(2)%t, tmp_wall_v(2)%t, & |
---|
7977 | surf_usm_v(2)%start_index, & |
---|
7978 | start_index_on_file, & |
---|
7979 | end_index_on_file , & |
---|
7980 | nxlc, nysc, & |
---|
7981 | nxlf, nxrf, nysf, nynf, & |
---|
7982 | nys_on_file, nyn_on_file, & |
---|
7983 | nxl_on_file,nxr_on_file ) |
---|
7984 | #endif |
---|
7985 | CASE ( 't_wall_v(3)' ) |
---|
7986 | #if defined( __nopointer ) |
---|
7987 | IF ( k == 1 ) THEN |
---|
7988 | IF ( .NOT. ALLOCATED( t_wall_v(3)%t ) ) & |
---|
7989 | ALLOCATE( t_wall_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
7990 | 1:surf_usm_v(3)%ns) ) |
---|
7991 | READ ( 13 ) tmp_wall_v(3)%t |
---|
7992 | ENDIF |
---|
7993 | CALL surface_restore_elements( & |
---|
7994 | t_wall_v(3)%t, tmp_wall_v(3)%t, & |
---|
7995 | surf_usm_v(3)%start_index, & |
---|
7996 | start_index_on_file, & |
---|
7997 | end_index_on_file, & |
---|
7998 | nxlc, nysc, & |
---|
7999 | nxlf, nxrf, nysf, nynf, & |
---|
8000 | nys_on_file, nyn_on_file, & |
---|
8001 | nxl_on_file,nxr_on_file ) |
---|
8002 | #else |
---|
8003 | IF ( k == 1 ) THEN |
---|
8004 | IF ( .NOT. ALLOCATED( t_wall_v_1(3)%t ) ) & |
---|
8005 | ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
8006 | 1:surf_usm_v(3)%ns) ) |
---|
8007 | READ ( 13 ) tmp_wall_v(3)%t |
---|
8008 | ENDIF |
---|
8009 | CALL surface_restore_elements( & |
---|
8010 | t_wall_v_1(3)%t, tmp_wall_v(3)%t, & |
---|
8011 | surf_usm_v(3)%start_index, & |
---|
8012 | start_index_on_file, & |
---|
8013 | end_index_on_file, & |
---|
8014 | nxlc, nysc, & |
---|
8015 | nxlf, nxrf, nysf, nynf, & |
---|
8016 | nys_on_file, nyn_on_file, & |
---|
8017 | nxl_on_file,nxr_on_file ) |
---|
8018 | #endif |
---|
8019 | CASE ( 't_green_h' ) |
---|
8020 | #if defined( __nopointer ) |
---|
8021 | IF ( k == 1 ) THEN |
---|
8022 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
8023 | ALLOCATE( t_green_h(nzb_wall:nzt_wall+1, & |
---|
8024 | 1:surf_usm_h%ns) ) |
---|
8025 | READ ( 13 ) tmp_green_h |
---|
8026 | ENDIF |
---|
8027 | CALL surface_restore_elements( & |
---|
8028 | t_green_h, tmp_green_h, & |
---|
8029 | surf_usm_h%start_index, & |
---|
8030 | start_index_on_file, & |
---|
8031 | end_index_on_file, & |
---|
8032 | nxlc, nysc, & |
---|
8033 | nxlf, nxrf, nysf, nynf, & |
---|
8034 | nys_on_file, nyn_on_file, & |
---|
8035 | nxl_on_file,nxr_on_file ) |
---|
8036 | #else |
---|
8037 | IF ( k == 1 ) THEN |
---|
8038 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
8039 | ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1, & |
---|
8040 | 1:surf_usm_h%ns) ) |
---|
8041 | READ ( 13 ) tmp_green_h |
---|
8042 | ENDIF |
---|
8043 | CALL surface_restore_elements( & |
---|
8044 | t_green_h_1, tmp_green_h, & |
---|
8045 | surf_usm_h%start_index, & |
---|
8046 | start_index_on_file, & |
---|
8047 | end_index_on_file, & |
---|
8048 | nxlc, nysc, & |
---|
8049 | nxlf, nxrf, nysf, nynf, & |
---|
8050 | nys_on_file, nyn_on_file, & |
---|
8051 | nxl_on_file,nxr_on_file ) |
---|
8052 | #endif |
---|
8053 | CASE ( 't_green_v(0)' ) |
---|
8054 | #if defined( __nopointer ) |
---|
8055 | IF ( k == 1 ) THEN |
---|
8056 | IF ( .NOT. ALLOCATED( t_green_v(0)%t ) ) & |
---|
8057 | ALLOCATE( t_green_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
8058 | 1:surf_usm_v(0)%ns) ) |
---|
8059 | READ ( 13 ) tmp_green_v(0)%t |
---|
8060 | ENDIF |
---|
8061 | CALL surface_restore_elements( & |
---|
8062 | t_green_v(0)%t, tmp_green_v(0)%t, & |
---|
8063 | surf_usm_v(0)%start_index, & |
---|
8064 | start_index_on_file, & |
---|
8065 | end_index_on_file, & |
---|
8066 | nxlc, nysc, & |
---|
8067 | nxlf, nxrf, nysf, nynf, & |
---|
8068 | nys_on_file, nyn_on_file, & |
---|
8069 | nxl_on_file,nxr_on_file ) |
---|
8070 | #else |
---|
8071 | IF ( k == 1 ) THEN |
---|
8072 | IF ( .NOT. ALLOCATED( t_green_v_1(0)%t ) ) & |
---|
8073 | ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
8074 | 1:surf_usm_v(0)%ns) ) |
---|
8075 | READ ( 13 ) tmp_green_v(0)%t |
---|
8076 | ENDIF |
---|
8077 | CALL surface_restore_elements( & |
---|
8078 | t_green_v_1(0)%t, tmp_green_v(0)%t, & |
---|
8079 | surf_usm_v(0)%start_index, & |
---|
8080 | start_index_on_file, & |
---|
8081 | end_index_on_file, & |
---|
8082 | nxlc, nysc, & |
---|
8083 | nxlf, nxrf, nysf, nynf, & |
---|
8084 | nys_on_file, nyn_on_file, & |
---|
8085 | nxl_on_file,nxr_on_file ) |
---|
8086 | #endif |
---|
8087 | CASE ( 't_green_v(1)' ) |
---|
8088 | #if defined( __nopointer ) |
---|
8089 | IF ( k == 1 ) THEN |
---|
8090 | IF ( .NOT. ALLOCATED( t_green_v(1)%t ) ) & |
---|
8091 | ALLOCATE( t_green_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
8092 | 1:surf_usm_v(1)%ns) ) |
---|
8093 | READ ( 13 ) tmp_green_v(1)%t |
---|
8094 | ENDIF |
---|
8095 | CALL surface_restore_elements( & |
---|
8096 | t_green_v(1)%t, tmp_green_v(1)%t, & |
---|
8097 | surf_usm_v(1)%start_index, & |
---|
8098 | start_index_on_file, & |
---|
8099 | end_index_on_file , & |
---|
8100 | nxlc, nysc, & |
---|
8101 | nxlf, nxrf, nysf, nynf, & |
---|
8102 | nys_on_file, nyn_on_file, & |
---|
8103 | nxl_on_file,nxr_on_file ) |
---|
8104 | #else |
---|
8105 | IF ( k == 1 ) THEN |
---|
8106 | IF ( .NOT. ALLOCATED( t_green_v_1(1)%t ) ) & |
---|
8107 | ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
8108 | 1:surf_usm_v(1)%ns) ) |
---|
8109 | READ ( 13 ) tmp_green_v(1)%t |
---|
8110 | ENDIF |
---|
8111 | CALL surface_restore_elements( & |
---|
8112 | t_green_v_1(1)%t, tmp_green_v(1)%t, & |
---|
8113 | surf_usm_v(1)%start_index, & |
---|
8114 | start_index_on_file, & |
---|
8115 | end_index_on_file, & |
---|
8116 | nxlc, nysc, & |
---|
8117 | nxlf, nxrf, nysf, nynf, & |
---|
8118 | nys_on_file, nyn_on_file, & |
---|
8119 | nxl_on_file,nxr_on_file ) |
---|
8120 | #endif |
---|
8121 | CASE ( 't_green_v(2)' ) |
---|
8122 | #if defined( __nopointer ) |
---|
8123 | IF ( k == 1 ) THEN |
---|
8124 | IF ( .NOT. ALLOCATED( t_green_v(2)%t ) ) & |
---|
8125 | ALLOCATE( t_green_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
8126 | 1:surf_usm_v(2)%ns) ) |
---|
8127 | READ ( 13 ) tmp_green_v(2)%t |
---|
8128 | ENDIF |
---|
8129 | CALL surface_restore_elements( & |
---|
8130 | t_green_v(2)%t, tmp_green_v(2)%t, & |
---|
8131 | surf_usm_v(2)%start_index, & |
---|
8132 | start_index_on_file, & |
---|
8133 | end_index_on_file, & |
---|
8134 | nxlc, nysc, & |
---|
8135 | nxlf, nxrf, nysf, nynf, & |
---|
8136 | nys_on_file, nyn_on_file, & |
---|
8137 | nxl_on_file,nxr_on_file ) |
---|
8138 | #else |
---|
8139 | IF ( k == 1 ) THEN |
---|
8140 | IF ( .NOT. ALLOCATED( t_green_v_1(2)%t ) ) & |
---|
8141 | ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
8142 | 1:surf_usm_v(2)%ns) ) |
---|
8143 | READ ( 13 ) tmp_green_v(2)%t |
---|
8144 | ENDIF |
---|
8145 | CALL surface_restore_elements( & |
---|
8146 | t_green_v_1(2)%t, tmp_green_v(2)%t, & |
---|
8147 | surf_usm_v(2)%start_index, & |
---|
8148 | start_index_on_file, & |
---|
8149 | end_index_on_file , & |
---|
8150 | nxlc, nysc, & |
---|
8151 | nxlf, nxrf, nysf, nynf, & |
---|
8152 | nys_on_file, nyn_on_file, & |
---|
8153 | nxl_on_file,nxr_on_file ) |
---|
8154 | #endif |
---|
8155 | CASE ( 't_green_v(3)' ) |
---|
8156 | #if defined( __nopointer ) |
---|
8157 | IF ( k == 1 ) THEN |
---|
8158 | IF ( .NOT. ALLOCATED( t_green_v(3)%t ) ) & |
---|
8159 | ALLOCATE( t_green_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
8160 | 1:surf_usm_v(3)%ns) ) |
---|
8161 | READ ( 13 ) tmp_green_v(3)%t |
---|
8162 | ENDIF |
---|
8163 | CALL surface_restore_elements( & |
---|
8164 | t_green_v(3)%t, tmp_green_v(3)%t, & |
---|
8165 | surf_usm_v(3)%start_index, & |
---|
8166 | start_index_on_file, & |
---|
8167 | end_index_on_file, & |
---|
8168 | nxlc, nysc, & |
---|
8169 | nxlf, nxrf, nysf, nynf, & |
---|
8170 | nys_on_file, nyn_on_file, & |
---|
8171 | nxl_on_file,nxr_on_file ) |
---|
8172 | #else |
---|
8173 | IF ( k == 1 ) THEN |
---|
8174 | IF ( .NOT. ALLOCATED( t_green_v_1(3)%t ) ) & |
---|
8175 | ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
8176 | 1:surf_usm_v(3)%ns) ) |
---|
8177 | READ ( 13 ) tmp_green_v(3)%t |
---|
8178 | ENDIF |
---|
8179 | CALL surface_restore_elements( & |
---|
8180 | t_green_v_1(3)%t, tmp_green_v(3)%t, & |
---|
8181 | surf_usm_v(3)%start_index, & |
---|
8182 | start_index_on_file, & |
---|
8183 | end_index_on_file, & |
---|
8184 | nxlc, nysc, & |
---|
8185 | nxlf, nxrf, nysf, nynf, & |
---|
8186 | nys_on_file, nyn_on_file, & |
---|
8187 | nxl_on_file,nxr_on_file ) |
---|
8188 | #endif |
---|
8189 | CASE ( 't_window_h' ) |
---|
8190 | #if defined( __nopointer ) |
---|
8191 | IF ( k == 1 ) THEN |
---|
8192 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
8193 | ALLOCATE( t_window_h(nzb_wall:nzt_wall+1, & |
---|
8194 | 1:surf_usm_h%ns) ) |
---|
8195 | READ ( 13 ) tmp_window_h |
---|
8196 | ENDIF |
---|
8197 | CALL surface_restore_elements( & |
---|
8198 | t_window_h, tmp_window_h, & |
---|
8199 | surf_usm_h%start_index, & |
---|
8200 | start_index_on_file, & |
---|
8201 | end_index_on_file, & |
---|
8202 | nxlc, nysc, & |
---|
8203 | nxlf, nxrf, nysf, nynf, & |
---|
8204 | nys_on_file, nyn_on_file, & |
---|
8205 | nxl_on_file,nxr_on_file ) |
---|
8206 | #else |
---|
8207 | IF ( k == 1 ) THEN |
---|
8208 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
8209 | ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1, & |
---|
8210 | 1:surf_usm_h%ns) ) |
---|
8211 | READ ( 13 ) tmp_window_h |
---|
8212 | ENDIF |
---|
8213 | CALL surface_restore_elements( & |
---|
8214 | t_window_h_1, tmp_window_h, & |
---|
8215 | surf_usm_h%start_index, & |
---|
8216 | start_index_on_file, & |
---|
8217 | end_index_on_file, & |
---|
8218 | nxlc, nysc, & |
---|
8219 | nxlf, nxrf, nysf, nynf, & |
---|
8220 | nys_on_file, nyn_on_file, & |
---|
8221 | nxl_on_file, nxr_on_file ) |
---|
8222 | #endif |
---|
8223 | CASE ( 't_window_v(0)' ) |
---|
8224 | #if defined( __nopointer ) |
---|
8225 | IF ( k == 1 ) THEN |
---|
8226 | IF ( .NOT. ALLOCATED( t_window_v(0)%t ) ) & |
---|
8227 | ALLOCATE( t_window_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
8228 | 1:surf_usm_v(0)%ns) ) |
---|
8229 | READ ( 13 ) tmp_window_v(0)%t |
---|
8230 | ENDIF |
---|
8231 | CALL surface_restore_elements( & |
---|
8232 | t_window_v(0)%t, tmp_window_v(0)%t, & |
---|
8233 | surf_usm_v(0)%start_index, & |
---|
8234 | start_index_on_file, & |
---|
8235 | end_index_on_file, & |
---|
8236 | nxlc, nysc, & |
---|
8237 | nxlf, nxrf, nysf, nynf, & |
---|
8238 | nys_on_file, nyn_on_file, & |
---|
8239 | nxl_on_file, nxr_on_file ) |
---|
8240 | #else |
---|
8241 | IF ( k == 1 ) THEN |
---|
8242 | IF ( .NOT. ALLOCATED( t_window_v_1(0)%t ) ) & |
---|
8243 | ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
8244 | 1:surf_usm_v(0)%ns) ) |
---|
8245 | READ ( 13 ) tmp_window_v(0)%t |
---|
8246 | ENDIF |
---|
8247 | CALL surface_restore_elements( & |
---|
8248 | t_window_v_1(0)%t, & |
---|
8249 | tmp_window_v(0)%t, & |
---|
8250 | surf_usm_v(0)%start_index, & |
---|
8251 | start_index_on_file, & |
---|
8252 | end_index_on_file, & |
---|
8253 | nxlc, nysc, & |
---|
8254 | nxlf, nxrf, nysf, nynf, & |
---|
8255 | nys_on_file, nyn_on_file, & |
---|
8256 | nxl_on_file,nxr_on_file ) |
---|
8257 | #endif |
---|
8258 | CASE ( 't_window_v(1)' ) |
---|
8259 | #if defined( __nopointer ) |
---|
8260 | IF ( k == 1 ) THEN |
---|
8261 | IF ( .NOT. ALLOCATED( t_window_v(1)%t ) ) & |
---|
8262 | ALLOCATE( t_window_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
8263 | 1:surf_usm_v(1)%ns) ) |
---|
8264 | READ ( 13 ) tmp_window_v(1)%t |
---|
8265 | ENDIF |
---|
8266 | CALL surface_restore_elements( & |
---|
8267 | t_window_v(1)%t, tmp_window_v(1)%t, & |
---|
8268 | surf_usm_v(1)%start_index, & |
---|
8269 | start_index_on_file, & |
---|
8270 | end_index_on_file , & |
---|
8271 | nxlc, nysc, & |
---|
8272 | nxlf, nxrf, nysf, nynf, & |
---|
8273 | nys_on_file, nyn_on_file, & |
---|
8274 | nxl_on_file, nxr_on_file ) |
---|
8275 | #else |
---|
8276 | IF ( k == 1 ) THEN |
---|
8277 | IF ( .NOT. ALLOCATED( t_window_v_1(1)%t ) ) & |
---|
8278 | ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
8279 | 1:surf_usm_v(1)%ns) ) |
---|
8280 | READ ( 13 ) tmp_window_v(1)%t |
---|
8281 | ENDIF |
---|
8282 | CALL surface_restore_elements( & |
---|
8283 | t_window_v_1(1)%t, & |
---|
8284 | tmp_window_v(1)%t, & |
---|
8285 | surf_usm_v(1)%start_index, & |
---|
8286 | start_index_on_file, & |
---|
8287 | end_index_on_file, & |
---|
8288 | nxlc, nysc, & |
---|
8289 | nxlf, nxrf, nysf, nynf, & |
---|
8290 | nys_on_file, nyn_on_file, & |
---|
8291 | nxl_on_file,nxr_on_file ) |
---|
8292 | #endif |
---|
8293 | CASE ( 't_window_v(2)' ) |
---|
8294 | #if defined( __nopointer ) |
---|
8295 | IF ( k == 1 ) THEN |
---|
8296 | IF ( .NOT. ALLOCATED( t_window_v(2)%t ) ) & |
---|
8297 | ALLOCATE( t_window_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
8298 | 1:surf_usm_v(2)%ns) ) |
---|
8299 | READ ( 13 ) tmp_window_v(2)%t |
---|
8300 | ENDIF |
---|
8301 | CALL surface_restore_elements( & |
---|
8302 | t_window_v(2)%t, tmp_window_v(2)%t, & |
---|
8303 | surf_usm_v(2)%start_index, & |
---|
8304 | start_index_on_file, & |
---|
8305 | end_index_on_file, & |
---|
8306 | nxlc, nysc, & |
---|
8307 | nxlf, nxrf, nysf, nynf, & |
---|
8308 | nys_on_file, nyn_on_file, & |
---|
8309 | nxl_on_file,nxr_on_file ) |
---|
8310 | #else |
---|
8311 | IF ( k == 1 ) THEN |
---|
8312 | IF ( .NOT. ALLOCATED( t_window_v_1(2)%t ) ) & |
---|
8313 | ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
8314 | 1:surf_usm_v(2)%ns) ) |
---|
8315 | READ ( 13 ) tmp_window_v(2)%t |
---|
8316 | ENDIF |
---|
8317 | CALL surface_restore_elements( & |
---|
8318 | t_window_v_1(2)%t, & |
---|
8319 | tmp_window_v(2)%t, & |
---|
8320 | surf_usm_v(2)%start_index, & |
---|
8321 | start_index_on_file, & |
---|
8322 | end_index_on_file , & |
---|
8323 | nxlc, nysc, & |
---|
8324 | nxlf, nxrf, nysf, nynf, & |
---|
8325 | nys_on_file, nyn_on_file, & |
---|
8326 | nxl_on_file,nxr_on_file ) |
---|
8327 | #endif |
---|
8328 | CASE ( 't_window_v(3)' ) |
---|
8329 | #if defined( __nopointer ) |
---|
8330 | IF ( k == 1 ) THEN |
---|
8331 | IF ( .NOT. ALLOCATED( t_window_v(3)%t ) ) & |
---|
8332 | ALLOCATE( t_window_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
8333 | 1:surf_usm_v(3)%ns) ) |
---|
8334 | READ ( 13 ) tmp_window_v(3)%t |
---|
8335 | ENDIF |
---|
8336 | CALL surface_restore_elements( & |
---|
8337 | t_window_v(3)%t, tmp_window_v(3)%t, & |
---|
8338 | surf_usm_v(3)%start_index, & |
---|
8339 | start_index_on_file, & |
---|
8340 | end_index_on_file, & |
---|
8341 | nxlc, nysc, & |
---|
8342 | nxlf, nxrf, nysf, nynf, & |
---|
8343 | nys_on_file, nyn_on_file, & |
---|
8344 | nxl_on_file,nxr_on_file ) |
---|
8345 | #else |
---|
8346 | IF ( k == 1 ) THEN |
---|
8347 | IF ( .NOT. ALLOCATED( t_window_v_1(3)%t ) ) & |
---|
8348 | ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) ) |
---|
8349 | READ ( 13 ) tmp_window_v(3)%t |
---|
8350 | ENDIF |
---|
8351 | CALL surface_restore_elements( & |
---|
8352 | t_window_v_1(3)%t, & |
---|
8353 | tmp_window_v(3)%t, & |
---|
8354 | surf_usm_v(3)%start_index, & |
---|
8355 | start_index_on_file, & |
---|
8356 | end_index_on_file, & |
---|
8357 | nxlc, nysc, & |
---|
8358 | nxlf, nxrf, nysf, nynf, & |
---|
8359 | nys_on_file, nyn_on_file, & |
---|
8360 | nxl_on_file,nxr_on_file ) |
---|
8361 | #endif |
---|
8362 | CASE DEFAULT |
---|
8363 | |
---|
8364 | found = .FALSE. |
---|
8365 | |
---|
8366 | END SELECT |
---|
8367 | |
---|
8368 | |
---|
8369 | END SUBROUTINE usm_rrd_local |
---|
8370 | |
---|
8371 | |
---|
8372 | |
---|
8373 | !------------------------------------------------------------------------------! |
---|
8374 | ! Description: |
---|
8375 | ! ------------ |
---|
8376 | ! |
---|
8377 | !> This subroutine reads walls, roofs and land categories and it parameters |
---|
8378 | !> from input files. |
---|
8379 | !------------------------------------------------------------------------------! |
---|
8380 | SUBROUTINE usm_read_urban_surface_types |
---|
8381 | |
---|
8382 | USE netcdf_data_input_mod, & |
---|
8383 | ONLY: building_pars_f, building_type_f |
---|
8384 | |
---|
8385 | IMPLICIT NONE |
---|
8386 | |
---|
8387 | CHARACTER(12) :: wtn |
---|
8388 | INTEGER(iwp) :: wtc |
---|
8389 | REAL(wp), DIMENSION(n_surface_params) :: wtp |
---|
8390 | LOGICAL :: ascii_file = .FALSE. |
---|
8391 | INTEGER(iwp), DIMENSION(0:17, nysg:nyng, nxlg:nxrg) :: usm_par |
---|
8392 | REAL(wp), DIMENSION(1:14, nysg:nyng, nxlg:nxrg) :: usm_val |
---|
8393 | INTEGER(iwp) :: k, l, d, iw, jw, kw, it, ip, ii, ij, m |
---|
8394 | INTEGER(iwp) :: i, j |
---|
8395 | INTEGER(iwp) :: nz, roof, dirwe, dirsn |
---|
8396 | INTEGER(iwp) :: category |
---|
8397 | INTEGER(iwp) :: weheight1, wecat1, snheight1, sncat1 |
---|
8398 | INTEGER(iwp) :: weheight2, wecat2, snheight2, sncat2 |
---|
8399 | INTEGER(iwp) :: weheight3, wecat3, snheight3, sncat3 |
---|
8400 | REAL(wp) :: height, albedo, thick |
---|
8401 | REAL(wp) :: wealbedo1, wethick1, snalbedo1, snthick1 |
---|
8402 | REAL(wp) :: wealbedo2, wethick2, snalbedo2, snthick2 |
---|
8403 | REAL(wp) :: wealbedo3, wethick3, snalbedo3, snthick3 |
---|
8404 | |
---|
8405 | ! |
---|
8406 | !-- If building_pars or building_type are already read from static input |
---|
8407 | !-- file, skip reading ASCII file. |
---|
8408 | IF ( building_type_f%from_file .OR. building_pars_f%from_file ) & |
---|
8409 | RETURN |
---|
8410 | ! |
---|
8411 | !-- Check if ASCII input file exists. If not, return and initialize USM |
---|
8412 | !-- with default settings. |
---|
8413 | INQUIRE( FILE = 'SURFACE_PARAMETERS' // coupling_char, & |
---|
8414 | EXIST = ascii_file ) |
---|
8415 | |
---|
8416 | IF ( .NOT. ascii_file ) RETURN |
---|
8417 | |
---|
8418 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8419 | !-- read categories of walls and their parameters |
---|
8420 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8421 | DO ii = 0, io_blocks-1 |
---|
8422 | IF ( ii == io_group ) THEN |
---|
8423 | |
---|
8424 | !-- open urban surface file |
---|
8425 | OPEN( 151, file='SURFACE_PARAMETERS'//coupling_char, action='read', & |
---|
8426 | status='old', form='formatted', err=15 ) |
---|
8427 | !-- first test and get n_surface_types |
---|
8428 | k = 0 |
---|
8429 | l = 0 |
---|
8430 | DO |
---|
8431 | l = l+1 |
---|
8432 | READ( 151, *, err=11, end=12 ) wtc, wtp, wtn |
---|
8433 | k = k+1 |
---|
8434 | CYCLE |
---|
8435 | 11 CONTINUE |
---|
8436 | ENDDO |
---|
8437 | 12 n_surface_types = k |
---|
8438 | ALLOCATE( surface_type_names(n_surface_types) ) |
---|
8439 | ALLOCATE( surface_type_codes(n_surface_types) ) |
---|
8440 | ALLOCATE( surface_params(n_surface_params, n_surface_types) ) |
---|
8441 | !-- real reading |
---|
8442 | rewind( 151 ) |
---|
8443 | k = 0 |
---|
8444 | DO |
---|
8445 | READ( 151, *, err=13, end=14 ) wtc, wtp, wtn |
---|
8446 | k = k+1 |
---|
8447 | surface_type_codes(k) = wtc |
---|
8448 | surface_params(:,k) = wtp |
---|
8449 | surface_type_names(k) = wtn |
---|
8450 | CYCLE |
---|
8451 | 13 WRITE(6,'(i3,a,2i5)') myid, 'readparams2 error k=', k |
---|
8452 | FLUSH(6) |
---|
8453 | CONTINUE |
---|
8454 | ENDDO |
---|
8455 | 14 CLOSE(151) |
---|
8456 | CYCLE |
---|
8457 | 15 message_string = 'file SURFACE_PARAMETERS'//TRIM(coupling_char)//' does not exist' |
---|
8458 | CALL message( 'usm_read_urban_surface_types', 'PA0513', 1, 2, 0, 6, 0 ) |
---|
8459 | ENDIF |
---|
8460 | ENDDO |
---|
8461 | |
---|
8462 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8463 | !-- read types of surfaces |
---|
8464 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8465 | usm_par = 0 |
---|
8466 | DO ii = 0, io_blocks-1 |
---|
8467 | IF ( ii == io_group ) THEN |
---|
8468 | |
---|
8469 | ! |
---|
8470 | !-- open csv urban surface file |
---|
8471 | OPEN( 151, file='URBAN_SURFACE'//TRIM(coupling_char), action='read', & |
---|
8472 | status='old', form='formatted', err=23 ) |
---|
8473 | |
---|
8474 | l = 0 |
---|
8475 | DO |
---|
8476 | l = l+1 |
---|
8477 | !-- i, j, height, nz, roof, dirwe, dirsn, category, soilcat, |
---|
8478 | !-- weheight1, wecat1, snheight1, sncat1, weheight2, wecat2, snheight2, sncat2, |
---|
8479 | !-- weheight3, wecat3, snheight3, sncat3 |
---|
8480 | READ( 151, *, err=21, end=25 ) i, j, height, nz, roof, dirwe, dirsn, & |
---|
8481 | category, albedo, thick, & |
---|
8482 | weheight1, wecat1, wealbedo1, wethick1, & |
---|
8483 | weheight2, wecat2, wealbedo2, wethick2, & |
---|
8484 | weheight3, wecat3, wealbedo3, wethick3, & |
---|
8485 | snheight1, sncat1, snalbedo1, snthick1, & |
---|
8486 | snheight2, sncat2, snalbedo2, snthick2, & |
---|
8487 | snheight3, sncat3, snalbedo3, snthick3 |
---|
8488 | |
---|
8489 | IF ( i >= nxlg .AND. i <= nxrg .AND. j >= nysg .AND. j <= nyng ) THEN |
---|
8490 | !-- write integer variables into array |
---|
8491 | usm_par(:,j,i) = (/1, nz, roof, dirwe, dirsn, category, & |
---|
8492 | weheight1, wecat1, weheight2, wecat2, weheight3, wecat3, & |
---|
8493 | snheight1, sncat1, snheight2, sncat2, snheight3, sncat3 /) |
---|
8494 | !-- write real values into array |
---|
8495 | usm_val(:,j,i) = (/ albedo, thick, & |
---|
8496 | wealbedo1, wethick1, wealbedo2, wethick2, & |
---|
8497 | wealbedo3, wethick3, snalbedo1, snthick1, & |
---|
8498 | snalbedo2, snthick2, snalbedo3, snthick3 /) |
---|
8499 | ENDIF |
---|
8500 | CYCLE |
---|
8501 | 21 WRITE (message_string, "(A,I5)") 'errors in file URBAN_SURFACE'//TRIM(coupling_char)//' on line ', l |
---|
8502 | CALL message( 'usm_read_urban_surface_types', 'PA0512', 0, 1, 0, 6, 0 ) |
---|
8503 | ENDDO |
---|
8504 | |
---|
8505 | 23 message_string = 'file URBAN_SURFACE'//TRIM(coupling_char)//' does not exist' |
---|
8506 | CALL message( 'usm_read_urban_surface_types', 'PA0514', 1, 2, 0, 6, 0 ) |
---|
8507 | |
---|
8508 | 25 CLOSE( 151 ) |
---|
8509 | |
---|
8510 | ENDIF |
---|
8511 | #if defined( __parallel ) |
---|
8512 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
8513 | #endif |
---|
8514 | ENDDO |
---|
8515 | |
---|
8516 | ! |
---|
8517 | !-- check completeness and formal correctness of the data |
---|
8518 | DO i = nxlg, nxrg |
---|
8519 | DO j = nysg, nyng |
---|
8520 | IF ( usm_par(0,j,i) /= 0 .AND. ( & !< incomplete data,supply default values later |
---|
8521 | usm_par(1,j,i) < nzb .OR. & |
---|
8522 | usm_par(1,j,i) > nzt .OR. & !< incorrect height (nz < nzb .OR. nz > nzt) |
---|
8523 | usm_par(2,j,i) < 0 .OR. & |
---|
8524 | usm_par(2,j,i) > 1 .OR. & !< incorrect roof sign |
---|
8525 | usm_par(3,j,i) < nzb-nzt .OR. & |
---|
8526 | usm_par(3,j,i) > nzt-nzb .OR. & !< incorrect west-east wall direction sign |
---|
8527 | usm_par(4,j,i) < nzb-nzt .OR. & |
---|
8528 | usm_par(4,j,i) > nzt-nzb .OR. & !< incorrect south-north wall direction sign |
---|
8529 | usm_par(6,j,i) < nzb .OR. & |
---|
8530 | usm_par(6,j,i) > nzt .OR. & !< incorrect pedestrian level height for west-east wall |
---|
8531 | usm_par(8,j,i) > nzt .OR. & |
---|
8532 | usm_par(10,j,i) > nzt .OR. & !< incorrect wall or roof level height for west-east wall |
---|
8533 | usm_par(12,j,i) < nzb .OR. & |
---|
8534 | usm_par(12,j,i) > nzt .OR. & !< incorrect pedestrian level height for south-north wall |
---|
8535 | usm_par(14,j,i) > nzt .OR. & |
---|
8536 | usm_par(16,j,i) > nzt & !< incorrect wall or roof level height for south-north wall |
---|
8537 | ) ) THEN |
---|
8538 | !-- incorrect input data |
---|
8539 | WRITE (message_string, "(A,2I5)") 'missing or incorrect data in file URBAN_SURFACE'// & |
---|
8540 | TRIM(coupling_char)//' for i,j=', i,j |
---|
8541 | CALL message( 'usm_read_urban_surface', 'PA0504', 1, 2, 0, 6, 0 ) |
---|
8542 | ENDIF |
---|
8543 | |
---|
8544 | ENDDO |
---|
8545 | ENDDO |
---|
8546 | ! |
---|
8547 | !-- Assign the surface types to the respective data type. |
---|
8548 | !-- First, for horizontal upward-facing surfaces. |
---|
8549 | !-- Further, set flag indicating that albedo is initialized via ASCII |
---|
8550 | !-- format, else it would be overwritten in the radiation model. |
---|
8551 | surf_usm_h%albedo_from_ascii = .TRUE. |
---|
8552 | DO m = 1, surf_usm_h%ns |
---|
8553 | iw = surf_usm_h%i(m) |
---|
8554 | jw = surf_usm_h%j(m) |
---|
8555 | kw = surf_usm_h%k(m) |
---|
8556 | |
---|
8557 | IF ( usm_par(5,jw,iw) == 0 ) THEN |
---|
8558 | #if ! defined( __nopointer ) |
---|
8559 | IF ( zu(kw) >= roof_height_limit ) THEN |
---|
8560 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
8561 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
8562 | ELSE |
---|
8563 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
8564 | surf_usm_h%surface_types(m) = land_category !< default category for land surface |
---|
8565 | ENDIF |
---|
8566 | #endif |
---|
8567 | surf_usm_h%albedo(:,m) = -1.0_wp |
---|
8568 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
8569 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
8570 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
8571 | ELSE |
---|
8572 | IF ( usm_par(2,jw,iw)==0 ) THEN |
---|
8573 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
8574 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
8575 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
8576 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
8577 | ELSE |
---|
8578 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
8579 | surf_usm_h%thickness_wall(m) = usm_val(2,jw,iw) |
---|
8580 | surf_usm_h%thickness_window(m) = usm_val(2,jw,iw) |
---|
8581 | surf_usm_h%thickness_green(m) = usm_val(2,jw,iw) |
---|
8582 | ENDIF |
---|
8583 | surf_usm_h%surface_types(m) = usm_par(5,jw,iw) |
---|
8584 | surf_usm_h%albedo(:,m) = usm_val(1,jw,iw) |
---|
8585 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
8586 | ENDIF |
---|
8587 | ! |
---|
8588 | !-- Find the type position |
---|
8589 | it = surf_usm_h%surface_types(m) |
---|
8590 | ip = -99999 |
---|
8591 | DO k = 1, n_surface_types |
---|
8592 | IF ( surface_type_codes(k) == it ) THEN |
---|
8593 | ip = k |
---|
8594 | EXIT |
---|
8595 | ENDIF |
---|
8596 | ENDDO |
---|
8597 | IF ( ip == -99999 ) THEN |
---|
8598 | !-- land/roof category not found |
---|
8599 | WRITE (9,"(A,I5,A,3I5)") 'land/roof category ', it, & |
---|
8600 | ' not found for i,j,k=', iw,jw,kw |
---|
8601 | FLUSH(9) |
---|
8602 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
8603 | category = roof_category |
---|
8604 | ELSE |
---|
8605 | category = land_category |
---|
8606 | ENDIF |
---|
8607 | DO k = 1, n_surface_types |
---|
8608 | IF ( surface_type_codes(k) == roof_category ) THEN |
---|
8609 | ip = k |
---|
8610 | EXIT |
---|
8611 | ENDIF |
---|
8612 | ENDDO |
---|
8613 | IF ( ip == -99999 ) THEN |
---|
8614 | !-- default land/roof category not found |
---|
8615 | WRITE (9,"(A,I5,A,3I5)") 'Default land/roof category', category, ' not found!' |
---|
8616 | FLUSH(9) |
---|
8617 | ip = 1 |
---|
8618 | ENDIF |
---|
8619 | ENDIF |
---|
8620 | ! |
---|
8621 | !-- Albedo |
---|
8622 | IF ( surf_usm_h%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
8623 | surf_usm_h%albedo(:,m) = surface_params(ialbedo,ip) |
---|
8624 | ENDIF |
---|
8625 | !-- Albedo type is 0 (custom), others are replaced later |
---|
8626 | surf_usm_h%albedo_type(:,m) = 0 |
---|
8627 | !-- Transmissivity |
---|
8628 | IF ( surf_usm_h%transmissivity(m) < 0.0_wp ) THEN |
---|
8629 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
8630 | ENDIF |
---|
8631 | ! |
---|
8632 | !-- emissivity of the wall |
---|
8633 | surf_usm_h%emissivity(:,m) = surface_params(iemiss,ip) |
---|
8634 | ! |
---|
8635 | !-- heat conductivity λS between air and wall ( W mâ2 Kâ1 ) |
---|
8636 | surf_usm_h%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
8637 | surf_usm_h%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
8638 | surf_usm_h%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
8639 | ! |
---|
8640 | !-- roughness length for momentum, heat and humidity |
---|
8641 | surf_usm_h%z0(m) = surface_params(irough,ip) |
---|
8642 | surf_usm_h%z0h(m) = surface_params(iroughh,ip) |
---|
8643 | surf_usm_h%z0q(m) = surface_params(iroughh,ip) |
---|
8644 | ! |
---|
8645 | !-- Surface skin layer heat capacity (J mâ2 Kâ1 ) |
---|
8646 | surf_usm_h%c_surface(m) = surface_params(icsurf,ip) |
---|
8647 | surf_usm_h%c_surface_window(m) = surface_params(icsurf,ip) |
---|
8648 | surf_usm_h%c_surface_green(m) = surface_params(icsurf,ip) |
---|
8649 | ! |
---|
8650 | !-- wall material parameters: |
---|
8651 | !-- thickness of the wall (m) |
---|
8652 | !-- missing values are replaced by default value for category |
---|
8653 | IF ( surf_usm_h%thickness_wall(m) <= 0.001_wp ) THEN |
---|
8654 | surf_usm_h%thickness_wall(m) = surface_params(ithick,ip) |
---|
8655 | ENDIF |
---|
8656 | IF ( surf_usm_h%thickness_window(m) <= 0.001_wp ) THEN |
---|
8657 | surf_usm_h%thickness_window(m) = surface_params(ithick,ip) |
---|
8658 | ENDIF |
---|
8659 | IF ( surf_usm_h%thickness_green(m) <= 0.001_wp ) THEN |
---|
8660 | surf_usm_h%thickness_green(m) = surface_params(ithick,ip) |
---|
8661 | ENDIF |
---|
8662 | ! |
---|
8663 | !-- volumetric heat capacity rho*C of the wall ( J mâ3 Kâ1 ) |
---|
8664 | surf_usm_h%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
8665 | surf_usm_h%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
8666 | surf_usm_h%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
8667 | ! |
---|
8668 | !-- thermal conductivity λH of the wall (W mâ1 Kâ1 ) |
---|
8669 | surf_usm_h%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
8670 | surf_usm_h%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
8671 | surf_usm_h%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
8672 | |
---|
8673 | ENDDO |
---|
8674 | ! |
---|
8675 | !-- For vertical surface elements ( 0 -- northward-facing, 1 -- southward-facing, |
---|
8676 | !-- 2 -- eastward-facing, 3 -- westward-facing ) |
---|
8677 | DO l = 0, 3 |
---|
8678 | ! |
---|
8679 | !-- Set flag indicating that albedo is initialized via ASCII format. |
---|
8680 | !-- Else it would be overwritten in the radiation model. |
---|
8681 | surf_usm_v(l)%albedo_from_ascii = .TRUE. |
---|
8682 | DO m = 1, surf_usm_v(l)%ns |
---|
8683 | i = surf_usm_v(l)%i(m) |
---|
8684 | j = surf_usm_v(l)%j(m) |
---|
8685 | kw = surf_usm_v(l)%k(m) |
---|
8686 | |
---|
8687 | IF ( l == 3 ) THEN ! westward facing |
---|
8688 | iw = i |
---|
8689 | jw = j |
---|
8690 | ii = 6 |
---|
8691 | ij = 3 |
---|
8692 | ELSEIF ( l == 2 ) THEN |
---|
8693 | iw = i-1 |
---|
8694 | jw = j |
---|
8695 | ii = 6 |
---|
8696 | ij = 3 |
---|
8697 | ELSEIF ( l == 1 ) THEN |
---|
8698 | iw = i |
---|
8699 | jw = j |
---|
8700 | ii = 12 |
---|
8701 | ij = 9 |
---|
8702 | ELSEIF ( l == 0 ) THEN |
---|
8703 | iw = i |
---|
8704 | jw = j-1 |
---|
8705 | ii = 12 |
---|
8706 | ij = 9 |
---|
8707 | ENDIF |
---|
8708 | |
---|
8709 | IF ( iw < 0 .OR. jw < 0 ) THEN |
---|
8710 | !-- wall on west or south border of the domain - assign default category |
---|
8711 | IF ( kw <= roof_height_limit ) THEN |
---|
8712 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
8713 | ELSE |
---|
8714 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
8715 | END IF |
---|
8716 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8717 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8718 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8719 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8720 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8721 | ELSE IF ( kw <= usm_par(ii,jw,iw) ) THEN |
---|
8722 | !-- pedestrian zone |
---|
8723 | IF ( usm_par(ii+1,jw,iw) == 0 ) THEN |
---|
8724 | surf_usm_v(l)%surface_types(m) = pedestrian_category !< default category for wall surface in pedestrian zone |
---|
8725 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8726 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8727 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8728 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8729 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8730 | ELSE |
---|
8731 | surf_usm_v(l)%surface_types(m) = usm_par(ii+1,jw,iw) |
---|
8732 | surf_usm_v(l)%albedo(:,m) = usm_val(ij,jw,iw) |
---|
8733 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+1,jw,iw) |
---|
8734 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+1,jw,iw) |
---|
8735 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+1,jw,iw) |
---|
8736 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
8737 | ENDIF |
---|
8738 | ELSE IF ( kw <= usm_par(ii+2,jw,iw) ) THEN |
---|
8739 | !-- wall zone |
---|
8740 | IF ( usm_par(ii+3,jw,iw) == 0 ) THEN |
---|
8741 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface |
---|
8742 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8743 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8744 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8745 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8746 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8747 | ELSE |
---|
8748 | surf_usm_v(l)%surface_types(m) = usm_par(ii+3,jw,iw) |
---|
8749 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+2,jw,iw) |
---|
8750 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+3,jw,iw) |
---|
8751 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+3,jw,iw) |
---|
8752 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+3,jw,iw) |
---|
8753 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
8754 | ENDIF |
---|
8755 | ELSE IF ( kw <= usm_par(ii+4,jw,iw) ) THEN |
---|
8756 | !-- roof zone |
---|
8757 | IF ( usm_par(ii+5,jw,iw) == 0 ) THEN |
---|
8758 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for roof surface |
---|
8759 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8760 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8761 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8762 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8763 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8764 | ELSE |
---|
8765 | surf_usm_v(l)%surface_types(m) = usm_par(ii+5,jw,iw) |
---|
8766 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+4,jw,iw) |
---|
8767 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+5,jw,iw) |
---|
8768 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+5,jw,iw) |
---|
8769 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+5,jw,iw) |
---|
8770 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
8771 | ENDIF |
---|
8772 | ELSE |
---|
8773 | ! |
---|
8774 | WRITE(9,*) 'Problem reading USM data:' |
---|
8775 | WRITE(9,*) l,i,j,kw,get_topography_top_index_ji( j, i, 's' ) |
---|
8776 | WRITE(9,*) ii,iw,jw,kw,get_topography_top_index_ji( jw, iw, 's' ) |
---|
8777 | WRITE(9,*) usm_par(ii,jw,iw),usm_par(ii+1,jw,iw) |
---|
8778 | WRITE(9,*) usm_par(ii+2,jw,iw),usm_par(ii+3,jw,iw) |
---|
8779 | WRITE(9,*) usm_par(ii+4,jw,iw),usm_par(ii+5,jw,iw) |
---|
8780 | WRITE(9,*) kw,roof_height_limit,wall_category,roof_category |
---|
8781 | FLUSH(9) |
---|
8782 | !-- supply the default category |
---|
8783 | IF ( kw <= roof_height_limit ) THEN |
---|
8784 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
8785 | ELSE |
---|
8786 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
8787 | END IF |
---|
8788 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8789 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8790 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8791 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8792 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8793 | ENDIF |
---|
8794 | ! |
---|
8795 | !-- Find the type position |
---|
8796 | it = surf_usm_v(l)%surface_types(m) |
---|
8797 | ip = -99999 |
---|
8798 | DO k = 1, n_surface_types |
---|
8799 | IF ( surface_type_codes(k) == it ) THEN |
---|
8800 | ip = k |
---|
8801 | EXIT |
---|
8802 | ENDIF |
---|
8803 | ENDDO |
---|
8804 | IF ( ip == -99999 ) THEN |
---|
8805 | !-- wall category not found |
---|
8806 | WRITE (9, "(A,I7,A,3I5)") 'wall category ', it, & |
---|
8807 | ' not found for i,j,k=', iw,jw,kw |
---|
8808 | FLUSH(9) |
---|
8809 | category = wall_category |
---|
8810 | DO k = 1, n_surface_types |
---|
8811 | IF ( surface_type_codes(k) == category ) THEN |
---|
8812 | ip = k |
---|
8813 | EXIT |
---|
8814 | ENDIF |
---|
8815 | ENDDO |
---|
8816 | IF ( ip == -99999 ) THEN |
---|
8817 | !-- default wall category not found |
---|
8818 | WRITE (9, "(A,I5,A,3I5)") 'Default wall category', category, ' not found!' |
---|
8819 | FLUSH(9) |
---|
8820 | ip = 1 |
---|
8821 | ENDIF |
---|
8822 | ENDIF |
---|
8823 | |
---|
8824 | ! |
---|
8825 | !-- Albedo |
---|
8826 | IF ( surf_usm_v(l)%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
8827 | surf_usm_v(l)%albedo(:,m) = surface_params(ialbedo,ip) |
---|
8828 | ENDIF |
---|
8829 | !-- Albedo type is 0 (custom), others are replaced later |
---|
8830 | surf_usm_v(l)%albedo_type(:,m) = 0 |
---|
8831 | !-- Transmissivity of the windows |
---|
8832 | IF ( surf_usm_v(l)%transmissivity(m) < 0.0_wp ) THEN |
---|
8833 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
8834 | ENDIF |
---|
8835 | ! |
---|
8836 | !-- emissivity of the wall |
---|
8837 | surf_usm_v(l)%emissivity(:,m) = surface_params(iemiss,ip) |
---|
8838 | ! |
---|
8839 | !-- heat conductivity lambda S between air and wall ( W m-2 K-1 ) |
---|
8840 | surf_usm_v(l)%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
8841 | surf_usm_v(l)%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
8842 | surf_usm_v(l)%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
8843 | ! |
---|
8844 | !-- roughness length |
---|
8845 | surf_usm_v(l)%z0(m) = surface_params(irough,ip) |
---|
8846 | surf_usm_v(l)%z0h(m) = surface_params(iroughh,ip) |
---|
8847 | surf_usm_v(l)%z0q(m) = surface_params(iroughh,ip) |
---|
8848 | ! |
---|
8849 | !-- Surface skin layer heat capacity (J m-2 K-1 ) |
---|
8850 | surf_usm_v(l)%c_surface(m) = surface_params(icsurf,ip) |
---|
8851 | surf_usm_v(l)%c_surface_window(m) = surface_params(icsurf,ip) |
---|
8852 | surf_usm_v(l)%c_surface_green(m) = surface_params(icsurf,ip) |
---|
8853 | ! |
---|
8854 | !-- wall material parameters: |
---|
8855 | !-- thickness of the wall (m) |
---|
8856 | !-- missing values are replaced by default value for category |
---|
8857 | IF ( surf_usm_v(l)%thickness_wall(m) <= 0.001_wp ) THEN |
---|
8858 | surf_usm_v(l)%thickness_wall(m) = surface_params(ithick,ip) |
---|
8859 | ENDIF |
---|
8860 | IF ( surf_usm_v(l)%thickness_window(m) <= 0.001_wp ) THEN |
---|
8861 | surf_usm_v(l)%thickness_window(m) = surface_params(ithick,ip) |
---|
8862 | ENDIF |
---|
8863 | IF ( surf_usm_v(l)%thickness_green(m) <= 0.001_wp ) THEN |
---|
8864 | surf_usm_v(l)%thickness_green(m) = surface_params(ithick,ip) |
---|
8865 | ENDIF |
---|
8866 | ! |
---|
8867 | !-- volumetric heat capacity rho*C of the wall ( J m-3 K-1 ) |
---|
8868 | surf_usm_v(l)%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
8869 | surf_usm_v(l)%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
8870 | surf_usm_v(l)%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
8871 | ! |
---|
8872 | !-- thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
8873 | surf_usm_v(l)%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
8874 | surf_usm_v(l)%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
8875 | surf_usm_v(l)%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
8876 | |
---|
8877 | ENDDO |
---|
8878 | ENDDO |
---|
8879 | |
---|
8880 | ! |
---|
8881 | !-- Initialize wall layer thicknesses. Please note, this will be removed |
---|
8882 | !-- after migration to Palm input data standard. |
---|
8883 | DO k = nzb_wall, nzt_wall |
---|
8884 | zwn(k) = zwn_default(k) |
---|
8885 | zwn_green(k) = zwn_default_green(k) |
---|
8886 | zwn_window(k) = zwn_default_window(k) |
---|
8887 | ENDDO |
---|
8888 | ! |
---|
8889 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
8890 | DO m = 1, surf_usm_h%ns |
---|
8891 | surf_usm_h%zw(:,m) = zwn(:) * surf_usm_h%thickness_wall(m) |
---|
8892 | surf_usm_h%zw_green(:,m) = zwn_green(:) * surf_usm_h%thickness_green(m) |
---|
8893 | surf_usm_h%zw_window(:,m) = zwn_window(:) * surf_usm_h%thickness_window(m) |
---|
8894 | ENDDO |
---|
8895 | DO l = 0, 3 |
---|
8896 | DO m = 1, surf_usm_v(l)%ns |
---|
8897 | surf_usm_v(l)%zw(:,m) = zwn(:) * surf_usm_v(l)%thickness_wall(m) |
---|
8898 | surf_usm_v(l)%zw_green(:,m) = zwn_green(:) * surf_usm_v(l)%thickness_green(m) |
---|
8899 | surf_usm_v(l)%zw_window(:,m) = zwn_window(:) * surf_usm_v(l)%thickness_window(m) |
---|
8900 | ENDDO |
---|
8901 | ENDDO |
---|
8902 | |
---|
8903 | |
---|
8904 | WRITE(9,*) 'Urban surfaces read' |
---|
8905 | FLUSH(9) |
---|
8906 | |
---|
8907 | CALL location_message( ' types and parameters of urban surfaces read', .TRUE. ) |
---|
8908 | |
---|
8909 | END SUBROUTINE usm_read_urban_surface_types |
---|
8910 | |
---|
8911 | |
---|
8912 | !------------------------------------------------------------------------------! |
---|
8913 | ! Description: |
---|
8914 | ! ------------ |
---|
8915 | ! |
---|
8916 | !> This function advances through the list of local surfaces to find given |
---|
8917 | !> x, y, d, z coordinates |
---|
8918 | !------------------------------------------------------------------------------! |
---|
8919 | PURE FUNCTION find_surface( x, y, z, d ) result(isurfl) |
---|
8920 | |
---|
8921 | INTEGER(iwp), INTENT(in) :: x, y, z, d |
---|
8922 | INTEGER(iwp) :: isurfl |
---|
8923 | INTEGER(iwp) :: isx, isy, isz |
---|
8924 | |
---|
8925 | IF ( d == 0 ) THEN |
---|
8926 | DO isurfl = 1, surf_usm_h%ns |
---|
8927 | isx = surf_usm_h%i(isurfl) |
---|
8928 | isy = surf_usm_h%j(isurfl) |
---|
8929 | isz = surf_usm_h%k(isurfl) |
---|
8930 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
8931 | ENDDO |
---|
8932 | ELSE |
---|
8933 | DO isurfl = 1, surf_usm_v(d-1)%ns |
---|
8934 | isx = surf_usm_v(d-1)%i(isurfl) |
---|
8935 | isy = surf_usm_v(d-1)%j(isurfl) |
---|
8936 | isz = surf_usm_v(d-1)%k(isurfl) |
---|
8937 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
8938 | ENDDO |
---|
8939 | ENDIF |
---|
8940 | |
---|
8941 | !-- coordinate not found |
---|
8942 | isurfl = -1 |
---|
8943 | |
---|
8944 | END FUNCTION |
---|
8945 | |
---|
8946 | |
---|
8947 | !------------------------------------------------------------------------------! |
---|
8948 | ! Description: |
---|
8949 | ! ------------ |
---|
8950 | ! |
---|
8951 | !> This subroutine reads temperatures of respective material layers in walls, |
---|
8952 | !> roofs and ground from input files. Data in the input file must be in |
---|
8953 | !> standard order, i.e. horizontal surfaces first ordered by x, y and then |
---|
8954 | !> vertical surfaces ordered by x, y, direction, z |
---|
8955 | !------------------------------------------------------------------------------! |
---|
8956 | SUBROUTINE usm_read_wall_temperature |
---|
8957 | |
---|
8958 | INTEGER(iwp) :: i, j, k, d, ii, iline |
---|
8959 | INTEGER(iwp) :: isurfl |
---|
8960 | REAL(wp) :: rtsurf |
---|
8961 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: rtwall |
---|
8962 | |
---|
8963 | |
---|
8964 | |
---|
8965 | |
---|
8966 | DO ii = 0, io_blocks-1 |
---|
8967 | IF ( ii == io_group ) THEN |
---|
8968 | |
---|
8969 | !-- open wall temperature file |
---|
8970 | OPEN( 152, file='WALL_TEMPERATURE'//coupling_char, action='read', & |
---|
8971 | status='old', form='formatted', err=15 ) |
---|
8972 | |
---|
8973 | isurfl = 0 |
---|
8974 | iline = 1 |
---|
8975 | DO |
---|
8976 | rtwall = -9999.0_wp !< for incomplete lines |
---|
8977 | READ( 152, *, err=13, end=14 ) i, j, k, d, rtsurf, rtwall |
---|
8978 | |
---|
8979 | IF ( nxl <= i .and. i <= nxr .and. & |
---|
8980 | nys <= j .and. j <= nyn) THEN !< local processor |
---|
8981 | !-- identify surface id |
---|
8982 | isurfl = find_surface( i, j, k, d ) |
---|
8983 | IF ( isurfl == -1 ) THEN |
---|
8984 | WRITE(message_string, '(a,4i5,a,i5,a)') 'Coordinates (xyzd) ', i, j, k, d, & |
---|
8985 | ' on line ', iline, & |
---|
8986 | ' in file WALL_TEMPERATURE are either not present or out of standard order of surfaces.' |
---|
8987 | CALL message( 'usm_read_wall_temperature', 'PA0521', 1, 2, 0, 6, 0 ) |
---|
8988 | ENDIF |
---|
8989 | |
---|
8990 | !-- assign temperatures |
---|
8991 | IF ( d == 0 ) THEN |
---|
8992 | t_surf_wall_h(isurfl) = rtsurf |
---|
8993 | t_wall_h(:,isurfl) = rtwall(:) |
---|
8994 | t_window_h(:,isurfl) = rtwall(:) |
---|
8995 | t_green_h(:,isurfl) = rtwall(:) |
---|
8996 | ELSE |
---|
8997 | t_surf_wall_v(d-1)%t(isurfl) = rtsurf |
---|
8998 | t_wall_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
8999 | t_window_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
9000 | t_green_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
9001 | ENDIF |
---|
9002 | ENDIF |
---|
9003 | |
---|
9004 | iline = iline + 1 |
---|
9005 | CYCLE |
---|
9006 | 13 WRITE(message_string, '(a,i5,a)') 'Error reading line ', iline, & |
---|
9007 | ' in file WALL_TEMPERATURE.' |
---|
9008 | CALL message( 'usm_read_wall_temperature', 'PA0522', 1, 2, 0, 6, 0 ) |
---|
9009 | ENDDO |
---|
9010 | 14 CLOSE(152) |
---|
9011 | CYCLE |
---|
9012 | 15 message_string = 'file WALL_TEMPERATURE'//TRIM(coupling_char)//' does not exist' |
---|
9013 | CALL message( 'usm_read_wall_temperature', 'PA0523', 1, 2, 0, 6, 0 ) |
---|
9014 | ENDIF |
---|
9015 | #if defined( __parallel ) |
---|
9016 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
9017 | #endif |
---|
9018 | ENDDO |
---|
9019 | |
---|
9020 | CALL location_message( ' wall layer temperatures read', .TRUE. ) |
---|
9021 | |
---|
9022 | END SUBROUTINE usm_read_wall_temperature |
---|
9023 | |
---|
9024 | |
---|
9025 | |
---|
9026 | !------------------------------------------------------------------------------! |
---|
9027 | ! Description: |
---|
9028 | ! ------------ |
---|
9029 | !> Solver for the energy balance at the ground/roof/wall surface. |
---|
9030 | !> It follows basic ideas and structure of lsm_energy_balance |
---|
9031 | !> with many simplifications and adjustments. |
---|
9032 | !> TODO better description |
---|
9033 | !------------------------------------------------------------------------------! |
---|
9034 | SUBROUTINE usm_surface_energy_balance( spinup ) |
---|
9035 | |
---|
9036 | |
---|
9037 | IMPLICIT NONE |
---|
9038 | |
---|
9039 | INTEGER(iwp) :: i, j, k, l, d, m !< running indices |
---|
9040 | |
---|
9041 | INTEGER(iwp) :: i_off !< offset to determine index of surface element, seen from atmospheric grid point, for x |
---|
9042 | INTEGER(iwp) :: j_off !< offset to determine index of surface element, seen from atmospheric grid point, for y |
---|
9043 | INTEGER(iwp) :: k_off !< offset to determine index of surface element, seen from atmospheric grid point, for z |
---|
9044 | |
---|
9045 | LOGICAL :: spinup !true during spinup |
---|
9046 | |
---|
9047 | REAL(wp) :: u1,v1,w1 !< near wall u,v,w |
---|
9048 | REAL(wp) :: stend_wall !< surface tendency |
---|
9049 | |
---|
9050 | REAL(wp) :: stend_window !< surface tendency |
---|
9051 | REAL(wp) :: stend_green !< surface tendency |
---|
9052 | REAL(wp) :: coef_1 !< first coeficient for prognostic equation |
---|
9053 | REAL(wp) :: coef_window_1 !< first coeficient for prognostic window equation |
---|
9054 | REAL(wp) :: coef_green_1 !< first coeficient for prognostic green wall equation |
---|
9055 | REAL(wp) :: coef_2 !< second coeficient for prognostic equation |
---|
9056 | REAL(wp) :: coef_window_2 !< second coeficient for prognostic window equation |
---|
9057 | REAL(wp) :: coef_green_2 !< second coeficient for prognostic green wall equation |
---|
9058 | REAL(wp) :: rho_cp !< rho_wall_surface * c_p |
---|
9059 | REAL(wp) :: f_shf !< factor for shf_eb |
---|
9060 | REAL(wp) :: f_shf_window !< factor for shf_eb window |
---|
9061 | REAL(wp) :: f_shf_green !< factor for shf_eb green wall |
---|
9062 | REAL(wp) :: lambda_surface !< current value of lambda_surface (heat conductivity between air and wall) |
---|
9063 | REAL(wp) :: lambda_surface_window !< current value of lambda_surface (heat conductivity between air and window) |
---|
9064 | REAL(wp) :: lambda_surface_green !< current value of lambda_surface (heat conductivity between air and greeb wall) |
---|
9065 | |
---|
9066 | REAL(wp) :: dtime !< simulated time of day (in UTC) |
---|
9067 | INTEGER(iwp) :: dhour !< simulated hour of day (in UTC) |
---|
9068 | REAL(wp) :: acoef !< actual coefficient of diurnal profile of anthropogenic heat |
---|
9069 | REAL(wp) :: f1, & !< resistance correction term 1 |
---|
9070 | f2, & !< resistance correction term 2 |
---|
9071 | f3, & !< resistance correction term 3 |
---|
9072 | e, & !< water vapour pressure |
---|
9073 | e_s, & !< water vapour saturation pressure |
---|
9074 | e_s_dt, & !< derivate of e_s with respect to T |
---|
9075 | tend, & !< tendency |
---|
9076 | dq_s_dt, & !< derivate of q_s with respect to T |
---|
9077 | f_qsws, & !< factor for qsws |
---|
9078 | f_qsws_veg, & !< factor for qsws_veg |
---|
9079 | f_qsws_liq, & !< factor for qsws_liq |
---|
9080 | m_liq_max, & !< maxmimum value of the liq. water reservoir |
---|
9081 | qv1, & !< specific humidity at first grid level |
---|
9082 | m_max_depth = 0.0002_wp, & ! Maximum capacity of the water reservoir (m) |
---|
9083 | rho_lv, & |
---|
9084 | drho_l_lv, & |
---|
9085 | q_s |
---|
9086 | |
---|
9087 | ! |
---|
9088 | !-- Index offset of surface element point with respect to adjoining |
---|
9089 | !-- atmospheric grid point |
---|
9090 | k_off = surf_usm_h%koff |
---|
9091 | j_off = surf_usm_h%joff |
---|
9092 | i_off = surf_usm_h%ioff |
---|
9093 | |
---|
9094 | ! |
---|
9095 | !-- First, treat horizontal surface elements |
---|
9096 | DO m = 1, surf_usm_h%ns |
---|
9097 | ! |
---|
9098 | !-- Get indices of respective grid point |
---|
9099 | i = surf_usm_h%i(m) |
---|
9100 | j = surf_usm_h%j(m) |
---|
9101 | k = surf_usm_h%k(m) |
---|
9102 | ! |
---|
9103 | !-- TODO - how to calculate lambda_surface for horizontal surfaces |
---|
9104 | !-- (lambda_surface is set according to stratification in land surface model) |
---|
9105 | !-- MS: ??? |
---|
9106 | IF ( surf_usm_h%ol(m) >= 0.0_wp ) THEN |
---|
9107 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
9108 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
9109 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
9110 | ELSE |
---|
9111 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
9112 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
9113 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
9114 | ENDIF |
---|
9115 | #if ! defined( __nopointer ) |
---|
9116 | ! pt1 = pt(k,j,i) |
---|
9117 | IF ( humidity ) THEN |
---|
9118 | qv1 = q(k,j,i) |
---|
9119 | ELSE |
---|
9120 | qv1 = 0.0_wp |
---|
9121 | ENDIF |
---|
9122 | ! |
---|
9123 | !-- calculate rho * c_p coefficient at surface layer |
---|
9124 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_h%pt1(m) * exner(k) ) |
---|
9125 | |
---|
9126 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
9127 | ! |
---|
9128 | !-- Calculate frequently used parameters |
---|
9129 | rho_lv = rho_cp / c_p * l_v |
---|
9130 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
9131 | endif |
---|
9132 | #endif |
---|
9133 | ! |
---|
9134 | !-- Calculate aerodyamic resistance. |
---|
9135 | !-- Calculation for horizontal surfaces follows LSM formulation |
---|
9136 | !-- pt, us, ts are not available for the prognostic time step, |
---|
9137 | !-- data from the last time step is used here. |
---|
9138 | |
---|
9139 | !-- Workaround: use single r_a as stability is only treated for the |
---|
9140 | !-- average temperature |
---|
9141 | surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /& |
---|
9142 | ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
9143 | surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m) |
---|
9144 | surf_usm_h%r_a_green(m) = surf_usm_h%r_a(m) |
---|
9145 | |
---|
9146 | ! r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exner(k) ) / & |
---|
9147 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
9148 | ! r_a_window = ( surf_usm_h%pt1(m) - t_surf_window_h(m) / exner(k) ) / & |
---|
9149 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
9150 | ! r_a_green = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
9151 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
9152 | |
---|
9153 | !-- Make sure that the resistance does not drop to zero |
---|
9154 | IF ( surf_usm_h%r_a(m) < 1.0_wp ) & |
---|
9155 | surf_usm_h%r_a(m) = 1.0_wp |
---|
9156 | IF ( surf_usm_h%r_a_green(m) < 1.0_wp ) & |
---|
9157 | surf_usm_h%r_a_green(m) = 1.0_wp |
---|
9158 | IF ( surf_usm_h%r_a_window(m) < 1.0_wp ) & |
---|
9159 | surf_usm_h%r_a_window(m) = 1.0_wp |
---|
9160 | |
---|
9161 | ! |
---|
9162 | !-- Make sure that the resistacne does not exceed a maxmium value in case |
---|
9163 | !-- of zero velocities |
---|
9164 | IF ( surf_usm_h%r_a(m) > 300.0_wp ) & |
---|
9165 | surf_usm_h%r_a(m) = 300.0_wp |
---|
9166 | IF ( surf_usm_h%r_a_green(m) > 300.0_wp ) & |
---|
9167 | surf_usm_h%r_a_green(m) = 300.0_wp |
---|
9168 | IF ( surf_usm_h%r_a_window(m) > 300.0_wp ) & |
---|
9169 | surf_usm_h%r_a_window(m) = 300.0_wp |
---|
9170 | |
---|
9171 | |
---|
9172 | !-- factor for shf_eb |
---|
9173 | f_shf = rho_cp / surf_usm_h%r_a(m) |
---|
9174 | f_shf_window = rho_cp / surf_usm_h%r_a_window(m) |
---|
9175 | f_shf_green = rho_cp / surf_usm_h%r_a_green(m) |
---|
9176 | |
---|
9177 | !*************************************************************************************** |
---|
9178 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
9179 | !-- Adapted from LSM: |
---|
9180 | !-- Second step: calculate canopy resistance r_canopy |
---|
9181 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
9182 | |
---|
9183 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
9184 | !-- night) |
---|
9185 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_h%rad_sw_in(m) + 0.05_wp ) / & |
---|
9186 | (0.81_wp * (0.004_wp * surf_usm_h%rad_sw_in(m) & |
---|
9187 | + 1.0_wp)) ) |
---|
9188 | ! |
---|
9189 | !-- f2: correction for soil moisture availability to plants (the |
---|
9190 | !-- integrated soil moisture must thus be considered here) |
---|
9191 | !-- f2 = 0 for very dry soils |
---|
9192 | m_total = 0.0_wp |
---|
9193 | DO k = nzb_wall, nzt_wall+1 |
---|
9194 | m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
9195 | * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
9196 | ENDDO |
---|
9197 | |
---|
9198 | IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
9199 | f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
9200 | ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
9201 | f2 = 1.0_wp |
---|
9202 | ELSE |
---|
9203 | f2 = 1.0E-20_wp |
---|
9204 | ENDIF |
---|
9205 | |
---|
9206 | ! |
---|
9207 | !-- Calculate water vapour pressure at saturation |
---|
9208 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_h(m) & |
---|
9209 | - 273.16_wp ) / ( t_surf_green_h(m) - 35.86_wp ) ) |
---|
9210 | ! |
---|
9211 | !-- f3: correction for vapour pressure deficit |
---|
9212 | IF ( surf_usm_h%g_d(m) /= 0.0_wp ) THEN |
---|
9213 | ! |
---|
9214 | !-- Calculate vapour pressure |
---|
9215 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
9216 | f3 = EXP ( - surf_usm_h%g_d(m) * (e_s - e) ) |
---|
9217 | ELSE |
---|
9218 | f3 = 1.0_wp |
---|
9219 | ENDIF |
---|
9220 | |
---|
9221 | ! |
---|
9222 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
9223 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
9224 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
9225 | surf_usm_h%r_canopy(m) = surf_usm_h%r_canopy_min(m) / & |
---|
9226 | ( surf_usm_h%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
9227 | |
---|
9228 | ! |
---|
9229 | !-- Calculate the maximum possible liquid water amount on plants and |
---|
9230 | !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
9231 | !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
9232 | !-- liquid water fraction for paved surfaces is calculated after |
---|
9233 | !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
9234 | !-- vegetated surfaces and bare soils. |
---|
9235 | m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
9236 | surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
9237 | ! |
---|
9238 | !-- Calculate saturation specific humidity |
---|
9239 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
9240 | ! |
---|
9241 | !-- In case of dewfall, set evapotranspiration to zero |
---|
9242 | !-- All super-saturated water is then removed from the air |
---|
9243 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
9244 | surf_usm_h%r_canopy(m) = 0.0_wp |
---|
9245 | ENDIF |
---|
9246 | |
---|
9247 | ! |
---|
9248 | !-- Calculate coefficients for the total evapotranspiration |
---|
9249 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
9250 | !-- For pavements, only evaporation of liquid water is possible. |
---|
9251 | f_qsws_veg = rho_lv * & |
---|
9252 | ( 1.0_wp - surf_usm_h%c_liq(m) ) / & |
---|
9253 | ( surf_usm_h%r_a_green(m) + surf_usm_h%r_canopy(m) ) |
---|
9254 | f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
9255 | surf_usm_h%r_a_green(m) |
---|
9256 | |
---|
9257 | f_qsws = f_qsws_veg + f_qsws_liq |
---|
9258 | ! |
---|
9259 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
9260 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_h(m) - 35.86_wp) - & |
---|
9261 | 17.269_wp*( t_surf_green_h(m) - 273.16_wp) & |
---|
9262 | / ( t_surf_green_h(m) - 35.86_wp)**2 ) |
---|
9263 | |
---|
9264 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
9265 | endif |
---|
9266 | !*********************************************************************************** |
---|
9267 | !-- add LW up so that it can be removed in prognostic equation |
---|
9268 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_sw_in(m) - & |
---|
9269 | surf_usm_h%rad_sw_out(m) + & |
---|
9270 | surf_usm_h%rad_lw_in(m) - & |
---|
9271 | surf_usm_h%rad_lw_out(m) |
---|
9272 | |
---|
9273 | !-- numerator of the prognostic equation |
---|
9274 | !-- Todo: Adjust to tile approach. So far, emissivity for wall (element 0) |
---|
9275 | !-- is used |
---|
9276 | coef_1 = surf_usm_h%rad_net_l(m) + & |
---|
9277 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
9278 | sigma_sb * t_surf_wall_h(m) ** 4 + & |
---|
9279 | f_shf * surf_usm_h%pt1(m) + & |
---|
9280 | lambda_surface * t_wall_h(nzb_wall,m) |
---|
9281 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9282 | coef_window_1 = surf_usm_h%rad_net_l(m) + & |
---|
9283 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_wat_win,m) & |
---|
9284 | * sigma_sb * t_surf_window_h(m) ** 4 + & |
---|
9285 | f_shf_window * surf_usm_h%pt1(m) + & |
---|
9286 | lambda_surface_window * t_window_h(nzb_wall,m) |
---|
9287 | endif |
---|
9288 | IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
9289 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
9290 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9291 | t_surf_green_h(m) ** 4 + & |
---|
9292 | f_shf_green * surf_usm_h%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
9293 | + dq_s_dt * t_surf_green_h(m) ) & |
---|
9294 | +lambda_surface_green * t_green_h(nzb_wall,m) |
---|
9295 | ELSE |
---|
9296 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
9297 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) *& |
---|
9298 | sigma_sb * t_surf_green_h(m) ** 4 + & |
---|
9299 | f_shf_green * surf_usm_h%pt1(m) + & |
---|
9300 | lambda_surface_green * t_green_h(nzb_wall,m) |
---|
9301 | ENDIF |
---|
9302 | |
---|
9303 | !-- denominator of the prognostic equation |
---|
9304 | coef_2 = 4.0_wp * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
9305 | sigma_sb * t_surf_wall_h(m) ** 3 & |
---|
9306 | + lambda_surface + f_shf / exner(k) |
---|
9307 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9308 | coef_window_2 = 4.0_wp * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
9309 | sigma_sb * t_surf_window_h(m) ** 3 & |
---|
9310 | + lambda_surface_window + f_shf_window / exner(k) |
---|
9311 | endif |
---|
9312 | IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
9313 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9314 | t_surf_green_h(m) ** 3 + f_qsws * dq_s_dt & |
---|
9315 | + lambda_surface_green + f_shf_green / exner(k) |
---|
9316 | ELSE |
---|
9317 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9318 | t_surf_green_h(m) ** 3 & |
---|
9319 | + lambda_surface_green + f_shf_green / exner(k) |
---|
9320 | ENDIF |
---|
9321 | |
---|
9322 | !-- implicit solution when the surface layer has no heat capacity, |
---|
9323 | !-- otherwise use RK3 scheme. |
---|
9324 | t_surf_wall_h_p(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
9325 | surf_usm_h%c_surface(m) * t_surf_wall_h(m) ) / & |
---|
9326 | ( surf_usm_h%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
9327 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9328 | t_surf_window_h_p(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
9329 | surf_usm_h%c_surface_window(m) * t_surf_window_h(m) ) / & |
---|
9330 | ( surf_usm_h%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
9331 | endif |
---|
9332 | t_surf_green_h_p(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
9333 | surf_usm_h%c_surface_green(m) * t_surf_green_h(m) ) / & |
---|
9334 | ( surf_usm_h%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
9335 | |
---|
9336 | !-- add RK3 term |
---|
9337 | t_surf_wall_h_p(m) = t_surf_wall_h_p(m) + dt_3d * tsc(3) * & |
---|
9338 | surf_usm_h%tt_surface_wall_m(m) |
---|
9339 | |
---|
9340 | t_surf_window_h_p(m) = t_surf_window_h_p(m) + dt_3d * tsc(3) * & |
---|
9341 | surf_usm_h%tt_surface_window_m(m) |
---|
9342 | |
---|
9343 | t_surf_green_h_p(m) = t_surf_green_h_p(m) + dt_3d * tsc(3) * & |
---|
9344 | surf_usm_h%tt_surface_green_m(m) |
---|
9345 | ! |
---|
9346 | !-- Store surface temperature on pt_surface. Further, in case humidity is used |
---|
9347 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
9348 | !-- assumed to be the surface temperature. |
---|
9349 | surf_usm_h%pt_surface(m) = ( surf_usm_h%frac(ind_veg_wall,m) * t_surf_wall_h_p(m) & |
---|
9350 | + surf_usm_h%frac(ind_wat_win,m) * t_surf_window_h_p(m) & |
---|
9351 | + surf_usm_h%frac(ind_pav_green,m) * t_surf_green_h_p(m) ) & |
---|
9352 | / exner(k) |
---|
9353 | |
---|
9354 | IF ( humidity ) surf_usm_h%vpt_surface(m) = & |
---|
9355 | surf_usm_h%pt_surface(m) |
---|
9356 | |
---|
9357 | !-- calculate true tendency |
---|
9358 | stend_wall = ( t_surf_wall_h_p(m) - t_surf_wall_h(m) - dt_3d * tsc(3) * & |
---|
9359 | surf_usm_h%tt_surface_wall_m(m)) / ( dt_3d * tsc(2) ) |
---|
9360 | stend_window = ( t_surf_window_h_p(m) - t_surf_window_h(m) - dt_3d * tsc(3) * & |
---|
9361 | surf_usm_h%tt_surface_window_m(m)) / ( dt_3d * tsc(2) ) |
---|
9362 | stend_green = ( t_surf_green_h_p(m) - t_surf_green_h(m) - dt_3d * tsc(3) * & |
---|
9363 | surf_usm_h%tt_surface_green_m(m)) / ( dt_3d * tsc(2) ) |
---|
9364 | |
---|
9365 | !-- calculate t_surf tendencies for the next Runge-Kutta step |
---|
9366 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
9367 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
9368 | surf_usm_h%tt_surface_wall_m(m) = stend_wall |
---|
9369 | surf_usm_h%tt_surface_window_m(m) = stend_window |
---|
9370 | surf_usm_h%tt_surface_green_m(m) = stend_green |
---|
9371 | ELSEIF ( intermediate_timestep_count < & |
---|
9372 | intermediate_timestep_count_max ) THEN |
---|
9373 | surf_usm_h%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
9374 | 5.3125_wp * surf_usm_h%tt_surface_wall_m(m) |
---|
9375 | surf_usm_h%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
9376 | 5.3125_wp * surf_usm_h%tt_surface_window_m(m) |
---|
9377 | surf_usm_h%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
9378 | 5.3125_wp * surf_usm_h%tt_surface_green_m(m) |
---|
9379 | ENDIF |
---|
9380 | ENDIF |
---|
9381 | |
---|
9382 | !-- in case of fast changes in the skin temperature, it is required to |
---|
9383 | !-- update the radiative fluxes in order to keep the solution stable |
---|
9384 | IF ( ( ( ABS( t_surf_wall_h_p(m) - t_surf_wall_h(m) ) > 1.0_wp ) .OR. & |
---|
9385 | ( ABS( t_surf_green_h_p(m) - t_surf_green_h(m) ) > 1.0_wp ) .OR. & |
---|
9386 | ( ABS( t_surf_window_h_p(m) - t_surf_window_h(m) ) > 1.0_wp ) ) & |
---|
9387 | .AND. unscheduled_radiation_calls ) THEN |
---|
9388 | force_radiation_call_l = .TRUE. |
---|
9389 | ENDIF |
---|
9390 | ! |
---|
9391 | !-- calculate fluxes |
---|
9392 | !-- rad_net_l is never used! |
---|
9393 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_net_l(m) + & |
---|
9394 | surf_usm_h%frac(ind_veg_wall,m) * & |
---|
9395 | sigma_sb * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
9396 | ( t_surf_wall_h_p(m)**4 - t_surf_wall_h(m)**4 ) & |
---|
9397 | + surf_usm_h%frac(ind_wat_win,m) * & |
---|
9398 | sigma_sb * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
9399 | ( t_surf_window_h_p(m)**4 - t_surf_window_h(m)**4 ) & |
---|
9400 | + surf_usm_h%frac(ind_pav_green,m) * & |
---|
9401 | sigma_sb * surf_usm_h%emissivity(ind_pav_green,m) * & |
---|
9402 | ( t_surf_green_h_p(m)**4 - t_surf_green_h(m)**4 ) |
---|
9403 | |
---|
9404 | surf_usm_h%wghf_eb(m) = lambda_surface * & |
---|
9405 | ( t_surf_wall_h_p(m) - t_wall_h(nzb_wall,m) ) |
---|
9406 | surf_usm_h%wghf_eb_green(m) = lambda_surface_green * & |
---|
9407 | ( t_surf_green_h_p(m) - t_green_h(nzb_wall,m) ) |
---|
9408 | surf_usm_h%wghf_eb_window(m) = lambda_surface_window * & |
---|
9409 | ( t_surf_window_h_p(m) - t_window_h(nzb_wall,m) ) |
---|
9410 | |
---|
9411 | ! |
---|
9412 | !-- ground/wall/roof surface heat flux |
---|
9413 | surf_usm_h%wshf_eb(m) = - f_shf * ( surf_usm_h%pt1(m) - t_surf_wall_h_p(m) / exner(k) ) * & |
---|
9414 | surf_usm_h%frac(ind_veg_wall,m) & |
---|
9415 | - f_shf_window * ( surf_usm_h%pt1(m) - t_surf_window_h_p(m) / exner(k) ) * & |
---|
9416 | surf_usm_h%frac(ind_wat_win,m) & |
---|
9417 | - f_shf_green * ( surf_usm_h%pt1(m) - t_surf_green_h_p(m) / exner(k) ) * & |
---|
9418 | surf_usm_h%frac(ind_pav_green,m) |
---|
9419 | ! |
---|
9420 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
9421 | !-- diffusion_s, surface_layer_fluxes,... |
---|
9422 | surf_usm_h%shf(m) = surf_usm_h%wshf_eb(m) / c_p |
---|
9423 | |
---|
9424 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
9425 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
9426 | |
---|
9427 | ! 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),& |
---|
9428 | ! surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt |
---|
9429 | ! 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) |
---|
9430 | ! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k |
---|
9431 | ! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m) |
---|
9432 | if ((t_surf_green_h_p(m).gt.370.0_wp).or.(t_surf_green_h_p(m).lt.250.0_wp)) then |
---|
9433 | print*, t_surf_green_h_p(m),m,i,j,k |
---|
9434 | stop |
---|
9435 | endif |
---|
9436 | |
---|
9437 | IF ( humidity ) THEN |
---|
9438 | surf_usm_h%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
9439 | * t_surf_green_h(m) - dq_s_dt * & |
---|
9440 | t_surf_green_h_p(m) ) |
---|
9441 | |
---|
9442 | surf_usm_h%qsws(m) = surf_usm_h%qsws_eb(m) / rho_lv |
---|
9443 | |
---|
9444 | surf_usm_h%qsws_veg_eb(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
9445 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
9446 | * t_surf_green_h_p(m) ) |
---|
9447 | |
---|
9448 | surf_usm_h%qsws_liq_eb(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
9449 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
9450 | * t_surf_green_h_p(m) ) |
---|
9451 | ENDIF |
---|
9452 | |
---|
9453 | ! |
---|
9454 | !-- Calculate the true surface resistance |
---|
9455 | IF ( .NOT. humidity ) THEN |
---|
9456 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
9457 | ELSE |
---|
9458 | surf_usm_h%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
9459 | * t_surf_green_h(m) - dq_s_dt * & |
---|
9460 | t_surf_green_h_p(m) ) / & |
---|
9461 | (surf_usm_h%qsws(m) + 1.0E-20) - surf_usm_h%r_a_green(m) |
---|
9462 | ENDIF |
---|
9463 | |
---|
9464 | ! |
---|
9465 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
9466 | !-- evaporation of liquid water |
---|
9467 | IF ( humidity ) THEN |
---|
9468 | ! |
---|
9469 | !-- If precipitation is activated, add rain water to qsws_liq |
---|
9470 | !-- and qsws_soil according the the vegetation coverage. |
---|
9471 | !-- precipitation_rate is given in mm. |
---|
9472 | IF ( precipitation ) THEN |
---|
9473 | |
---|
9474 | ! |
---|
9475 | !-- Add precipitation to liquid water reservoir, if possible. |
---|
9476 | !-- Otherwise, add the water to soil. In case of |
---|
9477 | !-- pavements, the exceeding water amount is implicitely removed |
---|
9478 | !-- as runoff as qsws_soil is then not used in the soil model |
---|
9479 | IF ( m_liq_usm_h%var_usm_1d(m) /= m_liq_max ) THEN |
---|
9480 | surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) & |
---|
9481 | + surf_usm_h%frac(ind_pav_green,m) * prr(k+k_off,j+j_off,i+i_off)& |
---|
9482 | * hyrho(k+k_off) & |
---|
9483 | * 0.001_wp * rho_l * l_v |
---|
9484 | ENDIF |
---|
9485 | |
---|
9486 | ENDIF |
---|
9487 | |
---|
9488 | ! |
---|
9489 | !-- If the air is saturated, check the reservoir water level |
---|
9490 | IF ( surf_usm_h%qsws(m) < 0.0_wp ) THEN |
---|
9491 | ! |
---|
9492 | !-- Check if reservoir is full (avoid values > m_liq_max) |
---|
9493 | !-- In that case, qsws_liq goes to qsws_soil. In this |
---|
9494 | !-- case qsws_veg is zero anyway (because c_liq = 1), |
---|
9495 | !-- so that tend is zero and no further check is needed |
---|
9496 | IF ( m_liq_usm_h%var_usm_1d(m) == m_liq_max ) THEN |
---|
9497 | ! surf_usm_h%qsws_soil(m) = surf_usm_h%qsws_soil(m) + surf_usm_h%qsws_liq(m) |
---|
9498 | |
---|
9499 | surf_usm_h%qsws_liq_eb(m) = 0.0_wp |
---|
9500 | ENDIF |
---|
9501 | |
---|
9502 | ! |
---|
9503 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
9504 | !-- let the water enter the liquid water reservoir as dew on the |
---|
9505 | !-- plant |
---|
9506 | IF ( surf_usm_h%qsws_veg_eb(m) < 0.0_wp ) THEN |
---|
9507 | surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m) |
---|
9508 | surf_usm_h%qsws_veg_eb(m) = 0.0_wp |
---|
9509 | ENDIF |
---|
9510 | ENDIF |
---|
9511 | |
---|
9512 | surf_usm_h%qsws(m) = surf_usm_h%qsws(m) / l_v |
---|
9513 | |
---|
9514 | tend = - surf_usm_h%qsws_liq_eb(m) * drho_l_lv |
---|
9515 | m_liq_usm_h_p%var_usm_1d(m) = m_liq_usm_h%var_usm_1d(m) + dt_3d * & |
---|
9516 | ( tsc(2) * tend + & |
---|
9517 | tsc(3) * tm_liq_usm_h_m%var_usm_1d(m) ) |
---|
9518 | ! |
---|
9519 | !-- Check if reservoir is overfull -> reduce to maximum |
---|
9520 | !-- (conservation of water is violated here) |
---|
9521 | m_liq_usm_h_p%var_usm_1d(m) = MIN( m_liq_usm_h_p%var_usm_1d(m),m_liq_max ) |
---|
9522 | |
---|
9523 | ! |
---|
9524 | !-- Check if reservoir is empty (avoid values < 0.0) |
---|
9525 | !-- (conservation of water is violated here) |
---|
9526 | m_liq_usm_h_p%var_usm_1d(m) = MAX( m_liq_usm_h_p%var_usm_1d(m), 0.0_wp ) |
---|
9527 | ! |
---|
9528 | !-- Calculate m_liq tendencies for the next Runge-Kutta step |
---|
9529 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
9530 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
9531 | tm_liq_usm_h_m%var_usm_1d(m) = tend |
---|
9532 | ELSEIF ( intermediate_timestep_count < & |
---|
9533 | intermediate_timestep_count_max ) THEN |
---|
9534 | tm_liq_usm_h_m%var_usm_1d(m) = -9.5625_wp * tend + & |
---|
9535 | 5.3125_wp * tm_liq_usm_h_m%var_usm_1d(m) |
---|
9536 | ENDIF |
---|
9537 | ENDIF |
---|
9538 | |
---|
9539 | ENDIF |
---|
9540 | else |
---|
9541 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
9542 | endif |
---|
9543 | |
---|
9544 | ENDDO |
---|
9545 | ! |
---|
9546 | !-- Now, treat vertical surface elements |
---|
9547 | DO l = 0, 3 |
---|
9548 | DO m = 1, surf_usm_v(l)%ns |
---|
9549 | ! |
---|
9550 | !-- Get indices of respective grid point |
---|
9551 | i = surf_usm_v(l)%i(m) |
---|
9552 | j = surf_usm_v(l)%j(m) |
---|
9553 | k = surf_usm_v(l)%k(m) |
---|
9554 | |
---|
9555 | ! |
---|
9556 | !-- TODO - how to calculate lambda_surface for horizontal (??? do you mean verical ???) surfaces |
---|
9557 | !-- (lambda_surface is set according to stratification in land surface model). |
---|
9558 | !-- Please note, for vertical surfaces no ol is defined, since |
---|
9559 | !-- stratification is not considered in this case. |
---|
9560 | lambda_surface = surf_usm_v(l)%lambda_surf(m) |
---|
9561 | lambda_surface_window = surf_usm_v(l)%lambda_surf_window(m) |
---|
9562 | lambda_surface_green = surf_usm_v(l)%lambda_surf_green(m) |
---|
9563 | |
---|
9564 | #if ! defined( __nopointer ) |
---|
9565 | ! pt1 = pt(k,j,i) |
---|
9566 | IF ( humidity ) THEN |
---|
9567 | qv1 = q(k,j,i) |
---|
9568 | ELSE |
---|
9569 | qv1 = 0.0_wp |
---|
9570 | ENDIF |
---|
9571 | ! |
---|
9572 | !-- calculate rho * c_p coefficient at wall layer |
---|
9573 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_v(l)%pt1(m) * exner(k) ) |
---|
9574 | |
---|
9575 | if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then |
---|
9576 | ! |
---|
9577 | !-- Calculate frequently used parameters |
---|
9578 | rho_lv = rho_cp / c_p * l_v |
---|
9579 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
9580 | endif |
---|
9581 | #endif |
---|
9582 | |
---|
9583 | !-- Calculation of r_a for vertical surfaces |
---|
9584 | !-- |
---|
9585 | !-- heat transfer coefficient for forced convection along vertical walls |
---|
9586 | !-- follows formulation in TUF3d model (Krayenhoff & Voogt, 2006) |
---|
9587 | !-- |
---|
9588 | !-- H = httc (Tsfc - Tair) |
---|
9589 | !-- httc = rw * (11.8 + 4.2 * Ueff) - 4.0 |
---|
9590 | !-- |
---|
9591 | !-- rw: wall patch roughness relative to 1.0 for concrete |
---|
9592 | !-- Ueff: effective wind speed |
---|
9593 | !-- - 4.0 is a reduction of Rowley et al (1930) formulation based on |
---|
9594 | !-- Cole and Sturrock (1977) |
---|
9595 | !-- |
---|
9596 | !-- Ucan: Canyon wind speed |
---|
9597 | !-- wstar: convective velocity |
---|
9598 | !-- Qs: surface heat flux |
---|
9599 | !-- zH: height of the convective layer |
---|
9600 | !-- wstar = (g/Tcan*Qs*zH)**(1./3.) |
---|
9601 | |
---|
9602 | !-- Effective velocity components must always |
---|
9603 | !-- be defined at scalar grid point. The wall normal component is |
---|
9604 | !-- obtained by simple linear interpolation. ( An alternative would |
---|
9605 | !-- be an logarithmic interpolation. ) |
---|
9606 | !-- Parameter roughness_concrete (default value = 0.001) is used |
---|
9607 | !-- to calculation of roughness relative to concrete |
---|
9608 | surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) / & |
---|
9609 | roughness_concrete * ( 11.8_wp + 4.2_wp * & |
---|
9610 | SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & |
---|
9611 | ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & |
---|
9612 | ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2, & |
---|
9613 | 0.01_wp ) ) & |
---|
9614 | ) - 4.0_wp ) |
---|
9615 | ! |
---|
9616 | !-- Limit aerodynamic resistance |
---|
9617 | IF ( surf_usm_v(l)%r_a(m) < 1.0_wp ) surf_usm_v(l)%r_a(m) = 1.0_wp |
---|
9618 | |
---|
9619 | |
---|
9620 | f_shf = rho_cp / surf_usm_v(l)%r_a(m) |
---|
9621 | f_shf_window = rho_cp / surf_usm_v(l)%r_a(m) |
---|
9622 | f_shf_green = rho_cp / surf_usm_v(l)%r_a(m) |
---|
9623 | |
---|
9624 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
9625 | if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then |
---|
9626 | !-- Adapted from LSM: |
---|
9627 | !-- Second step: calculate canopy resistance r_canopy |
---|
9628 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
9629 | |
---|
9630 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
9631 | !-- night) |
---|
9632 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_v(l)%rad_sw_in(m) + 0.05_wp ) / & |
---|
9633 | (0.81_wp * (0.004_wp * surf_usm_v(l)%rad_sw_in(m) & |
---|
9634 | + 1.0_wp)) ) |
---|
9635 | ! |
---|
9636 | !-- f2: correction for soil moisture availability to plants (the |
---|
9637 | !-- integrated soil moisture must thus be considered here) |
---|
9638 | !-- f2 = 0 for very dry soils |
---|
9639 | |
---|
9640 | f2=1.0_wp |
---|
9641 | ! m_total = 0.0_wp |
---|
9642 | ! DO k = nzb_wall, nzt_wall+1 |
---|
9643 | ! m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
9644 | ! * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
9645 | ! ENDDO |
---|
9646 | ! |
---|
9647 | ! IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
9648 | ! f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
9649 | ! ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
9650 | ! f2 = 1.0_wp |
---|
9651 | ! ELSE |
---|
9652 | ! f2 = 1.0E-20_wp |
---|
9653 | ! ENDIF |
---|
9654 | |
---|
9655 | ! |
---|
9656 | !-- Calculate water vapour pressure at saturation |
---|
9657 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_v_p(l)%t(m) & |
---|
9658 | - 273.16_wp ) / ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) ) |
---|
9659 | ! |
---|
9660 | !-- f3: correction for vapour pressure deficit |
---|
9661 | IF ( surf_usm_v(l)%g_d(m) /= 0.0_wp ) THEN |
---|
9662 | ! |
---|
9663 | !-- Calculate vapour pressure |
---|
9664 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
9665 | f3 = EXP ( - surf_usm_v(l)%g_d(m) * (e_s - e) ) |
---|
9666 | ELSE |
---|
9667 | f3 = 1.0_wp |
---|
9668 | ENDIF |
---|
9669 | ! |
---|
9670 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
9671 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
9672 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
9673 | surf_usm_v(l)%r_canopy(m) = surf_usm_v(l)%r_canopy_min(m) / & |
---|
9674 | ( surf_usm_v(l)%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
9675 | |
---|
9676 | ! !-- Calculate the maximum possible liquid water amount on plants and |
---|
9677 | ! !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
9678 | ! !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
9679 | ! !-- liquid water fraction for paved surfaces is calculated after |
---|
9680 | ! !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
9681 | ! !-- vegetated surfaces and bare soils. |
---|
9682 | ! ! surf_usm_h%lai(m)=4.0_wp |
---|
9683 | ! m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
9684 | ! surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
9685 | ! |
---|
9686 | !-- Calculate saturation specific humidity |
---|
9687 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
9688 | ! |
---|
9689 | !-- In case of dewfall, set evapotranspiration to zero |
---|
9690 | !-- All super-saturated water is then removed from the air |
---|
9691 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
9692 | surf_usm_v(l)%r_canopy(m) = 0.0_wp |
---|
9693 | ENDIF |
---|
9694 | |
---|
9695 | ! |
---|
9696 | !-- Calculate coefficients for the total evapotranspiration |
---|
9697 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
9698 | !-- For pavements, only evaporation of liquid water is possible. |
---|
9699 | f_qsws_veg = rho_lv * & |
---|
9700 | ( 1.0_wp - 0.0_wp ) / & !surf_usm_h%c_liq(m) ) / & |
---|
9701 | ( surf_usm_v(l)%r_a(m) + surf_usm_v(l)%r_canopy(m) ) |
---|
9702 | ! f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
9703 | ! surf_usm_h%r_a_green(m) |
---|
9704 | |
---|
9705 | f_qsws = f_qsws_veg! + f_qsws_liq |
---|
9706 | ! |
---|
9707 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
9708 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_v_p(l)%t(m) - 35.86_wp) - & |
---|
9709 | 17.269_wp*( t_surf_green_v_p(l)%t(m) - 273.16_wp) & |
---|
9710 | / ( t_surf_green_v_p(l)%t(m) - 35.86_wp)**2 ) |
---|
9711 | |
---|
9712 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
9713 | endif |
---|
9714 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
9715 | |
---|
9716 | !-- add LW up so that it can be removed in prognostic equation |
---|
9717 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%rad_sw_in(m) - & |
---|
9718 | surf_usm_v(l)%rad_sw_out(m) + & |
---|
9719 | surf_usm_v(l)%rad_lw_in(m) - & |
---|
9720 | surf_usm_v(l)%rad_lw_out(m) |
---|
9721 | |
---|
9722 | !-- numerator of the prognostic equation |
---|
9723 | coef_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
9724 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_veg_wall,m) * & |
---|
9725 | sigma_sb * t_surf_wall_v(l)%t(m) ** 4 + & |
---|
9726 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
9727 | lambda_surface * t_wall_v(l)%t(nzb_wall,m) |
---|
9728 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9729 | coef_window_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
9730 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_wat_win,m) * & |
---|
9731 | sigma_sb * t_surf_window_v(l)%t(m) ** 4 + & |
---|
9732 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
9733 | lambda_surface_window * t_window_v(l)%t(nzb_wall,m) |
---|
9734 | endif |
---|
9735 | IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
9736 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
9737 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9738 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
9739 | f_shf * surf_usm_v(l)%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
9740 | + dq_s_dt * t_surf_green_v(l)%t(m) ) + & |
---|
9741 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
9742 | ELSE |
---|
9743 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
9744 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9745 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
9746 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
9747 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
9748 | ENDIF |
---|
9749 | |
---|
9750 | |
---|
9751 | !-- denominator of the prognostic equation |
---|
9752 | coef_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_veg_wall,m) * sigma_sb * & |
---|
9753 | t_surf_wall_v(l)%t(m) ** 3 & |
---|
9754 | + lambda_surface + f_shf / exner(k) |
---|
9755 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9756 | coef_window_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_wat_win,m) * sigma_sb * & |
---|
9757 | t_surf_window_v(l)%t(m) ** 3 & |
---|
9758 | + lambda_surface_window + f_shf / exner(k) |
---|
9759 | endif |
---|
9760 | IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
9761 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9762 | t_surf_green_v(l)%t(m) ** 3 + f_qsws * dq_s_dt & |
---|
9763 | + lambda_surface_green + f_shf / exner(k) |
---|
9764 | ELSE |
---|
9765 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9766 | t_surf_green_v(l)%t(m) ** 3 & |
---|
9767 | + lambda_surface_green + f_shf / exner(k) |
---|
9768 | ENDIF |
---|
9769 | |
---|
9770 | !-- implicit solution when the surface layer has no heat capacity, |
---|
9771 | !-- otherwise use RK3 scheme. |
---|
9772 | t_surf_wall_v_p(l)%t(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
9773 | surf_usm_v(l)%c_surface(m) * t_surf_wall_v(l)%t(m) ) / & |
---|
9774 | ( surf_usm_v(l)%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
9775 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9776 | t_surf_window_v_p(l)%t(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
9777 | surf_usm_v(l)%c_surface_window(m) * t_surf_window_v(l)%t(m) ) / & |
---|
9778 | ( surf_usm_v(l)%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
9779 | endif |
---|
9780 | t_surf_green_v_p(l)%t(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
9781 | surf_usm_v(l)%c_surface_green(m) * t_surf_green_v(l)%t(m) ) / & |
---|
9782 | ( surf_usm_v(l)%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
9783 | |
---|
9784 | !-- add RK3 term |
---|
9785 | t_surf_wall_v_p(l)%t(m) = t_surf_wall_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
9786 | surf_usm_v(l)%tt_surface_wall_m(m) |
---|
9787 | t_surf_window_v_p(l)%t(m) = t_surf_window_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
9788 | surf_usm_v(l)%tt_surface_window_m(m) |
---|
9789 | t_surf_green_v_p(l)%t(m) = t_surf_green_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
9790 | surf_usm_v(l)%tt_surface_green_m(m) |
---|
9791 | ! |
---|
9792 | !-- Store surface temperature. Further, in case humidity is used |
---|
9793 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
9794 | !-- assumed to be the surface temperature. |
---|
9795 | surf_usm_v(l)%pt_surface(m) = ( surf_usm_v(l)%frac(ind_veg_wall,m) * t_surf_wall_v_p(l)%t(m) & |
---|
9796 | + surf_usm_v(l)%frac(ind_wat_win,m) * t_surf_window_v_p(l)%t(m) & |
---|
9797 | + surf_usm_v(l)%frac(ind_pav_green,m) * t_surf_green_v_p(l)%t(m) ) & |
---|
9798 | / exner(k) |
---|
9799 | |
---|
9800 | IF ( humidity ) surf_usm_v(l)%vpt_surface(m) = & |
---|
9801 | surf_usm_v(l)%pt_surface(m) |
---|
9802 | |
---|
9803 | !-- calculate true tendency |
---|
9804 | stend_wall = ( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
9805 | surf_usm_v(l)%tt_surface_wall_m(m) ) / ( dt_3d * tsc(2) ) |
---|
9806 | stend_window = ( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
9807 | surf_usm_v(l)%tt_surface_window_m(m) ) / ( dt_3d * tsc(2) ) |
---|
9808 | stend_green = ( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) - dt_3d * tsc(3) * & |
---|
9809 | surf_usm_v(l)%tt_surface_green_m(m) ) / ( dt_3d * tsc(2) ) |
---|
9810 | |
---|
9811 | !-- calculate t_surf_* tendencies for the next Runge-Kutta step |
---|
9812 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
9813 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
9814 | surf_usm_v(l)%tt_surface_wall_m(m) = stend_wall |
---|
9815 | surf_usm_v(l)%tt_surface_window_m(m) = stend_window |
---|
9816 | surf_usm_v(l)%tt_surface_green_m(m) = stend_green |
---|
9817 | ELSEIF ( intermediate_timestep_count < & |
---|
9818 | intermediate_timestep_count_max ) THEN |
---|
9819 | surf_usm_v(l)%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
9820 | 5.3125_wp * surf_usm_v(l)%tt_surface_wall_m(m) |
---|
9821 | surf_usm_v(l)%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
9822 | 5.3125_wp * surf_usm_v(l)%tt_surface_green_m(m) |
---|
9823 | surf_usm_v(l)%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
9824 | 5.3125_wp * surf_usm_v(l)%tt_surface_window_m(m) |
---|
9825 | ENDIF |
---|
9826 | ENDIF |
---|
9827 | |
---|
9828 | !-- in case of fast changes in the skin temperature, it is required to |
---|
9829 | !-- update the radiative fluxes in order to keep the solution stable |
---|
9830 | |
---|
9831 | IF ( ( ( ABS( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
9832 | ( ABS( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
9833 | ( ABS( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) ) > 1.0_wp ) ) & |
---|
9834 | .AND. unscheduled_radiation_calls ) THEN |
---|
9835 | force_radiation_call_l = .TRUE. |
---|
9836 | ENDIF |
---|
9837 | |
---|
9838 | !-- calculate fluxes |
---|
9839 | !-- prognostic rad_net_l is used just for output! |
---|
9840 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
9841 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
9842 | 3.0_wp * sigma_sb * & |
---|
9843 | t_surf_wall_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
9844 | t_surf_wall_v(l)%t(m)**3 * t_surf_wall_v_p(l)%t(m) ) & |
---|
9845 | + surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
9846 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
9847 | 3.0_wp * sigma_sb * & |
---|
9848 | t_surf_window_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
9849 | t_surf_window_v(l)%t(m)**3 * t_surf_window_v_p(l)%t(m) ) & |
---|
9850 | + surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
9851 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
9852 | 3.0_wp * sigma_sb * & |
---|
9853 | t_surf_green_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
9854 | t_surf_green_v(l)%t(m)**3 * t_surf_green_v_p(l)%t(m) ) |
---|
9855 | |
---|
9856 | surf_usm_v(l)%wghf_eb_window(m) = lambda_surface_window * & |
---|
9857 | ( t_surf_window_v_p(l)%t(m) - t_window_v(l)%t(nzb_wall,m) ) |
---|
9858 | surf_usm_v(l)%wghf_eb(m) = lambda_surface * & |
---|
9859 | ( t_surf_wall_v_p(l)%t(m) - t_wall_v(l)%t(nzb_wall,m) ) |
---|
9860 | surf_usm_v(l)%wghf_eb_green(m) = lambda_surface_green * & |
---|
9861 | ( t_surf_green_v_p(l)%t(m) - t_green_v(l)%t(nzb_wall,m) ) |
---|
9862 | |
---|
9863 | !-- ground/wall/roof surface heat flux |
---|
9864 | surf_usm_v(l)%wshf_eb(m) = & |
---|
9865 | - f_shf * ( surf_usm_v(l)%pt1(m) - & |
---|
9866 | t_surf_wall_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
9867 | - f_shf_window * ( surf_usm_v(l)%pt1(m) - & |
---|
9868 | t_surf_window_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_wat_win,m)& |
---|
9869 | - f_shf_green * ( surf_usm_v(l)%pt1(m) - & |
---|
9870 | t_surf_green_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_pav_green,m) |
---|
9871 | |
---|
9872 | ! |
---|
9873 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
9874 | !-- diffusion_s, surface_layer_fluxes,... |
---|
9875 | surf_usm_v(l)%shf(m) = surf_usm_v(l)%wshf_eb(m) / c_p |
---|
9876 | |
---|
9877 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
9878 | if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then !111 |
---|
9879 | |
---|
9880 | ! 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),& |
---|
9881 | ! surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt |
---|
9882 | ! 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) |
---|
9883 | ! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k |
---|
9884 | ! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m) |
---|
9885 | 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 |
---|
9886 | print*, t_surf_green_v_p(l)%t(m),m,i,j,k |
---|
9887 | stop |
---|
9888 | endif |
---|
9889 | |
---|
9890 | IF ( humidity ) THEN |
---|
9891 | surf_usm_v(l)%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
9892 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
9893 | t_surf_green_v_p(l)%t(m) ) |
---|
9894 | |
---|
9895 | surf_usm_v(l)%qsws(m) = surf_usm_v(l)%qsws_eb(m) / rho_lv |
---|
9896 | |
---|
9897 | surf_usm_v(l)%qsws_veg_eb(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
9898 | + dq_s_dt * t_surf_green_v(l)%t(m) - dq_s_dt & |
---|
9899 | * t_surf_green_v_p(l)%t(m) ) |
---|
9900 | |
---|
9901 | ! surf_usm_h%qsws_liq_eb(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
9902 | ! + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
9903 | ! * t_surf_green_h_p(m) ) |
---|
9904 | ENDIF |
---|
9905 | |
---|
9906 | ! |
---|
9907 | !-- Calculate the true surface resistance |
---|
9908 | IF ( .NOT. humidity ) THEN |
---|
9909 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
9910 | ELSE |
---|
9911 | surf_usm_v(l)%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
9912 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
9913 | t_surf_green_v_p(l)%t(m) ) / & |
---|
9914 | (surf_usm_v(l)%qsws(m) + 1.0E-20) - surf_usm_v(l)%r_a(m) |
---|
9915 | ENDIF |
---|
9916 | |
---|
9917 | |
---|
9918 | ! |
---|
9919 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
9920 | !-- evaporation of liquid water |
---|
9921 | IF ( humidity ) THEN |
---|
9922 | ! |
---|
9923 | !-- If the air is saturated, check the reservoir water level |
---|
9924 | IF ( surf_usm_v(l)%qsws(m) < 0.0_wp ) THEN |
---|
9925 | |
---|
9926 | ! |
---|
9927 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
9928 | !-- let the water enter the liquid water reservoir as dew on the |
---|
9929 | !-- plant |
---|
9930 | IF ( surf_usm_v(l)%qsws_veg_eb(m) < 0.0_wp ) THEN |
---|
9931 | ! surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m) |
---|
9932 | surf_usm_v(l)%qsws_veg_eb(m) = 0.0_wp |
---|
9933 | ENDIF |
---|
9934 | ENDIF |
---|
9935 | ENDIF |
---|
9936 | else |
---|
9937 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
9938 | endif !111 |
---|
9939 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
9940 | |
---|
9941 | |
---|
9942 | ENDDO |
---|
9943 | |
---|
9944 | ENDDO |
---|
9945 | ! |
---|
9946 | !-- Add-up anthropogenic heat, for now only at upward-facing surfaces |
---|
9947 | IF ( usm_anthropogenic_heat .AND. & |
---|
9948 | intermediate_timestep_count == intermediate_timestep_count_max ) THEN |
---|
9949 | !-- application of the additional anthropogenic heat sources |
---|
9950 | !-- we considere the traffic for now so all heat is absorbed |
---|
9951 | !-- to the first layer, generalization would be worth. |
---|
9952 | |
---|
9953 | !-- calculation of actual profile coefficient |
---|
9954 | !-- ??? check time_since_reference_point ??? |
---|
9955 | dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp) |
---|
9956 | dhour = INT(dtime/3600.0_wp) |
---|
9957 | DO i = nxl, nxr |
---|
9958 | DO j = nys, nyn |
---|
9959 | DO k = nzub, min(nzut,naheatlayers) |
---|
9960 | IF ( k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
9961 | !-- increase of pt in box i,j,k in time dt_3d |
---|
9962 | !-- given to anthropogenic heat aheat*acoef (W*m-2) |
---|
9963 | !-- linear interpolation of coeficient |
---|
9964 | acoef = (REAL(dhour+1,wp)-dtime/3600.0_wp)*aheatprof(k,dhour) + & |
---|
9965 | (dtime/3600.0_wp-REAL(dhour,wp))*aheatprof(k,dhour+1) |
---|
9966 | IF ( aheat(k,j,i) > 0.0_wp ) THEN |
---|
9967 | !-- calculate rho * c_p coefficient at layer k |
---|
9968 | rho_cp = c_p * hyp(k) / ( r_d * pt(k+1,j,i) * exner(k) ) |
---|
9969 | pt(k,j,i) = pt(k,j,i) + aheat(k,j,i)*acoef*dt_3d/(exner(k)*rho_cp*dz(1)) |
---|
9970 | ENDIF |
---|
9971 | ENDIF |
---|
9972 | ENDDO |
---|
9973 | ENDDO |
---|
9974 | ENDDO |
---|
9975 | |
---|
9976 | ENDIF |
---|
9977 | |
---|
9978 | !-- pt and shf are defined on nxlg:nxrg,nysg:nyng |
---|
9979 | !-- get the borders from neighbours |
---|
9980 | #if ! defined( __nopointer ) |
---|
9981 | CALL exchange_horiz( pt, nbgp ) |
---|
9982 | #endif |
---|
9983 | |
---|
9984 | !-- calculation of force_radiation_call: |
---|
9985 | !-- Make logical OR for all processes. |
---|
9986 | !-- Force radiation call if at least one processor forces it. |
---|
9987 | IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )& |
---|
9988 | THEN |
---|
9989 | #if defined( __parallel ) |
---|
9990 | IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) |
---|
9991 | CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call, & |
---|
9992 | 1, MPI_LOGICAL, MPI_LOR, comm2d, ierr ) |
---|
9993 | #else |
---|
9994 | force_radiation_call = force_radiation_call_l |
---|
9995 | #endif |
---|
9996 | force_radiation_call_l = .FALSE. |
---|
9997 | ENDIF |
---|
9998 | |
---|
9999 | ! ! |
---|
10000 | ! !-- Calculate surface specific humidity |
---|
10001 | ! IF ( humidity ) THEN |
---|
10002 | ! CALL calc_q_surface_usm |
---|
10003 | ! ENDIF |
---|
10004 | |
---|
10005 | |
---|
10006 | CONTAINS |
---|
10007 | !------------------------------------------------------------------------------! |
---|
10008 | ! Description: |
---|
10009 | ! ------------ |
---|
10010 | !> Calculation of specific humidity of the skin layer (surface). It is assumend |
---|
10011 | !> that the skin is always saturated. |
---|
10012 | !------------------------------------------------------------------------------! |
---|
10013 | SUBROUTINE calc_q_surface_usm |
---|
10014 | |
---|
10015 | IMPLICIT NONE |
---|
10016 | |
---|
10017 | REAL(wp) :: resistance !< aerodynamic and soil resistance term |
---|
10018 | |
---|
10019 | DO m = 1, surf_usm_h%ns |
---|
10020 | |
---|
10021 | i = surf_usm_h%i(m) |
---|
10022 | j = surf_usm_h%j(m) |
---|
10023 | k = surf_usm_h%k(m) |
---|
10024 | |
---|
10025 | ! |
---|
10026 | !-- Calculate water vapour pressure at saturation |
---|
10027 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
10028 | ( t_surf_green_h_p(m) - 273.16_wp ) / & |
---|
10029 | ( t_surf_green_h_p(m) - 35.86_wp ) & |
---|
10030 | ) |
---|
10031 | |
---|
10032 | ! |
---|
10033 | !-- Calculate specific humidity at saturation |
---|
10034 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
10035 | |
---|
10036 | ! surf_usm_h%r_a_green(m) = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
10037 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-10_wp ) |
---|
10038 | ! |
---|
10039 | ! !-- make sure that the resistance does not drop to zero |
---|
10040 | ! IF ( ABS(surf_usm_h%r_a_green(m)) < 1.0E-10_wp ) surf_usm_h%r_a_green(m) = 1.0E-10_wp |
---|
10041 | |
---|
10042 | resistance = surf_usm_h%r_a_green(m) / ( surf_usm_h%r_a_green(m) + surf_usm_h%r_s(m) + 1E-5_wp ) |
---|
10043 | |
---|
10044 | ! |
---|
10045 | !-- Calculate specific humidity at surface |
---|
10046 | IF ( bulk_cloud_model ) THEN |
---|
10047 | q(k,j,i) = resistance * q_s + & |
---|
10048 | ( 1.0_wp - resistance ) * & |
---|
10049 | ( q(k,j,i) - ql(k,j,i) ) |
---|
10050 | ELSE |
---|
10051 | q(k,j,i) = resistance * q_s + & |
---|
10052 | ( 1.0_wp - resistance ) * & |
---|
10053 | q(k,j,i) |
---|
10054 | ENDIF |
---|
10055 | |
---|
10056 | ! |
---|
10057 | !-- Update virtual potential temperature |
---|
10058 | vpt(k,j,i) = pt(k,j,i) * & |
---|
10059 | ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
10060 | |
---|
10061 | ENDDO |
---|
10062 | |
---|
10063 | !-- Now, treat vertical surface elements |
---|
10064 | DO l = 0, 3 |
---|
10065 | DO m = 1, surf_usm_v(l)%ns |
---|
10066 | ! |
---|
10067 | !-- Get indices of respective grid point |
---|
10068 | i = surf_usm_v(l)%i(m) |
---|
10069 | j = surf_usm_v(l)%j(m) |
---|
10070 | k = surf_usm_v(l)%k(m) |
---|
10071 | |
---|
10072 | ! |
---|
10073 | !-- Calculate water vapour pressure at saturation |
---|
10074 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
10075 | ( t_surf_green_v_p(l)%t(m) - 273.16_wp ) / & |
---|
10076 | ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) & |
---|
10077 | ) |
---|
10078 | |
---|
10079 | ! |
---|
10080 | !-- Calculate specific humidity at saturation |
---|
10081 | q_s = 0.622_wp * e_s / ( surface_pressure -e_s ) |
---|
10082 | |
---|
10083 | ! |
---|
10084 | !-- Calculate specific humidity at surface |
---|
10085 | IF ( bulk_cloud_model ) THEN |
---|
10086 | q(k,j,i) = ( q(k,j,i) - ql(k,j,i) ) |
---|
10087 | ELSE |
---|
10088 | q(k,j,i) = q(k,j,i) |
---|
10089 | ENDIF |
---|
10090 | ! |
---|
10091 | !-- Update virtual potential temperature |
---|
10092 | vpt(k,j,i) = pt(k,j,i) * & |
---|
10093 | ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
10094 | |
---|
10095 | ENDDO |
---|
10096 | |
---|
10097 | ENDDO |
---|
10098 | |
---|
10099 | END SUBROUTINE calc_q_surface_usm |
---|
10100 | |
---|
10101 | END SUBROUTINE usm_surface_energy_balance |
---|
10102 | |
---|
10103 | |
---|
10104 | !------------------------------------------------------------------------------! |
---|
10105 | ! Description: |
---|
10106 | ! ------------ |
---|
10107 | !> Swapping of timelevels for t_surf and t_wall |
---|
10108 | !> called out from subroutine swap_timelevel |
---|
10109 | !------------------------------------------------------------------------------! |
---|
10110 | SUBROUTINE usm_swap_timelevel( mod_count ) |
---|
10111 | |
---|
10112 | IMPLICIT NONE |
---|
10113 | |
---|
10114 | INTEGER(iwp), INTENT(IN) :: mod_count |
---|
10115 | |
---|
10116 | #if defined( __nopointer ) |
---|
10117 | t_surf_wall_h = t_surf_wall_h_p |
---|
10118 | t_wall_h = t_wall_h_p |
---|
10119 | t_surf_wall_v = t_surf_wall_v_p |
---|
10120 | t_wall_v = t_wall_v_p |
---|
10121 | t_surf_window_h = t_surf_window_h_p |
---|
10122 | t_window_h = t_window_h_p |
---|
10123 | t_surf_window_v = t_surf_window_v_p |
---|
10124 | t_window_v = t_window_v_p |
---|
10125 | t_surf_green_h = t_surf_green_h_p |
---|
10126 | t_surf_green_v = t_surf_green_v_p |
---|
10127 | t_green_h = t_green_h_p |
---|
10128 | t_green_v = t_green_v_p |
---|
10129 | #else |
---|
10130 | SELECT CASE ( mod_count ) |
---|
10131 | CASE ( 0 ) |
---|
10132 | ! |
---|
10133 | !-- Horizontal surfaces |
---|
10134 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
10135 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
10136 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
10137 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
10138 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
10139 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
10140 | ! |
---|
10141 | !-- Vertical surfaces |
---|
10142 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
10143 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
10144 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
10145 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
10146 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
10147 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
10148 | CASE ( 1 ) |
---|
10149 | ! |
---|
10150 | !-- Horizontal surfaces |
---|
10151 | t_surf_wall_h => t_surf_wall_h_2; t_surf_wall_h_p => t_surf_wall_h_1 |
---|
10152 | t_wall_h => t_wall_h_2; t_wall_h_p => t_wall_h_1 |
---|
10153 | t_surf_window_h => t_surf_window_h_2; t_surf_window_h_p => t_surf_window_h_1 |
---|
10154 | t_window_h => t_window_h_2; t_window_h_p => t_window_h_1 |
---|
10155 | t_surf_green_h => t_surf_green_h_2; t_surf_green_h_p => t_surf_green_h_1 |
---|
10156 | t_green_h => t_green_h_2; t_green_h_p => t_green_h_1 |
---|
10157 | ! |
---|
10158 | !-- Vertical surfaces |
---|
10159 | t_surf_wall_v => t_surf_wall_v_2; t_surf_wall_v_p => t_surf_wall_v_1 |
---|
10160 | t_wall_v => t_wall_v_2; t_wall_v_p => t_wall_v_1 |
---|
10161 | t_surf_window_v => t_surf_window_v_2; t_surf_window_v_p => t_surf_window_v_1 |
---|
10162 | t_window_v => t_window_v_2; t_window_v_p => t_window_v_1 |
---|
10163 | t_surf_green_v => t_surf_green_v_2; t_surf_green_v_p => t_surf_green_v_1 |
---|
10164 | t_green_v => t_green_v_2; t_green_v_p => t_green_v_1 |
---|
10165 | END SELECT |
---|
10166 | #endif |
---|
10167 | |
---|
10168 | END SUBROUTINE usm_swap_timelevel |
---|
10169 | |
---|
10170 | !------------------------------------------------------------------------------! |
---|
10171 | ! Description: |
---|
10172 | ! ------------ |
---|
10173 | !> Subroutine writes t_surf and t_wall data into restart files |
---|
10174 | !------------------------------------------------------------------------------! |
---|
10175 | SUBROUTINE usm_wrd_local |
---|
10176 | |
---|
10177 | |
---|
10178 | IMPLICIT NONE |
---|
10179 | |
---|
10180 | CHARACTER(LEN=1) :: dum !< dummy string to create output-variable name |
---|
10181 | INTEGER(iwp) :: l !< index surface type orientation |
---|
10182 | |
---|
10183 | CALL wrd_write_string( 'ns_h_on_file_usm' ) |
---|
10184 | WRITE ( 14 ) surf_usm_h%ns |
---|
10185 | |
---|
10186 | CALL wrd_write_string( 'ns_v_on_file_usm' ) |
---|
10187 | WRITE ( 14 ) surf_usm_v(0:3)%ns |
---|
10188 | |
---|
10189 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
10190 | WRITE ( 14 ) surf_usm_h%start_index |
---|
10191 | |
---|
10192 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
10193 | WRITE ( 14 ) surf_usm_h%end_index |
---|
10194 | |
---|
10195 | CALL wrd_write_string( 't_surf_wall_h' ) |
---|
10196 | WRITE ( 14 ) t_surf_wall_h |
---|
10197 | |
---|
10198 | CALL wrd_write_string( 't_surf_window_h' ) |
---|
10199 | WRITE ( 14 ) t_surf_window_h |
---|
10200 | |
---|
10201 | CALL wrd_write_string( 't_surf_green_h' ) |
---|
10202 | WRITE ( 14 ) t_surf_green_h |
---|
10203 | |
---|
10204 | DO l = 0, 3 |
---|
10205 | |
---|
10206 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
10207 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
10208 | |
---|
10209 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
10210 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
10211 | |
---|
10212 | WRITE( dum, '(I1)') l |
---|
10213 | |
---|
10214 | CALL wrd_write_string( 't_surf_wall_v(' // dum // ')' ) |
---|
10215 | WRITE ( 14 ) t_surf_wall_v(l)%t |
---|
10216 | |
---|
10217 | CALL wrd_write_string( 't_surf_window_v(' // dum // ')' ) |
---|
10218 | WRITE ( 14 ) t_surf_window_v(l)%t |
---|
10219 | |
---|
10220 | CALL wrd_write_string( 't_surf_green_v(' // dum // ')' ) |
---|
10221 | WRITE ( 14 ) t_surf_green_v(l)%t |
---|
10222 | |
---|
10223 | ENDDO |
---|
10224 | |
---|
10225 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
10226 | WRITE ( 14 ) surf_usm_h%start_index |
---|
10227 | |
---|
10228 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
10229 | WRITE ( 14 ) surf_usm_h%end_index |
---|
10230 | |
---|
10231 | CALL wrd_write_string( 't_wall_h' ) |
---|
10232 | WRITE ( 14 ) t_wall_h |
---|
10233 | |
---|
10234 | CALL wrd_write_string( 't_window_h' ) |
---|
10235 | WRITE ( 14 ) t_window_h |
---|
10236 | |
---|
10237 | CALL wrd_write_string( 't_green_h' ) |
---|
10238 | WRITE ( 14 ) t_green_h |
---|
10239 | |
---|
10240 | DO l = 0, 3 |
---|
10241 | |
---|
10242 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
10243 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
10244 | |
---|
10245 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
10246 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
10247 | |
---|
10248 | WRITE( dum, '(I1)') l |
---|
10249 | |
---|
10250 | CALL wrd_write_string( 't_wall_v(' // dum // ')' ) |
---|
10251 | WRITE ( 14 ) t_wall_v(l)%t |
---|
10252 | |
---|
10253 | CALL wrd_write_string( 't_window_v(' // dum // ')' ) |
---|
10254 | WRITE ( 14 ) t_window_v(l)%t |
---|
10255 | |
---|
10256 | CALL wrd_write_string( 't_green_v(' // dum // ')' ) |
---|
10257 | WRITE ( 14 ) t_green_v(l)%t |
---|
10258 | |
---|
10259 | ENDDO |
---|
10260 | |
---|
10261 | |
---|
10262 | END SUBROUTINE usm_wrd_local |
---|
10263 | |
---|
10264 | ! |
---|
10265 | !-- Integrated stability function for heat and moisture |
---|
10266 | FUNCTION psi_h( zeta ) |
---|
10267 | |
---|
10268 | USE kinds |
---|
10269 | |
---|
10270 | IMPLICIT NONE |
---|
10271 | |
---|
10272 | REAL(wp) :: psi_h !< Integrated similarity function result |
---|
10273 | REAL(wp) :: zeta !< Stability parameter z/L |
---|
10274 | REAL(wp) :: x !< dummy variable |
---|
10275 | |
---|
10276 | REAL(wp), PARAMETER :: a = 1.0_wp !< constant |
---|
10277 | REAL(wp), PARAMETER :: b = 0.66666666666_wp !< constant |
---|
10278 | REAL(wp), PARAMETER :: c = 5.0_wp !< constant |
---|
10279 | REAL(wp), PARAMETER :: d = 0.35_wp !< constant |
---|
10280 | REAL(wp), PARAMETER :: c_d_d = c / d !< constant |
---|
10281 | REAL(wp), PARAMETER :: bc_d_d = b * c / d !< constant |
---|
10282 | |
---|
10283 | |
---|
10284 | IF ( zeta < 0.0_wp ) THEN |
---|
10285 | x = SQRT( 1.0_wp - 16.0_wp * zeta ) |
---|
10286 | psi_h = 2.0_wp * LOG( (1.0_wp + x ) / 2.0_wp ) |
---|
10287 | ELSE |
---|
10288 | psi_h = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - (1.0_wp & |
---|
10289 | + 0.66666666666_wp * a * zeta )**1.5_wp - bc_d_d & |
---|
10290 | + 1.0_wp |
---|
10291 | ! |
---|
10292 | !-- Old version for stable conditions (only valid for z/L < 0.5) |
---|
10293 | !-- psi_h = - 5.0_wp * zeta |
---|
10294 | ENDIF |
---|
10295 | |
---|
10296 | END FUNCTION psi_h |
---|
10297 | |
---|
10298 | END MODULE urban_surface_mod |
---|