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 3502 2018-11-07 14:45:23Z suehring $ |
---|
30 | ! Disable initialization of building roofs with ground-floor-level properties, |
---|
31 | ! since this causes strong oscillations of surface temperature during the |
---|
32 | ! spinup. |
---|
33 | ! |
---|
34 | ! 3469 2018-10-30 20:05:07Z kanani |
---|
35 | ! Add missing PUBLIC variables for new indoor model |
---|
36 | ! |
---|
37 | ! 3449 2018-10-29 19:36:56Z suehring |
---|
38 | ! Bugfix: Fix average arrays allocations in usm_average_3d_data (J.Resler) |
---|
39 | ! Bugfix: Fix reading wall temperatures (J.Resler) |
---|
40 | ! Bugfix: Fix treating of outputs for wall temperature and sky view factors (J.Resler) |
---|
41 | ! |
---|
42 | ! |
---|
43 | ! 3435 2018-10-26 18:25:44Z gronemeier |
---|
44 | ! Bugfix: allocate gamma_w_green_sat until nzt_wall+1 |
---|
45 | ! |
---|
46 | ! 3418 2018-10-24 16:07:39Z kanani |
---|
47 | ! (rvtils, srissman) |
---|
48 | ! -Updated building databse, two green roof types (ind_green_type_roof) |
---|
49 | ! -Latent heat flux for green walls and roofs, new output of latent heatflux |
---|
50 | ! and soil water content of green roof substrate |
---|
51 | ! -t_surf changed to t_surf_wall |
---|
52 | ! -Added namelist parameter usm_wall_mod for lower wall tendency |
---|
53 | ! of first two wall layers during spinup |
---|
54 | ! -Window calculations deactivated during spinup |
---|
55 | ! |
---|
56 | ! 3382 2018-10-19 13:10:32Z knoop |
---|
57 | ! Bugix: made array declaration Fortran Standard conform |
---|
58 | ! |
---|
59 | ! 3378 2018-10-19 12:34:59Z kanani |
---|
60 | ! merge from radiation branch (r3362) into trunk |
---|
61 | ! (moh.hefny): |
---|
62 | ! - check the requested output variables if they are correct |
---|
63 | ! - added unscheduled_radiation_calls switch to control force_radiation_call |
---|
64 | ! - minor formate changes |
---|
65 | ! |
---|
66 | ! 3371 2018-10-18 13:40:12Z knoop |
---|
67 | ! Set flag indicating that albedo at urban surfaces is already initialized |
---|
68 | ! |
---|
69 | ! 3347 2018-10-15 14:21:08Z suehring |
---|
70 | ! Enable USM initialization with default building parameters in case no static |
---|
71 | ! input file exist. |
---|
72 | ! |
---|
73 | ! 3343 2018-10-15 10:38:52Z suehring |
---|
74 | ! Add output variables usm_rad_pc_inlw, usm_rad_pc_insw* |
---|
75 | ! |
---|
76 | ! 3274 2018-09-24 15:42:55Z knoop |
---|
77 | ! Modularization of all bulk cloud physics code components |
---|
78 | ! |
---|
79 | ! 3248 2018-09-14 09:42:06Z sward |
---|
80 | ! Minor formating changes |
---|
81 | ! |
---|
82 | ! 3246 2018-09-13 15:14:50Z sward |
---|
83 | ! Added error handling for input namelist via parin_fail_message |
---|
84 | ! |
---|
85 | ! 3241 2018-09-12 15:02:00Z raasch |
---|
86 | ! unused variables removed |
---|
87 | ! |
---|
88 | ! 3223 2018-08-30 13:48:17Z suehring |
---|
89 | ! Bugfix for commit 3222 |
---|
90 | ! |
---|
91 | ! 3222 2018-08-30 13:35:35Z suehring |
---|
92 | ! Introduction of surface array for type and its name |
---|
93 | ! |
---|
94 | ! 3203 2018-08-23 10:48:36Z suehring |
---|
95 | ! Revise bulk parameter for emissivity at ground-floor level |
---|
96 | ! |
---|
97 | ! 3196 2018-08-13 12:26:14Z maronga |
---|
98 | ! Added maximum aerodynamic resistance of 300 for horiztonal surfaces. |
---|
99 | ! |
---|
100 | ! 3176 2018-07-26 17:12:48Z suehring |
---|
101 | ! Bugfix, update virtual potential surface temparture, else heat fluxes on |
---|
102 | ! roofs might become unphysical |
---|
103 | ! |
---|
104 | ! 3152 2018-07-19 13:26:52Z suehring |
---|
105 | ! Initialize q_surface, which might be used in surface_layer_fluxes |
---|
106 | ! |
---|
107 | ! 3151 2018-07-19 08:45:38Z raasch |
---|
108 | ! remaining preprocessor define strings __check removed |
---|
109 | ! |
---|
110 | ! 3136 2018-07-16 14:48:21Z suehring |
---|
111 | ! Limit also roughness length for heat and moisture where necessary |
---|
112 | ! |
---|
113 | ! 3123 2018-07-12 16:21:53Z suehring |
---|
114 | ! Correct working precision for INTEGER number |
---|
115 | ! |
---|
116 | ! 3115 2018-07-10 12:49:26Z suehring |
---|
117 | ! Additional building type to represent bridges |
---|
118 | ! |
---|
119 | ! 3091 2018-06-28 16:20:35Z suehring |
---|
120 | ! - Limit aerodynamic resistance at vertical walls. |
---|
121 | ! - Add check for local roughness length not exceeding surface-layer height and |
---|
122 | ! limit roughness length where necessary. |
---|
123 | ! |
---|
124 | ! 3065 2018-06-12 07:03:02Z Giersch |
---|
125 | ! Unused array dxdir was removed, dz was replaced by dzu to consider vertical |
---|
126 | ! grid stretching |
---|
127 | ! |
---|
128 | ! 3049 2018-05-29 13:52:36Z Giersch |
---|
129 | ! Error messages revised |
---|
130 | ! |
---|
131 | ! 3045 2018-05-28 07:55:41Z Giersch |
---|
132 | ! Error message added |
---|
133 | ! |
---|
134 | ! 3029 2018-05-23 12:19:17Z raasch |
---|
135 | ! bugfix: close unit 151 instead of 90 |
---|
136 | ! |
---|
137 | ! 3014 2018-05-09 08:42:38Z maronga |
---|
138 | ! Added pc_transpiration_rate |
---|
139 | ! |
---|
140 | ! 2977 2018-04-17 10:27:57Z kanani |
---|
141 | ! Implement changes from branch radiation (r2948-2971) with minor modifications. |
---|
142 | ! (moh.hefny): |
---|
143 | ! Extended exn for all model domain height to avoid the need to get nzut. |
---|
144 | ! |
---|
145 | ! 2963 2018-04-12 14:47:44Z suehring |
---|
146 | ! Introduce index for vegetation/wall, pavement/green-wall and water/window |
---|
147 | ! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. . |
---|
148 | ! |
---|
149 | ! 2943 2018-04-03 16:17:10Z suehring |
---|
150 | ! Calculate exner function at all height levels and remove some un-used |
---|
151 | ! variables. |
---|
152 | ! |
---|
153 | ! 2932 2018-03-26 09:39:22Z maronga |
---|
154 | ! renamed urban_surface_par to urban_surface_parameters |
---|
155 | ! |
---|
156 | ! 2921 2018-03-22 15:05:23Z Giersch |
---|
157 | ! The activation of spinup has been moved to parin |
---|
158 | ! |
---|
159 | ! 2920 2018-03-22 11:22:01Z kanani |
---|
160 | ! Remove unused pcbl, npcbl from ONLY list |
---|
161 | ! moh.hefny: |
---|
162 | ! Fixed bugs introduced by new structures and by moving radiation interaction |
---|
163 | ! into radiation_model_mod.f90. |
---|
164 | ! Bugfix: usm data output 3D didn't respect directions |
---|
165 | ! |
---|
166 | ! 2906 2018-03-19 08:56:40Z Giersch |
---|
167 | ! Local variable ids has to be initialized with a value of -1 in |
---|
168 | ! usm_average_3d_data |
---|
169 | ! |
---|
170 | ! 2894 2018-03-15 09:17:58Z Giersch |
---|
171 | ! Calculations of the index range of the subdomain on file which overlaps with |
---|
172 | ! the current subdomain are already done in read_restart_data_mod, |
---|
173 | ! usm_read/write_restart_data have been renamed to usm_r/wrd_local, variable |
---|
174 | ! named found has been introduced for checking if restart data was found, |
---|
175 | ! reading of restart strings has been moved completely to |
---|
176 | ! read_restart_data_mod, usm_rrd_local is already inside the overlap loop |
---|
177 | ! programmed in read_restart_data_mod, SAVE attribute added where necessary, |
---|
178 | ! deallocation and allocation of some arrays have been changed to take care of |
---|
179 | ! different restart files that can be opened (index i), the marker *** end usm |
---|
180 | ! *** is not necessary anymore, strings and their respective lengths are |
---|
181 | ! written out and read now in case of restart runs to get rid of prescribed |
---|
182 | ! character lengths |
---|
183 | ! |
---|
184 | ! 2805 2018-02-14 17:00:09Z suehring |
---|
185 | ! Initialization of resistances. |
---|
186 | ! |
---|
187 | ! 2797 2018-02-08 13:24:35Z suehring |
---|
188 | ! Comment concerning output of ground-heat flux added. |
---|
189 | ! |
---|
190 | ! 2766 2018-01-22 17:17:47Z kanani |
---|
191 | ! Removed redundant commas, added some blanks |
---|
192 | ! |
---|
193 | ! 2765 2018-01-22 11:34:58Z maronga |
---|
194 | ! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in |
---|
195 | ! building_pars |
---|
196 | ! |
---|
197 | ! 2750 2018-01-15 16:26:51Z knoop |
---|
198 | ! Move flag plant canopy to modules |
---|
199 | ! |
---|
200 | ! 2737 2018-01-11 14:58:11Z kanani |
---|
201 | ! Removed unused variables t_surf_whole... |
---|
202 | ! |
---|
203 | ! 2735 2018-01-11 12:01:27Z suehring |
---|
204 | ! resistances are saved in surface attributes |
---|
205 | ! |
---|
206 | ! 2723 2018-01-05 09:27:03Z maronga |
---|
207 | ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) |
---|
208 | ! |
---|
209 | ! 2720 2018-01-02 16:27:15Z kanani |
---|
210 | ! Correction of comment |
---|
211 | ! |
---|
212 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
213 | ! Corrected "Former revisions" section |
---|
214 | ! |
---|
215 | ! 2705 2017-12-18 11:26:23Z maronga |
---|
216 | ! Changes from last commit documented |
---|
217 | ! |
---|
218 | ! 2703 2017-12-15 20:12:38Z maronga |
---|
219 | ! Workaround for calculation of r_a |
---|
220 | ! |
---|
221 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
222 | ! - Change in file header (GPL part) |
---|
223 | ! - Bugfix in calculation of pt_surface and related fluxes. (BM) |
---|
224 | ! - Do not write surface temperatures onto pt array as this might cause |
---|
225 | ! problems with nesting. (MS) |
---|
226 | ! - Revised calculation of pt1 (now done in surface_layer_fluxes). |
---|
227 | ! Bugfix, f_shf_window and f_shf_green were not set at vertical surface |
---|
228 | ! elements. (MS) |
---|
229 | ! - merged with branch ebsolver |
---|
230 | ! green building surfaces do not evaporate yet |
---|
231 | ! properties of green wall layers and window layers are taken from wall layers |
---|
232 | ! this input data is missing. (RvT) |
---|
233 | ! - Merged with branch radiation (developed by Mohamed Salim) |
---|
234 | ! - Revised initialization. (MS) |
---|
235 | ! - Rename emiss_surf into emissivity, roughness_wall into z0, albedo_surf into |
---|
236 | ! albedo. (MS) |
---|
237 | ! - Move first call of usm_radiatin from usm_init to init_3d_model |
---|
238 | ! - fixed problem with near surface temperature |
---|
239 | ! - added near surface temperature t_surf_10cm_h(m), t_surf_10cm_v(l)%t(m) |
---|
240 | ! - does not work with temp profile including stability, ol |
---|
241 | ! t_surf_10cm = pt1 now |
---|
242 | ! - merged with 2357 bugfix, error message for nopointer version |
---|
243 | ! - added indoor model coupling with wall heat flux |
---|
244 | ! - added green substrate/ dry vegetation layer for buildings |
---|
245 | ! - merged with 2232 new surface-type structure |
---|
246 | ! - added transmissivity of window tiles |
---|
247 | ! - added MOSAIK tile approach for 3 different surfaces (RvT) |
---|
248 | ! |
---|
249 | ! 2583 2017-10-26 13:58:38Z knoop |
---|
250 | ! Bugfix: reverted MPI_Win_allocate_cptr introduction in last commit |
---|
251 | ! |
---|
252 | ! 2582 2017-10-26 13:19:46Z hellstea |
---|
253 | ! Workaround for gnufortran compiler added in usm_calc_svf. CALL MPI_Win_allocate is |
---|
254 | ! replaced by CALL MPI_Win_allocate_cptr if defined ( __gnufortran ). |
---|
255 | ! |
---|
256 | ! 2544 2017-10-13 18:09:32Z maronga |
---|
257 | ! Date and time quantities are now read from date_and_time_mod. Solar constant is |
---|
258 | ! read from radiation_model_mod |
---|
259 | ! |
---|
260 | ! 2516 2017-10-04 11:03:04Z suehring |
---|
261 | ! Remove tabs |
---|
262 | ! |
---|
263 | ! 2514 2017-10-04 09:52:37Z suehring |
---|
264 | ! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny |
---|
265 | ! no output of ghost layer data |
---|
266 | ! |
---|
267 | ! 2350 2017-08-15 11:48:26Z kanani |
---|
268 | ! Bugfix and error message for nopointer version. |
---|
269 | ! Additional "! defined(__nopointer)" as workaround to enable compilation of |
---|
270 | ! nopointer version. |
---|
271 | ! |
---|
272 | ! 2318 2017-07-20 17:27:44Z suehring |
---|
273 | ! Get topography top index via Function call |
---|
274 | ! |
---|
275 | ! 2317 2017-07-20 17:27:19Z suehring |
---|
276 | ! Bugfix: adjust output of shf. Added support for spinups |
---|
277 | ! |
---|
278 | ! 2287 2017-06-15 16:46:30Z suehring |
---|
279 | ! Bugfix in determination topography-top index |
---|
280 | ! |
---|
281 | ! 2269 2017-06-09 11:57:32Z suehring |
---|
282 | ! Enable restart runs with different number of PEs |
---|
283 | ! Bugfixes nopointer branch |
---|
284 | ! |
---|
285 | ! 2258 2017-06-08 07:55:13Z suehring |
---|
286 | ! Bugfix, add pre-preprocessor directives to enable non-parrallel mode |
---|
287 | ! |
---|
288 | ! 2233 2017-05-30 18:08:54Z suehring |
---|
289 | ! |
---|
290 | ! 2232 2017-05-30 17:47:52Z suehring |
---|
291 | ! Adjustments according to new surface-type structure. Remove usm_wall_heat_flux; |
---|
292 | ! insteat, heat fluxes are directly applied in diffusion_s. |
---|
293 | ! |
---|
294 | ! 2213 2017-04-24 15:10:35Z kanani |
---|
295 | ! Removal of output quantities usm_lad and usm_canopy_hr |
---|
296 | ! |
---|
297 | ! 2209 2017-04-19 09:34:46Z kanani |
---|
298 | ! cpp switch __mpi3 removed, |
---|
299 | ! minor formatting, |
---|
300 | ! small bugfix for division by zero (Krc) |
---|
301 | ! |
---|
302 | ! 2113 2017-01-12 13:40:46Z kanani |
---|
303 | ! cpp switch __mpi3 added for MPI-3 standard code (Ketelsen) |
---|
304 | ! |
---|
305 | ! 2071 2016-11-17 11:22:14Z maronga |
---|
306 | ! Small bugfix (Resler) |
---|
307 | ! |
---|
308 | ! 2031 2016-10-21 15:11:58Z knoop |
---|
309 | ! renamed variable rho to rho_ocean |
---|
310 | ! |
---|
311 | ! 2024 2016-10-12 16:42:37Z kanani |
---|
312 | ! Bugfixes in deallocation of array plantt and reading of csf/csfsurf, |
---|
313 | ! optimization of MPI-RMA operations, |
---|
314 | ! declaration of pcbl as integer, |
---|
315 | ! renamed usm_radnet -> usm_rad_net, usm_canopy_khf -> usm_canopy_hr, |
---|
316 | ! splitted arrays svf -> svf & csf, svfsurf -> svfsurf & csfsurf, |
---|
317 | ! use of new control parameter varnamelength, |
---|
318 | ! added output variables usm_rad_ressw, usm_rad_reslw, |
---|
319 | ! minor formatting changes, |
---|
320 | ! minor optimizations. |
---|
321 | ! |
---|
322 | ! 2011 2016-09-19 17:29:57Z kanani |
---|
323 | ! Major reformatting according to PALM coding standard (comments, blanks, |
---|
324 | ! alphabetical ordering, etc.), |
---|
325 | ! removed debug_prints, |
---|
326 | ! removed auxiliary SUBROUTINE get_usm_info, instead, USM flag urban_surface is |
---|
327 | ! defined in MODULE control_parameters (modules.f90) to avoid circular |
---|
328 | ! dependencies, |
---|
329 | ! renamed canopy_heat_flux to pc_heating_rate, as meaning of quantity changed. |
---|
330 | ! |
---|
331 | ! 2007 2016-08-24 15:47:17Z kanani |
---|
332 | ! Initial revision |
---|
333 | ! |
---|
334 | ! |
---|
335 | ! Description: |
---|
336 | ! ------------ |
---|
337 | ! 2016/6/9 - Initial version of the USM (Urban Surface Model) |
---|
338 | ! authors: Jaroslav Resler, Pavel Krc |
---|
339 | ! (Czech Technical University in Prague and Institute of |
---|
340 | ! Computer Science of the Czech Academy of Sciences, Prague) |
---|
341 | ! with contributions: Michal Belda, Nina Benesova, Ondrej Vlcek |
---|
342 | ! partly inspired by PALM LSM (B. Maronga) |
---|
343 | ! parameterizations of Ra checked with TUF3D (E. S. Krayenhoff) |
---|
344 | !> Module for Urban Surface Model (USM) |
---|
345 | !> The module includes: |
---|
346 | !> 1. radiation model with direct/diffuse radiation, shading, reflections |
---|
347 | !> and integration with plant canopy |
---|
348 | !> 2. wall and wall surface model |
---|
349 | !> 3. surface layer energy balance |
---|
350 | !> 4. anthropogenic heat (only from transportation so far) |
---|
351 | !> 5. necessary auxiliary subroutines (reading inputs, writing outputs, |
---|
352 | !> restart simulations, ...) |
---|
353 | !> It also make use of standard radiation and integrates it into |
---|
354 | !> urban surface model. |
---|
355 | !> |
---|
356 | !> Further work: |
---|
357 | !> ------------- |
---|
358 | !> 1. Remove global arrays surfouts, surfoutl and only keep track of radiosity |
---|
359 | !> from surfaces that are visible from local surfaces (i.e. there is a SVF |
---|
360 | !> where target is local). To do that, radiosity will be exchanged after each |
---|
361 | !> reflection step using MPI_Alltoall instead of current MPI_Allgather. |
---|
362 | !> |
---|
363 | !> 2. Temporarily large values of surface heat flux can be observed, up to |
---|
364 | !> 1.2 Km/s, which seem to be not realistic. |
---|
365 | !> |
---|
366 | !> @todo Output of _av variables in case of restarts |
---|
367 | !> @todo Revise flux conversion in energy-balance solver |
---|
368 | !> @todo Bugfixing in nopointer branch |
---|
369 | !> @todo Check optimizations for RMA operations |
---|
370 | !> @todo Alternatives for MPI_WIN_ALLOCATE? (causes problems with openmpi) |
---|
371 | !> @todo Check for load imbalances in CPU measures, e.g. for exchange_horiz_prog |
---|
372 | !> factor 3 between min and max time |
---|
373 | !> @todo Move setting of flag indoor_model to indoor_model_mod once available |
---|
374 | !> @todo Check divisions in wtend (etc.) calculations for possible division |
---|
375 | !> by zero, e.g. in case fraq(0,m) + fraq(1,m) = 0?! |
---|
376 | !> @todo Use unit 90 for OPEN/CLOSE of input files (FK) |
---|
377 | !> @todo Move plant canopy stuff into plant canopy code |
---|
378 | !------------------------------------------------------------------------------! |
---|
379 | MODULE urban_surface_mod |
---|
380 | |
---|
381 | USE arrays_3d, & |
---|
382 | #if ! defined( __nopointer ) |
---|
383 | ONLY: hyp, zu, pt, p, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
384 | #else |
---|
385 | ONLY: hyp, pt, u, v, w, tend, exner, hyrho, prr, q, ql, vpt |
---|
386 | #endif |
---|
387 | USE calc_mean_profile_mod, & |
---|
388 | ONLY: calc_mean_profile |
---|
389 | |
---|
390 | USE basic_constants_and_equations_mod, & |
---|
391 | ONLY: c_p, g, kappa, pi, r_d, rho_l, l_v |
---|
392 | |
---|
393 | USE control_parameters, & |
---|
394 | ONLY: coupling_start_time, topography, dt_3d, humidity, & |
---|
395 | intermediate_timestep_count, initializing_actions, & |
---|
396 | intermediate_timestep_count_max, simulated_time, end_time, & |
---|
397 | timestep_scheme, tsc, coupling_char, io_blocks, io_group, & |
---|
398 | message_string, time_since_reference_point, surface_pressure, & |
---|
399 | pt_surface, large_scale_forcing, lsf_surf, spinup, & |
---|
400 | spinup_pt_mean, spinup_time, time_do3d, dt_do3d, & |
---|
401 | average_count_3d, varnamelength, urban_surface, & |
---|
402 | plant_canopy, dz |
---|
403 | |
---|
404 | USE bulk_cloud_model_mod, & |
---|
405 | ONLY: bulk_cloud_model, precipitation |
---|
406 | |
---|
407 | USE cpulog, & |
---|
408 | ONLY: cpu_log, log_point, log_point_s |
---|
409 | |
---|
410 | USE date_and_time_mod, & |
---|
411 | ONLY: time_utc_init |
---|
412 | |
---|
413 | USE grid_variables, & |
---|
414 | ONLY: dx, dy, ddx, ddy, ddx2, ddy2 |
---|
415 | |
---|
416 | USE indices, & |
---|
417 | ONLY: nx, ny, nnx, nny, nnz, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, & |
---|
418 | nysg, nzb, nzt, nbgp, wall_flags_0 |
---|
419 | |
---|
420 | USE, INTRINSIC :: iso_c_binding |
---|
421 | |
---|
422 | USE kinds |
---|
423 | |
---|
424 | USE pegrid |
---|
425 | |
---|
426 | USE plant_canopy_model_mod, & |
---|
427 | ONLY: pc_heating_rate, pc_transpiration_rate, pc_latent_rate |
---|
428 | |
---|
429 | USE radiation_model_mod, & |
---|
430 | ONLY: albedo_type, radiation_interaction, calc_zenith, zenith, & |
---|
431 | radiation, rad_sw_in, rad_lw_in, rad_sw_out, rad_lw_out, & |
---|
432 | sigma_sb, sun_direction, sun_dir_lat, sun_dir_lon, & |
---|
433 | force_radiation_call, surfinsw, surfinlw, surfinswdir, & |
---|
434 | surfinswdif, surfoutsw, surfoutlw, surfins,nsvfl, svf, svfsurf, & |
---|
435 | surfinl, surfinlwdif, rad_sw_in_dir, rad_sw_in_diff, & |
---|
436 | rad_lw_in_diff, surfouts, surfoutl, surfoutsl, surfoutll, surf, & |
---|
437 | surfl, nsurfl, pcbinsw, pcbinlw, pcbinswdir, & |
---|
438 | pcbinswdif, iup_u, inorth_u, isouth_u, ieast_u, iwest_u, iup_l, & |
---|
439 | inorth_l, isouth_l, ieast_l, iwest_l, id, & |
---|
440 | iz, iy, ix, nsurf, idsvf, ndsvf, & |
---|
441 | idcsf, ndcsf, kdcsf, pct, & |
---|
442 | startland, endland, startwall, endwall, skyvf, skyvft, nzub, & |
---|
443 | nzut, npcbl, pcbl, unscheduled_radiation_calls |
---|
444 | |
---|
445 | USE statistics, & |
---|
446 | ONLY: hom, statistic_regions |
---|
447 | |
---|
448 | USE surface_mod, & |
---|
449 | ONLY: get_topography_top_index_ji, get_topography_top_index, & |
---|
450 | ind_pav_green, ind_veg_wall, ind_wat_win, surf_usm_h, & |
---|
451 | surf_usm_v, surface_restore_elements |
---|
452 | |
---|
453 | |
---|
454 | IMPLICIT NONE |
---|
455 | |
---|
456 | ! |
---|
457 | !-- USM model constants |
---|
458 | |
---|
459 | REAL(wp), PARAMETER :: & |
---|
460 | b_ch = 6.04_wp, & ! Clapp & Hornberger exponent |
---|
461 | lambda_h_green_dry = 0.19_wp, & ! heat conductivity for dry soil |
---|
462 | lambda_h_green_sm = 3.44_wp, & ! heat conductivity of the soil matrix |
---|
463 | lambda_h_water = 0.57_wp, & ! heat conductivity of water |
---|
464 | psi_sat = -0.388_wp, & ! soil matrix potential at saturation |
---|
465 | rho_c_soil = 2.19E6_wp, & ! volumetric heat capacity of soil |
---|
466 | rho_c_water = 4.20E6_wp !, & ! volumetric heat capacity of water |
---|
467 | ! m_max_depth = 0.0002_wp ! Maximum capacity of the water reservoir (m) |
---|
468 | |
---|
469 | ! |
---|
470 | !-- Soil parameters I alpha_vg, l_vg_green, n_vg, gamma_w_green_sat |
---|
471 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: soil_pars = RESHAPE( (/ & |
---|
472 | 3.83_wp, 1.250_wp, 1.38_wp, 6.94E-6_wp, & ! 1 |
---|
473 | 3.14_wp, -2.342_wp, 1.28_wp, 1.16E-6_wp, & ! 2 |
---|
474 | 0.83_wp, -0.588_wp, 1.25_wp, 0.26E-6_wp, & ! 3 |
---|
475 | 3.67_wp, -1.977_wp, 1.10_wp, 2.87E-6_wp, & ! 4 |
---|
476 | 2.65_wp, 2.500_wp, 1.10_wp, 1.74E-6_wp, & ! 5 |
---|
477 | 1.30_wp, 0.400_wp, 1.20_wp, 0.93E-6_wp, & ! 6 |
---|
478 | 0.00_wp, 0.00_wp, 0.00_wp, 0.57E-6_wp & ! 7 |
---|
479 | /), (/ 4, 7 /) ) |
---|
480 | |
---|
481 | ! |
---|
482 | !-- Soil parameters II swc_sat, fc, wilt, swc_res |
---|
483 | REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: m_soil_pars = RESHAPE( (/ & |
---|
484 | 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp, & ! 1 |
---|
485 | 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp, & ! 2 |
---|
486 | 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp, & ! 3 |
---|
487 | 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp, & ! 4 |
---|
488 | 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp, & ! 5 |
---|
489 | 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp, & ! 6 |
---|
490 | 0.472_wp, 0.323_wp, 0.171_wp, 0.000_wp & ! 7 |
---|
491 | /), (/ 4, 7 /) ) |
---|
492 | |
---|
493 | ! value 9999999.9_wp -> generic available or user-defined value must be set |
---|
494 | ! otherwise -> no generic variable and user setting is optional |
---|
495 | REAL(wp) :: alpha_vangenuchten = 9999999.9_wp, & !< NAMELIST alpha_vg |
---|
496 | field_capacity = 9999999.9_wp, & !< NAMELIST fc |
---|
497 | hydraulic_conductivity = 9999999.9_wp, & !< NAMELIST gamma_w_green_sat |
---|
498 | lambda_h_green_sat = 0.0_wp, & !< heat conductivity for saturated soil |
---|
499 | l_vangenuchten = 9999999.9_wp, & !< NAMELIST l_vg |
---|
500 | n_vangenuchten = 9999999.9_wp, & !< NAMELIST n_vg |
---|
501 | residual_moisture = 9999999.9_wp, & !< NAMELIST m_res |
---|
502 | saturation_moisture = 9999999.9_wp, & !< NAMELIST m_sat |
---|
503 | wilting_point = 9999999.9_wp!, & !< NAMELIST m_wilt |
---|
504 | |
---|
505 | |
---|
506 | !-- configuration parameters (they can be setup in PALM config) |
---|
507 | LOGICAL :: usm_material_model = .TRUE. !< flag parameter indicating wheather the model of heat in materials is used |
---|
508 | LOGICAL :: usm_anthropogenic_heat = .FALSE. !< flag parameter indicating wheather the anthropogenic heat sources (e.g.transportation) are used |
---|
509 | LOGICAL :: force_radiation_call_l = .FALSE. !< flag parameter for unscheduled radiation model calls |
---|
510 | LOGICAL :: indoor_model = .FALSE. !< whether to use the indoor model |
---|
511 | LOGICAL :: read_wall_temp_3d = .FALSE. |
---|
512 | LOGICAL :: usm_wall_mod = .FALSE. !< reduces conductivity of the first 2 wall layers by factor 0.1 |
---|
513 | |
---|
514 | |
---|
515 | INTEGER(iwp) :: building_type = 1 !< default building type (preleminary setting) |
---|
516 | INTEGER(iwp) :: land_category = 2 !< default category for land surface |
---|
517 | INTEGER(iwp) :: wall_category = 2 !< default category for wall surface over pedestrian zone |
---|
518 | INTEGER(iwp) :: pedestrian_category = 2 !< default category for wall surface in pedestrian zone |
---|
519 | INTEGER(iwp) :: roof_category = 2 !< default category for root surface |
---|
520 | REAL(wp) :: roughness_concrete = 0.001_wp !< roughness length of average concrete surface |
---|
521 | ! |
---|
522 | !-- Indices of input attributes for (above) ground floor level |
---|
523 | INTEGER(iwp) :: ind_alb_wall_agfl = 65 !< index in input list for albedo_type of wall above ground floor level |
---|
524 | INTEGER(iwp) :: ind_alb_wall_gfl = 32 !< index in input list for albedo_type of wall ground floor level |
---|
525 | INTEGER(iwp) :: ind_alb_wall_r = 96 !< index in input list for albedo_type of wall roof |
---|
526 | INTEGER(iwp) :: ind_alb_green_agfl = 83 !< index in input list for albedo_type of green above ground floor level |
---|
527 | INTEGER(iwp) :: ind_alb_green_gfl = 50 !< index in input list for albedo_type of green ground floor level |
---|
528 | INTEGER(iwp) :: ind_alb_green_r = 115 !< index in input list for albedo_type of green roof |
---|
529 | INTEGER(iwp) :: ind_alb_win_agfl = 79 !< index in input list for albedo_type of window fraction above ground floor level |
---|
530 | INTEGER(iwp) :: ind_alb_win_gfl = 46 !< index in input list for albedo_type of window fraction ground floor level |
---|
531 | INTEGER(iwp) :: ind_alb_win_r = 110 !< index in input list for albedo_type of window fraction roof |
---|
532 | INTEGER(iwp) :: ind_emis_wall_agfl = 64 !< index in input list for wall emissivity, above ground floor level |
---|
533 | INTEGER(iwp) :: ind_emis_wall_gfl = 31 !< index in input list for wall emissivity, ground floor level |
---|
534 | INTEGER(iwp) :: ind_emis_wall_r = 95 !< index in input list for wall emissivity, roof |
---|
535 | INTEGER(iwp) :: ind_emis_green_agfl = 82 !< index in input list for green emissivity, above ground floor level |
---|
536 | INTEGER(iwp) :: ind_emis_green_gfl = 49 !< index in input list for green emissivity, ground floor level |
---|
537 | INTEGER(iwp) :: ind_emis_green_r = 114 !< index in input list for green emissivity, roof |
---|
538 | INTEGER(iwp) :: ind_emis_win_agfl = 77 !< index in input list for window emissivity, above ground floor level |
---|
539 | INTEGER(iwp) :: ind_emis_win_gfl = 44 !< index in input list for window emissivity, ground floor level |
---|
540 | INTEGER(iwp) :: ind_emis_win_r = 108 !< index in input list for window emissivity, roof |
---|
541 | INTEGER(iwp) :: ind_green_frac_w_agfl = 80 !< index in input list for green fraction on wall, above ground floor level |
---|
542 | INTEGER(iwp) :: ind_green_frac_w_gfl = 47 !< index in input list for green fraction on wall, ground floor level |
---|
543 | INTEGER(iwp) :: ind_green_frac_r_agfl = 112 !< index in input list for green fraction on roof, above ground floor level |
---|
544 | INTEGER(iwp) :: ind_green_frac_r_gfl = 111 !< index in input list for green fraction on roof, ground floor level |
---|
545 | INTEGER(iwp) :: ind_hc1_agfl = 58 !< index in input list for heat capacity at first wall layer, above ground floor level |
---|
546 | INTEGER(iwp) :: ind_hc1_gfl = 25 !< index in input list for heat capacity at first wall layer, ground floor level |
---|
547 | INTEGER(iwp) :: ind_hc1_wall_r = 89 !< index in input list for heat capacity at first wall layer, roof |
---|
548 | INTEGER(iwp) :: ind_hc1_win_agfl = 71 !< index in input list for heat capacity at first window layer, above ground floor level |
---|
549 | INTEGER(iwp) :: ind_hc1_win_gfl = 38 !< index in input list for heat capacity at first window layer, ground floor level |
---|
550 | INTEGER(iwp) :: ind_hc1_win_r = 102 !< index in input list for heat capacity at first window layer, roof |
---|
551 | INTEGER(iwp) :: ind_hc2_agfl = 59 !< index in input list for heat capacity at second wall layer, above ground floor level |
---|
552 | INTEGER(iwp) :: ind_hc2_gfl = 26 !< index in input list for heat capacity at second wall layer, ground floor level |
---|
553 | INTEGER(iwp) :: ind_hc2_wall_r = 90 !< index in input list for heat capacity at second wall layer, roof |
---|
554 | INTEGER(iwp) :: ind_hc2_win_agfl = 72 !< index in input list for heat capacity at second window layer, above ground floor level |
---|
555 | INTEGER(iwp) :: ind_hc2_win_gfl = 39 !< index in input list for heat capacity at second window layer, ground floor level |
---|
556 | INTEGER(iwp) :: ind_hc2_win_r = 103 !< index in input list for heat capacity at second window layer, roof |
---|
557 | INTEGER(iwp) :: ind_hc3_agfl = 60 !< index in input list for heat capacity at third wall layer, above ground floor level |
---|
558 | INTEGER(iwp) :: ind_hc3_gfl = 27 !< index in input list for heat capacity at third wall layer, ground floor level |
---|
559 | INTEGER(iwp) :: ind_hc3_wall_r = 91 !< index in input list for heat capacity at third wall layer, roof |
---|
560 | INTEGER(iwp) :: ind_hc3_win_agfl = 73 !< index in input list for heat capacity at third window layer, above ground floor level |
---|
561 | INTEGER(iwp) :: ind_hc3_win_gfl = 40 !< index in input list for heat capacity at third window layer, ground floor level |
---|
562 | INTEGER(iwp) :: ind_hc3_win_r = 104 !< index in input list for heat capacity at third window layer, roof |
---|
563 | INTEGER(iwp) :: ind_gflh = 17 !< index in input list for ground floor level height |
---|
564 | INTEGER(iwp) :: ind_lai_r_agfl = 113 !< index in input list for LAI on roof, above ground floor level |
---|
565 | INTEGER(iwp) :: ind_lai_r_gfl = 113 !< index in input list for LAI on roof, ground floor level |
---|
566 | INTEGER(iwp) :: ind_lai_w_agfl = 81 !< index in input list for LAI on wall, above ground floor level |
---|
567 | INTEGER(iwp) :: ind_lai_w_gfl = 48 !< index in input list for LAI on wall, ground floor level |
---|
568 | INTEGER(iwp) :: ind_tc1_agfl = 61 !< index in input list for thermal conductivity at first wall layer, above ground floor level |
---|
569 | INTEGER(iwp) :: ind_tc1_gfl = 28 !< index in input list for thermal conductivity at first wall layer, ground floor level |
---|
570 | INTEGER(iwp) :: ind_tc1_wall_r = 92 !< index in input list for thermal conductivity at first wall layer, roof |
---|
571 | INTEGER(iwp) :: ind_tc1_win_agfl = 74 !< index in input list for thermal conductivity at first window layer, above ground floor level |
---|
572 | INTEGER(iwp) :: ind_tc1_win_gfl = 41 !< index in input list for thermal conductivity at first window layer, ground floor level |
---|
573 | INTEGER(iwp) :: ind_tc1_win_r = 105 !< index in input list for thermal conductivity at first window layer, roof |
---|
574 | INTEGER(iwp) :: ind_tc2_agfl = 62 !< index in input list for thermal conductivity at second wall layer, above ground floor level |
---|
575 | INTEGER(iwp) :: ind_tc2_gfl = 29 !< index in input list for thermal conductivity at second wall layer, ground floor level |
---|
576 | INTEGER(iwp) :: ind_tc2_wall_r = 93 !< index in input list for thermal conductivity at second wall layer, roof |
---|
577 | INTEGER(iwp) :: ind_tc2_win_agfl = 75 !< index in input list for thermal conductivity at second window layer, above ground floor level |
---|
578 | INTEGER(iwp) :: ind_tc2_win_gfl = 42 !< index in input list for thermal conductivity at second window layer, ground floor level |
---|
579 | INTEGER(iwp) :: ind_tc2_win_r = 106 !< index in input list for thermal conductivity at second window layer, ground floor level |
---|
580 | INTEGER(iwp) :: ind_tc3_agfl = 63 !< index in input list for thermal conductivity at third wall layer, above ground floor level |
---|
581 | INTEGER(iwp) :: ind_tc3_gfl = 30 !< index in input list for thermal conductivity at third wall layer, ground floor level |
---|
582 | INTEGER(iwp) :: ind_tc3_wall_r = 94 !< index in input list for thermal conductivity at third wall layer, roof |
---|
583 | INTEGER(iwp) :: ind_tc3_win_agfl = 76 !< index in input list for thermal conductivity at third window layer, above ground floor level |
---|
584 | INTEGER(iwp) :: ind_tc3_win_gfl = 43 !< index in input list for thermal conductivity at third window layer, ground floor level |
---|
585 | INTEGER(iwp) :: ind_tc3_win_r = 107 !< index in input list for thermal conductivity at third window layer, roof |
---|
586 | INTEGER(iwp) :: ind_thick_1_agfl = 54 !< index for wall layer thickness - 1st layer above ground floor level |
---|
587 | INTEGER(iwp) :: ind_thick_1_gfl = 21 !< index for wall layer thickness - 1st layer ground floor level |
---|
588 | INTEGER(iwp) :: ind_thick_1_wall_r = 85 !< index for wall layer thickness - 1st layer roof |
---|
589 | INTEGER(iwp) :: ind_thick_1_win_agfl = 67 !< index for window layer thickness - 1st layer above ground floor level |
---|
590 | INTEGER(iwp) :: ind_thick_1_win_gfl = 34 !< index for window layer thickness - 1st layer ground floor level |
---|
591 | INTEGER(iwp) :: ind_thick_1_win_r = 98 !< index for window layer thickness - 1st layer roof |
---|
592 | INTEGER(iwp) :: ind_thick_2_agfl = 55 !< index for wall layer thickness - 2nd layer above ground floor level |
---|
593 | INTEGER(iwp) :: ind_thick_2_gfl = 22 !< index for wall layer thickness - 2nd layer ground floor level |
---|
594 | INTEGER(iwp) :: ind_thick_2_wall_r = 86 !< index for wall layer thickness - 2nd layer roof |
---|
595 | INTEGER(iwp) :: ind_thick_2_win_agfl = 68 !< index for window layer thickness - 2nd layer above ground floor level |
---|
596 | INTEGER(iwp) :: ind_thick_2_win_gfl = 35 !< index for window layer thickness - 2nd layer ground floor level |
---|
597 | INTEGER(iwp) :: ind_thick_2_win_r = 99 !< index for window layer thickness - 2nd layer roof |
---|
598 | INTEGER(iwp) :: ind_thick_3_agfl = 56 !< index for wall layer thickness - 3rd layer above ground floor level |
---|
599 | INTEGER(iwp) :: ind_thick_3_gfl = 23 !< index for wall layer thickness - 3rd layer ground floor level |
---|
600 | INTEGER(iwp) :: ind_thick_3_wall_r = 87 !< index for wall layer thickness - 3rd layer roof |
---|
601 | INTEGER(iwp) :: ind_thick_3_win_agfl = 69 !< index for window layer thickness - 3rd layer above ground floor level |
---|
602 | INTEGER(iwp) :: ind_thick_3_win_gfl = 36 !< index for window layer thickness - 3rd layer ground floor level |
---|
603 | INTEGER(iwp) :: ind_thick_3_win_r = 100 !< index for window layer thickness - 3rd layer roof |
---|
604 | INTEGER(iwp) :: ind_thick_4_agfl = 57 !< index for wall layer thickness - 4th layer above ground floor level |
---|
605 | INTEGER(iwp) :: ind_thick_4_gfl = 24 !< index for wall layer thickness - 4th layer ground floor level |
---|
606 | INTEGER(iwp) :: ind_thick_4_wall_r = 88 !< index for wall layer thickness - 4st layer roof |
---|
607 | INTEGER(iwp) :: ind_thick_4_win_agfl = 70 !< index for window layer thickness - 4th layer above ground floor level |
---|
608 | INTEGER(iwp) :: ind_thick_4_win_gfl = 37 !< index for window layer thickness - 4th layer ground floor level |
---|
609 | INTEGER(iwp) :: ind_thick_4_win_r = 101 !< index for window layer thickness - 4th layer roof |
---|
610 | INTEGER(iwp) :: ind_trans_agfl = 78 !< index in input list for window transmissivity, above ground floor level |
---|
611 | INTEGER(iwp) :: ind_trans_gfl = 45 !< index in input list for window transmissivity, ground floor level |
---|
612 | INTEGER(iwp) :: ind_trans_r = 109 !< index in input list for window transmissivity, roof |
---|
613 | INTEGER(iwp) :: ind_wall_frac_agfl = 53 !< index in input list for wall fraction, above ground floor level |
---|
614 | INTEGER(iwp) :: ind_wall_frac_gfl = 20 !< index in input list for wall fraction, ground floor level |
---|
615 | INTEGER(iwp) :: ind_wall_frac_r = 84 !< index in input list for wall fraction, roof |
---|
616 | INTEGER(iwp) :: ind_win_frac_agfl = 66 !< index in input list for window fraction, above ground floor level |
---|
617 | INTEGER(iwp) :: ind_win_frac_gfl = 33 !< index in input list for window fraction, ground floor level |
---|
618 | INTEGER(iwp) :: ind_win_frac_r = 97 !< index in input list for window fraction, roof |
---|
619 | INTEGER(iwp) :: ind_z0_agfl = 51 !< index in input list for z0, above ground floor level |
---|
620 | INTEGER(iwp) :: ind_z0_gfl = 18 !< index in input list for z0, ground floor level |
---|
621 | INTEGER(iwp) :: ind_z0qh_agfl = 52 !< index in input list for z0h / z0q, above ground floor level |
---|
622 | INTEGER(iwp) :: ind_z0qh_gfl = 19 !< index in input list for z0h / z0q, ground floor level |
---|
623 | INTEGER(iwp) :: ind_green_type_roof = 116 !< index in input list for type of green roof |
---|
624 | |
---|
625 | |
---|
626 | REAL(wp) :: roof_height_limit = 4.0_wp !< height for distinguish between land surfaces and roofs |
---|
627 | REAL(wp) :: ground_floor_level = 4.0_wp !< default ground floor level |
---|
628 | |
---|
629 | |
---|
630 | CHARACTER(37), DIMENSION(0:7), PARAMETER :: building_type_name = (/ & |
---|
631 | 'user-defined ', & ! 0 |
---|
632 | 'residential - 1950 ', & ! 1 |
---|
633 | 'residential 1951 - 2000 ', & ! 2 |
---|
634 | 'residential 2001 - ', & ! 3 |
---|
635 | 'office - 1950 ', & ! 4 |
---|
636 | 'office 1951 - 2000 ', & ! 5 |
---|
637 | 'office 2001 - ', & ! 6 |
---|
638 | 'bridges ' & ! 7 |
---|
639 | /) |
---|
640 | ! |
---|
641 | !-- building parameters, 6 different types |
---|
642 | !-- Parameter for urban surface model |
---|
643 | !-- 0 - heat capacity wall surface, 1 - heat capacity of window surface, 2 - heat capacity of green surface |
---|
644 | !-- 3 - thermal conductivity of wall surface, 4 - thermal conductivity of window surface, |
---|
645 | !-- 5 - thermal conductivty of green surface, 6 - wall fraction ground plate, |
---|
646 | !-- 7 - 1st wall layer thickness ground plate, 8 - 2nd wall layer thickness ground plate |
---|
647 | !-- 9 - 3rd wall layer thickness ground plate, 10 - 4th wall layer thickness ground plate, |
---|
648 | !-- 11 - heat capacity 1st/2nd wall layer ground plate, 12 - heat capacity 3rd wall layer ground plate |
---|
649 | !-- 13 - heat capacity 4th wall layer ground plate, 14 - thermal conductivity 1st/2nd wall layer ground plate, |
---|
650 | !-- 15 - thermal conductivity 3rd wall layer ground plate, 16 - thermal conductivity 4th wall layer ground plate |
---|
651 | !-- 17 - ground floor level height, 18 - z0 roughness ground floor level, 19 - z0h/z0g roughness heaat/humidity, |
---|
652 | !-- 20 - wall fraction ground floor level, 21 - 1st wall layer thickness ground floor level, |
---|
653 | !-- 22 - 2nd wall layer thickness ground floor level, 23 - 3rd wall layer thickness ground floor level, |
---|
654 | !-- 24 - 4th wall layer thickness ground floor level, 25 - heat capacity 1st/2nd wall layer ground floor level, |
---|
655 | !-- 26 - heat capacity 3rd wall layer ground floor level, 27 - heat capacity 4th wall layer ground floor level, |
---|
656 | !-- 28 - thermal conductivity 1st/2nd wall layer ground floor level, |
---|
657 | !-- 29 - thermal conductivity 3rd wall layer ground floor level, 30 - thermal conductivity 4th wall layer ground floor level |
---|
658 | !-- 31 - wall emissivity ground floor level, 32 - wall albedo ground floor level, 33 - window fraction ground floor level, |
---|
659 | !-- 34 - 1st window layer thickness ground floor level, 35 - 2nd window layer thickness ground floor level, |
---|
660 | !-- 36 - 3rd window layer thickness ground floor level, 37 - 4th window layer thickness ground floor level, |
---|
661 | !-- 38 - heat capacity 1st/2nd window layer ground floor level, 39 - heat capacity 3rd window layer ground floor level, |
---|
662 | !-- 40 - heat capacity 4th window layer ground floor level, |
---|
663 | !-- 41 - thermal conductivity 1st/2nd window layer ground floor level, |
---|
664 | !-- 42 - thermal conductivity 3rd window layer ground floor level, |
---|
665 | !-- 43 - thermal conductivity 4th window layer ground floor level, 44 - window emissivity ground floor level, |
---|
666 | !-- 45 - window transmissivity ground floor level, 46 - window albedo ground floor level, |
---|
667 | !-- 47 - green fraction ground floor level, 48 - LAI on wall ground floor level, 49 - green emissivity ground floor level, |
---|
668 | !-- 50 - green albedo ground floor level, 51 - z0 roughness above ground floor level, |
---|
669 | !-- 52 - z0h/z0g roughness heat/humidity above ground floor level, 53 - wall fraction above ground floor level |
---|
670 | !-- 54 - 1st wall layer thickness above ground floor level, 55 - 2nd wall layer thickness above ground floor level |
---|
671 | !-- 56 - 3rd wall layer thickness above ground floor level, 57 - 4th wall layer thickness above ground floor level |
---|
672 | !-- 58 - heat capacity 1st/2nd wall layer above ground floor level, |
---|
673 | !-- 59 - heat capacity 3rd wall layer above ground floor level, |
---|
674 | !-- 60 - heat capacity 4th wall layer above ground floor level, |
---|
675 | !-- 61 - thermal conductivity 1st/2nd wall layer above ground floor level, |
---|
676 | !-- 62 - thermal conductivity 3rd wall layer above ground floor level, |
---|
677 | !-- 63 - thermal conductivity 4th wall layer above ground floor level, |
---|
678 | !-- 64 - wall emissivity above ground floor level, 65 - wall albedo above ground floor level, |
---|
679 | !-- 66 - window fraction above ground floor level, 67 - 1st window layer thickness above ground floor level, |
---|
680 | !-- 68 - 2nd thickness window layer above ground floor level, 69 - 3rd window layer thickness above ground floor level, |
---|
681 | !-- 70 - 4th window layer thickness above ground floor level, |
---|
682 | !-- 71 - heat capacity 1st/2nd window layer above ground floor level, |
---|
683 | !-- 72 - heat capacity 3rd window layer above ground floor level, |
---|
684 | !-- 73 - heat capacity 4th window layer above ground floor level, |
---|
685 | !-- 74 - conductivity 1st/2nd window layer above ground floor level, |
---|
686 | !-- 75 - thermal conductivity 3rd window layer above ground floor level, |
---|
687 | !-- 76 - thermal conductivity 4th window layer above ground floor level, 77 - window emissivity above ground floor level, |
---|
688 | !-- 78 - window transmissivity above ground floor level, 79 - window albedo above ground floor level, |
---|
689 | !-- 80 - green fraction above ground floor level, 81 - LAI on wall above ground floor level, |
---|
690 | !-- 82 - green emissivity above ground floor level, 83 - green albedo above ground floor level, |
---|
691 | !-- 84 - wall fraction roof, 85 - 1st wall layer thickness roof, 86 - 2nd wall layer thickness roof, |
---|
692 | !-- 87 - 3rd wall layer thickness roof, 88 - 4th wall layer thickness roof, |
---|
693 | !-- 89 - heat capacity 1st/2nd wall layer roof, 90 - heat capacity 3rd wall layer roof, |
---|
694 | !-- 91 - heat capacity 4th wall layer roof, 92 - thermal conductivity 1st/2nd wall layer roof, |
---|
695 | !-- 93 - thermal conductivity 3rd wall layer roof, 94 - thermal conductivity 4th wall layer roof, |
---|
696 | !-- 95 - wall emissivity roof, 96 - wall albedo roof, 97 - window fraction roof, |
---|
697 | !-- 98 - window 1st layer thickness roof, 99 - window 2nd layer thickness roof, 100 - window 3rd layer thickness roof, |
---|
698 | !-- 101 - window 4th layer thickness, 102 - heat capacity 1st/2nd window layer roof, |
---|
699 | !-- 103 - heat capacity 3rd window layer roof, 104 - heat capacity 4th window layer roof, |
---|
700 | !-- 105 - thermal conductivity 1st/2nd window layer roof, 106 - thermal conductivity 3rd window layer roof, |
---|
701 | !-- 107 - thermal conductivity 4th window layer roof, 108 - window emissivity roof, 109 - window transmissivity roof, |
---|
702 | !-- 110 - window albedo roof, 111 - green fraction roof ground floor level, |
---|
703 | !-- 112 - green fraction roof above ground floor level, 113 - LAI roof, 114 - green emissivity roof, |
---|
704 | !-- 115 - green albedo roof, 116 - green type roof, |
---|
705 | !-- Parameter for indoor model |
---|
706 | !-- 117 - indoor target summer temperature, 118 - indoor target winter temperature, |
---|
707 | !-- 119 - shading factor, 120 - g-value windows, 121 - u-value windows, 122 - basical airflow without occupancy of the room, |
---|
708 | !-- 123 - additional airflow depend of occupancy of the room, 124 - heat recovery efficiency, |
---|
709 | !-- 125 - dynamic parameter specific effective surface, 126 - dynamic parameter innner heatstorage, |
---|
710 | !-- 127 - ratio internal surface/floor area, 128 - maximal heating capacity, 129 - maximal cooling capacity, |
---|
711 | !-- 130 - additional internal heat gains dependent on occupancy of the room, |
---|
712 | !-- 131 - basic internal heat gains without occupancy of the room, 132 - storey height, 133 - ceiling construction height |
---|
713 | |
---|
714 | |
---|
715 | REAL(wp), DIMENSION(0:133,1:7), PARAMETER :: building_pars = RESHAPE( (/ & |
---|
716 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
717 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
718 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
719 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
720 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
721 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
722 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
723 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
724 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
725 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
726 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
727 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
728 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
729 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
730 | 2.1_wp, 0.93_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
731 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
732 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
733 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
734 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
735 | 0.005_wp, 0.01_wp, 0.31_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
736 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
737 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
738 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
739 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
740 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
741 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
742 | 0.1_wp, 0.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
743 | 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 |
---|
744 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
745 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.42_wp, 2000000.0_wp, & !parameter 6-11 |
---|
746 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
747 | 0.01_wp, 0.001_wp, 0.78_wp, & !parameter 18-20 |
---|
748 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
749 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
750 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
751 | 27.0_wp, 0.22_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
752 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
753 | 0.11_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 41-44 |
---|
754 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
755 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.73_wp, 0.005_wp, & !parameter 50-54 |
---|
756 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
757 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
758 | 0.04_wp, 0.92_wp, 27.0_wp, 0.27_wp, & !parameter 63-66 |
---|
759 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
760 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
761 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
762 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
763 | 0.005_wp, 0.01_wp, 0.5_wp, 0.79_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
764 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
765 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
766 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
767 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
768 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
769 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
770 | 0.1_wp, 0.5_wp, 0.0_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
771 | 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 |
---|
772 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
773 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
774 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
775 | 0.01_wp, 0.001_wp, 0.75_wp, & !parameter 18-20 |
---|
776 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
777 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
778 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
779 | 27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
780 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
781 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
782 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
783 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp, & !parameter 50-54 |
---|
784 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
785 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
786 | 0.035_wp, 0.92_wp, 27.0_wp, 0.3_wp, & !parameter 63-66 |
---|
787 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
788 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
789 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
790 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
791 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
792 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
793 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
794 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
795 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
796 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
797 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
798 | 0.1_wp, 0.5_wp, 0.8_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
799 | 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 |
---|
800 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
801 | 1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 6-11 |
---|
802 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp, & !parameter 12-17 |
---|
803 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
804 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 21-25 |
---|
805 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
806 | 0.8_wp, 2.1_wp, 0.93_wp, & !parameter 29-31 |
---|
807 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
808 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
809 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, & !parameter 41-44 |
---|
810 | 0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
811 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
812 | 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, & !parameter 55-58 |
---|
813 | 1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, & !parameter 59-62 |
---|
814 | 2.1_wp, 0.93_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
815 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
816 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
817 | 0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp, & !parameter 74-78 |
---|
818 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
819 | 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp, & !parameter 85-90 |
---|
820 | 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
821 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
822 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
823 | 0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
824 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
825 | 299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp, & !parameter 117-121 |
---|
826 | 0.1_wp, 1.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
827 | 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 |
---|
828 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
829 | 1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 6-11 |
---|
830 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp, & !parameter 12-17 |
---|
831 | 0.01_wp, 0.001_wp, 0.55_wp, & !parameter 18-20 |
---|
832 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 21-25 |
---|
833 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
834 | 0.38_wp, 0.04_wp, 0.92_wp, & !parameter 29-31 |
---|
835 | 27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
836 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
837 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, & !parameter 41-44 |
---|
838 | 0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
839 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp, & !parameter 50-54 |
---|
840 | 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, & !parameter 55-58 |
---|
841 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, & !parameter 59-62 |
---|
842 | 0.04_wp, 0.92_wp, 27.0_wp, 0.5_wp, & !parameter 63-66 |
---|
843 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
844 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
845 | 0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp, & !parameter 74-78 |
---|
846 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
847 | 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
848 | 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
849 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
850 | 1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp, & !parameter 103-107 |
---|
851 | 0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
852 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
853 | 299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp, & !parameter 117-121 |
---|
854 | 0.1_wp, 1.5_wp, 0.65_wp, 2.5_wp, 165000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
855 | 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 |
---|
856 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
857 | 1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 6-11 |
---|
858 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp, & !parameter 12-17 |
---|
859 | 0.01_wp, 0.001_wp, 0.475_wp, & !parameter 18-20 |
---|
860 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 21-25 |
---|
861 | 103000.0_wp, 900000.0_wp, 0.35_wp, & !parameter 26-28 |
---|
862 | 0.14_wp, 0.035_wp, 0.92_wp, & !parameter 29-31 |
---|
863 | 27.0_wp, 0.525_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
864 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
865 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, & !parameter 41-44 |
---|
866 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
867 | 5.0_wp, 0.001_wp, 0.0001_wp, 0.425_wp, 0.005_wp, & !parameter 50-54 |
---|
868 | 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, & !parameter 55-58 |
---|
869 | 103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, & !parameter 59-62 |
---|
870 | 0.035_wp, 0.92_wp, 27.0_wp, 0.575_wp, & !parameter 63-66 |
---|
871 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
872 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
873 | 0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
874 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
875 | 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp, & !parameter 85-90 |
---|
876 | 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.91_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
877 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
878 | 1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp, & !parameter 103-107 |
---|
879 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
880 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
881 | 299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp, & !parameter 117-121 |
---|
882 | 0.1_wp, 1.5_wp, 0.9_wp, 2.5_wp, 80000.0_wp, 4.5_wp, & !parameter 122-127 |
---|
883 | 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 |
---|
884 | 10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp, & !parameter 0-5 |
---|
885 | 1.0_wp, 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 6-11 |
---|
886 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 4.0_wp, & !parameter 12-17 |
---|
887 | 0.01_wp, 0.001_wp, 1.0_wp, & !parameter 18-20 |
---|
888 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 21-25 |
---|
889 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, & !parameter 26-28 |
---|
890 | 1.0_wp, 1.0_wp, 0.9_wp, & !parameter 29-31 |
---|
891 | 27.0_wp, 0.0_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 32-37 |
---|
892 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 38-40 |
---|
893 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, & !parameter 41-44 |
---|
894 | 0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, & !parameter 45-49 |
---|
895 | 5.0_wp, 0.001_wp, 0.0001_wp, 1.0_wp, 0.29_wp, & !parameter 50-54 |
---|
896 | 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, & !parameter 55-58 |
---|
897 | 1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, & !parameter 59-62 |
---|
898 | 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 63-66 |
---|
899 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, & !parameter 67-70 |
---|
900 | 1736000.0_wp, 1736000.0_wp, 1736000.0_wp, & !parameter 71-73 |
---|
901 | 0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, 0.6_wp, & !parameter 74-78 |
---|
902 | 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp, & !parameter 79-84 |
---|
903 | 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, 1848000.0_wp, & !parameter 85-90 |
---|
904 | 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp, & !parameter 91-97 |
---|
905 | 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp, & !parameter 98-102 |
---|
906 | 1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp, & !parameter 103-107 |
---|
907 | 0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp, & !parameter 108-113 |
---|
908 | 0.86_wp, 5.0_wp, 0.0_wp, & !parameter 114-116 |
---|
909 | 299.15_wp, 293.15_wp, 0.8_wp, 100.0_wp, 100.0_wp, & !parameter 117-121 |
---|
910 | 20.0_wp, 20.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 4.5_wp, & !parameter 122-127 |
---|
911 | 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) |
---|
912 | /), & |
---|
913 | (/134, 7/) ) |
---|
914 | |
---|
915 | ! |
---|
916 | !-- Type for surface temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
917 | TYPE t_surf_vertical |
---|
918 | REAL(wp), DIMENSION(:), ALLOCATABLE :: t |
---|
919 | END TYPE t_surf_vertical |
---|
920 | ! |
---|
921 | !-- Type for wall temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
922 | TYPE t_wall_vertical |
---|
923 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t |
---|
924 | END TYPE t_wall_vertical |
---|
925 | |
---|
926 | TYPE surf_type_usm |
---|
927 | REAL(wp), DIMENSION(:), ALLOCATABLE :: var_usm_1d !< 1D prognostic variable |
---|
928 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: var_usm_2d !< 2D prognostic variable |
---|
929 | END TYPE surf_type_usm |
---|
930 | |
---|
931 | #if defined( __nopointer ) |
---|
932 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
933 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
934 | |
---|
935 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
936 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
937 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
938 | #else |
---|
939 | TYPE(surf_type_usm), POINTER :: m_liq_usm_h, & !< liquid water reservoir (m), horizontal surface elements |
---|
940 | m_liq_usm_h_p !< progn. liquid water reservoir (m), horizontal surface elements |
---|
941 | |
---|
942 | TYPE(surf_type_usm), TARGET :: m_liq_usm_h_1, & !< |
---|
943 | m_liq_usm_h_2 !< |
---|
944 | |
---|
945 | TYPE(surf_type_usm), DIMENSION(:), POINTER :: & |
---|
946 | m_liq_usm_v, & !< liquid water reservoir (m), vertical surface elements |
---|
947 | m_liq_usm_v_p !< progn. liquid water reservoir (m), vertical surface elements |
---|
948 | |
---|
949 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: & |
---|
950 | m_liq_usm_v_1, & !< |
---|
951 | m_liq_usm_v_2 !< |
---|
952 | #endif |
---|
953 | |
---|
954 | TYPE(surf_type_usm), TARGET :: tm_liq_usm_h_m !< liquid water reservoir tendency (m), horizontal surface elements |
---|
955 | TYPE(surf_type_usm), DIMENSION(0:3), TARGET :: tm_liq_usm_v_m !< liquid water reservoir tendency (m), vertical surface elements |
---|
956 | |
---|
957 | |
---|
958 | !-- arrays for time averages |
---|
959 | !-- 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 |
---|
960 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinsw_av !< average of sw radiation falling to local surface including radiation from reflections |
---|
961 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlw_av !< average of lw radiation falling to local surface including radiation from reflections |
---|
962 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswdir_av !< average of direct sw radiation falling to local surface |
---|
963 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswdif_av !< average of diffuse sw radiation from sky and model boundary falling to local surface |
---|
964 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlwdif_av !< average of diffuse lw radiation from sky and model boundary falling to local surface |
---|
965 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswref_av !< average of sw radiation falling to surface from reflections |
---|
966 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlwref_av !< average of lw radiation falling to surface from reflections |
---|
967 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfoutsw_av !< average of total sw radiation outgoing from nonvirtual surfaces surfaces after all reflection |
---|
968 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfoutlw_av !< average of total lw radiation outgoing from nonvirtual surfaces surfaces after all reflection |
---|
969 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfins_av !< average of array of residua of sw radiation absorbed in surface after last reflection |
---|
970 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinl_av !< average of array of residua of lw radiation absorbed in surface after last reflection |
---|
971 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinlw_av !< Average of pcbinlw |
---|
972 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinsw_av !< Average of pcbinsw |
---|
973 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinswdir_av !< Average of pcbinswdir |
---|
974 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinswdif_av !< Average of pcbinswdif |
---|
975 | REAL(wp), DIMENSION(:), ALLOCATABLE :: pcbinswref_av !< Average of pcbinswref |
---|
976 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfhf_av !< average of total radiation flux incoming to minus outgoing from local surface |
---|
977 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_av !< average of wghf_eb |
---|
978 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wshf_eb_av !< average of wshf_eb |
---|
979 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_wall_av !< Average of t_wall |
---|
980 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_green_av !< average of wghf_eb_green |
---|
981 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_green_av !< Average of t_green |
---|
982 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_window_av !< average of wghf_eb_window |
---|
983 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_window_av !< Average of t_window |
---|
984 | REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_eb_av !< average of qsws_eb |
---|
985 | REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg_eb_av !< average of qsws_veg_eb |
---|
986 | REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq_eb_av !< average of qsws_liq_eb |
---|
987 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: swc_av !< Average of swc |
---|
988 | |
---|
989 | |
---|
990 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
991 | !-- anthropogenic heat sources |
---|
992 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
993 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: aheat !< daily average of anthropogenic heat (W/m2) |
---|
994 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: aheatprof !< diurnal profiles of anthropogenic heat for particular layers |
---|
995 | INTEGER(iwp) :: naheatlayers = 1 !< number of layers of anthropogenic heat |
---|
996 | |
---|
997 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
998 | !-- wall surface model |
---|
999 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1000 | !-- wall surface model constants |
---|
1001 | INTEGER(iwp), PARAMETER :: nzb_wall = 0 !< inner side of the wall model (to be switched) |
---|
1002 | INTEGER(iwp), PARAMETER :: nzt_wall = 3 !< outer side of the wall model (to be switched) |
---|
1003 | INTEGER(iwp), PARAMETER :: nzw = 4 !< number of wall layers (fixed for now) |
---|
1004 | |
---|
1005 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
1006 | !< normalized soil, wall and roof layer depths (m/m) |
---|
1007 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
1008 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
1009 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
1010 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
1011 | !< normalized window layer depths (m/m) |
---|
1012 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
1013 | !< normalized green layer depths (m/m) |
---|
1014 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
1015 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
1016 | |
---|
1017 | |
---|
1018 | REAL(wp) :: wall_inner_temperature = 295.0_wp !< temperature of the inner wall surface (~22 degrees C) (K) |
---|
1019 | REAL(wp) :: roof_inner_temperature = 295.0_wp !< temperature of the inner roof surface (~22 degrees C) (K) |
---|
1020 | REAL(wp) :: soil_inner_temperature = 288.0_wp !< temperature of the deep soil (~15 degrees C) (K) |
---|
1021 | REAL(wp) :: window_inner_temperature = 295.0_wp !< temperature of the inner window surface (~22 degrees C) (K) |
---|
1022 | |
---|
1023 | REAL(wp) :: m_total = 0.0_wp !< weighted total water content of the soil (m3/m3) |
---|
1024 | INTEGER(iwp) :: soil_type |
---|
1025 | |
---|
1026 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1027 | !-- surface and material model variables for walls, ground, roofs |
---|
1028 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1029 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn !< normalized wall layer depths (m) |
---|
1030 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_window !< normalized window layer depths (m) |
---|
1031 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_green !< normalized green layer depths (m) |
---|
1032 | |
---|
1033 | #if defined( __nopointer ) |
---|
1034 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h !< wall surface temperature (K) at horizontal walls |
---|
1035 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_p !< progn. wall surface temperature (K) at horizontal walls |
---|
1036 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h !< window surface temperature (K) at horizontal walls |
---|
1037 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_p !< progn. window surface temperature (K) at horizontal walls |
---|
1038 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h !< green surface temperature (K) at horizontal walls |
---|
1039 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_p !< progn. green surface temperature (K) at horizontal walls |
---|
1040 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h !< near surface temperature (10cm) (K) at horizontal walls |
---|
1041 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_p !< progn. near surface temperature (10cm) (K) at horizontal walls |
---|
1042 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v |
---|
1043 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_p |
---|
1044 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v |
---|
1045 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_p |
---|
1046 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v |
---|
1047 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_p |
---|
1048 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v |
---|
1049 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_p |
---|
1050 | #else |
---|
1051 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h |
---|
1052 | REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h_p |
---|
1053 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h |
---|
1054 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h_p |
---|
1055 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h |
---|
1056 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h_p |
---|
1057 | REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h |
---|
1058 | REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h_p |
---|
1059 | |
---|
1060 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_1 |
---|
1061 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_2 |
---|
1062 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_1 |
---|
1063 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_2 |
---|
1064 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_1 |
---|
1065 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_2 |
---|
1066 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_1 |
---|
1067 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_2 |
---|
1068 | |
---|
1069 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v |
---|
1070 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v_p |
---|
1071 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v |
---|
1072 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v_p |
---|
1073 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v |
---|
1074 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v_p |
---|
1075 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v |
---|
1076 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v_p |
---|
1077 | |
---|
1078 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_1 |
---|
1079 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_2 |
---|
1080 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_1 |
---|
1081 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_2 |
---|
1082 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_1 |
---|
1083 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_2 |
---|
1084 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_1 |
---|
1085 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_2 |
---|
1086 | |
---|
1087 | #endif |
---|
1088 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_av !< average of wall surface temperature (K) |
---|
1089 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_av !< average of window surface temperature (K) |
---|
1090 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_av !< average of green wall surface temperature (K) |
---|
1091 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_av !< average of whole wall surface temperature (K) |
---|
1092 | |
---|
1093 | !-- Temporal tendencies for time stepping |
---|
1094 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_wall_m !< surface temperature tendency of wall (K) |
---|
1095 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_window_m !< surface temperature tendency of window (K) |
---|
1096 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_green_m !< surface temperature tendency of green wall (K) |
---|
1097 | |
---|
1098 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1099 | !-- Energy balance variables |
---|
1100 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1101 | !-- parameters of the land, roof and wall surfaces |
---|
1102 | |
---|
1103 | #if defined( __nopointer ) |
---|
1104 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h !< Wall temperature (K) |
---|
1105 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_av !< Average of t_wall |
---|
1106 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_p !< Prog. wall temperature (K) |
---|
1107 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h !< Window temperature (K) |
---|
1108 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_av !< Average of t_window |
---|
1109 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_p !< Prog. window temperature (K) |
---|
1110 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h !< Green temperature (K) |
---|
1111 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_av !< Average of t_green |
---|
1112 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_p !< Prog. green temperature (K) |
---|
1113 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h !< soil water content green building layer |
---|
1114 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_av !< avg of soil water content green building layer |
---|
1115 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_p !< Prog. soil water content green building layer |
---|
1116 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_sat_h !< soil water content green building layer at saturation |
---|
1117 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_res_h !< soil water content green building layer residual |
---|
1118 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: rootfr_h !< root fraction green green building layer |
---|
1119 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: wilt_h !< wilting point green building layer |
---|
1120 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: fc_h !< field capacity green building layer |
---|
1121 | |
---|
1122 | |
---|
1123 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v !< Wall temperature (K) |
---|
1124 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_av !< Average of t_wall |
---|
1125 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_p !< Prog. wall temperature (K) |
---|
1126 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v !< Window temperature (K) |
---|
1127 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_av !< Average of t_window |
---|
1128 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_p !< Prog. window temperature (K) |
---|
1129 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v !< Green temperature (K) |
---|
1130 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_av !< Average of t_green |
---|
1131 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_p !< Prog. green temperature (K) |
---|
1132 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v !< Wall swc |
---|
1133 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_av !< Average of swc |
---|
1134 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_p !< Prog. swc |
---|
1135 | |
---|
1136 | #else |
---|
1137 | REAL(wp), DIMENSION(:,:), POINTER :: t_wall_h, t_wall_h_p |
---|
1138 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_av, t_wall_h_1, t_wall_h_2 |
---|
1139 | REAL(wp), DIMENSION(:,:), POINTER :: t_window_h, t_window_h_p |
---|
1140 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_av, t_window_h_1, t_window_h_2 |
---|
1141 | REAL(wp), DIMENSION(:,:), POINTER :: t_green_h, t_green_h_p |
---|
1142 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_av, t_green_h_1, t_green_h_2 |
---|
1143 | REAL(wp), DIMENSION(:,:), POINTER :: swc_h, rootfr_h, wilt_h, fc_h, swc_sat_h, swc_h_p, swc_res_h |
---|
1144 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: swc_h_1, rootfr_h_1, & |
---|
1145 | wilt_h_1, fc_h_1, swc_sat_h_1, swc_h_2, swc_res_h_1 |
---|
1146 | |
---|
1147 | |
---|
1148 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_wall_v, t_wall_v_p |
---|
1149 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_av, t_wall_v_1, t_wall_v_2 |
---|
1150 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_window_v, t_window_v_p |
---|
1151 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_av, t_window_v_1, t_window_v_2 |
---|
1152 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_green_v, t_green_v_p |
---|
1153 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_av, t_green_v_1, t_green_v_2 |
---|
1154 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: swc_v, swc_v_p |
---|
1155 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: swc_v_av, swc_v_1, swc_v_2 |
---|
1156 | #endif |
---|
1157 | |
---|
1158 | !-- Wall temporal tendencies for time stepping |
---|
1159 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_wall_m !< t_wall prognostic array |
---|
1160 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_window_m !< t_window prognostic array |
---|
1161 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_green_m !< t_green prognostic array |
---|
1162 | |
---|
1163 | !-- Surface and material parameters classes (surface_type) |
---|
1164 | !-- albedo, emissivity, lambda_surf, roughness, thickness, volumetric heat capacity, thermal conductivity |
---|
1165 | INTEGER(iwp) :: n_surface_types !< number of the wall type categories |
---|
1166 | INTEGER(iwp), PARAMETER :: n_surface_params = 9 !< number of parameters for each type of the wall |
---|
1167 | INTEGER(iwp), PARAMETER :: ialbedo = 1 !< albedo of the surface |
---|
1168 | INTEGER(iwp), PARAMETER :: iemiss = 2 !< emissivity of the surface |
---|
1169 | INTEGER(iwp), PARAMETER :: ilambdas = 3 !< heat conductivity lambda S between surface and material ( W m-2 K-1 ) |
---|
1170 | INTEGER(iwp), PARAMETER :: irough = 4 !< roughness length z0 for movements |
---|
1171 | INTEGER(iwp), PARAMETER :: iroughh = 5 !< roughness length z0h for scalars (heat, humidity,...) |
---|
1172 | INTEGER(iwp), PARAMETER :: icsurf = 6 !< Surface skin layer heat capacity (J m-2 K-1 ) |
---|
1173 | INTEGER(iwp), PARAMETER :: ithick = 7 !< thickness of the surface (wall, roof, land) ( m ) |
---|
1174 | INTEGER(iwp), PARAMETER :: irhoC = 8 !< volumetric heat capacity rho*C of the material ( J m-3 K-1 ) |
---|
1175 | INTEGER(iwp), PARAMETER :: ilambdah = 9 !< thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
1176 | CHARACTER(12), DIMENSION(:), ALLOCATABLE :: surface_type_names !< names of wall types (used only for reports) |
---|
1177 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: surface_type_codes !< codes of wall types |
---|
1178 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: surface_params !< parameters of wall types |
---|
1179 | |
---|
1180 | |
---|
1181 | !-- interfaces of subroutines accessed from outside of this module |
---|
1182 | INTERFACE usm_boundary_condition |
---|
1183 | MODULE PROCEDURE usm_boundary_condition |
---|
1184 | END INTERFACE usm_boundary_condition |
---|
1185 | |
---|
1186 | INTERFACE usm_check_data_output |
---|
1187 | MODULE PROCEDURE usm_check_data_output |
---|
1188 | END INTERFACE usm_check_data_output |
---|
1189 | |
---|
1190 | INTERFACE usm_check_parameters |
---|
1191 | MODULE PROCEDURE usm_check_parameters |
---|
1192 | END INTERFACE usm_check_parameters |
---|
1193 | |
---|
1194 | INTERFACE usm_data_output_3d |
---|
1195 | MODULE PROCEDURE usm_data_output_3d |
---|
1196 | END INTERFACE usm_data_output_3d |
---|
1197 | |
---|
1198 | INTERFACE usm_define_netcdf_grid |
---|
1199 | MODULE PROCEDURE usm_define_netcdf_grid |
---|
1200 | END INTERFACE usm_define_netcdf_grid |
---|
1201 | |
---|
1202 | INTERFACE usm_init_urban_surface |
---|
1203 | MODULE PROCEDURE usm_init_urban_surface |
---|
1204 | END INTERFACE usm_init_urban_surface |
---|
1205 | |
---|
1206 | INTERFACE usm_material_heat_model |
---|
1207 | MODULE PROCEDURE usm_material_heat_model |
---|
1208 | END INTERFACE usm_material_heat_model |
---|
1209 | |
---|
1210 | INTERFACE usm_green_heat_model |
---|
1211 | MODULE PROCEDURE usm_green_heat_model |
---|
1212 | END INTERFACE usm_green_heat_model |
---|
1213 | |
---|
1214 | INTERFACE usm_parin |
---|
1215 | MODULE PROCEDURE usm_parin |
---|
1216 | END INTERFACE usm_parin |
---|
1217 | |
---|
1218 | INTERFACE usm_temperature_near_surface |
---|
1219 | MODULE PROCEDURE usm_temperature_near_surface |
---|
1220 | END INTERFACE usm_temperature_near_surface |
---|
1221 | |
---|
1222 | INTERFACE usm_rrd_local |
---|
1223 | MODULE PROCEDURE usm_rrd_local |
---|
1224 | END INTERFACE usm_rrd_local |
---|
1225 | |
---|
1226 | INTERFACE usm_surface_energy_balance |
---|
1227 | MODULE PROCEDURE usm_surface_energy_balance |
---|
1228 | END INTERFACE usm_surface_energy_balance |
---|
1229 | |
---|
1230 | INTERFACE usm_swap_timelevel |
---|
1231 | MODULE PROCEDURE usm_swap_timelevel |
---|
1232 | END INTERFACE usm_swap_timelevel |
---|
1233 | |
---|
1234 | INTERFACE usm_wrd_local |
---|
1235 | MODULE PROCEDURE usm_wrd_local |
---|
1236 | END INTERFACE usm_wrd_local |
---|
1237 | |
---|
1238 | INTERFACE usm_allocate_surface |
---|
1239 | MODULE PROCEDURE usm_allocate_surface |
---|
1240 | END INTERFACE usm_allocate_surface |
---|
1241 | |
---|
1242 | INTERFACE usm_average_3d_data |
---|
1243 | MODULE PROCEDURE usm_average_3d_data |
---|
1244 | END INTERFACE usm_average_3d_data |
---|
1245 | |
---|
1246 | |
---|
1247 | SAVE |
---|
1248 | |
---|
1249 | PRIVATE |
---|
1250 | |
---|
1251 | !-- Public functions |
---|
1252 | PUBLIC usm_boundary_condition, usm_check_parameters, usm_init_urban_surface,& |
---|
1253 | usm_rrd_local, & |
---|
1254 | usm_surface_energy_balance, usm_material_heat_model, & |
---|
1255 | usm_swap_timelevel, usm_check_data_output, usm_average_3d_data, & |
---|
1256 | usm_data_output_3d, usm_define_netcdf_grid, usm_parin, & |
---|
1257 | usm_wrd_local, usm_allocate_surface |
---|
1258 | |
---|
1259 | !-- Public parameters, constants and initial values |
---|
1260 | PUBLIC usm_anthropogenic_heat, usm_material_model, usm_wall_mod, & |
---|
1261 | usm_green_heat_model, usm_temperature_near_surface, building_pars, & |
---|
1262 | nzt_wall, t_surf_10cm_h, t_surf_10cm_v, t_wall_h, t_wall_v, & |
---|
1263 | t_window_h, t_window_v, building_type |
---|
1264 | |
---|
1265 | |
---|
1266 | |
---|
1267 | CONTAINS |
---|
1268 | |
---|
1269 | !------------------------------------------------------------------------------! |
---|
1270 | ! Description: |
---|
1271 | ! ------------ |
---|
1272 | !> This subroutine creates the necessary indices of the urban surfaces |
---|
1273 | !> and plant canopy and it allocates the needed arrays for USM |
---|
1274 | !------------------------------------------------------------------------------! |
---|
1275 | SUBROUTINE usm_allocate_surface |
---|
1276 | |
---|
1277 | IMPLICIT NONE |
---|
1278 | |
---|
1279 | INTEGER(iwp) :: l |
---|
1280 | |
---|
1281 | ! |
---|
1282 | !-- Allocate radiation arrays which are part of the new data type. |
---|
1283 | !-- For horizontal surfaces. |
---|
1284 | ALLOCATE( surf_usm_h%surfhf(1:surf_usm_h%ns) ) |
---|
1285 | ALLOCATE( surf_usm_h%rad_net_l(1:surf_usm_h%ns) ) |
---|
1286 | ! |
---|
1287 | !-- For vertical surfaces |
---|
1288 | DO l = 0, 3 |
---|
1289 | ALLOCATE( surf_usm_v(l)%surfhf(1:surf_usm_v(l)%ns) ) |
---|
1290 | ALLOCATE( surf_usm_v(l)%rad_net_l(1:surf_usm_v(l)%ns) ) |
---|
1291 | ENDDO |
---|
1292 | |
---|
1293 | !-- Wall surface model |
---|
1294 | !-- allocate arrays for wall surface model and define pointers |
---|
1295 | |
---|
1296 | !-- allocate array of wall types and wall parameters |
---|
1297 | ALLOCATE ( surf_usm_h%surface_types(1:surf_usm_h%ns) ) |
---|
1298 | ALLOCATE ( surf_usm_h%building_type(1:surf_usm_h%ns) ) |
---|
1299 | ALLOCATE ( surf_usm_h%building_type_name(1:surf_usm_h%ns) ) |
---|
1300 | surf_usm_h%building_type = 0 |
---|
1301 | surf_usm_h%building_type_name = 'none' |
---|
1302 | DO l = 0, 3 |
---|
1303 | ALLOCATE( surf_usm_v(l)%surface_types(1:surf_usm_v(l)%ns) ) |
---|
1304 | ALLOCATE ( surf_usm_v(l)%building_type(1:surf_usm_v(l)%ns) ) |
---|
1305 | ALLOCATE ( surf_usm_v(l)%building_type_name(1:surf_usm_v(l)%ns) ) |
---|
1306 | surf_usm_v(l)%building_type = 0 |
---|
1307 | surf_usm_v(l)%building_type_name = 'none' |
---|
1308 | ENDDO |
---|
1309 | ! |
---|
1310 | !-- Allocate albedo_type and albedo. Each surface element |
---|
1311 | !-- has 3 values, 0: wall fraction, 1: green fraction, 2: window fraction. |
---|
1312 | ALLOCATE( surf_usm_h%albedo_type(0:2,1:surf_usm_h%ns) ) |
---|
1313 | ALLOCATE( surf_usm_h%albedo(0:2,1:surf_usm_h%ns) ) |
---|
1314 | surf_usm_h%albedo_type = albedo_type |
---|
1315 | DO l = 0, 3 |
---|
1316 | ALLOCATE( surf_usm_v(l)%albedo_type(0:2,1:surf_usm_v(l)%ns) ) |
---|
1317 | ALLOCATE( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns) ) |
---|
1318 | surf_usm_v(l)%albedo_type = albedo_type |
---|
1319 | ENDDO |
---|
1320 | |
---|
1321 | |
---|
1322 | ! |
---|
1323 | !-- Allocate indoor target temperature for summer and winter |
---|
1324 | ALLOCATE( surf_usm_h%target_temp_summer(1:surf_usm_h%ns) ) |
---|
1325 | ALLOCATE( surf_usm_h%target_temp_winter(1:surf_usm_h%ns) ) |
---|
1326 | DO l = 0, 3 |
---|
1327 | ALLOCATE( surf_usm_v(l)%target_temp_summer(1:surf_usm_v(l)%ns) ) |
---|
1328 | ALLOCATE( surf_usm_v(l)%target_temp_winter(1:surf_usm_v(l)%ns) ) |
---|
1329 | ENDDO |
---|
1330 | ! |
---|
1331 | !-- Allocate flag indicating ground floor level surface elements |
---|
1332 | ALLOCATE ( surf_usm_h%ground_level(1:surf_usm_h%ns) ) |
---|
1333 | DO l = 0, 3 |
---|
1334 | ALLOCATE( surf_usm_v(l)%ground_level(1:surf_usm_v(l)%ns) ) |
---|
1335 | ENDDO |
---|
1336 | ! |
---|
1337 | !-- Allocate arrays for relative surface fraction. |
---|
1338 | !-- 0 - wall fraction, 1 - green fraction, 2 - window fraction |
---|
1339 | ALLOCATE( surf_usm_h%frac(0:2,1:surf_usm_h%ns) ) |
---|
1340 | surf_usm_h%frac = 0.0_wp |
---|
1341 | DO l = 0, 3 |
---|
1342 | ALLOCATE( surf_usm_v(l)%frac(0:2,1:surf_usm_v(l)%ns) ) |
---|
1343 | surf_usm_v(l)%frac = 0.0_wp |
---|
1344 | ENDDO |
---|
1345 | |
---|
1346 | !-- wall and roof surface parameters. First for horizontal surfaces |
---|
1347 | ALLOCATE ( surf_usm_h%isroof_surf(1:surf_usm_h%ns) ) |
---|
1348 | ALLOCATE ( surf_usm_h%lambda_surf(1:surf_usm_h%ns) ) |
---|
1349 | ALLOCATE ( surf_usm_h%lambda_surf_window(1:surf_usm_h%ns) ) |
---|
1350 | ALLOCATE ( surf_usm_h%lambda_surf_green(1:surf_usm_h%ns) ) |
---|
1351 | ALLOCATE ( surf_usm_h%c_surface(1:surf_usm_h%ns) ) |
---|
1352 | ALLOCATE ( surf_usm_h%c_surface_window(1:surf_usm_h%ns) ) |
---|
1353 | ALLOCATE ( surf_usm_h%c_surface_green(1:surf_usm_h%ns) ) |
---|
1354 | ALLOCATE ( surf_usm_h%transmissivity(1:surf_usm_h%ns) ) |
---|
1355 | ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns) ) |
---|
1356 | ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns) ) |
---|
1357 | ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns) ) |
---|
1358 | ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns) ) |
---|
1359 | ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns) ) |
---|
1360 | ALLOCATE ( surf_usm_h%green_type_roof(1:surf_usm_h%ns) ) |
---|
1361 | ALLOCATE ( surf_usm_h%r_s(1:surf_usm_h%ns) ) |
---|
1362 | ! |
---|
1363 | !-- For vertical surfaces. |
---|
1364 | DO l = 0, 3 |
---|
1365 | ALLOCATE ( surf_usm_v(l)%lambda_surf(1:surf_usm_v(l)%ns) ) |
---|
1366 | ALLOCATE ( surf_usm_v(l)%c_surface(1:surf_usm_v(l)%ns) ) |
---|
1367 | ALLOCATE ( surf_usm_v(l)%lambda_surf_window(1:surf_usm_v(l)%ns) ) |
---|
1368 | ALLOCATE ( surf_usm_v(l)%c_surface_window(1:surf_usm_v(l)%ns) ) |
---|
1369 | ALLOCATE ( surf_usm_v(l)%lambda_surf_green(1:surf_usm_v(l)%ns) ) |
---|
1370 | ALLOCATE ( surf_usm_v(l)%c_surface_green(1:surf_usm_v(l)%ns) ) |
---|
1371 | ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns) ) |
---|
1372 | ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns) ) |
---|
1373 | ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns) ) |
---|
1374 | ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) |
---|
1375 | ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) |
---|
1376 | ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) |
---|
1377 | |
---|
1378 | ALLOCATE ( surf_usm_v(l)%r_s(1:surf_usm_v(l)%ns) ) |
---|
1379 | ENDDO |
---|
1380 | |
---|
1381 | ! |
---|
1382 | !-- allocate wall and roof material parameters. First for horizontal surfaces |
---|
1383 | ALLOCATE ( surf_usm_h%thickness_wall(1:surf_usm_h%ns) ) |
---|
1384 | ALLOCATE ( surf_usm_h%thickness_window(1:surf_usm_h%ns) ) |
---|
1385 | ALLOCATE ( surf_usm_h%thickness_green(1:surf_usm_h%ns) ) |
---|
1386 | ALLOCATE ( surf_usm_h%lambda_h(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1387 | ALLOCATE ( surf_usm_h%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1388 | ALLOCATE ( surf_usm_h%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1389 | ALLOCATE ( surf_usm_h%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1390 | ALLOCATE ( surf_usm_h%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1391 | ALLOCATE ( surf_usm_h%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1392 | |
---|
1393 | ALLOCATE ( surf_usm_h%rho_c_total_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1394 | ALLOCATE ( surf_usm_h%n_vg_green(1:surf_usm_h%ns) ) |
---|
1395 | ALLOCATE ( surf_usm_h%alpha_vg_green(1:surf_usm_h%ns) ) |
---|
1396 | ALLOCATE ( surf_usm_h%l_vg_green(1:surf_usm_h%ns) ) |
---|
1397 | ALLOCATE ( surf_usm_h%gamma_w_green_sat(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1398 | ALLOCATE ( surf_usm_h%lambda_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1399 | ALLOCATE ( surf_usm_h%gamma_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1400 | ALLOCATE ( surf_usm_h%tswc_h_m(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1401 | |
---|
1402 | ! |
---|
1403 | !-- For vertical surfaces. |
---|
1404 | DO l = 0, 3 |
---|
1405 | ALLOCATE ( surf_usm_v(l)%thickness_wall(1:surf_usm_v(l)%ns) ) |
---|
1406 | ALLOCATE ( surf_usm_v(l)%thickness_window(1:surf_usm_v(l)%ns) ) |
---|
1407 | ALLOCATE ( surf_usm_v(l)%thickness_green(1:surf_usm_v(l)%ns) ) |
---|
1408 | ALLOCATE ( surf_usm_v(l)%lambda_h(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1409 | ALLOCATE ( surf_usm_v(l)%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1410 | ALLOCATE ( surf_usm_v(l)%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1411 | ALLOCATE ( surf_usm_v(l)%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1412 | ALLOCATE ( surf_usm_v(l)%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1413 | ALLOCATE ( surf_usm_v(l)%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1414 | ENDDO |
---|
1415 | |
---|
1416 | ! |
---|
1417 | !-- allocate green wall and roof vegetation and soil parameters. First horizontal surfaces |
---|
1418 | ALLOCATE ( surf_usm_h%g_d(1:surf_usm_h%ns) ) |
---|
1419 | ALLOCATE ( surf_usm_h%c_liq(1:surf_usm_h%ns) ) |
---|
1420 | ALLOCATE ( surf_usm_h%qsws_liq_eb(1:surf_usm_h%ns) ) |
---|
1421 | ALLOCATE ( surf_usm_h%qsws_veg_eb(1:surf_usm_h%ns) ) |
---|
1422 | ALLOCATE ( surf_usm_h%r_canopy(1:surf_usm_h%ns) ) |
---|
1423 | ALLOCATE ( surf_usm_h%r_canopy_min(1:surf_usm_h%ns) ) |
---|
1424 | ALLOCATE ( surf_usm_h%qsws_eb(1:surf_usm_h%ns) ) |
---|
1425 | |
---|
1426 | ! |
---|
1427 | !-- For vertical surfaces. |
---|
1428 | DO l = 0, 3 |
---|
1429 | ALLOCATE ( surf_usm_v(l)%g_d(1:surf_usm_v(l)%ns) ) |
---|
1430 | ALLOCATE ( surf_usm_v(l)%c_liq(1:surf_usm_v(l)%ns) ) |
---|
1431 | ALLOCATE ( surf_usm_v(l)%qsws_liq_eb(1:surf_usm_v(l)%ns) ) |
---|
1432 | ALLOCATE ( surf_usm_v(l)%qsws_veg_eb(1:surf_usm_v(l)%ns) ) |
---|
1433 | ALLOCATE ( surf_usm_v(l)%qsws_eb(1:surf_usm_v(l)%ns) ) |
---|
1434 | ALLOCATE ( surf_usm_v(l)%r_canopy(1:surf_usm_v(l)%ns) ) |
---|
1435 | ALLOCATE ( surf_usm_v(l)%r_canopy_min(1:surf_usm_v(l)%ns) ) |
---|
1436 | ENDDO |
---|
1437 | |
---|
1438 | !-- allocate wall and roof layers sizes. For horizontal surfaces. |
---|
1439 | ALLOCATE ( zwn(nzb_wall:nzt_wall) ) |
---|
1440 | ALLOCATE ( surf_usm_h%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1441 | ALLOCATE ( zwn_window(nzb_wall:nzt_wall) ) |
---|
1442 | ALLOCATE ( surf_usm_h%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1443 | ALLOCATE ( zwn_green(nzb_wall:nzt_wall) ) |
---|
1444 | ALLOCATE ( surf_usm_h%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1445 | ALLOCATE ( surf_usm_h%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1446 | ALLOCATE ( surf_usm_h%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1447 | ALLOCATE ( surf_usm_h%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1448 | ALLOCATE ( surf_usm_h%zw(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1449 | ALLOCATE ( surf_usm_h%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1450 | ALLOCATE ( surf_usm_h%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1451 | ALLOCATE ( surf_usm_h%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1452 | ALLOCATE ( surf_usm_h%zw_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1453 | ALLOCATE ( surf_usm_h%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1454 | ALLOCATE ( surf_usm_h%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1455 | ALLOCATE ( surf_usm_h%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1456 | ALLOCATE ( surf_usm_h%zw_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1457 | ! |
---|
1458 | !-- For vertical surfaces. |
---|
1459 | DO l = 0, 3 |
---|
1460 | ALLOCATE ( surf_usm_v(l)%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1461 | ALLOCATE ( surf_usm_v(l)%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1462 | ALLOCATE ( surf_usm_v(l)%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1463 | ALLOCATE ( surf_usm_v(l)%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1464 | ALLOCATE ( surf_usm_v(l)%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1465 | ALLOCATE ( surf_usm_v(l)%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1466 | ALLOCATE ( surf_usm_v(l)%zw(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1467 | ALLOCATE ( surf_usm_v(l)%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1468 | ALLOCATE ( surf_usm_v(l)%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1469 | ALLOCATE ( surf_usm_v(l)%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1470 | ALLOCATE ( surf_usm_v(l)%zw_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1471 | ALLOCATE ( surf_usm_v(l)%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1472 | ALLOCATE ( surf_usm_v(l)%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1473 | ALLOCATE ( surf_usm_v(l)%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1474 | ALLOCATE ( surf_usm_v(l)%zw_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1475 | ENDDO |
---|
1476 | |
---|
1477 | !-- allocate wall and roof temperature arrays, for horizontal walls |
---|
1478 | #if defined( __nopointer ) |
---|
1479 | IF ( .NOT. ALLOCATED( t_surf_wall_h ) ) & |
---|
1480 | ALLOCATE ( t_surf_wall_h(1:surf_usm_h%ns) ) |
---|
1481 | IF ( .NOT. ALLOCATED( t_surf_wall_h_p ) ) & |
---|
1482 | ALLOCATE ( t_surf_wall_h_p(1:surf_usm_h%ns) ) |
---|
1483 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
1484 | ALLOCATE ( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1485 | IF ( .NOT. ALLOCATED( t_wall_h_p ) ) & |
---|
1486 | ALLOCATE ( t_wall_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1487 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
1488 | ALLOCATE ( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
1489 | IF ( .NOT. ALLOCATED( t_surf_window_h_p ) ) & |
---|
1490 | ALLOCATE ( t_surf_window_h_p(1:surf_usm_h%ns) ) |
---|
1491 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
1492 | ALLOCATE ( t_window_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1493 | IF ( .NOT. ALLOCATED( t_window_h_p ) ) & |
---|
1494 | ALLOCATE ( t_window_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1495 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
1496 | ALLOCATE ( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
1497 | IF ( .NOT. ALLOCATED( t_surf_green_h_p ) ) & |
---|
1498 | ALLOCATE ( t_surf_green_h_p(1:surf_usm_h%ns) ) |
---|
1499 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
1500 | ALLOCATE ( t_green_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1501 | IF ( .NOT. ALLOCATED( t_green_h_p ) ) & |
---|
1502 | ALLOCATE ( t_green_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1503 | IF ( .NOT. ALLOCATED( t_surf_10cm_h ) ) & |
---|
1504 | ALLOCATE ( t_surf_10cm_h(1:surf_usm_h%ns) ) |
---|
1505 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_p ) ) & |
---|
1506 | ALLOCATE ( t_surf_10cm_h_p(1:surf_usm_h%ns) ) |
---|
1507 | IF ( .NOT. ALLOCATED( swc_h ) ) & |
---|
1508 | ALLOCATE ( swc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1509 | IF ( .NOT. ALLOCATED( swc_sat_h ) ) & |
---|
1510 | ALLOCATE ( swc_sat_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1511 | IF ( .NOT. ALLOCATED( swc_res_h ) ) & |
---|
1512 | ALLOCATE ( swc_res_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1513 | IF ( .NOT. ALLOCATED( rootfr_h ) ) & |
---|
1514 | ALLOCATE ( rootfr_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1515 | IF ( .NOT. ALLOCATED( wilt_h ) ) & |
---|
1516 | ALLOCATE ( wilt_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1517 | IF ( .NOT. ALLOCATED( fc_h ) ) & |
---|
1518 | ALLOCATE ( fc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1519 | |
---|
1520 | IF ( .NOT. ALLOCATED( m_liq_usm_h%var_usm_1d ) ) & |
---|
1521 | ALLOCATE ( m_liq_usm_h%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1522 | |
---|
1523 | !-- Horizontal surfaces |
---|
1524 | ALLOCATE ( m_liq_usm_h_p%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1525 | ! |
---|
1526 | !-- Vertical surfaces |
---|
1527 | DO l = 0, 3 |
---|
1528 | ALLOCATE ( m_liq_usm_v_p(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1529 | ENDDO |
---|
1530 | |
---|
1531 | #else |
---|
1532 | ! |
---|
1533 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1534 | !-- might be already allocated. |
---|
1535 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
1536 | ALLOCATE ( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
1537 | IF ( .NOT. ALLOCATED( t_surf_wall_h_2 ) ) & |
---|
1538 | ALLOCATE ( t_surf_wall_h_2(1:surf_usm_h%ns) ) |
---|
1539 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
1540 | ALLOCATE ( t_wall_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1541 | IF ( .NOT. ALLOCATED( t_wall_h_2 ) ) & |
---|
1542 | ALLOCATE ( t_wall_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1543 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
1544 | ALLOCATE ( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
1545 | IF ( .NOT. ALLOCATED( t_surf_window_h_2 ) ) & |
---|
1546 | ALLOCATE ( t_surf_window_h_2(1:surf_usm_h%ns) ) |
---|
1547 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
1548 | ALLOCATE ( t_window_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1549 | IF ( .NOT. ALLOCATED( t_window_h_2 ) ) & |
---|
1550 | ALLOCATE ( t_window_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1551 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
1552 | ALLOCATE ( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
1553 | IF ( .NOT. ALLOCATED( t_surf_green_h_2 ) ) & |
---|
1554 | ALLOCATE ( t_surf_green_h_2(1:surf_usm_h%ns) ) |
---|
1555 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
1556 | ALLOCATE ( t_green_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1557 | IF ( .NOT. ALLOCATED( t_green_h_2 ) ) & |
---|
1558 | ALLOCATE ( t_green_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1559 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_1 ) ) & |
---|
1560 | ALLOCATE ( t_surf_10cm_h_1(1:surf_usm_h%ns) ) |
---|
1561 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_2 ) ) & |
---|
1562 | ALLOCATE ( t_surf_10cm_h_2(1:surf_usm_h%ns) ) |
---|
1563 | IF ( .NOT. ALLOCATED( swc_h_1 ) ) & |
---|
1564 | ALLOCATE ( swc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1565 | IF ( .NOT. ALLOCATED( swc_sat_h_1 ) ) & |
---|
1566 | ALLOCATE ( swc_sat_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1567 | IF ( .NOT. ALLOCATED( swc_res_h_1 ) ) & |
---|
1568 | ALLOCATE ( swc_res_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1569 | IF ( .NOT. ALLOCATED( swc_h_2 ) ) & |
---|
1570 | ALLOCATE ( swc_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1571 | IF ( .NOT. ALLOCATED( rootfr_h_1 ) ) & |
---|
1572 | ALLOCATE ( rootfr_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1573 | IF ( .NOT. ALLOCATED( wilt_h_1 ) ) & |
---|
1574 | ALLOCATE ( wilt_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1575 | IF ( .NOT. ALLOCATED( fc_h_1 ) ) & |
---|
1576 | ALLOCATE ( fc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1577 | |
---|
1578 | IF ( .NOT. ALLOCATED( m_liq_usm_h_1%var_usm_1d ) ) & |
---|
1579 | ALLOCATE ( m_liq_usm_h_1%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1580 | IF ( .NOT. ALLOCATED( m_liq_usm_h_2%var_usm_1d ) ) & |
---|
1581 | ALLOCATE ( m_liq_usm_h_2%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1582 | |
---|
1583 | ! |
---|
1584 | !-- initial assignment of the pointers |
---|
1585 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
1586 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
1587 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
1588 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
1589 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
1590 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
1591 | t_surf_10cm_h => t_surf_10cm_h_1; t_surf_10cm_h_p => t_surf_10cm_h_2 |
---|
1592 | m_liq_usm_h => m_liq_usm_h_1; m_liq_usm_h_p => m_liq_usm_h_2 |
---|
1593 | swc_h => swc_h_1; swc_h_p => swc_h_2 |
---|
1594 | swc_sat_h => swc_sat_h_1 |
---|
1595 | swc_res_h => swc_res_h_1 |
---|
1596 | rootfr_h => rootfr_h_1 |
---|
1597 | wilt_h => wilt_h_1 |
---|
1598 | fc_h => fc_h_1 |
---|
1599 | |
---|
1600 | #endif |
---|
1601 | |
---|
1602 | !-- allocate wall and roof temperature arrays, for vertical walls if required |
---|
1603 | #if defined( __nopointer ) |
---|
1604 | DO l = 0, 3 |
---|
1605 | IF ( .NOT. ALLOCATED( t_surf_wall_v(l)%t ) ) & |
---|
1606 | ALLOCATE ( t_surf_wall_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1607 | IF ( .NOT. ALLOCATED( t_surf_wall_v_p(l)%t ) ) & |
---|
1608 | ALLOCATE ( t_surf_wall_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1609 | IF ( .NOT. ALLOCATED( t_wall_v(l)%t ) ) & |
---|
1610 | ALLOCATE ( t_wall_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1611 | IF ( .NOT. ALLOCATED( t_wall_v_p(l)%t ) ) & |
---|
1612 | ALLOCATE ( t_wall_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1613 | IF ( .NOT. ALLOCATED( t_surf_window_v(l)%t ) ) & |
---|
1614 | ALLOCATE ( t_surf_window_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1615 | IF ( .NOT. ALLOCATED( t_surf_window_v_p(l)%t ) ) & |
---|
1616 | ALLOCATE ( t_surf_window_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1617 | IF ( .NOT. ALLOCATED( t_window_v(l)%t ) ) & |
---|
1618 | ALLOCATE ( t_window_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1619 | IF ( .NOT. ALLOCATED( t_window_v_p(l)%t ) ) & |
---|
1620 | ALLOCATE ( t_window_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1621 | IF ( .NOT. ALLOCATED( t_green_v(l)%t ) ) & |
---|
1622 | ALLOCATE ( t_green_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1623 | IF ( .NOT. ALLOCATED( t_green_v_p(l)%t ) ) & |
---|
1624 | ALLOCATE ( t_green_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1625 | IF ( .NOT. ALLOCATED( t_surf_green_v(l)%t ) ) & |
---|
1626 | ALLOCATE ( t_surf_green_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1627 | IF ( .NOT. ALLOCATED( t_surf_green_v_p(l)%t ) ) & |
---|
1628 | ALLOCATE ( t_surf_green_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1629 | IF ( .NOT. ALLOCATED( t_surf_10cm_v(l)%t ) ) & |
---|
1630 | ALLOCATE ( t_surf_10cm_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1631 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_p(l)%t ) ) & |
---|
1632 | ALLOCATE ( t_surf_10cm_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1633 | IF ( .NOT. ALLOCATED( m_liq_usm_v(l)%var_usm_1d ) ) & |
---|
1634 | ALLOCATE ( m_liq_usm_v(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1635 | IF ( .NOT. ALLOCATED( swc_v(l)%t ) ) & |
---|
1636 | ALLOCATE ( swc_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1637 | IF ( .NOT. ALLOCATED( swc_v_p(l)%t ) ) & |
---|
1638 | ALLOCATE ( swc_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1639 | ENDDO |
---|
1640 | #else |
---|
1641 | ! |
---|
1642 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1643 | !-- might be already allocated. |
---|
1644 | DO l = 0, 3 |
---|
1645 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(l)%t ) ) & |
---|
1646 | ALLOCATE ( t_surf_wall_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1647 | IF ( .NOT. ALLOCATED( t_surf_wall_v_2(l)%t ) ) & |
---|
1648 | ALLOCATE ( t_surf_wall_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1649 | IF ( .NOT. ALLOCATED( t_wall_v_1(l)%t ) ) & |
---|
1650 | ALLOCATE ( t_wall_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1651 | IF ( .NOT. ALLOCATED( t_wall_v_2(l)%t ) ) & |
---|
1652 | ALLOCATE ( t_wall_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1653 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(l)%t ) ) & |
---|
1654 | ALLOCATE ( t_surf_window_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1655 | IF ( .NOT. ALLOCATED( t_surf_window_v_2(l)%t ) ) & |
---|
1656 | ALLOCATE ( t_surf_window_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1657 | IF ( .NOT. ALLOCATED( t_window_v_1(l)%t ) ) & |
---|
1658 | ALLOCATE ( t_window_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1659 | IF ( .NOT. ALLOCATED( t_window_v_2(l)%t ) ) & |
---|
1660 | ALLOCATE ( t_window_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1661 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(l)%t ) ) & |
---|
1662 | ALLOCATE ( t_surf_green_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1663 | IF ( .NOT. ALLOCATED( t_surf_green_v_2(l)%t ) ) & |
---|
1664 | ALLOCATE ( t_surf_green_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1665 | IF ( .NOT. ALLOCATED( t_green_v_1(l)%t ) ) & |
---|
1666 | ALLOCATE ( t_green_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1667 | IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) ) & |
---|
1668 | ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1669 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_1(l)%t ) ) & |
---|
1670 | ALLOCATE ( t_surf_10cm_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1671 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_2(l)%t ) ) & |
---|
1672 | ALLOCATE ( t_surf_10cm_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1673 | IF ( .NOT. ALLOCATED( m_liq_usm_v_1(l)%var_usm_1d ) ) & |
---|
1674 | ALLOCATE ( m_liq_usm_v_1(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1675 | IF ( .NOT. ALLOCATED( m_liq_usm_v_2(l)%var_usm_1d ) ) & |
---|
1676 | ALLOCATE ( m_liq_usm_v_2(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1677 | IF ( .NOT. ALLOCATED( swc_v_1(l)%t ) ) & |
---|
1678 | ALLOCATE ( swc_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1679 | IF ( .NOT. ALLOCATED( swc_v_2(l)%t ) ) & |
---|
1680 | ALLOCATE ( swc_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1681 | ENDDO |
---|
1682 | ! |
---|
1683 | !-- initial assignment of the pointers |
---|
1684 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
1685 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
1686 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
1687 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
1688 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
1689 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
1690 | t_surf_10cm_v => t_surf_10cm_v_1; t_surf_10cm_v_p => t_surf_10cm_v_2 |
---|
1691 | m_liq_usm_v => m_liq_usm_v_1; m_liq_usm_v_p => m_liq_usm_v_2 |
---|
1692 | swc_v => swc_v_1; swc_v_p => swc_v_2 |
---|
1693 | |
---|
1694 | #endif |
---|
1695 | ! |
---|
1696 | !-- Allocate intermediate timestep arrays. For horizontal surfaces. |
---|
1697 | ALLOCATE ( surf_usm_h%tt_surface_wall_m(1:surf_usm_h%ns) ) |
---|
1698 | ALLOCATE ( surf_usm_h%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1699 | ALLOCATE ( surf_usm_h%tt_surface_window_m(1:surf_usm_h%ns) ) |
---|
1700 | ALLOCATE ( surf_usm_h%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1701 | ALLOCATE ( surf_usm_h%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1702 | ALLOCATE ( surf_usm_h%tt_surface_green_m(1:surf_usm_h%ns) ) |
---|
1703 | |
---|
1704 | ! |
---|
1705 | !-- Allocate intermediate timestep arrays |
---|
1706 | !-- Horizontal surfaces |
---|
1707 | ALLOCATE ( tm_liq_usm_h_m%var_usm_1d(1:surf_usm_h%ns) ) |
---|
1708 | ! |
---|
1709 | !-- Horizontal surfaces |
---|
1710 | DO l = 0, 3 |
---|
1711 | ALLOCATE ( tm_liq_usm_v_m(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) |
---|
1712 | ENDDO |
---|
1713 | |
---|
1714 | ! |
---|
1715 | !-- Set inital values for prognostic quantities |
---|
1716 | IF ( ALLOCATED( surf_usm_h%tt_surface_wall_m ) ) surf_usm_h%tt_surface_wall_m = 0.0_wp |
---|
1717 | IF ( ALLOCATED( surf_usm_h%tt_wall_m ) ) surf_usm_h%tt_wall_m = 0.0_wp |
---|
1718 | IF ( ALLOCATED( surf_usm_h%tt_surface_window_m ) ) surf_usm_h%tt_surface_window_m = 0.0_wp |
---|
1719 | IF ( ALLOCATED( surf_usm_h%tt_window_m ) ) surf_usm_h%tt_window_m = 0.0_wp |
---|
1720 | IF ( ALLOCATED( surf_usm_h%tt_green_m ) ) surf_usm_h%tt_green_m = 0.0_wp |
---|
1721 | IF ( ALLOCATED( surf_usm_h%tt_surface_green_m ) ) surf_usm_h%tt_surface_green_m = 0.0_wp |
---|
1722 | ! |
---|
1723 | !-- Now, for vertical surfaces |
---|
1724 | DO l = 0, 3 |
---|
1725 | ALLOCATE ( surf_usm_v(l)%tt_surface_wall_m(1:surf_usm_v(l)%ns) ) |
---|
1726 | ALLOCATE ( surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1727 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_wall_m ) ) surf_usm_v(l)%tt_surface_wall_m = 0.0_wp |
---|
1728 | IF ( ALLOCATED( surf_usm_v(l)%tt_wall_m ) ) surf_usm_v(l)%tt_wall_m = 0.0_wp |
---|
1729 | ALLOCATE ( surf_usm_v(l)%tt_surface_window_m(1:surf_usm_v(l)%ns) ) |
---|
1730 | ALLOCATE ( surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1731 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_window_m ) ) surf_usm_v(l)%tt_surface_window_m = 0.0_wp |
---|
1732 | IF ( ALLOCATED( surf_usm_v(l)%tt_window_m ) ) surf_usm_v(l)%tt_window_m = 0.0_wp |
---|
1733 | ALLOCATE ( surf_usm_v(l)%tt_surface_green_m(1:surf_usm_v(l)%ns) ) |
---|
1734 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_green_m ) ) surf_usm_v(l)%tt_surface_green_m = 0.0_wp |
---|
1735 | ALLOCATE ( surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1736 | IF ( ALLOCATED( surf_usm_v(l)%tt_green_m ) ) surf_usm_v(l)%tt_green_m = 0.0_wp |
---|
1737 | ENDDO |
---|
1738 | |
---|
1739 | !-- allocate wall heat flux output array and set initial values. For horizontal surfaces |
---|
1740 | ! ALLOCATE ( surf_usm_h%wshf(1:surf_usm_h%ns) ) !can be removed |
---|
1741 | ALLOCATE ( surf_usm_h%wshf_eb(1:surf_usm_h%ns) ) |
---|
1742 | ALLOCATE ( surf_usm_h%wghf_eb(1:surf_usm_h%ns) ) |
---|
1743 | ALLOCATE ( surf_usm_h%wghf_eb_window(1:surf_usm_h%ns) ) |
---|
1744 | ALLOCATE ( surf_usm_h%wghf_eb_green(1:surf_usm_h%ns) ) |
---|
1745 | ALLOCATE ( surf_usm_h%iwghf_eb(1:surf_usm_h%ns) ) |
---|
1746 | ALLOCATE ( surf_usm_h%iwghf_eb_window(1:surf_usm_h%ns) ) |
---|
1747 | IF ( ALLOCATED( surf_usm_h%wshf ) ) surf_usm_h%wshf = 0.0_wp |
---|
1748 | IF ( ALLOCATED( surf_usm_h%wshf_eb ) ) surf_usm_h%wshf_eb = 0.0_wp |
---|
1749 | IF ( ALLOCATED( surf_usm_h%wghf_eb ) ) surf_usm_h%wghf_eb = 0.0_wp |
---|
1750 | IF ( ALLOCATED( surf_usm_h%wghf_eb_window ) ) surf_usm_h%wghf_eb_window = 0.0_wp |
---|
1751 | IF ( ALLOCATED( surf_usm_h%wghf_eb_green ) ) surf_usm_h%wghf_eb_green = 0.0_wp |
---|
1752 | IF ( ALLOCATED( surf_usm_h%iwghf_eb ) ) surf_usm_h%iwghf_eb = 0.0_wp |
---|
1753 | IF ( ALLOCATED( surf_usm_h%iwghf_eb_window ) ) surf_usm_h%iwghf_eb_window = 0.0_wp |
---|
1754 | ! |
---|
1755 | !-- Now, for vertical surfaces |
---|
1756 | DO l = 0, 3 |
---|
1757 | ! ALLOCATE ( surf_usm_v(l)%wshf(1:surf_usm_v(l)%ns) ) ! can be removed |
---|
1758 | ALLOCATE ( surf_usm_v(l)%wshf_eb(1:surf_usm_v(l)%ns) ) |
---|
1759 | ALLOCATE ( surf_usm_v(l)%wghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1760 | ALLOCATE ( surf_usm_v(l)%wghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1761 | ALLOCATE ( surf_usm_v(l)%wghf_eb_green(1:surf_usm_v(l)%ns) ) |
---|
1762 | ALLOCATE ( surf_usm_v(l)%iwghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1763 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1764 | IF ( ALLOCATED( surf_usm_v(l)%wshf ) ) surf_usm_v(l)%wshf = 0.0_wp |
---|
1765 | IF ( ALLOCATED( surf_usm_v(l)%wshf_eb ) ) surf_usm_v(l)%wshf_eb = 0.0_wp |
---|
1766 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb ) ) surf_usm_v(l)%wghf_eb = 0.0_wp |
---|
1767 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_window ) ) surf_usm_v(l)%wghf_eb_window = 0.0_wp |
---|
1768 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_green ) ) surf_usm_v(l)%wghf_eb_green = 0.0_wp |
---|
1769 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb ) ) surf_usm_v(l)%iwghf_eb = 0.0_wp |
---|
1770 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) ) surf_usm_v(l)%iwghf_eb_window = 0.0_wp |
---|
1771 | ENDDO |
---|
1772 | |
---|
1773 | END SUBROUTINE usm_allocate_surface |
---|
1774 | |
---|
1775 | |
---|
1776 | !------------------------------------------------------------------------------! |
---|
1777 | ! Description: |
---|
1778 | ! ------------ |
---|
1779 | !> Sum up and time-average urban surface output quantities as well as allocate |
---|
1780 | !> the array necessary for storing the average. |
---|
1781 | !------------------------------------------------------------------------------! |
---|
1782 | SUBROUTINE usm_average_3d_data( mode, variable ) |
---|
1783 | |
---|
1784 | IMPLICIT NONE |
---|
1785 | |
---|
1786 | CHARACTER(LEN=*), INTENT(IN) :: mode |
---|
1787 | CHARACTER(LEN=*), INTENT(IN) :: variable |
---|
1788 | |
---|
1789 | INTEGER(iwp) :: i, j, k, l, m, ids, idsint, iwl, istat |
---|
1790 | CHARACTER(LEN=varnamelength) :: var |
---|
1791 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
1792 | CHARACTER(LEN=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
1793 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
1794 | |
---|
1795 | !-- find the real name of the variable |
---|
1796 | ids = -1 |
---|
1797 | l = -1 |
---|
1798 | var = TRIM(variable) |
---|
1799 | DO i = 0, nd-1 |
---|
1800 | k = len(TRIM(var)) |
---|
1801 | j = len(TRIM(dirname(i))) |
---|
1802 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
1803 | ids = i |
---|
1804 | idsint = dirint(ids) |
---|
1805 | var = var(:k-j) |
---|
1806 | EXIT |
---|
1807 | ENDIF |
---|
1808 | ENDDO |
---|
1809 | l = idsint - 2 ! horisontal direction index - terible hack ! |
---|
1810 | IF ( l < 0 .OR. l > 3 ) THEN |
---|
1811 | l = -1 |
---|
1812 | END IF |
---|
1813 | IF ( ids == -1 ) THEN |
---|
1814 | var = TRIM(variable) |
---|
1815 | ENDIF |
---|
1816 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
1817 | !-- wall layers |
---|
1818 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
1819 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1820 | var = var(1:10) |
---|
1821 | ELSE |
---|
1822 | !-- wrong wall layer index |
---|
1823 | RETURN |
---|
1824 | ENDIF |
---|
1825 | ENDIF |
---|
1826 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
1827 | !-- wall layers |
---|
1828 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
1829 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1830 | var = var(1:12) |
---|
1831 | ELSE |
---|
1832 | !-- wrong window layer index |
---|
1833 | RETURN |
---|
1834 | ENDIF |
---|
1835 | ENDIF |
---|
1836 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
1837 | !-- wall layers |
---|
1838 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
1839 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1840 | var = var(1:11) |
---|
1841 | ELSE |
---|
1842 | !-- wrong green layer index |
---|
1843 | RETURN |
---|
1844 | ENDIF |
---|
1845 | ENDIF |
---|
1846 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
1847 | !-- swc layers |
---|
1848 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
1849 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1850 | var = var(1:7) |
---|
1851 | ELSE |
---|
1852 | !-- wrong swc layer index |
---|
1853 | RETURN |
---|
1854 | ENDIF |
---|
1855 | ENDIF |
---|
1856 | |
---|
1857 | IF ( mode == 'allocate' ) THEN |
---|
1858 | |
---|
1859 | SELECT CASE ( TRIM( var ) ) |
---|
1860 | |
---|
1861 | CASE ( 'usm_rad_net' ) |
---|
1862 | !-- array of complete radiation balance |
---|
1863 | IF ( l == -1 ) THEN |
---|
1864 | IF ( .NOT. ALLOCATED(surf_usm_h%rad_net_av) ) THEN |
---|
1865 | ALLOCATE( surf_usm_h%rad_net_av(1:surf_usm_h%ns) ) |
---|
1866 | surf_usm_h%rad_net_av = 0.0_wp |
---|
1867 | ENDIF |
---|
1868 | ELSE |
---|
1869 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%rad_net_av) ) THEN |
---|
1870 | ALLOCATE( surf_usm_v(l)%rad_net_av(1:surf_usm_v(l)%ns) ) |
---|
1871 | surf_usm_v(l)%rad_net_av = 0.0_wp |
---|
1872 | ENDIF |
---|
1873 | ENDIF |
---|
1874 | |
---|
1875 | CASE ( 'usm_rad_insw' ) |
---|
1876 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1877 | IF ( .NOT. ALLOCATED(surfinsw_av) ) THEN |
---|
1878 | ALLOCATE( surfinsw_av(nsurfl) ) |
---|
1879 | surfinsw_av = 0.0_wp |
---|
1880 | ENDIF |
---|
1881 | |
---|
1882 | CASE ( 'usm_rad_inlw' ) |
---|
1883 | !-- array of lw radiation falling to surface after i-th reflection |
---|
1884 | IF ( .NOT. ALLOCATED(surfinlw_av) ) THEN |
---|
1885 | ALLOCATE( surfinlw_av(nsurfl) ) |
---|
1886 | surfinlw_av = 0.0_wp |
---|
1887 | ENDIF |
---|
1888 | |
---|
1889 | CASE ( 'usm_rad_inswdir' ) |
---|
1890 | !-- array of direct sw radiation falling to surface from sun |
---|
1891 | IF ( .NOT. ALLOCATED(surfinswdir_av) ) THEN |
---|
1892 | ALLOCATE( surfinswdir_av(nsurfl) ) |
---|
1893 | surfinswdir_av = 0.0_wp |
---|
1894 | ENDIF |
---|
1895 | |
---|
1896 | CASE ( 'usm_rad_inswdif' ) |
---|
1897 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
1898 | IF ( .NOT. ALLOCATED(surfinswdif_av) ) THEN |
---|
1899 | ALLOCATE( surfinswdif_av(nsurfl) ) |
---|
1900 | surfinswdif_av = 0.0_wp |
---|
1901 | ENDIF |
---|
1902 | |
---|
1903 | CASE ( 'usm_rad_inswref' ) |
---|
1904 | !-- array of sw radiation falling to surface from reflections |
---|
1905 | IF ( .NOT. ALLOCATED(surfinswref_av) ) THEN |
---|
1906 | ALLOCATE( surfinswref_av(nsurfl) ) |
---|
1907 | surfinswref_av = 0.0_wp |
---|
1908 | ENDIF |
---|
1909 | |
---|
1910 | CASE ( 'usm_rad_inlwdif' ) |
---|
1911 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1912 | IF ( .NOT. ALLOCATED(surfinlwdif_av) ) THEN |
---|
1913 | ALLOCATE( surfinlwdif_av(nsurfl) ) |
---|
1914 | surfinlwdif_av = 0.0_wp |
---|
1915 | ENDIF |
---|
1916 | |
---|
1917 | CASE ( 'usm_rad_inlwref' ) |
---|
1918 | !-- array of lw radiation falling to surface from reflections |
---|
1919 | IF ( .NOT. ALLOCATED(surfinlwref_av) ) THEN |
---|
1920 | ALLOCATE( surfinlwref_av(nsurfl) ) |
---|
1921 | surfinlwref_av = 0.0_wp |
---|
1922 | ENDIF |
---|
1923 | |
---|
1924 | CASE ( 'usm_rad_outsw' ) |
---|
1925 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
1926 | IF ( .NOT. ALLOCATED(surfoutsw_av) ) THEN |
---|
1927 | ALLOCATE( surfoutsw_av(nsurfl) ) |
---|
1928 | surfoutsw_av = 0.0_wp |
---|
1929 | ENDIF |
---|
1930 | |
---|
1931 | CASE ( 'usm_rad_outlw' ) |
---|
1932 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
1933 | IF ( .NOT. ALLOCATED(surfoutlw_av) ) THEN |
---|
1934 | ALLOCATE( surfoutlw_av(nsurfl) ) |
---|
1935 | surfoutlw_av = 0.0_wp |
---|
1936 | ENDIF |
---|
1937 | CASE ( 'usm_rad_ressw' ) |
---|
1938 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
1939 | IF ( .NOT. ALLOCATED(surfins_av) ) THEN |
---|
1940 | ALLOCATE( surfins_av(nsurfl) ) |
---|
1941 | surfins_av = 0.0_wp |
---|
1942 | ENDIF |
---|
1943 | |
---|
1944 | CASE ( 'usm_rad_reslw' ) |
---|
1945 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
1946 | IF ( .NOT. ALLOCATED(surfinl_av) ) THEN |
---|
1947 | ALLOCATE( surfinl_av(nsurfl) ) |
---|
1948 | surfinl_av = 0.0_wp |
---|
1949 | ENDIF |
---|
1950 | |
---|
1951 | CASE ( 'usm_rad_pc_inlw' ) |
---|
1952 | !-- array of of lw radiation absorbed in plant canopy |
---|
1953 | IF ( .NOT. ALLOCATED(pcbinlw_av) ) THEN |
---|
1954 | ALLOCATE( pcbinlw_av(1:npcbl) ) |
---|
1955 | pcbinlw_av = 0.0_wp |
---|
1956 | ENDIF |
---|
1957 | |
---|
1958 | CASE ( 'usm_rad_pc_insw' ) |
---|
1959 | !-- array of of sw radiation absorbed in plant canopy |
---|
1960 | IF ( .NOT. ALLOCATED(pcbinsw_av) ) THEN |
---|
1961 | ALLOCATE( pcbinsw_av(1:npcbl) ) |
---|
1962 | pcbinsw_av = 0.0_wp |
---|
1963 | ENDIF |
---|
1964 | |
---|
1965 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
1966 | !-- array of of direct sw radiation absorbed in plant canopy |
---|
1967 | IF ( .NOT. ALLOCATED(pcbinswdir_av) ) THEN |
---|
1968 | ALLOCATE( pcbinswdir_av(1:npcbl) ) |
---|
1969 | pcbinswdir_av = 0.0_wp |
---|
1970 | ENDIF |
---|
1971 | |
---|
1972 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
1973 | !-- array of of diffuse sw radiation absorbed in plant canopy |
---|
1974 | IF ( .NOT. ALLOCATED(pcbinswdif_av) ) THEN |
---|
1975 | ALLOCATE( pcbinswdif_av(1:npcbl) ) |
---|
1976 | pcbinswdif_av = 0.0_wp |
---|
1977 | ENDIF |
---|
1978 | |
---|
1979 | CASE ( 'usm_rad_pc_inswref' ) |
---|
1980 | !-- array of of reflected sw radiation absorbed in plant canopy |
---|
1981 | IF ( .NOT. ALLOCATED(pcbinswref_av) ) THEN |
---|
1982 | ALLOCATE( pcbinswref_av(1:npcbl) ) |
---|
1983 | pcbinswref_av = 0.0_wp |
---|
1984 | ENDIF |
---|
1985 | |
---|
1986 | CASE ( 'usm_rad_hf' ) |
---|
1987 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
1988 | IF ( l == -1 ) THEN |
---|
1989 | IF ( .NOT. ALLOCATED(surf_usm_h%surfhf_av) ) THEN |
---|
1990 | ALLOCATE( surf_usm_h%surfhf_av(1:surf_usm_h%ns) ) |
---|
1991 | surf_usm_h%surfhf_av = 0.0_wp |
---|
1992 | ENDIF |
---|
1993 | ELSE |
---|
1994 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%surfhf_av) ) THEN |
---|
1995 | ALLOCATE( surf_usm_v(l)%surfhf_av(1:surf_usm_v(l)%ns) ) |
---|
1996 | surf_usm_v(l)%surfhf_av = 0.0_wp |
---|
1997 | ENDIF |
---|
1998 | ENDIF |
---|
1999 | |
---|
2000 | CASE ( 'usm_wshf' ) |
---|
2001 | !-- array of sensible heat flux from surfaces |
---|
2002 | !-- land surfaces |
---|
2003 | IF ( l == -1 ) THEN |
---|
2004 | IF ( .NOT. ALLOCATED(surf_usm_h%wshf_eb_av) ) THEN |
---|
2005 | ALLOCATE( surf_usm_h%wshf_eb_av(1:surf_usm_h%ns) ) |
---|
2006 | surf_usm_h%wshf_eb_av = 0.0_wp |
---|
2007 | ENDIF |
---|
2008 | ELSE |
---|
2009 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wshf_eb_av) ) THEN |
---|
2010 | ALLOCATE( surf_usm_v(l)%wshf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2011 | surf_usm_v(l)%wshf_eb_av = 0.0_wp |
---|
2012 | ENDIF |
---|
2013 | ENDIF |
---|
2014 | |
---|
2015 | CASE ( 'usm_qsws' ) |
---|
2016 | !-- array of latent heat flux from surfaces |
---|
2017 | !-- land surfaces |
---|
2018 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_eb_av) ) THEN |
---|
2019 | ALLOCATE( surf_usm_h%qsws_eb_av(1:surf_usm_h%ns) ) |
---|
2020 | surf_usm_h%qsws_eb_av = 0.0_wp |
---|
2021 | ELSE |
---|
2022 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_eb_av) ) THEN |
---|
2023 | ALLOCATE( surf_usm_v(l)%qsws_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2024 | surf_usm_v(l)%qsws_eb_av = 0.0_wp |
---|
2025 | ENDIF |
---|
2026 | ENDIF |
---|
2027 | |
---|
2028 | CASE ( 'usm_qsws_veg' ) |
---|
2029 | !-- array of latent heat flux from vegetation surfaces |
---|
2030 | !-- land surfaces |
---|
2031 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_veg_eb_av) ) THEN |
---|
2032 | ALLOCATE( surf_usm_h%qsws_veg_eb_av(1:surf_usm_h%ns) ) |
---|
2033 | surf_usm_h%qsws_veg_eb_av = 0.0_wp |
---|
2034 | ELSE |
---|
2035 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_veg_eb_av) ) THEN |
---|
2036 | ALLOCATE( surf_usm_v(l)%qsws_veg_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2037 | surf_usm_v(l)%qsws_veg_eb_av = 0.0_wp |
---|
2038 | ENDIF |
---|
2039 | ENDIF |
---|
2040 | |
---|
2041 | CASE ( 'usm_qsws_liq' ) |
---|
2042 | !-- array of latent heat flux from surfaces with liquid |
---|
2043 | !-- land surfaces |
---|
2044 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_liq_eb_av) ) THEN |
---|
2045 | ALLOCATE( surf_usm_h%qsws_liq_eb_av(1:surf_usm_h%ns) ) |
---|
2046 | surf_usm_h%qsws_liq_eb_av = 0.0_wp |
---|
2047 | ELSE |
---|
2048 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_liq_eb_av) ) THEN |
---|
2049 | ALLOCATE( surf_usm_v(l)%qsws_liq_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2050 | surf_usm_v(l)%qsws_liq_eb_av = 0.0_wp |
---|
2051 | ENDIF |
---|
2052 | ENDIF |
---|
2053 | ! |
---|
2054 | !-- Please note, the following output quantities belongs to the |
---|
2055 | !-- individual tile fractions - ground heat flux at wall-, window-, |
---|
2056 | !-- and green fraction. Aggregated ground-heat flux is treated |
---|
2057 | !-- accordingly in average_3d_data, sum_up_3d_data, etc.. |
---|
2058 | CASE ( 'usm_wghf' ) |
---|
2059 | !-- array of heat flux from ground (wall, roof, land) |
---|
2060 | IF ( l == -1 ) THEN |
---|
2061 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_av) ) THEN |
---|
2062 | ALLOCATE( surf_usm_h%wghf_eb_av(1:surf_usm_h%ns) ) |
---|
2063 | surf_usm_h%wghf_eb_av = 0.0_wp |
---|
2064 | ENDIF |
---|
2065 | ELSE |
---|
2066 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_av) ) THEN |
---|
2067 | ALLOCATE( surf_usm_v(l)%wghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2068 | surf_usm_v(l)%wghf_eb_av = 0.0_wp |
---|
2069 | ENDIF |
---|
2070 | ENDIF |
---|
2071 | |
---|
2072 | CASE ( 'usm_wghf_window' ) |
---|
2073 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2074 | IF ( l == -1 ) THEN |
---|
2075 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_window_av) ) THEN |
---|
2076 | ALLOCATE( surf_usm_h%wghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
2077 | surf_usm_h%wghf_eb_window_av = 0.0_wp |
---|
2078 | ENDIF |
---|
2079 | ELSE |
---|
2080 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_window_av) ) THEN |
---|
2081 | ALLOCATE( surf_usm_v(l)%wghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
2082 | surf_usm_v(l)%wghf_eb_window_av = 0.0_wp |
---|
2083 | ENDIF |
---|
2084 | ENDIF |
---|
2085 | |
---|
2086 | CASE ( 'usm_wghf_green' ) |
---|
2087 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2088 | IF ( l == -1 ) THEN |
---|
2089 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_green_av) ) THEN |
---|
2090 | ALLOCATE( surf_usm_h%wghf_eb_green_av(1:surf_usm_h%ns) ) |
---|
2091 | surf_usm_h%wghf_eb_green_av = 0.0_wp |
---|
2092 | ENDIF |
---|
2093 | ELSE |
---|
2094 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_green_av) ) THEN |
---|
2095 | ALLOCATE( surf_usm_v(l)%wghf_eb_green_av(1:surf_usm_v(l)%ns) ) |
---|
2096 | surf_usm_v(l)%wghf_eb_green_av = 0.0_wp |
---|
2097 | ENDIF |
---|
2098 | ENDIF |
---|
2099 | |
---|
2100 | CASE ( 'usm_iwghf' ) |
---|
2101 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2102 | IF ( l == -1 ) THEN |
---|
2103 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_av) ) THEN |
---|
2104 | ALLOCATE( surf_usm_h%iwghf_eb_av(1:surf_usm_h%ns) ) |
---|
2105 | surf_usm_h%iwghf_eb_av = 0.0_wp |
---|
2106 | ENDIF |
---|
2107 | ELSE |
---|
2108 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_av) ) THEN |
---|
2109 | ALLOCATE( surf_usm_v(l)%iwghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
2110 | surf_usm_v(l)%iwghf_eb_av = 0.0_wp |
---|
2111 | ENDIF |
---|
2112 | ENDIF |
---|
2113 | |
---|
2114 | CASE ( 'usm_iwghf_window' ) |
---|
2115 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2116 | IF ( l == -1 ) THEN |
---|
2117 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_window_av) ) THEN |
---|
2118 | ALLOCATE( surf_usm_h%iwghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
2119 | surf_usm_h%iwghf_eb_window_av = 0.0_wp |
---|
2120 | ENDIF |
---|
2121 | ELSE |
---|
2122 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_window_av) ) THEN |
---|
2123 | ALLOCATE( surf_usm_v(l)%iwghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
2124 | surf_usm_v(l)%iwghf_eb_window_av = 0.0_wp |
---|
2125 | ENDIF |
---|
2126 | ENDIF |
---|
2127 | |
---|
2128 | CASE ( 'usm_t_surf_wall' ) |
---|
2129 | !-- surface temperature for surfaces |
---|
2130 | IF ( l == -1 ) THEN |
---|
2131 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_wall_av) ) THEN |
---|
2132 | ALLOCATE( surf_usm_h%t_surf_wall_av(1:surf_usm_h%ns) ) |
---|
2133 | surf_usm_h%t_surf_wall_av = 0.0_wp |
---|
2134 | ENDIF |
---|
2135 | ELSE |
---|
2136 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_wall_av) ) THEN |
---|
2137 | ALLOCATE( surf_usm_v(l)%t_surf_wall_av(1:surf_usm_v(l)%ns) ) |
---|
2138 | surf_usm_v(l)%t_surf_wall_av = 0.0_wp |
---|
2139 | ENDIF |
---|
2140 | ENDIF |
---|
2141 | |
---|
2142 | CASE ( 'usm_t_surf_window' ) |
---|
2143 | !-- surface temperature for window surfaces |
---|
2144 | IF ( l == -1 ) THEN |
---|
2145 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_window_av) ) THEN |
---|
2146 | ALLOCATE( surf_usm_h%t_surf_window_av(1:surf_usm_h%ns) ) |
---|
2147 | surf_usm_h%t_surf_window_av = 0.0_wp |
---|
2148 | ENDIF |
---|
2149 | ELSE |
---|
2150 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_window_av) ) THEN |
---|
2151 | ALLOCATE( surf_usm_v(l)%t_surf_window_av(1:surf_usm_v(l)%ns) ) |
---|
2152 | surf_usm_v(l)%t_surf_window_av = 0.0_wp |
---|
2153 | ENDIF |
---|
2154 | ENDIF |
---|
2155 | |
---|
2156 | CASE ( 'usm_t_surf_green' ) |
---|
2157 | !-- surface temperature for green surfaces |
---|
2158 | IF ( l == -1 ) THEN |
---|
2159 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_green_av) ) THEN |
---|
2160 | ALLOCATE( surf_usm_h%t_surf_green_av(1:surf_usm_h%ns) ) |
---|
2161 | surf_usm_h%t_surf_green_av = 0.0_wp |
---|
2162 | ENDIF |
---|
2163 | ELSE |
---|
2164 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_green_av) ) THEN |
---|
2165 | ALLOCATE( surf_usm_v(l)%t_surf_green_av(1:surf_usm_v(l)%ns) ) |
---|
2166 | surf_usm_v(l)%t_surf_green_av = 0.0_wp |
---|
2167 | ENDIF |
---|
2168 | ENDIF |
---|
2169 | |
---|
2170 | CASE ( 'usm_t_surf_10cm' ) |
---|
2171 | !-- near surface temperature for whole surfaces |
---|
2172 | IF ( l == -1 ) THEN |
---|
2173 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_10cm_av) ) THEN |
---|
2174 | ALLOCATE( surf_usm_h%t_surf_10cm_av(1:surf_usm_h%ns) ) |
---|
2175 | surf_usm_h%t_surf_10cm_av = 0.0_wp |
---|
2176 | ENDIF |
---|
2177 | ELSE |
---|
2178 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_10cm_av) ) THEN |
---|
2179 | ALLOCATE( surf_usm_v(l)%t_surf_10cm_av(1:surf_usm_v(l)%ns) ) |
---|
2180 | surf_usm_v(l)%t_surf_10cm_av = 0.0_wp |
---|
2181 | ENDIF |
---|
2182 | ENDIF |
---|
2183 | |
---|
2184 | CASE ( 'usm_t_wall' ) |
---|
2185 | !-- wall temperature for iwl layer of walls and land |
---|
2186 | IF ( l == -1 ) THEN |
---|
2187 | IF ( .NOT. ALLOCATED(surf_usm_h%t_wall_av) ) THEN |
---|
2188 | ALLOCATE( surf_usm_h%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2189 | surf_usm_h%t_wall_av = 0.0_wp |
---|
2190 | ENDIF |
---|
2191 | ELSE |
---|
2192 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_wall_av) ) THEN |
---|
2193 | ALLOCATE( surf_usm_v(l)%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2194 | surf_usm_v(l)%t_wall_av = 0.0_wp |
---|
2195 | ENDIF |
---|
2196 | ENDIF |
---|
2197 | |
---|
2198 | CASE ( 'usm_t_window' ) |
---|
2199 | !-- window temperature for iwl layer of walls and land |
---|
2200 | IF ( l == -1 ) THEN |
---|
2201 | IF ( .NOT. ALLOCATED(surf_usm_h%t_window_av) ) THEN |
---|
2202 | ALLOCATE( surf_usm_h%t_window_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2203 | surf_usm_h%t_window_av = 0.0_wp |
---|
2204 | ENDIF |
---|
2205 | ELSE |
---|
2206 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_window_av) ) THEN |
---|
2207 | ALLOCATE( surf_usm_v(l)%t_window_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2208 | surf_usm_v(l)%t_window_av = 0.0_wp |
---|
2209 | ENDIF |
---|
2210 | ENDIF |
---|
2211 | |
---|
2212 | CASE ( 'usm_t_green' ) |
---|
2213 | !-- green temperature for iwl layer of walls and land |
---|
2214 | IF ( l == -1 ) THEN |
---|
2215 | IF ( .NOT. ALLOCATED(surf_usm_h%t_green_av) ) THEN |
---|
2216 | ALLOCATE( surf_usm_h%t_green_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2217 | surf_usm_h%t_green_av = 0.0_wp |
---|
2218 | ENDIF |
---|
2219 | ELSE |
---|
2220 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_green_av) ) THEN |
---|
2221 | ALLOCATE( surf_usm_v(l)%t_green_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2222 | surf_usm_v(l)%t_green_av = 0.0_wp |
---|
2223 | ENDIF |
---|
2224 | ENDIF |
---|
2225 | CASE ( 'usm_swc' ) |
---|
2226 | !-- soil water content for iwl layer of walls and land |
---|
2227 | IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%swc_av) ) THEN |
---|
2228 | ALLOCATE( surf_usm_h%swc_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
2229 | surf_usm_h%swc_av = 0.0_wp |
---|
2230 | ELSE |
---|
2231 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%swc_av) ) THEN |
---|
2232 | ALLOCATE( surf_usm_v(l)%swc_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
2233 | surf_usm_v(l)%swc_av = 0.0_wp |
---|
2234 | ENDIF |
---|
2235 | ENDIF |
---|
2236 | |
---|
2237 | CASE DEFAULT |
---|
2238 | CONTINUE |
---|
2239 | |
---|
2240 | END SELECT |
---|
2241 | |
---|
2242 | ELSEIF ( mode == 'sum' ) THEN |
---|
2243 | |
---|
2244 | SELECT CASE ( TRIM( var ) ) |
---|
2245 | |
---|
2246 | CASE ( 'usm_rad_net' ) |
---|
2247 | !-- array of complete radiation balance |
---|
2248 | IF ( l == -1 ) THEN |
---|
2249 | DO m = 1, surf_usm_h%ns |
---|
2250 | surf_usm_h%rad_net_av(m) = & |
---|
2251 | surf_usm_h%rad_net_av(m) + & |
---|
2252 | surf_usm_h%rad_net_l(m) |
---|
2253 | ENDDO |
---|
2254 | ELSE |
---|
2255 | DO m = 1, surf_usm_v(l)%ns |
---|
2256 | surf_usm_v(l)%rad_net_av(m) = & |
---|
2257 | surf_usm_v(l)%rad_net_av(m) + & |
---|
2258 | surf_usm_v(l)%rad_net_l(m) |
---|
2259 | ENDDO |
---|
2260 | ENDIF |
---|
2261 | |
---|
2262 | CASE ( 'usm_rad_insw' ) |
---|
2263 | !-- array of sw radiation falling to surface after i-th reflection |
---|
2264 | DO l = 1, nsurfl |
---|
2265 | IF ( surfl(id,l) == idsint ) THEN |
---|
2266 | surfinsw_av(l) = surfinsw_av(l) + surfinsw(l) |
---|
2267 | ENDIF |
---|
2268 | ENDDO |
---|
2269 | |
---|
2270 | CASE ( 'usm_rad_inlw' ) |
---|
2271 | !-- array of lw radiation falling to surface after i-th reflection |
---|
2272 | DO l = 1, nsurfl |
---|
2273 | IF ( surfl(id,l) == idsint ) THEN |
---|
2274 | surfinlw_av(l) = surfinlw_av(l) + surfinlw(l) |
---|
2275 | ENDIF |
---|
2276 | ENDDO |
---|
2277 | |
---|
2278 | CASE ( 'usm_rad_inswdir' ) |
---|
2279 | !-- array of direct sw radiation falling to surface from sun |
---|
2280 | DO l = 1, nsurfl |
---|
2281 | IF ( surfl(id,l) == idsint ) THEN |
---|
2282 | surfinswdir_av(l) = surfinswdir_av(l) + surfinswdir(l) |
---|
2283 | ENDIF |
---|
2284 | ENDDO |
---|
2285 | |
---|
2286 | CASE ( 'usm_rad_inswdif' ) |
---|
2287 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
2288 | DO l = 1, nsurfl |
---|
2289 | IF ( surfl(id,l) == idsint ) THEN |
---|
2290 | surfinswdif_av(l) = surfinswdif_av(l) + surfinswdif(l) |
---|
2291 | ENDIF |
---|
2292 | ENDDO |
---|
2293 | |
---|
2294 | CASE ( 'usm_rad_inswref' ) |
---|
2295 | !-- array of sw radiation falling to surface from reflections |
---|
2296 | DO l = 1, nsurfl |
---|
2297 | IF ( surfl(id,l) == idsint ) THEN |
---|
2298 | surfinswref_av(l) = surfinswref_av(l) + surfinsw(l) - & |
---|
2299 | surfinswdir(l) - surfinswdif(l) |
---|
2300 | ENDIF |
---|
2301 | ENDDO |
---|
2302 | |
---|
2303 | |
---|
2304 | CASE ( 'usm_rad_inlwdif' ) |
---|
2305 | !-- array of sw radiation falling to surface after i-th reflection |
---|
2306 | DO l = 1, nsurfl |
---|
2307 | IF ( surfl(id,l) == idsint ) THEN |
---|
2308 | surfinlwdif_av(l) = surfinlwdif_av(l) + surfinlwdif(l) |
---|
2309 | ENDIF |
---|
2310 | ENDDO |
---|
2311 | ! |
---|
2312 | CASE ( 'usm_rad_inlwref' ) |
---|
2313 | !-- array of lw radiation falling to surface from reflections |
---|
2314 | DO l = 1, nsurfl |
---|
2315 | IF ( surfl(id,l) == idsint ) THEN |
---|
2316 | surfinlwref_av(l) = surfinlwref_av(l) + & |
---|
2317 | surfinlw(l) - surfinlwdif(l) |
---|
2318 | ENDIF |
---|
2319 | ENDDO |
---|
2320 | |
---|
2321 | CASE ( 'usm_rad_outsw' ) |
---|
2322 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
2323 | DO l = 1, nsurfl |
---|
2324 | IF ( surfl(id,l) == idsint ) THEN |
---|
2325 | surfoutsw_av(l) = surfoutsw_av(l) + surfoutsw(l) |
---|
2326 | ENDIF |
---|
2327 | ENDDO |
---|
2328 | |
---|
2329 | CASE ( 'usm_rad_outlw' ) |
---|
2330 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
2331 | DO l = 1, nsurfl |
---|
2332 | IF ( surfl(id,l) == idsint ) THEN |
---|
2333 | surfoutlw_av(l) = surfoutlw_av(l) + surfoutlw(l) |
---|
2334 | ENDIF |
---|
2335 | ENDDO |
---|
2336 | |
---|
2337 | CASE ( 'usm_rad_ressw' ) |
---|
2338 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
2339 | DO l = 1, nsurfl |
---|
2340 | IF ( surfl(id,l) == idsint ) THEN |
---|
2341 | surfins_av(l) = surfins_av(l) + surfins(l) |
---|
2342 | ENDIF |
---|
2343 | ENDDO |
---|
2344 | |
---|
2345 | CASE ( 'usm_rad_reslw' ) |
---|
2346 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
2347 | DO l = 1, nsurfl |
---|
2348 | IF ( surfl(id,l) == idsint ) THEN |
---|
2349 | surfinl_av(l) = surfinl_av(l) + surfinl(l) |
---|
2350 | ENDIF |
---|
2351 | ENDDO |
---|
2352 | |
---|
2353 | CASE ( 'usm_rad_pc_inlw' ) |
---|
2354 | pcbinlw_av(:) = pcbinlw_av(:) + pcbinlw(:) |
---|
2355 | |
---|
2356 | CASE ( 'usm_rad_pc_insw' ) |
---|
2357 | pcbinsw_av(:) = pcbinsw_av(:) + pcbinsw(:) |
---|
2358 | |
---|
2359 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
2360 | pcbinswdir_av(:) = pcbinswdir_av(:) + pcbinswdir(:) |
---|
2361 | |
---|
2362 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
2363 | pcbinswdif_av(:) = pcbinswdif_av(:) + pcbinswdif(:) |
---|
2364 | |
---|
2365 | CASE ( 'usm_rad_pc_inswref' ) |
---|
2366 | pcbinswref_av(:) = pcbinswref_av(:) + pcbinsw(:) & |
---|
2367 | - pcbinswdir(:) & |
---|
2368 | - pcbinswdif(:) |
---|
2369 | |
---|
2370 | CASE ( 'usm_rad_hf' ) |
---|
2371 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
2372 | IF ( l == -1 ) THEN |
---|
2373 | DO m = 1, surf_usm_h%ns |
---|
2374 | surf_usm_h%surfhf_av(m) = & |
---|
2375 | surf_usm_h%surfhf_av(m) + & |
---|
2376 | surf_usm_h%surfhf(m) |
---|
2377 | ENDDO |
---|
2378 | ELSE |
---|
2379 | DO m = 1, surf_usm_v(l)%ns |
---|
2380 | surf_usm_v(l)%surfhf_av(m) = & |
---|
2381 | surf_usm_v(l)%surfhf_av(m) + & |
---|
2382 | surf_usm_v(l)%surfhf(m) |
---|
2383 | ENDDO |
---|
2384 | ENDIF |
---|
2385 | |
---|
2386 | CASE ( 'usm_wshf' ) |
---|
2387 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2388 | IF ( l == -1 ) THEN |
---|
2389 | DO m = 1, surf_usm_h%ns |
---|
2390 | surf_usm_h%wshf_eb_av(m) = & |
---|
2391 | surf_usm_h%wshf_eb_av(m) + & |
---|
2392 | surf_usm_h%wshf_eb(m) |
---|
2393 | ENDDO |
---|
2394 | ELSE |
---|
2395 | DO m = 1, surf_usm_v(l)%ns |
---|
2396 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2397 | surf_usm_v(l)%wshf_eb_av(m) + & |
---|
2398 | surf_usm_v(l)%wshf_eb(m) |
---|
2399 | ENDDO |
---|
2400 | ENDIF |
---|
2401 | |
---|
2402 | CASE ( 'usm_qsws' ) |
---|
2403 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2404 | IF ( l == -1 ) THEN |
---|
2405 | DO m = 1, surf_usm_h%ns |
---|
2406 | surf_usm_h%qsws_eb_av(m) = & |
---|
2407 | surf_usm_h%qsws_eb_av(m) + & |
---|
2408 | surf_usm_h%qsws_eb(m) |
---|
2409 | ENDDO |
---|
2410 | ELSE |
---|
2411 | DO m = 1, surf_usm_v(l)%ns |
---|
2412 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2413 | surf_usm_v(l)%qsws_eb_av(m) + & |
---|
2414 | surf_usm_v(l)%qsws_eb(m) |
---|
2415 | ENDDO |
---|
2416 | ENDIF |
---|
2417 | |
---|
2418 | CASE ( 'usm_qsws_veg' ) |
---|
2419 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2420 | IF ( l == -1 ) THEN |
---|
2421 | DO m = 1, surf_usm_h%ns |
---|
2422 | surf_usm_h%qsws_veg_eb_av(m) = & |
---|
2423 | surf_usm_h%qsws_veg_eb_av(m) + & |
---|
2424 | surf_usm_h%qsws_veg_eb(m) |
---|
2425 | ENDDO |
---|
2426 | ELSE |
---|
2427 | DO m = 1, surf_usm_v(l)%ns |
---|
2428 | surf_usm_v(l)%qsws_veg_eb_av(m) = & |
---|
2429 | surf_usm_v(l)%qsws_veg_eb_av(m) + & |
---|
2430 | surf_usm_v(l)%qsws_veg_eb(m) |
---|
2431 | ENDDO |
---|
2432 | ENDIF |
---|
2433 | |
---|
2434 | CASE ( 'usm_qsws_liq' ) |
---|
2435 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2436 | IF ( l == -1 ) THEN |
---|
2437 | DO m = 1, surf_usm_h%ns |
---|
2438 | surf_usm_h%qsws_liq_eb_av(m) = & |
---|
2439 | surf_usm_h%qsws_liq_eb_av(m) + & |
---|
2440 | surf_usm_h%qsws_liq_eb(m) |
---|
2441 | ENDDO |
---|
2442 | ELSE |
---|
2443 | DO m = 1, surf_usm_v(l)%ns |
---|
2444 | surf_usm_v(l)%qsws_liq_eb_av(m) = & |
---|
2445 | surf_usm_v(l)%qsws_liq_eb_av(m) + & |
---|
2446 | surf_usm_v(l)%qsws_liq_eb(m) |
---|
2447 | ENDDO |
---|
2448 | ENDIF |
---|
2449 | |
---|
2450 | CASE ( 'usm_wghf' ) |
---|
2451 | !-- array of heat flux from ground (wall, roof, land) |
---|
2452 | IF ( l == -1 ) THEN |
---|
2453 | DO m = 1, surf_usm_h%ns |
---|
2454 | surf_usm_h%wghf_eb_av(m) = & |
---|
2455 | surf_usm_h%wghf_eb_av(m) + & |
---|
2456 | surf_usm_h%wghf_eb(m) |
---|
2457 | ENDDO |
---|
2458 | ELSE |
---|
2459 | DO m = 1, surf_usm_v(l)%ns |
---|
2460 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2461 | surf_usm_v(l)%wghf_eb_av(m) + & |
---|
2462 | surf_usm_v(l)%wghf_eb(m) |
---|
2463 | ENDDO |
---|
2464 | ENDIF |
---|
2465 | |
---|
2466 | CASE ( 'usm_wghf_window' ) |
---|
2467 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2468 | IF ( l == -1 ) THEN |
---|
2469 | DO m = 1, surf_usm_h%ns |
---|
2470 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2471 | surf_usm_h%wghf_eb_window_av(m) + & |
---|
2472 | surf_usm_h%wghf_eb_window(m) |
---|
2473 | ENDDO |
---|
2474 | ELSE |
---|
2475 | DO m = 1, surf_usm_v(l)%ns |
---|
2476 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2477 | surf_usm_v(l)%wghf_eb_window_av(m) + & |
---|
2478 | surf_usm_v(l)%wghf_eb_window(m) |
---|
2479 | ENDDO |
---|
2480 | ENDIF |
---|
2481 | |
---|
2482 | CASE ( 'usm_wghf_green' ) |
---|
2483 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2484 | IF ( l == -1 ) THEN |
---|
2485 | DO m = 1, surf_usm_h%ns |
---|
2486 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2487 | surf_usm_h%wghf_eb_green_av(m) + & |
---|
2488 | surf_usm_h%wghf_eb_green(m) |
---|
2489 | ENDDO |
---|
2490 | ELSE |
---|
2491 | DO m = 1, surf_usm_v(l)%ns |
---|
2492 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2493 | surf_usm_v(l)%wghf_eb_green_av(m) + & |
---|
2494 | surf_usm_v(l)%wghf_eb_green(m) |
---|
2495 | ENDDO |
---|
2496 | ENDIF |
---|
2497 | |
---|
2498 | CASE ( 'usm_iwghf' ) |
---|
2499 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2500 | IF ( l == -1 ) THEN |
---|
2501 | DO m = 1, surf_usm_h%ns |
---|
2502 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2503 | surf_usm_h%iwghf_eb_av(m) + & |
---|
2504 | surf_usm_h%iwghf_eb(m) |
---|
2505 | ENDDO |
---|
2506 | ELSE |
---|
2507 | DO m = 1, surf_usm_v(l)%ns |
---|
2508 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2509 | surf_usm_v(l)%iwghf_eb_av(m) + & |
---|
2510 | surf_usm_v(l)%iwghf_eb(m) |
---|
2511 | ENDDO |
---|
2512 | ENDIF |
---|
2513 | |
---|
2514 | CASE ( 'usm_iwghf_window' ) |
---|
2515 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2516 | IF ( l == -1 ) THEN |
---|
2517 | DO m = 1, surf_usm_h%ns |
---|
2518 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2519 | surf_usm_h%iwghf_eb_window_av(m) + & |
---|
2520 | surf_usm_h%iwghf_eb_window(m) |
---|
2521 | ENDDO |
---|
2522 | ELSE |
---|
2523 | DO m = 1, surf_usm_v(l)%ns |
---|
2524 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2525 | surf_usm_v(l)%iwghf_eb_window_av(m) + & |
---|
2526 | surf_usm_v(l)%iwghf_eb_window(m) |
---|
2527 | ENDDO |
---|
2528 | ENDIF |
---|
2529 | |
---|
2530 | CASE ( 'usm_t_surf_wall' ) |
---|
2531 | !-- surface temperature for surfaces |
---|
2532 | IF ( l == -1 ) THEN |
---|
2533 | DO m = 1, surf_usm_h%ns |
---|
2534 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2535 | surf_usm_h%t_surf_wall_av(m) + & |
---|
2536 | t_surf_wall_h(m) |
---|
2537 | ENDDO |
---|
2538 | ELSE |
---|
2539 | DO m = 1, surf_usm_v(l)%ns |
---|
2540 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2541 | surf_usm_v(l)%t_surf_wall_av(m) + & |
---|
2542 | t_surf_wall_v(l)%t(m) |
---|
2543 | ENDDO |
---|
2544 | ENDIF |
---|
2545 | |
---|
2546 | CASE ( 'usm_t_surf_window' ) |
---|
2547 | !-- surface temperature for window surfaces |
---|
2548 | IF ( l == -1 ) THEN |
---|
2549 | DO m = 1, surf_usm_h%ns |
---|
2550 | surf_usm_h%t_surf_window_av(m) = & |
---|
2551 | surf_usm_h%t_surf_window_av(m) + & |
---|
2552 | t_surf_window_h(m) |
---|
2553 | ENDDO |
---|
2554 | ELSE |
---|
2555 | DO m = 1, surf_usm_v(l)%ns |
---|
2556 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2557 | surf_usm_v(l)%t_surf_window_av(m) + & |
---|
2558 | t_surf_window_v(l)%t(m) |
---|
2559 | ENDDO |
---|
2560 | ENDIF |
---|
2561 | |
---|
2562 | CASE ( 'usm_t_surf_green' ) |
---|
2563 | !-- surface temperature for green surfaces |
---|
2564 | IF ( l == -1 ) THEN |
---|
2565 | DO m = 1, surf_usm_h%ns |
---|
2566 | surf_usm_h%t_surf_green_av(m) = & |
---|
2567 | surf_usm_h%t_surf_green_av(m) + & |
---|
2568 | t_surf_green_h(m) |
---|
2569 | ENDDO |
---|
2570 | ELSE |
---|
2571 | DO m = 1, surf_usm_v(l)%ns |
---|
2572 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2573 | surf_usm_v(l)%t_surf_green_av(m) + & |
---|
2574 | t_surf_green_v(l)%t(m) |
---|
2575 | ENDDO |
---|
2576 | ENDIF |
---|
2577 | |
---|
2578 | CASE ( 'usm_t_surf_10cm' ) |
---|
2579 | !-- near surface temperature for whole surfaces |
---|
2580 | IF ( l == -1 ) THEN |
---|
2581 | DO m = 1, surf_usm_h%ns |
---|
2582 | surf_usm_h%t_surf_10cm_av(m) = & |
---|
2583 | surf_usm_h%t_surf_10cm_av(m) + & |
---|
2584 | t_surf_10cm_h(m) |
---|
2585 | ENDDO |
---|
2586 | ELSE |
---|
2587 | DO m = 1, surf_usm_v(l)%ns |
---|
2588 | surf_usm_v(l)%t_surf_10cm_av(m) = & |
---|
2589 | surf_usm_v(l)%t_surf_10cm_av(m) + & |
---|
2590 | t_surf_10cm_v(l)%t(m) |
---|
2591 | ENDDO |
---|
2592 | ENDIF |
---|
2593 | |
---|
2594 | |
---|
2595 | CASE ( 'usm_t_wall' ) |
---|
2596 | !-- wall temperature for iwl layer of walls and land |
---|
2597 | IF ( l == -1 ) THEN |
---|
2598 | DO m = 1, surf_usm_h%ns |
---|
2599 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
2600 | surf_usm_h%t_wall_av(iwl,m) + & |
---|
2601 | t_wall_h(iwl,m) |
---|
2602 | ENDDO |
---|
2603 | ELSE |
---|
2604 | DO m = 1, surf_usm_v(l)%ns |
---|
2605 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
2606 | surf_usm_v(l)%t_wall_av(iwl,m) + & |
---|
2607 | t_wall_v(l)%t(iwl,m) |
---|
2608 | ENDDO |
---|
2609 | ENDIF |
---|
2610 | |
---|
2611 | CASE ( 'usm_t_window' ) |
---|
2612 | !-- window temperature for iwl layer of walls and land |
---|
2613 | IF ( l == -1 ) THEN |
---|
2614 | DO m = 1, surf_usm_h%ns |
---|
2615 | surf_usm_h%t_window_av(iwl,m) = & |
---|
2616 | surf_usm_h%t_window_av(iwl,m) + & |
---|
2617 | t_window_h(iwl,m) |
---|
2618 | ENDDO |
---|
2619 | ELSE |
---|
2620 | DO m = 1, surf_usm_v(l)%ns |
---|
2621 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
2622 | surf_usm_v(l)%t_window_av(iwl,m) + & |
---|
2623 | t_window_v(l)%t(iwl,m) |
---|
2624 | ENDDO |
---|
2625 | ENDIF |
---|
2626 | |
---|
2627 | CASE ( 'usm_t_green' ) |
---|
2628 | !-- green temperature for iwl layer of walls and land |
---|
2629 | IF ( l == -1 ) THEN |
---|
2630 | DO m = 1, surf_usm_h%ns |
---|
2631 | surf_usm_h%t_green_av(iwl,m) = & |
---|
2632 | surf_usm_h%t_green_av(iwl,m) + & |
---|
2633 | t_green_h(iwl,m) |
---|
2634 | ENDDO |
---|
2635 | ELSE |
---|
2636 | DO m = 1, surf_usm_v(l)%ns |
---|
2637 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
2638 | surf_usm_v(l)%t_green_av(iwl,m) + & |
---|
2639 | t_green_v(l)%t(iwl,m) |
---|
2640 | ENDDO |
---|
2641 | ENDIF |
---|
2642 | |
---|
2643 | CASE ( 'usm_swc' ) |
---|
2644 | !-- soil water content for iwl layer of walls and land |
---|
2645 | IF ( l == -1 ) THEN |
---|
2646 | DO m = 1, surf_usm_h%ns |
---|
2647 | surf_usm_h%swc_av(iwl,m) = & |
---|
2648 | surf_usm_h%swc_av(iwl,m) + & |
---|
2649 | swc_h(iwl,m) |
---|
2650 | ENDDO |
---|
2651 | ELSE |
---|
2652 | DO m = 1, surf_usm_v(l)%ns |
---|
2653 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
2654 | surf_usm_v(l)%swc_av(iwl,m) + & |
---|
2655 | swc_v(l)%t(iwl,m) |
---|
2656 | ENDDO |
---|
2657 | ENDIF |
---|
2658 | |
---|
2659 | CASE DEFAULT |
---|
2660 | CONTINUE |
---|
2661 | |
---|
2662 | END SELECT |
---|
2663 | |
---|
2664 | ELSEIF ( mode == 'average' ) THEN |
---|
2665 | |
---|
2666 | SELECT CASE ( TRIM( var ) ) |
---|
2667 | |
---|
2668 | CASE ( 'usm_rad_net' ) |
---|
2669 | !-- array of complete radiation balance |
---|
2670 | IF ( l == -1 ) THEN |
---|
2671 | DO m = 1, surf_usm_h%ns |
---|
2672 | surf_usm_h%rad_net_av(m) = & |
---|
2673 | surf_usm_h%rad_net_av(m) / & |
---|
2674 | REAL( average_count_3d, kind=wp ) |
---|
2675 | ENDDO |
---|
2676 | ELSE |
---|
2677 | DO m = 1, surf_usm_v(l)%ns |
---|
2678 | surf_usm_v(l)%rad_net_av(m) = & |
---|
2679 | surf_usm_v(l)%rad_net_av(m) / & |
---|
2680 | REAL( average_count_3d, kind=wp ) |
---|
2681 | ENDDO |
---|
2682 | ENDIF |
---|
2683 | |
---|
2684 | CASE ( 'usm_rad_insw' ) |
---|
2685 | !-- array of sw radiation falling to surface after i-th reflection |
---|
2686 | DO l = 1, nsurfl |
---|
2687 | IF ( surfl(id,l) == idsint ) THEN |
---|
2688 | surfinsw_av(l) = surfinsw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2689 | ENDIF |
---|
2690 | ENDDO |
---|
2691 | |
---|
2692 | CASE ( 'usm_rad_inlw' ) |
---|
2693 | !-- array of lw radiation falling to surface after i-th reflection |
---|
2694 | DO l = 1, nsurfl |
---|
2695 | IF ( surfl(id,l) == idsint ) THEN |
---|
2696 | surfinlw_av(l) = surfinlw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2697 | ENDIF |
---|
2698 | ENDDO |
---|
2699 | |
---|
2700 | CASE ( 'usm_rad_inswdir' ) |
---|
2701 | !-- array of direct sw radiation falling to surface from sun |
---|
2702 | DO l = 1, nsurfl |
---|
2703 | IF ( surfl(id,l) == idsint ) THEN |
---|
2704 | surfinswdir_av(l) = surfinswdir_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2705 | ENDIF |
---|
2706 | ENDDO |
---|
2707 | |
---|
2708 | CASE ( 'usm_rad_inswdif' ) |
---|
2709 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
2710 | DO l = 1, nsurfl |
---|
2711 | IF ( surfl(id,l) == idsint ) THEN |
---|
2712 | surfinswdif_av(l) = surfinswdif_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2713 | ENDIF |
---|
2714 | ENDDO |
---|
2715 | |
---|
2716 | CASE ( 'usm_rad_inswref' ) |
---|
2717 | !-- array of sw radiation falling to surface from reflections |
---|
2718 | DO l = 1, nsurfl |
---|
2719 | IF ( surfl(id,l) == idsint ) THEN |
---|
2720 | surfinswref_av(l) = surfinswref_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2721 | ENDIF |
---|
2722 | ENDDO |
---|
2723 | |
---|
2724 | CASE ( 'usm_rad_inlwdif' ) |
---|
2725 | !-- array of sw radiation falling to surface after i-th reflection |
---|
2726 | DO l = 1, nsurfl |
---|
2727 | IF ( surfl(id,l) == idsint ) THEN |
---|
2728 | surfinlwdif_av(l) = surfinlwdif_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2729 | ENDIF |
---|
2730 | ENDDO |
---|
2731 | |
---|
2732 | CASE ( 'usm_rad_inlwref' ) |
---|
2733 | !-- array of lw radiation falling to surface from reflections |
---|
2734 | DO l = 1, nsurfl |
---|
2735 | IF ( surfl(id,l) == idsint ) THEN |
---|
2736 | surfinlwref_av(l) = surfinlwref_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2737 | ENDIF |
---|
2738 | ENDDO |
---|
2739 | |
---|
2740 | CASE ( 'usm_rad_outsw' ) |
---|
2741 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
2742 | DO l = 1, nsurfl |
---|
2743 | IF ( surfl(id,l) == idsint ) THEN |
---|
2744 | surfoutsw_av(l) = surfoutsw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2745 | ENDIF |
---|
2746 | ENDDO |
---|
2747 | |
---|
2748 | CASE ( 'usm_rad_outlw' ) |
---|
2749 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
2750 | DO l = 1, nsurfl |
---|
2751 | IF ( surfl(id,l) == idsint ) THEN |
---|
2752 | surfoutlw_av(l) = surfoutlw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2753 | ENDIF |
---|
2754 | ENDDO |
---|
2755 | |
---|
2756 | CASE ( 'usm_rad_ressw' ) |
---|
2757 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
2758 | DO l = 1, nsurfl |
---|
2759 | IF ( surfl(id,l) == idsint ) THEN |
---|
2760 | surfins_av(l) = surfins_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2761 | ENDIF |
---|
2762 | ENDDO |
---|
2763 | |
---|
2764 | CASE ( 'usm_rad_reslw' ) |
---|
2765 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
2766 | DO l = 1, nsurfl |
---|
2767 | IF ( surfl(id,l) == idsint ) THEN |
---|
2768 | surfinl_av(l) = surfinl_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2769 | ENDIF |
---|
2770 | ENDDO |
---|
2771 | |
---|
2772 | CASE ( 'usm_rad_pc_inlw' ) |
---|
2773 | pcbinlw_av(:) = pcbinlw_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2774 | |
---|
2775 | CASE ( 'usm_rad_pc_insw' ) |
---|
2776 | pcbinsw_av(:) = pcbinsw_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2777 | |
---|
2778 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
2779 | pcbinswdir_av(:) = pcbinswdir_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2780 | |
---|
2781 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
2782 | pcbinswdif_av(:) = pcbinswdif_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2783 | |
---|
2784 | CASE ( 'usm_rad_pc_inswref' ) |
---|
2785 | pcbinswref_av(:) = pcbinswref_av(:) / REAL( average_count_3d, kind=wp ) |
---|
2786 | |
---|
2787 | CASE ( 'usm_rad_hf' ) |
---|
2788 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
2789 | IF ( l == -1 ) THEN |
---|
2790 | DO m = 1, surf_usm_h%ns |
---|
2791 | surf_usm_h%surfhf_av(m) = & |
---|
2792 | surf_usm_h%surfhf_av(m) / & |
---|
2793 | REAL( average_count_3d, kind=wp ) |
---|
2794 | ENDDO |
---|
2795 | ELSE |
---|
2796 | DO m = 1, surf_usm_v(l)%ns |
---|
2797 | surf_usm_v(l)%surfhf_av(m) = & |
---|
2798 | surf_usm_v(l)%surfhf_av(m) / & |
---|
2799 | REAL( average_count_3d, kind=wp ) |
---|
2800 | ENDDO |
---|
2801 | ENDIF |
---|
2802 | |
---|
2803 | CASE ( 'usm_wshf' ) |
---|
2804 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2805 | IF ( l == -1 ) THEN |
---|
2806 | DO m = 1, surf_usm_h%ns |
---|
2807 | surf_usm_h%wshf_eb_av(m) = & |
---|
2808 | surf_usm_h%wshf_eb_av(m) / & |
---|
2809 | REAL( average_count_3d, kind=wp ) |
---|
2810 | ENDDO |
---|
2811 | ELSE |
---|
2812 | DO m = 1, surf_usm_v(l)%ns |
---|
2813 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2814 | surf_usm_v(l)%wshf_eb_av(m) / & |
---|
2815 | REAL( average_count_3d, kind=wp ) |
---|
2816 | ENDDO |
---|
2817 | ENDIF |
---|
2818 | |
---|
2819 | CASE ( 'usm_qsws' ) |
---|
2820 | !-- array of latent heat flux from surfaces (land, roof, wall) |
---|
2821 | IF ( l == -1 ) THEN |
---|
2822 | DO m = 1, surf_usm_h%ns |
---|
2823 | surf_usm_h%qsws_eb_av(m) = & |
---|
2824 | surf_usm_h%qsws_eb_av(m) / & |
---|
2825 | REAL( average_count_3d, kind=wp ) |
---|
2826 | ENDDO |
---|
2827 | ELSE |
---|
2828 | DO m = 1, surf_usm_v(l)%ns |
---|
2829 | surf_usm_v(l)%qsws_eb_av(m) = & |
---|
2830 | surf_usm_v(l)%qsws_eb_av(m) / & |
---|
2831 | REAL( average_count_3d, kind=wp ) |
---|
2832 | ENDDO |
---|
2833 | ENDIF |
---|
2834 | |
---|
2835 | CASE ( 'usm_qsws_veg' ) |
---|
2836 | !-- array of latent heat flux from vegetation surfaces (land, roof, wall) |
---|
2837 | IF ( l == -1 ) THEN |
---|
2838 | DO m = 1, surf_usm_h%ns |
---|
2839 | surf_usm_h%qsws_veg_eb_av(m) = & |
---|
2840 | surf_usm_h%qsws_veg_eb_av(m) / & |
---|
2841 | REAL( average_count_3d, kind=wp ) |
---|
2842 | ENDDO |
---|
2843 | ELSE |
---|
2844 | DO m = 1, surf_usm_v(l)%ns |
---|
2845 | surf_usm_v(l)%qsws_veg_eb_av(m) = & |
---|
2846 | surf_usm_v(l)%qsws_veg_eb_av(m) / & |
---|
2847 | REAL( average_count_3d, kind=wp ) |
---|
2848 | ENDDO |
---|
2849 | ENDIF |
---|
2850 | |
---|
2851 | CASE ( 'usm_qsws_liq' ) |
---|
2852 | !-- array of latent heat flux from surfaces with liquid (land, roof, wall) |
---|
2853 | IF ( l == -1 ) THEN |
---|
2854 | DO m = 1, surf_usm_h%ns |
---|
2855 | surf_usm_h%qsws_liq_eb_av(m) = & |
---|
2856 | surf_usm_h%qsws_liq_eb_av(m) / & |
---|
2857 | REAL( average_count_3d, kind=wp ) |
---|
2858 | ENDDO |
---|
2859 | ELSE |
---|
2860 | DO m = 1, surf_usm_v(l)%ns |
---|
2861 | surf_usm_v(l)%qsws_liq_eb_av(m) = & |
---|
2862 | surf_usm_v(l)%qsws_liq_eb_av(m) / & |
---|
2863 | REAL( average_count_3d, kind=wp ) |
---|
2864 | ENDDO |
---|
2865 | ENDIF |
---|
2866 | |
---|
2867 | CASE ( 'usm_wghf' ) |
---|
2868 | !-- array of heat flux from ground (wall, roof, land) |
---|
2869 | IF ( l == -1 ) THEN |
---|
2870 | DO m = 1, surf_usm_h%ns |
---|
2871 | surf_usm_h%wghf_eb_av(m) = & |
---|
2872 | surf_usm_h%wghf_eb_av(m) / & |
---|
2873 | REAL( average_count_3d, kind=wp ) |
---|
2874 | ENDDO |
---|
2875 | ELSE |
---|
2876 | DO m = 1, surf_usm_v(l)%ns |
---|
2877 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2878 | surf_usm_v(l)%wghf_eb_av(m) / & |
---|
2879 | REAL( average_count_3d, kind=wp ) |
---|
2880 | ENDDO |
---|
2881 | ENDIF |
---|
2882 | |
---|
2883 | CASE ( 'usm_wghf_window' ) |
---|
2884 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2885 | IF ( l == -1 ) THEN |
---|
2886 | DO m = 1, surf_usm_h%ns |
---|
2887 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2888 | surf_usm_h%wghf_eb_window_av(m) / & |
---|
2889 | REAL( average_count_3d, kind=wp ) |
---|
2890 | ENDDO |
---|
2891 | ELSE |
---|
2892 | DO m = 1, surf_usm_v(l)%ns |
---|
2893 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2894 | surf_usm_v(l)%wghf_eb_window_av(m) / & |
---|
2895 | REAL( average_count_3d, kind=wp ) |
---|
2896 | ENDDO |
---|
2897 | ENDIF |
---|
2898 | |
---|
2899 | CASE ( 'usm_wghf_green' ) |
---|
2900 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2901 | IF ( l == -1 ) THEN |
---|
2902 | DO m = 1, surf_usm_h%ns |
---|
2903 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2904 | surf_usm_h%wghf_eb_green_av(m) / & |
---|
2905 | REAL( average_count_3d, kind=wp ) |
---|
2906 | ENDDO |
---|
2907 | ELSE |
---|
2908 | DO m = 1, surf_usm_v(l)%ns |
---|
2909 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2910 | surf_usm_v(l)%wghf_eb_green_av(m) / & |
---|
2911 | REAL( average_count_3d, kind=wp ) |
---|
2912 | ENDDO |
---|
2913 | ENDIF |
---|
2914 | |
---|
2915 | CASE ( 'usm_iwghf' ) |
---|
2916 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2917 | IF ( l == -1 ) THEN |
---|
2918 | DO m = 1, surf_usm_h%ns |
---|
2919 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2920 | surf_usm_h%iwghf_eb_av(m) / & |
---|
2921 | REAL( average_count_3d, kind=wp ) |
---|
2922 | ENDDO |
---|
2923 | ELSE |
---|
2924 | DO m = 1, surf_usm_v(l)%ns |
---|
2925 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2926 | surf_usm_v(l)%iwghf_eb_av(m) / & |
---|
2927 | REAL( average_count_3d, kind=wp ) |
---|
2928 | ENDDO |
---|
2929 | ENDIF |
---|
2930 | |
---|
2931 | CASE ( 'usm_iwghf_window' ) |
---|
2932 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2933 | IF ( l == -1 ) THEN |
---|
2934 | DO m = 1, surf_usm_h%ns |
---|
2935 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2936 | surf_usm_h%iwghf_eb_window_av(m) / & |
---|
2937 | REAL( average_count_3d, kind=wp ) |
---|
2938 | ENDDO |
---|
2939 | ELSE |
---|
2940 | DO m = 1, surf_usm_v(l)%ns |
---|
2941 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2942 | surf_usm_v(l)%iwghf_eb_window_av(m) / & |
---|
2943 | REAL( average_count_3d, kind=wp ) |
---|
2944 | ENDDO |
---|
2945 | ENDIF |
---|
2946 | |
---|
2947 | CASE ( 'usm_t_surf_wall' ) |
---|
2948 | !-- surface temperature for surfaces |
---|
2949 | IF ( l == -1 ) THEN |
---|
2950 | DO m = 1, surf_usm_h%ns |
---|
2951 | surf_usm_h%t_surf_wall_av(m) = & |
---|
2952 | surf_usm_h%t_surf_wall_av(m) / & |
---|
2953 | REAL( average_count_3d, kind=wp ) |
---|
2954 | ENDDO |
---|
2955 | ELSE |
---|
2956 | DO m = 1, surf_usm_v(l)%ns |
---|
2957 | surf_usm_v(l)%t_surf_wall_av(m) = & |
---|
2958 | surf_usm_v(l)%t_surf_wall_av(m) / & |
---|
2959 | REAL( average_count_3d, kind=wp ) |
---|
2960 | ENDDO |
---|
2961 | ENDIF |
---|
2962 | |
---|
2963 | CASE ( 'usm_t_surf_window' ) |
---|
2964 | !-- surface temperature for window surfaces |
---|
2965 | IF ( l == -1 ) THEN |
---|
2966 | DO m = 1, surf_usm_h%ns |
---|
2967 | surf_usm_h%t_surf_window_av(m) = & |
---|
2968 | surf_usm_h%t_surf_window_av(m) / & |
---|
2969 | REAL( average_count_3d, kind=wp ) |
---|
2970 | ENDDO |
---|
2971 | ELSE |
---|
2972 | DO m = 1, surf_usm_v(l)%ns |
---|
2973 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2974 | surf_usm_v(l)%t_surf_window_av(m) / & |
---|
2975 | REAL( average_count_3d, kind=wp ) |
---|
2976 | ENDDO |
---|
2977 | ENDIF |
---|
2978 | |
---|
2979 | CASE ( 'usm_t_surf_green' ) |
---|
2980 | !-- surface temperature for green surfaces |
---|
2981 | IF ( l == -1 ) THEN |
---|
2982 | DO m = 1, surf_usm_h%ns |
---|
2983 | surf_usm_h%t_surf_green_av(m) = & |
---|
2984 | surf_usm_h%t_surf_green_av(m) / & |
---|
2985 | REAL( average_count_3d, kind=wp ) |
---|
2986 | ENDDO |
---|
2987 | ELSE |
---|
2988 | DO m = 1, surf_usm_v(l)%ns |
---|
2989 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2990 | surf_usm_v(l)%t_surf_green_av(m) / & |
---|
2991 | REAL( average_count_3d, kind=wp ) |
---|
2992 | ENDDO |
---|
2993 | ENDIF |
---|
2994 | |
---|
2995 | CASE ( 'usm_t_surf_10cm' ) |
---|
2996 | !-- near surface temperature for whole surfaces |
---|
2997 | IF ( l == -1 ) THEN |
---|
2998 | DO m = 1, surf_usm_h%ns |
---|
2999 | surf_usm_h%t_surf_10cm_av(m) = & |
---|
3000 | surf_usm_h%t_surf_10cm_av(m) / & |
---|
3001 | REAL( average_count_3d, kind=wp ) |
---|
3002 | ENDDO |
---|
3003 | ELSE |
---|
3004 | DO m = 1, surf_usm_v(l)%ns |
---|
3005 | surf_usm_v(l)%t_surf_10cm_av(m) = & |
---|
3006 | surf_usm_v(l)%t_surf_10cm_av(m) / & |
---|
3007 | REAL( average_count_3d, kind=wp ) |
---|
3008 | ENDDO |
---|
3009 | ENDIF |
---|
3010 | |
---|
3011 | CASE ( 'usm_t_wall' ) |
---|
3012 | !-- wall temperature for iwl layer of walls and land |
---|
3013 | IF ( l == -1 ) THEN |
---|
3014 | DO m = 1, surf_usm_h%ns |
---|
3015 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
3016 | surf_usm_h%t_wall_av(iwl,m) / & |
---|
3017 | REAL( average_count_3d, kind=wp ) |
---|
3018 | ENDDO |
---|
3019 | ELSE |
---|
3020 | DO m = 1, surf_usm_v(l)%ns |
---|
3021 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
3022 | surf_usm_v(l)%t_wall_av(iwl,m) / & |
---|
3023 | REAL( average_count_3d, kind=wp ) |
---|
3024 | ENDDO |
---|
3025 | ENDIF |
---|
3026 | |
---|
3027 | CASE ( 'usm_t_window' ) |
---|
3028 | !-- window temperature for iwl layer of walls and land |
---|
3029 | IF ( l == -1 ) THEN |
---|
3030 | DO m = 1, surf_usm_h%ns |
---|
3031 | surf_usm_h%t_window_av(iwl,m) = & |
---|
3032 | surf_usm_h%t_window_av(iwl,m) / & |
---|
3033 | REAL( average_count_3d, kind=wp ) |
---|
3034 | ENDDO |
---|
3035 | ELSE |
---|
3036 | DO m = 1, surf_usm_v(l)%ns |
---|
3037 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
3038 | surf_usm_v(l)%t_window_av(iwl,m) / & |
---|
3039 | REAL( average_count_3d, kind=wp ) |
---|
3040 | ENDDO |
---|
3041 | ENDIF |
---|
3042 | |
---|
3043 | CASE ( 'usm_t_green' ) |
---|
3044 | !-- green temperature for iwl layer of walls and land |
---|
3045 | IF ( l == -1 ) THEN |
---|
3046 | DO m = 1, surf_usm_h%ns |
---|
3047 | surf_usm_h%t_green_av(iwl,m) = & |
---|
3048 | surf_usm_h%t_green_av(iwl,m) / & |
---|
3049 | REAL( average_count_3d, kind=wp ) |
---|
3050 | ENDDO |
---|
3051 | ELSE |
---|
3052 | DO m = 1, surf_usm_v(l)%ns |
---|
3053 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
3054 | surf_usm_v(l)%t_green_av(iwl,m) / & |
---|
3055 | REAL( average_count_3d, kind=wp ) |
---|
3056 | ENDDO |
---|
3057 | ENDIF |
---|
3058 | |
---|
3059 | CASE ( 'usm_swc' ) |
---|
3060 | !-- soil water content for iwl layer of walls and land |
---|
3061 | IF ( l == -1 ) THEN |
---|
3062 | DO m = 1, surf_usm_h%ns |
---|
3063 | surf_usm_h%swc_av(iwl,m) = & |
---|
3064 | surf_usm_h%swc_av(iwl,m) / & |
---|
3065 | REAL( average_count_3d, kind=wp ) |
---|
3066 | ENDDO |
---|
3067 | ELSE |
---|
3068 | DO m = 1, surf_usm_v(l)%ns |
---|
3069 | surf_usm_v(l)%swc_av(iwl,m) = & |
---|
3070 | surf_usm_v(l)%swc_av(iwl,m) / & |
---|
3071 | REAL( average_count_3d, kind=wp ) |
---|
3072 | ENDDO |
---|
3073 | ENDIF |
---|
3074 | |
---|
3075 | |
---|
3076 | END SELECT |
---|
3077 | |
---|
3078 | ENDIF |
---|
3079 | |
---|
3080 | END SUBROUTINE usm_average_3d_data |
---|
3081 | |
---|
3082 | |
---|
3083 | |
---|
3084 | !------------------------------------------------------------------------------! |
---|
3085 | ! Description: |
---|
3086 | ! ------------ |
---|
3087 | !> Set internal Neumann boundary condition at outer soil grid points |
---|
3088 | !> for temperature and humidity. |
---|
3089 | !------------------------------------------------------------------------------! |
---|
3090 | SUBROUTINE usm_boundary_condition |
---|
3091 | |
---|
3092 | IMPLICIT NONE |
---|
3093 | |
---|
3094 | INTEGER(iwp) :: i !< grid index x-direction |
---|
3095 | INTEGER(iwp) :: ioff !< offset index x-direction indicating location of soil grid point |
---|
3096 | INTEGER(iwp) :: j !< grid index y-direction |
---|
3097 | INTEGER(iwp) :: joff !< offset index x-direction indicating location of soil grid point |
---|
3098 | INTEGER(iwp) :: k !< grid index z-direction |
---|
3099 | INTEGER(iwp) :: koff !< offset index x-direction indicating location of soil grid point |
---|
3100 | INTEGER(iwp) :: l !< running index surface-orientation |
---|
3101 | INTEGER(iwp) :: m !< running index surface elements |
---|
3102 | |
---|
3103 | koff = surf_usm_h%koff |
---|
3104 | DO m = 1, surf_usm_h%ns |
---|
3105 | i = surf_usm_h%i(m) |
---|
3106 | j = surf_usm_h%j(m) |
---|
3107 | k = surf_usm_h%k(m) |
---|
3108 | pt(k+koff,j,i) = pt(k,j,i) |
---|
3109 | ENDDO |
---|
3110 | |
---|
3111 | DO l = 0, 3 |
---|
3112 | ioff = surf_usm_v(l)%ioff |
---|
3113 | joff = surf_usm_v(l)%joff |
---|
3114 | DO m = 1, surf_usm_v(l)%ns |
---|
3115 | i = surf_usm_v(l)%i(m) |
---|
3116 | j = surf_usm_v(l)%j(m) |
---|
3117 | k = surf_usm_v(l)%k(m) |
---|
3118 | pt(k,j+joff,i+ioff) = pt(k,j,i) |
---|
3119 | ENDDO |
---|
3120 | ENDDO |
---|
3121 | |
---|
3122 | END SUBROUTINE usm_boundary_condition |
---|
3123 | |
---|
3124 | |
---|
3125 | !------------------------------------------------------------------------------! |
---|
3126 | ! |
---|
3127 | ! Description: |
---|
3128 | ! ------------ |
---|
3129 | !> Subroutine checks variables and assigns units. |
---|
3130 | !> It is called out from subroutine check_parameters. |
---|
3131 | !------------------------------------------------------------------------------! |
---|
3132 | SUBROUTINE usm_check_data_output( variable, unit ) |
---|
3133 | |
---|
3134 | IMPLICIT NONE |
---|
3135 | |
---|
3136 | CHARACTER(LEN=*),INTENT(IN) :: variable !< |
---|
3137 | CHARACTER(LEN=*),INTENT(OUT) :: unit !< |
---|
3138 | |
---|
3139 | INTEGER(iwp) :: i,j,l !< index |
---|
3140 | CHARACTER(LEN=2) :: ls |
---|
3141 | CHARACTER(LEN=varnamelength) :: var !< TRIM(variable) |
---|
3142 | INTEGER(iwp), PARAMETER :: nl1 = 31 !< number of directional usm variables |
---|
3143 | CHARACTER(LEN=varnamelength), DIMENSION(nl1) :: varlist1 = & !< list of directional usm variables |
---|
3144 | (/'usm_rad_net ', & |
---|
3145 | 'usm_rad_insw ', & |
---|
3146 | 'usm_rad_inlw ', & |
---|
3147 | 'usm_rad_inswdir ', & |
---|
3148 | 'usm_rad_inswdif ', & |
---|
3149 | 'usm_rad_inswref ', & |
---|
3150 | 'usm_rad_inlwdif ', & |
---|
3151 | 'usm_wshf ', & |
---|
3152 | 'usm_rad_inlwref ', & |
---|
3153 | 'usm_rad_outsw ', & |
---|
3154 | 'usm_rad_outlw ', & |
---|
3155 | 'usm_rad_hf ', & |
---|
3156 | 'usm_rad_ressw ', & |
---|
3157 | 'usm_rad_reslw ', & |
---|
3158 | 'usm_wghf ', & |
---|
3159 | 'usm_wghf_window ', & |
---|
3160 | 'usm_wghf_green ', & |
---|
3161 | 'usm_iwghf ', & |
---|
3162 | 'usm_iwghf_window ', & |
---|
3163 | 'usm_surfz ', & |
---|
3164 | 'usm_surfwintrans ', & |
---|
3165 | 'usm_surfcat ', & |
---|
3166 | 'usm_surfalb ', & |
---|
3167 | 'usm_surfemis ', & |
---|
3168 | 'usm_t_surf_wall ', & |
---|
3169 | 'usm_t_surf_window ', & |
---|
3170 | 'usm_t_surf_green ', & |
---|
3171 | 'usm_t_green ', & |
---|
3172 | 'usm_t_surf_10cm ', & |
---|
3173 | 'usm_skyvf ', & |
---|
3174 | 'usm_skyvft '/) |
---|
3175 | |
---|
3176 | INTEGER(iwp), PARAMETER :: nl2 = 7 !< number of other variables |
---|
3177 | CHARACTER(LEN=varnamelength), DIMENSION(nl2) :: varlist2 = & !< list of other usm variables |
---|
3178 | (/'usm_svf ', & |
---|
3179 | 'usm_dif ', & |
---|
3180 | 'usm_rad_pc_inlw ', & |
---|
3181 | 'usm_rad_pc_insw ', & |
---|
3182 | 'usm_rad_pc_inswdir ', & |
---|
3183 | 'usm_rad_pc_inswdif ', & |
---|
3184 | 'usm_rad_pc_inswref '/) |
---|
3185 | |
---|
3186 | INTEGER(iwp), PARAMETER :: nl3 = 3 !< number of directional layer usm variables |
---|
3187 | CHARACTER(LEN=varnamelength), DIMENSION(nl3) :: varlist3 = & !< list of directional layer usm variables |
---|
3188 | (/'usm_t_wall ', & |
---|
3189 | 'usm_t_window ', & |
---|
3190 | 'usm_t_green '/) |
---|
3191 | |
---|
3192 | INTEGER(iwp), PARAMETER :: nd = 5 !< number of directions |
---|
3193 | CHARACTER(LEN=6), DIMENSION(nd), PARAMETER :: dirname = & !< direction names |
---|
3194 | (/'_roof ','_south','_north','_west ','_east '/) |
---|
3195 | LOGICAL :: lfound !< flag if the variable is found |
---|
3196 | |
---|
3197 | |
---|
3198 | lfound = .FALSE. |
---|
3199 | |
---|
3200 | var = TRIM(variable) |
---|
3201 | |
---|
3202 | !-- check if variable exists |
---|
3203 | ! directional variables |
---|
3204 | DO i = 1, nl1 |
---|
3205 | DO j = 1, nd |
---|
3206 | IF ( TRIM(var) == TRIM(varlist1(i))//TRIM(dirname(j)) ) THEN |
---|
3207 | lfound = .TRUE. |
---|
3208 | EXIT |
---|
3209 | ENDIF |
---|
3210 | IF ( lfound ) EXIT |
---|
3211 | ENDDO |
---|
3212 | ENDDO |
---|
3213 | IF ( lfound ) GOTO 10 |
---|
3214 | ! directional layer variables |
---|
3215 | DO i = 1, nl3 |
---|
3216 | DO j = 1, nd |
---|
3217 | DO l = nzb_wall, nzt_wall |
---|
3218 | WRITE(ls,'(A1,I1)') '_',l |
---|
3219 | IF ( TRIM(var) == TRIM(varlist3(i))//TRIM(ls)//TRIM(dirname(j)) ) THEN |
---|
3220 | lfound = .TRUE. |
---|
3221 | EXIT |
---|
3222 | ENDIF |
---|
3223 | ENDDO |
---|
3224 | IF ( lfound ) EXIT |
---|
3225 | ENDDO |
---|
3226 | ENDDO |
---|
3227 | IF ( lfound ) GOTO 10 |
---|
3228 | ! other variables |
---|
3229 | DO i = 1, nl2 |
---|
3230 | IF ( TRIM(var) == TRIM(varlist2(i)) ) THEN |
---|
3231 | lfound = .TRUE. |
---|
3232 | EXIT |
---|
3233 | ENDIF |
---|
3234 | ENDDO |
---|
3235 | IF ( .NOT. lfound ) THEN |
---|
3236 | unit = 'illegal' |
---|
3237 | RETURN |
---|
3238 | ENDIF |
---|
3239 | 10 CONTINUE |
---|
3240 | |
---|
3241 | IF ( var(1:12) == 'usm_rad_net_' .OR. var(1:13) == 'usm_rad_insw_' .OR. & |
---|
3242 | var(1:13) == 'usm_rad_inlw_' .OR. var(1:16) == 'usm_rad_inswdir_' .OR. & |
---|
3243 | var(1:16) == 'usm_rad_inswdif_' .OR. var(1:16) == 'usm_rad_inswref_' .OR. & |
---|
3244 | var(1:16) == 'usm_rad_inlwdif_' .OR. var(1:16) == 'usm_rad_inlwref_' .OR. & |
---|
3245 | var(1:14) == 'usm_rad_outsw_' .OR. var(1:14) == 'usm_rad_outlw_' .OR. & |
---|
3246 | var(1:14) == 'usm_rad_ressw_' .OR. var(1:14) == 'usm_rad_reslw_' .OR. & |
---|
3247 | var(1:11) == 'usm_rad_hf_' .OR. & |
---|
3248 | var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
3249 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
3250 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
3251 | var(1:17) == 'usm_surfwintrans_' .OR. & |
---|
3252 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
3253 | var(1:13) == 'usm_qsws_liq_' ) THEN |
---|
3254 | unit = 'W/m2' |
---|
3255 | ELSE IF ( var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
3256 | var(1:12) == 'usm_t_window' .OR. var(1:17) == 'usm_t_surf_window' .OR. & |
---|
3257 | var(1:16) == 'usm_t_surf_green' .OR. & |
---|
3258 | var(1:11) == 'usm_t_green' .OR. var(1:7) == 'usm_swc' .OR. & |
---|
3259 | var(1:15) == 'usm_t_surf_10cm' ) THEN |
---|
3260 | unit = 'K' |
---|
3261 | ELSE IF ( var == 'usm_rad_pc_inlw' .OR. var == 'usm_rad_pc_insw' .OR. & |
---|
3262 | var == 'usm_rad_pc_inswdir' .OR. var == 'usm_rad_pc_inswdif' .OR. & |
---|
3263 | var == 'usm_rad_pc_inswref' ) THEN |
---|
3264 | unit = 'W' |
---|
3265 | ELSE IF ( var(1:9) == 'usm_surfz' .OR. var(1:7) == 'usm_svf' .OR. & |
---|
3266 | var(1:7) == 'usm_dif' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
3267 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
3268 | var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' ) THEN |
---|
3269 | unit = '1' |
---|
3270 | ELSE |
---|
3271 | unit = 'illegal' |
---|
3272 | ENDIF |
---|
3273 | |
---|
3274 | END SUBROUTINE usm_check_data_output |
---|
3275 | |
---|
3276 | |
---|
3277 | !------------------------------------------------------------------------------! |
---|
3278 | ! Description: |
---|
3279 | ! ------------ |
---|
3280 | !> Check parameters routine for urban surface model |
---|
3281 | !------------------------------------------------------------------------------! |
---|
3282 | SUBROUTINE usm_check_parameters |
---|
3283 | |
---|
3284 | USE control_parameters, & |
---|
3285 | ONLY: bc_pt_b, bc_q_b, constant_flux_layer, large_scale_forcing, & |
---|
3286 | lsf_surf, topography |
---|
3287 | |
---|
3288 | ! |
---|
3289 | !-- Dirichlet boundary conditions are required as the surface fluxes are |
---|
3290 | !-- calculated from the temperature/humidity gradients in the urban surface |
---|
3291 | !-- model |
---|
3292 | IF ( bc_pt_b == 'neumann' .OR. bc_q_b == 'neumann' ) THEN |
---|
3293 | message_string = 'urban surface model requires setting of '// & |
---|
3294 | 'bc_pt_b = "dirichlet" and '// & |
---|
3295 | 'bc_q_b = "dirichlet"' |
---|
3296 | CALL message( 'usm_check_parameters', 'PA0590', 1, 2, 0, 6, 0 ) |
---|
3297 | ENDIF |
---|
3298 | |
---|
3299 | IF ( .NOT. constant_flux_layer ) THEN |
---|
3300 | message_string = 'urban surface model requires '// & |
---|
3301 | 'constant_flux_layer = .T.' |
---|
3302 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
3303 | ENDIF |
---|
3304 | |
---|
3305 | IF ( .NOT. radiation ) THEN |
---|
3306 | message_string = 'urban surface model requires '// & |
---|
3307 | 'the radiation model to be switched on' |
---|
3308 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
3309 | ENDIF |
---|
3310 | ! |
---|
3311 | !-- Surface forcing has to be disabled for LSF in case of enabled |
---|
3312 | !-- urban surface module |
---|
3313 | IF ( large_scale_forcing ) THEN |
---|
3314 | lsf_surf = .FALSE. |
---|
3315 | ENDIF |
---|
3316 | ! |
---|
3317 | !-- Topography |
---|
3318 | IF ( topography == 'flat' ) THEN |
---|
3319 | message_string = 'topography /= "flat" is required '// & |
---|
3320 | 'when using the urban surface model' |
---|
3321 | CALL message( 'check_parameters', 'PA0592', 1, 2, 0, 6, 0 ) |
---|
3322 | ENDIF |
---|
3323 | ! |
---|
3324 | !-- naheatlayers |
---|
3325 | IF ( naheatlayers > nzt ) THEN |
---|
3326 | message_string = 'number of anthropogenic heat layers '// & |
---|
3327 | '"naheatlayers" can not be larger than'// & |
---|
3328 | ' number of domain layers "nzt"' |
---|
3329 | CALL message( 'check_parameters', 'PA0593', 1, 2, 0, 6, 0 ) |
---|
3330 | ENDIF |
---|
3331 | |
---|
3332 | END SUBROUTINE usm_check_parameters |
---|
3333 | |
---|
3334 | |
---|
3335 | !------------------------------------------------------------------------------! |
---|
3336 | ! |
---|
3337 | ! Description: |
---|
3338 | ! ------------ |
---|
3339 | !> Output of the 3D-arrays in netCDF and/or AVS format |
---|
3340 | !> for variables of urban_surface model. |
---|
3341 | !> It resorts the urban surface module output quantities from surf style |
---|
3342 | !> indexing into temporary 3D array with indices (i,j,k). |
---|
3343 | !> It is called from subroutine data_output_3d. |
---|
3344 | !------------------------------------------------------------------------------! |
---|
3345 | SUBROUTINE usm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
3346 | |
---|
3347 | IMPLICIT NONE |
---|
3348 | |
---|
3349 | INTEGER(iwp), INTENT(IN) :: av !< |
---|
3350 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
3351 | INTEGER(iwp), INTENT(IN) :: nzb_do !< lower limit of the data output (usually 0) |
---|
3352 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) |
---|
3353 | LOGICAL, INTENT(OUT) :: found !< |
---|
3354 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< sp - it has to correspond to module data_output_3d |
---|
3355 | REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: temp_pf !< temp array for urban surface output procedure |
---|
3356 | |
---|
3357 | CHARACTER (len=varnamelength) :: var, surfid |
---|
3358 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
3359 | CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
3360 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
3361 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: diridx = (/ -1, 1, 0, 3, 2 /) |
---|
3362 | !< index for surf_*_v: 0:3 = (North, South, East, West) |
---|
3363 | INTEGER(iwp), DIMENSION(0:nd-1) :: dirstart |
---|
3364 | INTEGER(iwp), DIMENSION(0:nd-1) :: dirend |
---|
3365 | INTEGER(iwp) :: ids,idsint,idsidx,isurf,isvf,isurfs,isurflt,ipcgb |
---|
3366 | INTEGER(iwp) :: is,js,ks,i,j,k,iwl,istat, l, m |
---|
3367 | |
---|
3368 | dirstart = (/ startland, startwall, startwall, startwall, startwall /) |
---|
3369 | dirend = (/ endland, endwall, endwall, endwall, endwall /) |
---|
3370 | |
---|
3371 | found = .TRUE. |
---|
3372 | temp_pf = -1._wp |
---|
3373 | |
---|
3374 | ids = -1 |
---|
3375 | var = TRIM(variable) |
---|
3376 | DO i = 0, nd-1 |
---|
3377 | k = len(TRIM(var)) |
---|
3378 | j = len(TRIM(dirname(i))) |
---|
3379 | IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) ) THEN |
---|
3380 | ids = i |
---|
3381 | idsint = dirint(ids) |
---|
3382 | idsidx = diridx(ids) |
---|
3383 | var = var(:k-j) |
---|
3384 | EXIT |
---|
3385 | ENDIF |
---|
3386 | ENDDO |
---|
3387 | IF ( ids == -1 ) THEN |
---|
3388 | var = TRIM(variable) |
---|
3389 | ENDIF |
---|
3390 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
3391 | !-- wall layers |
---|
3392 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
3393 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
3394 | var = var(1:10) |
---|
3395 | ENDIF |
---|
3396 | ENDIF |
---|
3397 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
3398 | !-- window layers |
---|
3399 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
3400 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
3401 | var = var(1:12) |
---|
3402 | ENDIF |
---|
3403 | ENDIF |
---|
3404 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
3405 | !-- green layers |
---|
3406 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
3407 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
3408 | var = var(1:11) |
---|
3409 | ENDIF |
---|
3410 | ENDIF |
---|
3411 | IF ( var(1:8) == 'usm_swc_' .AND. len(TRIM(var)) >= 9 ) THEN |
---|
3412 | !-- green layers soil water content |
---|
3413 | READ(var(9:9), '(I1)', iostat=istat ) iwl |
---|
3414 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
3415 | var = var(1:7) |
---|
3416 | ENDIF |
---|
3417 | ENDIF |
---|
3418 | IF ( (var(1:8) == 'usm_svf_' .OR. var(1:8) == 'usm_dif_') .AND. len(TRIM(var)) >= 13 ) THEN |
---|
3419 | !-- svf values to particular surface |
---|
3420 | surfid = var(9:) |
---|
3421 | i = index(surfid,'_') |
---|
3422 | j = index(surfid(i+1:),'_') |
---|
3423 | READ(surfid(1:i-1),*, iostat=istat ) is |
---|
3424 | IF ( istat == 0 ) THEN |
---|
3425 | READ(surfid(i+1:i+j-1),*, iostat=istat ) js |
---|
3426 | ENDIF |
---|
3427 | IF ( istat == 0 ) THEN |
---|
3428 | READ(surfid(i+j+1:),*, iostat=istat ) ks |
---|
3429 | ENDIF |
---|
3430 | IF ( istat == 0 ) THEN |
---|
3431 | var = var(1:7) |
---|
3432 | ENDIF |
---|
3433 | ENDIF |
---|
3434 | |
---|
3435 | SELECT CASE ( TRIM(var) ) |
---|
3436 | |
---|
3437 | CASE ( 'usm_surfz' ) |
---|
3438 | !-- array of surface height (z) |
---|
3439 | IF ( idsint == iup_u ) THEN |
---|
3440 | DO m = 1, surf_usm_h%ns |
---|
3441 | i = surf_usm_h%i(m) |
---|
3442 | j = surf_usm_h%j(m) |
---|
3443 | k = surf_usm_h%k(m) |
---|
3444 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) ) |
---|
3445 | ENDDO |
---|
3446 | ELSE |
---|
3447 | l = idsidx |
---|
3448 | DO m = 1, surf_usm_v(l)%ns |
---|
3449 | i = surf_usm_v(l)%i(m) |
---|
3450 | j = surf_usm_v(l)%j(m) |
---|
3451 | k = surf_usm_v(l)%k(m) |
---|
3452 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) + 1.0_wp ) |
---|
3453 | ENDDO |
---|
3454 | ENDIF |
---|
3455 | |
---|
3456 | CASE ( 'usm_surfcat' ) |
---|
3457 | !-- surface category |
---|
3458 | IF ( idsint == iup_u ) THEN |
---|
3459 | DO m = 1, surf_usm_h%ns |
---|
3460 | i = surf_usm_h%i(m) |
---|
3461 | j = surf_usm_h%j(m) |
---|
3462 | k = surf_usm_h%k(m) |
---|
3463 | temp_pf(k,j,i) = surf_usm_h%surface_types(m) |
---|
3464 | ENDDO |
---|
3465 | ELSE |
---|
3466 | l = idsidx |
---|
3467 | DO m = 1, surf_usm_v(l)%ns |
---|
3468 | i = surf_usm_v(l)%i(m) |
---|
3469 | j = surf_usm_v(l)%j(m) |
---|
3470 | k = surf_usm_v(l)%k(m) |
---|
3471 | temp_pf(k,j,i) = surf_usm_v(l)%surface_types(m) |
---|
3472 | ENDDO |
---|
3473 | ENDIF |
---|
3474 | |
---|
3475 | CASE ( 'usm_surfalb' ) |
---|
3476 | !-- surface albedo, weighted average |
---|
3477 | IF ( idsint == iup_u ) THEN |
---|
3478 | DO m = 1, surf_usm_h%ns |
---|
3479 | i = surf_usm_h%i(m) |
---|
3480 | j = surf_usm_h%j(m) |
---|
3481 | k = surf_usm_h%k(m) |
---|
3482 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
3483 | surf_usm_h%albedo(ind_veg_wall,m) + & |
---|
3484 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
3485 | surf_usm_h%albedo(ind_pav_green,m) + & |
---|
3486 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
3487 | surf_usm_h%albedo(ind_wat_win,m) |
---|
3488 | ENDDO |
---|
3489 | ELSE |
---|
3490 | l = idsidx |
---|
3491 | DO m = 1, surf_usm_v(l)%ns |
---|
3492 | i = surf_usm_v(l)%i(m) |
---|
3493 | j = surf_usm_v(l)%j(m) |
---|
3494 | k = surf_usm_v(l)%k(m) |
---|
3495 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
3496 | surf_usm_v(l)%albedo(ind_veg_wall,m) + & |
---|
3497 | surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
3498 | surf_usm_v(l)%albedo(ind_pav_green,m) + & |
---|
3499 | surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
3500 | surf_usm_v(l)%albedo(ind_wat_win,m) |
---|
3501 | ENDDO |
---|
3502 | ENDIF |
---|
3503 | |
---|
3504 | CASE ( 'usm_surfemis' ) |
---|
3505 | !-- surface emissivity, weighted average |
---|
3506 | IF ( idsint == iup_u ) THEN |
---|
3507 | DO m = 1, surf_usm_h%ns |
---|
3508 | i = surf_usm_h%i(m) |
---|
3509 | j = surf_usm_h%j(m) |
---|
3510 | k = surf_usm_h%k(m) |
---|
3511 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
3512 | surf_usm_h%emissivity(ind_veg_wall,m) + & |
---|
3513 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
3514 | surf_usm_h%emissivity(ind_pav_green,m) + & |
---|
3515 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
3516 | surf_usm_h%emissivity(ind_wat_win,m) |
---|
3517 | ENDDO |
---|
3518 | ELSE |
---|
3519 | l = idsidx |
---|
3520 | DO m = 1, surf_usm_v(l)%ns |
---|
3521 | i = surf_usm_v(l)%i(m) |
---|
3522 | j = surf_usm_v(l)%j(m) |
---|
3523 | k = surf_usm_v(l)%k(m) |
---|
3524 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) *& |
---|
3525 | surf_usm_v(l)%emissivity(ind_veg_wall,m) +& |
---|
3526 | surf_usm_v(l)%frac(ind_pav_green,m) *& |
---|
3527 | surf_usm_v(l)%emissivity(ind_pav_green,m)+& |
---|
3528 | surf_usm_v(l)%frac(ind_wat_win,m) *& |
---|
3529 | surf_usm_v(l)%emissivity(ind_wat_win,m) |
---|
3530 | ENDDO |
---|
3531 | ENDIF |
---|
3532 | |
---|
3533 | CASE ( 'usm_surfwintrans' ) |
---|
3534 | !-- transmissivity window tiles |
---|
3535 | IF ( idsint == iup_u ) THEN |
---|
3536 | DO m = 1, surf_usm_h%ns |
---|
3537 | i = surf_usm_h%i(m) |
---|
3538 | j = surf_usm_h%j(m) |
---|
3539 | k = surf_usm_h%k(m) |
---|
3540 | temp_pf(k,j,i) = surf_usm_h%transmissivity(m) |
---|
3541 | ENDDO |
---|
3542 | ELSE |
---|
3543 | l = idsidx |
---|
3544 | DO m = 1, surf_usm_v(l)%ns |
---|
3545 | i = surf_usm_v(l)%i(m) |
---|
3546 | j = surf_usm_v(l)%j(m) |
---|
3547 | k = surf_usm_v(l)%k(m) |
---|
3548 | temp_pf(k,j,i) = surf_usm_v(l)%transmissivity(m) |
---|
3549 | ENDDO |
---|
3550 | ENDIF |
---|
3551 | |
---|
3552 | CASE ( 'usm_skyvf' ) |
---|
3553 | !-- sky view factor |
---|
3554 | DO isurf = dirstart(ids), dirend(ids) |
---|
3555 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3556 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvf(isurf) |
---|
3557 | ENDIF |
---|
3558 | ENDDO |
---|
3559 | |
---|
3560 | CASE ( 'usm_skyvft' ) |
---|
3561 | !-- sky view factor |
---|
3562 | DO isurf = dirstart(ids), dirend(ids) |
---|
3563 | IF ( surfl(id,isurf) == ids ) THEN |
---|
3564 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvft(isurf) |
---|
3565 | ENDIF |
---|
3566 | ENDDO |
---|
3567 | |
---|
3568 | ! |
---|
3569 | !-- Not adjusted so far |
---|
3570 | CASE ( 'usm_svf', 'usm_dif' ) |
---|
3571 | !-- shape view factors or iradiance factors to selected surface |
---|
3572 | IF ( TRIM(var)=='usm_svf' ) THEN |
---|
3573 | k = 1 |
---|
3574 | ELSE |
---|
3575 | k = 2 |
---|
3576 | ENDIF |
---|
3577 | DO isvf = 1, nsvfl |
---|
3578 | isurflt = svfsurf(1, isvf) |
---|
3579 | isurfs = svfsurf(2, isvf) |
---|
3580 | |
---|
3581 | IF ( surf(ix,isurfs) == is .AND. surf(iy,isurfs) == js .AND. & |
---|
3582 | surf(iz,isurfs) == ks .AND. surf(id,isurfs) == idsint ) THEN |
---|
3583 | !-- correct source surface |
---|
3584 | temp_pf(surfl(iz,isurflt),surfl(iy,isurflt),surfl(ix,isurflt)) = svf(k,isvf) |
---|
3585 | ENDIF |
---|
3586 | ENDDO |
---|
3587 | |
---|
3588 | CASE ( 'usm_rad_net' ) |
---|
3589 | !-- array of complete radiation balance |
---|
3590 | IF ( av == 0 ) THEN |
---|
3591 | IF ( idsint == iup_u ) THEN |
---|
3592 | DO m = 1, surf_usm_h%ns |
---|
3593 | i = surf_usm_h%i(m) |
---|
3594 | j = surf_usm_h%j(m) |
---|
3595 | k = surf_usm_h%k(m) |
---|
3596 | temp_pf(k,j,i) = surf_usm_h%rad_net_l(m) |
---|
3597 | ENDDO |
---|
3598 | ELSE |
---|
3599 | l = idsidx |
---|
3600 | DO m = 1, surf_usm_v(l)%ns |
---|
3601 | i = surf_usm_v(l)%i(m) |
---|
3602 | j = surf_usm_v(l)%j(m) |
---|
3603 | k = surf_usm_v(l)%k(m) |
---|
3604 | temp_pf(k,j,i) = surf_usm_v(l)%rad_net_l(m) |
---|
3605 | ENDDO |
---|
3606 | ENDIF |
---|
3607 | ELSE |
---|
3608 | IF ( idsint == iup_u ) THEN |
---|
3609 | DO m = 1, surf_usm_h%ns |
---|
3610 | i = surf_usm_h%i(m) |
---|
3611 | j = surf_usm_h%j(m) |
---|
3612 | k = surf_usm_h%k(m) |
---|
3613 | temp_pf(k,j,i) = surf_usm_h%rad_net_av(m) |
---|
3614 | ENDDO |
---|
3615 | ELSE |
---|
3616 | l = idsidx |
---|
3617 | DO m = 1, surf_usm_v(l)%ns |
---|
3618 | i = surf_usm_v(l)%i(m) |
---|
3619 | j = surf_usm_v(l)%j(m) |
---|
3620 | k = surf_usm_v(l)%k(m) |
---|
3621 | temp_pf(k,j,i) = surf_usm_v(l)%rad_net_av(m) |
---|
3622 | ENDDO |
---|
3623 | ENDIF |
---|
3624 | ENDIF |
---|
3625 | |
---|
3626 | CASE ( 'usm_rad_insw' ) |
---|
3627 | !-- array of sw radiation falling to surface after i-th reflection |
---|
3628 | DO isurf = dirstart(ids), dirend(ids) |
---|
3629 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3630 | IF ( av == 0 ) THEN |
---|
3631 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw(isurf) |
---|
3632 | ELSE |
---|
3633 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw_av(isurf) |
---|
3634 | ENDIF |
---|
3635 | ENDIF |
---|
3636 | ENDDO |
---|
3637 | |
---|
3638 | CASE ( 'usm_rad_inlw' ) |
---|
3639 | !-- array of lw radiation falling to surface after i-th reflection |
---|
3640 | DO isurf = dirstart(ids), dirend(ids) |
---|
3641 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3642 | IF ( av == 0 ) THEN |
---|
3643 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf) |
---|
3644 | ELSE |
---|
3645 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw_av(isurf) |
---|
3646 | ENDIF |
---|
3647 | ENDIF |
---|
3648 | ENDDO |
---|
3649 | |
---|
3650 | CASE ( 'usm_rad_inswdir' ) |
---|
3651 | !-- array of direct sw radiation falling to surface from sun |
---|
3652 | DO isurf = dirstart(ids), dirend(ids) |
---|
3653 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3654 | IF ( av == 0 ) THEN |
---|
3655 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir(isurf) |
---|
3656 | ELSE |
---|
3657 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir_av(isurf) |
---|
3658 | ENDIF |
---|
3659 | ENDIF |
---|
3660 | ENDDO |
---|
3661 | |
---|
3662 | CASE ( 'usm_rad_inswdif' ) |
---|
3663 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
3664 | DO isurf = dirstart(ids), dirend(ids) |
---|
3665 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3666 | IF ( av == 0 ) THEN |
---|
3667 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif(isurf) |
---|
3668 | ELSE |
---|
3669 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif_av(isurf) |
---|
3670 | ENDIF |
---|
3671 | ENDIF |
---|
3672 | ENDDO |
---|
3673 | |
---|
3674 | CASE ( 'usm_rad_inswref' ) |
---|
3675 | !-- array of sw radiation falling to surface from reflections |
---|
3676 | DO isurf = dirstart(ids), dirend(ids) |
---|
3677 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3678 | IF ( av == 0 ) THEN |
---|
3679 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = & |
---|
3680 | surfinsw(isurf) - surfinswdir(isurf) - surfinswdif(isurf) |
---|
3681 | ELSE |
---|
3682 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswref_av(isurf) |
---|
3683 | ENDIF |
---|
3684 | ENDIF |
---|
3685 | ENDDO |
---|
3686 | |
---|
3687 | CASE ( 'usm_rad_inlwdif' ) |
---|
3688 | !-- array of difusion lw radiation falling to surface from sky and borders of the domain |
---|
3689 | DO isurf = dirstart(ids), dirend(ids) |
---|
3690 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3691 | IF ( av == 0 ) THEN |
---|
3692 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif(isurf) |
---|
3693 | ELSE |
---|
3694 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif_av(isurf) |
---|
3695 | ENDIF |
---|
3696 | ENDIF |
---|
3697 | ENDDO |
---|
3698 | |
---|
3699 | CASE ( 'usm_rad_inlwref' ) |
---|
3700 | !-- array of lw radiation falling to surface from reflections |
---|
3701 | DO isurf = dirstart(ids), dirend(ids) |
---|
3702 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3703 | IF ( av == 0 ) THEN |
---|
3704 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf) - surfinlwdif(isurf) |
---|
3705 | ELSE |
---|
3706 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwref_av(isurf) |
---|
3707 | ENDIF |
---|
3708 | ENDIF |
---|
3709 | ENDDO |
---|
3710 | |
---|
3711 | CASE ( 'usm_rad_outsw' ) |
---|
3712 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
3713 | DO isurf = dirstart(ids), dirend(ids) |
---|
3714 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3715 | IF ( av == 0 ) THEN |
---|
3716 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw(isurf) |
---|
3717 | ELSE |
---|
3718 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw_av(isurf) |
---|
3719 | ENDIF |
---|
3720 | ENDIF |
---|
3721 | ENDDO |
---|
3722 | |
---|
3723 | CASE ( 'usm_rad_outlw' ) |
---|
3724 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
3725 | DO isurf = dirstart(ids), dirend(ids) |
---|
3726 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3727 | IF ( av == 0 ) THEN |
---|
3728 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw(isurf) |
---|
3729 | ELSE |
---|
3730 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw_av(isurf) |
---|
3731 | ENDIF |
---|
3732 | ENDIF |
---|
3733 | ENDDO |
---|
3734 | |
---|
3735 | CASE ( 'usm_rad_ressw' ) |
---|
3736 | !-- average of array of residua of sw radiation absorbed in surface after last reflection |
---|
3737 | DO isurf = dirstart(ids), dirend(ids) |
---|
3738 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3739 | IF ( av == 0 ) THEN |
---|
3740 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins(isurf) |
---|
3741 | ELSE |
---|
3742 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins_av(isurf) |
---|
3743 | ENDIF |
---|
3744 | ENDIF |
---|
3745 | ENDDO |
---|
3746 | |
---|
3747 | CASE ( 'usm_rad_reslw' ) |
---|
3748 | !-- average of array of residua of lw radiation absorbed in surface after last reflection |
---|
3749 | DO isurf = dirstart(ids), dirend(ids) |
---|
3750 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
3751 | IF ( av == 0 ) THEN |
---|
3752 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl(isurf) |
---|
3753 | ELSE |
---|
3754 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl_av(isurf) |
---|
3755 | ENDIF |
---|
3756 | ENDIF |
---|
3757 | ENDDO |
---|
3758 | |
---|
3759 | CASE ( 'usm_rad_pc_inlw' ) |
---|
3760 | !-- array of lw radiation absorbed by plant canopy |
---|
3761 | DO ipcgb = 1, npcbl |
---|
3762 | IF ( av == 0 ) THEN |
---|
3763 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinlw(ipcgb) |
---|
3764 | ELSE |
---|
3765 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinlw_av(ipcgb) |
---|
3766 | ENDIF |
---|
3767 | ENDDO |
---|
3768 | |
---|
3769 | CASE ( 'usm_rad_pc_insw' ) |
---|
3770 | !-- array of sw radiation absorbed by plant canopy |
---|
3771 | DO ipcgb = 1, npcbl |
---|
3772 | IF ( av == 0 ) THEN |
---|
3773 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw(ipcgb) |
---|
3774 | ELSE |
---|
3775 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw_av(ipcgb) |
---|
3776 | ENDIF |
---|
3777 | ENDDO |
---|
3778 | |
---|
3779 | CASE ( 'usm_rad_pc_inswdir' ) |
---|
3780 | !-- array of direct sw radiation absorbed by plant canopy |
---|
3781 | DO ipcgb = 1, npcbl |
---|
3782 | IF ( av == 0 ) THEN |
---|
3783 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdir(ipcgb) |
---|
3784 | ELSE |
---|
3785 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdir_av(ipcgb) |
---|
3786 | ENDIF |
---|
3787 | ENDDO |
---|
3788 | |
---|
3789 | CASE ( 'usm_rad_pc_inswdif' ) |
---|
3790 | !-- array of diffuse sw radiation absorbed by plant canopy |
---|
3791 | DO ipcgb = 1, npcbl |
---|
3792 | IF ( av == 0 ) THEN |
---|
3793 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdif(ipcgb) |
---|
3794 | ELSE |
---|
3795 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdif_av(ipcgb) |
---|
3796 | ENDIF |
---|
3797 | ENDDO |
---|
3798 | |
---|
3799 | CASE ( 'usm_rad_pc_inswref' ) |
---|
3800 | !-- array of reflected sw radiation absorbed by plant canopy |
---|
3801 | DO ipcgb = 1, npcbl |
---|
3802 | IF ( av == 0 ) THEN |
---|
3803 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw(ipcgb) & |
---|
3804 | - pcbinswdir(ipcgb) & |
---|
3805 | - pcbinswdif(ipcgb) |
---|
3806 | ELSE |
---|
3807 | temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswref_av(ipcgb) |
---|
3808 | ENDIF |
---|
3809 | ENDDO |
---|
3810 | |
---|
3811 | CASE ( 'usm_rad_hf' ) |
---|
3812 | !-- array of heat flux from radiation for surfaces after all reflections |
---|
3813 | IF ( av == 0 ) THEN |
---|
3814 | IF ( idsint == iup_u ) THEN |
---|
3815 | DO m = 1, surf_usm_h%ns |
---|
3816 | i = surf_usm_h%i(m) |
---|
3817 | j = surf_usm_h%j(m) |
---|
3818 | k = surf_usm_h%k(m) |
---|
3819 | temp_pf(k,j,i) = surf_usm_h%surfhf(m) |
---|
3820 | ENDDO |
---|
3821 | ELSE |
---|
3822 | l = idsidx |
---|
3823 | DO m = 1, surf_usm_v(l)%ns |
---|
3824 | i = surf_usm_v(l)%i(m) |
---|
3825 | j = surf_usm_v(l)%j(m) |
---|
3826 | k = surf_usm_v(l)%k(m) |
---|
3827 | temp_pf(k,j,i) = surf_usm_v(l)%surfhf(m) |
---|
3828 | ENDDO |
---|
3829 | ENDIF |
---|
3830 | ELSE |
---|
3831 | IF ( idsint == iup_u ) THEN |
---|
3832 | DO m = 1, surf_usm_h%ns |
---|
3833 | i = surf_usm_h%i(m) |
---|
3834 | j = surf_usm_h%j(m) |
---|
3835 | k = surf_usm_h%k(m) |
---|
3836 | temp_pf(k,j,i) = surf_usm_h%surfhf_av(m) |
---|
3837 | ENDDO |
---|
3838 | ELSE |
---|
3839 | l = idsidx |
---|
3840 | DO m = 1, surf_usm_v(l)%ns |
---|
3841 | i = surf_usm_v(l)%i(m) |
---|
3842 | j = surf_usm_v(l)%j(m) |
---|
3843 | k = surf_usm_v(l)%k(m) |
---|
3844 | temp_pf(k,j,i) = surf_usm_v(l)%surfhf_av(m) |
---|
3845 | ENDDO |
---|
3846 | ENDIF |
---|
3847 | ENDIF |
---|
3848 | |
---|
3849 | CASE ( 'usm_wshf' ) |
---|
3850 | !-- array of sensible heat flux from surfaces |
---|
3851 | IF ( av == 0 ) THEN |
---|
3852 | IF ( idsint == iup_u ) THEN |
---|
3853 | DO m = 1, surf_usm_h%ns |
---|
3854 | i = surf_usm_h%i(m) |
---|
3855 | j = surf_usm_h%j(m) |
---|
3856 | k = surf_usm_h%k(m) |
---|
3857 | temp_pf(k,j,i) = surf_usm_h%wshf_eb(m) |
---|
3858 | ENDDO |
---|
3859 | ELSE |
---|
3860 | l = idsidx |
---|
3861 | DO m = 1, surf_usm_v(l)%ns |
---|
3862 | i = surf_usm_v(l)%i(m) |
---|
3863 | j = surf_usm_v(l)%j(m) |
---|
3864 | k = surf_usm_v(l)%k(m) |
---|
3865 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb(m) |
---|
3866 | ENDDO |
---|
3867 | ENDIF |
---|
3868 | ELSE |
---|
3869 | IF ( idsint == iup_u ) THEN |
---|
3870 | DO m = 1, surf_usm_h%ns |
---|
3871 | i = surf_usm_h%i(m) |
---|
3872 | j = surf_usm_h%j(m) |
---|
3873 | k = surf_usm_h%k(m) |
---|
3874 | temp_pf(k,j,i) = surf_usm_h%wshf_eb_av(m) |
---|
3875 | ENDDO |
---|
3876 | ELSE |
---|
3877 | l = idsidx |
---|
3878 | DO m = 1, surf_usm_v(l)%ns |
---|
3879 | i = surf_usm_v(l)%i(m) |
---|
3880 | j = surf_usm_v(l)%j(m) |
---|
3881 | k = surf_usm_v(l)%k(m) |
---|
3882 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb_av(m) |
---|
3883 | ENDDO |
---|
3884 | ENDIF |
---|
3885 | ENDIF |
---|
3886 | |
---|
3887 | |
---|
3888 | CASE ( 'usm_qsws' ) |
---|
3889 | !-- array of latent heat flux from surfaces |
---|
3890 | IF ( av == 0 ) THEN |
---|
3891 | IF ( idsint == iup_u ) THEN |
---|
3892 | DO m = 1, surf_usm_h%ns |
---|
3893 | i = surf_usm_h%i(m) |
---|
3894 | j = surf_usm_h%j(m) |
---|
3895 | k = surf_usm_h%k(m) |
---|
3896 | temp_pf(k,j,i) = surf_usm_h%qsws_eb(m) |
---|
3897 | ENDDO |
---|
3898 | ELSE |
---|
3899 | l = idsidx |
---|
3900 | DO m = 1, surf_usm_v(l)%ns |
---|
3901 | i = surf_usm_v(l)%i(m) |
---|
3902 | j = surf_usm_v(l)%j(m) |
---|
3903 | k = surf_usm_v(l)%k(m) |
---|
3904 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb(m) |
---|
3905 | ENDDO |
---|
3906 | ENDIF |
---|
3907 | ELSE |
---|
3908 | IF ( idsint == iup_u ) THEN |
---|
3909 | DO m = 1, surf_usm_h%ns |
---|
3910 | i = surf_usm_h%i(m) |
---|
3911 | j = surf_usm_h%j(m) |
---|
3912 | k = surf_usm_h%k(m) |
---|
3913 | temp_pf(k,j,i) = surf_usm_h%qsws_eb_av(m) |
---|
3914 | ENDDO |
---|
3915 | ELSE |
---|
3916 | l = idsidx |
---|
3917 | DO m = 1, surf_usm_v(l)%ns |
---|
3918 | i = surf_usm_v(l)%i(m) |
---|
3919 | j = surf_usm_v(l)%j(m) |
---|
3920 | k = surf_usm_v(l)%k(m) |
---|
3921 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb_av(m) |
---|
3922 | ENDDO |
---|
3923 | ENDIF |
---|
3924 | ENDIF |
---|
3925 | |
---|
3926 | CASE ( 'usm_qsws_veg' ) |
---|
3927 | !-- array of latent heat flux from vegetation surfaces |
---|
3928 | IF ( av == 0 ) THEN |
---|
3929 | IF ( idsint == iup_u ) THEN |
---|
3930 | DO m = 1, surf_usm_h%ns |
---|
3931 | i = surf_usm_h%i(m) |
---|
3932 | j = surf_usm_h%j(m) |
---|
3933 | k = surf_usm_h%k(m) |
---|
3934 | temp_pf(k,j,i) = surf_usm_h%qsws_veg_eb(m) |
---|
3935 | ENDDO |
---|
3936 | ELSE |
---|
3937 | l = idsidx |
---|
3938 | DO m = 1, surf_usm_v(l)%ns |
---|
3939 | i = surf_usm_v(l)%i(m) |
---|
3940 | j = surf_usm_v(l)%j(m) |
---|
3941 | k = surf_usm_v(l)%k(m) |
---|
3942 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_eb(m) |
---|
3943 | ENDDO |
---|
3944 | ENDIF |
---|
3945 | ELSE |
---|
3946 | IF ( idsint == iup_u ) THEN |
---|
3947 | DO m = 1, surf_usm_h%ns |
---|
3948 | i = surf_usm_h%i(m) |
---|
3949 | j = surf_usm_h%j(m) |
---|
3950 | k = surf_usm_h%k(m) |
---|
3951 | temp_pf(k,j,i) = surf_usm_h%qsws_veg_eb_av(m) |
---|
3952 | ENDDO |
---|
3953 | ELSE |
---|
3954 | l = idsidx |
---|
3955 | DO m = 1, surf_usm_v(l)%ns |
---|
3956 | i = surf_usm_v(l)%i(m) |
---|
3957 | j = surf_usm_v(l)%j(m) |
---|
3958 | k = surf_usm_v(l)%k(m) |
---|
3959 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_eb_av(m) |
---|
3960 | ENDDO |
---|
3961 | ENDIF |
---|
3962 | ENDIF |
---|
3963 | |
---|
3964 | CASE ( 'usm_qsws_liq' ) |
---|
3965 | !-- array of latent heat flux from surfaces with liquid |
---|
3966 | IF ( av == 0 ) THEN |
---|
3967 | IF ( idsint == iup_u ) THEN |
---|
3968 | DO m = 1, surf_usm_h%ns |
---|
3969 | i = surf_usm_h%i(m) |
---|
3970 | j = surf_usm_h%j(m) |
---|
3971 | k = surf_usm_h%k(m) |
---|
3972 | temp_pf(k,j,i) = surf_usm_h%qsws_liq_eb(m) |
---|
3973 | ENDDO |
---|
3974 | ELSE |
---|
3975 | l = idsidx |
---|
3976 | DO m = 1, surf_usm_v(l)%ns |
---|
3977 | i = surf_usm_v(l)%i(m) |
---|
3978 | j = surf_usm_v(l)%j(m) |
---|
3979 | k = surf_usm_v(l)%k(m) |
---|
3980 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_eb(m) |
---|
3981 | ENDDO |
---|
3982 | ENDIF |
---|
3983 | ELSE |
---|
3984 | IF ( idsint == iup_u ) THEN |
---|
3985 | DO m = 1, surf_usm_h%ns |
---|
3986 | i = surf_usm_h%i(m) |
---|
3987 | j = surf_usm_h%j(m) |
---|
3988 | k = surf_usm_h%k(m) |
---|
3989 | temp_pf(k,j,i) = surf_usm_h%qsws_liq_eb_av(m) |
---|
3990 | ENDDO |
---|
3991 | ELSE |
---|
3992 | l = idsidx |
---|
3993 | DO m = 1, surf_usm_v(l)%ns |
---|
3994 | i = surf_usm_v(l)%i(m) |
---|
3995 | j = surf_usm_v(l)%j(m) |
---|
3996 | k = surf_usm_v(l)%k(m) |
---|
3997 | temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_eb_av(m) |
---|
3998 | ENDDO |
---|
3999 | ENDIF |
---|
4000 | ENDIF |
---|
4001 | |
---|
4002 | |
---|
4003 | |
---|
4004 | |
---|
4005 | CASE ( 'usm_wghf' ) |
---|
4006 | !-- array of heat flux from ground (land, wall, roof) |
---|
4007 | IF ( av == 0 ) THEN |
---|
4008 | IF ( idsint == iup_u ) THEN |
---|
4009 | DO m = 1, surf_usm_h%ns |
---|
4010 | i = surf_usm_h%i(m) |
---|
4011 | j = surf_usm_h%j(m) |
---|
4012 | k = surf_usm_h%k(m) |
---|
4013 | temp_pf(k,j,i) = surf_usm_h%wghf_eb(m) |
---|
4014 | ENDDO |
---|
4015 | ELSE |
---|
4016 | l = idsidx |
---|
4017 | DO m = 1, surf_usm_v(l)%ns |
---|
4018 | i = surf_usm_v(l)%i(m) |
---|
4019 | j = surf_usm_v(l)%j(m) |
---|
4020 | k = surf_usm_v(l)%k(m) |
---|
4021 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb(m) |
---|
4022 | ENDDO |
---|
4023 | ENDIF |
---|
4024 | ELSE |
---|
4025 | IF ( idsint == iup_u ) THEN |
---|
4026 | DO m = 1, surf_usm_h%ns |
---|
4027 | i = surf_usm_h%i(m) |
---|
4028 | j = surf_usm_h%j(m) |
---|
4029 | k = surf_usm_h%k(m) |
---|
4030 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_av(m) |
---|
4031 | ENDDO |
---|
4032 | ELSE |
---|
4033 | l = idsidx |
---|
4034 | DO m = 1, surf_usm_v(l)%ns |
---|
4035 | i = surf_usm_v(l)%i(m) |
---|
4036 | j = surf_usm_v(l)%j(m) |
---|
4037 | k = surf_usm_v(l)%k(m) |
---|
4038 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_av(m) |
---|
4039 | ENDDO |
---|
4040 | ENDIF |
---|
4041 | ENDIF |
---|
4042 | |
---|
4043 | CASE ( 'usm_wghf_window' ) |
---|
4044 | !-- array of heat flux from window ground (land, wall, roof) |
---|
4045 | |
---|
4046 | IF ( av == 0 ) THEN |
---|
4047 | IF ( idsint == iup_u ) THEN |
---|
4048 | DO m = 1, surf_usm_h%ns |
---|
4049 | i = surf_usm_h%i(m) |
---|
4050 | j = surf_usm_h%j(m) |
---|
4051 | k = surf_usm_h%k(m) |
---|
4052 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window(m) |
---|
4053 | ENDDO |
---|
4054 | ELSE |
---|
4055 | l = idsidx |
---|
4056 | DO m = 1, surf_usm_v(l)%ns |
---|
4057 | i = surf_usm_v(l)%i(m) |
---|
4058 | j = surf_usm_v(l)%j(m) |
---|
4059 | k = surf_usm_v(l)%k(m) |
---|
4060 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window(m) |
---|
4061 | ENDDO |
---|
4062 | ENDIF |
---|
4063 | ELSE |
---|
4064 | IF ( idsint == iup_u ) THEN |
---|
4065 | DO m = 1, surf_usm_h%ns |
---|
4066 | i = surf_usm_h%i(m) |
---|
4067 | j = surf_usm_h%j(m) |
---|
4068 | k = surf_usm_h%k(m) |
---|
4069 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window_av(m) |
---|
4070 | ENDDO |
---|
4071 | ELSE |
---|
4072 | l = idsidx |
---|
4073 | DO m = 1, surf_usm_v(l)%ns |
---|
4074 | i = surf_usm_v(l)%i(m) |
---|
4075 | j = surf_usm_v(l)%j(m) |
---|
4076 | k = surf_usm_v(l)%k(m) |
---|
4077 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window_av(m) |
---|
4078 | ENDDO |
---|
4079 | ENDIF |
---|
4080 | ENDIF |
---|
4081 | |
---|
4082 | CASE ( 'usm_wghf_green' ) |
---|
4083 | !-- array of heat flux from green ground (land, wall, roof) |
---|
4084 | |
---|
4085 | IF ( av == 0 ) THEN |
---|
4086 | IF ( idsint == iup_u ) THEN |
---|
4087 | DO m = 1, surf_usm_h%ns |
---|
4088 | i = surf_usm_h%i(m) |
---|
4089 | j = surf_usm_h%j(m) |
---|
4090 | k = surf_usm_h%k(m) |
---|
4091 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green(m) |
---|
4092 | ENDDO |
---|
4093 | ELSE |
---|
4094 | l = idsidx |
---|
4095 | DO m = 1, surf_usm_v(l)%ns |
---|
4096 | i = surf_usm_v(l)%i(m) |
---|
4097 | j = surf_usm_v(l)%j(m) |
---|
4098 | k = surf_usm_v(l)%k(m) |
---|
4099 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green(m) |
---|
4100 | ENDDO |
---|
4101 | ENDIF |
---|
4102 | ELSE |
---|
4103 | IF ( idsint == iup_u ) THEN |
---|
4104 | DO m = 1, surf_usm_h%ns |
---|
4105 | i = surf_usm_h%i(m) |
---|
4106 | j = surf_usm_h%j(m) |
---|
4107 | k = surf_usm_h%k(m) |
---|
4108 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green_av(m) |
---|
4109 | ENDDO |
---|
4110 | ELSE |
---|
4111 | l = idsidx |
---|
4112 | DO m = 1, surf_usm_v(l)%ns |
---|
4113 | i = surf_usm_v(l)%i(m) |
---|
4114 | j = surf_usm_v(l)%j(m) |
---|
4115 | k = surf_usm_v(l)%k(m) |
---|
4116 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green_av(m) |
---|
4117 | ENDDO |
---|
4118 | ENDIF |
---|
4119 | ENDIF |
---|
4120 | |
---|
4121 | CASE ( 'usm_iwghf' ) |
---|
4122 | !-- array of heat flux from indoor ground (land, wall, roof) |
---|
4123 | IF ( av == 0 ) THEN |
---|
4124 | IF ( idsint == iup_u ) THEN |
---|
4125 | DO m = 1, surf_usm_h%ns |
---|
4126 | i = surf_usm_h%i(m) |
---|
4127 | j = surf_usm_h%j(m) |
---|
4128 | k = surf_usm_h%k(m) |
---|
4129 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb(m) |
---|
4130 | ENDDO |
---|
4131 | ELSE |
---|
4132 | l = idsidx |
---|
4133 | DO m = 1, surf_usm_v(l)%ns |
---|
4134 | i = surf_usm_v(l)%i(m) |
---|
4135 | j = surf_usm_v(l)%j(m) |
---|
4136 | k = surf_usm_v(l)%k(m) |
---|
4137 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb(m) |
---|
4138 | ENDDO |
---|
4139 | ENDIF |
---|
4140 | ELSE |
---|
4141 | IF ( idsint == iup_u ) THEN |
---|
4142 | DO m = 1, surf_usm_h%ns |
---|
4143 | i = surf_usm_h%i(m) |
---|
4144 | j = surf_usm_h%j(m) |
---|
4145 | k = surf_usm_h%k(m) |
---|
4146 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_av(m) |
---|
4147 | ENDDO |
---|
4148 | ELSE |
---|
4149 | l = idsidx |
---|
4150 | DO m = 1, surf_usm_v(l)%ns |
---|
4151 | i = surf_usm_v(l)%i(m) |
---|
4152 | j = surf_usm_v(l)%j(m) |
---|
4153 | k = surf_usm_v(l)%k(m) |
---|
4154 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_av(m) |
---|
4155 | ENDDO |
---|
4156 | ENDIF |
---|
4157 | ENDIF |
---|
4158 | |
---|
4159 | CASE ( 'usm_iwghf_window' ) |
---|
4160 | !-- array of heat flux from indoor window ground (land, wall, roof) |
---|
4161 | |
---|
4162 | IF ( av == 0 ) THEN |
---|
4163 | IF ( idsint == iup_u ) THEN |
---|
4164 | DO m = 1, surf_usm_h%ns |
---|
4165 | i = surf_usm_h%i(m) |
---|
4166 | j = surf_usm_h%j(m) |
---|
4167 | k = surf_usm_h%k(m) |
---|
4168 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window(m) |
---|
4169 | ENDDO |
---|
4170 | ELSE |
---|
4171 | l = idsidx |
---|
4172 | DO m = 1, surf_usm_v(l)%ns |
---|
4173 | i = surf_usm_v(l)%i(m) |
---|
4174 | j = surf_usm_v(l)%j(m) |
---|
4175 | k = surf_usm_v(l)%k(m) |
---|
4176 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window(m) |
---|
4177 | ENDDO |
---|
4178 | ENDIF |
---|
4179 | ELSE |
---|
4180 | IF ( idsint == iup_u ) THEN |
---|
4181 | DO m = 1, surf_usm_h%ns |
---|
4182 | i = surf_usm_h%i(m) |
---|
4183 | j = surf_usm_h%j(m) |
---|
4184 | k = surf_usm_h%k(m) |
---|
4185 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window_av(m) |
---|
4186 | ENDDO |
---|
4187 | ELSE |
---|
4188 | l = idsidx |
---|
4189 | DO m = 1, surf_usm_v(l)%ns |
---|
4190 | i = surf_usm_v(l)%i(m) |
---|
4191 | j = surf_usm_v(l)%j(m) |
---|
4192 | k = surf_usm_v(l)%k(m) |
---|
4193 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window_av(m) |
---|
4194 | ENDDO |
---|
4195 | ENDIF |
---|
4196 | ENDIF |
---|
4197 | |
---|
4198 | CASE ( 'usm_t_surf_wall' ) |
---|
4199 | !-- surface temperature for surfaces |
---|
4200 | IF ( av == 0 ) THEN |
---|
4201 | IF ( idsint == iup_u ) THEN |
---|
4202 | DO m = 1, surf_usm_h%ns |
---|
4203 | i = surf_usm_h%i(m) |
---|
4204 | j = surf_usm_h%j(m) |
---|
4205 | k = surf_usm_h%k(m) |
---|
4206 | temp_pf(k,j,i) = t_surf_wall_h(m) |
---|
4207 | ENDDO |
---|
4208 | ELSE |
---|
4209 | l = idsidx |
---|
4210 | DO m = 1, surf_usm_v(l)%ns |
---|
4211 | i = surf_usm_v(l)%i(m) |
---|
4212 | j = surf_usm_v(l)%j(m) |
---|
4213 | k = surf_usm_v(l)%k(m) |
---|
4214 | temp_pf(k,j,i) = t_surf_wall_v(l)%t(m) |
---|
4215 | ENDDO |
---|
4216 | ENDIF |
---|
4217 | ELSE |
---|
4218 | IF ( idsint == iup_u ) THEN |
---|
4219 | DO m = 1, surf_usm_h%ns |
---|
4220 | i = surf_usm_h%i(m) |
---|
4221 | j = surf_usm_h%j(m) |
---|
4222 | k = surf_usm_h%k(m) |
---|
4223 | temp_pf(k,j,i) = surf_usm_h%t_surf_wall_av(m) |
---|
4224 | ENDDO |
---|
4225 | ELSE |
---|
4226 | l = idsidx |
---|
4227 | DO m = 1, surf_usm_v(l)%ns |
---|
4228 | i = surf_usm_v(l)%i(m) |
---|
4229 | j = surf_usm_v(l)%j(m) |
---|
4230 | k = surf_usm_v(l)%k(m) |
---|
4231 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_wall_av(m) |
---|
4232 | ENDDO |
---|
4233 | ENDIF |
---|
4234 | ENDIF |
---|
4235 | |
---|
4236 | CASE ( 'usm_t_surf_window' ) |
---|
4237 | !-- surface temperature for window surfaces |
---|
4238 | |
---|
4239 | IF ( av == 0 ) THEN |
---|
4240 | IF ( idsint == iup_u ) THEN |
---|
4241 | DO m = 1, surf_usm_h%ns |
---|
4242 | i = surf_usm_h%i(m) |
---|
4243 | j = surf_usm_h%j(m) |
---|
4244 | k = surf_usm_h%k(m) |
---|
4245 | temp_pf(k,j,i) = t_surf_window_h(m) |
---|
4246 | ENDDO |
---|
4247 | ELSE |
---|
4248 | l = idsidx |
---|
4249 | DO m = 1, surf_usm_v(l)%ns |
---|
4250 | i = surf_usm_v(l)%i(m) |
---|
4251 | j = surf_usm_v(l)%j(m) |
---|
4252 | k = surf_usm_v(l)%k(m) |
---|
4253 | temp_pf(k,j,i) = t_surf_window_v(l)%t(m) |
---|
4254 | ENDDO |
---|
4255 | ENDIF |
---|
4256 | |
---|
4257 | ELSE |
---|
4258 | IF ( idsint == iup_u ) THEN |
---|
4259 | DO m = 1, surf_usm_h%ns |
---|
4260 | i = surf_usm_h%i(m) |
---|
4261 | j = surf_usm_h%j(m) |
---|
4262 | k = surf_usm_h%k(m) |
---|
4263 | temp_pf(k,j,i) = surf_usm_h%t_surf_window_av(m) |
---|
4264 | ENDDO |
---|
4265 | ELSE |
---|
4266 | l = idsidx |
---|
4267 | DO m = 1, surf_usm_v(l)%ns |
---|
4268 | i = surf_usm_v(l)%i(m) |
---|
4269 | j = surf_usm_v(l)%j(m) |
---|
4270 | k = surf_usm_v(l)%k(m) |
---|
4271 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_window_av(m) |
---|
4272 | ENDDO |
---|
4273 | |
---|
4274 | ENDIF |
---|
4275 | |
---|
4276 | ENDIF |
---|
4277 | |
---|
4278 | CASE ( 'usm_t_surf_green' ) |
---|
4279 | !-- surface temperature for green surfaces |
---|
4280 | |
---|
4281 | IF ( av == 0 ) THEN |
---|
4282 | IF ( idsint == iup_u ) THEN |
---|
4283 | DO m = 1, surf_usm_h%ns |
---|
4284 | i = surf_usm_h%i(m) |
---|
4285 | j = surf_usm_h%j(m) |
---|
4286 | k = surf_usm_h%k(m) |
---|
4287 | temp_pf(k,j,i) = t_surf_green_h(m) |
---|
4288 | ENDDO |
---|
4289 | ELSE |
---|
4290 | l = idsidx |
---|
4291 | DO m = 1, surf_usm_v(l)%ns |
---|
4292 | i = surf_usm_v(l)%i(m) |
---|
4293 | j = surf_usm_v(l)%j(m) |
---|
4294 | k = surf_usm_v(l)%k(m) |
---|
4295 | temp_pf(k,j,i) = t_surf_green_v(l)%t(m) |
---|
4296 | ENDDO |
---|
4297 | ENDIF |
---|
4298 | |
---|
4299 | ELSE |
---|
4300 | IF ( idsint == iup_u ) THEN |
---|
4301 | DO m = 1, surf_usm_h%ns |
---|
4302 | i = surf_usm_h%i(m) |
---|
4303 | j = surf_usm_h%j(m) |
---|
4304 | k = surf_usm_h%k(m) |
---|
4305 | temp_pf(k,j,i) = surf_usm_h%t_surf_green_av(m) |
---|
4306 | ENDDO |
---|
4307 | ELSE |
---|
4308 | l = idsidx |
---|
4309 | DO m = 1, surf_usm_v(l)%ns |
---|
4310 | i = surf_usm_v(l)%i(m) |
---|
4311 | j = surf_usm_v(l)%j(m) |
---|
4312 | k = surf_usm_v(l)%k(m) |
---|
4313 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_green_av(m) |
---|
4314 | ENDDO |
---|
4315 | |
---|
4316 | ENDIF |
---|
4317 | |
---|
4318 | ENDIF |
---|
4319 | |
---|
4320 | CASE ( 'usm_t_surf_10cm' ) |
---|
4321 | !-- near surface temperature for whole surfaces |
---|
4322 | |
---|
4323 | IF ( av == 0 ) THEN |
---|
4324 | IF ( idsint == iup_u ) THEN |
---|
4325 | DO m = 1, surf_usm_h%ns |
---|
4326 | i = surf_usm_h%i(m) |
---|
4327 | j = surf_usm_h%j(m) |
---|
4328 | k = surf_usm_h%k(m) |
---|
4329 | temp_pf(k,j,i) = t_surf_10cm_h(m) |
---|
4330 | ENDDO |
---|
4331 | ELSE |
---|
4332 | l = idsidx |
---|
4333 | DO m = 1, surf_usm_v(l)%ns |
---|
4334 | i = surf_usm_v(l)%i(m) |
---|
4335 | j = surf_usm_v(l)%j(m) |
---|
4336 | k = surf_usm_v(l)%k(m) |
---|
4337 | temp_pf(k,j,i) = t_surf_10cm_v(l)%t(m) |
---|
4338 | ENDDO |
---|
4339 | ENDIF |
---|
4340 | |
---|
4341 | ELSE |
---|
4342 | IF ( idsint == iup_u ) THEN |
---|
4343 | DO m = 1, surf_usm_h%ns |
---|
4344 | i = surf_usm_h%i(m) |
---|
4345 | j = surf_usm_h%j(m) |
---|
4346 | k = surf_usm_h%k(m) |
---|
4347 | temp_pf(k,j,i) = surf_usm_h%t_surf_10cm_av(m) |
---|
4348 | ENDDO |
---|
4349 | ELSE |
---|
4350 | l = idsidx |
---|
4351 | DO m = 1, surf_usm_v(l)%ns |
---|
4352 | i = surf_usm_v(l)%i(m) |
---|
4353 | j = surf_usm_v(l)%j(m) |
---|
4354 | k = surf_usm_v(l)%k(m) |
---|
4355 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_10cm_av(m) |
---|
4356 | ENDDO |
---|
4357 | |
---|
4358 | ENDIF |
---|
4359 | |
---|
4360 | ENDIF |
---|
4361 | |
---|
4362 | |
---|
4363 | CASE ( 'usm_t_wall' ) |
---|
4364 | !-- wall temperature for iwl layer of walls and land |
---|
4365 | IF ( av == 0 ) THEN |
---|
4366 | IF ( idsint == iup_u ) THEN |
---|
4367 | DO m = 1, surf_usm_h%ns |
---|
4368 | i = surf_usm_h%i(m) |
---|
4369 | j = surf_usm_h%j(m) |
---|
4370 | k = surf_usm_h%k(m) |
---|
4371 | temp_pf(k,j,i) = t_wall_h(iwl,m) |
---|
4372 | ENDDO |
---|
4373 | ELSE |
---|
4374 | l = idsidx |
---|
4375 | DO m = 1, surf_usm_v(l)%ns |
---|
4376 | i = surf_usm_v(l)%i(m) |
---|
4377 | j = surf_usm_v(l)%j(m) |
---|
4378 | k = surf_usm_v(l)%k(m) |
---|
4379 | temp_pf(k,j,i) = t_wall_v(l)%t(iwl,m) |
---|
4380 | ENDDO |
---|
4381 | ENDIF |
---|
4382 | ELSE |
---|
4383 | IF ( idsint == iup_u ) THEN |
---|
4384 | DO m = 1, surf_usm_h%ns |
---|
4385 | i = surf_usm_h%i(m) |
---|
4386 | j = surf_usm_h%j(m) |
---|
4387 | k = surf_usm_h%k(m) |
---|
4388 | temp_pf(k,j,i) = surf_usm_h%t_wall_av(iwl,m) |
---|
4389 | ENDDO |
---|
4390 | ELSE |
---|
4391 | l = idsidx |
---|
4392 | DO m = 1, surf_usm_v(l)%ns |
---|
4393 | i = surf_usm_v(l)%i(m) |
---|
4394 | j = surf_usm_v(l)%j(m) |
---|
4395 | k = surf_usm_v(l)%k(m) |
---|
4396 | temp_pf(k,j,i) = surf_usm_v(l)%t_wall_av(iwl,m) |
---|
4397 | ENDDO |
---|
4398 | ENDIF |
---|
4399 | ENDIF |
---|
4400 | |
---|
4401 | CASE ( 'usm_t_window' ) |
---|
4402 | !-- window temperature for iwl layer of walls and land |
---|
4403 | IF ( av == 0 ) THEN |
---|
4404 | IF ( idsint == iup_u ) THEN |
---|
4405 | DO m = 1, surf_usm_h%ns |
---|
4406 | i = surf_usm_h%i(m) |
---|
4407 | j = surf_usm_h%j(m) |
---|
4408 | k = surf_usm_h%k(m) |
---|
4409 | temp_pf(k,j,i) = t_window_h(iwl,m) |
---|
4410 | ENDDO |
---|
4411 | ELSE |
---|
4412 | l = idsidx |
---|
4413 | DO m = 1, surf_usm_v(l)%ns |
---|
4414 | i = surf_usm_v(l)%i(m) |
---|
4415 | j = surf_usm_v(l)%j(m) |
---|
4416 | k = surf_usm_v(l)%k(m) |
---|
4417 | temp_pf(k,j,i) = t_window_v(l)%t(iwl,m) |
---|
4418 | ENDDO |
---|
4419 | ENDIF |
---|
4420 | ELSE |
---|
4421 | IF ( idsint == iup_u ) THEN |
---|
4422 | DO m = 1, surf_usm_h%ns |
---|
4423 | i = surf_usm_h%i(m) |
---|
4424 | j = surf_usm_h%j(m) |
---|
4425 | k = surf_usm_h%k(m) |
---|
4426 | temp_pf(k,j,i) = surf_usm_h%t_window_av(iwl,m) |
---|
4427 | ENDDO |
---|
4428 | ELSE |
---|
4429 | l = idsidx |
---|
4430 | DO m = 1, surf_usm_v(l)%ns |
---|
4431 | i = surf_usm_v(l)%i(m) |
---|
4432 | j = surf_usm_v(l)%j(m) |
---|
4433 | k = surf_usm_v(l)%k(m) |
---|
4434 | temp_pf(k,j,i) = surf_usm_v(l)%t_window_av(iwl,m) |
---|
4435 | ENDDO |
---|
4436 | ENDIF |
---|
4437 | ENDIF |
---|
4438 | |
---|
4439 | CASE ( 'usm_t_green' ) |
---|
4440 | !-- green temperature for iwl layer of walls and land |
---|
4441 | IF ( av == 0 ) THEN |
---|
4442 | IF ( idsint == iup_u ) THEN |
---|
4443 | DO m = 1, surf_usm_h%ns |
---|
4444 | i = surf_usm_h%i(m) |
---|
4445 | j = surf_usm_h%j(m) |
---|
4446 | k = surf_usm_h%k(m) |
---|
4447 | temp_pf(k,j,i) = t_green_h(iwl,m) |
---|
4448 | ENDDO |
---|
4449 | ELSE |
---|
4450 | l = idsidx |
---|
4451 | DO m = 1, surf_usm_v(l)%ns |
---|
4452 | i = surf_usm_v(l)%i(m) |
---|
4453 | j = surf_usm_v(l)%j(m) |
---|
4454 | k = surf_usm_v(l)%k(m) |
---|
4455 | temp_pf(k,j,i) = t_green_v(l)%t(iwl,m) |
---|
4456 | ENDDO |
---|
4457 | ENDIF |
---|
4458 | ELSE |
---|
4459 | IF ( idsint == iup_u ) THEN |
---|
4460 | DO m = 1, surf_usm_h%ns |
---|
4461 | i = surf_usm_h%i(m) |
---|
4462 | j = surf_usm_h%j(m) |
---|
4463 | k = surf_usm_h%k(m) |
---|
4464 | temp_pf(k,j,i) = surf_usm_h%t_green_av(iwl,m) |
---|
4465 | ENDDO |
---|
4466 | ELSE |
---|
4467 | l = idsidx |
---|
4468 | DO m = 1, surf_usm_v(l)%ns |
---|
4469 | i = surf_usm_v(l)%i(m) |
---|
4470 | j = surf_usm_v(l)%j(m) |
---|
4471 | k = surf_usm_v(l)%k(m) |
---|
4472 | temp_pf(k,j,i) = surf_usm_v(l)%t_green_av(iwl,m) |
---|
4473 | ENDDO |
---|
4474 | ENDIF |
---|
4475 | ENDIF |
---|
4476 | |
---|
4477 | CASE ( 'usm_swc' ) |
---|
4478 | !-- soil water content for iwl layer of walls and land |
---|
4479 | IF ( av == 0 ) THEN |
---|
4480 | IF ( idsint == iup_u ) THEN |
---|
4481 | DO m = 1, surf_usm_h%ns |
---|
4482 | i = surf_usm_h%i(m) |
---|
4483 | j = surf_usm_h%j(m) |
---|
4484 | k = surf_usm_h%k(m) |
---|
4485 | temp_pf(k,j,i) = swc_h(iwl,m) |
---|
4486 | ENDDO |
---|
4487 | ELSE |
---|
4488 | l = idsidx |
---|
4489 | DO m = 1, surf_usm_v(l)%ns |
---|
4490 | i = surf_usm_v(l)%i(m) |
---|
4491 | j = surf_usm_v(l)%j(m) |
---|
4492 | k = surf_usm_v(l)%k(m) |
---|
4493 | temp_pf(k,j,i) = swc_v(l)%t(iwl,m) |
---|
4494 | ENDDO |
---|
4495 | ENDIF |
---|
4496 | ELSE |
---|
4497 | IF ( idsint == iup_u ) THEN |
---|
4498 | DO m = 1, surf_usm_h%ns |
---|
4499 | i = surf_usm_h%i(m) |
---|
4500 | j = surf_usm_h%j(m) |
---|
4501 | k = surf_usm_h%k(m) |
---|
4502 | temp_pf(k,j,i) = surf_usm_h%swc_av(iwl,m) |
---|
4503 | ENDDO |
---|
4504 | ELSE |
---|
4505 | l = idsidx |
---|
4506 | DO m = 1, surf_usm_v(l)%ns |
---|
4507 | i = surf_usm_v(l)%i(m) |
---|
4508 | j = surf_usm_v(l)%j(m) |
---|
4509 | k = surf_usm_v(l)%k(m) |
---|
4510 | temp_pf(k,j,i) = surf_usm_v(l)%swc_av(iwl,m) |
---|
4511 | ENDDO |
---|
4512 | ENDIF |
---|
4513 | ENDIF |
---|
4514 | |
---|
4515 | |
---|
4516 | CASE DEFAULT |
---|
4517 | found = .FALSE. |
---|
4518 | RETURN |
---|
4519 | END SELECT |
---|
4520 | |
---|
4521 | ! |
---|
4522 | !-- Rearrange dimensions for NetCDF output |
---|
4523 | !-- FIXME: this may generate FPE overflow upon conversion from DP to SP |
---|
4524 | DO j = nys, nyn |
---|
4525 | DO i = nxl, nxr |
---|
4526 | DO k = nzb_do, nzt_do |
---|
4527 | local_pf(i,j,k) = temp_pf(k,j,i) |
---|
4528 | ENDDO |
---|
4529 | ENDDO |
---|
4530 | ENDDO |
---|
4531 | |
---|
4532 | END SUBROUTINE usm_data_output_3d |
---|
4533 | |
---|
4534 | |
---|
4535 | !------------------------------------------------------------------------------! |
---|
4536 | ! |
---|
4537 | ! Description: |
---|
4538 | ! ------------ |
---|
4539 | !> Soubroutine defines appropriate grid for netcdf variables. |
---|
4540 | !> It is called out from subroutine netcdf. |
---|
4541 | !------------------------------------------------------------------------------! |
---|
4542 | SUBROUTINE usm_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) |
---|
4543 | |
---|
4544 | IMPLICIT NONE |
---|
4545 | |
---|
4546 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
4547 | LOGICAL, INTENT(OUT) :: found !< |
---|
4548 | CHARACTER (len=*), INTENT(OUT) :: grid_x !< |
---|
4549 | CHARACTER (len=*), INTENT(OUT) :: grid_y !< |
---|
4550 | CHARACTER (len=*), INTENT(OUT) :: grid_z !< |
---|
4551 | |
---|
4552 | CHARACTER (len=varnamelength) :: var |
---|
4553 | |
---|
4554 | var = TRIM(variable) |
---|
4555 | IF ( var(1:12) == 'usm_rad_net_' .OR. var(1:13) == 'usm_rad_insw_' .OR. & |
---|
4556 | var(1:13) == 'usm_rad_inlw_' .OR. var(1:16) == 'usm_rad_inswdir_' .OR. & |
---|
4557 | var(1:16) == 'usm_rad_inswdif_' .OR. var(1:16) == 'usm_rad_inswref_' .OR. & |
---|
4558 | var(1:16) == 'usm_rad_inlwdif_' .OR. var(1:16) == 'usm_rad_inlwref_' .OR. & |
---|
4559 | var(1:14) == 'usm_rad_outsw_' .OR. var(1:14) == 'usm_rad_outlw_' .OR. & |
---|
4560 | var(1:14) == 'usm_rad_ressw_' .OR. var(1:14) == 'usm_rad_reslw_' .OR. & |
---|
4561 | var(1:11) == 'usm_rad_hf_' .OR. var == 'usm_rad_pc_inlw' .OR. & |
---|
4562 | var == 'usm_rad_pc_insw' .OR. var == 'usm_rad_pc_inswdir' .OR. & |
---|
4563 | var == 'usm_rad_pc_inswdif' .OR. var == 'usm_rad_pc_inswref' .OR. & |
---|
4564 | var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
4565 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
4566 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
4567 | var(1:9) == 'usm_qsws_' .OR. var(1:13) == 'usm_qsws_veg_' .OR. & |
---|
4568 | var(1:13) == 'usm_qsws_liq_' .OR. & |
---|
4569 | var(1:15) == 'usm_t_surf_wall' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
4570 | var(1:17) == 'usm_t_surf_window' .OR. var(1:12) == 'usm_t_window' .OR. & |
---|
4571 | var(1:16) == 'usm_t_surf_green' .OR. var(1:11) == 'usm_t_green' .OR. & |
---|
4572 | var(1:15) == 'usm_t_surf_10cm' .OR. & |
---|
4573 | var(1:9) == 'usm_surfz' .OR. var(1:7) == 'usm_svf' .OR. & |
---|
4574 | var(1:7) == 'usm_dif' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
4575 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
4576 | var(1:16) == 'usm_surfwintrans' .OR. var(1:7) == 'usm_swc' .OR. & |
---|
4577 | var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' ) THEN |
---|
4578 | |
---|
4579 | found = .TRUE. |
---|
4580 | grid_x = 'x' |
---|
4581 | grid_y = 'y' |
---|
4582 | grid_z = 'zu' |
---|
4583 | ELSE |
---|
4584 | found = .FALSE. |
---|
4585 | grid_x = 'none' |
---|
4586 | grid_y = 'none' |
---|
4587 | grid_z = 'none' |
---|
4588 | ENDIF |
---|
4589 | |
---|
4590 | END SUBROUTINE usm_define_netcdf_grid |
---|
4591 | |
---|
4592 | |
---|
4593 | !------------------------------------------------------------------------------! |
---|
4594 | ! Description: |
---|
4595 | ! ------------ |
---|
4596 | !> Initialization of the wall surface model |
---|
4597 | !------------------------------------------------------------------------------! |
---|
4598 | SUBROUTINE usm_init_material_model |
---|
4599 | |
---|
4600 | IMPLICIT NONE |
---|
4601 | |
---|
4602 | INTEGER(iwp) :: k, l, m !< running indices |
---|
4603 | |
---|
4604 | CALL location_message( ' initialization of wall surface model', .TRUE. ) |
---|
4605 | |
---|
4606 | !-- Calculate wall grid spacings. |
---|
4607 | !-- Temperature is defined at the center of the wall layers, |
---|
4608 | !-- whereas gradients/fluxes are defined at the edges (_stag) |
---|
4609 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
4610 | DO m = 1, surf_usm_h%ns |
---|
4611 | |
---|
4612 | surf_usm_h%dz_wall(nzb_wall,m) = surf_usm_h%zw(nzb_wall,m) |
---|
4613 | DO k = nzb_wall+1, nzt_wall |
---|
4614 | surf_usm_h%dz_wall(k,m) = surf_usm_h%zw(k,m) - & |
---|
4615 | surf_usm_h%zw(k-1,m) |
---|
4616 | ENDDO |
---|
4617 | surf_usm_h%dz_window(nzb_wall,m) = surf_usm_h%zw_window(nzb_wall,m) |
---|
4618 | DO k = nzb_wall+1, nzt_wall |
---|
4619 | surf_usm_h%dz_window(k,m) = surf_usm_h%zw_window(k,m) - & |
---|
4620 | surf_usm_h%zw_window(k-1,m) |
---|
4621 | ENDDO |
---|
4622 | ! surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
4623 | ! DO k = nzb_wall+1, nzt_wall |
---|
4624 | ! surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
4625 | ! surf_usm_h%zw_green(k-1,m) |
---|
4626 | ! ENDDO |
---|
4627 | |
---|
4628 | surf_usm_h%dz_wall(nzt_wall+1,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
4629 | |
---|
4630 | DO k = nzb_wall, nzt_wall-1 |
---|
4631 | surf_usm_h%dz_wall_stag(k,m) = 0.5 * ( & |
---|
4632 | surf_usm_h%dz_wall(k+1,m) + surf_usm_h%dz_wall(k,m) ) |
---|
4633 | ENDDO |
---|
4634 | surf_usm_h%dz_wall_stag(nzt_wall,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
4635 | |
---|
4636 | surf_usm_h%dz_window(nzt_wall+1,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
4637 | |
---|
4638 | DO k = nzb_wall, nzt_wall-1 |
---|
4639 | surf_usm_h%dz_window_stag(k,m) = 0.5 * ( & |
---|
4640 | surf_usm_h%dz_window(k+1,m) + surf_usm_h%dz_window(k,m) ) |
---|
4641 | ENDDO |
---|
4642 | surf_usm_h%dz_window_stag(nzt_wall,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
4643 | |
---|
4644 | ! surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
4645 | ! |
---|
4646 | ! DO k = nzb_wall, nzt_wall-1 |
---|
4647 | ! surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
4648 | ! surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
4649 | ! ENDDO |
---|
4650 | ! surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
4651 | !------------- |
---|
4652 | IF (surf_usm_h%green_type_roof(m) == 2.0_wp ) then |
---|
4653 | soil_type = 3 !extensiv green roof |
---|
4654 | surf_usm_h%lai(m) = 2.0_wp |
---|
4655 | |
---|
4656 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
4657 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
4658 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.15_wp |
---|
4659 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.20_wp |
---|
4660 | ELSE |
---|
4661 | soil_type = 6 !intensiv green roof |
---|
4662 | surf_usm_h%lai(m) = 4.0_wp |
---|
4663 | |
---|
4664 | surf_usm_h%zw_green(nzb_wall,m) = 0.05_wp |
---|
4665 | surf_usm_h%zw_green(nzb_wall+1,m) = 0.10_wp |
---|
4666 | surf_usm_h%zw_green(nzb_wall+2,m) = 0.40_wp |
---|
4667 | surf_usm_h%zw_green(nzb_wall+3,m) = 0.80_wp |
---|
4668 | ENDIF |
---|
4669 | |
---|
4670 | surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
4671 | DO k = nzb_wall+1, nzt_wall |
---|
4672 | surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
4673 | surf_usm_h%zw_green(k-1,m) |
---|
4674 | ENDDO |
---|
4675 | surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
4676 | |
---|
4677 | DO k = nzb_wall, nzt_wall-1 |
---|
4678 | surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
4679 | surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
4680 | ENDDO |
---|
4681 | surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
4682 | |
---|
4683 | IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
4684 | alpha_vangenuchten = soil_pars(0,soil_type) |
---|
4685 | ENDIF |
---|
4686 | |
---|
4687 | IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
4688 | l_vangenuchten = soil_pars(1,soil_type) |
---|
4689 | ENDIF |
---|
4690 | |
---|
4691 | IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
4692 | n_vangenuchten = soil_pars(2,soil_type) |
---|
4693 | ENDIF |
---|
4694 | |
---|
4695 | IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
4696 | hydraulic_conductivity = soil_pars(3,soil_type) |
---|
4697 | ENDIF |
---|
4698 | |
---|
4699 | IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
4700 | saturation_moisture = m_soil_pars(0,soil_type) |
---|
4701 | ENDIF |
---|
4702 | |
---|
4703 | IF ( field_capacity == 9999999.9_wp ) THEN |
---|
4704 | field_capacity = m_soil_pars(1,soil_type) |
---|
4705 | ENDIF |
---|
4706 | |
---|
4707 | IF ( wilting_point == 9999999.9_wp ) THEN |
---|
4708 | wilting_point = m_soil_pars(2,soil_type) |
---|
4709 | ENDIF |
---|
4710 | |
---|
4711 | IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
4712 | residual_moisture = m_soil_pars(3,soil_type) |
---|
4713 | ENDIF |
---|
4714 | |
---|
4715 | DO k = nzb_wall, nzt_wall+1 |
---|
4716 | swc_h(k,m) = field_capacity |
---|
4717 | rootfr_h(k,m) = 0.5_wp |
---|
4718 | surf_usm_h%alpha_vg_green(m) = alpha_vangenuchten |
---|
4719 | surf_usm_h%l_vg_green(m) = l_vangenuchten |
---|
4720 | surf_usm_h%n_vg_green(m) = n_vangenuchten |
---|
4721 | surf_usm_h%gamma_w_green_sat(k,m) = hydraulic_conductivity |
---|
4722 | swc_sat_h(k,m) = saturation_moisture |
---|
4723 | fc_h(k,m) = field_capacity |
---|
4724 | wilt_h(k,m) = wilting_point |
---|
4725 | swc_res_h(k,m) = residual_moisture |
---|
4726 | ENDDO |
---|
4727 | !------------------------------- |
---|
4728 | ENDDO |
---|
4729 | surf_usm_h%ddz_wall = 1.0_wp / surf_usm_h%dz_wall |
---|
4730 | surf_usm_h%ddz_wall_stag = 1.0_wp / surf_usm_h%dz_wall_stag |
---|
4731 | surf_usm_h%ddz_window = 1.0_wp / surf_usm_h%dz_window |
---|
4732 | surf_usm_h%ddz_window_stag = 1.0_wp / surf_usm_h%dz_window_stag |
---|
4733 | surf_usm_h%ddz_green = 1.0_wp / surf_usm_h%dz_green |
---|
4734 | surf_usm_h%ddz_green_stag = 1.0_wp / surf_usm_h%dz_green_stag |
---|
4735 | ! |
---|
4736 | !-- For vertical surfaces |
---|
4737 | DO l = 0, 3 |
---|
4738 | DO m = 1, surf_usm_v(l)%ns |
---|
4739 | surf_usm_v(l)%dz_wall(nzb_wall,m) = surf_usm_v(l)%zw(nzb_wall,m) |
---|
4740 | DO k = nzb_wall+1, nzt_wall |
---|
4741 | surf_usm_v(l)%dz_wall(k,m) = surf_usm_v(l)%zw(k,m) - & |
---|
4742 | surf_usm_v(l)%zw(k-1,m) |
---|
4743 | ENDDO |
---|
4744 | surf_usm_v(l)%dz_window(nzb_wall,m) = surf_usm_v(l)%zw_window(nzb_wall,m) |
---|
4745 | DO k = nzb_wall+1, nzt_wall |
---|
4746 | surf_usm_v(l)%dz_window(k,m) = surf_usm_v(l)%zw_window(k,m) - & |
---|
4747 | surf_usm_v(l)%zw_window(k-1,m) |
---|
4748 | ENDDO |
---|
4749 | surf_usm_v(l)%dz_green(nzb_wall,m) = surf_usm_v(l)%zw_green(nzb_wall,m) |
---|
4750 | DO k = nzb_wall+1, nzt_wall |
---|
4751 | surf_usm_v(l)%dz_green(k,m) = surf_usm_v(l)%zw_green(k,m) - & |
---|
4752 | surf_usm_v(l)%zw_green(k-1,m) |
---|
4753 | ENDDO |
---|
4754 | |
---|
4755 | surf_usm_v(l)%dz_wall(nzt_wall+1,m) = & |
---|
4756 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
4757 | |
---|
4758 | DO k = nzb_wall, nzt_wall-1 |
---|
4759 | surf_usm_v(l)%dz_wall_stag(k,m) = 0.5 * ( & |
---|
4760 | surf_usm_v(l)%dz_wall(k+1,m) + & |
---|
4761 | surf_usm_v(l)%dz_wall(k,m) ) |
---|
4762 | ENDDO |
---|
4763 | surf_usm_v(l)%dz_wall_stag(nzt_wall,m) = & |
---|
4764 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
4765 | surf_usm_v(l)%dz_window(nzt_wall+1,m) = & |
---|
4766 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
4767 | |
---|
4768 | DO k = nzb_wall, nzt_wall-1 |
---|
4769 | surf_usm_v(l)%dz_window_stag(k,m) = 0.5 * ( & |
---|
4770 | surf_usm_v(l)%dz_window(k+1,m) + & |
---|
4771 | surf_usm_v(l)%dz_window(k,m) ) |
---|
4772 | ENDDO |
---|
4773 | surf_usm_v(l)%dz_window_stag(nzt_wall,m) = & |
---|
4774 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
4775 | surf_usm_v(l)%dz_green(nzt_wall+1,m) = & |
---|
4776 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
4777 | |
---|
4778 | DO k = nzb_wall, nzt_wall-1 |
---|
4779 | surf_usm_v(l)%dz_green_stag(k,m) = 0.5 * ( & |
---|
4780 | surf_usm_v(l)%dz_green(k+1,m) + & |
---|
4781 | surf_usm_v(l)%dz_green(k,m) ) |
---|
4782 | ENDDO |
---|
4783 | surf_usm_v(l)%dz_green_stag(nzt_wall,m) = & |
---|
4784 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
4785 | ENDDO |
---|
4786 | surf_usm_v(l)%ddz_wall = 1.0_wp / surf_usm_v(l)%dz_wall |
---|
4787 | surf_usm_v(l)%ddz_wall_stag = 1.0_wp / surf_usm_v(l)%dz_wall_stag |
---|
4788 | surf_usm_v(l)%ddz_window = 1.0_wp / surf_usm_v(l)%dz_window |
---|
4789 | surf_usm_v(l)%ddz_window_stag = 1.0_wp / surf_usm_v(l)%dz_window_stag |
---|
4790 | surf_usm_v(l)%ddz_green = 1.0_wp / surf_usm_v(l)%dz_green |
---|
4791 | surf_usm_v(l)%ddz_green_stag = 1.0_wp / surf_usm_v(l)%dz_green_stag |
---|
4792 | ENDDO |
---|
4793 | |
---|
4794 | |
---|
4795 | ! soil_type = 6 |
---|
4796 | ! !-- Initialize standard soil types. It is possible to overwrite each |
---|
4797 | ! !-- parameter by setting the respecticy NAMELIST variable to a |
---|
4798 | ! !-- value /= 9999999.9. |
---|
4799 | ! IF ( soil_type /= 0 ) THEN |
---|
4800 | ! |
---|
4801 | ! IF ( alpha_vangenuchten == 9999999.9_wp ) THEN |
---|
4802 | ! alpha_vangenuchten = soil_pars(0,soil_type) |
---|
4803 | ! ENDIF |
---|
4804 | ! |
---|
4805 | ! IF ( l_vangenuchten == 9999999.9_wp ) THEN |
---|
4806 | ! l_vangenuchten = soil_pars(1,soil_type) |
---|
4807 | ! ENDIF |
---|
4808 | ! |
---|
4809 | ! IF ( n_vangenuchten == 9999999.9_wp ) THEN |
---|
4810 | ! n_vangenuchten = soil_pars(2,soil_type) |
---|
4811 | ! ENDIF |
---|
4812 | ! |
---|
4813 | ! IF ( hydraulic_conductivity == 9999999.9_wp ) THEN |
---|
4814 | ! hydraulic_conductivity = soil_pars(3,soil_type) |
---|
4815 | ! ENDIF |
---|
4816 | ! |
---|
4817 | ! IF ( saturation_moisture == 9999999.9_wp ) THEN |
---|
4818 | ! saturation_moisture = m_soil_pars(0,soil_type) |
---|
4819 | ! ENDIF |
---|
4820 | ! |
---|
4821 | ! IF ( field_capacity == 9999999.9_wp ) THEN |
---|
4822 | ! field_capacity = m_soil_pars(1,soil_type) |
---|
4823 | ! ENDIF |
---|
4824 | ! |
---|
4825 | ! IF ( wilting_point == 9999999.9_wp ) THEN |
---|
4826 | ! wilting_point = m_soil_pars(2,soil_type) |
---|
4827 | ! ENDIF |
---|
4828 | ! |
---|
4829 | ! IF ( residual_moisture == 9999999.9_wp ) THEN |
---|
4830 | ! residual_moisture = m_soil_pars(3,soil_type) |
---|
4831 | ! ENDIF |
---|
4832 | ! |
---|
4833 | ! DO m = 1, surf_usm_h%ns |
---|
4834 | ! DO k = nzb_wall, nzt_wall+1 |
---|
4835 | ! swc_h(k,m) = field_capacity |
---|
4836 | ! rootfr_h(k,m) = 0.5_wp |
---|
4837 | ! ENDDO |
---|
4838 | ! ENDDO |
---|
4839 | ! ! ! |
---|
4840 | ! ! !-- Vertical surfaces |
---|
4841 | ! ! DO l = 0, 3 |
---|
4842 | ! ! DO m = 1, surf_usm_v(l)%ns |
---|
4843 | ! ! DO k = nzb_wall, nzt_wall+1 |
---|
4844 | ! ! swc_v(l)%t(k,m) = 0.5_wp |
---|
4845 | ! ! ENDDO |
---|
4846 | ! ! ENDDO |
---|
4847 | ! ! ENDDO |
---|
4848 | ! |
---|
4849 | ! ENDIF |
---|
4850 | ! |
---|
4851 | ! ! |
---|
4852 | ! !-- Map values to the respective 2D arrays |
---|
4853 | ! surf_usm_h%alpha_vg_green = alpha_vangenuchten |
---|
4854 | ! surf_usm_h%l_vg_green = l_vangenuchten |
---|
4855 | ! surf_usm_h%n_vg_green = n_vangenuchten |
---|
4856 | ! surf_usm_h%gamma_w_green_sat = hydraulic_conductivity |
---|
4857 | ! swc_sat_h = saturation_moisture |
---|
4858 | ! fc_h = field_capacity |
---|
4859 | ! wilt_h = wilting_point |
---|
4860 | ! swc_res_h = residual_moisture |
---|
4861 | ! ! r_soil_min = min_soil_resistance |
---|
4862 | |
---|
4863 | CALL location_message( ' wall structures filed out', .TRUE. ) |
---|
4864 | |
---|
4865 | CALL location_message( ' initialization of wall surface model finished', .TRUE. ) |
---|
4866 | |
---|
4867 | END SUBROUTINE usm_init_material_model |
---|
4868 | |
---|
4869 | |
---|
4870 | !------------------------------------------------------------------------------! |
---|
4871 | ! Description: |
---|
4872 | ! ------------ |
---|
4873 | !> Initialization of the urban surface model |
---|
4874 | !------------------------------------------------------------------------------! |
---|
4875 | SUBROUTINE usm_init_urban_surface |
---|
4876 | |
---|
4877 | USE arrays_3d, & |
---|
4878 | ONLY: zw |
---|
4879 | |
---|
4880 | USE netcdf_data_input_mod, & |
---|
4881 | ONLY: building_pars_f, building_type_f, terrain_height_f |
---|
4882 | |
---|
4883 | IMPLICIT NONE |
---|
4884 | |
---|
4885 | INTEGER(iwp) :: i !< loop index x-dirction |
---|
4886 | INTEGER(iwp) :: ind_alb_green !< index in input list for green albedo |
---|
4887 | INTEGER(iwp) :: ind_alb_wall !< index in input list for wall albedo |
---|
4888 | INTEGER(iwp) :: ind_alb_win !< index in input list for window albedo |
---|
4889 | INTEGER(iwp) :: ind_emis_wall !< index in input list for wall emissivity |
---|
4890 | INTEGER(iwp) :: ind_emis_green !< index in input list for green emissivity |
---|
4891 | INTEGER(iwp) :: ind_emis_win !< index in input list for window emissivity |
---|
4892 | INTEGER(iwp) :: ind_green_frac_w !< index in input list for green fraction on wall |
---|
4893 | INTEGER(iwp) :: ind_green_frac_r !< index in input list for green fraction on roof |
---|
4894 | INTEGER(iwp) :: ind_hc1 !< index in input list for heat capacity at first wall layer |
---|
4895 | INTEGER(iwp) :: ind_hc1_win !< index in input list for heat capacity at first window layer |
---|
4896 | INTEGER(iwp) :: ind_hc2 !< index in input list for heat capacity at second wall layer |
---|
4897 | INTEGER(iwp) :: ind_hc2_win !< index in input list for heat capacity at second window layer |
---|
4898 | INTEGER(iwp) :: ind_hc3 !< index in input list for heat capacity at third wall layer |
---|
4899 | INTEGER(iwp) :: ind_hc3_win !< index in input list for heat capacity at third window layer |
---|
4900 | INTEGER(iwp) :: ind_lai_r !< index in input list for LAI on roof |
---|
4901 | INTEGER(iwp) :: ind_lai_w !< index in input list for LAI on wall |
---|
4902 | INTEGER(iwp) :: ind_tc1 !< index in input list for thermal conductivity at first wall layer |
---|
4903 | INTEGER(iwp) :: ind_tc1_win !< index in input list for thermal conductivity at first window layer |
---|
4904 | INTEGER(iwp) :: ind_tc2 !< index in input list for thermal conductivity at second wall layer |
---|
4905 | INTEGER(iwp) :: ind_tc2_win !< index in input list for thermal conductivity at second window layer |
---|
4906 | INTEGER(iwp) :: ind_tc3 !< index in input list for thermal conductivity at third wall layer |
---|
4907 | INTEGER(iwp) :: ind_tc3_win !< index in input list for thermal conductivity at third window layer |
---|
4908 | INTEGER(iwp) :: ind_thick_1 !< index in input list for thickness of first wall layer |
---|
4909 | INTEGER(iwp) :: ind_thick_1_win !< index in input list for thickness of first window layer |
---|
4910 | INTEGER(iwp) :: ind_thick_2 !< index in input list for thickness of second wall layer |
---|
4911 | INTEGER(iwp) :: ind_thick_2_win !< index in input list for thickness of second window layer |
---|
4912 | INTEGER(iwp) :: ind_thick_3 !< index in input list for thickness of third wall layer |
---|
4913 | INTEGER(iwp) :: ind_thick_3_win !< index in input list for thickness of third window layer |
---|
4914 | INTEGER(iwp) :: ind_thick_4 !< index in input list for thickness of fourth wall layer |
---|
4915 | INTEGER(iwp) :: ind_thick_4_win !< index in input list for thickness of fourth window layer |
---|
4916 | INTEGER(iwp) :: ind_trans !< index in input list for window transmissivity |
---|
4917 | INTEGER(iwp) :: ind_wall_frac !< index in input list for wall fraction |
---|
4918 | INTEGER(iwp) :: ind_win_frac !< index in input list for window fraction |
---|
4919 | INTEGER(iwp) :: ind_z0 !< index in input list for z0 |
---|
4920 | INTEGER(iwp) :: ind_z0qh !< index in input list for z0h / z0q |
---|
4921 | INTEGER(iwp) :: j !< loop index y-dirction |
---|
4922 | INTEGER(iwp) :: k !< loop index z-dirction |
---|
4923 | INTEGER(iwp) :: l !< loop index surface orientation |
---|
4924 | INTEGER(iwp) :: m !< loop index surface element |
---|
4925 | INTEGER(iwp) :: st !< dummy |
---|
4926 | |
---|
4927 | REAL(wp) :: c, d, tin, twin |
---|
4928 | REAL(wp) :: ground_floor_level_l !< local height of ground floor level |
---|
4929 | REAL(wp) :: z_agl !< height above ground |
---|
4930 | |
---|
4931 | ! |
---|
4932 | !-- NOPOINTER version not implemented yet |
---|
4933 | #if defined( __nopointer ) |
---|
4934 | message_string = 'The urban surface module only runs with POINTER version' |
---|
4935 | CALL message( 'urban_surface_mod', 'PA0452', 1, 2, 0, 6, 0 ) |
---|
4936 | #endif |
---|
4937 | |
---|
4938 | CALL cpu_log( log_point_s(78), 'usm_init', 'start' ) |
---|
4939 | !-- surface forcing have to be disabled for LSF |
---|
4940 | !-- in case of enabled urban surface module |
---|
4941 | IF ( large_scale_forcing ) THEN |
---|
4942 | lsf_surf = .FALSE. |
---|
4943 | ENDIF |
---|
4944 | |
---|
4945 | ! |
---|
4946 | !-- Flag surface elements belonging to the ground floor level. Therefore, |
---|
4947 | !-- use terrain height array from file, if available. This flag is later used |
---|
4948 | !-- to control initialization of surface attributes. |
---|
4949 | !-- Todo: for the moment disable initialization of building roofs with |
---|
4950 | !-- ground-floor-level properties. |
---|
4951 | surf_usm_h%ground_level = .FALSE. |
---|
4952 | ! DO m = 1, surf_usm_h%ns |
---|
4953 | ! i = surf_usm_h%i(m) |
---|
4954 | ! j = surf_usm_h%j(m) |
---|
4955 | ! k = surf_usm_h%k(m) |
---|
4956 | ! ! |
---|
4957 | ! !-- Get local ground level. If no ground level is given in input file, |
---|
4958 | ! !-- use default value. |
---|
4959 | ! ground_floor_level_l = ground_floor_level |
---|
4960 | ! IF ( building_pars_f%from_file ) THEN |
---|
4961 | ! IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4962 | ! building_pars_f%fill ) & |
---|
4963 | ! ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4964 | ! ENDIF |
---|
4965 | ! ! |
---|
4966 | ! !-- Determine height of surface element above ground level |
---|
4967 | ! IF ( terrain_height_f%from_file ) THEN |
---|
4968 | ! z_agl = zw(k) - terrain_height_f%var(j,i) |
---|
4969 | ! ELSE |
---|
4970 | ! z_agl = zw(k) |
---|
4971 | ! ENDIF |
---|
4972 | ! ! |
---|
4973 | ! !-- Set flag for ground level |
---|
4974 | ! IF ( z_agl <= ground_floor_level_l ) & |
---|
4975 | ! surf_usm_h%ground_level(m) = .TRUE. |
---|
4976 | ! ENDDO |
---|
4977 | |
---|
4978 | DO l = 0, 3 |
---|
4979 | surf_usm_v(l)%ground_level = .FALSE. |
---|
4980 | DO m = 1, surf_usm_v(l)%ns |
---|
4981 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4982 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4983 | k = surf_usm_v(l)%k(m) |
---|
4984 | ! |
---|
4985 | !-- Get local ground level. If no ground level is given in input file, |
---|
4986 | !-- use default value. |
---|
4987 | ground_floor_level_l = ground_floor_level |
---|
4988 | IF ( building_pars_f%from_file ) THEN |
---|
4989 | IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
4990 | building_pars_f%fill ) & |
---|
4991 | ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
4992 | ENDIF |
---|
4993 | ! |
---|
4994 | !-- Determine height of surface element above ground level. Please |
---|
4995 | !-- note, height of surface element is determined with respect to |
---|
4996 | !-- its height of the adjoing atmospheric grid point. |
---|
4997 | IF ( terrain_height_f%from_file ) THEN |
---|
4998 | z_agl = zw(k) - terrain_height_f%var(j-surf_usm_v(l)%joff, & |
---|
4999 | i-surf_usm_v(l)%ioff) |
---|
5000 | ELSE |
---|
5001 | z_agl = zw(k) |
---|
5002 | ENDIF |
---|
5003 | ! |
---|
5004 | !-- Set flag for ground level |
---|
5005 | IF ( z_agl <= ground_floor_level_l ) & |
---|
5006 | surf_usm_v(l)%ground_level(m) = .TRUE. |
---|
5007 | |
---|
5008 | ENDDO |
---|
5009 | ENDDO |
---|
5010 | ! |
---|
5011 | !-- Initialization of resistances. |
---|
5012 | DO m = 1, surf_usm_h%ns |
---|
5013 | surf_usm_h%r_a(m) = 50.0_wp |
---|
5014 | surf_usm_h%r_a_green(m) = 50.0_wp |
---|
5015 | surf_usm_h%r_a_window(m) = 50.0_wp |
---|
5016 | ENDDO |
---|
5017 | DO l = 0, 3 |
---|
5018 | DO m = 1, surf_usm_v(l)%ns |
---|
5019 | surf_usm_v(l)%r_a(m) = 50.0_wp |
---|
5020 | surf_usm_v(l)%r_a_green(m) = 50.0_wp |
---|
5021 | surf_usm_v(l)%r_a_window(m) = 50.0_wp |
---|
5022 | ENDDO |
---|
5023 | ENDDO |
---|
5024 | |
---|
5025 | !--------------------------------------------------------------------------------------------- |
---|
5026 | ! |
---|
5027 | !-- Map values onto horizontal elemements |
---|
5028 | DO m = 1, surf_usm_h%ns |
---|
5029 | surf_usm_h%r_canopy_min(m) = 200.0_wp !min_canopy_resistance |
---|
5030 | surf_usm_h%g_d(m) = 0.0_wp !canopy_resistance_coefficient |
---|
5031 | ENDDO |
---|
5032 | ! |
---|
5033 | !-- Map values onto vertical elements, even though this does not make |
---|
5034 | !-- much sense. |
---|
5035 | DO l = 0, 3 |
---|
5036 | DO m = 1, surf_usm_v(l)%ns |
---|
5037 | surf_usm_v(l)%r_canopy_min(m) = 200.0_wp !min_canopy_resistance |
---|
5038 | surf_usm_v(l)%g_d(m) = 0.0_wp !canopy_resistance_coefficient |
---|
5039 | ENDDO |
---|
5040 | ENDDO |
---|
5041 | !--------------------------------------------------------------------------------------------- |
---|
5042 | ! |
---|
5043 | ! |
---|
5044 | !-- Initialize urban-type surface attribute. According to initialization in |
---|
5045 | !-- land-surface model, follow a 3-level approach. |
---|
5046 | !-- Level 1 - initialization via default attributes |
---|
5047 | DO m = 1, surf_usm_h%ns |
---|
5048 | ! |
---|
5049 | !-- Now, all horizontal surfaces are roof surfaces (?) |
---|
5050 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
5051 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
5052 | ! |
---|
5053 | !-- In order to distinguish between ground floor level and |
---|
5054 | !-- above-ground-floor level surfaces, set input indices. |
---|
5055 | |
---|
5056 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5057 | surf_usm_h%ground_level(m) ) |
---|
5058 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5059 | surf_usm_h%ground_level(m) ) |
---|
5060 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5061 | surf_usm_h%ground_level(m) ) |
---|
5062 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5063 | surf_usm_h%ground_level(m) ) |
---|
5064 | ! |
---|
5065 | !-- Store building type and its name on each surface element |
---|
5066 | surf_usm_h%building_type(m) = building_type |
---|
5067 | surf_usm_h%building_type_name(m) = building_type_name(building_type) |
---|
5068 | ! |
---|
5069 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5070 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,building_type) |
---|
5071 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,building_type) |
---|
5072 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,building_type) |
---|
5073 | surf_usm_h%lai(m) = building_pars(ind_lai_r,building_type) |
---|
5074 | |
---|
5075 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
5076 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,building_type) |
---|
5077 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,building_type) |
---|
5078 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,building_type) |
---|
5079 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
5080 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,building_type) |
---|
5081 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,building_type) |
---|
5082 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,building_type) |
---|
5083 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
5084 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type) |
---|
5085 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,building_type) |
---|
5086 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,building_type) |
---|
5087 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
5088 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) |
---|
5089 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,building_type) |
---|
5090 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,building_type) |
---|
5091 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,building_type) |
---|
5092 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,building_type) |
---|
5093 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,building_type) |
---|
5094 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,building_type) |
---|
5095 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,building_type) |
---|
5096 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,building_type) |
---|
5097 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,building_type) |
---|
5098 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,building_type) |
---|
5099 | |
---|
5100 | surf_usm_h%target_temp_summer(m) = building_pars(117,building_type) |
---|
5101 | surf_usm_h%target_temp_winter(m) = building_pars(118,building_type) |
---|
5102 | ! |
---|
5103 | !-- emissivity of wall-, green- and window fraction |
---|
5104 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,building_type) |
---|
5105 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,building_type) |
---|
5106 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,building_type) |
---|
5107 | |
---|
5108 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,building_type) |
---|
5109 | |
---|
5110 | surf_usm_h%z0(m) = building_pars(ind_z0,building_type) |
---|
5111 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
5112 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
5113 | ! |
---|
5114 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
5115 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,building_type) ) |
---|
5116 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,building_type) ) |
---|
5117 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,building_type) ) |
---|
5118 | |
---|
5119 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
5120 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
5121 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
5122 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
5123 | |
---|
5124 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,building_type) |
---|
5125 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,building_type) |
---|
5126 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,building_type) |
---|
5127 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,building_type) |
---|
5128 | |
---|
5129 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,building_type) |
---|
5130 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,building_type) |
---|
5131 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,building_type) |
---|
5132 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,building_type) |
---|
5133 | |
---|
5134 | surf_usm_h%c_surface(m) = building_pars(0,building_type) |
---|
5135 | surf_usm_h%lambda_surf(m) = building_pars(3,building_type) |
---|
5136 | surf_usm_h%c_surface_green(m) = building_pars(2,building_type) |
---|
5137 | surf_usm_h%lambda_surf_green(m) = building_pars(5,building_type) |
---|
5138 | surf_usm_h%c_surface_window(m) = building_pars(1,building_type) |
---|
5139 | surf_usm_h%lambda_surf_window(m) = building_pars(4,building_type) |
---|
5140 | |
---|
5141 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,building_type) |
---|
5142 | |
---|
5143 | ENDDO |
---|
5144 | |
---|
5145 | DO l = 0, 3 |
---|
5146 | DO m = 1, surf_usm_v(l)%ns |
---|
5147 | |
---|
5148 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for root surface |
---|
5149 | ! |
---|
5150 | !-- In order to distinguish between ground floor level and |
---|
5151 | !-- above-ground-floor level surfaces, set input indices. |
---|
5152 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
5153 | surf_usm_v(l)%ground_level(m) ) |
---|
5154 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
5155 | surf_usm_v(l)%ground_level(m) ) |
---|
5156 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
5157 | surf_usm_v(l)%ground_level(m) ) |
---|
5158 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
5159 | surf_usm_v(l)%ground_level(m) ) |
---|
5160 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
5161 | surf_usm_v(l)%ground_level(m) ) |
---|
5162 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
5163 | surf_usm_v(l)%ground_level(m) ) |
---|
5164 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5165 | surf_usm_v(l)%ground_level(m) ) |
---|
5166 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5167 | surf_usm_v(l)%ground_level(m) ) |
---|
5168 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
5169 | surf_usm_v(l)%ground_level(m) ) |
---|
5170 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
5171 | surf_usm_v(l)%ground_level(m) ) |
---|
5172 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
5173 | surf_usm_v(l)%ground_level(m) ) |
---|
5174 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
5175 | surf_usm_v(l)%ground_level(m) ) |
---|
5176 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
5177 | surf_usm_v(l)%ground_level(m) ) |
---|
5178 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
5179 | surf_usm_v(l)%ground_level(m) ) |
---|
5180 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
5181 | surf_usm_v(l)%ground_level(m) ) |
---|
5182 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
5183 | surf_usm_v(l)%ground_level(m) ) |
---|
5184 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
5185 | surf_usm_v(l)%ground_level(m) ) |
---|
5186 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
5187 | surf_usm_v(l)%ground_level(m) ) |
---|
5188 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
5189 | surf_usm_v(l)%ground_level(m) ) |
---|
5190 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
5191 | surf_usm_v(l)%ground_level(m) ) |
---|
5192 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
5193 | surf_usm_v(l)%ground_level(m) ) |
---|
5194 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
5195 | surf_usm_v(l)%ground_level(m) ) |
---|
5196 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
5197 | surf_usm_v(l)%ground_level(m) ) |
---|
5198 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
5199 | surf_usm_v(l)%ground_level(m) ) |
---|
5200 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
5201 | surf_usm_v(l)%ground_level(m) ) |
---|
5202 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
5203 | surf_usm_v(l)%ground_level(m) ) |
---|
5204 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
5205 | surf_usm_v(l)%ground_level(m) ) |
---|
5206 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
5207 | surf_usm_v(l)%ground_level(m) ) |
---|
5208 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
5209 | surf_usm_v(l)%ground_level(m) ) |
---|
5210 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
5211 | surf_usm_v(l)%ground_level(m) ) |
---|
5212 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
5213 | surf_usm_v(l)%ground_level(m) ) |
---|
5214 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
5215 | surf_usm_v(l)%ground_level(m) ) |
---|
5216 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
5217 | surf_usm_v(l)%ground_level(m) ) |
---|
5218 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5219 | surf_usm_v(l)%ground_level(m) ) |
---|
5220 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5221 | surf_usm_v(l)%ground_level(m) ) |
---|
5222 | ! |
---|
5223 | !-- Store building type and its name on each surface element |
---|
5224 | surf_usm_v(l)%building_type(m) = building_type |
---|
5225 | surf_usm_v(l)%building_type_name(m) = building_type_name(building_type) |
---|
5226 | ! |
---|
5227 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5228 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,building_type) |
---|
5229 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,building_type) |
---|
5230 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,building_type) |
---|
5231 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,building_type) |
---|
5232 | |
---|
5233 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
5234 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
5235 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
5236 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
5237 | |
---|
5238 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
5239 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,building_type) |
---|
5240 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,building_type) |
---|
5241 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,building_type) |
---|
5242 | |
---|
5243 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,building_type) |
---|
5244 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,building_type) |
---|
5245 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,building_type) |
---|
5246 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,building_type) |
---|
5247 | |
---|
5248 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
5249 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
5250 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
5251 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
5252 | |
---|
5253 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
5254 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) |
---|
5255 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,building_type) |
---|
5256 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,building_type) |
---|
5257 | |
---|
5258 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,building_type) |
---|
5259 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,building_type) |
---|
5260 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,building_type) |
---|
5261 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,building_type) |
---|
5262 | |
---|
5263 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,building_type) |
---|
5264 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,building_type) |
---|
5265 | ! |
---|
5266 | !-- emissivity of wall-, green- and window fraction |
---|
5267 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,building_type) |
---|
5268 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,building_type) |
---|
5269 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,building_type) |
---|
5270 | |
---|
5271 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,building_type) |
---|
5272 | |
---|
5273 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,building_type) |
---|
5274 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
5275 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
5276 | |
---|
5277 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,building_type) ) |
---|
5278 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,building_type) ) |
---|
5279 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,building_type) ) |
---|
5280 | |
---|
5281 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
5282 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
5283 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
5284 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
5285 | |
---|
5286 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
5287 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
5288 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
5289 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
5290 | |
---|
5291 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,building_type) |
---|
5292 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,building_type) |
---|
5293 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,building_type) |
---|
5294 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,building_type) |
---|
5295 | |
---|
5296 | surf_usm_v(l)%c_surface(m) = building_pars(0,building_type) |
---|
5297 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,building_type) |
---|
5298 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,building_type) |
---|
5299 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,building_type) |
---|
5300 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,building_type) |
---|
5301 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,building_type) |
---|
5302 | |
---|
5303 | ENDDO |
---|
5304 | ENDDO |
---|
5305 | ! |
---|
5306 | !-- Level 2 - initialization via building type read from file |
---|
5307 | IF ( building_type_f%from_file ) THEN |
---|
5308 | DO m = 1, surf_usm_h%ns |
---|
5309 | i = surf_usm_h%i(m) |
---|
5310 | j = surf_usm_h%j(m) |
---|
5311 | ! |
---|
5312 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
5313 | st = building_type_f%var(j,i) |
---|
5314 | IF ( st /= building_type_f%fill ) THEN |
---|
5315 | |
---|
5316 | ! |
---|
5317 | !-- In order to distinguish between ground floor level and |
---|
5318 | !-- above-ground-floor level surfaces, set input indices. |
---|
5319 | |
---|
5320 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5321 | surf_usm_h%ground_level(m) ) |
---|
5322 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5323 | surf_usm_h%ground_level(m) ) |
---|
5324 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5325 | surf_usm_h%ground_level(m) ) |
---|
5326 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5327 | surf_usm_h%ground_level(m) ) |
---|
5328 | ! |
---|
5329 | !-- Store building type and its name on each surface element |
---|
5330 | surf_usm_h%building_type(m) = st |
---|
5331 | surf_usm_h%building_type_name(m) = building_type_name(st) |
---|
5332 | ! |
---|
5333 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5334 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac_r,st) |
---|
5335 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,st) |
---|
5336 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac_r,st) |
---|
5337 | surf_usm_h%lai(m) = building_pars(ind_lai_r,st) |
---|
5338 | |
---|
5339 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1_wall_r,st) |
---|
5340 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,st) |
---|
5341 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,st) |
---|
5342 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,st) |
---|
5343 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1_wall_r,st) |
---|
5344 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,st) |
---|
5345 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,st) |
---|
5346 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,st) |
---|
5347 | |
---|
5348 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
5349 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st) |
---|
5350 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,st) |
---|
5351 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,st) |
---|
5352 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
5353 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) |
---|
5354 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,st) |
---|
5355 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,st) |
---|
5356 | |
---|
5357 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win_r,st) |
---|
5358 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,st) |
---|
5359 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,st) |
---|
5360 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,st) |
---|
5361 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win_r,st) |
---|
5362 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,st) |
---|
5363 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,st) |
---|
5364 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,st) |
---|
5365 | |
---|
5366 | surf_usm_h%target_temp_summer(m) = building_pars(117,st) |
---|
5367 | surf_usm_h%target_temp_winter(m) = building_pars(118,st) |
---|
5368 | ! |
---|
5369 | !-- emissivity of wall-, green- and window fraction |
---|
5370 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall_r,st) |
---|
5371 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,st) |
---|
5372 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win_r,st) |
---|
5373 | |
---|
5374 | surf_usm_h%transmissivity(m) = building_pars(ind_trans_r,st) |
---|
5375 | |
---|
5376 | surf_usm_h%z0(m) = building_pars(ind_z0,st) |
---|
5377 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,st) |
---|
5378 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,st) |
---|
5379 | ! |
---|
5380 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
5381 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall_r,st) ) |
---|
5382 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,st) ) |
---|
5383 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win_r,st) ) |
---|
5384 | |
---|
5385 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
5386 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
5387 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
5388 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
5389 | |
---|
5390 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1_wall_r,st) |
---|
5391 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2_wall_r,st) |
---|
5392 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3_wall_r,st) |
---|
5393 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4_wall_r,st) |
---|
5394 | |
---|
5395 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win_r,st) |
---|
5396 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win_r,st) |
---|
5397 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win_r,st) |
---|
5398 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win_r,st) |
---|
5399 | |
---|
5400 | surf_usm_h%c_surface(m) = building_pars(0,st) |
---|
5401 | surf_usm_h%lambda_surf(m) = building_pars(3,st) |
---|
5402 | surf_usm_h%c_surface_green(m) = building_pars(2,st) |
---|
5403 | surf_usm_h%lambda_surf_green(m) = building_pars(5,st) |
---|
5404 | surf_usm_h%c_surface_window(m) = building_pars(1,st) |
---|
5405 | surf_usm_h%lambda_surf_window(m) = building_pars(4,st) |
---|
5406 | |
---|
5407 | surf_usm_h%green_type_roof(m) = building_pars(ind_green_type_roof,st) |
---|
5408 | |
---|
5409 | ENDIF |
---|
5410 | ENDDO |
---|
5411 | |
---|
5412 | DO l = 0, 3 |
---|
5413 | DO m = 1, surf_usm_v(l)%ns |
---|
5414 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
5415 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
5416 | ! |
---|
5417 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
5418 | |
---|
5419 | st = building_type_f%var(j,i) |
---|
5420 | IF ( st /= building_type_f%fill ) THEN |
---|
5421 | |
---|
5422 | ! |
---|
5423 | !-- In order to distinguish between ground floor level and |
---|
5424 | !-- above-ground-floor level surfaces, set input indices. |
---|
5425 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
5426 | surf_usm_v(l)%ground_level(m) ) |
---|
5427 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
5428 | surf_usm_v(l)%ground_level(m) ) |
---|
5429 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
5430 | surf_usm_v(l)%ground_level(m) ) |
---|
5431 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
5432 | surf_usm_v(l)%ground_level(m) ) |
---|
5433 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
5434 | surf_usm_v(l)%ground_level(m) ) |
---|
5435 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
5436 | surf_usm_v(l)%ground_level(m) ) |
---|
5437 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5438 | surf_usm_v(l)%ground_level(m) ) |
---|
5439 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5440 | surf_usm_v(l)%ground_level(m) ) |
---|
5441 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
5442 | surf_usm_v(l)%ground_level(m) ) |
---|
5443 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
5444 | surf_usm_v(l)%ground_level(m) ) |
---|
5445 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
5446 | surf_usm_v(l)%ground_level(m) ) |
---|
5447 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
5448 | surf_usm_v(l)%ground_level(m) ) |
---|
5449 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
5450 | surf_usm_v(l)%ground_level(m) ) |
---|
5451 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
5452 | surf_usm_v(l)%ground_level(m) ) |
---|
5453 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
5454 | surf_usm_v(l)%ground_level(m) ) |
---|
5455 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
5456 | surf_usm_v(l)%ground_level(m) ) |
---|
5457 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
5458 | surf_usm_v(l)%ground_level(m) ) |
---|
5459 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
5460 | surf_usm_v(l)%ground_level(m) ) |
---|
5461 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
5462 | surf_usm_v(l)%ground_level(m) ) |
---|
5463 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
5464 | surf_usm_v(l)%ground_level(m) ) |
---|
5465 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
5466 | surf_usm_v(l)%ground_level(m) ) |
---|
5467 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
5468 | surf_usm_v(l)%ground_level(m) ) |
---|
5469 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
5470 | surf_usm_v(l)%ground_level(m) ) |
---|
5471 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
5472 | surf_usm_v(l)%ground_level(m) ) |
---|
5473 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
5474 | surf_usm_v(l)%ground_level(m) ) |
---|
5475 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
5476 | surf_usm_v(l)%ground_level(m) ) |
---|
5477 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
5478 | surf_usm_v(l)%ground_level(m) ) |
---|
5479 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
5480 | surf_usm_v(l)%ground_level(m) ) |
---|
5481 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
5482 | surf_usm_v(l)%ground_level(m) ) |
---|
5483 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
5484 | surf_usm_v(l)%ground_level(m) ) |
---|
5485 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
5486 | surf_usm_v(l)%ground_level(m) ) |
---|
5487 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
5488 | surf_usm_v(l)%ground_level(m) ) |
---|
5489 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
5490 | surf_usm_v(l)%ground_level(m) ) |
---|
5491 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5492 | surf_usm_v(l)%ground_level(m) ) |
---|
5493 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5494 | surf_usm_v(l)%ground_level(m) ) |
---|
5495 | ! |
---|
5496 | !-- Store building type and its name on each surface element |
---|
5497 | surf_usm_v(l)%building_type(m) = st |
---|
5498 | surf_usm_v(l)%building_type_name(m) = building_type_name(st) |
---|
5499 | ! |
---|
5500 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5501 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,st) |
---|
5502 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,st) |
---|
5503 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,st) |
---|
5504 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,st) |
---|
5505 | |
---|
5506 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
5507 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
5508 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
5509 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
5510 | |
---|
5511 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
5512 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,st) |
---|
5513 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,st) |
---|
5514 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,st) |
---|
5515 | |
---|
5516 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1_win,st) |
---|
5517 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,st) |
---|
5518 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,st) |
---|
5519 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,st) |
---|
5520 | |
---|
5521 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
5522 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
5523 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
5524 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
5525 | |
---|
5526 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
5527 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,st) |
---|
5528 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,st) |
---|
5529 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,st) |
---|
5530 | |
---|
5531 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1_win,st) |
---|
5532 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,st) |
---|
5533 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,st) |
---|
5534 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,st) |
---|
5535 | |
---|
5536 | surf_usm_v(l)%target_temp_summer(m) = building_pars(117,st) |
---|
5537 | surf_usm_v(l)%target_temp_winter(m) = building_pars(118,st) |
---|
5538 | ! |
---|
5539 | !-- emissivity of wall-, green- and window fraction |
---|
5540 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,st) |
---|
5541 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,st) |
---|
5542 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,st) |
---|
5543 | |
---|
5544 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,st) |
---|
5545 | |
---|
5546 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,st) |
---|
5547 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,st) |
---|
5548 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,st) |
---|
5549 | |
---|
5550 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,st) ) |
---|
5551 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,st) ) |
---|
5552 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,st) ) |
---|
5553 | |
---|
5554 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
5555 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
5556 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
5557 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
5558 | |
---|
5559 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
5560 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
5561 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
5562 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
5563 | |
---|
5564 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1_win,st) |
---|
5565 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2_win,st) |
---|
5566 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3_win,st) |
---|
5567 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4_win,st) |
---|
5568 | |
---|
5569 | surf_usm_v(l)%c_surface(m) = building_pars(0,st) |
---|
5570 | surf_usm_v(l)%lambda_surf(m) = building_pars(3,st) |
---|
5571 | surf_usm_v(l)%c_surface_green(m) = building_pars(2,st) |
---|
5572 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(5,st) |
---|
5573 | surf_usm_v(l)%c_surface_window(m) = building_pars(1,st) |
---|
5574 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(4,st) |
---|
5575 | |
---|
5576 | |
---|
5577 | ENDIF |
---|
5578 | ENDDO |
---|
5579 | ENDDO |
---|
5580 | ENDIF |
---|
5581 | |
---|
5582 | ! |
---|
5583 | !-- Level 3 - initialization via building_pars read from file |
---|
5584 | IF ( building_pars_f%from_file ) THEN |
---|
5585 | DO m = 1, surf_usm_h%ns |
---|
5586 | i = surf_usm_h%i(m) |
---|
5587 | j = surf_usm_h%j(m) |
---|
5588 | |
---|
5589 | ! |
---|
5590 | !-- In order to distinguish between ground floor level and |
---|
5591 | !-- above-ground-floor level surfaces, set input indices. |
---|
5592 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5593 | surf_usm_h%ground_level(m) ) |
---|
5594 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5595 | surf_usm_h%ground_level(m) ) |
---|
5596 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5597 | surf_usm_h%ground_level(m) ) |
---|
5598 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5599 | surf_usm_h%ground_level(m) ) |
---|
5600 | |
---|
5601 | ! |
---|
5602 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5603 | IF ( building_pars_f%pars_xy(ind_wall_frac_r,j,i) /= building_pars_f%fill ) & |
---|
5604 | surf_usm_h%frac(ind_veg_wall,m) = building_pars_f%pars_xy(ind_wall_frac_r,j,i) |
---|
5605 | IF ( building_pars_f%pars_xy(ind_green_frac_r,j,i) /= building_pars_f%fill ) & |
---|
5606 | surf_usm_h%frac(ind_pav_green,m) = building_pars_f%pars_xy(ind_green_frac_r,j,i) |
---|
5607 | IF ( building_pars_f%pars_xy(ind_win_frac_r,j,i) /= building_pars_f%fill ) & |
---|
5608 | surf_usm_h%frac(ind_wat_win,m) = building_pars_f%pars_xy(ind_win_frac_r,j,i) |
---|
5609 | |
---|
5610 | |
---|
5611 | IF ( building_pars_f%pars_xy(ind_lai_r,j,i) /= building_pars_f%fill ) & |
---|
5612 | surf_usm_h%lai(m) = building_pars_f%pars_xy(ind_lai_r,j,i) |
---|
5613 | |
---|
5614 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
5615 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
5616 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
5617 | ENDIF |
---|
5618 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5619 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
5620 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5621 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
5622 | IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
5623 | surf_usm_h%rho_c_green(nzb_wall,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
5624 | surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i) |
---|
5625 | ENDIF |
---|
5626 | IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5627 | surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2_wall_r,j,i) |
---|
5628 | IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5629 | surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3_wall_r,j,i) |
---|
5630 | IF ( building_pars_f%pars_xy(ind_hc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
5631 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
5632 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i) |
---|
5633 | ENDIF |
---|
5634 | IF ( building_pars_f%pars_xy(ind_hc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
5635 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win_r,j,i) |
---|
5636 | IF ( building_pars_f%pars_xy(ind_hc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
5637 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win_r,j,i) |
---|
5638 | |
---|
5639 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
5640 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
5641 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
5642 | ENDIF |
---|
5643 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5644 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_wall_r,j,i) |
---|
5645 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5646 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_wall_r,j,i) |
---|
5647 | IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill ) THEN |
---|
5648 | surf_usm_h%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1_wall_r,j,i) |
---|
5649 | 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) |
---|
5650 | ENDIF |
---|
5651 | IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5652 | 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) |
---|
5653 | IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5654 | 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) |
---|
5655 | IF ( building_pars_f%pars_xy(ind_tc1_win_r,j,i) /= building_pars_f%fill ) THEN |
---|
5656 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
5657 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i) |
---|
5658 | ENDIF |
---|
5659 | IF ( building_pars_f%pars_xy(ind_tc2_win_r,j,i) /= building_pars_f%fill ) & |
---|
5660 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win_r,j,i) |
---|
5661 | IF ( building_pars_f%pars_xy(ind_tc3_win_r,j,i) /= building_pars_f%fill ) & |
---|
5662 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win_r,j,i) |
---|
5663 | |
---|
5664 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
5665 | surf_usm_h%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
5666 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
5667 | surf_usm_h%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
5668 | |
---|
5669 | IF ( building_pars_f%pars_xy(ind_emis_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5670 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall_r,j,i) |
---|
5671 | IF ( building_pars_f%pars_xy(ind_emis_green_r,j,i) /= building_pars_f%fill )& |
---|
5672 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green_r,j,i) |
---|
5673 | IF ( building_pars_f%pars_xy(ind_emis_win_r,j,i) /= building_pars_f%fill ) & |
---|
5674 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win_r,j,i) |
---|
5675 | |
---|
5676 | IF ( building_pars_f%pars_xy(ind_trans_r,j,i) /= building_pars_f%fill ) & |
---|
5677 | surf_usm_h%transmissivity(m) = building_pars_f%pars_xy(ind_trans_r,j,i) |
---|
5678 | |
---|
5679 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
5680 | surf_usm_h%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
5681 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5682 | surf_usm_h%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5683 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5684 | surf_usm_h%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5685 | |
---|
5686 | IF ( building_pars_f%pars_xy(ind_alb_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5687 | surf_usm_h%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall_r,j,i) |
---|
5688 | IF ( building_pars_f%pars_xy(ind_alb_green_r,j,i) /= building_pars_f%fill ) & |
---|
5689 | surf_usm_h%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green_r,j,i) |
---|
5690 | IF ( building_pars_f%pars_xy(ind_alb_win_r,j,i) /= building_pars_f%fill ) & |
---|
5691 | surf_usm_h%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win_r,j,i) |
---|
5692 | |
---|
5693 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5694 | surf_usm_h%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
5695 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5696 | surf_usm_h%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
5697 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5698 | surf_usm_h%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
5699 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5700 | surf_usm_h%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
5701 | IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5702 | surf_usm_h%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) |
---|
5703 | IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5704 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) |
---|
5705 | IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5706 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) |
---|
5707 | IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill ) & |
---|
5708 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) |
---|
5709 | IF ( building_pars_f%pars_xy(ind_thick_1_win_r,j,i) /= building_pars_f%fill ) & |
---|
5710 | surf_usm_h%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win_r,j,i) |
---|
5711 | IF ( building_pars_f%pars_xy(ind_thick_2_win_r,j,i) /= building_pars_f%fill ) & |
---|
5712 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win_r,j,i) |
---|
5713 | IF ( building_pars_f%pars_xy(ind_thick_3_win_r,j,i) /= building_pars_f%fill ) & |
---|
5714 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win_r,j,i) |
---|
5715 | IF ( building_pars_f%pars_xy(ind_thick_4_win_r,j,i) /= building_pars_f%fill ) & |
---|
5716 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win_r,j,i) |
---|
5717 | |
---|
5718 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
5719 | surf_usm_h%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
5720 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
5721 | surf_usm_h%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
5722 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
5723 | surf_usm_h%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
5724 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
5725 | surf_usm_h%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
5726 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
5727 | surf_usm_h%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
5728 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
5729 | surf_usm_h%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
5730 | |
---|
5731 | IF ( building_pars_f%pars_xy(ind_green_type_roof,j,i) /= building_pars_f%fill ) & |
---|
5732 | surf_usm_h%green_type_roof(m) = building_pars_f%pars_xy(ind_green_type_roof,j,i) |
---|
5733 | ENDDO |
---|
5734 | |
---|
5735 | |
---|
5736 | |
---|
5737 | DO l = 0, 3 |
---|
5738 | DO m = 1, surf_usm_v(l)%ns |
---|
5739 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
5740 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
5741 | |
---|
5742 | ! |
---|
5743 | !-- In order to distinguish between ground floor level and |
---|
5744 | !-- above-ground-floor level surfaces, set input indices. |
---|
5745 | ind_alb_green = MERGE( ind_alb_green_gfl, ind_alb_green_agfl, & |
---|
5746 | surf_usm_v(l)%ground_level(m) ) |
---|
5747 | ind_alb_wall = MERGE( ind_alb_wall_gfl, ind_alb_wall_agfl, & |
---|
5748 | surf_usm_v(l)%ground_level(m) ) |
---|
5749 | ind_alb_win = MERGE( ind_alb_win_gfl, ind_alb_win_agfl, & |
---|
5750 | surf_usm_v(l)%ground_level(m) ) |
---|
5751 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
5752 | surf_usm_v(l)%ground_level(m) ) |
---|
5753 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
5754 | surf_usm_v(l)%ground_level(m) ) |
---|
5755 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
5756 | surf_usm_v(l)%ground_level(m) ) |
---|
5757 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
5758 | surf_usm_v(l)%ground_level(m) ) |
---|
5759 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
5760 | surf_usm_v(l)%ground_level(m) ) |
---|
5761 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
5762 | surf_usm_v(l)%ground_level(m) ) |
---|
5763 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
5764 | surf_usm_v(l)%ground_level(m) ) |
---|
5765 | ind_hc1_win = MERGE( ind_hc1_win_gfl, ind_hc1_win_agfl, & |
---|
5766 | surf_usm_v(l)%ground_level(m) ) |
---|
5767 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
5768 | surf_usm_v(l)%ground_level(m) ) |
---|
5769 | ind_hc2_win = MERGE( ind_hc2_win_gfl, ind_hc2_win_agfl, & |
---|
5770 | surf_usm_v(l)%ground_level(m) ) |
---|
5771 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
5772 | surf_usm_v(l)%ground_level(m) ) |
---|
5773 | ind_hc3_win = MERGE( ind_hc3_win_gfl, ind_hc3_win_agfl, & |
---|
5774 | surf_usm_v(l)%ground_level(m) ) |
---|
5775 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
5776 | surf_usm_v(l)%ground_level(m) ) |
---|
5777 | ind_tc1_win = MERGE( ind_tc1_win_gfl, ind_tc1_win_agfl, & |
---|
5778 | surf_usm_v(l)%ground_level(m) ) |
---|
5779 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
5780 | surf_usm_v(l)%ground_level(m) ) |
---|
5781 | ind_tc2_win = MERGE( ind_tc2_win_gfl, ind_tc2_win_agfl, & |
---|
5782 | surf_usm_v(l)%ground_level(m) ) |
---|
5783 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
5784 | surf_usm_v(l)%ground_level(m) ) |
---|
5785 | ind_tc3_win = MERGE( ind_tc3_win_gfl, ind_tc3_win_agfl, & |
---|
5786 | surf_usm_v(l)%ground_level(m) ) |
---|
5787 | ind_thick_1 = MERGE( ind_thick_1_gfl, ind_thick_1_agfl, & |
---|
5788 | surf_usm_v(l)%ground_level(m) ) |
---|
5789 | ind_thick_1_win = MERGE( ind_thick_1_win_gfl, ind_thick_1_win_agfl, & |
---|
5790 | surf_usm_v(l)%ground_level(m) ) |
---|
5791 | ind_thick_2 = MERGE( ind_thick_2_gfl, ind_thick_2_agfl, & |
---|
5792 | surf_usm_v(l)%ground_level(m) ) |
---|
5793 | ind_thick_2_win = MERGE( ind_thick_2_win_gfl, ind_thick_2_win_agfl, & |
---|
5794 | surf_usm_v(l)%ground_level(m) ) |
---|
5795 | ind_thick_3 = MERGE( ind_thick_3_gfl, ind_thick_3_agfl, & |
---|
5796 | surf_usm_v(l)%ground_level(m) ) |
---|
5797 | ind_thick_3_win = MERGE( ind_thick_3_win_gfl, ind_thick_3_win_agfl, & |
---|
5798 | surf_usm_v(l)%ground_level(m) ) |
---|
5799 | ind_thick_4 = MERGE( ind_thick_4_gfl, ind_thick_4_agfl, & |
---|
5800 | surf_usm_v(l)%ground_level(m) ) |
---|
5801 | ind_thick_4_win = MERGE( ind_thick_4_win_gfl, ind_thick_4_win_agfl, & |
---|
5802 | surf_usm_v(l)%ground_level(m) ) |
---|
5803 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
5804 | surf_usm_v(l)%ground_level(m) ) |
---|
5805 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
5806 | surf_usm_v(l)%ground_level(m) ) |
---|
5807 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
5808 | surf_usm_v(l)%ground_level(m) ) |
---|
5809 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
5810 | surf_usm_v(l)%ground_level(m) ) |
---|
5811 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
5812 | surf_usm_v(l)%ground_level(m) ) |
---|
5813 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
5814 | surf_usm_v(l)%ground_level(m) ) |
---|
5815 | |
---|
5816 | ! |
---|
5817 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
5818 | IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= & |
---|
5819 | building_pars_f%fill ) & |
---|
5820 | surf_usm_v(l)%frac(ind_veg_wall,m) = & |
---|
5821 | building_pars_f%pars_xy(ind_wall_frac,j,i) |
---|
5822 | IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /= & |
---|
5823 | building_pars_f%fill ) & |
---|
5824 | surf_usm_v(l)%frac(ind_pav_green,m) = & |
---|
5825 | building_pars_f%pars_xy(ind_green_frac_w,j,i) |
---|
5826 | IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= & |
---|
5827 | building_pars_f%fill ) & |
---|
5828 | surf_usm_v(l)%frac(ind_wat_win,m) = & |
---|
5829 | building_pars_f%pars_xy(ind_win_frac,j,i) |
---|
5830 | |
---|
5831 | IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill ) & |
---|
5832 | surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i) |
---|
5833 | |
---|
5834 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) & |
---|
5835 | THEN |
---|
5836 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = & |
---|
5837 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
5838 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = & |
---|
5839 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
5840 | ENDIF |
---|
5841 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
5842 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = & |
---|
5843 | building_pars_f%pars_xy(ind_hc2,j,i) |
---|
5844 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
5845 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = & |
---|
5846 | building_pars_f%pars_xy(ind_hc3,j,i) |
---|
5847 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
5848 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = & |
---|
5849 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
5850 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = & |
---|
5851 | rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i) |
---|
5852 | ENDIF |
---|
5853 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
5854 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2,j,i) |
---|
5855 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
5856 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3,j,i) |
---|
5857 | IF ( building_pars_f%pars_xy(ind_hc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
5858 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
5859 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win,j,i) |
---|
5860 | ENDIF |
---|
5861 | IF ( building_pars_f%pars_xy(ind_hc2_win,j,i) /= building_pars_f%fill ) & |
---|
5862 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win,j,i) |
---|
5863 | IF ( building_pars_f%pars_xy(ind_hc3_win,j,i) /= building_pars_f%fill ) & |
---|
5864 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win,j,i) |
---|
5865 | |
---|
5866 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
5867 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5868 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5869 | ENDIF |
---|
5870 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
5871 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
5872 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
5873 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
5874 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
5875 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5876 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i) |
---|
5877 | ENDIF |
---|
5878 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
5879 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc2,j,i) |
---|
5880 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
5881 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc3,j,i) |
---|
5882 | IF ( building_pars_f%pars_xy(ind_tc1_win,j,i) /= building_pars_f%fill ) THEN |
---|
5883 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
5884 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win,j,i) |
---|
5885 | ENDIF |
---|
5886 | IF ( building_pars_f%pars_xy(ind_tc2_win,j,i) /= building_pars_f%fill ) & |
---|
5887 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win,j,i) |
---|
5888 | IF ( building_pars_f%pars_xy(ind_tc3_win,j,i) /= building_pars_f%fill ) & |
---|
5889 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win,j,i) |
---|
5890 | |
---|
5891 | IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill ) & |
---|
5892 | surf_usm_v(l)%target_temp_summer(m) = building_pars_f%pars_xy(117,j,i) |
---|
5893 | IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill ) & |
---|
5894 | surf_usm_v(l)%target_temp_winter(m) = building_pars_f%pars_xy(118,j,i) |
---|
5895 | |
---|
5896 | IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill ) & |
---|
5897 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall,j,i) |
---|
5898 | IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )& |
---|
5899 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green,j,i) |
---|
5900 | IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill ) & |
---|
5901 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win,j,i) |
---|
5902 | |
---|
5903 | IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill ) & |
---|
5904 | surf_usm_v(l)%transmissivity(m) = building_pars_f%pars_xy(ind_trans,j,i) |
---|
5905 | |
---|
5906 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
5907 | surf_usm_v(l)%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
5908 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5909 | surf_usm_v(l)%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5910 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
5911 | surf_usm_v(l)%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
5912 | |
---|
5913 | IF ( building_pars_f%pars_xy(ind_alb_wall,j,i) /= building_pars_f%fill ) & |
---|
5914 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall,j,i) |
---|
5915 | IF ( building_pars_f%pars_xy(ind_alb_green,j,i) /= building_pars_f%fill ) & |
---|
5916 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green,j,i) |
---|
5917 | IF ( building_pars_f%pars_xy(ind_alb_win,j,i) /= building_pars_f%fill ) & |
---|
5918 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win,j,i) |
---|
5919 | |
---|
5920 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5921 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5922 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5923 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5924 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5925 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5926 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5927 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5928 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
5929 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
5930 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
5931 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
5932 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
5933 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
5934 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
5935 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
5936 | IF ( building_pars_f%pars_xy(ind_thick_1_win,j,i) /= building_pars_f%fill ) & |
---|
5937 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win,j,i) |
---|
5938 | IF ( building_pars_f%pars_xy(ind_thick_2_win,j,i) /= building_pars_f%fill ) & |
---|
5939 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win,j,i) |
---|
5940 | IF ( building_pars_f%pars_xy(ind_thick_3_win,j,i) /= building_pars_f%fill ) & |
---|
5941 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win,j,i) |
---|
5942 | IF ( building_pars_f%pars_xy(ind_thick_4_win,j,i) /= building_pars_f%fill ) & |
---|
5943 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win,j,i) |
---|
5944 | |
---|
5945 | IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill ) & |
---|
5946 | surf_usm_v(l)%c_surface(m) = building_pars_f%pars_xy(0,j,i) |
---|
5947 | IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill ) & |
---|
5948 | surf_usm_v(l)%lambda_surf(m) = building_pars_f%pars_xy(3,j,i) |
---|
5949 | IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill ) & |
---|
5950 | surf_usm_v(l)%c_surface_green(m) = building_pars_f%pars_xy(2,j,i) |
---|
5951 | IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill ) & |
---|
5952 | surf_usm_v(l)%lambda_surf_green(m) = building_pars_f%pars_xy(5,j,i) |
---|
5953 | IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill ) & |
---|
5954 | surf_usm_v(l)%c_surface_window(m) = building_pars_f%pars_xy(1,j,i) |
---|
5955 | IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill ) & |
---|
5956 | surf_usm_v(l)%lambda_surf_window(m) = building_pars_f%pars_xy(4,j,i) |
---|
5957 | |
---|
5958 | ENDDO |
---|
5959 | ENDDO |
---|
5960 | ENDIF |
---|
5961 | ! |
---|
5962 | !-- Read the surface_types array. |
---|
5963 | !-- Please note, here also initialization of surface attributes is done as |
---|
5964 | !-- long as _urbsurf and _surfpar files are available. Values from above |
---|
5965 | !-- will be overwritten. This might be removed later, but is still in the |
---|
5966 | !-- code to enable compatibility with older model version. |
---|
5967 | CALL usm_read_urban_surface_types() |
---|
5968 | |
---|
5969 | !-- init material heat model |
---|
5970 | CALL usm_init_material_model() |
---|
5971 | |
---|
5972 | !-- init anthropogenic sources of heat |
---|
5973 | IF ( usm_anthropogenic_heat ) THEN |
---|
5974 | !-- init anthropogenic sources of heat (from transportation for now) |
---|
5975 | CALL usm_read_anthropogenic_heat() |
---|
5976 | ENDIF |
---|
5977 | |
---|
5978 | ! |
---|
5979 | !-- Check for consistent initialization. |
---|
5980 | !-- Check if roughness length for momentum, or heat, exceed surface-layer |
---|
5981 | !-- height and decrease local roughness length where necessary. |
---|
5982 | DO m = 1, surf_usm_h%ns |
---|
5983 | IF ( surf_usm_h%z0(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5984 | |
---|
5985 | surf_usm_h%z0(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5986 | |
---|
5987 | WRITE( message_string, * ) 'z0 exceeds surface-layer height ' // & |
---|
5988 | 'at horizontal urban surface and is ' // & |
---|
5989 | 'decreased appropriately at grid point (i,j) = ', & |
---|
5990 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
5991 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
5992 | 0, 0, 0, 6, 0 ) |
---|
5993 | ENDIF |
---|
5994 | IF ( surf_usm_h%z0h(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
5995 | |
---|
5996 | surf_usm_h%z0h(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5997 | surf_usm_h%z0q(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
5998 | |
---|
5999 | WRITE( message_string, * ) 'z0h exceeds surface-layer height ' // & |
---|
6000 | 'at horizontal urban surface and is ' // & |
---|
6001 | 'decreased appropriately at grid point (i,j) = ', & |
---|
6002 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
6003 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
6004 | 0, 0, 0, 6, 0 ) |
---|
6005 | ENDIF |
---|
6006 | ENDDO |
---|
6007 | |
---|
6008 | DO l = 0, 3 |
---|
6009 | DO m = 1, surf_usm_v(l)%ns |
---|
6010 | IF ( surf_usm_v(l)%z0(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
6011 | |
---|
6012 | surf_usm_v(l)%z0(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
6013 | |
---|
6014 | WRITE( message_string, * ) 'z0 exceeds surface-layer height '//& |
---|
6015 | 'at vertical urban surface and is ' // & |
---|
6016 | 'decreased appropriately at grid point (i,j) = ', & |
---|
6017 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
6018 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
6019 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
6020 | 0, 0, 0, 6, 0 ) |
---|
6021 | ENDIF |
---|
6022 | IF ( surf_usm_v(l)%z0h(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
6023 | |
---|
6024 | surf_usm_v(l)%z0h(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
6025 | surf_usm_v(l)%z0q(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
6026 | |
---|
6027 | WRITE( message_string, * ) 'z0h exceeds surface-layer height '//& |
---|
6028 | 'at vertical urban surface and is ' // & |
---|
6029 | 'decreased appropriately at grid point (i,j) = ', & |
---|
6030 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
6031 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
6032 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
6033 | 0, 0, 0, 6, 0 ) |
---|
6034 | ENDIF |
---|
6035 | ENDDO |
---|
6036 | ENDDO |
---|
6037 | |
---|
6038 | !-- Intitialization of the surface and wall/ground/roof temperature |
---|
6039 | |
---|
6040 | !-- Initialization for restart runs |
---|
6041 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. & |
---|
6042 | TRIM( initializing_actions ) /= 'cyclic_fill' ) THEN |
---|
6043 | |
---|
6044 | ! |
---|
6045 | !-- At horizontal surfaces. Please note, t_surf_wall_h is defined on a |
---|
6046 | !-- different data type, but with the same dimension. |
---|
6047 | #if ! defined( __nopointer ) |
---|
6048 | DO m = 1, surf_usm_h%ns |
---|
6049 | i = surf_usm_h%i(m) |
---|
6050 | j = surf_usm_h%j(m) |
---|
6051 | k = surf_usm_h%k(m) |
---|
6052 | |
---|
6053 | t_surf_wall_h(m) = pt(k,j,i) * exner(k) |
---|
6054 | t_surf_window_h(m) = pt(k,j,i) * exner(k) |
---|
6055 | t_surf_green_h(m) = pt(k,j,i) * exner(k) |
---|
6056 | surf_usm_h%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
6057 | ENDDO |
---|
6058 | ! |
---|
6059 | !-- At vertical surfaces. |
---|
6060 | DO l = 0, 3 |
---|
6061 | DO m = 1, surf_usm_v(l)%ns |
---|
6062 | i = surf_usm_v(l)%i(m) |
---|
6063 | j = surf_usm_v(l)%j(m) |
---|
6064 | k = surf_usm_v(l)%k(m) |
---|
6065 | |
---|
6066 | t_surf_wall_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
6067 | t_surf_window_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
6068 | t_surf_green_v(l)%t(m) = pt(k,j,i) * exner(k) |
---|
6069 | surf_usm_v(l)%pt_surface(m) = pt(k,j,i) * exner(k) |
---|
6070 | ENDDO |
---|
6071 | ENDDO |
---|
6072 | #endif |
---|
6073 | ! |
---|
6074 | !-- For the sake of correct initialization, set also q_surface. |
---|
6075 | !-- Note, at urban surfaces q_surface is initialized with 0. |
---|
6076 | IF ( humidity ) THEN |
---|
6077 | DO m = 1, surf_usm_h%ns |
---|
6078 | surf_usm_h%q_surface(m) = 0.0_wp |
---|
6079 | ENDDO |
---|
6080 | DO l = 0, 3 |
---|
6081 | DO m = 1, surf_usm_v(l)%ns |
---|
6082 | surf_usm_v(l)%q_surface(m) = 0.0_wp |
---|
6083 | ENDDO |
---|
6084 | ENDDO |
---|
6085 | ENDIF |
---|
6086 | |
---|
6087 | !-- initial values for t_wall |
---|
6088 | !-- outer value is set to surface temperature |
---|
6089 | !-- inner value is set to wall_inner_temperature |
---|
6090 | !-- and profile is logaritmic (linear in nz). |
---|
6091 | !-- Horizontal surfaces |
---|
6092 | DO m = 1, surf_usm_h%ns |
---|
6093 | ! |
---|
6094 | !-- Roof |
---|
6095 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
6096 | tin = roof_inner_temperature |
---|
6097 | twin = window_inner_temperature |
---|
6098 | ! |
---|
6099 | !-- Normal land surface |
---|
6100 | ELSE |
---|
6101 | tin = soil_inner_temperature |
---|
6102 | twin = window_inner_temperature |
---|
6103 | ENDIF |
---|
6104 | |
---|
6105 | DO k = nzb_wall, nzt_wall+1 |
---|
6106 | c = REAL( k - nzb_wall, wp ) / & |
---|
6107 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
6108 | |
---|
6109 | t_wall_h(k,m) = ( 1.0_wp - c ) * t_surf_wall_h(m) + c * tin |
---|
6110 | t_window_h(k,m) = ( 1.0_wp - c ) * t_surf_window_h(m) + c * twin |
---|
6111 | t_green_h(k,m) = t_surf_wall_h(m) |
---|
6112 | swc_h(k,m) = 0.5_wp |
---|
6113 | swc_sat_h(k,m) = 0.95_wp |
---|
6114 | swc_res_h(k,m) = 0.05_wp |
---|
6115 | rootfr_h(k,m) = 0.1_wp |
---|
6116 | wilt_h(k,m) = 0.1_wp |
---|
6117 | fc_h(k,m) = 0.9_wp |
---|
6118 | ENDDO |
---|
6119 | ENDDO |
---|
6120 | ! |
---|
6121 | !-- Vertical surfaces |
---|
6122 | DO l = 0, 3 |
---|
6123 | DO m = 1, surf_usm_v(l)%ns |
---|
6124 | ! |
---|
6125 | !-- Inner wall |
---|
6126 | tin = wall_inner_temperature |
---|
6127 | twin = window_inner_temperature |
---|
6128 | |
---|
6129 | DO k = nzb_wall, nzt_wall+1 |
---|
6130 | c = REAL( k - nzb_wall, wp ) / & |
---|
6131 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
6132 | t_wall_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_wall_v(l)%t(m) + c * tin |
---|
6133 | t_window_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_window_v(l)%t(m) + c * twin |
---|
6134 | t_green_v(l)%t(k,m) = t_surf_wall_v(l)%t(m) |
---|
6135 | swc_v(l)%t(k,m) = 0.5_wp |
---|
6136 | ENDDO |
---|
6137 | ENDDO |
---|
6138 | ENDDO |
---|
6139 | ENDIF |
---|
6140 | |
---|
6141 | !-- If specified, replace constant wall temperatures with fully 3D values from file |
---|
6142 | IF ( read_wall_temp_3d ) CALL usm_read_wall_temperature() |
---|
6143 | |
---|
6144 | !-- |
---|
6145 | !-- Possibly DO user-defined actions (e.g. define heterogeneous wall surface) |
---|
6146 | CALL user_init_urban_surface |
---|
6147 | |
---|
6148 | !-- initialize prognostic values for the first timestep |
---|
6149 | t_surf_wall_h_p = t_surf_wall_h |
---|
6150 | t_surf_wall_v_p = t_surf_wall_v |
---|
6151 | t_surf_window_h_p = t_surf_window_h |
---|
6152 | t_surf_window_v_p = t_surf_window_v |
---|
6153 | t_surf_green_h_p = t_surf_green_h |
---|
6154 | t_surf_green_v_p = t_surf_green_v |
---|
6155 | t_surf_10cm_h_p = t_surf_10cm_h |
---|
6156 | t_surf_10cm_v_p = t_surf_10cm_v |
---|
6157 | |
---|
6158 | t_wall_h_p = t_wall_h |
---|
6159 | t_wall_v_p = t_wall_v |
---|
6160 | t_window_h_p = t_window_h |
---|
6161 | t_window_v_p = t_window_v |
---|
6162 | t_green_h_p = t_green_h |
---|
6163 | t_green_v_p = t_green_v |
---|
6164 | |
---|
6165 | !-- Adjust radiative fluxes for urban surface at model start |
---|
6166 | !CALL radiation_interaction |
---|
6167 | !-- TODO: interaction should be called once before first output, |
---|
6168 | !-- that is not yet possible. |
---|
6169 | |
---|
6170 | m_liq_usm_h_p = m_liq_usm_h |
---|
6171 | m_liq_usm_v_p = m_liq_usm_v |
---|
6172 | !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
6173 | ! |
---|
6174 | !-- Set initial values for prognostic quantities |
---|
6175 | !-- Horizontal surfaces |
---|
6176 | tm_liq_usm_h_m%var_usm_1d = 0.0_wp |
---|
6177 | surf_usm_h%c_liq = 0.0_wp |
---|
6178 | |
---|
6179 | surf_usm_h%qsws_liq_eb = 0.0_wp |
---|
6180 | surf_usm_h%qsws_veg_eb = 0.0_wp |
---|
6181 | |
---|
6182 | ! |
---|
6183 | !-- Do the same for vertical surfaces |
---|
6184 | DO l = 0, 3 |
---|
6185 | tm_liq_usm_v_m(l)%var_usm_1d = 0.0_wp |
---|
6186 | surf_usm_v(l)%c_liq = 0.0_wp |
---|
6187 | |
---|
6188 | surf_usm_v(l)%qsws_liq_eb = 0.0_wp |
---|
6189 | surf_usm_v(l)%qsws_veg_eb = 0.0_wp |
---|
6190 | ENDDO |
---|
6191 | |
---|
6192 | ! |
---|
6193 | !-- Set initial values for prognostic soil quantities |
---|
6194 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN |
---|
6195 | m_liq_usm_h%var_usm_1d = 0.0_wp |
---|
6196 | |
---|
6197 | DO l = 0, 3 |
---|
6198 | m_liq_usm_v(l)%var_usm_1d = 0.0_wp |
---|
6199 | ENDDO |
---|
6200 | ENDIF |
---|
6201 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
6202 | |
---|
6203 | CALL cpu_log( log_point_s(78), 'usm_init', 'stop' ) |
---|
6204 | |
---|
6205 | END SUBROUTINE usm_init_urban_surface |
---|
6206 | |
---|
6207 | |
---|
6208 | !------------------------------------------------------------------------------! |
---|
6209 | ! Description: |
---|
6210 | ! ------------ |
---|
6211 | ! |
---|
6212 | !> Wall model as part of the urban surface model. The model predicts wall |
---|
6213 | !> temperature. |
---|
6214 | !------------------------------------------------------------------------------! |
---|
6215 | SUBROUTINE usm_material_heat_model( spinup ) |
---|
6216 | |
---|
6217 | |
---|
6218 | IMPLICIT NONE |
---|
6219 | |
---|
6220 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
6221 | |
---|
6222 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wtend, wintend !< tendency |
---|
6223 | REAL(wp) :: win_absorp !absorption coefficient from transmissivity |
---|
6224 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wall_mod |
---|
6225 | |
---|
6226 | LOGICAL :: spinup !if true, no calculation of window temperatures |
---|
6227 | |
---|
6228 | wall_mod=1.0_wp |
---|
6229 | if (usm_wall_mod .AND. spinup) then |
---|
6230 | do kw=nzb_wall,nzb_wall+1 |
---|
6231 | wall_mod(kw)=0.1_wp |
---|
6232 | enddo |
---|
6233 | endif |
---|
6234 | |
---|
6235 | ! |
---|
6236 | !-- For horizontal surfaces |
---|
6237 | DO m = 1, surf_usm_h%ns |
---|
6238 | ! |
---|
6239 | !-- Obtain indices |
---|
6240 | i = surf_usm_h%i(m) |
---|
6241 | j = surf_usm_h%j(m) |
---|
6242 | k = surf_usm_h%k(m) |
---|
6243 | ! |
---|
6244 | !-- prognostic equation for ground/roof temperature t_wall_h |
---|
6245 | wtend(:) = 0.0_wp |
---|
6246 | wtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzb_wall,m)) * & |
---|
6247 | ( surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
6248 | ( t_wall_h(nzb_wall+1,m) & |
---|
6249 | - t_wall_h(nzb_wall,m) ) * & |
---|
6250 | surf_usm_h%ddz_wall(nzb_wall+1,m) & |
---|
6251 | + surf_usm_h%frac(ind_veg_wall,m) & |
---|
6252 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
6253 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
6254 | * surf_usm_h%wghf_eb(m) & |
---|
6255 | - surf_usm_h%frac(ind_pav_green,m) & |
---|
6256 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
6257 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
6258 | * ( surf_usm_h%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
6259 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
6260 | + surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) & |
---|
6261 | * surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
6262 | / ( surf_usm_h%ddz_green(nzt_wall,m) & |
---|
6263 | + surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
6264 | * ( t_wall_h(nzb_wall,m) & |
---|
6265 | - t_green_h(nzt_wall,m) ) ) * & |
---|
6266 | surf_usm_h%ddz_wall_stag(nzb_wall,m) |
---|
6267 | |
---|
6268 | IF ( indoor_model ) then |
---|
6269 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
6270 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
6271 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
6272 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
6273 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
6274 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
6275 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
6276 | * surf_usm_h%ddz_wall(kw,m) & |
---|
6277 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
6278 | ENDDO |
---|
6279 | wtend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzt_wall,m)) * & |
---|
6280 | ( -surf_usm_h%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1) * & |
---|
6281 | ( t_wall_h(nzt_wall,m) & |
---|
6282 | - t_wall_h(nzt_wall-1,m) ) * & |
---|
6283 | surf_usm_h%ddz_wall(nzt_wall,m) & |
---|
6284 | + surf_usm_h%iwghf_eb(m) ) * & |
---|
6285 | surf_usm_h%ddz_wall_stag(nzt_wall,m) |
---|
6286 | ELSE |
---|
6287 | DO kw = nzb_wall+1, nzt_wall |
---|
6288 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
6289 | * ( surf_usm_h%lambda_h(kw,m) * wall_mod(kw) & |
---|
6290 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
6291 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
6292 | - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
6293 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
6294 | * surf_usm_h%ddz_wall(kw,m) & |
---|
6295 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
6296 | ENDDO |
---|
6297 | ENDIF |
---|
6298 | |
---|
6299 | t_wall_h_p(nzb_wall:nzt_wall,m) = t_wall_h(nzb_wall:nzt_wall,m) & |
---|
6300 | + dt_3d * ( tsc(2) & |
---|
6301 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6302 | * surf_usm_h%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
6303 | |
---|
6304 | if (.NOT. spinup) then |
---|
6305 | win_absorp = -log(surf_usm_h%transmissivity(m)) / surf_usm_h%zw_window(nzt_wall,m) |
---|
6306 | !-- prognostic equation for ground/roof window temperature t_window_h |
---|
6307 | wintend(:) = 0.0_wp |
---|
6308 | wintend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzb_wall,m)) * & |
---|
6309 | ( surf_usm_h%lambda_h_window(nzb_wall,m) * & |
---|
6310 | ( t_window_h(nzb_wall+1,m) & |
---|
6311 | - t_window_h(nzb_wall,m) ) * & |
---|
6312 | surf_usm_h%ddz_window(nzb_wall+1,m) & |
---|
6313 | + surf_usm_h%wghf_eb_window(m) & |
---|
6314 | + surf_usm_h%rad_sw_in(m) & |
---|
6315 | * (1.0_wp - exp(-win_absorp & |
---|
6316 | * surf_usm_h%zw_window(nzb_wall,m) ) ) & |
---|
6317 | ) * surf_usm_h%ddz_window_stag(nzb_wall,m) |
---|
6318 | |
---|
6319 | IF ( indoor_model ) then |
---|
6320 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
6321 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
6322 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
6323 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
6324 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
6325 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
6326 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
6327 | * surf_usm_h%ddz_window(kw,m) & |
---|
6328 | + surf_usm_h%rad_sw_in(m) & |
---|
6329 | * (exp(-win_absorp & |
---|
6330 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
6331 | - exp(-win_absorp & |
---|
6332 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
6333 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
6334 | |
---|
6335 | ENDDO |
---|
6336 | wintend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzt_wall,m)) * & |
---|
6337 | ( -surf_usm_h%lambda_h_window(nzt_wall-1,m) * & |
---|
6338 | ( t_window_h(nzt_wall,m) & |
---|
6339 | - t_window_h(nzt_wall-1,m) ) * & |
---|
6340 | surf_usm_h%ddz_window(nzt_wall,m) & |
---|
6341 | + surf_usm_h%iwghf_eb_window(m) & |
---|
6342 | + surf_usm_h%rad_sw_in(m) & |
---|
6343 | * (exp(-win_absorp & |
---|
6344 | * surf_usm_h%zw_window(nzt_wall-1,m) ) & |
---|
6345 | - exp(-win_absorp & |
---|
6346 | * surf_usm_h%zw_window(nzt_wall,m) ) ) & |
---|
6347 | ) * surf_usm_h%ddz_window_stag(nzt_wall,m) |
---|
6348 | ELSE |
---|
6349 | DO kw = nzb_wall+1, nzt_wall |
---|
6350 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
6351 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
6352 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
6353 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
6354 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
6355 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
6356 | * surf_usm_h%ddz_window(kw,m) & |
---|
6357 | + surf_usm_h%rad_sw_in(m) & |
---|
6358 | * (exp(-win_absorp & |
---|
6359 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
6360 | - exp(-win_absorp & |
---|
6361 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
6362 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
6363 | |
---|
6364 | ENDDO |
---|
6365 | ENDIF |
---|
6366 | |
---|
6367 | t_window_h_p(nzb_wall:nzt_wall,m) = t_window_h(nzb_wall:nzt_wall,m) & |
---|
6368 | + dt_3d * ( tsc(2) & |
---|
6369 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6370 | * surf_usm_h%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
6371 | |
---|
6372 | endif |
---|
6373 | |
---|
6374 | ! |
---|
6375 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
6376 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6377 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6378 | DO kw = nzb_wall, nzt_wall |
---|
6379 | surf_usm_h%tt_wall_m(kw,m) = wtend(kw) |
---|
6380 | ENDDO |
---|
6381 | ELSEIF ( intermediate_timestep_count < & |
---|
6382 | intermediate_timestep_count_max ) THEN |
---|
6383 | DO kw = nzb_wall, nzt_wall |
---|
6384 | surf_usm_h%tt_wall_m(kw,m) = -9.5625_wp * wtend(kw) + & |
---|
6385 | 5.3125_wp * surf_usm_h%tt_wall_m(kw,m) |
---|
6386 | ENDDO |
---|
6387 | ENDIF |
---|
6388 | ENDIF |
---|
6389 | |
---|
6390 | if (.NOT. spinup) then |
---|
6391 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
6392 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6393 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6394 | DO kw = nzb_wall, nzt_wall |
---|
6395 | surf_usm_h%tt_window_m(kw,m) = wintend(kw) |
---|
6396 | ENDDO |
---|
6397 | ELSEIF ( intermediate_timestep_count < & |
---|
6398 | intermediate_timestep_count_max ) THEN |
---|
6399 | DO kw = nzb_wall, nzt_wall |
---|
6400 | surf_usm_h%tt_window_m(kw,m) = -9.5625_wp * wintend(kw) + & |
---|
6401 | 5.3125_wp * surf_usm_h%tt_window_m(kw,m) |
---|
6402 | ENDDO |
---|
6403 | ENDIF |
---|
6404 | ENDIF |
---|
6405 | |
---|
6406 | endif |
---|
6407 | |
---|
6408 | ENDDO |
---|
6409 | |
---|
6410 | ! |
---|
6411 | !-- For vertical surfaces |
---|
6412 | DO l = 0, 3 |
---|
6413 | DO m = 1, surf_usm_v(l)%ns |
---|
6414 | ! |
---|
6415 | !-- Obtain indices |
---|
6416 | i = surf_usm_v(l)%i(m) |
---|
6417 | j = surf_usm_v(l)%j(m) |
---|
6418 | k = surf_usm_v(l)%k(m) |
---|
6419 | ! |
---|
6420 | !-- prognostic equation for wall temperature t_wall_v |
---|
6421 | wtend(:) = 0.0_wp |
---|
6422 | |
---|
6423 | wtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzb_wall,m)) * & |
---|
6424 | ( surf_usm_v(l)%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) * & |
---|
6425 | ( t_wall_v(l)%t(nzb_wall+1,m) & |
---|
6426 | - t_wall_v(l)%t(nzb_wall,m) ) * & |
---|
6427 | surf_usm_v(l)%ddz_wall(nzb_wall+1,m) & |
---|
6428 | + surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
6429 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
6430 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
6431 | * surf_usm_v(l)%wghf_eb(m) & |
---|
6432 | - surf_usm_v(l)%frac(ind_pav_green,m) & |
---|
6433 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
6434 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
6435 | * ( surf_usm_v(l)%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) & |
---|
6436 | * surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
6437 | + surf_usm_v(l)%lambda_h(nzb_wall,m)* wall_mod(nzb_wall) & |
---|
6438 | * surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
6439 | / ( surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
6440 | + surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
6441 | * ( t_wall_v(l)%t(nzb_wall,m) & |
---|
6442 | - t_green_v(l)%t(nzt_wall,m) ) ) * & |
---|
6443 | surf_usm_v(l)%ddz_wall_stag(nzb_wall,m) |
---|
6444 | |
---|
6445 | IF ( indoor_model ) then |
---|
6446 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
6447 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
6448 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
6449 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
6450 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
6451 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
6452 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
6453 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
6454 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
6455 | ENDDO |
---|
6456 | wtend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzt_wall,m)) * & |
---|
6457 | ( -surf_usm_v(l)%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1)* & |
---|
6458 | ( t_wall_v(l)%t(nzt_wall,m) & |
---|
6459 | - t_wall_v(l)%t(nzt_wall-1,m) ) * & |
---|
6460 | surf_usm_v(l)%ddz_wall(nzt_wall,m) & |
---|
6461 | + surf_usm_v(l)%iwghf_eb(m) ) * & |
---|
6462 | surf_usm_v(l)%ddz_wall_stag(nzt_wall,m) |
---|
6463 | ELSE |
---|
6464 | DO kw = nzb_wall+1, nzt_wall |
---|
6465 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
6466 | * ( surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw) & |
---|
6467 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
6468 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
6469 | - surf_usm_v(l)%lambda_h(kw-1,m) * wall_mod(kw-1) & |
---|
6470 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
6471 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
6472 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
6473 | ENDDO |
---|
6474 | ENDIF |
---|
6475 | |
---|
6476 | t_wall_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
6477 | t_wall_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
6478 | + dt_3d * ( tsc(2) & |
---|
6479 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6480 | * surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
6481 | |
---|
6482 | if (.NOT. spinup) then |
---|
6483 | win_absorp = -log(surf_usm_v(l)%transmissivity(m)) / surf_usm_v(l)%zw_window(nzt_wall,m) |
---|
6484 | !-- prognostic equation for window temperature t_window_v |
---|
6485 | wintend(:) = 0.0_wp |
---|
6486 | wintend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzb_wall,m)) * & |
---|
6487 | ( surf_usm_v(l)%lambda_h_window(nzb_wall,m) * & |
---|
6488 | ( t_window_v(l)%t(nzb_wall+1,m) & |
---|
6489 | - t_window_v(l)%t(nzb_wall,m) ) * & |
---|
6490 | surf_usm_v(l)%ddz_window(nzb_wall+1,m) & |
---|
6491 | + surf_usm_v(l)%wghf_eb_window(m) & |
---|
6492 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
6493 | * (1.0_wp - exp(-win_absorp & |
---|
6494 | * surf_usm_v(l)%zw_window(nzb_wall,m) ) ) & |
---|
6495 | ) * surf_usm_v(l)%ddz_window_stag(nzb_wall,m) |
---|
6496 | |
---|
6497 | IF ( indoor_model ) then |
---|
6498 | DO kw = nzb_wall+1, nzt_wall -1 |
---|
6499 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
6500 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
6501 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
6502 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
6503 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
6504 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
6505 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
6506 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
6507 | * (exp(-win_absorp & |
---|
6508 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
6509 | - exp(-win_absorp & |
---|
6510 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
6511 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
6512 | ENDDO |
---|
6513 | wintend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzt_wall,m)) * & |
---|
6514 | ( -surf_usm_v(l)%lambda_h_window(nzt_wall-1,m) * & |
---|
6515 | ( t_window_v(l)%t(nzt_wall,m) & |
---|
6516 | - t_window_v(l)%t(nzt_wall-1,m) ) * & |
---|
6517 | surf_usm_v(l)%ddz_window(nzt_wall,m) & |
---|
6518 | + surf_usm_v(l)%iwghf_eb_window(m) & |
---|
6519 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
6520 | * (exp(-win_absorp & |
---|
6521 | * surf_usm_v(l)%zw_window(nzt_wall-1,m) ) & |
---|
6522 | - exp(-win_absorp & |
---|
6523 | * surf_usm_v(l)%zw_window(nzt_wall,m) ) ) & |
---|
6524 | ) * surf_usm_v(l)%ddz_window_stag(nzt_wall,m) |
---|
6525 | ELSE |
---|
6526 | DO kw = nzb_wall+1, nzt_wall |
---|
6527 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
6528 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
6529 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
6530 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
6531 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
6532 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
6533 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
6534 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
6535 | * (exp(-win_absorp & |
---|
6536 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
6537 | - exp(-win_absorp & |
---|
6538 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
6539 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
6540 | ENDDO |
---|
6541 | ENDIF |
---|
6542 | |
---|
6543 | t_window_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
6544 | t_window_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
6545 | + dt_3d * ( tsc(2) & |
---|
6546 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6547 | * surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
6548 | endif |
---|
6549 | |
---|
6550 | ! |
---|
6551 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
6552 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6553 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6554 | DO kw = nzb_wall, nzt_wall |
---|
6555 | surf_usm_v(l)%tt_wall_m(kw,m) = wtend(kw) |
---|
6556 | ENDDO |
---|
6557 | ELSEIF ( intermediate_timestep_count < & |
---|
6558 | intermediate_timestep_count_max ) THEN |
---|
6559 | DO kw = nzb_wall, nzt_wall |
---|
6560 | surf_usm_v(l)%tt_wall_m(kw,m) = & |
---|
6561 | - 9.5625_wp * wtend(kw) + & |
---|
6562 | 5.3125_wp * surf_usm_v(l)%tt_wall_m(kw,m) |
---|
6563 | ENDDO |
---|
6564 | ENDIF |
---|
6565 | ENDIF |
---|
6566 | |
---|
6567 | |
---|
6568 | if (.NOT. spinup) then |
---|
6569 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
6570 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6571 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6572 | DO kw = nzb_wall, nzt_wall |
---|
6573 | surf_usm_v(l)%tt_window_m(kw,m) = wintend(kw) |
---|
6574 | ENDDO |
---|
6575 | ELSEIF ( intermediate_timestep_count < & |
---|
6576 | intermediate_timestep_count_max ) THEN |
---|
6577 | DO kw = nzb_wall, nzt_wall |
---|
6578 | surf_usm_v(l)%tt_window_m(kw,m) = & |
---|
6579 | - 9.5625_wp * wintend(kw) + & |
---|
6580 | 5.3125_wp * surf_usm_v(l)%tt_window_m(kw,m) |
---|
6581 | ENDDO |
---|
6582 | ENDIF |
---|
6583 | ENDIF |
---|
6584 | endif |
---|
6585 | |
---|
6586 | ENDDO |
---|
6587 | ENDDO |
---|
6588 | |
---|
6589 | END SUBROUTINE usm_material_heat_model |
---|
6590 | |
---|
6591 | !------------------------------------------------------------------------------! |
---|
6592 | ! Description: |
---|
6593 | ! ------------ |
---|
6594 | ! |
---|
6595 | !> Green and substrate model as part of the urban surface model. The model predicts ground |
---|
6596 | !> temperatures. |
---|
6597 | !------------------------------------------------------------------------------! |
---|
6598 | SUBROUTINE usm_green_heat_model |
---|
6599 | |
---|
6600 | |
---|
6601 | IMPLICIT NONE |
---|
6602 | |
---|
6603 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
6604 | |
---|
6605 | REAL(wp) :: ke, lambda_h_green_sat |
---|
6606 | REAL(wp) :: h_vg !< Van Genuchten coef. h |
---|
6607 | REAL(wp) :: drho_l_lv |
---|
6608 | |
---|
6609 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: gtend,tend !< tendency |
---|
6610 | |
---|
6611 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: root_extr_green |
---|
6612 | |
---|
6613 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: lambda_green_temp !< temp. lambda |
---|
6614 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: gamma_green_temp !< temp. gamma |
---|
6615 | |
---|
6616 | LOGICAL :: conserve_water_content = .true. |
---|
6617 | |
---|
6618 | |
---|
6619 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
6620 | |
---|
6621 | ! |
---|
6622 | !-- For horizontal surfaces |
---|
6623 | DO m = 1, surf_usm_h%ns |
---|
6624 | |
---|
6625 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
6626 | ! |
---|
6627 | !-- Obtain indices |
---|
6628 | i = surf_usm_h%i(m) |
---|
6629 | j = surf_usm_h%j(m) |
---|
6630 | k = surf_usm_h%k(m) |
---|
6631 | |
---|
6632 | DO kw = nzb_wall, nzt_wall |
---|
6633 | ! |
---|
6634 | !-- Calculate volumetric heat capacity of the soil, taking |
---|
6635 | !-- into account water content |
---|
6636 | 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)) & |
---|
6637 | + rho_c_water * swc_h(kw,m)) |
---|
6638 | |
---|
6639 | ! |
---|
6640 | !-- Calculate soil heat conductivity at the center of the soil |
---|
6641 | !-- layers |
---|
6642 | lambda_h_green_sat = lambda_h_green_sm ** (1.0_wp - swc_sat_h(kw,m)) * & |
---|
6643 | lambda_h_water ** swc_h(kw,m) |
---|
6644 | |
---|
6645 | ke = 1.0_wp + LOG10(MAX(0.1_wp,swc_h(kw,m) & |
---|
6646 | / swc_sat_h(kw,m))) |
---|
6647 | |
---|
6648 | lambda_green_temp(kw) = ke * (lambda_h_green_sat - lambda_h_green_dry) + & |
---|
6649 | lambda_h_green_dry |
---|
6650 | |
---|
6651 | ENDDO |
---|
6652 | |
---|
6653 | |
---|
6654 | ! |
---|
6655 | !-- Calculate soil heat conductivity (lambda_h) at the _stag level |
---|
6656 | !-- using linear interpolation. For pavement surface, the |
---|
6657 | !-- true pavement depth is considered |
---|
6658 | DO kw = nzb_wall, nzt_wall |
---|
6659 | surf_usm_h%lambda_h_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
6660 | * 0.5_wp |
---|
6661 | ENDDO |
---|
6662 | ! surf_usm_h%lambda_h_green(nzt_wall+1,m) = lambda_green_temp(nzt_wall+1) |
---|
6663 | !-------------------------------------------------------------------------- |
---|
6664 | |
---|
6665 | t_green_h(nzt_wall+1,m) = t_wall_h(nzb_wall,m) |
---|
6666 | ! |
---|
6667 | !-- prognostic equation for ground/roof temperature t_green_h |
---|
6668 | gtend(:) = 0.0_wp |
---|
6669 | gtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_total_green(nzb_wall,m)) * & |
---|
6670 | ( surf_usm_h%lambda_h_green(nzb_wall,m) * & |
---|
6671 | ( t_green_h(nzb_wall+1,m) & |
---|
6672 | - t_green_h(nzb_wall,m) ) * & |
---|
6673 | surf_usm_h%ddz_green(nzb_wall+1,m) & |
---|
6674 | + surf_usm_h%wghf_eb_green(m) ) * & |
---|
6675 | surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
6676 | |
---|
6677 | DO kw = nzb_wall+1, nzt_wall |
---|
6678 | gtend(kw) = (1.0_wp / surf_usm_h%rho_c_total_green(kw,m)) & |
---|
6679 | * ( surf_usm_h%lambda_h_green(kw,m) & |
---|
6680 | * ( t_green_h(kw+1,m) - t_green_h(kw,m) ) & |
---|
6681 | * surf_usm_h%ddz_green(kw+1,m) & |
---|
6682 | - surf_usm_h%lambda_h_green(kw-1,m) & |
---|
6683 | * ( t_green_h(kw,m) - t_green_h(kw-1,m) ) & |
---|
6684 | * surf_usm_h%ddz_green(kw,m) & |
---|
6685 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
6686 | ENDDO |
---|
6687 | |
---|
6688 | t_green_h_p(nzb_wall:nzt_wall,m) = t_green_h(nzb_wall:nzt_wall,m) & |
---|
6689 | + dt_3d * ( tsc(2) & |
---|
6690 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6691 | * surf_usm_h%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
6692 | |
---|
6693 | |
---|
6694 | ! |
---|
6695 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
6696 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6697 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6698 | DO kw = nzb_wall, nzt_wall |
---|
6699 | surf_usm_h%tt_green_m(kw,m) = gtend(kw) |
---|
6700 | ENDDO |
---|
6701 | ELSEIF ( intermediate_timestep_count < & |
---|
6702 | intermediate_timestep_count_max ) THEN |
---|
6703 | DO kw = nzb_wall, nzt_wall |
---|
6704 | surf_usm_h%tt_green_m(kw,m) = -9.5625_wp * gtend(kw) + & |
---|
6705 | 5.3125_wp * surf_usm_h%tt_green_m(kw,m) |
---|
6706 | ENDDO |
---|
6707 | ENDIF |
---|
6708 | ENDIF |
---|
6709 | |
---|
6710 | !-------------------------------------------------------------- |
---|
6711 | DO kw = nzb_wall, nzt_wall |
---|
6712 | |
---|
6713 | ! |
---|
6714 | !-- Calculate soil diffusivity at the center of the soil layers |
---|
6715 | lambda_green_temp(kw) = (- b_ch * surf_usm_h%gamma_w_green_sat(kw,m) * psi_sat & |
---|
6716 | / swc_sat_h(kw,m) ) * ( MAX( swc_h(kw,m), & |
---|
6717 | wilt_h(kw,m) ) / swc_sat_h(kw,m) )**( & |
---|
6718 | b_ch + 2.0_wp ) |
---|
6719 | |
---|
6720 | ! |
---|
6721 | !-- Parametrization of Van Genuchten |
---|
6722 | IF ( soil_type /= 7 ) THEN |
---|
6723 | ! |
---|
6724 | !-- Calculate the hydraulic conductivity after Van Genuchten |
---|
6725 | !-- (1980) |
---|
6726 | h_vg = ( ( (swc_res_h(kw,m) - swc_sat_h(kw,m)) / ( swc_res_h(kw,m) - & |
---|
6727 | MAX( swc_h(kw,m), wilt_h(kw,m) ) ) )**( & |
---|
6728 | surf_usm_h%n_vg_green(m) / (surf_usm_h%n_vg_green(m) - 1.0_wp ) ) - 1.0_wp & |
---|
6729 | )**( 1.0_wp / surf_usm_h%n_vg_green(m) ) / surf_usm_h%alpha_vg_green(m) |
---|
6730 | |
---|
6731 | |
---|
6732 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( ( (1.0_wp + & |
---|
6733 | ( surf_usm_h%alpha_vg_green(m) * h_vg )**surf_usm_h%n_vg_green(m))**( & |
---|
6734 | 1.0_wp - 1.0_wp / surf_usm_h%n_vg_green(m) ) - ( & |
---|
6735 | surf_usm_h%alpha_vg_green(m) * h_vg )**( surf_usm_h%n_vg_green(m) & |
---|
6736 | - 1.0_wp) )**2 ) & |
---|
6737 | / ( ( 1.0_wp + ( surf_usm_h%alpha_vg_green(m) * h_vg & |
---|
6738 | )**surf_usm_h%n_vg_green(m) )**( ( 1.0_wp - 1.0_wp & |
---|
6739 | / surf_usm_h%n_vg_green(m) ) *( surf_usm_h%l_vg_green(m) + 2.0_wp) ) ) |
---|
6740 | |
---|
6741 | ! |
---|
6742 | !-- Parametrization of Clapp & Hornberger |
---|
6743 | ELSE |
---|
6744 | gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( swc_h(kw,m) & |
---|
6745 | / swc_sat_h(kw,m) )**(2.0_wp * b_ch + 3.0_wp) |
---|
6746 | ENDIF |
---|
6747 | |
---|
6748 | ENDDO |
---|
6749 | |
---|
6750 | ! |
---|
6751 | !-- Prognostic equation for soil moisture content. Only performed, |
---|
6752 | !-- when humidity is enabled in the atmosphere |
---|
6753 | IF ( humidity ) THEN |
---|
6754 | ! |
---|
6755 | !-- Calculate soil diffusivity (lambda_w) at the _stag level |
---|
6756 | !-- using linear interpolation. To do: replace this with |
---|
6757 | !-- ECMWF-IFS Eq. 8.81 |
---|
6758 | DO kw = nzb_wall, nzt_wall-1 |
---|
6759 | |
---|
6760 | surf_usm_h%lambda_w_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) ) & |
---|
6761 | * 0.5_wp |
---|
6762 | surf_usm_h%gamma_w_green(kw,m) = ( gamma_green_temp(kw+1) + gamma_green_temp(kw) ) & |
---|
6763 | * 0.5_wp |
---|
6764 | |
---|
6765 | ENDDO |
---|
6766 | |
---|
6767 | ! |
---|
6768 | ! |
---|
6769 | !-- In case of a closed bottom (= water content is conserved), |
---|
6770 | !-- set hydraulic conductivity to zero to that no water will be |
---|
6771 | !-- lost in the bottom layer. |
---|
6772 | IF ( conserve_water_content ) THEN |
---|
6773 | surf_usm_h%gamma_w_green(kw,m) = 0.0_wp |
---|
6774 | ELSE |
---|
6775 | surf_usm_h%gamma_w_green(kw,m) = gamma_green_temp(nzt_wall) |
---|
6776 | ENDIF |
---|
6777 | |
---|
6778 | !-- The root extraction (= root_extr * qsws_veg_eb / (rho_l |
---|
6779 | !-- * l_v)) ensures the mass conservation for water. The |
---|
6780 | !-- transpiration of plants equals the cumulative withdrawals by |
---|
6781 | !-- the roots in the soil. The scheme takes into account the |
---|
6782 | !-- availability of water in the soil layers as well as the root |
---|
6783 | !-- fraction in the respective layer. Layer with moisture below |
---|
6784 | !-- wilting point will not contribute, which reflects the |
---|
6785 | !-- preference of plants to take water from moister layers. |
---|
6786 | |
---|
6787 | ! |
---|
6788 | !-- Calculate the root extraction (ECMWF 7.69, the sum of |
---|
6789 | !-- root_extr = 1). The energy balance solver guarantees a |
---|
6790 | !-- positive transpiration, so that there is no need for an |
---|
6791 | !-- additional check. |
---|
6792 | m_total = 0.0_wp |
---|
6793 | DO kw = nzb_wall, nzt_wall |
---|
6794 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
6795 | m_total = m_total + rootfr_h(kw,m) * swc_h(kw,m) |
---|
6796 | ENDIF |
---|
6797 | ENDDO |
---|
6798 | |
---|
6799 | IF ( m_total > 0.0_wp ) THEN |
---|
6800 | DO kw = nzb_wall, nzt_wall |
---|
6801 | IF ( swc_h(kw,m) > wilt_h(kw,m) ) THEN |
---|
6802 | root_extr_green(kw) = rootfr_h(kw,m) * swc_h(kw,m) & |
---|
6803 | / m_total |
---|
6804 | ELSE |
---|
6805 | root_extr_green(kw) = 0.0_wp |
---|
6806 | ENDIF |
---|
6807 | ENDDO |
---|
6808 | ENDIF |
---|
6809 | |
---|
6810 | ! |
---|
6811 | !-- Prognostic equation for soil water content m_soil. |
---|
6812 | tend(:) = 0.0_wp |
---|
6813 | |
---|
6814 | tend(nzb_wall) = ( surf_usm_h%lambda_w_green(nzb_wall,m) * ( & |
---|
6815 | swc_h(nzb_wall+1,m) - swc_h(nzb_wall,m) ) & |
---|
6816 | * surf_usm_h%ddz_green(nzb_wall+1,m) - surf_usm_h%gamma_w_green(nzb_wall,m) - ( & |
---|
6817 | root_extr_green(nzb_wall) * surf_usm_h%qsws_veg_eb(m) & |
---|
6818 | ! + surf_usm_h%qsws_soil_eb_green(m) |
---|
6819 | ) * drho_l_lv ) & |
---|
6820 | * surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
6821 | |
---|
6822 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
6823 | tend(kw) = ( surf_usm_h%lambda_w_green(kw,m) * ( swc_h(kw+1,m) & |
---|
6824 | - swc_h(kw,m) ) * surf_usm_h%ddz_green(kw+1,m) & |
---|
6825 | - surf_usm_h%gamma_w_green(kw,m) & |
---|
6826 | - surf_usm_h%lambda_w_green(kw-1,m) * (swc_h(kw,m) - & |
---|
6827 | swc_h(kw-1,m)) * surf_usm_h%ddz_green(kw,m) & |
---|
6828 | + surf_usm_h%gamma_w_green(kw-1,m) - (root_extr_green(kw) & |
---|
6829 | * surf_usm_h%qsws_veg_eb(m) * drho_l_lv) & |
---|
6830 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
6831 | |
---|
6832 | ENDDO |
---|
6833 | tend(nzt_wall) = ( - surf_usm_h%gamma_w_green(nzt_wall,m) & |
---|
6834 | - surf_usm_h%lambda_w_green(nzt_wall-1,m) & |
---|
6835 | * (swc_h(nzt_wall,m) & |
---|
6836 | - swc_h(nzt_wall-1,m)) & |
---|
6837 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
6838 | + surf_usm_h%gamma_w_green(nzt_wall-1,m) - ( & |
---|
6839 | root_extr_green(nzt_wall) & |
---|
6840 | * surf_usm_h%qsws_veg_eb(m) * drho_l_lv ) & |
---|
6841 | ) * surf_usm_h%ddz_green_stag(nzt_wall,m) |
---|
6842 | |
---|
6843 | swc_h_p(nzb_wall:nzt_wall,m) = swc_h(nzb_wall:nzt_wall,m)& |
---|
6844 | + dt_3d * ( tsc(2) * tend(:) & |
---|
6845 | + tsc(3) * surf_usm_h%tswc_h_m(:,m) ) |
---|
6846 | |
---|
6847 | ! |
---|
6848 | !-- Account for dry soils (find a better solution here!) |
---|
6849 | DO kw = nzb_wall, nzt_wall |
---|
6850 | IF ( swc_h_p(kw,m) < 0.0_wp ) swc_h_p(kw,m) = 0.0_wp |
---|
6851 | ENDDO |
---|
6852 | |
---|
6853 | ! |
---|
6854 | !-- Calculate m_soil tendencies for the next Runge-Kutta step |
---|
6855 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6856 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6857 | DO kw = nzb_wall, nzt_wall |
---|
6858 | surf_usm_h%tswc_h_m(kw,m) = tend(kw) |
---|
6859 | ENDDO |
---|
6860 | ELSEIF ( intermediate_timestep_count < & |
---|
6861 | intermediate_timestep_count_max ) THEN |
---|
6862 | DO kw = nzb_wall, nzt_wall |
---|
6863 | surf_usm_h%tswc_h_m(kw,m) = -9.5625_wp * tend(kw) + 5.3125_wp& |
---|
6864 | * surf_usm_h%tswc_h_m(kw,m) |
---|
6865 | ENDDO |
---|
6866 | ENDIF |
---|
6867 | ENDIF |
---|
6868 | ENDIF |
---|
6869 | !-------------------------------------------------------------- |
---|
6870 | ENDIF |
---|
6871 | |
---|
6872 | ENDDO |
---|
6873 | |
---|
6874 | ! |
---|
6875 | !-- For vertical surfaces |
---|
6876 | DO l = 0, 3 |
---|
6877 | DO m = 1, surf_usm_v(l)%ns |
---|
6878 | |
---|
6879 | if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
6880 | if (1.gt.2) then |
---|
6881 | ! |
---|
6882 | !-- Obtain indices |
---|
6883 | i = surf_usm_v(l)%i(m) |
---|
6884 | j = surf_usm_v(l)%j(m) |
---|
6885 | k = surf_usm_v(l)%k(m) |
---|
6886 | |
---|
6887 | t_green_v(l)%t(nzt_wall+1,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
6888 | ! |
---|
6889 | !-- prognostic equation for green temperature t_green_v |
---|
6890 | gtend(:) = 0.0_wp |
---|
6891 | gtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_green(nzb_wall,m)) * & |
---|
6892 | ( surf_usm_v(l)%lambda_h_green(nzb_wall,m) * & |
---|
6893 | ( t_green_v(l)%t(nzb_wall+1,m) & |
---|
6894 | - t_green_v(l)%t(nzb_wall,m) ) * & |
---|
6895 | surf_usm_v(l)%ddz_green(nzb_wall+1,m) & |
---|
6896 | + surf_usm_v(l)%wghf_eb(m) ) * & |
---|
6897 | surf_usm_v(l)%ddz_green_stag(nzb_wall,m) |
---|
6898 | |
---|
6899 | DO kw = nzb_wall+1, nzt_wall |
---|
6900 | gtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_green(kw,m)) & |
---|
6901 | * ( surf_usm_v(l)%lambda_h_green(kw,m) & |
---|
6902 | * ( t_green_v(l)%t(kw+1,m) - t_green_v(l)%t(kw,m) ) & |
---|
6903 | * surf_usm_v(l)%ddz_green(kw+1,m) & |
---|
6904 | - surf_usm_v(l)%lambda_h(kw-1,m) & |
---|
6905 | * ( t_green_v(l)%t(kw,m) - t_green_v(l)%t(kw-1,m) ) & |
---|
6906 | * surf_usm_v(l)%ddz_green(kw,m) ) & |
---|
6907 | * surf_usm_v(l)%ddz_green_stag(kw,m) |
---|
6908 | ENDDO |
---|
6909 | |
---|
6910 | t_green_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
6911 | t_green_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
6912 | + dt_3d * ( tsc(2) & |
---|
6913 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
6914 | * surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
6915 | |
---|
6916 | ! |
---|
6917 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
6918 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
6919 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
6920 | DO kw = nzb_wall, nzt_wall |
---|
6921 | surf_usm_v(l)%tt_green_m(kw,m) = gtend(kw) |
---|
6922 | ENDDO |
---|
6923 | ELSEIF ( intermediate_timestep_count < & |
---|
6924 | intermediate_timestep_count_max ) THEN |
---|
6925 | DO kw = nzb_wall, nzt_wall |
---|
6926 | surf_usm_v(l)%tt_green_m(kw,m) = & |
---|
6927 | - 9.5625_wp * gtend(kw) + & |
---|
6928 | 5.3125_wp * surf_usm_v(l)%tt_green_m(kw,m) |
---|
6929 | ENDDO |
---|
6930 | ENDIF |
---|
6931 | ENDIF |
---|
6932 | endif |
---|
6933 | |
---|
6934 | DO kw = nzb_wall, nzt_wall+1 |
---|
6935 | t_green_v(l)%t(kw,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
6936 | ENDDO |
---|
6937 | |
---|
6938 | ENDIF |
---|
6939 | |
---|
6940 | ENDDO |
---|
6941 | ENDDO |
---|
6942 | |
---|
6943 | END SUBROUTINE usm_green_heat_model |
---|
6944 | |
---|
6945 | !------------------------------------------------------------------------------! |
---|
6946 | ! Description: |
---|
6947 | ! ------------ |
---|
6948 | !> Parin for &usm_par for urban surface model |
---|
6949 | !------------------------------------------------------------------------------! |
---|
6950 | SUBROUTINE usm_parin |
---|
6951 | |
---|
6952 | IMPLICIT NONE |
---|
6953 | |
---|
6954 | CHARACTER (LEN=80) :: line !< string containing current line of file PARIN |
---|
6955 | |
---|
6956 | NAMELIST /urban_surface_par/ & |
---|
6957 | building_type, & |
---|
6958 | land_category, & |
---|
6959 | naheatlayers, & |
---|
6960 | pedestrian_category, & |
---|
6961 | roughness_concrete, & |
---|
6962 | read_wall_temp_3d, & |
---|
6963 | roof_category, & |
---|
6964 | urban_surface, & |
---|
6965 | usm_anthropogenic_heat, & |
---|
6966 | usm_material_model, & |
---|
6967 | wall_category, & |
---|
6968 | indoor_model, & |
---|
6969 | wall_inner_temperature, & |
---|
6970 | roof_inner_temperature, & |
---|
6971 | soil_inner_temperature, & |
---|
6972 | window_inner_temperature, & |
---|
6973 | usm_wall_mod |
---|
6974 | |
---|
6975 | NAMELIST /urban_surface_parameters/ & |
---|
6976 | building_type, & |
---|
6977 | land_category, & |
---|
6978 | naheatlayers, & |
---|
6979 | pedestrian_category, & |
---|
6980 | roughness_concrete, & |
---|
6981 | read_wall_temp_3d, & |
---|
6982 | roof_category, & |
---|
6983 | urban_surface, & |
---|
6984 | usm_anthropogenic_heat, & |
---|
6985 | usm_material_model, & |
---|
6986 | wall_category, & |
---|
6987 | indoor_model, & |
---|
6988 | wall_inner_temperature, & |
---|
6989 | roof_inner_temperature, & |
---|
6990 | soil_inner_temperature, & |
---|
6991 | window_inner_temperature, & |
---|
6992 | usm_wall_mod |
---|
6993 | |
---|
6994 | |
---|
6995 | |
---|
6996 | ! |
---|
6997 | !-- Try to find urban surface model package |
---|
6998 | REWIND ( 11 ) |
---|
6999 | line = ' ' |
---|
7000 | DO WHILE ( INDEX( line, '&urban_surface_parameters' ) == 0 ) |
---|
7001 | READ ( 11, '(A)', END=12 ) line |
---|
7002 | ENDDO |
---|
7003 | BACKSPACE ( 11 ) |
---|
7004 | |
---|
7005 | ! |
---|
7006 | !-- Read user-defined namelist |
---|
7007 | READ ( 11, urban_surface_parameters, ERR = 10 ) |
---|
7008 | |
---|
7009 | ! |
---|
7010 | !-- Set flag that indicates that the urban surface model is switched on |
---|
7011 | urban_surface = .TRUE. |
---|
7012 | |
---|
7013 | GOTO 14 |
---|
7014 | |
---|
7015 | 10 BACKSPACE( 11 ) |
---|
7016 | READ( 11 , '(A)') line |
---|
7017 | CALL parin_fail_message( 'urban_surface_parameters', line ) |
---|
7018 | ! |
---|
7019 | !-- Try to find old namelist |
---|
7020 | 12 REWIND ( 11 ) |
---|
7021 | line = ' ' |
---|
7022 | DO WHILE ( INDEX( line, '&urban_surface_par' ) == 0 ) |
---|
7023 | READ ( 11, '(A)', END=14 ) line |
---|
7024 | ENDDO |
---|
7025 | BACKSPACE ( 11 ) |
---|
7026 | |
---|
7027 | ! |
---|
7028 | !-- Read user-defined namelist |
---|
7029 | READ ( 11, urban_surface_par, ERR = 13, END = 14 ) |
---|
7030 | |
---|
7031 | message_string = 'namelist urban_surface_par is deprecated and will be ' // & |
---|
7032 | 'removed in near future. Please use namelist ' // & |
---|
7033 | 'urban_surface_parameters instead' |
---|
7034 | CALL message( 'usm_parin', 'PA0487', 0, 1, 0, 6, 0 ) |
---|
7035 | |
---|
7036 | ! |
---|
7037 | !-- Set flag that indicates that the urban surface model is switched on |
---|
7038 | urban_surface = .TRUE. |
---|
7039 | |
---|
7040 | GOTO 14 |
---|
7041 | |
---|
7042 | 13 BACKSPACE( 11 ) |
---|
7043 | READ( 11 , '(A)') line |
---|
7044 | CALL parin_fail_message( 'urban_surface_par', line ) |
---|
7045 | |
---|
7046 | |
---|
7047 | 14 CONTINUE |
---|
7048 | |
---|
7049 | |
---|
7050 | END SUBROUTINE usm_parin |
---|
7051 | |
---|
7052 | !------------------------------------------------------------------------------! |
---|
7053 | ! Description: |
---|
7054 | ! ------------ |
---|
7055 | !> Calculates temperature near surface (10 cm) for indoor model |
---|
7056 | !------------------------------------------------------------------------------! |
---|
7057 | SUBROUTINE usm_temperature_near_surface |
---|
7058 | |
---|
7059 | IMPLICIT NONE |
---|
7060 | |
---|
7061 | INTEGER(iwp) :: i, j, k, l, m !< running indices |
---|
7062 | |
---|
7063 | ! |
---|
7064 | !-- First, treat horizontal surface elements |
---|
7065 | DO m = 1, surf_usm_h%ns |
---|
7066 | |
---|
7067 | !-- Get indices of respective grid point |
---|
7068 | i = surf_usm_h%i(m) |
---|
7069 | j = surf_usm_h%j(m) |
---|
7070 | k = surf_usm_h%k(m) |
---|
7071 | |
---|
7072 | t_surf_10cm_h(m) = surf_usm_h%pt_surface(m) + surf_usm_h%ts(m) / kappa & |
---|
7073 | * ( log( 0.1_wp / surf_usm_h%z0h(m) ) & |
---|
7074 | - psi_h( 0.1_wp / surf_usm_h%ol(m) ) & |
---|
7075 | + psi_h( surf_usm_h%z0h(m) / surf_usm_h%ol(m) ) ) |
---|
7076 | |
---|
7077 | ENDDO |
---|
7078 | ! |
---|
7079 | !-- Now, treat vertical surface elements |
---|
7080 | DO l = 0, 3 |
---|
7081 | DO m = 1, surf_usm_v(l)%ns |
---|
7082 | |
---|
7083 | !-- Get indices of respective grid point |
---|
7084 | i = surf_usm_v(l)%i(m) |
---|
7085 | j = surf_usm_v(l)%j(m) |
---|
7086 | k = surf_usm_v(l)%k(m) |
---|
7087 | |
---|
7088 | t_surf_10cm_v(l)%t(m) =surf_usm_v(l)%pt_surface(m) + surf_usm_v(l)%ts(m) / kappa & |
---|
7089 | * ( log( 0.1_wp / surf_usm_v(l)%z0h(m) ) & |
---|
7090 | - psi_h( 0.1_wp / surf_usm_v(l)%ol(m) ) & |
---|
7091 | + psi_h( surf_usm_v(l)%z0h(m) / surf_usm_v(l)%ol(m) ) ) |
---|
7092 | |
---|
7093 | ENDDO |
---|
7094 | |
---|
7095 | ENDDO |
---|
7096 | |
---|
7097 | |
---|
7098 | END SUBROUTINE usm_temperature_near_surface |
---|
7099 | |
---|
7100 | |
---|
7101 | |
---|
7102 | !------------------------------------------------------------------------------! |
---|
7103 | ! Description: |
---|
7104 | ! ------------ |
---|
7105 | ! |
---|
7106 | !> This subroutine is part of the urban surface model. |
---|
7107 | !> It reads daily heat produced by anthropogenic sources |
---|
7108 | !> and the diurnal cycle of the heat. |
---|
7109 | !------------------------------------------------------------------------------! |
---|
7110 | SUBROUTINE usm_read_anthropogenic_heat |
---|
7111 | |
---|
7112 | INTEGER(iwp) :: i,j,k,ii |
---|
7113 | REAL(wp) :: heat |
---|
7114 | |
---|
7115 | !-- allocation of array of sources of anthropogenic heat and their diural profile |
---|
7116 | ALLOCATE( aheat(naheatlayers,nys:nyn,nxl:nxr) ) |
---|
7117 | ALLOCATE( aheatprof(naheatlayers,0:24) ) |
---|
7118 | |
---|
7119 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7120 | !-- read daily amount of heat and its daily cycle |
---|
7121 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7122 | aheat = 0.0_wp |
---|
7123 | DO ii = 0, io_blocks-1 |
---|
7124 | IF ( ii == io_group ) THEN |
---|
7125 | |
---|
7126 | !-- open anthropogenic heat file |
---|
7127 | OPEN( 151, file='ANTHROPOGENIC_HEAT'//TRIM(coupling_char), action='read', & |
---|
7128 | status='old', form='formatted', err=11 ) |
---|
7129 | i = 0 |
---|
7130 | j = 0 |
---|
7131 | DO |
---|
7132 | READ( 151, *, err=12, end=13 ) i, j, k, heat |
---|
7133 | IF ( i >= nxl .AND. i <= nxr .AND. j >= nys .AND. j <= nyn ) THEN |
---|
7134 | IF ( k <= naheatlayers .AND. k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
7135 | !-- write heat into the array |
---|
7136 | aheat(k,j,i) = heat |
---|
7137 | ENDIF |
---|
7138 | ENDIF |
---|
7139 | CYCLE |
---|
7140 | 12 WRITE(message_string,'(a,2i4)') 'error in file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' after line ',i,j |
---|
7141 | CALL message( 'usm_read_anthropogenic_heat', 'PA0515', 0, 1, 0, 6, 0 ) |
---|
7142 | ENDDO |
---|
7143 | 13 CLOSE(151) |
---|
7144 | CYCLE |
---|
7145 | 11 message_string = 'file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' does not exist' |
---|
7146 | CALL message( 'usm_read_anthropogenic_heat', 'PA0516', 1, 2, 0, 6, 0 ) |
---|
7147 | ENDIF |
---|
7148 | |
---|
7149 | #if defined( __parallel ) |
---|
7150 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7151 | #endif |
---|
7152 | ENDDO |
---|
7153 | |
---|
7154 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7155 | !-- read diurnal profiles of heat sources |
---|
7156 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7157 | aheatprof = 0.0_wp |
---|
7158 | DO ii = 0, io_blocks-1 |
---|
7159 | IF ( ii == io_group ) THEN |
---|
7160 | |
---|
7161 | !-- open anthropogenic heat profile file |
---|
7162 | OPEN( 151, file='ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char), action='read', & |
---|
7163 | status='old', form='formatted', err=21 ) |
---|
7164 | i = 0 |
---|
7165 | DO |
---|
7166 | READ( 151, *, err=22, end=23 ) i, k, heat |
---|
7167 | IF ( i >= 0 .AND. i <= 24 .AND. k <= naheatlayers ) THEN |
---|
7168 | !-- write heat into the array |
---|
7169 | aheatprof(k,i) = heat |
---|
7170 | ENDIF |
---|
7171 | CYCLE |
---|
7172 | 22 WRITE(message_string,'(a,i4)') 'error in file ANTHROPOGENIC_HEAT_PROFILE'// & |
---|
7173 | TRIM(coupling_char)//' after line ',i |
---|
7174 | CALL message( 'usm_read_anthropogenic_heat', 'PA0517', 0, 1, 0, 6, 0 ) |
---|
7175 | ENDDO |
---|
7176 | aheatprof(:,24) = aheatprof(:,0) |
---|
7177 | 23 CLOSE(151) |
---|
7178 | CYCLE |
---|
7179 | 21 message_string = 'file ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char)//' does not exist' |
---|
7180 | CALL message( 'usm_read_anthropogenic_heat', 'PA0518', 1, 2, 0, 6, 0 ) |
---|
7181 | ENDIF |
---|
7182 | |
---|
7183 | #if defined( __parallel ) |
---|
7184 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7185 | #endif |
---|
7186 | ENDDO |
---|
7187 | |
---|
7188 | END SUBROUTINE usm_read_anthropogenic_heat |
---|
7189 | |
---|
7190 | |
---|
7191 | !------------------------------------------------------------------------------! |
---|
7192 | ! Description: |
---|
7193 | ! ------------ |
---|
7194 | !> Soubroutine reads t_surf and t_wall data from restart files |
---|
7195 | !------------------------------------------------------------------------------! |
---|
7196 | SUBROUTINE usm_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & |
---|
7197 | nxr_on_file, nynf, nync, nyn_on_file, nysf, nysc,& |
---|
7198 | nys_on_file, found ) |
---|
7199 | |
---|
7200 | |
---|
7201 | USE control_parameters, & |
---|
7202 | ONLY: length, restart_string |
---|
7203 | |
---|
7204 | IMPLICIT NONE |
---|
7205 | |
---|
7206 | INTEGER(iwp) :: l !< index variable for surface type |
---|
7207 | INTEGER(iwp) :: i !< running index over input files |
---|
7208 | INTEGER(iwp) :: k !< running index over previous input files covering current local domain |
---|
7209 | INTEGER(iwp) :: ns_h_on_file_usm !< number of horizontal surface elements (urban type) on file |
---|
7210 | INTEGER(iwp) :: nxlc !< index of left boundary on current subdomain |
---|
7211 | INTEGER(iwp) :: nxlf !< index of left boundary on former subdomain |
---|
7212 | INTEGER(iwp) :: nxl_on_file !< index of left boundary on former local domain |
---|
7213 | INTEGER(iwp) :: nxrc !< index of right boundary on current subdomain |
---|
7214 | INTEGER(iwp) :: nxrf !< index of right boundary on former subdomain |
---|
7215 | INTEGER(iwp) :: nxr_on_file !< index of right boundary on former local domain |
---|
7216 | INTEGER(iwp) :: nync !< index of north boundary on current subdomain |
---|
7217 | INTEGER(iwp) :: nynf !< index of north boundary on former subdomain |
---|
7218 | INTEGER(iwp) :: nyn_on_file !< index of north boundary on former local domain |
---|
7219 | INTEGER(iwp) :: nysc !< index of south boundary on current subdomain |
---|
7220 | INTEGER(iwp) :: nysf !< index of south boundary on former subdomain |
---|
7221 | INTEGER(iwp) :: nys_on_file !< index of south boundary on former local domain |
---|
7222 | |
---|
7223 | INTEGER(iwp) :: ns_v_on_file_usm(0:3) !< number of vertical surface elements (urban type) on file |
---|
7224 | |
---|
7225 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: start_index_on_file |
---|
7226 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: end_index_on_file |
---|
7227 | |
---|
7228 | LOGICAL, INTENT(OUT) :: found |
---|
7229 | |
---|
7230 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_wall_h, tmp_surf_window_h, tmp_surf_green_h |
---|
7231 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_wall_h, tmp_window_h, tmp_green_h |
---|
7232 | |
---|
7233 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_wall_v, tmp_surf_window_v, tmp_surf_green_v |
---|
7234 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_wall_v, tmp_window_v, tmp_green_v |
---|
7235 | |
---|
7236 | |
---|
7237 | found = .TRUE. |
---|
7238 | |
---|
7239 | |
---|
7240 | SELECT CASE ( restart_string(1:length) ) |
---|
7241 | |
---|
7242 | CASE ( 'ns_h_on_file_usm') |
---|
7243 | IF ( k == 1 ) THEN |
---|
7244 | READ ( 13 ) ns_h_on_file_usm |
---|
7245 | |
---|
7246 | IF ( ALLOCATED( tmp_surf_wall_h ) ) DEALLOCATE( tmp_surf_wall_h ) |
---|
7247 | IF ( ALLOCATED( tmp_wall_h ) ) DEALLOCATE( tmp_wall_h ) |
---|
7248 | IF ( ALLOCATED( tmp_surf_window_h ) ) & |
---|
7249 | DEALLOCATE( tmp_surf_window_h ) |
---|
7250 | IF ( ALLOCATED( tmp_window_h) ) DEALLOCATE( tmp_window_h ) |
---|
7251 | IF ( ALLOCATED( tmp_surf_green_h) ) & |
---|
7252 | DEALLOCATE( tmp_surf_green_h ) |
---|
7253 | IF ( ALLOCATED( tmp_green_h) ) DEALLOCATE( tmp_green_h ) |
---|
7254 | |
---|
7255 | ! |
---|
7256 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
7257 | !-- the size of allocated surface elements do not necessarily |
---|
7258 | !-- need to match the size of present surface elements on |
---|
7259 | !-- current processor, as the number of processors between |
---|
7260 | !-- restarts can change. |
---|
7261 | ALLOCATE( tmp_surf_wall_h(1:ns_h_on_file_usm) ) |
---|
7262 | ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1, & |
---|
7263 | 1:ns_h_on_file_usm) ) |
---|
7264 | ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) ) |
---|
7265 | ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1, & |
---|
7266 | 1:ns_h_on_file_usm) ) |
---|
7267 | ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) ) |
---|
7268 | ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1, & |
---|
7269 | 1:ns_h_on_file_usm) ) |
---|
7270 | |
---|
7271 | ENDIF |
---|
7272 | |
---|
7273 | CASE ( 'ns_v_on_file_usm') |
---|
7274 | IF ( k == 1 ) THEN |
---|
7275 | READ ( 13 ) ns_v_on_file_usm |
---|
7276 | |
---|
7277 | DO l = 0, 3 |
---|
7278 | IF ( ALLOCATED( tmp_surf_wall_v(l)%t ) ) & |
---|
7279 | DEALLOCATE( tmp_surf_wall_v(l)%t ) |
---|
7280 | IF ( ALLOCATED( tmp_wall_v(l)%t ) ) & |
---|
7281 | DEALLOCATE( tmp_wall_v(l)%t ) |
---|
7282 | IF ( ALLOCATED( tmp_surf_window_v(l)%t ) ) & |
---|
7283 | DEALLOCATE( tmp_surf_window_v(l)%t ) |
---|
7284 | IF ( ALLOCATED( tmp_window_v(l)%t ) ) & |
---|
7285 | DEALLOCATE( tmp_window_v(l)%t ) |
---|
7286 | IF ( ALLOCATED( tmp_surf_green_v(l)%t ) ) & |
---|
7287 | DEALLOCATE( tmp_surf_green_v(l)%t ) |
---|
7288 | IF ( ALLOCATED( tmp_green_v(l)%t ) ) & |
---|
7289 | DEALLOCATE( tmp_green_v(l)%t ) |
---|
7290 | ENDDO |
---|
7291 | |
---|
7292 | ! |
---|
7293 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
7294 | !-- the size of allocated surface elements do not necessarily |
---|
7295 | !-- need to match the size of present surface elements on |
---|
7296 | !-- current processor, as the number of processors between |
---|
7297 | !-- restarts can change. |
---|
7298 | DO l = 0, 3 |
---|
7299 | ALLOCATE( tmp_surf_wall_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
7300 | ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
7301 | 1:ns_v_on_file_usm(l) ) ) |
---|
7302 | ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
7303 | ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
7304 | 1:ns_v_on_file_usm(l) ) ) |
---|
7305 | ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
7306 | ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
7307 | 1:ns_v_on_file_usm(l) ) ) |
---|
7308 | ENDDO |
---|
7309 | |
---|
7310 | ENDIF |
---|
7311 | |
---|
7312 | CASE ( 'usm_start_index_h', 'usm_start_index_v' ) |
---|
7313 | IF ( k == 1 ) THEN |
---|
7314 | |
---|
7315 | IF ( ALLOCATED( start_index_on_file ) ) & |
---|
7316 | DEALLOCATE( start_index_on_file ) |
---|
7317 | |
---|
7318 | ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file, & |
---|
7319 | nxl_on_file:nxr_on_file) ) |
---|
7320 | |
---|
7321 | READ ( 13 ) start_index_on_file |
---|
7322 | |
---|
7323 | ENDIF |
---|
7324 | |
---|
7325 | CASE ( 'usm_end_index_h', 'usm_end_index_v' ) |
---|
7326 | IF ( k == 1 ) THEN |
---|
7327 | |
---|
7328 | IF ( ALLOCATED( end_index_on_file ) ) & |
---|
7329 | DEALLOCATE( end_index_on_file ) |
---|
7330 | |
---|
7331 | ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file, & |
---|
7332 | nxl_on_file:nxr_on_file) ) |
---|
7333 | |
---|
7334 | READ ( 13 ) end_index_on_file |
---|
7335 | |
---|
7336 | ENDIF |
---|
7337 | |
---|
7338 | CASE ( 't_surf_wall_h' ) |
---|
7339 | #if defined( __nopointer ) |
---|
7340 | IF ( k == 1 ) THEN |
---|
7341 | IF ( .NOT. ALLOCATED( t_surf_wall_h ) ) & |
---|
7342 | ALLOCATE( t_surf_wall_h(1:surf_usm_h%ns) ) |
---|
7343 | READ ( 13 ) tmp_surf_wall_h |
---|
7344 | ENDIF |
---|
7345 | CALL surface_restore_elements( & |
---|
7346 | t_surf_wall_h, tmp_surf_wall_h, & |
---|
7347 | surf_usm_h%start_index, & |
---|
7348 | start_index_on_file, & |
---|
7349 | end_index_on_file, & |
---|
7350 | nxlc, nysc, & |
---|
7351 | nxlf, nxrf, nysf, nynf, & |
---|
7352 | nys_on_file, nyn_on_file, & |
---|
7353 | nxl_on_file,nxr_on_file ) |
---|
7354 | #else |
---|
7355 | IF ( k == 1 ) THEN |
---|
7356 | IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) ) & |
---|
7357 | ALLOCATE( t_surf_wall_h_1(1:surf_usm_h%ns) ) |
---|
7358 | READ ( 13 ) tmp_surf_wall_h |
---|
7359 | ENDIF |
---|
7360 | CALL surface_restore_elements( & |
---|
7361 | t_surf_wall_h_1, tmp_surf_wall_h, & |
---|
7362 | surf_usm_h%start_index, & |
---|
7363 | start_index_on_file, & |
---|
7364 | end_index_on_file, & |
---|
7365 | nxlc, nysc, & |
---|
7366 | nxlf, nxrf, nysf, nynf, & |
---|
7367 | nys_on_file, nyn_on_file, & |
---|
7368 | nxl_on_file,nxr_on_file ) |
---|
7369 | #endif |
---|
7370 | |
---|
7371 | CASE ( 't_surf_wall_v(0)' ) |
---|
7372 | #if defined( __nopointer ) |
---|
7373 | IF ( k == 1 ) THEN |
---|
7374 | IF ( .NOT. ALLOCATED( t_surf_wall_v(0)%t ) ) & |
---|
7375 | ALLOCATE( t_surf_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7376 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
7377 | ENDIF |
---|
7378 | CALL surface_restore_elements( & |
---|
7379 | t_surf_wall_v(0)%t, tmp_surf_wall_v(0)%t, & |
---|
7380 | surf_usm_v(0)%start_index, & |
---|
7381 | start_index_on_file, & |
---|
7382 | end_index_on_file, & |
---|
7383 | nxlc, nysc, & |
---|
7384 | nxlf, nxrf, nysf, nynf, & |
---|
7385 | nys_on_file, nyn_on_file, & |
---|
7386 | nxl_on_file,nxr_on_file ) |
---|
7387 | #else |
---|
7388 | IF ( k == 1 ) THEN |
---|
7389 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(0)%t ) ) & |
---|
7390 | ALLOCATE( t_surf_wall_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7391 | READ ( 13 ) tmp_surf_wall_v(0)%t |
---|
7392 | ENDIF |
---|
7393 | CALL surface_restore_elements( & |
---|
7394 | t_surf_wall_v_1(0)%t, tmp_surf_wall_v(0)%t, & |
---|
7395 | surf_usm_v(0)%start_index, & |
---|
7396 | start_index_on_file, & |
---|
7397 | end_index_on_file, & |
---|
7398 | nxlc, nysc, & |
---|
7399 | nxlf, nxrf, nysf, nynf, & |
---|
7400 | nys_on_file, nyn_on_file, & |
---|
7401 | nxl_on_file,nxr_on_file ) |
---|
7402 | #endif |
---|
7403 | |
---|
7404 | CASE ( 't_surf_wall_v(1)' ) |
---|
7405 | #if defined( __nopointer ) |
---|
7406 | IF ( k == 1 ) THEN |
---|
7407 | IF ( .NOT. ALLOCATED( t_surf_wall_v(1)%t ) ) & |
---|
7408 | ALLOCATE( t_surf_wall_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7409 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
7410 | ENDIF |
---|
7411 | CALL surface_restore_elements( & |
---|
7412 | t_surf_wall_v(1)%t, tmp_surf_wall_v(1)%t, & |
---|
7413 | surf_usm_v(1)%start_index, & |
---|
7414 | start_index_on_file, & |
---|
7415 | end_index_on_file, & |
---|
7416 | nxlc, nysc, & |
---|
7417 | nxlf, nxrf, nysf, nynf, & |
---|
7418 | nys_on_file, nyn_on_file, & |
---|
7419 | nxl_on_file,nxr_on_file ) |
---|
7420 | #else |
---|
7421 | IF ( k == 1 ) THEN |
---|
7422 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(1)%t ) ) & |
---|
7423 | ALLOCATE( t_surf_wall_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7424 | READ ( 13 ) tmp_surf_wall_v(1)%t |
---|
7425 | ENDIF |
---|
7426 | CALL surface_restore_elements( & |
---|
7427 | t_surf_wall_v_1(1)%t, tmp_surf_wall_v(1)%t, & |
---|
7428 | surf_usm_v(1)%start_index, & |
---|
7429 | start_index_on_file, & |
---|
7430 | end_index_on_file, & |
---|
7431 | nxlc, nysc, & |
---|
7432 | nxlf, nxrf, nysf, nynf, & |
---|
7433 | nys_on_file, nyn_on_file, & |
---|
7434 | nxl_on_file,nxr_on_file ) |
---|
7435 | #endif |
---|
7436 | |
---|
7437 | CASE ( 't_surf_wall_v(2)' ) |
---|
7438 | #if defined( __nopointer ) |
---|
7439 | IF ( k == 1 ) THEN |
---|
7440 | IF ( .NOT. ALLOCATED( t_surf_wall_v(2)%t ) ) & |
---|
7441 | ALLOCATE( t_surf_wall_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7442 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
7443 | ENDIF |
---|
7444 | CALL surface_restore_elements( & |
---|
7445 | t_surf_wall_v(2)%t, tmp_surf_wall_v(2)%t, & |
---|
7446 | surf_usm_v(2)%start_index, & |
---|
7447 | start_index_on_file, & |
---|
7448 | end_index_on_file, & |
---|
7449 | nxlc, nysc, & |
---|
7450 | nxlf, nxrf, nysf, nynf, & |
---|
7451 | nys_on_file, nyn_on_file, & |
---|
7452 | nxl_on_file,nxr_on_file ) |
---|
7453 | #else |
---|
7454 | IF ( k == 1 ) THEN |
---|
7455 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(2)%t ) ) & |
---|
7456 | ALLOCATE( t_surf_wall_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7457 | READ ( 13 ) tmp_surf_wall_v(2)%t |
---|
7458 | ENDIF |
---|
7459 | CALL surface_restore_elements( & |
---|
7460 | t_surf_wall_v_1(2)%t, tmp_surf_wall_v(2)%t, & |
---|
7461 | surf_usm_v(2)%start_index, & |
---|
7462 | start_index_on_file, & |
---|
7463 | end_index_on_file, & |
---|
7464 | nxlc, nysc, & |
---|
7465 | nxlf, nxrf, nysf, nynf, & |
---|
7466 | nys_on_file, nyn_on_file, & |
---|
7467 | nxl_on_file,nxr_on_file ) |
---|
7468 | #endif |
---|
7469 | |
---|
7470 | CASE ( 't_surf_wall_v(3)' ) |
---|
7471 | #if defined( __nopointer ) |
---|
7472 | IF ( k == 1 ) THEN |
---|
7473 | IF ( .NOT. ALLOCATED( t_surf_wall_v(3)%t ) ) & |
---|
7474 | ALLOCATE( t_surf_wall_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7475 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
7476 | ENDIF |
---|
7477 | CALL surface_restore_elements( & |
---|
7478 | t_surf_wall_v(3)%t, tmp_surf_wall_v(3)%t, & |
---|
7479 | surf_usm_v(3)%start_index, & |
---|
7480 | start_index_on_file, & |
---|
7481 | end_index_on_file, & |
---|
7482 | nxlc, nysc, & |
---|
7483 | nxlf, nxrf, nysf, nynf, & |
---|
7484 | nys_on_file, nyn_on_file, & |
---|
7485 | nxl_on_file,nxr_on_file ) |
---|
7486 | #else |
---|
7487 | IF ( k == 1 ) THEN |
---|
7488 | IF ( .NOT. ALLOCATED( t_surf_wall_v_1(3)%t ) ) & |
---|
7489 | ALLOCATE( t_surf_wall_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7490 | READ ( 13 ) tmp_surf_wall_v(3)%t |
---|
7491 | ENDIF |
---|
7492 | CALL surface_restore_elements( & |
---|
7493 | t_surf_wall_v_1(3)%t, tmp_surf_wall_v(3)%t, & |
---|
7494 | surf_usm_v(3)%start_index, & |
---|
7495 | start_index_on_file, & |
---|
7496 | end_index_on_file, & |
---|
7497 | nxlc, nysc, & |
---|
7498 | nxlf, nxrf, nysf, nynf, & |
---|
7499 | nys_on_file, nyn_on_file, & |
---|
7500 | nxl_on_file,nxr_on_file ) |
---|
7501 | #endif |
---|
7502 | CASE ( 't_surf_green_h' ) |
---|
7503 | #if defined( __nopointer ) |
---|
7504 | IF ( k == 1 ) THEN |
---|
7505 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
7506 | ALLOCATE( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
7507 | READ ( 13 ) tmp_surf_green_h |
---|
7508 | ENDIF |
---|
7509 | CALL surface_restore_elements( & |
---|
7510 | t_surf_green_h, tmp_surf_green_h, & |
---|
7511 | surf_usm_h%start_index, & |
---|
7512 | start_index_on_file, & |
---|
7513 | end_index_on_file, & |
---|
7514 | nxlc, nysc, & |
---|
7515 | nxlf, nxrf, nysf, nynf, & |
---|
7516 | nys_on_file, nyn_on_file, & |
---|
7517 | nxl_on_file,nxr_on_file ) |
---|
7518 | #else |
---|
7519 | IF ( k == 1 ) THEN |
---|
7520 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
7521 | ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
7522 | READ ( 13 ) tmp_surf_green_h |
---|
7523 | ENDIF |
---|
7524 | CALL surface_restore_elements( & |
---|
7525 | t_surf_green_h_1, tmp_surf_green_h, & |
---|
7526 | surf_usm_h%start_index, & |
---|
7527 | start_index_on_file, & |
---|
7528 | end_index_on_file, & |
---|
7529 | nxlc, nysc, & |
---|
7530 | nxlf, nxrf, nysf, nynf, & |
---|
7531 | nys_on_file, nyn_on_file, & |
---|
7532 | nxl_on_file,nxr_on_file ) |
---|
7533 | #endif |
---|
7534 | |
---|
7535 | CASE ( 't_surf_green_v(0)' ) |
---|
7536 | #if defined( __nopointer ) |
---|
7537 | IF ( k == 1 ) THEN |
---|
7538 | IF ( .NOT. ALLOCATED( t_surf_green_v(0)%t ) ) & |
---|
7539 | ALLOCATE( t_surf_green_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7540 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
7541 | ENDIF |
---|
7542 | CALL surface_restore_elements( & |
---|
7543 | t_surf_green_v(0)%t, & |
---|
7544 | tmp_surf_green_v(0)%t, & |
---|
7545 | surf_usm_v(0)%start_index, & |
---|
7546 | start_index_on_file, & |
---|
7547 | end_index_on_file, & |
---|
7548 | nxlc, nysc, & |
---|
7549 | nxlf, nxrf, nysf, nynf, & |
---|
7550 | nys_on_file, nyn_on_file, & |
---|
7551 | nxl_on_file,nxr_on_file ) |
---|
7552 | #else |
---|
7553 | IF ( k == 1 ) THEN |
---|
7554 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(0)%t ) ) & |
---|
7555 | ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7556 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
7557 | ENDIF |
---|
7558 | CALL surface_restore_elements( & |
---|
7559 | t_surf_green_v_1(0)%t, & |
---|
7560 | tmp_surf_green_v(0)%t, & |
---|
7561 | surf_usm_v(0)%start_index, & |
---|
7562 | start_index_on_file, & |
---|
7563 | end_index_on_file, & |
---|
7564 | nxlc, nysc, & |
---|
7565 | nxlf, nxrf, nysf, nynf, & |
---|
7566 | nys_on_file, nyn_on_file, & |
---|
7567 | nxl_on_file,nxr_on_file ) |
---|
7568 | #endif |
---|
7569 | |
---|
7570 | CASE ( 't_surf_green_v(1)' ) |
---|
7571 | #if defined( __nopointer ) |
---|
7572 | IF ( k == 1 ) THEN |
---|
7573 | IF ( .NOT. ALLOCATED( t_surf_green_v(1)%t ) ) & |
---|
7574 | ALLOCATE( t_surf_green_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7575 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
7576 | ENDIF |
---|
7577 | CALL surface_restore_elements( & |
---|
7578 | t_surf_green_v(1)%t, & |
---|
7579 | tmp_surf_green_v(1)%t, & |
---|
7580 | surf_usm_v(1)%start_index, & |
---|
7581 | start_index_on_file, & |
---|
7582 | end_index_on_file, & |
---|
7583 | nxlc, nysc, & |
---|
7584 | nxlf, nxrf, nysf, nynf, & |
---|
7585 | nys_on_file, nyn_on_file, & |
---|
7586 | nxl_on_file,nxr_on_file ) |
---|
7587 | #else |
---|
7588 | IF ( k == 1 ) THEN |
---|
7589 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(1)%t ) ) & |
---|
7590 | ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7591 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
7592 | ENDIF |
---|
7593 | CALL surface_restore_elements( & |
---|
7594 | t_surf_green_v_1(1)%t, & |
---|
7595 | tmp_surf_green_v(1)%t, & |
---|
7596 | surf_usm_v(1)%start_index, & |
---|
7597 | start_index_on_file, & |
---|
7598 | end_index_on_file, & |
---|
7599 | nxlc, nysc, & |
---|
7600 | nxlf, nxrf, nysf, nynf, & |
---|
7601 | nys_on_file, nyn_on_file, & |
---|
7602 | nxl_on_file,nxr_on_file ) |
---|
7603 | #endif |
---|
7604 | |
---|
7605 | CASE ( 't_surf_green_v(2)' ) |
---|
7606 | #if defined( __nopointer ) |
---|
7607 | IF ( k == 1 ) THEN |
---|
7608 | IF ( .NOT. ALLOCATED( t_surf_green_v(2)%t ) ) & |
---|
7609 | ALLOCATE( t_surf_green_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7610 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
7611 | ENDIF |
---|
7612 | CALL surface_restore_elements( & |
---|
7613 | t_surf_green_v(2)%t, & |
---|
7614 | tmp_surf_green_v(2)%t, & |
---|
7615 | surf_usm_v(2)%start_index, & |
---|
7616 | start_index_on_file, & |
---|
7617 | end_index_on_file, & |
---|
7618 | nxlc, nysc, & |
---|
7619 | nxlf, nxrf, nysf, nynf, & |
---|
7620 | nys_on_file, nyn_on_file, & |
---|
7621 | nxl_on_file,nxr_on_file ) |
---|
7622 | #else |
---|
7623 | IF ( k == 1 ) THEN |
---|
7624 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(2)%t ) ) & |
---|
7625 | ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7626 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
7627 | ENDIF |
---|
7628 | CALL surface_restore_elements( & |
---|
7629 | t_surf_green_v_1(2)%t, & |
---|
7630 | tmp_surf_green_v(2)%t, & |
---|
7631 | surf_usm_v(2)%start_index, & |
---|
7632 | start_index_on_file, & |
---|
7633 | end_index_on_file, & |
---|
7634 | nxlc, nysc, & |
---|
7635 | nxlf, nxrf, nysf, nynf, & |
---|
7636 | nys_on_file, nyn_on_file, & |
---|
7637 | nxl_on_file,nxr_on_file ) |
---|
7638 | #endif |
---|
7639 | |
---|
7640 | CASE ( 't_surf_green_v(3)' ) |
---|
7641 | #if defined( __nopointer ) |
---|
7642 | IF ( k == 1 ) THEN |
---|
7643 | IF ( .NOT. ALLOCATED( t_surf_green_v(3)%t ) ) & |
---|
7644 | ALLOCATE( t_surf_green_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7645 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
7646 | ENDIF |
---|
7647 | CALL surface_restore_elements( & |
---|
7648 | t_surf_green_v(3)%t, & |
---|
7649 | tmp_surf_green_v(3)%t, & |
---|
7650 | surf_usm_v(3)%start_index, & |
---|
7651 | start_index_on_file, & |
---|
7652 | end_index_on_file, & |
---|
7653 | nxlc, nysc, & |
---|
7654 | nxlf, nxrf, nysf, nynf, & |
---|
7655 | nys_on_file, nyn_on_file, & |
---|
7656 | nxl_on_file,nxr_on_file ) |
---|
7657 | #else |
---|
7658 | IF ( k == 1 ) THEN |
---|
7659 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(3)%t ) ) & |
---|
7660 | ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7661 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
7662 | ENDIF |
---|
7663 | CALL surface_restore_elements( & |
---|
7664 | t_surf_green_v_1(3)%t, & |
---|
7665 | tmp_surf_green_v(3)%t, & |
---|
7666 | surf_usm_v(3)%start_index, & |
---|
7667 | start_index_on_file, & |
---|
7668 | end_index_on_file, & |
---|
7669 | nxlc, nysc, & |
---|
7670 | nxlf, nxrf, nysf, nynf, & |
---|
7671 | nys_on_file, nyn_on_file, & |
---|
7672 | nxl_on_file,nxr_on_file ) |
---|
7673 | #endif |
---|
7674 | CASE ( 't_surf_window_h' ) |
---|
7675 | #if defined( __nopointer ) |
---|
7676 | IF ( k == 1 ) THEN |
---|
7677 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
7678 | ALLOCATE( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
7679 | READ ( 13 ) tmp_surf_window_h |
---|
7680 | ENDIF |
---|
7681 | CALL surface_restore_elements( & |
---|
7682 | t_surf_window_h, tmp_surf_window_h, & |
---|
7683 | surf_usm_h%start_index, & |
---|
7684 | start_index_on_file, & |
---|
7685 | end_index_on_file, & |
---|
7686 | nxlc, nysc, & |
---|
7687 | nxlf, nxrf, nysf, nynf, & |
---|
7688 | nys_on_file, nyn_on_file, & |
---|
7689 | nxl_on_file,nxr_on_file ) |
---|
7690 | #else |
---|
7691 | IF ( k == 1 ) THEN |
---|
7692 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
7693 | ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
7694 | READ ( 13 ) tmp_surf_window_h |
---|
7695 | ENDIF |
---|
7696 | CALL surface_restore_elements( & |
---|
7697 | t_surf_window_h_1, & |
---|
7698 | tmp_surf_window_h, & |
---|
7699 | surf_usm_h%start_index, & |
---|
7700 | start_index_on_file, & |
---|
7701 | end_index_on_file, & |
---|
7702 | nxlc, nysc, & |
---|
7703 | nxlf, nxrf, nysf, nynf, & |
---|
7704 | nys_on_file, nyn_on_file, & |
---|
7705 | nxl_on_file,nxr_on_file ) |
---|
7706 | #endif |
---|
7707 | |
---|
7708 | CASE ( 't_surf_window_v(0)' ) |
---|
7709 | #if defined( __nopointer ) |
---|
7710 | IF ( k == 1 ) THEN |
---|
7711 | IF ( .NOT. ALLOCATED( t_surf_window_v(0)%t ) ) & |
---|
7712 | ALLOCATE( t_surf_window_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7713 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
7714 | ENDIF |
---|
7715 | CALL surface_restore_elements( & |
---|
7716 | t_surf_window_v(0)%t, & |
---|
7717 | tmp_surf_window_v(0)%t, & |
---|
7718 | surf_usm_v(0)%start_index, & |
---|
7719 | start_index_on_file, & |
---|
7720 | end_index_on_file, & |
---|
7721 | nxlc, nysc, & |
---|
7722 | nxlf, nxrf, nysf, nynf, & |
---|
7723 | nys_on_file, nyn_on_file, & |
---|
7724 | nxl_on_file,nxr_on_file ) |
---|
7725 | #else |
---|
7726 | IF ( k == 1 ) THEN |
---|
7727 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(0)%t ) ) & |
---|
7728 | ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
7729 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
7730 | ENDIF |
---|
7731 | CALL surface_restore_elements( & |
---|
7732 | t_surf_window_v_1(0)%t, & |
---|
7733 | tmp_surf_window_v(0)%t, & |
---|
7734 | surf_usm_v(0)%start_index, & |
---|
7735 | start_index_on_file, & |
---|
7736 | end_index_on_file, & |
---|
7737 | nxlc, nysc, & |
---|
7738 | nxlf, nxrf, nysf, nynf, & |
---|
7739 | nys_on_file, nyn_on_file, & |
---|
7740 | nxl_on_file,nxr_on_file ) |
---|
7741 | #endif |
---|
7742 | |
---|
7743 | CASE ( 't_surf_window_v(1)' ) |
---|
7744 | #if defined( __nopointer ) |
---|
7745 | IF ( k == 1 ) THEN |
---|
7746 | IF ( .NOT. ALLOCATED( t_surf_window_v(1)%t ) ) & |
---|
7747 | ALLOCATE( t_surf_window_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7748 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
7749 | ENDIF |
---|
7750 | CALL surface_restore_elements( & |
---|
7751 | t_surf_window_v(1)%t, & |
---|
7752 | tmp_surf_window_v(1)%t, & |
---|
7753 | surf_usm_v(1)%start_index, & |
---|
7754 | start_index_on_file, & |
---|
7755 | end_index_on_file, & |
---|
7756 | nxlc, nysc, & |
---|
7757 | nxlf, nxrf, nysf, nynf, & |
---|
7758 | nys_on_file, nyn_on_file, & |
---|
7759 | nxl_on_file,nxr_on_file ) |
---|
7760 | #else |
---|
7761 | IF ( k == 1 ) THEN |
---|
7762 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(1)%t ) ) & |
---|
7763 | ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
7764 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
7765 | ENDIF |
---|
7766 | CALL surface_restore_elements( & |
---|
7767 | t_surf_window_v_1(1)%t, & |
---|
7768 | tmp_surf_window_v(1)%t, & |
---|
7769 | surf_usm_v(1)%start_index, & |
---|
7770 | start_index_on_file, & |
---|
7771 | end_index_on_file, & |
---|
7772 | nxlc, nysc, & |
---|
7773 | nxlf, nxrf, nysf, nynf, & |
---|
7774 | nys_on_file, nyn_on_file, & |
---|
7775 | nxl_on_file,nxr_on_file ) |
---|
7776 | #endif |
---|
7777 | |
---|
7778 | CASE ( 't_surf_window_v(2)' ) |
---|
7779 | #if defined( __nopointer ) |
---|
7780 | IF ( k == 1 ) THEN |
---|
7781 | IF ( .NOT. ALLOCATED( t_surf_window_v(2)%t ) ) & |
---|
7782 | ALLOCATE( t_surf_window_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7783 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
7784 | ENDIF |
---|
7785 | CALL surface_restore_elements( & |
---|
7786 | t_surf_window_v(2)%t, & |
---|
7787 | tmp_surf_window_v(2)%t, & |
---|
7788 | surf_usm_v(2)%start_index, & |
---|
7789 | start_index_on_file, & |
---|
7790 | end_index_on_file, & |
---|
7791 | nxlc, nysc, & |
---|
7792 | nxlf, nxrf, nysf, nynf, & |
---|
7793 | nys_on_file, nyn_on_file, & |
---|
7794 | nxl_on_file,nxr_on_file ) |
---|
7795 | #else |
---|
7796 | IF ( k == 1 ) THEN |
---|
7797 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(2)%t ) ) & |
---|
7798 | ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
7799 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
7800 | ENDIF |
---|
7801 | CALL surface_restore_elements( & |
---|
7802 | t_surf_window_v_1(2)%t, & |
---|
7803 | tmp_surf_window_v(2)%t, & |
---|
7804 | surf_usm_v(2)%start_index, & |
---|
7805 | start_index_on_file, & |
---|
7806 | end_index_on_file, & |
---|
7807 | nxlc, nysc, & |
---|
7808 | nxlf, nxrf, nysf, nynf, & |
---|
7809 | nys_on_file, nyn_on_file, & |
---|
7810 | nxl_on_file,nxr_on_file ) |
---|
7811 | #endif |
---|
7812 | |
---|
7813 | CASE ( 't_surf_window_v(3)' ) |
---|
7814 | #if defined( __nopointer ) |
---|
7815 | IF ( k == 1 ) THEN |
---|
7816 | IF ( .NOT. ALLOCATED( t_surf_window_v(3)%t ) ) & |
---|
7817 | ALLOCATE( t_surf_window_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7818 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
7819 | ENDIF |
---|
7820 | CALL surface_restore_elements( & |
---|
7821 | t_surf_window_v(3)%t, & |
---|
7822 | tmp_surf_window_v(3)%t, & |
---|
7823 | surf_usm_v(3)%start_index, & |
---|
7824 | start_index_on_file, & |
---|
7825 | end_index_on_file, & |
---|
7826 | nxlc, nysc, & |
---|
7827 | nxlf, nxrf, nysf, nynf, & |
---|
7828 | nys_on_file, nyn_on_file, & |
---|
7829 | nxl_on_file,nxr_on_file ) |
---|
7830 | #else |
---|
7831 | IF ( k == 1 ) THEN |
---|
7832 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(3)%t ) ) & |
---|
7833 | ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
7834 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
7835 | ENDIF |
---|
7836 | CALL surface_restore_elements( & |
---|
7837 | t_surf_window_v_1(3)%t, & |
---|
7838 | tmp_surf_window_v(3)%t, & |
---|
7839 | surf_usm_v(3)%start_index, & |
---|
7840 | start_index_on_file, & |
---|
7841 | end_index_on_file, & |
---|
7842 | nxlc, nysc, & |
---|
7843 | nxlf, nxrf, nysf, nynf, & |
---|
7844 | nys_on_file, nyn_on_file, & |
---|
7845 | nxl_on_file,nxr_on_file ) |
---|
7846 | #endif |
---|
7847 | CASE ( 't_wall_h' ) |
---|
7848 | #if defined( __nopointer ) |
---|
7849 | IF ( k == 1 ) THEN |
---|
7850 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
7851 | ALLOCATE( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
7852 | READ ( 13 ) tmp_wall_h |
---|
7853 | ENDIF |
---|
7854 | CALL surface_restore_elements( & |
---|
7855 | t_wall_h, tmp_wall_h, & |
---|
7856 | surf_usm_h%start_index, & |
---|
7857 | start_index_on_file, & |
---|
7858 | end_index_on_file, & |
---|
7859 | nxlc, nysc, & |
---|
7860 | nxlf, nxrf, nysf, nynf, & |
---|
7861 | nys_on_file, nyn_on_file, & |
---|
7862 | nxl_on_file,nxr_on_file ) |
---|
7863 | #else |
---|
7864 | IF ( k == 1 ) THEN |
---|
7865 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
7866 | ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1, & |
---|
7867 | 1:surf_usm_h%ns) ) |
---|
7868 | READ ( 13 ) tmp_wall_h |
---|
7869 | ENDIF |
---|
7870 | CALL surface_restore_elements( & |
---|
7871 | t_wall_h_1, tmp_wall_h, & |
---|
7872 | surf_usm_h%start_index, & |
---|
7873 | start_index_on_file, & |
---|
7874 | end_index_on_file, & |
---|
7875 | nxlc, nysc, & |
---|
7876 | nxlf, nxrf, nysf, nynf, & |
---|
7877 | nys_on_file, nyn_on_file, & |
---|
7878 | nxl_on_file,nxr_on_file ) |
---|
7879 | #endif |
---|
7880 | CASE ( 't_wall_v(0)' ) |
---|
7881 | #if defined( __nopointer ) |
---|
7882 | IF ( k == 1 ) THEN |
---|
7883 | IF ( .NOT. ALLOCATED( t_wall_v(0)%t ) ) & |
---|
7884 | ALLOCATE( t_wall_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
7885 | 1:surf_usm_v(0)%ns) ) |
---|
7886 | READ ( 13 ) tmp_wall_v(0)%t |
---|
7887 | ENDIF |
---|
7888 | CALL surface_restore_elements( & |
---|
7889 | t_wall_v(0)%t, tmp_wall_v(0)%t, & |
---|
7890 | surf_usm_v(0)%start_index, & |
---|
7891 | start_index_on_file, & |
---|
7892 | end_index_on_file, & |
---|
7893 | nxlc, nysc, & |
---|
7894 | nxlf, nxrf, nysf, nynf, & |
---|
7895 | nys_on_file, nyn_on_file, & |
---|
7896 | nxl_on_file,nxr_on_file ) |
---|
7897 | #else |
---|
7898 | IF ( k == 1 ) THEN |
---|
7899 | IF ( .NOT. ALLOCATED( t_wall_v_1(0)%t ) ) & |
---|
7900 | ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
7901 | 1:surf_usm_v(0)%ns) ) |
---|
7902 | READ ( 13 ) tmp_wall_v(0)%t |
---|
7903 | ENDIF |
---|
7904 | CALL surface_restore_elements( & |
---|
7905 | t_wall_v_1(0)%t, tmp_wall_v(0)%t, & |
---|
7906 | surf_usm_v(0)%start_index, & |
---|
7907 | start_index_on_file, & |
---|
7908 | end_index_on_file, & |
---|
7909 | nxlc, nysc, & |
---|
7910 | nxlf, nxrf, nysf, nynf, & |
---|
7911 | nys_on_file, nyn_on_file, & |
---|
7912 | nxl_on_file,nxr_on_file ) |
---|
7913 | #endif |
---|
7914 | CASE ( 't_wall_v(1)' ) |
---|
7915 | #if defined( __nopointer ) |
---|
7916 | IF ( k == 1 ) THEN |
---|
7917 | IF ( .NOT. ALLOCATED( t_wall_v(1)%t ) ) & |
---|
7918 | ALLOCATE( t_wall_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
7919 | 1:surf_usm_v(1)%ns) ) |
---|
7920 | READ ( 13 ) tmp_wall_v(1)%t |
---|
7921 | ENDIF |
---|
7922 | CALL surface_restore_elements( & |
---|
7923 | t_wall_v(1)%t, tmp_wall_v(1)%t, & |
---|
7924 | surf_usm_v(1)%start_index, & |
---|
7925 | start_index_on_file, & |
---|
7926 | end_index_on_file , & |
---|
7927 | nxlc, nysc, & |
---|
7928 | nxlf, nxrf, nysf, nynf, & |
---|
7929 | nys_on_file, nyn_on_file, & |
---|
7930 | nxl_on_file, nxr_on_file ) |
---|
7931 | #else |
---|
7932 | IF ( k == 1 ) THEN |
---|
7933 | IF ( .NOT. ALLOCATED( t_wall_v_1(1)%t ) ) & |
---|
7934 | ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
7935 | 1:surf_usm_v(1)%ns) ) |
---|
7936 | READ ( 13 ) tmp_wall_v(1)%t |
---|
7937 | ENDIF |
---|
7938 | CALL surface_restore_elements( & |
---|
7939 | t_wall_v_1(1)%t, tmp_wall_v(1)%t, & |
---|
7940 | surf_usm_v(1)%start_index, & |
---|
7941 | start_index_on_file, & |
---|
7942 | end_index_on_file, & |
---|
7943 | nxlc, nysc, & |
---|
7944 | nxlf, nxrf, nysf, nynf, & |
---|
7945 | nys_on_file, nyn_on_file, & |
---|
7946 | nxl_on_file,nxr_on_file ) |
---|
7947 | #endif |
---|
7948 | CASE ( 't_wall_v(2)' ) |
---|
7949 | #if defined( __nopointer ) |
---|
7950 | IF ( k == 1 ) THEN |
---|
7951 | IF ( .NOT. ALLOCATED( t_wall_v(2)%t ) ) & |
---|
7952 | ALLOCATE( t_wall_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
7953 | 1:surf_usm_v(2)%ns) ) |
---|
7954 | READ ( 13 ) tmp_wall_v(2)%t |
---|
7955 | ENDIF |
---|
7956 | CALL surface_restore_elements( & |
---|
7957 | t_wall_v(2)%t, tmp_wall_v(2)%t, & |
---|
7958 | surf_usm_v(2)%start_index, & |
---|
7959 | start_index_on_file, & |
---|
7960 | end_index_on_file, & |
---|
7961 | nxlc, nysc, & |
---|
7962 | nxlf, nxrf, nysf, nynf, & |
---|
7963 | nys_on_file, nyn_on_file, & |
---|
7964 | nxl_on_file,nxr_on_file ) |
---|
7965 | #else |
---|
7966 | IF ( k == 1 ) THEN |
---|
7967 | IF ( .NOT. ALLOCATED( t_wall_v_1(2)%t ) ) & |
---|
7968 | ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
7969 | 1:surf_usm_v(2)%ns) ) |
---|
7970 | READ ( 13 ) tmp_wall_v(2)%t |
---|
7971 | ENDIF |
---|
7972 | CALL surface_restore_elements( & |
---|
7973 | t_wall_v_1(2)%t, tmp_wall_v(2)%t, & |
---|
7974 | surf_usm_v(2)%start_index, & |
---|
7975 | start_index_on_file, & |
---|
7976 | end_index_on_file , & |
---|
7977 | nxlc, nysc, & |
---|
7978 | nxlf, nxrf, nysf, nynf, & |
---|
7979 | nys_on_file, nyn_on_file, & |
---|
7980 | nxl_on_file,nxr_on_file ) |
---|
7981 | #endif |
---|
7982 | CASE ( 't_wall_v(3)' ) |
---|
7983 | #if defined( __nopointer ) |
---|
7984 | IF ( k == 1 ) THEN |
---|
7985 | IF ( .NOT. ALLOCATED( t_wall_v(3)%t ) ) & |
---|
7986 | ALLOCATE( t_wall_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
7987 | 1:surf_usm_v(3)%ns) ) |
---|
7988 | READ ( 13 ) tmp_wall_v(3)%t |
---|
7989 | ENDIF |
---|
7990 | CALL surface_restore_elements( & |
---|
7991 | t_wall_v(3)%t, tmp_wall_v(3)%t, & |
---|
7992 | surf_usm_v(3)%start_index, & |
---|
7993 | start_index_on_file, & |
---|
7994 | end_index_on_file, & |
---|
7995 | nxlc, nysc, & |
---|
7996 | nxlf, nxrf, nysf, nynf, & |
---|
7997 | nys_on_file, nyn_on_file, & |
---|
7998 | nxl_on_file,nxr_on_file ) |
---|
7999 | #else |
---|
8000 | IF ( k == 1 ) THEN |
---|
8001 | IF ( .NOT. ALLOCATED( t_wall_v_1(3)%t ) ) & |
---|
8002 | ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
8003 | 1:surf_usm_v(3)%ns) ) |
---|
8004 | READ ( 13 ) tmp_wall_v(3)%t |
---|
8005 | ENDIF |
---|
8006 | CALL surface_restore_elements( & |
---|
8007 | t_wall_v_1(3)%t, tmp_wall_v(3)%t, & |
---|
8008 | surf_usm_v(3)%start_index, & |
---|
8009 | start_index_on_file, & |
---|
8010 | end_index_on_file, & |
---|
8011 | nxlc, nysc, & |
---|
8012 | nxlf, nxrf, nysf, nynf, & |
---|
8013 | nys_on_file, nyn_on_file, & |
---|
8014 | nxl_on_file,nxr_on_file ) |
---|
8015 | #endif |
---|
8016 | CASE ( 't_green_h' ) |
---|
8017 | #if defined( __nopointer ) |
---|
8018 | IF ( k == 1 ) THEN |
---|
8019 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
8020 | ALLOCATE( t_green_h(nzb_wall:nzt_wall+1, & |
---|
8021 | 1:surf_usm_h%ns) ) |
---|
8022 | READ ( 13 ) tmp_green_h |
---|
8023 | ENDIF |
---|
8024 | CALL surface_restore_elements( & |
---|
8025 | t_green_h, tmp_green_h, & |
---|
8026 | surf_usm_h%start_index, & |
---|
8027 | start_index_on_file, & |
---|
8028 | end_index_on_file, & |
---|
8029 | nxlc, nysc, & |
---|
8030 | nxlf, nxrf, nysf, nynf, & |
---|
8031 | nys_on_file, nyn_on_file, & |
---|
8032 | nxl_on_file,nxr_on_file ) |
---|
8033 | #else |
---|
8034 | IF ( k == 1 ) THEN |
---|
8035 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
8036 | ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1, & |
---|
8037 | 1:surf_usm_h%ns) ) |
---|
8038 | READ ( 13 ) tmp_green_h |
---|
8039 | ENDIF |
---|
8040 | CALL surface_restore_elements( & |
---|
8041 | t_green_h_1, tmp_green_h, & |
---|
8042 | surf_usm_h%start_index, & |
---|
8043 | start_index_on_file, & |
---|
8044 | end_index_on_file, & |
---|
8045 | nxlc, nysc, & |
---|
8046 | nxlf, nxrf, nysf, nynf, & |
---|
8047 | nys_on_file, nyn_on_file, & |
---|
8048 | nxl_on_file,nxr_on_file ) |
---|
8049 | #endif |
---|
8050 | CASE ( 't_green_v(0)' ) |
---|
8051 | #if defined( __nopointer ) |
---|
8052 | IF ( k == 1 ) THEN |
---|
8053 | IF ( .NOT. ALLOCATED( t_green_v(0)%t ) ) & |
---|
8054 | ALLOCATE( t_green_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
8055 | 1:surf_usm_v(0)%ns) ) |
---|
8056 | READ ( 13 ) tmp_green_v(0)%t |
---|
8057 | ENDIF |
---|
8058 | CALL surface_restore_elements( & |
---|
8059 | t_green_v(0)%t, tmp_green_v(0)%t, & |
---|
8060 | surf_usm_v(0)%start_index, & |
---|
8061 | start_index_on_file, & |
---|
8062 | end_index_on_file, & |
---|
8063 | nxlc, nysc, & |
---|
8064 | nxlf, nxrf, nysf, nynf, & |
---|
8065 | nys_on_file, nyn_on_file, & |
---|
8066 | nxl_on_file,nxr_on_file ) |
---|
8067 | #else |
---|
8068 | IF ( k == 1 ) THEN |
---|
8069 | IF ( .NOT. ALLOCATED( t_green_v_1(0)%t ) ) & |
---|
8070 | ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
8071 | 1:surf_usm_v(0)%ns) ) |
---|
8072 | READ ( 13 ) tmp_green_v(0)%t |
---|
8073 | ENDIF |
---|
8074 | CALL surface_restore_elements( & |
---|
8075 | t_green_v_1(0)%t, tmp_green_v(0)%t, & |
---|
8076 | surf_usm_v(0)%start_index, & |
---|
8077 | start_index_on_file, & |
---|
8078 | end_index_on_file, & |
---|
8079 | nxlc, nysc, & |
---|
8080 | nxlf, nxrf, nysf, nynf, & |
---|
8081 | nys_on_file, nyn_on_file, & |
---|
8082 | nxl_on_file,nxr_on_file ) |
---|
8083 | #endif |
---|
8084 | CASE ( 't_green_v(1)' ) |
---|
8085 | #if defined( __nopointer ) |
---|
8086 | IF ( k == 1 ) THEN |
---|
8087 | IF ( .NOT. ALLOCATED( t_green_v(1)%t ) ) & |
---|
8088 | ALLOCATE( t_green_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
8089 | 1:surf_usm_v(1)%ns) ) |
---|
8090 | READ ( 13 ) tmp_green_v(1)%t |
---|
8091 | ENDIF |
---|
8092 | CALL surface_restore_elements( & |
---|
8093 | t_green_v(1)%t, tmp_green_v(1)%t, & |
---|
8094 | surf_usm_v(1)%start_index, & |
---|
8095 | start_index_on_file, & |
---|
8096 | end_index_on_file , & |
---|
8097 | nxlc, nysc, & |
---|
8098 | nxlf, nxrf, nysf, nynf, & |
---|
8099 | nys_on_file, nyn_on_file, & |
---|
8100 | nxl_on_file,nxr_on_file ) |
---|
8101 | #else |
---|
8102 | IF ( k == 1 ) THEN |
---|
8103 | IF ( .NOT. ALLOCATED( t_green_v_1(1)%t ) ) & |
---|
8104 | ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
8105 | 1:surf_usm_v(1)%ns) ) |
---|
8106 | READ ( 13 ) tmp_green_v(1)%t |
---|
8107 | ENDIF |
---|
8108 | CALL surface_restore_elements( & |
---|
8109 | t_green_v_1(1)%t, tmp_green_v(1)%t, & |
---|
8110 | surf_usm_v(1)%start_index, & |
---|
8111 | start_index_on_file, & |
---|
8112 | end_index_on_file, & |
---|
8113 | nxlc, nysc, & |
---|
8114 | nxlf, nxrf, nysf, nynf, & |
---|
8115 | nys_on_file, nyn_on_file, & |
---|
8116 | nxl_on_file,nxr_on_file ) |
---|
8117 | #endif |
---|
8118 | CASE ( 't_green_v(2)' ) |
---|
8119 | #if defined( __nopointer ) |
---|
8120 | IF ( k == 1 ) THEN |
---|
8121 | IF ( .NOT. ALLOCATED( t_green_v(2)%t ) ) & |
---|
8122 | ALLOCATE( t_green_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
8123 | 1:surf_usm_v(2)%ns) ) |
---|
8124 | READ ( 13 ) tmp_green_v(2)%t |
---|
8125 | ENDIF |
---|
8126 | CALL surface_restore_elements( & |
---|
8127 | t_green_v(2)%t, tmp_green_v(2)%t, & |
---|
8128 | surf_usm_v(2)%start_index, & |
---|
8129 | start_index_on_file, & |
---|
8130 | end_index_on_file, & |
---|
8131 | nxlc, nysc, & |
---|
8132 | nxlf, nxrf, nysf, nynf, & |
---|
8133 | nys_on_file, nyn_on_file, & |
---|
8134 | nxl_on_file,nxr_on_file ) |
---|
8135 | #else |
---|
8136 | IF ( k == 1 ) THEN |
---|
8137 | IF ( .NOT. ALLOCATED( t_green_v_1(2)%t ) ) & |
---|
8138 | ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
8139 | 1:surf_usm_v(2)%ns) ) |
---|
8140 | READ ( 13 ) tmp_green_v(2)%t |
---|
8141 | ENDIF |
---|
8142 | CALL surface_restore_elements( & |
---|
8143 | t_green_v_1(2)%t, tmp_green_v(2)%t, & |
---|
8144 | surf_usm_v(2)%start_index, & |
---|
8145 | start_index_on_file, & |
---|
8146 | end_index_on_file , & |
---|
8147 | nxlc, nysc, & |
---|
8148 | nxlf, nxrf, nysf, nynf, & |
---|
8149 | nys_on_file, nyn_on_file, & |
---|
8150 | nxl_on_file,nxr_on_file ) |
---|
8151 | #endif |
---|
8152 | CASE ( 't_green_v(3)' ) |
---|
8153 | #if defined( __nopointer ) |
---|
8154 | IF ( k == 1 ) THEN |
---|
8155 | IF ( .NOT. ALLOCATED( t_green_v(3)%t ) ) & |
---|
8156 | ALLOCATE( t_green_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
8157 | 1:surf_usm_v(3)%ns) ) |
---|
8158 | READ ( 13 ) tmp_green_v(3)%t |
---|
8159 | ENDIF |
---|
8160 | CALL surface_restore_elements( & |
---|
8161 | t_green_v(3)%t, tmp_green_v(3)%t, & |
---|
8162 | surf_usm_v(3)%start_index, & |
---|
8163 | start_index_on_file, & |
---|
8164 | end_index_on_file, & |
---|
8165 | nxlc, nysc, & |
---|
8166 | nxlf, nxrf, nysf, nynf, & |
---|
8167 | nys_on_file, nyn_on_file, & |
---|
8168 | nxl_on_file,nxr_on_file ) |
---|
8169 | #else |
---|
8170 | IF ( k == 1 ) THEN |
---|
8171 | IF ( .NOT. ALLOCATED( t_green_v_1(3)%t ) ) & |
---|
8172 | ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
8173 | 1:surf_usm_v(3)%ns) ) |
---|
8174 | READ ( 13 ) tmp_green_v(3)%t |
---|
8175 | ENDIF |
---|
8176 | CALL surface_restore_elements( & |
---|
8177 | t_green_v_1(3)%t, tmp_green_v(3)%t, & |
---|
8178 | surf_usm_v(3)%start_index, & |
---|
8179 | start_index_on_file, & |
---|
8180 | end_index_on_file, & |
---|
8181 | nxlc, nysc, & |
---|
8182 | nxlf, nxrf, nysf, nynf, & |
---|
8183 | nys_on_file, nyn_on_file, & |
---|
8184 | nxl_on_file,nxr_on_file ) |
---|
8185 | #endif |
---|
8186 | CASE ( 't_window_h' ) |
---|
8187 | #if defined( __nopointer ) |
---|
8188 | IF ( k == 1 ) THEN |
---|
8189 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
8190 | ALLOCATE( t_window_h(nzb_wall:nzt_wall+1, & |
---|
8191 | 1:surf_usm_h%ns) ) |
---|
8192 | READ ( 13 ) tmp_window_h |
---|
8193 | ENDIF |
---|
8194 | CALL surface_restore_elements( & |
---|
8195 | t_window_h, tmp_window_h, & |
---|
8196 | surf_usm_h%start_index, & |
---|
8197 | start_index_on_file, & |
---|
8198 | end_index_on_file, & |
---|
8199 | nxlc, nysc, & |
---|
8200 | nxlf, nxrf, nysf, nynf, & |
---|
8201 | nys_on_file, nyn_on_file, & |
---|
8202 | nxl_on_file,nxr_on_file ) |
---|
8203 | #else |
---|
8204 | IF ( k == 1 ) THEN |
---|
8205 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
8206 | ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1, & |
---|
8207 | 1:surf_usm_h%ns) ) |
---|
8208 | READ ( 13 ) tmp_window_h |
---|
8209 | ENDIF |
---|
8210 | CALL surface_restore_elements( & |
---|
8211 | t_window_h_1, tmp_window_h, & |
---|
8212 | surf_usm_h%start_index, & |
---|
8213 | start_index_on_file, & |
---|
8214 | end_index_on_file, & |
---|
8215 | nxlc, nysc, & |
---|
8216 | nxlf, nxrf, nysf, nynf, & |
---|
8217 | nys_on_file, nyn_on_file, & |
---|
8218 | nxl_on_file, nxr_on_file ) |
---|
8219 | #endif |
---|
8220 | CASE ( 't_window_v(0)' ) |
---|
8221 | #if defined( __nopointer ) |
---|
8222 | IF ( k == 1 ) THEN |
---|
8223 | IF ( .NOT. ALLOCATED( t_window_v(0)%t ) ) & |
---|
8224 | ALLOCATE( t_window_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
8225 | 1:surf_usm_v(0)%ns) ) |
---|
8226 | READ ( 13 ) tmp_window_v(0)%t |
---|
8227 | ENDIF |
---|
8228 | CALL surface_restore_elements( & |
---|
8229 | t_window_v(0)%t, tmp_window_v(0)%t, & |
---|
8230 | surf_usm_v(0)%start_index, & |
---|
8231 | start_index_on_file, & |
---|
8232 | end_index_on_file, & |
---|
8233 | nxlc, nysc, & |
---|
8234 | nxlf, nxrf, nysf, nynf, & |
---|
8235 | nys_on_file, nyn_on_file, & |
---|
8236 | nxl_on_file, nxr_on_file ) |
---|
8237 | #else |
---|
8238 | IF ( k == 1 ) THEN |
---|
8239 | IF ( .NOT. ALLOCATED( t_window_v_1(0)%t ) ) & |
---|
8240 | ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
8241 | 1:surf_usm_v(0)%ns) ) |
---|
8242 | READ ( 13 ) tmp_window_v(0)%t |
---|
8243 | ENDIF |
---|
8244 | CALL surface_restore_elements( & |
---|
8245 | t_window_v_1(0)%t, & |
---|
8246 | tmp_window_v(0)%t, & |
---|
8247 | surf_usm_v(0)%start_index, & |
---|
8248 | start_index_on_file, & |
---|
8249 | end_index_on_file, & |
---|
8250 | nxlc, nysc, & |
---|
8251 | nxlf, nxrf, nysf, nynf, & |
---|
8252 | nys_on_file, nyn_on_file, & |
---|
8253 | nxl_on_file,nxr_on_file ) |
---|
8254 | #endif |
---|
8255 | CASE ( 't_window_v(1)' ) |
---|
8256 | #if defined( __nopointer ) |
---|
8257 | IF ( k == 1 ) THEN |
---|
8258 | IF ( .NOT. ALLOCATED( t_window_v(1)%t ) ) & |
---|
8259 | ALLOCATE( t_window_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
8260 | 1:surf_usm_v(1)%ns) ) |
---|
8261 | READ ( 13 ) tmp_window_v(1)%t |
---|
8262 | ENDIF |
---|
8263 | CALL surface_restore_elements( & |
---|
8264 | t_window_v(1)%t, tmp_window_v(1)%t, & |
---|
8265 | surf_usm_v(1)%start_index, & |
---|
8266 | start_index_on_file, & |
---|
8267 | end_index_on_file , & |
---|
8268 | nxlc, nysc, & |
---|
8269 | nxlf, nxrf, nysf, nynf, & |
---|
8270 | nys_on_file, nyn_on_file, & |
---|
8271 | nxl_on_file, nxr_on_file ) |
---|
8272 | #else |
---|
8273 | IF ( k == 1 ) THEN |
---|
8274 | IF ( .NOT. ALLOCATED( t_window_v_1(1)%t ) ) & |
---|
8275 | ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
8276 | 1:surf_usm_v(1)%ns) ) |
---|
8277 | READ ( 13 ) tmp_window_v(1)%t |
---|
8278 | ENDIF |
---|
8279 | CALL surface_restore_elements( & |
---|
8280 | t_window_v_1(1)%t, & |
---|
8281 | tmp_window_v(1)%t, & |
---|
8282 | surf_usm_v(1)%start_index, & |
---|
8283 | start_index_on_file, & |
---|
8284 | end_index_on_file, & |
---|
8285 | nxlc, nysc, & |
---|
8286 | nxlf, nxrf, nysf, nynf, & |
---|
8287 | nys_on_file, nyn_on_file, & |
---|
8288 | nxl_on_file,nxr_on_file ) |
---|
8289 | #endif |
---|
8290 | CASE ( 't_window_v(2)' ) |
---|
8291 | #if defined( __nopointer ) |
---|
8292 | IF ( k == 1 ) THEN |
---|
8293 | IF ( .NOT. ALLOCATED( t_window_v(2)%t ) ) & |
---|
8294 | ALLOCATE( t_window_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
8295 | 1:surf_usm_v(2)%ns) ) |
---|
8296 | READ ( 13 ) tmp_window_v(2)%t |
---|
8297 | ENDIF |
---|
8298 | CALL surface_restore_elements( & |
---|
8299 | t_window_v(2)%t, tmp_window_v(2)%t, & |
---|
8300 | surf_usm_v(2)%start_index, & |
---|
8301 | start_index_on_file, & |
---|
8302 | end_index_on_file, & |
---|
8303 | nxlc, nysc, & |
---|
8304 | nxlf, nxrf, nysf, nynf, & |
---|
8305 | nys_on_file, nyn_on_file, & |
---|
8306 | nxl_on_file,nxr_on_file ) |
---|
8307 | #else |
---|
8308 | IF ( k == 1 ) THEN |
---|
8309 | IF ( .NOT. ALLOCATED( t_window_v_1(2)%t ) ) & |
---|
8310 | ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
8311 | 1:surf_usm_v(2)%ns) ) |
---|
8312 | READ ( 13 ) tmp_window_v(2)%t |
---|
8313 | ENDIF |
---|
8314 | CALL surface_restore_elements( & |
---|
8315 | t_window_v_1(2)%t, & |
---|
8316 | tmp_window_v(2)%t, & |
---|
8317 | surf_usm_v(2)%start_index, & |
---|
8318 | start_index_on_file, & |
---|
8319 | end_index_on_file , & |
---|
8320 | nxlc, nysc, & |
---|
8321 | nxlf, nxrf, nysf, nynf, & |
---|
8322 | nys_on_file, nyn_on_file, & |
---|
8323 | nxl_on_file,nxr_on_file ) |
---|
8324 | #endif |
---|
8325 | CASE ( 't_window_v(3)' ) |
---|
8326 | #if defined( __nopointer ) |
---|
8327 | IF ( k == 1 ) THEN |
---|
8328 | IF ( .NOT. ALLOCATED( t_window_v(3)%t ) ) & |
---|
8329 | ALLOCATE( t_window_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
8330 | 1:surf_usm_v(3)%ns) ) |
---|
8331 | READ ( 13 ) tmp_window_v(3)%t |
---|
8332 | ENDIF |
---|
8333 | CALL surface_restore_elements( & |
---|
8334 | t_window_v(3)%t, tmp_window_v(3)%t, & |
---|
8335 | surf_usm_v(3)%start_index, & |
---|
8336 | start_index_on_file, & |
---|
8337 | end_index_on_file, & |
---|
8338 | nxlc, nysc, & |
---|
8339 | nxlf, nxrf, nysf, nynf, & |
---|
8340 | nys_on_file, nyn_on_file, & |
---|
8341 | nxl_on_file,nxr_on_file ) |
---|
8342 | #else |
---|
8343 | IF ( k == 1 ) THEN |
---|
8344 | IF ( .NOT. ALLOCATED( t_window_v_1(3)%t ) ) & |
---|
8345 | ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) ) |
---|
8346 | READ ( 13 ) tmp_window_v(3)%t |
---|
8347 | ENDIF |
---|
8348 | CALL surface_restore_elements( & |
---|
8349 | t_window_v_1(3)%t, & |
---|
8350 | tmp_window_v(3)%t, & |
---|
8351 | surf_usm_v(3)%start_index, & |
---|
8352 | start_index_on_file, & |
---|
8353 | end_index_on_file, & |
---|
8354 | nxlc, nysc, & |
---|
8355 | nxlf, nxrf, nysf, nynf, & |
---|
8356 | nys_on_file, nyn_on_file, & |
---|
8357 | nxl_on_file,nxr_on_file ) |
---|
8358 | #endif |
---|
8359 | CASE DEFAULT |
---|
8360 | |
---|
8361 | found = .FALSE. |
---|
8362 | |
---|
8363 | END SELECT |
---|
8364 | |
---|
8365 | |
---|
8366 | END SUBROUTINE usm_rrd_local |
---|
8367 | |
---|
8368 | |
---|
8369 | |
---|
8370 | !------------------------------------------------------------------------------! |
---|
8371 | ! Description: |
---|
8372 | ! ------------ |
---|
8373 | ! |
---|
8374 | !> This subroutine reads walls, roofs and land categories and it parameters |
---|
8375 | !> from input files. |
---|
8376 | !------------------------------------------------------------------------------! |
---|
8377 | SUBROUTINE usm_read_urban_surface_types |
---|
8378 | |
---|
8379 | USE netcdf_data_input_mod, & |
---|
8380 | ONLY: building_pars_f, building_type_f |
---|
8381 | |
---|
8382 | IMPLICIT NONE |
---|
8383 | |
---|
8384 | CHARACTER(12) :: wtn |
---|
8385 | INTEGER(iwp) :: wtc |
---|
8386 | REAL(wp), DIMENSION(n_surface_params) :: wtp |
---|
8387 | LOGICAL :: ascii_file = .FALSE. |
---|
8388 | INTEGER(iwp), DIMENSION(0:17, nysg:nyng, nxlg:nxrg) :: usm_par |
---|
8389 | REAL(wp), DIMENSION(1:14, nysg:nyng, nxlg:nxrg) :: usm_val |
---|
8390 | INTEGER(iwp) :: k, l, d, iw, jw, kw, it, ip, ii, ij, m |
---|
8391 | INTEGER(iwp) :: i, j |
---|
8392 | INTEGER(iwp) :: nz, roof, dirwe, dirsn |
---|
8393 | INTEGER(iwp) :: category |
---|
8394 | INTEGER(iwp) :: weheight1, wecat1, snheight1, sncat1 |
---|
8395 | INTEGER(iwp) :: weheight2, wecat2, snheight2, sncat2 |
---|
8396 | INTEGER(iwp) :: weheight3, wecat3, snheight3, sncat3 |
---|
8397 | REAL(wp) :: height, albedo, thick |
---|
8398 | REAL(wp) :: wealbedo1, wethick1, snalbedo1, snthick1 |
---|
8399 | REAL(wp) :: wealbedo2, wethick2, snalbedo2, snthick2 |
---|
8400 | REAL(wp) :: wealbedo3, wethick3, snalbedo3, snthick3 |
---|
8401 | |
---|
8402 | ! |
---|
8403 | !-- If building_pars or building_type are already read from static input |
---|
8404 | !-- file, skip reading ASCII file. |
---|
8405 | IF ( building_type_f%from_file .OR. building_pars_f%from_file ) & |
---|
8406 | RETURN |
---|
8407 | ! |
---|
8408 | !-- Check if ASCII input file exists. If not, return and initialize USM |
---|
8409 | !-- with default settings. |
---|
8410 | INQUIRE( FILE = 'SURFACE_PARAMETERS' // coupling_char, & |
---|
8411 | EXIST = ascii_file ) |
---|
8412 | |
---|
8413 | IF ( .NOT. ascii_file ) RETURN |
---|
8414 | |
---|
8415 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8416 | !-- read categories of walls and their parameters |
---|
8417 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8418 | DO ii = 0, io_blocks-1 |
---|
8419 | IF ( ii == io_group ) THEN |
---|
8420 | |
---|
8421 | !-- open urban surface file |
---|
8422 | OPEN( 151, file='SURFACE_PARAMETERS'//coupling_char, action='read', & |
---|
8423 | status='old', form='formatted', err=15 ) |
---|
8424 | !-- first test and get n_surface_types |
---|
8425 | k = 0 |
---|
8426 | l = 0 |
---|
8427 | DO |
---|
8428 | l = l+1 |
---|
8429 | READ( 151, *, err=11, end=12 ) wtc, wtp, wtn |
---|
8430 | k = k+1 |
---|
8431 | CYCLE |
---|
8432 | 11 CONTINUE |
---|
8433 | ENDDO |
---|
8434 | 12 n_surface_types = k |
---|
8435 | ALLOCATE( surface_type_names(n_surface_types) ) |
---|
8436 | ALLOCATE( surface_type_codes(n_surface_types) ) |
---|
8437 | ALLOCATE( surface_params(n_surface_params, n_surface_types) ) |
---|
8438 | !-- real reading |
---|
8439 | rewind( 151 ) |
---|
8440 | k = 0 |
---|
8441 | DO |
---|
8442 | READ( 151, *, err=13, end=14 ) wtc, wtp, wtn |
---|
8443 | k = k+1 |
---|
8444 | surface_type_codes(k) = wtc |
---|
8445 | surface_params(:,k) = wtp |
---|
8446 | surface_type_names(k) = wtn |
---|
8447 | CYCLE |
---|
8448 | 13 WRITE(6,'(i3,a,2i5)') myid, 'readparams2 error k=', k |
---|
8449 | FLUSH(6) |
---|
8450 | CONTINUE |
---|
8451 | ENDDO |
---|
8452 | 14 CLOSE(151) |
---|
8453 | CYCLE |
---|
8454 | 15 message_string = 'file SURFACE_PARAMETERS'//TRIM(coupling_char)//' does not exist' |
---|
8455 | CALL message( 'usm_read_urban_surface_types', 'PA0513', 1, 2, 0, 6, 0 ) |
---|
8456 | ENDIF |
---|
8457 | ENDDO |
---|
8458 | |
---|
8459 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8460 | !-- read types of surfaces |
---|
8461 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
8462 | usm_par = 0 |
---|
8463 | DO ii = 0, io_blocks-1 |
---|
8464 | IF ( ii == io_group ) THEN |
---|
8465 | |
---|
8466 | ! |
---|
8467 | !-- open csv urban surface file |
---|
8468 | OPEN( 151, file='URBAN_SURFACE'//TRIM(coupling_char), action='read', & |
---|
8469 | status='old', form='formatted', err=23 ) |
---|
8470 | |
---|
8471 | l = 0 |
---|
8472 | DO |
---|
8473 | l = l+1 |
---|
8474 | !-- i, j, height, nz, roof, dirwe, dirsn, category, soilcat, |
---|
8475 | !-- weheight1, wecat1, snheight1, sncat1, weheight2, wecat2, snheight2, sncat2, |
---|
8476 | !-- weheight3, wecat3, snheight3, sncat3 |
---|
8477 | READ( 151, *, err=21, end=25 ) i, j, height, nz, roof, dirwe, dirsn, & |
---|
8478 | category, albedo, thick, & |
---|
8479 | weheight1, wecat1, wealbedo1, wethick1, & |
---|
8480 | weheight2, wecat2, wealbedo2, wethick2, & |
---|
8481 | weheight3, wecat3, wealbedo3, wethick3, & |
---|
8482 | snheight1, sncat1, snalbedo1, snthick1, & |
---|
8483 | snheight2, sncat2, snalbedo2, snthick2, & |
---|
8484 | snheight3, sncat3, snalbedo3, snthick3 |
---|
8485 | |
---|
8486 | IF ( i >= nxlg .AND. i <= nxrg .AND. j >= nysg .AND. j <= nyng ) THEN |
---|
8487 | !-- write integer variables into array |
---|
8488 | usm_par(:,j,i) = (/1, nz, roof, dirwe, dirsn, category, & |
---|
8489 | weheight1, wecat1, weheight2, wecat2, weheight3, wecat3, & |
---|
8490 | snheight1, sncat1, snheight2, sncat2, snheight3, sncat3 /) |
---|
8491 | !-- write real values into array |
---|
8492 | usm_val(:,j,i) = (/ albedo, thick, & |
---|
8493 | wealbedo1, wethick1, wealbedo2, wethick2, & |
---|
8494 | wealbedo3, wethick3, snalbedo1, snthick1, & |
---|
8495 | snalbedo2, snthick2, snalbedo3, snthick3 /) |
---|
8496 | ENDIF |
---|
8497 | CYCLE |
---|
8498 | 21 WRITE (message_string, "(A,I5)") 'errors in file URBAN_SURFACE'//TRIM(coupling_char)//' on line ', l |
---|
8499 | CALL message( 'usm_read_urban_surface_types', 'PA0512', 0, 1, 0, 6, 0 ) |
---|
8500 | ENDDO |
---|
8501 | |
---|
8502 | 23 message_string = 'file URBAN_SURFACE'//TRIM(coupling_char)//' does not exist' |
---|
8503 | CALL message( 'usm_read_urban_surface_types', 'PA0514', 1, 2, 0, 6, 0 ) |
---|
8504 | |
---|
8505 | 25 CLOSE( 151 ) |
---|
8506 | |
---|
8507 | ENDIF |
---|
8508 | #if defined( __parallel ) |
---|
8509 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
8510 | #endif |
---|
8511 | ENDDO |
---|
8512 | |
---|
8513 | ! |
---|
8514 | !-- check completeness and formal correctness of the data |
---|
8515 | DO i = nxlg, nxrg |
---|
8516 | DO j = nysg, nyng |
---|
8517 | IF ( usm_par(0,j,i) /= 0 .AND. ( & !< incomplete data,supply default values later |
---|
8518 | usm_par(1,j,i) < nzb .OR. & |
---|
8519 | usm_par(1,j,i) > nzt .OR. & !< incorrect height (nz < nzb .OR. nz > nzt) |
---|
8520 | usm_par(2,j,i) < 0 .OR. & |
---|
8521 | usm_par(2,j,i) > 1 .OR. & !< incorrect roof sign |
---|
8522 | usm_par(3,j,i) < nzb-nzt .OR. & |
---|
8523 | usm_par(3,j,i) > nzt-nzb .OR. & !< incorrect west-east wall direction sign |
---|
8524 | usm_par(4,j,i) < nzb-nzt .OR. & |
---|
8525 | usm_par(4,j,i) > nzt-nzb .OR. & !< incorrect south-north wall direction sign |
---|
8526 | usm_par(6,j,i) < nzb .OR. & |
---|
8527 | usm_par(6,j,i) > nzt .OR. & !< incorrect pedestrian level height for west-east wall |
---|
8528 | usm_par(8,j,i) > nzt .OR. & |
---|
8529 | usm_par(10,j,i) > nzt .OR. & !< incorrect wall or roof level height for west-east wall |
---|
8530 | usm_par(12,j,i) < nzb .OR. & |
---|
8531 | usm_par(12,j,i) > nzt .OR. & !< incorrect pedestrian level height for south-north wall |
---|
8532 | usm_par(14,j,i) > nzt .OR. & |
---|
8533 | usm_par(16,j,i) > nzt & !< incorrect wall or roof level height for south-north wall |
---|
8534 | ) ) THEN |
---|
8535 | !-- incorrect input data |
---|
8536 | WRITE (message_string, "(A,2I5)") 'missing or incorrect data in file URBAN_SURFACE'// & |
---|
8537 | TRIM(coupling_char)//' for i,j=', i,j |
---|
8538 | CALL message( 'usm_read_urban_surface', 'PA0504', 1, 2, 0, 6, 0 ) |
---|
8539 | ENDIF |
---|
8540 | |
---|
8541 | ENDDO |
---|
8542 | ENDDO |
---|
8543 | ! |
---|
8544 | !-- Assign the surface types to the respective data type. |
---|
8545 | !-- First, for horizontal upward-facing surfaces. |
---|
8546 | !-- Further, set flag indicating that albedo is initialized via ASCII |
---|
8547 | !-- format, else it would be overwritten in the radiation model. |
---|
8548 | surf_usm_h%albedo_from_ascii = .TRUE. |
---|
8549 | DO m = 1, surf_usm_h%ns |
---|
8550 | iw = surf_usm_h%i(m) |
---|
8551 | jw = surf_usm_h%j(m) |
---|
8552 | kw = surf_usm_h%k(m) |
---|
8553 | |
---|
8554 | IF ( usm_par(5,jw,iw) == 0 ) THEN |
---|
8555 | #if ! defined( __nopointer ) |
---|
8556 | IF ( zu(kw) >= roof_height_limit ) THEN |
---|
8557 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
8558 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
8559 | ELSE |
---|
8560 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
8561 | surf_usm_h%surface_types(m) = land_category !< default category for land surface |
---|
8562 | ENDIF |
---|
8563 | #endif |
---|
8564 | surf_usm_h%albedo(:,m) = -1.0_wp |
---|
8565 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
8566 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
8567 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
8568 | ELSE |
---|
8569 | IF ( usm_par(2,jw,iw)==0 ) THEN |
---|
8570 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
8571 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
8572 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
8573 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
8574 | ELSE |
---|
8575 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
8576 | surf_usm_h%thickness_wall(m) = usm_val(2,jw,iw) |
---|
8577 | surf_usm_h%thickness_window(m) = usm_val(2,jw,iw) |
---|
8578 | surf_usm_h%thickness_green(m) = usm_val(2,jw,iw) |
---|
8579 | ENDIF |
---|
8580 | surf_usm_h%surface_types(m) = usm_par(5,jw,iw) |
---|
8581 | surf_usm_h%albedo(:,m) = usm_val(1,jw,iw) |
---|
8582 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
8583 | ENDIF |
---|
8584 | ! |
---|
8585 | !-- Find the type position |
---|
8586 | it = surf_usm_h%surface_types(m) |
---|
8587 | ip = -99999 |
---|
8588 | DO k = 1, n_surface_types |
---|
8589 | IF ( surface_type_codes(k) == it ) THEN |
---|
8590 | ip = k |
---|
8591 | EXIT |
---|
8592 | ENDIF |
---|
8593 | ENDDO |
---|
8594 | IF ( ip == -99999 ) THEN |
---|
8595 | !-- land/roof category not found |
---|
8596 | WRITE (9,"(A,I5,A,3I5)") 'land/roof category ', it, & |
---|
8597 | ' not found for i,j,k=', iw,jw,kw |
---|
8598 | FLUSH(9) |
---|
8599 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
8600 | category = roof_category |
---|
8601 | ELSE |
---|
8602 | category = land_category |
---|
8603 | ENDIF |
---|
8604 | DO k = 1, n_surface_types |
---|
8605 | IF ( surface_type_codes(k) == roof_category ) THEN |
---|
8606 | ip = k |
---|
8607 | EXIT |
---|
8608 | ENDIF |
---|
8609 | ENDDO |
---|
8610 | IF ( ip == -99999 ) THEN |
---|
8611 | !-- default land/roof category not found |
---|
8612 | WRITE (9,"(A,I5,A,3I5)") 'Default land/roof category', category, ' not found!' |
---|
8613 | FLUSH(9) |
---|
8614 | ip = 1 |
---|
8615 | ENDIF |
---|
8616 | ENDIF |
---|
8617 | ! |
---|
8618 | !-- Albedo |
---|
8619 | IF ( surf_usm_h%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
8620 | surf_usm_h%albedo(:,m) = surface_params(ialbedo,ip) |
---|
8621 | ENDIF |
---|
8622 | !-- Albedo type is 0 (custom), others are replaced later |
---|
8623 | surf_usm_h%albedo_type(:,m) = 0 |
---|
8624 | !-- Transmissivity |
---|
8625 | IF ( surf_usm_h%transmissivity(m) < 0.0_wp ) THEN |
---|
8626 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
8627 | ENDIF |
---|
8628 | ! |
---|
8629 | !-- emissivity of the wall |
---|
8630 | surf_usm_h%emissivity(:,m) = surface_params(iemiss,ip) |
---|
8631 | ! |
---|
8632 | !-- heat conductivity λS between air and wall ( W mâ2 Kâ1 ) |
---|
8633 | surf_usm_h%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
8634 | surf_usm_h%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
8635 | surf_usm_h%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
8636 | ! |
---|
8637 | !-- roughness length for momentum, heat and humidity |
---|
8638 | surf_usm_h%z0(m) = surface_params(irough,ip) |
---|
8639 | surf_usm_h%z0h(m) = surface_params(iroughh,ip) |
---|
8640 | surf_usm_h%z0q(m) = surface_params(iroughh,ip) |
---|
8641 | ! |
---|
8642 | !-- Surface skin layer heat capacity (J mâ2 Kâ1 ) |
---|
8643 | surf_usm_h%c_surface(m) = surface_params(icsurf,ip) |
---|
8644 | surf_usm_h%c_surface_window(m) = surface_params(icsurf,ip) |
---|
8645 | surf_usm_h%c_surface_green(m) = surface_params(icsurf,ip) |
---|
8646 | ! |
---|
8647 | !-- wall material parameters: |
---|
8648 | !-- thickness of the wall (m) |
---|
8649 | !-- missing values are replaced by default value for category |
---|
8650 | IF ( surf_usm_h%thickness_wall(m) <= 0.001_wp ) THEN |
---|
8651 | surf_usm_h%thickness_wall(m) = surface_params(ithick,ip) |
---|
8652 | ENDIF |
---|
8653 | IF ( surf_usm_h%thickness_window(m) <= 0.001_wp ) THEN |
---|
8654 | surf_usm_h%thickness_window(m) = surface_params(ithick,ip) |
---|
8655 | ENDIF |
---|
8656 | IF ( surf_usm_h%thickness_green(m) <= 0.001_wp ) THEN |
---|
8657 | surf_usm_h%thickness_green(m) = surface_params(ithick,ip) |
---|
8658 | ENDIF |
---|
8659 | ! |
---|
8660 | !-- volumetric heat capacity rho*C of the wall ( J mâ3 Kâ1 ) |
---|
8661 | surf_usm_h%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
8662 | surf_usm_h%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
8663 | surf_usm_h%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
8664 | ! |
---|
8665 | !-- thermal conductivity λH of the wall (W mâ1 Kâ1 ) |
---|
8666 | surf_usm_h%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
8667 | surf_usm_h%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
8668 | surf_usm_h%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
8669 | |
---|
8670 | ENDDO |
---|
8671 | ! |
---|
8672 | !-- For vertical surface elements ( 0 -- northward-facing, 1 -- southward-facing, |
---|
8673 | !-- 2 -- eastward-facing, 3 -- westward-facing ) |
---|
8674 | DO l = 0, 3 |
---|
8675 | ! |
---|
8676 | !-- Set flag indicating that albedo is initialized via ASCII format. |
---|
8677 | !-- Else it would be overwritten in the radiation model. |
---|
8678 | surf_usm_v(l)%albedo_from_ascii = .TRUE. |
---|
8679 | DO m = 1, surf_usm_v(l)%ns |
---|
8680 | i = surf_usm_v(l)%i(m) |
---|
8681 | j = surf_usm_v(l)%j(m) |
---|
8682 | kw = surf_usm_v(l)%k(m) |
---|
8683 | |
---|
8684 | IF ( l == 3 ) THEN ! westward facing |
---|
8685 | iw = i |
---|
8686 | jw = j |
---|
8687 | ii = 6 |
---|
8688 | ij = 3 |
---|
8689 | ELSEIF ( l == 2 ) THEN |
---|
8690 | iw = i-1 |
---|
8691 | jw = j |
---|
8692 | ii = 6 |
---|
8693 | ij = 3 |
---|
8694 | ELSEIF ( l == 1 ) THEN |
---|
8695 | iw = i |
---|
8696 | jw = j |
---|
8697 | ii = 12 |
---|
8698 | ij = 9 |
---|
8699 | ELSEIF ( l == 0 ) THEN |
---|
8700 | iw = i |
---|
8701 | jw = j-1 |
---|
8702 | ii = 12 |
---|
8703 | ij = 9 |
---|
8704 | ENDIF |
---|
8705 | |
---|
8706 | IF ( iw < 0 .OR. jw < 0 ) THEN |
---|
8707 | !-- wall on west or south border of the domain - assign default category |
---|
8708 | IF ( kw <= roof_height_limit ) THEN |
---|
8709 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
8710 | ELSE |
---|
8711 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
8712 | END IF |
---|
8713 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8714 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8715 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8716 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8717 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8718 | ELSE IF ( kw <= usm_par(ii,jw,iw) ) THEN |
---|
8719 | !-- pedestrian zone |
---|
8720 | IF ( usm_par(ii+1,jw,iw) == 0 ) THEN |
---|
8721 | surf_usm_v(l)%surface_types(m) = pedestrian_category !< default category for wall surface in pedestrian zone |
---|
8722 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8723 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8724 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8725 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8726 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8727 | ELSE |
---|
8728 | surf_usm_v(l)%surface_types(m) = usm_par(ii+1,jw,iw) |
---|
8729 | surf_usm_v(l)%albedo(:,m) = usm_val(ij,jw,iw) |
---|
8730 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+1,jw,iw) |
---|
8731 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+1,jw,iw) |
---|
8732 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+1,jw,iw) |
---|
8733 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
8734 | ENDIF |
---|
8735 | ELSE IF ( kw <= usm_par(ii+2,jw,iw) ) THEN |
---|
8736 | !-- wall zone |
---|
8737 | IF ( usm_par(ii+3,jw,iw) == 0 ) THEN |
---|
8738 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface |
---|
8739 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8740 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8741 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8742 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8743 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8744 | ELSE |
---|
8745 | surf_usm_v(l)%surface_types(m) = usm_par(ii+3,jw,iw) |
---|
8746 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+2,jw,iw) |
---|
8747 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+3,jw,iw) |
---|
8748 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+3,jw,iw) |
---|
8749 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+3,jw,iw) |
---|
8750 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
8751 | ENDIF |
---|
8752 | ELSE IF ( kw <= usm_par(ii+4,jw,iw) ) THEN |
---|
8753 | !-- roof zone |
---|
8754 | IF ( usm_par(ii+5,jw,iw) == 0 ) THEN |
---|
8755 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for roof surface |
---|
8756 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8757 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8758 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8759 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8760 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8761 | ELSE |
---|
8762 | surf_usm_v(l)%surface_types(m) = usm_par(ii+5,jw,iw) |
---|
8763 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+4,jw,iw) |
---|
8764 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+5,jw,iw) |
---|
8765 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+5,jw,iw) |
---|
8766 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+5,jw,iw) |
---|
8767 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
8768 | ENDIF |
---|
8769 | ELSE |
---|
8770 | ! |
---|
8771 | WRITE(9,*) 'Problem reading USM data:' |
---|
8772 | WRITE(9,*) l,i,j,kw,get_topography_top_index_ji( j, i, 's' ) |
---|
8773 | WRITE(9,*) ii,iw,jw,kw,get_topography_top_index_ji( jw, iw, 's' ) |
---|
8774 | WRITE(9,*) usm_par(ii,jw,iw),usm_par(ii+1,jw,iw) |
---|
8775 | WRITE(9,*) usm_par(ii+2,jw,iw),usm_par(ii+3,jw,iw) |
---|
8776 | WRITE(9,*) usm_par(ii+4,jw,iw),usm_par(ii+5,jw,iw) |
---|
8777 | WRITE(9,*) kw,roof_height_limit,wall_category,roof_category |
---|
8778 | FLUSH(9) |
---|
8779 | !-- supply the default category |
---|
8780 | IF ( kw <= roof_height_limit ) THEN |
---|
8781 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
8782 | ELSE |
---|
8783 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
8784 | END IF |
---|
8785 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
8786 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
8787 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
8788 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
8789 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
8790 | ENDIF |
---|
8791 | ! |
---|
8792 | !-- Find the type position |
---|
8793 | it = surf_usm_v(l)%surface_types(m) |
---|
8794 | ip = -99999 |
---|
8795 | DO k = 1, n_surface_types |
---|
8796 | IF ( surface_type_codes(k) == it ) THEN |
---|
8797 | ip = k |
---|
8798 | EXIT |
---|
8799 | ENDIF |
---|
8800 | ENDDO |
---|
8801 | IF ( ip == -99999 ) THEN |
---|
8802 | !-- wall category not found |
---|
8803 | WRITE (9, "(A,I7,A,3I5)") 'wall category ', it, & |
---|
8804 | ' not found for i,j,k=', iw,jw,kw |
---|
8805 | FLUSH(9) |
---|
8806 | category = wall_category |
---|
8807 | DO k = 1, n_surface_types |
---|
8808 | IF ( surface_type_codes(k) == category ) THEN |
---|
8809 | ip = k |
---|
8810 | EXIT |
---|
8811 | ENDIF |
---|
8812 | ENDDO |
---|
8813 | IF ( ip == -99999 ) THEN |
---|
8814 | !-- default wall category not found |
---|
8815 | WRITE (9, "(A,I5,A,3I5)") 'Default wall category', category, ' not found!' |
---|
8816 | FLUSH(9) |
---|
8817 | ip = 1 |
---|
8818 | ENDIF |
---|
8819 | ENDIF |
---|
8820 | |
---|
8821 | ! |
---|
8822 | !-- Albedo |
---|
8823 | IF ( surf_usm_v(l)%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
8824 | surf_usm_v(l)%albedo(:,m) = surface_params(ialbedo,ip) |
---|
8825 | ENDIF |
---|
8826 | !-- Albedo type is 0 (custom), others are replaced later |
---|
8827 | surf_usm_v(l)%albedo_type(:,m) = 0 |
---|
8828 | !-- Transmissivity of the windows |
---|
8829 | IF ( surf_usm_v(l)%transmissivity(m) < 0.0_wp ) THEN |
---|
8830 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
8831 | ENDIF |
---|
8832 | ! |
---|
8833 | !-- emissivity of the wall |
---|
8834 | surf_usm_v(l)%emissivity(:,m) = surface_params(iemiss,ip) |
---|
8835 | ! |
---|
8836 | !-- heat conductivity lambda S between air and wall ( W m-2 K-1 ) |
---|
8837 | surf_usm_v(l)%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
8838 | surf_usm_v(l)%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
8839 | surf_usm_v(l)%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
8840 | ! |
---|
8841 | !-- roughness length |
---|
8842 | surf_usm_v(l)%z0(m) = surface_params(irough,ip) |
---|
8843 | surf_usm_v(l)%z0h(m) = surface_params(iroughh,ip) |
---|
8844 | surf_usm_v(l)%z0q(m) = surface_params(iroughh,ip) |
---|
8845 | ! |
---|
8846 | !-- Surface skin layer heat capacity (J m-2 K-1 ) |
---|
8847 | surf_usm_v(l)%c_surface(m) = surface_params(icsurf,ip) |
---|
8848 | surf_usm_v(l)%c_surface_window(m) = surface_params(icsurf,ip) |
---|
8849 | surf_usm_v(l)%c_surface_green(m) = surface_params(icsurf,ip) |
---|
8850 | ! |
---|
8851 | !-- wall material parameters: |
---|
8852 | !-- thickness of the wall (m) |
---|
8853 | !-- missing values are replaced by default value for category |
---|
8854 | IF ( surf_usm_v(l)%thickness_wall(m) <= 0.001_wp ) THEN |
---|
8855 | surf_usm_v(l)%thickness_wall(m) = surface_params(ithick,ip) |
---|
8856 | ENDIF |
---|
8857 | IF ( surf_usm_v(l)%thickness_window(m) <= 0.001_wp ) THEN |
---|
8858 | surf_usm_v(l)%thickness_window(m) = surface_params(ithick,ip) |
---|
8859 | ENDIF |
---|
8860 | IF ( surf_usm_v(l)%thickness_green(m) <= 0.001_wp ) THEN |
---|
8861 | surf_usm_v(l)%thickness_green(m) = surface_params(ithick,ip) |
---|
8862 | ENDIF |
---|
8863 | ! |
---|
8864 | !-- volumetric heat capacity rho*C of the wall ( J m-3 K-1 ) |
---|
8865 | surf_usm_v(l)%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
8866 | surf_usm_v(l)%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
8867 | surf_usm_v(l)%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
8868 | ! |
---|
8869 | !-- thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
8870 | surf_usm_v(l)%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
8871 | surf_usm_v(l)%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
8872 | surf_usm_v(l)%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
8873 | |
---|
8874 | ENDDO |
---|
8875 | ENDDO |
---|
8876 | |
---|
8877 | ! |
---|
8878 | !-- Initialize wall layer thicknesses. Please note, this will be removed |
---|
8879 | !-- after migration to Palm input data standard. |
---|
8880 | DO k = nzb_wall, nzt_wall |
---|
8881 | zwn(k) = zwn_default(k) |
---|
8882 | zwn_green(k) = zwn_default_green(k) |
---|
8883 | zwn_window(k) = zwn_default_window(k) |
---|
8884 | ENDDO |
---|
8885 | ! |
---|
8886 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
8887 | DO m = 1, surf_usm_h%ns |
---|
8888 | surf_usm_h%zw(:,m) = zwn(:) * surf_usm_h%thickness_wall(m) |
---|
8889 | surf_usm_h%zw_green(:,m) = zwn_green(:) * surf_usm_h%thickness_green(m) |
---|
8890 | surf_usm_h%zw_window(:,m) = zwn_window(:) * surf_usm_h%thickness_window(m) |
---|
8891 | ENDDO |
---|
8892 | DO l = 0, 3 |
---|
8893 | DO m = 1, surf_usm_v(l)%ns |
---|
8894 | surf_usm_v(l)%zw(:,m) = zwn(:) * surf_usm_v(l)%thickness_wall(m) |
---|
8895 | surf_usm_v(l)%zw_green(:,m) = zwn_green(:) * surf_usm_v(l)%thickness_green(m) |
---|
8896 | surf_usm_v(l)%zw_window(:,m) = zwn_window(:) * surf_usm_v(l)%thickness_window(m) |
---|
8897 | ENDDO |
---|
8898 | ENDDO |
---|
8899 | |
---|
8900 | |
---|
8901 | WRITE(9,*) 'Urban surfaces read' |
---|
8902 | FLUSH(9) |
---|
8903 | |
---|
8904 | CALL location_message( ' types and parameters of urban surfaces read', .TRUE. ) |
---|
8905 | |
---|
8906 | END SUBROUTINE usm_read_urban_surface_types |
---|
8907 | |
---|
8908 | |
---|
8909 | !------------------------------------------------------------------------------! |
---|
8910 | ! Description: |
---|
8911 | ! ------------ |
---|
8912 | ! |
---|
8913 | !> This function advances through the list of local surfaces to find given |
---|
8914 | !> x, y, d, z coordinates |
---|
8915 | !------------------------------------------------------------------------------! |
---|
8916 | PURE FUNCTION find_surface( x, y, z, d ) result(isurfl) |
---|
8917 | |
---|
8918 | INTEGER(iwp), INTENT(in) :: x, y, z, d |
---|
8919 | INTEGER(iwp) :: isurfl |
---|
8920 | INTEGER(iwp) :: isx, isy, isz |
---|
8921 | |
---|
8922 | IF ( d == 0 ) THEN |
---|
8923 | DO isurfl = 1, surf_usm_h%ns |
---|
8924 | isx = surf_usm_h%i(isurfl) |
---|
8925 | isy = surf_usm_h%j(isurfl) |
---|
8926 | isz = surf_usm_h%k(isurfl) |
---|
8927 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
8928 | ENDDO |
---|
8929 | ELSE |
---|
8930 | DO isurfl = 1, surf_usm_v(d-1)%ns |
---|
8931 | isx = surf_usm_v(d-1)%i(isurfl) |
---|
8932 | isy = surf_usm_v(d-1)%j(isurfl) |
---|
8933 | isz = surf_usm_v(d-1)%k(isurfl) |
---|
8934 | IF ( isx==x .and. isy==y .and. isz==z ) RETURN |
---|
8935 | ENDDO |
---|
8936 | ENDIF |
---|
8937 | |
---|
8938 | !-- coordinate not found |
---|
8939 | isurfl = -1 |
---|
8940 | |
---|
8941 | END FUNCTION |
---|
8942 | |
---|
8943 | |
---|
8944 | !------------------------------------------------------------------------------! |
---|
8945 | ! Description: |
---|
8946 | ! ------------ |
---|
8947 | ! |
---|
8948 | !> This subroutine reads temperatures of respective material layers in walls, |
---|
8949 | !> roofs and ground from input files. Data in the input file must be in |
---|
8950 | !> standard order, i.e. horizontal surfaces first ordered by x, y and then |
---|
8951 | !> vertical surfaces ordered by x, y, direction, z |
---|
8952 | !------------------------------------------------------------------------------! |
---|
8953 | SUBROUTINE usm_read_wall_temperature |
---|
8954 | |
---|
8955 | INTEGER(iwp) :: i, j, k, d, ii, iline |
---|
8956 | INTEGER(iwp) :: isurfl |
---|
8957 | REAL(wp) :: rtsurf |
---|
8958 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: rtwall |
---|
8959 | |
---|
8960 | |
---|
8961 | |
---|
8962 | |
---|
8963 | DO ii = 0, io_blocks-1 |
---|
8964 | IF ( ii == io_group ) THEN |
---|
8965 | |
---|
8966 | !-- open wall temperature file |
---|
8967 | OPEN( 152, file='WALL_TEMPERATURE'//coupling_char, action='read', & |
---|
8968 | status='old', form='formatted', err=15 ) |
---|
8969 | |
---|
8970 | isurfl = 0 |
---|
8971 | iline = 1 |
---|
8972 | DO |
---|
8973 | rtwall = -9999.0_wp !< for incomplete lines |
---|
8974 | READ( 152, *, err=13, end=14 ) i, j, k, d, rtsurf, rtwall |
---|
8975 | |
---|
8976 | IF ( nxl <= i .and. i <= nxr .and. & |
---|
8977 | nys <= j .and. j <= nyn) THEN !< local processor |
---|
8978 | !-- identify surface id |
---|
8979 | isurfl = find_surface( i, j, k, d ) |
---|
8980 | IF ( isurfl == -1 ) THEN |
---|
8981 | WRITE(message_string, '(a,4i5,a,i5,a)') 'Coordinates (xyzd) ', i, j, k, d, & |
---|
8982 | ' on line ', iline, & |
---|
8983 | ' in file WALL_TEMPERATURE are either not present or out of standard order of surfaces.' |
---|
8984 | CALL message( 'usm_read_wall_temperature', 'PA0521', 1, 2, 0, 6, 0 ) |
---|
8985 | ENDIF |
---|
8986 | |
---|
8987 | !-- assign temperatures |
---|
8988 | IF ( d == 0 ) THEN |
---|
8989 | t_surf_wall_h(isurfl) = rtsurf |
---|
8990 | t_wall_h(:,isurfl) = rtwall(:) |
---|
8991 | t_window_h(:,isurfl) = rtwall(:) |
---|
8992 | t_green_h(:,isurfl) = rtwall(:) |
---|
8993 | ELSE |
---|
8994 | t_surf_wall_v(d-1)%t(isurfl) = rtsurf |
---|
8995 | t_wall_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
8996 | t_window_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
8997 | t_green_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
8998 | ENDIF |
---|
8999 | ENDIF |
---|
9000 | |
---|
9001 | iline = iline + 1 |
---|
9002 | CYCLE |
---|
9003 | 13 WRITE(message_string, '(a,i5,a)') 'Error reading line ', iline, & |
---|
9004 | ' in file WALL_TEMPERATURE.' |
---|
9005 | CALL message( 'usm_read_wall_temperature', 'PA0522', 1, 2, 0, 6, 0 ) |
---|
9006 | ENDDO |
---|
9007 | 14 CLOSE(152) |
---|
9008 | CYCLE |
---|
9009 | 15 message_string = 'file WALL_TEMPERATURE'//TRIM(coupling_char)//' does not exist' |
---|
9010 | CALL message( 'usm_read_wall_temperature', 'PA0523', 1, 2, 0, 6, 0 ) |
---|
9011 | ENDIF |
---|
9012 | #if defined( __parallel ) |
---|
9013 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
9014 | #endif |
---|
9015 | ENDDO |
---|
9016 | |
---|
9017 | CALL location_message( ' wall layer temperatures read', .TRUE. ) |
---|
9018 | |
---|
9019 | END SUBROUTINE usm_read_wall_temperature |
---|
9020 | |
---|
9021 | |
---|
9022 | |
---|
9023 | !------------------------------------------------------------------------------! |
---|
9024 | ! Description: |
---|
9025 | ! ------------ |
---|
9026 | !> Solver for the energy balance at the ground/roof/wall surface. |
---|
9027 | !> It follows basic ideas and structure of lsm_energy_balance |
---|
9028 | !> with many simplifications and adjustments. |
---|
9029 | !> TODO better description |
---|
9030 | !------------------------------------------------------------------------------! |
---|
9031 | SUBROUTINE usm_surface_energy_balance( spinup ) |
---|
9032 | |
---|
9033 | |
---|
9034 | IMPLICIT NONE |
---|
9035 | |
---|
9036 | INTEGER(iwp) :: i, j, k, l, d, m !< running indices |
---|
9037 | |
---|
9038 | INTEGER(iwp) :: i_off !< offset to determine index of surface element, seen from atmospheric grid point, for x |
---|
9039 | INTEGER(iwp) :: j_off !< offset to determine index of surface element, seen from atmospheric grid point, for y |
---|
9040 | INTEGER(iwp) :: k_off !< offset to determine index of surface element, seen from atmospheric grid point, for z |
---|
9041 | |
---|
9042 | LOGICAL :: spinup !true during spinup |
---|
9043 | |
---|
9044 | REAL(wp) :: u1,v1,w1 !< near wall u,v,w |
---|
9045 | REAL(wp) :: stend_wall !< surface tendency |
---|
9046 | |
---|
9047 | REAL(wp) :: stend_window !< surface tendency |
---|
9048 | REAL(wp) :: stend_green !< surface tendency |
---|
9049 | REAL(wp) :: coef_1 !< first coeficient for prognostic equation |
---|
9050 | REAL(wp) :: coef_window_1 !< first coeficient for prognostic window equation |
---|
9051 | REAL(wp) :: coef_green_1 !< first coeficient for prognostic green wall equation |
---|
9052 | REAL(wp) :: coef_2 !< second coeficient for prognostic equation |
---|
9053 | REAL(wp) :: coef_window_2 !< second coeficient for prognostic window equation |
---|
9054 | REAL(wp) :: coef_green_2 !< second coeficient for prognostic green wall equation |
---|
9055 | REAL(wp) :: rho_cp !< rho_wall_surface * c_p |
---|
9056 | REAL(wp) :: f_shf !< factor for shf_eb |
---|
9057 | REAL(wp) :: f_shf_window !< factor for shf_eb window |
---|
9058 | REAL(wp) :: f_shf_green !< factor for shf_eb green wall |
---|
9059 | REAL(wp) :: lambda_surface !< current value of lambda_surface (heat conductivity between air and wall) |
---|
9060 | REAL(wp) :: lambda_surface_window !< current value of lambda_surface (heat conductivity between air and window) |
---|
9061 | REAL(wp) :: lambda_surface_green !< current value of lambda_surface (heat conductivity between air and greeb wall) |
---|
9062 | |
---|
9063 | REAL(wp) :: dtime !< simulated time of day (in UTC) |
---|
9064 | INTEGER(iwp) :: dhour !< simulated hour of day (in UTC) |
---|
9065 | REAL(wp) :: acoef !< actual coefficient of diurnal profile of anthropogenic heat |
---|
9066 | REAL(wp) :: f1, & !< resistance correction term 1 |
---|
9067 | f2, & !< resistance correction term 2 |
---|
9068 | f3, & !< resistance correction term 3 |
---|
9069 | e, & !< water vapour pressure |
---|
9070 | e_s, & !< water vapour saturation pressure |
---|
9071 | e_s_dt, & !< derivate of e_s with respect to T |
---|
9072 | tend, & !< tendency |
---|
9073 | dq_s_dt, & !< derivate of q_s with respect to T |
---|
9074 | f_qsws, & !< factor for qsws |
---|
9075 | f_qsws_veg, & !< factor for qsws_veg |
---|
9076 | f_qsws_liq, & !< factor for qsws_liq |
---|
9077 | m_liq_max, & !< maxmimum value of the liq. water reservoir |
---|
9078 | qv1, & !< specific humidity at first grid level |
---|
9079 | m_max_depth = 0.0002_wp, & ! Maximum capacity of the water reservoir (m) |
---|
9080 | rho_lv, & |
---|
9081 | drho_l_lv, & |
---|
9082 | q_s |
---|
9083 | |
---|
9084 | ! |
---|
9085 | !-- Index offset of surface element point with respect to adjoining |
---|
9086 | !-- atmospheric grid point |
---|
9087 | k_off = surf_usm_h%koff |
---|
9088 | j_off = surf_usm_h%joff |
---|
9089 | i_off = surf_usm_h%ioff |
---|
9090 | |
---|
9091 | ! |
---|
9092 | !-- First, treat horizontal surface elements |
---|
9093 | DO m = 1, surf_usm_h%ns |
---|
9094 | ! |
---|
9095 | !-- Get indices of respective grid point |
---|
9096 | i = surf_usm_h%i(m) |
---|
9097 | j = surf_usm_h%j(m) |
---|
9098 | k = surf_usm_h%k(m) |
---|
9099 | ! |
---|
9100 | !-- TODO - how to calculate lambda_surface for horizontal surfaces |
---|
9101 | !-- (lambda_surface is set according to stratification in land surface model) |
---|
9102 | !-- MS: ??? |
---|
9103 | IF ( surf_usm_h%ol(m) >= 0.0_wp ) THEN |
---|
9104 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
9105 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
9106 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
9107 | ELSE |
---|
9108 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
9109 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
9110 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
9111 | ENDIF |
---|
9112 | #if ! defined( __nopointer ) |
---|
9113 | ! pt1 = pt(k,j,i) |
---|
9114 | IF ( humidity ) THEN |
---|
9115 | qv1 = q(k,j,i) |
---|
9116 | ELSE |
---|
9117 | qv1 = 0.0_wp |
---|
9118 | ENDIF |
---|
9119 | ! |
---|
9120 | !-- calculate rho * c_p coefficient at surface layer |
---|
9121 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_h%pt1(m) * exner(k) ) |
---|
9122 | |
---|
9123 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
9124 | ! |
---|
9125 | !-- Calculate frequently used parameters |
---|
9126 | rho_lv = rho_cp / c_p * l_v |
---|
9127 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
9128 | endif |
---|
9129 | #endif |
---|
9130 | ! |
---|
9131 | !-- Calculate aerodyamic resistance. |
---|
9132 | !-- Calculation for horizontal surfaces follows LSM formulation |
---|
9133 | !-- pt, us, ts are not available for the prognostic time step, |
---|
9134 | !-- data from the last time step is used here. |
---|
9135 | |
---|
9136 | !-- Workaround: use single r_a as stability is only treated for the |
---|
9137 | !-- average temperature |
---|
9138 | surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /& |
---|
9139 | ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
9140 | surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m) |
---|
9141 | surf_usm_h%r_a_green(m) = surf_usm_h%r_a(m) |
---|
9142 | |
---|
9143 | ! r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exner(k) ) / & |
---|
9144 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
9145 | ! r_a_window = ( surf_usm_h%pt1(m) - t_surf_window_h(m) / exner(k) ) / & |
---|
9146 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
9147 | ! r_a_green = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
9148 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
9149 | |
---|
9150 | !-- Make sure that the resistance does not drop to zero |
---|
9151 | IF ( surf_usm_h%r_a(m) < 1.0_wp ) & |
---|
9152 | surf_usm_h%r_a(m) = 1.0_wp |
---|
9153 | IF ( surf_usm_h%r_a_green(m) < 1.0_wp ) & |
---|
9154 | surf_usm_h%r_a_green(m) = 1.0_wp |
---|
9155 | IF ( surf_usm_h%r_a_window(m) < 1.0_wp ) & |
---|
9156 | surf_usm_h%r_a_window(m) = 1.0_wp |
---|
9157 | |
---|
9158 | ! |
---|
9159 | !-- Make sure that the resistacne does not exceed a maxmium value in case |
---|
9160 | !-- of zero velocities |
---|
9161 | IF ( surf_usm_h%r_a(m) > 300.0_wp ) & |
---|
9162 | surf_usm_h%r_a(m) = 300.0_wp |
---|
9163 | IF ( surf_usm_h%r_a_green(m) > 300.0_wp ) & |
---|
9164 | surf_usm_h%r_a_green(m) = 300.0_wp |
---|
9165 | IF ( surf_usm_h%r_a_window(m) > 300.0_wp ) & |
---|
9166 | surf_usm_h%r_a_window(m) = 300.0_wp |
---|
9167 | |
---|
9168 | |
---|
9169 | !-- factor for shf_eb |
---|
9170 | f_shf = rho_cp / surf_usm_h%r_a(m) |
---|
9171 | f_shf_window = rho_cp / surf_usm_h%r_a_window(m) |
---|
9172 | f_shf_green = rho_cp / surf_usm_h%r_a_green(m) |
---|
9173 | |
---|
9174 | !*************************************************************************************** |
---|
9175 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
9176 | !-- Adapted from LSM: |
---|
9177 | !-- Second step: calculate canopy resistance r_canopy |
---|
9178 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
9179 | |
---|
9180 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
9181 | !-- night) |
---|
9182 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_h%rad_sw_in(m) + 0.05_wp ) / & |
---|
9183 | (0.81_wp * (0.004_wp * surf_usm_h%rad_sw_in(m) & |
---|
9184 | + 1.0_wp)) ) |
---|
9185 | ! |
---|
9186 | !-- f2: correction for soil moisture availability to plants (the |
---|
9187 | !-- integrated soil moisture must thus be considered here) |
---|
9188 | !-- f2 = 0 for very dry soils |
---|
9189 | m_total = 0.0_wp |
---|
9190 | DO k = nzb_wall, nzt_wall+1 |
---|
9191 | m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
9192 | * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
9193 | ENDDO |
---|
9194 | |
---|
9195 | IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
9196 | f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
9197 | ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
9198 | f2 = 1.0_wp |
---|
9199 | ELSE |
---|
9200 | f2 = 1.0E-20_wp |
---|
9201 | ENDIF |
---|
9202 | |
---|
9203 | ! |
---|
9204 | !-- Calculate water vapour pressure at saturation |
---|
9205 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_h(m) & |
---|
9206 | - 273.16_wp ) / ( t_surf_green_h(m) - 35.86_wp ) ) |
---|
9207 | ! |
---|
9208 | !-- f3: correction for vapour pressure deficit |
---|
9209 | IF ( surf_usm_h%g_d(m) /= 0.0_wp ) THEN |
---|
9210 | ! |
---|
9211 | !-- Calculate vapour pressure |
---|
9212 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
9213 | f3 = EXP ( - surf_usm_h%g_d(m) * (e_s - e) ) |
---|
9214 | ELSE |
---|
9215 | f3 = 1.0_wp |
---|
9216 | ENDIF |
---|
9217 | |
---|
9218 | ! |
---|
9219 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
9220 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
9221 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
9222 | surf_usm_h%r_canopy(m) = surf_usm_h%r_canopy_min(m) / & |
---|
9223 | ( surf_usm_h%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
9224 | |
---|
9225 | ! |
---|
9226 | !-- Calculate the maximum possible liquid water amount on plants and |
---|
9227 | !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
9228 | !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
9229 | !-- liquid water fraction for paved surfaces is calculated after |
---|
9230 | !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
9231 | !-- vegetated surfaces and bare soils. |
---|
9232 | m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
9233 | surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
9234 | ! |
---|
9235 | !-- Calculate saturation specific humidity |
---|
9236 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
9237 | ! |
---|
9238 | !-- In case of dewfall, set evapotranspiration to zero |
---|
9239 | !-- All super-saturated water is then removed from the air |
---|
9240 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
9241 | surf_usm_h%r_canopy(m) = 0.0_wp |
---|
9242 | ENDIF |
---|
9243 | |
---|
9244 | ! |
---|
9245 | !-- Calculate coefficients for the total evapotranspiration |
---|
9246 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
9247 | !-- For pavements, only evaporation of liquid water is possible. |
---|
9248 | f_qsws_veg = rho_lv * & |
---|
9249 | ( 1.0_wp - surf_usm_h%c_liq(m) ) / & |
---|
9250 | ( surf_usm_h%r_a_green(m) + surf_usm_h%r_canopy(m) ) |
---|
9251 | f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
9252 | surf_usm_h%r_a_green(m) |
---|
9253 | |
---|
9254 | f_qsws = f_qsws_veg + f_qsws_liq |
---|
9255 | ! |
---|
9256 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
9257 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_h(m) - 35.86_wp) - & |
---|
9258 | 17.269_wp*( t_surf_green_h(m) - 273.16_wp) & |
---|
9259 | / ( t_surf_green_h(m) - 35.86_wp)**2 ) |
---|
9260 | |
---|
9261 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
9262 | endif |
---|
9263 | !*********************************************************************************** |
---|
9264 | !-- add LW up so that it can be removed in prognostic equation |
---|
9265 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_sw_in(m) - & |
---|
9266 | surf_usm_h%rad_sw_out(m) + & |
---|
9267 | surf_usm_h%rad_lw_in(m) - & |
---|
9268 | surf_usm_h%rad_lw_out(m) |
---|
9269 | |
---|
9270 | !-- numerator of the prognostic equation |
---|
9271 | !-- Todo: Adjust to tile approach. So far, emissivity for wall (element 0) |
---|
9272 | !-- is used |
---|
9273 | coef_1 = surf_usm_h%rad_net_l(m) + & |
---|
9274 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
9275 | sigma_sb * t_surf_wall_h(m) ** 4 + & |
---|
9276 | f_shf * surf_usm_h%pt1(m) + & |
---|
9277 | lambda_surface * t_wall_h(nzb_wall,m) |
---|
9278 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9279 | coef_window_1 = surf_usm_h%rad_net_l(m) + & |
---|
9280 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_wat_win,m) & |
---|
9281 | * sigma_sb * t_surf_window_h(m) ** 4 + & |
---|
9282 | f_shf_window * surf_usm_h%pt1(m) + & |
---|
9283 | lambda_surface_window * t_window_h(nzb_wall,m) |
---|
9284 | endif |
---|
9285 | IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
9286 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
9287 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9288 | t_surf_green_h(m) ** 4 + & |
---|
9289 | f_shf_green * surf_usm_h%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
9290 | + dq_s_dt * t_surf_green_h(m) ) & |
---|
9291 | +lambda_surface_green * t_green_h(nzb_wall,m) |
---|
9292 | ELSE |
---|
9293 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
9294 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) *& |
---|
9295 | sigma_sb * t_surf_green_h(m) ** 4 + & |
---|
9296 | f_shf_green * surf_usm_h%pt1(m) + & |
---|
9297 | lambda_surface_green * t_green_h(nzb_wall,m) |
---|
9298 | ENDIF |
---|
9299 | |
---|
9300 | !-- denominator of the prognostic equation |
---|
9301 | coef_2 = 4.0_wp * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
9302 | sigma_sb * t_surf_wall_h(m) ** 3 & |
---|
9303 | + lambda_surface + f_shf / exner(k) |
---|
9304 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9305 | coef_window_2 = 4.0_wp * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
9306 | sigma_sb * t_surf_window_h(m) ** 3 & |
---|
9307 | + lambda_surface_window + f_shf_window / exner(k) |
---|
9308 | endif |
---|
9309 | IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
9310 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9311 | t_surf_green_h(m) ** 3 + f_qsws * dq_s_dt & |
---|
9312 | + lambda_surface_green + f_shf_green / exner(k) |
---|
9313 | ELSE |
---|
9314 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9315 | t_surf_green_h(m) ** 3 & |
---|
9316 | + lambda_surface_green + f_shf_green / exner(k) |
---|
9317 | ENDIF |
---|
9318 | |
---|
9319 | !-- implicit solution when the surface layer has no heat capacity, |
---|
9320 | !-- otherwise use RK3 scheme. |
---|
9321 | t_surf_wall_h_p(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
9322 | surf_usm_h%c_surface(m) * t_surf_wall_h(m) ) / & |
---|
9323 | ( surf_usm_h%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
9324 | if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9325 | t_surf_window_h_p(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
9326 | surf_usm_h%c_surface_window(m) * t_surf_window_h(m) ) / & |
---|
9327 | ( surf_usm_h%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
9328 | endif |
---|
9329 | t_surf_green_h_p(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
9330 | surf_usm_h%c_surface_green(m) * t_surf_green_h(m) ) / & |
---|
9331 | ( surf_usm_h%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
9332 | |
---|
9333 | !-- add RK3 term |
---|
9334 | t_surf_wall_h_p(m) = t_surf_wall_h_p(m) + dt_3d * tsc(3) * & |
---|
9335 | surf_usm_h%tt_surface_wall_m(m) |
---|
9336 | |
---|
9337 | t_surf_window_h_p(m) = t_surf_window_h_p(m) + dt_3d * tsc(3) * & |
---|
9338 | surf_usm_h%tt_surface_window_m(m) |
---|
9339 | |
---|
9340 | t_surf_green_h_p(m) = t_surf_green_h_p(m) + dt_3d * tsc(3) * & |
---|
9341 | surf_usm_h%tt_surface_green_m(m) |
---|
9342 | ! |
---|
9343 | !-- Store surface temperature on pt_surface. Further, in case humidity is used |
---|
9344 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
9345 | !-- assumed to be the surface temperature. |
---|
9346 | surf_usm_h%pt_surface(m) = ( surf_usm_h%frac(ind_veg_wall,m) * t_surf_wall_h_p(m) & |
---|
9347 | + surf_usm_h%frac(ind_wat_win,m) * t_surf_window_h_p(m) & |
---|
9348 | + surf_usm_h%frac(ind_pav_green,m) * t_surf_green_h_p(m) ) & |
---|
9349 | / exner(k) |
---|
9350 | |
---|
9351 | IF ( humidity ) surf_usm_h%vpt_surface(m) = & |
---|
9352 | surf_usm_h%pt_surface(m) |
---|
9353 | |
---|
9354 | !-- calculate true tendency |
---|
9355 | stend_wall = ( t_surf_wall_h_p(m) - t_surf_wall_h(m) - dt_3d * tsc(3) * & |
---|
9356 | surf_usm_h%tt_surface_wall_m(m)) / ( dt_3d * tsc(2) ) |
---|
9357 | stend_window = ( t_surf_window_h_p(m) - t_surf_window_h(m) - dt_3d * tsc(3) * & |
---|
9358 | surf_usm_h%tt_surface_window_m(m)) / ( dt_3d * tsc(2) ) |
---|
9359 | stend_green = ( t_surf_green_h_p(m) - t_surf_green_h(m) - dt_3d * tsc(3) * & |
---|
9360 | surf_usm_h%tt_surface_green_m(m)) / ( dt_3d * tsc(2) ) |
---|
9361 | |
---|
9362 | !-- calculate t_surf tendencies for the next Runge-Kutta step |
---|
9363 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
9364 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
9365 | surf_usm_h%tt_surface_wall_m(m) = stend_wall |
---|
9366 | surf_usm_h%tt_surface_window_m(m) = stend_window |
---|
9367 | surf_usm_h%tt_surface_green_m(m) = stend_green |
---|
9368 | ELSEIF ( intermediate_timestep_count < & |
---|
9369 | intermediate_timestep_count_max ) THEN |
---|
9370 | surf_usm_h%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
9371 | 5.3125_wp * surf_usm_h%tt_surface_wall_m(m) |
---|
9372 | surf_usm_h%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
9373 | 5.3125_wp * surf_usm_h%tt_surface_window_m(m) |
---|
9374 | surf_usm_h%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
9375 | 5.3125_wp * surf_usm_h%tt_surface_green_m(m) |
---|
9376 | ENDIF |
---|
9377 | ENDIF |
---|
9378 | |
---|
9379 | !-- in case of fast changes in the skin temperature, it is required to |
---|
9380 | !-- update the radiative fluxes in order to keep the solution stable |
---|
9381 | IF ( ( ( ABS( t_surf_wall_h_p(m) - t_surf_wall_h(m) ) > 1.0_wp ) .OR. & |
---|
9382 | ( ABS( t_surf_green_h_p(m) - t_surf_green_h(m) ) > 1.0_wp ) .OR. & |
---|
9383 | ( ABS( t_surf_window_h_p(m) - t_surf_window_h(m) ) > 1.0_wp ) ) & |
---|
9384 | .AND. unscheduled_radiation_calls ) THEN |
---|
9385 | force_radiation_call_l = .TRUE. |
---|
9386 | ENDIF |
---|
9387 | ! |
---|
9388 | !-- calculate fluxes |
---|
9389 | !-- rad_net_l is never used! |
---|
9390 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_net_l(m) + & |
---|
9391 | surf_usm_h%frac(ind_veg_wall,m) * & |
---|
9392 | sigma_sb * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
9393 | ( t_surf_wall_h_p(m)**4 - t_surf_wall_h(m)**4 ) & |
---|
9394 | + surf_usm_h%frac(ind_wat_win,m) * & |
---|
9395 | sigma_sb * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
9396 | ( t_surf_window_h_p(m)**4 - t_surf_window_h(m)**4 ) & |
---|
9397 | + surf_usm_h%frac(ind_pav_green,m) * & |
---|
9398 | sigma_sb * surf_usm_h%emissivity(ind_pav_green,m) * & |
---|
9399 | ( t_surf_green_h_p(m)**4 - t_surf_green_h(m)**4 ) |
---|
9400 | |
---|
9401 | surf_usm_h%wghf_eb(m) = lambda_surface * & |
---|
9402 | ( t_surf_wall_h_p(m) - t_wall_h(nzb_wall,m) ) |
---|
9403 | surf_usm_h%wghf_eb_green(m) = lambda_surface_green * & |
---|
9404 | ( t_surf_green_h_p(m) - t_green_h(nzb_wall,m) ) |
---|
9405 | surf_usm_h%wghf_eb_window(m) = lambda_surface_window * & |
---|
9406 | ( t_surf_window_h_p(m) - t_window_h(nzb_wall,m) ) |
---|
9407 | |
---|
9408 | ! |
---|
9409 | !-- ground/wall/roof surface heat flux |
---|
9410 | surf_usm_h%wshf_eb(m) = - f_shf * ( surf_usm_h%pt1(m) - t_surf_wall_h_p(m) / exner(k) ) * & |
---|
9411 | surf_usm_h%frac(ind_veg_wall,m) & |
---|
9412 | - f_shf_window * ( surf_usm_h%pt1(m) - t_surf_window_h_p(m) / exner(k) ) * & |
---|
9413 | surf_usm_h%frac(ind_wat_win,m) & |
---|
9414 | - f_shf_green * ( surf_usm_h%pt1(m) - t_surf_green_h_p(m) / exner(k) ) * & |
---|
9415 | surf_usm_h%frac(ind_pav_green,m) |
---|
9416 | ! |
---|
9417 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
9418 | !-- diffusion_s, surface_layer_fluxes,... |
---|
9419 | surf_usm_h%shf(m) = surf_usm_h%wshf_eb(m) / c_p |
---|
9420 | |
---|
9421 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
---|
9422 | if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then |
---|
9423 | |
---|
9424 | ! 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),& |
---|
9425 | ! surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt |
---|
9426 | ! 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) |
---|
9427 | ! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k |
---|
9428 | ! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m) |
---|
9429 | if ((t_surf_green_h_p(m).gt.370.0_wp).or.(t_surf_green_h_p(m).lt.250.0_wp)) then |
---|
9430 | print*, t_surf_green_h_p(m),m,i,j,k |
---|
9431 | stop |
---|
9432 | endif |
---|
9433 | |
---|
9434 | IF ( humidity ) THEN |
---|
9435 | surf_usm_h%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
9436 | * t_surf_green_h(m) - dq_s_dt * & |
---|
9437 | t_surf_green_h_p(m) ) |
---|
9438 | |
---|
9439 | surf_usm_h%qsws(m) = surf_usm_h%qsws_eb(m) / rho_lv |
---|
9440 | |
---|
9441 | surf_usm_h%qsws_veg_eb(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
9442 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
9443 | * t_surf_green_h_p(m) ) |
---|
9444 | |
---|
9445 | surf_usm_h%qsws_liq_eb(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
9446 | + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
9447 | * t_surf_green_h_p(m) ) |
---|
9448 | ENDIF |
---|
9449 | |
---|
9450 | ! |
---|
9451 | !-- Calculate the true surface resistance |
---|
9452 | IF ( .NOT. humidity ) THEN |
---|
9453 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
9454 | ELSE |
---|
9455 | surf_usm_h%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
9456 | * t_surf_green_h(m) - dq_s_dt * & |
---|
9457 | t_surf_green_h_p(m) ) / & |
---|
9458 | (surf_usm_h%qsws(m) + 1.0E-20) - surf_usm_h%r_a_green(m) |
---|
9459 | ENDIF |
---|
9460 | |
---|
9461 | ! |
---|
9462 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
9463 | !-- evaporation of liquid water |
---|
9464 | IF ( humidity ) THEN |
---|
9465 | ! |
---|
9466 | !-- If precipitation is activated, add rain water to qsws_liq |
---|
9467 | !-- and qsws_soil according the the vegetation coverage. |
---|
9468 | !-- precipitation_rate is given in mm. |
---|
9469 | IF ( precipitation ) THEN |
---|
9470 | |
---|
9471 | ! |
---|
9472 | !-- Add precipitation to liquid water reservoir, if possible. |
---|
9473 | !-- Otherwise, add the water to soil. In case of |
---|
9474 | !-- pavements, the exceeding water amount is implicitely removed |
---|
9475 | !-- as runoff as qsws_soil is then not used in the soil model |
---|
9476 | IF ( m_liq_usm_h%var_usm_1d(m) /= m_liq_max ) THEN |
---|
9477 | surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) & |
---|
9478 | + surf_usm_h%frac(ind_pav_green,m) * prr(k+k_off,j+j_off,i+i_off)& |
---|
9479 | * hyrho(k+k_off) & |
---|
9480 | * 0.001_wp * rho_l * l_v |
---|
9481 | ENDIF |
---|
9482 | |
---|
9483 | ENDIF |
---|
9484 | |
---|
9485 | ! |
---|
9486 | !-- If the air is saturated, check the reservoir water level |
---|
9487 | IF ( surf_usm_h%qsws(m) < 0.0_wp ) THEN |
---|
9488 | ! |
---|
9489 | !-- Check if reservoir is full (avoid values > m_liq_max) |
---|
9490 | !-- In that case, qsws_liq goes to qsws_soil. In this |
---|
9491 | !-- case qsws_veg is zero anyway (because c_liq = 1), |
---|
9492 | !-- so that tend is zero and no further check is needed |
---|
9493 | IF ( m_liq_usm_h%var_usm_1d(m) == m_liq_max ) THEN |
---|
9494 | ! surf_usm_h%qsws_soil(m) = surf_usm_h%qsws_soil(m) + surf_usm_h%qsws_liq(m) |
---|
9495 | |
---|
9496 | surf_usm_h%qsws_liq_eb(m) = 0.0_wp |
---|
9497 | ENDIF |
---|
9498 | |
---|
9499 | ! |
---|
9500 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
9501 | !-- let the water enter the liquid water reservoir as dew on the |
---|
9502 | !-- plant |
---|
9503 | IF ( surf_usm_h%qsws_veg_eb(m) < 0.0_wp ) THEN |
---|
9504 | surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m) |
---|
9505 | surf_usm_h%qsws_veg_eb(m) = 0.0_wp |
---|
9506 | ENDIF |
---|
9507 | ENDIF |
---|
9508 | |
---|
9509 | surf_usm_h%qsws(m) = surf_usm_h%qsws(m) / l_v |
---|
9510 | |
---|
9511 | tend = - surf_usm_h%qsws_liq_eb(m) * drho_l_lv |
---|
9512 | m_liq_usm_h_p%var_usm_1d(m) = m_liq_usm_h%var_usm_1d(m) + dt_3d * & |
---|
9513 | ( tsc(2) * tend + & |
---|
9514 | tsc(3) * tm_liq_usm_h_m%var_usm_1d(m) ) |
---|
9515 | ! |
---|
9516 | !-- Check if reservoir is overfull -> reduce to maximum |
---|
9517 | !-- (conservation of water is violated here) |
---|
9518 | m_liq_usm_h_p%var_usm_1d(m) = MIN( m_liq_usm_h_p%var_usm_1d(m),m_liq_max ) |
---|
9519 | |
---|
9520 | ! |
---|
9521 | !-- Check if reservoir is empty (avoid values < 0.0) |
---|
9522 | !-- (conservation of water is violated here) |
---|
9523 | m_liq_usm_h_p%var_usm_1d(m) = MAX( m_liq_usm_h_p%var_usm_1d(m), 0.0_wp ) |
---|
9524 | ! |
---|
9525 | !-- Calculate m_liq tendencies for the next Runge-Kutta step |
---|
9526 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
9527 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
9528 | tm_liq_usm_h_m%var_usm_1d(m) = tend |
---|
9529 | ELSEIF ( intermediate_timestep_count < & |
---|
9530 | intermediate_timestep_count_max ) THEN |
---|
9531 | tm_liq_usm_h_m%var_usm_1d(m) = -9.5625_wp * tend + & |
---|
9532 | 5.3125_wp * tm_liq_usm_h_m%var_usm_1d(m) |
---|
9533 | ENDIF |
---|
9534 | ENDIF |
---|
9535 | |
---|
9536 | ENDIF |
---|
9537 | else |
---|
9538 | surf_usm_h%r_s(m) = 1.0E10_wp |
---|
9539 | endif |
---|
9540 | |
---|
9541 | ENDDO |
---|
9542 | ! |
---|
9543 | !-- Now, treat vertical surface elements |
---|
9544 | DO l = 0, 3 |
---|
9545 | DO m = 1, surf_usm_v(l)%ns |
---|
9546 | ! |
---|
9547 | !-- Get indices of respective grid point |
---|
9548 | i = surf_usm_v(l)%i(m) |
---|
9549 | j = surf_usm_v(l)%j(m) |
---|
9550 | k = surf_usm_v(l)%k(m) |
---|
9551 | |
---|
9552 | ! |
---|
9553 | !-- TODO - how to calculate lambda_surface for horizontal (??? do you mean verical ???) surfaces |
---|
9554 | !-- (lambda_surface is set according to stratification in land surface model). |
---|
9555 | !-- Please note, for vertical surfaces no ol is defined, since |
---|
9556 | !-- stratification is not considered in this case. |
---|
9557 | lambda_surface = surf_usm_v(l)%lambda_surf(m) |
---|
9558 | lambda_surface_window = surf_usm_v(l)%lambda_surf_window(m) |
---|
9559 | lambda_surface_green = surf_usm_v(l)%lambda_surf_green(m) |
---|
9560 | |
---|
9561 | #if ! defined( __nopointer ) |
---|
9562 | ! pt1 = pt(k,j,i) |
---|
9563 | IF ( humidity ) THEN |
---|
9564 | qv1 = q(k,j,i) |
---|
9565 | ELSE |
---|
9566 | qv1 = 0.0_wp |
---|
9567 | ENDIF |
---|
9568 | ! |
---|
9569 | !-- calculate rho * c_p coefficient at wall layer |
---|
9570 | rho_cp = c_p * hyp(k) / ( r_d * surf_usm_v(l)%pt1(m) * exner(k) ) |
---|
9571 | |
---|
9572 | if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then |
---|
9573 | ! |
---|
9574 | !-- Calculate frequently used parameters |
---|
9575 | rho_lv = rho_cp / c_p * l_v |
---|
9576 | drho_l_lv = 1.0_wp / (rho_l * l_v) |
---|
9577 | endif |
---|
9578 | #endif |
---|
9579 | |
---|
9580 | !-- Calculation of r_a for vertical surfaces |
---|
9581 | !-- |
---|
9582 | !-- heat transfer coefficient for forced convection along vertical walls |
---|
9583 | !-- follows formulation in TUF3d model (Krayenhoff & Voogt, 2006) |
---|
9584 | !-- |
---|
9585 | !-- H = httc (Tsfc - Tair) |
---|
9586 | !-- httc = rw * (11.8 + 4.2 * Ueff) - 4.0 |
---|
9587 | !-- |
---|
9588 | !-- rw: wall patch roughness relative to 1.0 for concrete |
---|
9589 | !-- Ueff: effective wind speed |
---|
9590 | !-- - 4.0 is a reduction of Rowley et al (1930) formulation based on |
---|
9591 | !-- Cole and Sturrock (1977) |
---|
9592 | !-- |
---|
9593 | !-- Ucan: Canyon wind speed |
---|
9594 | !-- wstar: convective velocity |
---|
9595 | !-- Qs: surface heat flux |
---|
9596 | !-- zH: height of the convective layer |
---|
9597 | !-- wstar = (g/Tcan*Qs*zH)**(1./3.) |
---|
9598 | |
---|
9599 | !-- Effective velocity components must always |
---|
9600 | !-- be defined at scalar grid point. The wall normal component is |
---|
9601 | !-- obtained by simple linear interpolation. ( An alternative would |
---|
9602 | !-- be an logarithmic interpolation. ) |
---|
9603 | !-- Parameter roughness_concrete (default value = 0.001) is used |
---|
9604 | !-- to calculation of roughness relative to concrete |
---|
9605 | surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) / & |
---|
9606 | roughness_concrete * ( 11.8_wp + 4.2_wp * & |
---|
9607 | SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & |
---|
9608 | ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & |
---|
9609 | ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2, & |
---|
9610 | 0.01_wp ) ) & |
---|
9611 | ) - 4.0_wp ) |
---|
9612 | ! |
---|
9613 | !-- Limit aerodynamic resistance |
---|
9614 | IF ( surf_usm_v(l)%r_a(m) < 1.0_wp ) surf_usm_v(l)%r_a(m) = 1.0_wp |
---|
9615 | |
---|
9616 | |
---|
9617 | f_shf = rho_cp / surf_usm_v(l)%r_a(m) |
---|
9618 | f_shf_window = rho_cp / surf_usm_v(l)%r_a(m) |
---|
9619 | f_shf_green = rho_cp / surf_usm_v(l)%r_a(m) |
---|
9620 | |
---|
9621 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
9622 | if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then |
---|
9623 | !-- Adapted from LSM: |
---|
9624 | !-- Second step: calculate canopy resistance r_canopy |
---|
9625 | !-- f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation |
---|
9626 | |
---|
9627 | !-- f1: correction for incoming shortwave radiation (stomata close at |
---|
9628 | !-- night) |
---|
9629 | f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_v(l)%rad_sw_in(m) + 0.05_wp ) / & |
---|
9630 | (0.81_wp * (0.004_wp * surf_usm_v(l)%rad_sw_in(m) & |
---|
9631 | + 1.0_wp)) ) |
---|
9632 | ! |
---|
9633 | !-- f2: correction for soil moisture availability to plants (the |
---|
9634 | !-- integrated soil moisture must thus be considered here) |
---|
9635 | !-- f2 = 0 for very dry soils |
---|
9636 | |
---|
9637 | f2=1.0_wp |
---|
9638 | ! m_total = 0.0_wp |
---|
9639 | ! DO k = nzb_wall, nzt_wall+1 |
---|
9640 | ! m_total = m_total + rootfr_h(nzb_wall,m) & |
---|
9641 | ! * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m)) |
---|
9642 | ! ENDDO |
---|
9643 | ! |
---|
9644 | ! IF ( m_total > wilt_h(nzb_wall,m) .AND. m_total < fc_h(nzb_wall,m) ) THEN |
---|
9645 | ! f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) ) |
---|
9646 | ! ELSEIF ( m_total >= fc_h(nzb_wall,m) ) THEN |
---|
9647 | ! f2 = 1.0_wp |
---|
9648 | ! ELSE |
---|
9649 | ! f2 = 1.0E-20_wp |
---|
9650 | ! ENDIF |
---|
9651 | |
---|
9652 | ! |
---|
9653 | !-- Calculate water vapour pressure at saturation |
---|
9654 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_v_p(l)%t(m) & |
---|
9655 | - 273.16_wp ) / ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) ) |
---|
9656 | ! |
---|
9657 | !-- f3: correction for vapour pressure deficit |
---|
9658 | IF ( surf_usm_v(l)%g_d(m) /= 0.0_wp ) THEN |
---|
9659 | ! |
---|
9660 | !-- Calculate vapour pressure |
---|
9661 | e = qv1 * surface_pressure / ( qv1 + 0.622_wp ) |
---|
9662 | f3 = EXP ( - surf_usm_v(l)%g_d(m) * (e_s - e) ) |
---|
9663 | ELSE |
---|
9664 | f3 = 1.0_wp |
---|
9665 | ENDIF |
---|
9666 | ! |
---|
9667 | !-- Calculate canopy resistance. In case that c_veg is 0 (bare soils), |
---|
9668 | !-- this calculation is obsolete, as r_canopy is not used below. |
---|
9669 | !-- To do: check for very dry soil -> r_canopy goes to infinity |
---|
9670 | surf_usm_v(l)%r_canopy(m) = surf_usm_v(l)%r_canopy_min(m) / & |
---|
9671 | ( surf_usm_v(l)%lai(m) * f1 * f2 * f3 + 1.0E-20_wp ) |
---|
9672 | |
---|
9673 | ! !-- Calculate the maximum possible liquid water amount on plants and |
---|
9674 | ! !-- bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is |
---|
9675 | ! !-- assumed, while paved surfaces might hold up 1 mm of water. The |
---|
9676 | ! !-- liquid water fraction for paved surfaces is calculated after |
---|
9677 | ! !-- Noilhan & Planton (1989), while the ECMWF formulation is used for |
---|
9678 | ! !-- vegetated surfaces and bare soils. |
---|
9679 | ! ! surf_usm_h%lai(m)=4.0_wp |
---|
9680 | ! m_liq_max = m_max_depth * ( surf_usm_h%lai(m) ) |
---|
9681 | ! surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 ) |
---|
9682 | ! |
---|
9683 | !-- Calculate saturation specific humidity |
---|
9684 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
9685 | ! |
---|
9686 | !-- In case of dewfall, set evapotranspiration to zero |
---|
9687 | !-- All super-saturated water is then removed from the air |
---|
9688 | IF ( humidity .AND. q_s <= qv1 ) THEN |
---|
9689 | surf_usm_v(l)%r_canopy(m) = 0.0_wp |
---|
9690 | ENDIF |
---|
9691 | |
---|
9692 | ! |
---|
9693 | !-- Calculate coefficients for the total evapotranspiration |
---|
9694 | !-- In case of water surface, set vegetation and soil fluxes to zero. |
---|
9695 | !-- For pavements, only evaporation of liquid water is possible. |
---|
9696 | f_qsws_veg = rho_lv * & |
---|
9697 | ( 1.0_wp - 0.0_wp ) / & !surf_usm_h%c_liq(m) ) / & |
---|
9698 | ( surf_usm_v(l)%r_a(m) + surf_usm_v(l)%r_canopy(m) ) |
---|
9699 | ! f_qsws_liq = rho_lv * surf_usm_h%c_liq(m) / & |
---|
9700 | ! surf_usm_h%r_a_green(m) |
---|
9701 | |
---|
9702 | f_qsws = f_qsws_veg! + f_qsws_liq |
---|
9703 | ! |
---|
9704 | !-- Calculate derivative of q_s for Taylor series expansion |
---|
9705 | e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_v_p(l)%t(m) - 35.86_wp) - & |
---|
9706 | 17.269_wp*( t_surf_green_v_p(l)%t(m) - 273.16_wp) & |
---|
9707 | / ( t_surf_green_v_p(l)%t(m) - 35.86_wp)**2 ) |
---|
9708 | |
---|
9709 | dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt ) |
---|
9710 | endif |
---|
9711 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
9712 | |
---|
9713 | !-- add LW up so that it can be removed in prognostic equation |
---|
9714 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%rad_sw_in(m) - & |
---|
9715 | surf_usm_v(l)%rad_sw_out(m) + & |
---|
9716 | surf_usm_v(l)%rad_lw_in(m) - & |
---|
9717 | surf_usm_v(l)%rad_lw_out(m) |
---|
9718 | |
---|
9719 | !-- numerator of the prognostic equation |
---|
9720 | coef_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
9721 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_veg_wall,m) * & |
---|
9722 | sigma_sb * t_surf_wall_v(l)%t(m) ** 4 + & |
---|
9723 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
9724 | lambda_surface * t_wall_v(l)%t(nzb_wall,m) |
---|
9725 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9726 | coef_window_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
9727 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_wat_win,m) * & |
---|
9728 | sigma_sb * t_surf_window_v(l)%t(m) ** 4 + & |
---|
9729 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
9730 | lambda_surface_window * t_window_v(l)%t(nzb_wall,m) |
---|
9731 | endif |
---|
9732 | IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
9733 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
9734 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9735 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
9736 | f_shf * surf_usm_v(l)%pt1(m) + f_qsws * ( qv1 - q_s & |
---|
9737 | + dq_s_dt * t_surf_green_v(l)%t(m) ) + & |
---|
9738 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
9739 | ELSE |
---|
9740 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
9741 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9742 | t_surf_green_v(l)%t(m) ** 4 + & |
---|
9743 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
9744 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
9745 | ENDIF |
---|
9746 | |
---|
9747 | |
---|
9748 | !-- denominator of the prognostic equation |
---|
9749 | coef_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_veg_wall,m) * sigma_sb * & |
---|
9750 | t_surf_wall_v(l)%t(m) ** 3 & |
---|
9751 | + lambda_surface + f_shf / exner(k) |
---|
9752 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9753 | coef_window_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_wat_win,m) * sigma_sb * & |
---|
9754 | t_surf_window_v(l)%t(m) ** 3 & |
---|
9755 | + lambda_surface_window + f_shf / exner(k) |
---|
9756 | endif |
---|
9757 | IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) ) THEN |
---|
9758 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9759 | t_surf_green_v(l)%t(m) ** 3 + f_qsws * dq_s_dt & |
---|
9760 | + lambda_surface_green + f_shf / exner(k) |
---|
9761 | ELSE |
---|
9762 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb * & |
---|
9763 | t_surf_green_v(l)%t(m) ** 3 & |
---|
9764 | + lambda_surface_green + f_shf / exner(k) |
---|
9765 | ENDIF |
---|
9766 | |
---|
9767 | !-- implicit solution when the surface layer has no heat capacity, |
---|
9768 | !-- otherwise use RK3 scheme. |
---|
9769 | t_surf_wall_v_p(l)%t(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
9770 | surf_usm_v(l)%c_surface(m) * t_surf_wall_v(l)%t(m) ) / & |
---|
9771 | ( surf_usm_v(l)%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
9772 | if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then |
---|
9773 | t_surf_window_v_p(l)%t(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
9774 | surf_usm_v(l)%c_surface_window(m) * t_surf_window_v(l)%t(m) ) / & |
---|
9775 | ( surf_usm_v(l)%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
9776 | endif |
---|
9777 | t_surf_green_v_p(l)%t(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
9778 | surf_usm_v(l)%c_surface_green(m) * t_surf_green_v(l)%t(m) ) / & |
---|
9779 | ( surf_usm_v(l)%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
9780 | |
---|
9781 | !-- add RK3 term |
---|
9782 | t_surf_wall_v_p(l)%t(m) = t_surf_wall_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
9783 | surf_usm_v(l)%tt_surface_wall_m(m) |
---|
9784 | t_surf_window_v_p(l)%t(m) = t_surf_window_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
9785 | surf_usm_v(l)%tt_surface_window_m(m) |
---|
9786 | t_surf_green_v_p(l)%t(m) = t_surf_green_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
9787 | surf_usm_v(l)%tt_surface_green_m(m) |
---|
9788 | ! |
---|
9789 | !-- Store surface temperature. Further, in case humidity is used |
---|
9790 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
9791 | !-- assumed to be the surface temperature. |
---|
9792 | surf_usm_v(l)%pt_surface(m) = ( surf_usm_v(l)%frac(ind_veg_wall,m) * t_surf_wall_v_p(l)%t(m) & |
---|
9793 | + surf_usm_v(l)%frac(ind_wat_win,m) * t_surf_window_v_p(l)%t(m) & |
---|
9794 | + surf_usm_v(l)%frac(ind_pav_green,m) * t_surf_green_v_p(l)%t(m) ) & |
---|
9795 | / exner(k) |
---|
9796 | |
---|
9797 | IF ( humidity ) surf_usm_v(l)%vpt_surface(m) = & |
---|
9798 | surf_usm_v(l)%pt_surface(m) |
---|
9799 | |
---|
9800 | !-- calculate true tendency |
---|
9801 | stend_wall = ( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
9802 | surf_usm_v(l)%tt_surface_wall_m(m) ) / ( dt_3d * tsc(2) ) |
---|
9803 | stend_window = ( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
9804 | surf_usm_v(l)%tt_surface_window_m(m) ) / ( dt_3d * tsc(2) ) |
---|
9805 | stend_green = ( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) - dt_3d * tsc(3) * & |
---|
9806 | surf_usm_v(l)%tt_surface_green_m(m) ) / ( dt_3d * tsc(2) ) |
---|
9807 | |
---|
9808 | !-- calculate t_surf_* tendencies for the next Runge-Kutta step |
---|
9809 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
9810 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
9811 | surf_usm_v(l)%tt_surface_wall_m(m) = stend_wall |
---|
9812 | surf_usm_v(l)%tt_surface_window_m(m) = stend_window |
---|
9813 | surf_usm_v(l)%tt_surface_green_m(m) = stend_green |
---|
9814 | ELSEIF ( intermediate_timestep_count < & |
---|
9815 | intermediate_timestep_count_max ) THEN |
---|
9816 | surf_usm_v(l)%tt_surface_wall_m(m) = -9.5625_wp * stend_wall + & |
---|
9817 | 5.3125_wp * surf_usm_v(l)%tt_surface_wall_m(m) |
---|
9818 | surf_usm_v(l)%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
9819 | 5.3125_wp * surf_usm_v(l)%tt_surface_green_m(m) |
---|
9820 | surf_usm_v(l)%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
9821 | 5.3125_wp * surf_usm_v(l)%tt_surface_window_m(m) |
---|
9822 | ENDIF |
---|
9823 | ENDIF |
---|
9824 | |
---|
9825 | !-- in case of fast changes in the skin temperature, it is required to |
---|
9826 | !-- update the radiative fluxes in order to keep the solution stable |
---|
9827 | |
---|
9828 | IF ( ( ( ABS( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
9829 | ( ABS( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
9830 | ( ABS( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) ) > 1.0_wp ) ) & |
---|
9831 | .AND. unscheduled_radiation_calls ) THEN |
---|
9832 | force_radiation_call_l = .TRUE. |
---|
9833 | ENDIF |
---|
9834 | |
---|
9835 | !-- calculate fluxes |
---|
9836 | !-- prognostic rad_net_l is used just for output! |
---|
9837 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
9838 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
9839 | 3.0_wp * sigma_sb * & |
---|
9840 | t_surf_wall_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
9841 | t_surf_wall_v(l)%t(m)**3 * t_surf_wall_v_p(l)%t(m) ) & |
---|
9842 | + surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
9843 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
9844 | 3.0_wp * sigma_sb * & |
---|
9845 | t_surf_window_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
9846 | t_surf_window_v(l)%t(m)**3 * t_surf_window_v_p(l)%t(m) ) & |
---|
9847 | + surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
9848 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
9849 | 3.0_wp * sigma_sb * & |
---|
9850 | t_surf_green_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
9851 | t_surf_green_v(l)%t(m)**3 * t_surf_green_v_p(l)%t(m) ) |
---|
9852 | |
---|
9853 | surf_usm_v(l)%wghf_eb_window(m) = lambda_surface_window * & |
---|
9854 | ( t_surf_window_v_p(l)%t(m) - t_window_v(l)%t(nzb_wall,m) ) |
---|
9855 | surf_usm_v(l)%wghf_eb(m) = lambda_surface * & |
---|
9856 | ( t_surf_wall_v_p(l)%t(m) - t_wall_v(l)%t(nzb_wall,m) ) |
---|
9857 | surf_usm_v(l)%wghf_eb_green(m) = lambda_surface_green * & |
---|
9858 | ( t_surf_green_v_p(l)%t(m) - t_green_v(l)%t(nzb_wall,m) ) |
---|
9859 | |
---|
9860 | !-- ground/wall/roof surface heat flux |
---|
9861 | surf_usm_v(l)%wshf_eb(m) = & |
---|
9862 | - f_shf * ( surf_usm_v(l)%pt1(m) - & |
---|
9863 | t_surf_wall_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
9864 | - f_shf_window * ( surf_usm_v(l)%pt1(m) - & |
---|
9865 | t_surf_window_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_wat_win,m)& |
---|
9866 | - f_shf_green * ( surf_usm_v(l)%pt1(m) - & |
---|
9867 | t_surf_green_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_pav_green,m) |
---|
9868 | |
---|
9869 | ! |
---|
9870 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
9871 | !-- diffusion_s, surface_layer_fluxes,... |
---|
9872 | surf_usm_v(l)%shf(m) = surf_usm_v(l)%wshf_eb(m) / c_p |
---|
9873 | |
---|
9874 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
9875 | if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then !111 |
---|
9876 | |
---|
9877 | ! 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),& |
---|
9878 | ! surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt |
---|
9879 | ! 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) |
---|
9880 | ! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k |
---|
9881 | ! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m) |
---|
9882 | 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 |
---|
9883 | print*, t_surf_green_v_p(l)%t(m),m,i,j,k |
---|
9884 | stop |
---|
9885 | endif |
---|
9886 | |
---|
9887 | IF ( humidity ) THEN |
---|
9888 | surf_usm_v(l)%qsws_eb(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & |
---|
9889 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
9890 | t_surf_green_v_p(l)%t(m) ) |
---|
9891 | |
---|
9892 | surf_usm_v(l)%qsws(m) = surf_usm_v(l)%qsws_eb(m) / rho_lv |
---|
9893 | |
---|
9894 | surf_usm_v(l)%qsws_veg_eb(m) = - f_qsws_veg * ( qv1 - q_s & |
---|
9895 | + dq_s_dt * t_surf_green_v(l)%t(m) - dq_s_dt & |
---|
9896 | * t_surf_green_v_p(l)%t(m) ) |
---|
9897 | |
---|
9898 | ! surf_usm_h%qsws_liq_eb(m) = - f_qsws_liq * ( qv1 - q_s & |
---|
9899 | ! + dq_s_dt * t_surf_green_h(m) - dq_s_dt & |
---|
9900 | ! * t_surf_green_h_p(m) ) |
---|
9901 | ENDIF |
---|
9902 | |
---|
9903 | ! |
---|
9904 | !-- Calculate the true surface resistance |
---|
9905 | IF ( .NOT. humidity ) THEN |
---|
9906 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
9907 | ELSE |
---|
9908 | surf_usm_v(l)%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt & |
---|
9909 | * t_surf_green_v(l)%t(m) - dq_s_dt * & |
---|
9910 | t_surf_green_v_p(l)%t(m) ) / & |
---|
9911 | (surf_usm_v(l)%qsws(m) + 1.0E-20) - surf_usm_v(l)%r_a(m) |
---|
9912 | ENDIF |
---|
9913 | |
---|
9914 | |
---|
9915 | ! |
---|
9916 | !-- Calculate change in liquid water reservoir due to dew fall or |
---|
9917 | !-- evaporation of liquid water |
---|
9918 | IF ( humidity ) THEN |
---|
9919 | ! |
---|
9920 | !-- If the air is saturated, check the reservoir water level |
---|
9921 | IF ( surf_usm_v(l)%qsws(m) < 0.0_wp ) THEN |
---|
9922 | |
---|
9923 | ! |
---|
9924 | !-- In case qsws_veg becomes negative (unphysical behavior), |
---|
9925 | !-- let the water enter the liquid water reservoir as dew on the |
---|
9926 | !-- plant |
---|
9927 | IF ( surf_usm_v(l)%qsws_veg_eb(m) < 0.0_wp ) THEN |
---|
9928 | ! surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m) |
---|
9929 | surf_usm_v(l)%qsws_veg_eb(m) = 0.0_wp |
---|
9930 | ENDIF |
---|
9931 | ENDIF |
---|
9932 | ENDIF |
---|
9933 | else |
---|
9934 | surf_usm_v(l)%r_s(m) = 1.0E10_wp |
---|
9935 | endif !111 |
---|
9936 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
9937 | |
---|
9938 | |
---|
9939 | ENDDO |
---|
9940 | |
---|
9941 | ENDDO |
---|
9942 | ! |
---|
9943 | !-- Add-up anthropogenic heat, for now only at upward-facing surfaces |
---|
9944 | IF ( usm_anthropogenic_heat .AND. & |
---|
9945 | intermediate_timestep_count == intermediate_timestep_count_max ) THEN |
---|
9946 | !-- application of the additional anthropogenic heat sources |
---|
9947 | !-- we considere the traffic for now so all heat is absorbed |
---|
9948 | !-- to the first layer, generalization would be worth. |
---|
9949 | |
---|
9950 | !-- calculation of actual profile coefficient |
---|
9951 | !-- ??? check time_since_reference_point ??? |
---|
9952 | dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp) |
---|
9953 | dhour = INT(dtime/3600.0_wp) |
---|
9954 | DO i = nxl, nxr |
---|
9955 | DO j = nys, nyn |
---|
9956 | DO k = nzub, min(nzut,naheatlayers) |
---|
9957 | IF ( k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
9958 | !-- increase of pt in box i,j,k in time dt_3d |
---|
9959 | !-- given to anthropogenic heat aheat*acoef (W*m-2) |
---|
9960 | !-- linear interpolation of coeficient |
---|
9961 | acoef = (REAL(dhour+1,wp)-dtime/3600.0_wp)*aheatprof(k,dhour) + & |
---|
9962 | (dtime/3600.0_wp-REAL(dhour,wp))*aheatprof(k,dhour+1) |
---|
9963 | IF ( aheat(k,j,i) > 0.0_wp ) THEN |
---|
9964 | !-- calculate rho * c_p coefficient at layer k |
---|
9965 | rho_cp = c_p * hyp(k) / ( r_d * pt(k+1,j,i) * exner(k) ) |
---|
9966 | pt(k,j,i) = pt(k,j,i) + aheat(k,j,i)*acoef*dt_3d/(exner(k)*rho_cp*dz(1)) |
---|
9967 | ENDIF |
---|
9968 | ENDIF |
---|
9969 | ENDDO |
---|
9970 | ENDDO |
---|
9971 | ENDDO |
---|
9972 | |
---|
9973 | ENDIF |
---|
9974 | |
---|
9975 | !-- pt and shf are defined on nxlg:nxrg,nysg:nyng |
---|
9976 | !-- get the borders from neighbours |
---|
9977 | #if ! defined( __nopointer ) |
---|
9978 | CALL exchange_horiz( pt, nbgp ) |
---|
9979 | #endif |
---|
9980 | |
---|
9981 | !-- calculation of force_radiation_call: |
---|
9982 | !-- Make logical OR for all processes. |
---|
9983 | !-- Force radiation call if at least one processor forces it. |
---|
9984 | IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )& |
---|
9985 | THEN |
---|
9986 | #if defined( __parallel ) |
---|
9987 | IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) |
---|
9988 | CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call, & |
---|
9989 | 1, MPI_LOGICAL, MPI_LOR, comm2d, ierr ) |
---|
9990 | #else |
---|
9991 | force_radiation_call = force_radiation_call_l |
---|
9992 | #endif |
---|
9993 | force_radiation_call_l = .FALSE. |
---|
9994 | ENDIF |
---|
9995 | |
---|
9996 | ! ! |
---|
9997 | ! !-- Calculate surface specific humidity |
---|
9998 | ! IF ( humidity ) THEN |
---|
9999 | ! CALL calc_q_surface_usm |
---|
10000 | ! ENDIF |
---|
10001 | |
---|
10002 | |
---|
10003 | CONTAINS |
---|
10004 | !------------------------------------------------------------------------------! |
---|
10005 | ! Description: |
---|
10006 | ! ------------ |
---|
10007 | !> Calculation of specific humidity of the skin layer (surface). It is assumend |
---|
10008 | !> that the skin is always saturated. |
---|
10009 | !------------------------------------------------------------------------------! |
---|
10010 | SUBROUTINE calc_q_surface_usm |
---|
10011 | |
---|
10012 | IMPLICIT NONE |
---|
10013 | |
---|
10014 | REAL(wp) :: resistance !< aerodynamic and soil resistance term |
---|
10015 | |
---|
10016 | DO m = 1, surf_usm_h%ns |
---|
10017 | |
---|
10018 | i = surf_usm_h%i(m) |
---|
10019 | j = surf_usm_h%j(m) |
---|
10020 | k = surf_usm_h%k(m) |
---|
10021 | |
---|
10022 | ! |
---|
10023 | !-- Calculate water vapour pressure at saturation |
---|
10024 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
10025 | ( t_surf_green_h_p(m) - 273.16_wp ) / & |
---|
10026 | ( t_surf_green_h_p(m) - 35.86_wp ) & |
---|
10027 | ) |
---|
10028 | |
---|
10029 | ! |
---|
10030 | !-- Calculate specific humidity at saturation |
---|
10031 | q_s = 0.622_wp * e_s / ( surface_pressure - e_s ) |
---|
10032 | |
---|
10033 | ! surf_usm_h%r_a_green(m) = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) / & |
---|
10034 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-10_wp ) |
---|
10035 | ! |
---|
10036 | ! !-- make sure that the resistance does not drop to zero |
---|
10037 | ! IF ( ABS(surf_usm_h%r_a_green(m)) < 1.0E-10_wp ) surf_usm_h%r_a_green(m) = 1.0E-10_wp |
---|
10038 | |
---|
10039 | resistance = surf_usm_h%r_a_green(m) / ( surf_usm_h%r_a_green(m) + surf_usm_h%r_s(m) + 1E-5_wp ) |
---|
10040 | |
---|
10041 | ! |
---|
10042 | !-- Calculate specific humidity at surface |
---|
10043 | IF ( bulk_cloud_model ) THEN |
---|
10044 | q(k,j,i) = resistance * q_s + & |
---|
10045 | ( 1.0_wp - resistance ) * & |
---|
10046 | ( q(k,j,i) - ql(k,j,i) ) |
---|
10047 | ELSE |
---|
10048 | q(k,j,i) = resistance * q_s + & |
---|
10049 | ( 1.0_wp - resistance ) * & |
---|
10050 | q(k,j,i) |
---|
10051 | ENDIF |
---|
10052 | |
---|
10053 | ! |
---|
10054 | !-- Update virtual potential temperature |
---|
10055 | vpt(k,j,i) = pt(k,j,i) * & |
---|
10056 | ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
10057 | |
---|
10058 | ENDDO |
---|
10059 | |
---|
10060 | !-- Now, treat vertical surface elements |
---|
10061 | DO l = 0, 3 |
---|
10062 | DO m = 1, surf_usm_v(l)%ns |
---|
10063 | ! |
---|
10064 | !-- Get indices of respective grid point |
---|
10065 | i = surf_usm_v(l)%i(m) |
---|
10066 | j = surf_usm_v(l)%j(m) |
---|
10067 | k = surf_usm_v(l)%k(m) |
---|
10068 | |
---|
10069 | ! |
---|
10070 | !-- Calculate water vapour pressure at saturation |
---|
10071 | e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & |
---|
10072 | ( t_surf_green_v_p(l)%t(m) - 273.16_wp ) / & |
---|
10073 | ( t_surf_green_v_p(l)%t(m) - 35.86_wp ) & |
---|
10074 | ) |
---|
10075 | |
---|
10076 | ! |
---|
10077 | !-- Calculate specific humidity at saturation |
---|
10078 | q_s = 0.622_wp * e_s / ( surface_pressure -e_s ) |
---|
10079 | |
---|
10080 | ! |
---|
10081 | !-- Calculate specific humidity at surface |
---|
10082 | IF ( bulk_cloud_model ) THEN |
---|
10083 | q(k,j,i) = ( q(k,j,i) - ql(k,j,i) ) |
---|
10084 | ELSE |
---|
10085 | q(k,j,i) = q(k,j,i) |
---|
10086 | ENDIF |
---|
10087 | ! |
---|
10088 | !-- Update virtual potential temperature |
---|
10089 | vpt(k,j,i) = pt(k,j,i) * & |
---|
10090 | ( 1.0_wp + 0.61_wp * q(k,j,i) ) |
---|
10091 | |
---|
10092 | ENDDO |
---|
10093 | |
---|
10094 | ENDDO |
---|
10095 | |
---|
10096 | END SUBROUTINE calc_q_surface_usm |
---|
10097 | |
---|
10098 | END SUBROUTINE usm_surface_energy_balance |
---|
10099 | |
---|
10100 | |
---|
10101 | !------------------------------------------------------------------------------! |
---|
10102 | ! Description: |
---|
10103 | ! ------------ |
---|
10104 | !> Swapping of timelevels for t_surf and t_wall |
---|
10105 | !> called out from subroutine swap_timelevel |
---|
10106 | !------------------------------------------------------------------------------! |
---|
10107 | SUBROUTINE usm_swap_timelevel( mod_count ) |
---|
10108 | |
---|
10109 | IMPLICIT NONE |
---|
10110 | |
---|
10111 | INTEGER(iwp), INTENT(IN) :: mod_count |
---|
10112 | |
---|
10113 | #if defined( __nopointer ) |
---|
10114 | t_surf_wall_h = t_surf_wall_h_p |
---|
10115 | t_wall_h = t_wall_h_p |
---|
10116 | t_surf_wall_v = t_surf_wall_v_p |
---|
10117 | t_wall_v = t_wall_v_p |
---|
10118 | t_surf_window_h = t_surf_window_h_p |
---|
10119 | t_window_h = t_window_h_p |
---|
10120 | t_surf_window_v = t_surf_window_v_p |
---|
10121 | t_window_v = t_window_v_p |
---|
10122 | t_surf_green_h = t_surf_green_h_p |
---|
10123 | t_surf_green_v = t_surf_green_v_p |
---|
10124 | t_green_h = t_green_h_p |
---|
10125 | t_green_v = t_green_v_p |
---|
10126 | #else |
---|
10127 | SELECT CASE ( mod_count ) |
---|
10128 | CASE ( 0 ) |
---|
10129 | ! |
---|
10130 | !-- Horizontal surfaces |
---|
10131 | t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2 |
---|
10132 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
10133 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
10134 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
10135 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
10136 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
10137 | ! |
---|
10138 | !-- Vertical surfaces |
---|
10139 | t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2 |
---|
10140 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
10141 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
10142 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
10143 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
10144 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
10145 | CASE ( 1 ) |
---|
10146 | ! |
---|
10147 | !-- Horizontal surfaces |
---|
10148 | t_surf_wall_h => t_surf_wall_h_2; t_surf_wall_h_p => t_surf_wall_h_1 |
---|
10149 | t_wall_h => t_wall_h_2; t_wall_h_p => t_wall_h_1 |
---|
10150 | t_surf_window_h => t_surf_window_h_2; t_surf_window_h_p => t_surf_window_h_1 |
---|
10151 | t_window_h => t_window_h_2; t_window_h_p => t_window_h_1 |
---|
10152 | t_surf_green_h => t_surf_green_h_2; t_surf_green_h_p => t_surf_green_h_1 |
---|
10153 | t_green_h => t_green_h_2; t_green_h_p => t_green_h_1 |
---|
10154 | ! |
---|
10155 | !-- Vertical surfaces |
---|
10156 | t_surf_wall_v => t_surf_wall_v_2; t_surf_wall_v_p => t_surf_wall_v_1 |
---|
10157 | t_wall_v => t_wall_v_2; t_wall_v_p => t_wall_v_1 |
---|
10158 | t_surf_window_v => t_surf_window_v_2; t_surf_window_v_p => t_surf_window_v_1 |
---|
10159 | t_window_v => t_window_v_2; t_window_v_p => t_window_v_1 |
---|
10160 | t_surf_green_v => t_surf_green_v_2; t_surf_green_v_p => t_surf_green_v_1 |
---|
10161 | t_green_v => t_green_v_2; t_green_v_p => t_green_v_1 |
---|
10162 | END SELECT |
---|
10163 | #endif |
---|
10164 | |
---|
10165 | END SUBROUTINE usm_swap_timelevel |
---|
10166 | |
---|
10167 | !------------------------------------------------------------------------------! |
---|
10168 | ! Description: |
---|
10169 | ! ------------ |
---|
10170 | !> Subroutine writes t_surf and t_wall data into restart files |
---|
10171 | !------------------------------------------------------------------------------! |
---|
10172 | SUBROUTINE usm_wrd_local |
---|
10173 | |
---|
10174 | |
---|
10175 | IMPLICIT NONE |
---|
10176 | |
---|
10177 | CHARACTER(LEN=1) :: dum !< dummy string to create output-variable name |
---|
10178 | INTEGER(iwp) :: l !< index surface type orientation |
---|
10179 | |
---|
10180 | CALL wrd_write_string( 'ns_h_on_file_usm' ) |
---|
10181 | WRITE ( 14 ) surf_usm_h%ns |
---|
10182 | |
---|
10183 | CALL wrd_write_string( 'ns_v_on_file_usm' ) |
---|
10184 | WRITE ( 14 ) surf_usm_v(0:3)%ns |
---|
10185 | |
---|
10186 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
10187 | WRITE ( 14 ) surf_usm_h%start_index |
---|
10188 | |
---|
10189 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
10190 | WRITE ( 14 ) surf_usm_h%end_index |
---|
10191 | |
---|
10192 | CALL wrd_write_string( 't_surf_wall_h' ) |
---|
10193 | WRITE ( 14 ) t_surf_wall_h |
---|
10194 | |
---|
10195 | CALL wrd_write_string( 't_surf_window_h' ) |
---|
10196 | WRITE ( 14 ) t_surf_window_h |
---|
10197 | |
---|
10198 | CALL wrd_write_string( 't_surf_green_h' ) |
---|
10199 | WRITE ( 14 ) t_surf_green_h |
---|
10200 | |
---|
10201 | DO l = 0, 3 |
---|
10202 | |
---|
10203 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
10204 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
10205 | |
---|
10206 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
10207 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
10208 | |
---|
10209 | WRITE( dum, '(I1)') l |
---|
10210 | |
---|
10211 | CALL wrd_write_string( 't_surf_wall_v(' // dum // ')' ) |
---|
10212 | WRITE ( 14 ) t_surf_wall_v(l)%t |
---|
10213 | |
---|
10214 | CALL wrd_write_string( 't_surf_window_v(' // dum // ')' ) |
---|
10215 | WRITE ( 14 ) t_surf_window_v(l)%t |
---|
10216 | |
---|
10217 | CALL wrd_write_string( 't_surf_green_v(' // dum // ')' ) |
---|
10218 | WRITE ( 14 ) t_surf_green_v(l)%t |
---|
10219 | |
---|
10220 | ENDDO |
---|
10221 | |
---|
10222 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
10223 | WRITE ( 14 ) surf_usm_h%start_index |
---|
10224 | |
---|
10225 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
10226 | WRITE ( 14 ) surf_usm_h%end_index |
---|
10227 | |
---|
10228 | CALL wrd_write_string( 't_wall_h' ) |
---|
10229 | WRITE ( 14 ) t_wall_h |
---|
10230 | |
---|
10231 | CALL wrd_write_string( 't_window_h' ) |
---|
10232 | WRITE ( 14 ) t_window_h |
---|
10233 | |
---|
10234 | CALL wrd_write_string( 't_green_h' ) |
---|
10235 | WRITE ( 14 ) t_green_h |
---|
10236 | |
---|
10237 | DO l = 0, 3 |
---|
10238 | |
---|
10239 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
10240 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
10241 | |
---|
10242 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
10243 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
10244 | |
---|
10245 | WRITE( dum, '(I1)') l |
---|
10246 | |
---|
10247 | CALL wrd_write_string( 't_wall_v(' // dum // ')' ) |
---|
10248 | WRITE ( 14 ) t_wall_v(l)%t |
---|
10249 | |
---|
10250 | CALL wrd_write_string( 't_window_v(' // dum // ')' ) |
---|
10251 | WRITE ( 14 ) t_window_v(l)%t |
---|
10252 | |
---|
10253 | CALL wrd_write_string( 't_green_v(' // dum // ')' ) |
---|
10254 | WRITE ( 14 ) t_green_v(l)%t |
---|
10255 | |
---|
10256 | ENDDO |
---|
10257 | |
---|
10258 | |
---|
10259 | END SUBROUTINE usm_wrd_local |
---|
10260 | |
---|
10261 | ! |
---|
10262 | !-- Integrated stability function for heat and moisture |
---|
10263 | FUNCTION psi_h( zeta ) |
---|
10264 | |
---|
10265 | USE kinds |
---|
10266 | |
---|
10267 | IMPLICIT NONE |
---|
10268 | |
---|
10269 | REAL(wp) :: psi_h !< Integrated similarity function result |
---|
10270 | REAL(wp) :: zeta !< Stability parameter z/L |
---|
10271 | REAL(wp) :: x !< dummy variable |
---|
10272 | |
---|
10273 | REAL(wp), PARAMETER :: a = 1.0_wp !< constant |
---|
10274 | REAL(wp), PARAMETER :: b = 0.66666666666_wp !< constant |
---|
10275 | REAL(wp), PARAMETER :: c = 5.0_wp !< constant |
---|
10276 | REAL(wp), PARAMETER :: d = 0.35_wp !< constant |
---|
10277 | REAL(wp), PARAMETER :: c_d_d = c / d !< constant |
---|
10278 | REAL(wp), PARAMETER :: bc_d_d = b * c / d !< constant |
---|
10279 | |
---|
10280 | |
---|
10281 | IF ( zeta < 0.0_wp ) THEN |
---|
10282 | x = SQRT( 1.0_wp - 16.0_wp * zeta ) |
---|
10283 | psi_h = 2.0_wp * LOG( (1.0_wp + x ) / 2.0_wp ) |
---|
10284 | ELSE |
---|
10285 | psi_h = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - (1.0_wp & |
---|
10286 | + 0.66666666666_wp * a * zeta )**1.5_wp - bc_d_d & |
---|
10287 | + 1.0_wp |
---|
10288 | ! |
---|
10289 | !-- Old version for stable conditions (only valid for z/L < 0.5) |
---|
10290 | !-- psi_h = - 5.0_wp * zeta |
---|
10291 | ENDIF |
---|
10292 | |
---|
10293 | END FUNCTION psi_h |
---|
10294 | |
---|
10295 | END MODULE urban_surface_mod |
---|