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 3203 2018-08-23 10:48:36Z suehring $ |
---|
30 | ! Revise bulk parameter for emissivity at ground-floor level |
---|
31 | ! |
---|
32 | ! 3196 2018-08-13 12:26:14Z maronga |
---|
33 | ! Added maximum aerodynamic resistance of 300 for horiztonal surfaces. |
---|
34 | ! |
---|
35 | ! 3176 2018-07-26 17:12:48Z suehring |
---|
36 | ! Bugfix, update virtual potential surface temparture, else heat fluxes on |
---|
37 | ! roofs might become unphysical |
---|
38 | ! |
---|
39 | ! 3152 2018-07-19 13:26:52Z suehring |
---|
40 | ! Initialize q_surface, which might be used in surface_layer_fluxes |
---|
41 | ! |
---|
42 | ! 3151 2018-07-19 08:45:38Z raasch |
---|
43 | ! remaining preprocessor define strings __check removed |
---|
44 | ! |
---|
45 | ! 3136 2018-07-16 14:48:21Z suehring |
---|
46 | ! Limit also roughness length for heat and moisture where necessary |
---|
47 | ! |
---|
48 | ! 3123 2018-07-12 16:21:53Z suehring |
---|
49 | ! Correct working precision for INTEGER number |
---|
50 | ! |
---|
51 | ! 3115 2018-07-10 12:49:26Z suehring |
---|
52 | ! Additional building type to represent bridges |
---|
53 | ! |
---|
54 | ! 3091 2018-06-28 16:20:35Z suehring |
---|
55 | ! - Limit aerodynamic resistance at vertical walls. |
---|
56 | ! - Add check for local roughness length not exceeding surface-layer height and |
---|
57 | ! limit roughness length where necessary. |
---|
58 | ! |
---|
59 | ! 3065 2018-06-12 07:03:02Z Giersch |
---|
60 | ! Unused array dxdir was removed, dz was replaced by dzu to consider vertical |
---|
61 | ! grid stretching |
---|
62 | ! |
---|
63 | ! 3049 2018-05-29 13:52:36Z Giersch |
---|
64 | ! Error messages revised |
---|
65 | ! |
---|
66 | ! 3045 2018-05-28 07:55:41Z Giersch |
---|
67 | ! Error message added |
---|
68 | ! |
---|
69 | ! 3029 2018-05-23 12:19:17Z raasch |
---|
70 | ! bugfix: close unit 151 instead of 90 |
---|
71 | ! |
---|
72 | ! 3014 2018-05-09 08:42:38Z maronga |
---|
73 | ! Added pc_transpiration_rate |
---|
74 | ! |
---|
75 | ! 2977 2018-04-17 10:27:57Z kanani |
---|
76 | ! Implement changes from branch radiation (r2948-2971) with minor modifications. |
---|
77 | ! (moh.hefny): |
---|
78 | ! Extended exn for all model domain height to avoid the need to get nzut. |
---|
79 | ! |
---|
80 | ! 2963 2018-04-12 14:47:44Z suehring |
---|
81 | ! Introduce index for vegetation/wall, pavement/green-wall and water/window |
---|
82 | ! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. . |
---|
83 | ! |
---|
84 | ! 2943 2018-04-03 16:17:10Z suehring |
---|
85 | ! Calculate exner function at all height levels and remove some un-used |
---|
86 | ! variables. |
---|
87 | ! |
---|
88 | ! 2932 2018-03-26 09:39:22Z maronga |
---|
89 | ! renamed urban_surface_par to urban_surface_parameters |
---|
90 | ! |
---|
91 | ! 2921 2018-03-22 15:05:23Z Giersch |
---|
92 | ! The activation of spinup has been moved to parin |
---|
93 | ! |
---|
94 | ! 2920 2018-03-22 11:22:01Z kanani |
---|
95 | ! Remove unused pcbl, npcbl from ONLY list |
---|
96 | ! moh.hefny: |
---|
97 | ! Fixed bugs introduced by new structures and by moving radiation interaction |
---|
98 | ! into radiation_model_mod.f90. |
---|
99 | ! Bugfix: usm data output 3D didn't respect directions |
---|
100 | ! |
---|
101 | ! 2906 2018-03-19 08:56:40Z Giersch |
---|
102 | ! Local variable ids has to be initialized with a value of -1 in |
---|
103 | ! usm_average_3d_data |
---|
104 | ! |
---|
105 | ! 2894 2018-03-15 09:17:58Z Giersch |
---|
106 | ! Calculations of the index range of the subdomain on file which overlaps with |
---|
107 | ! the current subdomain are already done in read_restart_data_mod, |
---|
108 | ! usm_read/write_restart_data have been renamed to usm_r/wrd_local, variable |
---|
109 | ! named found has been introduced for checking if restart data was found, |
---|
110 | ! reading of restart strings has been moved completely to |
---|
111 | ! read_restart_data_mod, usm_rrd_local is already inside the overlap loop |
---|
112 | ! programmed in read_restart_data_mod, SAVE attribute added where necessary, |
---|
113 | ! deallocation and allocation of some arrays have been changed to take care of |
---|
114 | ! different restart files that can be opened (index i), the marker *** end usm |
---|
115 | ! *** is not necessary anymore, strings and their respective lengths are |
---|
116 | ! written out and read now in case of restart runs to get rid of prescribed |
---|
117 | ! character lengths |
---|
118 | ! |
---|
119 | ! 2805 2018-02-14 17:00:09Z suehring |
---|
120 | ! Initialization of resistances. |
---|
121 | ! |
---|
122 | ! 2797 2018-02-08 13:24:35Z suehring |
---|
123 | ! Comment concerning output of ground-heat flux added. |
---|
124 | ! |
---|
125 | ! 2766 2018-01-22 17:17:47Z kanani |
---|
126 | ! Removed redundant commas, added some blanks |
---|
127 | ! |
---|
128 | ! 2765 2018-01-22 11:34:58Z maronga |
---|
129 | ! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in |
---|
130 | ! building_pars |
---|
131 | ! |
---|
132 | ! 2750 2018-01-15 16:26:51Z knoop |
---|
133 | ! Move flag plant canopy to modules |
---|
134 | ! |
---|
135 | ! 2737 2018-01-11 14:58:11Z kanani |
---|
136 | ! Removed unused variables t_surf_whole... |
---|
137 | ! |
---|
138 | ! 2735 2018-01-11 12:01:27Z suehring |
---|
139 | ! resistances are saved in surface attributes |
---|
140 | ! |
---|
141 | ! 2723 2018-01-05 09:27:03Z maronga |
---|
142 | ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) |
---|
143 | ! |
---|
144 | ! 2720 2018-01-02 16:27:15Z kanani |
---|
145 | ! Correction of comment |
---|
146 | ! |
---|
147 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
148 | ! Corrected "Former revisions" section |
---|
149 | ! |
---|
150 | ! 2705 2017-12-18 11:26:23Z maronga |
---|
151 | ! Changes from last commit documented |
---|
152 | ! |
---|
153 | ! 2703 2017-12-15 20:12:38Z maronga |
---|
154 | ! Workaround for calculation of r_a |
---|
155 | ! |
---|
156 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
157 | ! - Change in file header (GPL part) |
---|
158 | ! - Bugfix in calculation of pt_surface and related fluxes. (BM) |
---|
159 | ! - Do not write surface temperatures onto pt array as this might cause |
---|
160 | ! problems with nesting. (MS) |
---|
161 | ! - Revised calculation of pt1 (now done in surface_layer_fluxes). |
---|
162 | ! Bugfix, f_shf_window and f_shf_green were not set at vertical surface |
---|
163 | ! elements. (MS) |
---|
164 | ! - merged with branch ebsolver |
---|
165 | ! green building surfaces do not evaporate yet |
---|
166 | ! properties of green wall layers and window layers are taken from wall layers |
---|
167 | ! this input data is missing. (RvT) |
---|
168 | ! - Merged with branch radiation (developed by Mohamed Salim) |
---|
169 | ! - Revised initialization. (MS) |
---|
170 | ! - Rename emiss_surf into emissivity, roughness_wall into z0, albedo_surf into |
---|
171 | ! albedo. (MS) |
---|
172 | ! - Move first call of usm_radiatin from usm_init to init_3d_model |
---|
173 | ! - fixed problem with near surface temperature |
---|
174 | ! - added near surface temperature t_surf_10cm_h(m), t_surf_10cm_v(l)%t(m) |
---|
175 | ! - does not work with temp profile including stability, ol |
---|
176 | ! t_surf_10cm = pt1 now |
---|
177 | ! - merged with 2357 bugfix, error message for nopointer version |
---|
178 | ! - added indoor model coupling with wall heat flux |
---|
179 | ! - added green substrate/ dry vegetation layer for buildings |
---|
180 | ! - merged with 2232 new surface-type structure |
---|
181 | ! - added transmissivity of window tiles |
---|
182 | ! - added MOSAIK tile approach for 3 different surfaces (RvT) |
---|
183 | ! |
---|
184 | ! 2583 2017-10-26 13:58:38Z knoop |
---|
185 | ! Bugfix: reverted MPI_Win_allocate_cptr introduction in last commit |
---|
186 | ! |
---|
187 | ! 2582 2017-10-26 13:19:46Z hellstea |
---|
188 | ! Workaround for gnufortran compiler added in usm_calc_svf. CALL MPI_Win_allocate is |
---|
189 | ! replaced by CALL MPI_Win_allocate_cptr if defined ( __gnufortran ). |
---|
190 | ! |
---|
191 | ! 2544 2017-10-13 18:09:32Z maronga |
---|
192 | ! Date and time quantities are now read from date_and_time_mod. Solar constant is |
---|
193 | ! read from radiation_model_mod |
---|
194 | ! |
---|
195 | ! 2516 2017-10-04 11:03:04Z suehring |
---|
196 | ! Remove tabs |
---|
197 | ! |
---|
198 | ! 2514 2017-10-04 09:52:37Z suehring |
---|
199 | ! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny |
---|
200 | ! no output of ghost layer data |
---|
201 | ! |
---|
202 | ! 2350 2017-08-15 11:48:26Z kanani |
---|
203 | ! Bugfix and error message for nopointer version. |
---|
204 | ! Additional "! defined(__nopointer)" as workaround to enable compilation of |
---|
205 | ! nopointer version. |
---|
206 | ! |
---|
207 | ! 2318 2017-07-20 17:27:44Z suehring |
---|
208 | ! Get topography top index via Function call |
---|
209 | ! |
---|
210 | ! 2317 2017-07-20 17:27:19Z suehring |
---|
211 | ! Bugfix: adjust output of shf. Added support for spinups |
---|
212 | ! |
---|
213 | ! 2287 2017-06-15 16:46:30Z suehring |
---|
214 | ! Bugfix in determination topography-top index |
---|
215 | ! |
---|
216 | ! 2269 2017-06-09 11:57:32Z suehring |
---|
217 | ! Enable restart runs with different number of PEs |
---|
218 | ! Bugfixes nopointer branch |
---|
219 | ! |
---|
220 | ! 2258 2017-06-08 07:55:13Z suehring |
---|
221 | ! Bugfix, add pre-preprocessor directives to enable non-parrallel mode |
---|
222 | ! |
---|
223 | ! 2233 2017-05-30 18:08:54Z suehring |
---|
224 | ! |
---|
225 | ! 2232 2017-05-30 17:47:52Z suehring |
---|
226 | ! Adjustments according to new surface-type structure. Remove usm_wall_heat_flux; |
---|
227 | ! insteat, heat fluxes are directly applied in diffusion_s. |
---|
228 | ! |
---|
229 | ! 2213 2017-04-24 15:10:35Z kanani |
---|
230 | ! Removal of output quantities usm_lad and usm_canopy_hr |
---|
231 | ! |
---|
232 | ! 2209 2017-04-19 09:34:46Z kanani |
---|
233 | ! cpp switch __mpi3 removed, |
---|
234 | ! minor formatting, |
---|
235 | ! small bugfix for division by zero (Krc) |
---|
236 | ! |
---|
237 | ! 2113 2017-01-12 13:40:46Z kanani |
---|
238 | ! cpp switch __mpi3 added for MPI-3 standard code (Ketelsen) |
---|
239 | ! |
---|
240 | ! 2071 2016-11-17 11:22:14Z maronga |
---|
241 | ! Small bugfix (Resler) |
---|
242 | ! |
---|
243 | ! 2031 2016-10-21 15:11:58Z knoop |
---|
244 | ! renamed variable rho to rho_ocean |
---|
245 | ! |
---|
246 | ! 2024 2016-10-12 16:42:37Z kanani |
---|
247 | ! Bugfixes in deallocation of array plantt and reading of csf/csfsurf, |
---|
248 | ! optimization of MPI-RMA operations, |
---|
249 | ! declaration of pcbl as integer, |
---|
250 | ! renamed usm_radnet -> usm_rad_net, usm_canopy_khf -> usm_canopy_hr, |
---|
251 | ! splitted arrays svf -> svf & csf, svfsurf -> svfsurf & csfsurf, |
---|
252 | ! use of new control parameter varnamelength, |
---|
253 | ! added output variables usm_rad_ressw, usm_rad_reslw, |
---|
254 | ! minor formatting changes, |
---|
255 | ! minor optimizations. |
---|
256 | ! |
---|
257 | ! 2011 2016-09-19 17:29:57Z kanani |
---|
258 | ! Major reformatting according to PALM coding standard (comments, blanks, |
---|
259 | ! alphabetical ordering, etc.), |
---|
260 | ! removed debug_prints, |
---|
261 | ! removed auxiliary SUBROUTINE get_usm_info, instead, USM flag urban_surface is |
---|
262 | ! defined in MODULE control_parameters (modules.f90) to avoid circular |
---|
263 | ! dependencies, |
---|
264 | ! renamed canopy_heat_flux to pc_heating_rate, as meaning of quantity changed. |
---|
265 | ! |
---|
266 | ! 2007 2016-08-24 15:47:17Z kanani |
---|
267 | ! Initial revision |
---|
268 | ! |
---|
269 | ! |
---|
270 | ! Description: |
---|
271 | ! ------------ |
---|
272 | ! 2016/6/9 - Initial version of the USM (Urban Surface Model) |
---|
273 | ! authors: Jaroslav Resler, Pavel Krc |
---|
274 | ! (Czech Technical University in Prague and Institute of |
---|
275 | ! Computer Science of the Czech Academy of Sciences, Prague) |
---|
276 | ! with contributions: Michal Belda, Nina Benesova, Ondrej Vlcek |
---|
277 | ! partly inspired by PALM LSM (B. Maronga) |
---|
278 | ! parameterizations of Ra checked with TUF3D (E. S. Krayenhoff) |
---|
279 | !> Module for Urban Surface Model (USM) |
---|
280 | !> The module includes: |
---|
281 | !> 1. radiation model with direct/diffuse radiation, shading, reflections |
---|
282 | !> and integration with plant canopy |
---|
283 | !> 2. wall and wall surface model |
---|
284 | !> 3. surface layer energy balance |
---|
285 | !> 4. anthropogenic heat (only from transportation so far) |
---|
286 | !> 5. necessary auxiliary subroutines (reading inputs, writing outputs, |
---|
287 | !> restart simulations, ...) |
---|
288 | !> It also make use of standard radiation and integrates it into |
---|
289 | !> urban surface model. |
---|
290 | !> |
---|
291 | !> Further work: |
---|
292 | !> ------------- |
---|
293 | !> 1. Remove global arrays surfouts, surfoutl and only keep track of radiosity |
---|
294 | !> from surfaces that are visible from local surfaces (i.e. there is a SVF |
---|
295 | !> where target is local). To do that, radiosity will be exchanged after each |
---|
296 | !> reflection step using MPI_Alltoall instead of current MPI_Allgather. |
---|
297 | !> |
---|
298 | !> 2. Temporarily large values of surface heat flux can be observed, up to |
---|
299 | !> 1.2 Km/s, which seem to be not realistic. |
---|
300 | !> |
---|
301 | !> @todo Output of _av variables in case of restarts |
---|
302 | !> @todo Revise flux conversion in energy-balance solver |
---|
303 | !> @todo Bugfixing in nopointer branch |
---|
304 | !> @todo Check optimizations for RMA operations |
---|
305 | !> @todo Alternatives for MPI_WIN_ALLOCATE? (causes problems with openmpi) |
---|
306 | !> @todo Check for load imbalances in CPU measures, e.g. for exchange_horiz_prog |
---|
307 | !> factor 3 between min and max time |
---|
308 | !> @todo Move setting of flag indoor_model to indoor_model_mod once available |
---|
309 | !> @todo Check divisions in wtend (etc.) calculations for possible division |
---|
310 | !> by zero, e.g. in case fraq(0,m) + fraq(1,m) = 0?! |
---|
311 | !> @todo Use unit 90 for OPEN/CLOSE of input files (FK) |
---|
312 | !> @todo Move plant canopy stuff into plant canopy code |
---|
313 | !------------------------------------------------------------------------------! |
---|
314 | MODULE urban_surface_mod |
---|
315 | |
---|
316 | #if ! defined( __nopointer ) |
---|
317 | USE arrays_3d, & |
---|
318 | ONLY: dzu, hyp, zu, pt, pt_1, pt_2, p, u, v, w, hyp, tend |
---|
319 | #endif |
---|
320 | |
---|
321 | USE cloud_parameters, & |
---|
322 | ONLY: cp, r_d |
---|
323 | |
---|
324 | USE constants, & |
---|
325 | ONLY: pi |
---|
326 | |
---|
327 | USE control_parameters, & |
---|
328 | ONLY: coupling_start_time, topography, dt_3d, humidity, & |
---|
329 | intermediate_timestep_count, initializing_actions, & |
---|
330 | intermediate_timestep_count_max, simulated_time, end_time, & |
---|
331 | timestep_scheme, tsc, coupling_char, io_blocks, io_group, & |
---|
332 | message_string, time_since_reference_point, surface_pressure, & |
---|
333 | g, pt_surface, large_scale_forcing, lsf_surf, spinup, & |
---|
334 | spinup_pt_mean, spinup_time, time_do3d, dt_do3d, & |
---|
335 | average_count_3d, varnamelength, urban_surface, kappa, & |
---|
336 | plant_canopy |
---|
337 | |
---|
338 | USE cpulog, & |
---|
339 | ONLY: cpu_log, log_point, log_point_s |
---|
340 | |
---|
341 | USE date_and_time_mod, & |
---|
342 | ONLY: time_utc_init |
---|
343 | |
---|
344 | USE grid_variables, & |
---|
345 | ONLY: dx, dy, ddx, ddy, ddx2, ddy2 |
---|
346 | |
---|
347 | USE indices, & |
---|
348 | ONLY: nx, ny, nnx, nny, nnz, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, & |
---|
349 | nysg, nzb, nzt, nbgp, wall_flags_0 |
---|
350 | |
---|
351 | USE, INTRINSIC :: iso_c_binding |
---|
352 | |
---|
353 | USE kinds |
---|
354 | |
---|
355 | USE pegrid |
---|
356 | |
---|
357 | USE plant_canopy_model_mod, & |
---|
358 | ONLY: pc_heating_rate, pc_transpiration_rate |
---|
359 | |
---|
360 | USE radiation_model_mod, & |
---|
361 | ONLY: albedo_type, radiation_interaction, calc_zenith, zenith, & |
---|
362 | radiation, rad_sw_in, rad_lw_in, rad_sw_out, rad_lw_out, & |
---|
363 | sigma_sb, solar_constant, sun_direction, sun_dir_lat, & |
---|
364 | sun_dir_lon, & |
---|
365 | force_radiation_call, surfinsw, surfinlw, surfinswdir, & |
---|
366 | surfinswdif, surfoutsw, surfoutlw, surfins,nsvfl, svf, svfsurf, & |
---|
367 | surfinl, surfinlwdif, rad_sw_in_dir, rad_sw_in_diff, & |
---|
368 | rad_lw_in_diff, surfouts, surfoutl, surfoutsl, surfoutll, surf, & |
---|
369 | surfl, nsurfl, nsurfs, surfstart, pcbinsw, pcbinlw, & |
---|
370 | iup_u, inorth_u, isouth_u, ieast_u, iwest_u, iup_l, & |
---|
371 | inorth_l, isouth_l, ieast_l, iwest_l, id, & |
---|
372 | iz, iy, ix, idir, jdir, kdir, nsurf_type, nsurf, idsvf, ndsvf, & |
---|
373 | iup_a, idown_a, inorth_a, isouth_a, ieast_a, iwest_a, & |
---|
374 | idcsf, ndcsf, kdcsf, pct, & |
---|
375 | startland, endland, startwall, endwall, skyvf, skyvft |
---|
376 | |
---|
377 | USE statistics, & |
---|
378 | ONLY: hom, statistic_regions |
---|
379 | |
---|
380 | USE surface_mod, & |
---|
381 | ONLY: get_topography_top_index_ji, get_topography_top_index, & |
---|
382 | ind_pav_green, ind_veg_wall, ind_wat_win, surf_usm_h, & |
---|
383 | surf_usm_v, surface_restore_elements |
---|
384 | |
---|
385 | |
---|
386 | IMPLICIT NONE |
---|
387 | |
---|
388 | |
---|
389 | !-- configuration parameters (they can be setup in PALM config) |
---|
390 | LOGICAL :: usm_material_model = .TRUE. !< flag parameter indicating wheather the model of heat in materials is used |
---|
391 | LOGICAL :: usm_anthropogenic_heat = .FALSE. !< flag parameter indicating wheather the anthropogenic heat sources (e.g.transportation) are used |
---|
392 | LOGICAL :: force_radiation_call_l = .FALSE. !< flag parameter for unscheduled radiation model calls |
---|
393 | LOGICAL :: indoor_model = .FALSE. !< whether to use the indoor model |
---|
394 | LOGICAL :: read_wall_temp_3d = .FALSE. |
---|
395 | |
---|
396 | |
---|
397 | INTEGER(iwp) :: building_type = 1 !< default building type (preleminary setting) |
---|
398 | INTEGER(iwp) :: land_category = 2 !< default category for land surface |
---|
399 | INTEGER(iwp) :: wall_category = 2 !< default category for wall surface over pedestrian zone |
---|
400 | INTEGER(iwp) :: pedestrian_category = 2 !< default category for wall surface in pedestrian zone |
---|
401 | INTEGER(iwp) :: roof_category = 2 !< default category for root surface |
---|
402 | REAL(wp) :: roughness_concrete = 0.001_wp !< roughness length of average concrete surface |
---|
403 | ! |
---|
404 | !-- Indices of input attributes for (above) ground floor level |
---|
405 | INTEGER(iwp) :: ind_alb_wall = 38 !< index in input list for albedo_type of wall fraction |
---|
406 | INTEGER(iwp) :: ind_alb_green = 39 !< index in input list for albedo_type of green fraction |
---|
407 | INTEGER(iwp) :: ind_alb_win = 40 !< index in input list for albedo_type of window fraction |
---|
408 | INTEGER(iwp) :: ind_emis_wall_agfl = 14 !< index in input list for wall emissivity, above ground floor level |
---|
409 | INTEGER(iwp) :: ind_emis_wall_gfl = 32 !< index in input list for wall emissivity, ground floor level |
---|
410 | INTEGER(iwp) :: ind_emis_green_agfl = 15 !< index in input list for green emissivity, above ground floor level |
---|
411 | INTEGER(iwp) :: ind_emis_green_gfl = 33 !< index in input list for green emissivity, ground floor level |
---|
412 | INTEGER(iwp) :: ind_emis_win_agfl = 16 !< index in input list for window emissivity, above ground floor level |
---|
413 | INTEGER(iwp) :: ind_emis_win_gfl = 34 !< index in input list for window emissivity, ground floor level |
---|
414 | INTEGER(iwp) :: ind_green_frac_w_agfl = 2 !< index in input list for green fraction on wall, above ground floor level |
---|
415 | INTEGER(iwp) :: ind_green_frac_w_gfl = 23 !< index in input list for green fraction on wall, ground floor level |
---|
416 | INTEGER(iwp) :: ind_green_frac_r_agfl = 3 !< index in input list for green fraction on roof, above ground floor level |
---|
417 | INTEGER(iwp) :: ind_green_frac_r_gfl = 24 !< index in input list for green fraction on roof, ground floor level |
---|
418 | INTEGER(iwp) :: ind_hc1_agfl = 6 !< index in input list for heat capacity at first wall layer, above ground floor level |
---|
419 | INTEGER(iwp) :: ind_hc1_gfl = 26 !< index in input list for heat capacity at first wall layer, ground floor level |
---|
420 | INTEGER(iwp) :: ind_hc2_agfl = 7 !< index in input list for heat capacity at second wall layer, above ground floor level |
---|
421 | INTEGER(iwp) :: ind_hc2_gfl = 27 !< index in input list for heat capacity at second wall layer, ground floor level |
---|
422 | INTEGER(iwp) :: ind_hc3_agfl = 8 !< index in input list for heat capacity at third wall layer, above ground floor level |
---|
423 | INTEGER(iwp) :: ind_hc3_gfl = 28 !< index in input list for heat capacity at third wall layer, ground floor level |
---|
424 | INTEGER(iwp) :: ind_gflh = 20 !< index in input list for ground floor level height |
---|
425 | INTEGER(iwp) :: ind_lai_r_agfl = 4 !< index in input list for LAI on roof, above ground floor level |
---|
426 | INTEGER(iwp) :: ind_lai_r_gfl = 4 !< index in input list for LAI on roof, ground floor level |
---|
427 | INTEGER(iwp) :: ind_lai_w_agfl = 5 !< index in input list for LAI on wall, above ground floor level |
---|
428 | INTEGER(iwp) :: ind_lai_w_gfl = 25 !< index in input list for LAI on wall, ground floor level |
---|
429 | INTEGER(iwp) :: ind_tc1_agfl = 9 !< index in input list for thermal conductivity at first wall layer, above ground floor level |
---|
430 | INTEGER(iwp) :: ind_tc1_gfl = 29 !< index in input list for thermal conductivity at first wall layer, ground floor level |
---|
431 | INTEGER(iwp) :: ind_tc2_agfl = 10 !< index in input list for thermal conductivity at second wall layer, above ground floor level |
---|
432 | INTEGER(iwp) :: ind_tc2_gfl = 30 !< index in input list for thermal conductivity at second wall layer, ground floor level |
---|
433 | INTEGER(iwp) :: ind_tc3_agfl = 11 !< index in input list for thermal conductivity at third wall layer, above ground floor level |
---|
434 | INTEGER(iwp) :: ind_tc3_gfl = 31 !< index in input list for thermal conductivity at third wall layer, ground floor level |
---|
435 | INTEGER(iwp) :: ind_thick_1 = 41 !< index for wall layer thickness - 1st layer |
---|
436 | INTEGER(iwp) :: ind_thick_2 = 42 !< index for wall layer thickness - 2nd layer |
---|
437 | INTEGER(iwp) :: ind_thick_3 = 43 !< index for wall layer thickness - 3rd layer |
---|
438 | INTEGER(iwp) :: ind_thick_4 = 44 !< index for wall layer thickness - 4th layer |
---|
439 | INTEGER(iwp) :: ind_trans_agfl = 17 !< index in input list for window transmissivity, above ground floor level |
---|
440 | INTEGER(iwp) :: ind_trans_gfl = 35 !< index in input list for window transmissivity, ground floor level |
---|
441 | INTEGER(iwp) :: ind_wall_frac_agfl = 0 !< index in input list for wall fraction, above ground floor level |
---|
442 | INTEGER(iwp) :: ind_wall_frac_gfl = 21 !< index in input list for wall fraction, ground floor level |
---|
443 | INTEGER(iwp) :: ind_win_frac_agfl = 1 !< index in input list for window fraction, above ground floor level |
---|
444 | INTEGER(iwp) :: ind_win_frac_gfl = 22 !< index in input list for window fraction, ground floor level |
---|
445 | INTEGER(iwp) :: ind_z0_agfl = 18 !< index in input list for z0, above ground floor level |
---|
446 | INTEGER(iwp) :: ind_z0_gfl = 36 !< index in input list for z0, ground floor level |
---|
447 | INTEGER(iwp) :: ind_z0qh_agfl = 19 !< index in input list for z0h / z0q, above ground floor level |
---|
448 | INTEGER(iwp) :: ind_z0qh_gfl = 37 !< index in input list for z0h / z0q, ground floor level |
---|
449 | |
---|
450 | |
---|
451 | REAL(wp) :: roof_height_limit = 4._wp !< height for distinguish between land surfaces and roofs |
---|
452 | REAL(wp) :: ground_floor_level = 4.0_wp !< default ground floor level |
---|
453 | |
---|
454 | |
---|
455 | CHARACTER(37), DIMENSION(0:7), PARAMETER :: building_type_name = (/ & |
---|
456 | 'user-defined ', & ! 0 |
---|
457 | 'residential - 1950 ', & ! 1 |
---|
458 | 'residential 1951 - 2000 ', & ! 2 |
---|
459 | 'residential 2001 - ', & ! 3 |
---|
460 | 'office - 1950 ', & ! 4 |
---|
461 | 'office 1951 - 2000 ', & ! 5 |
---|
462 | 'office 2001 - ', & ! 6 |
---|
463 | 'bridges ' & ! 7 |
---|
464 | /) |
---|
465 | ! |
---|
466 | !-- building parameters, 4 different types |
---|
467 | !-- 0 - wall fraction, 1- window fraction, 2 - green fraction on wall, 3- green fraction |
---|
468 | !-- at roof, 4 - lai of green fraction at roof, 5 - lai of green fraction at wall, |
---|
469 | !-- 6 - heat capacity of wall layer 1, 7 - heat capacity of wall layer 2, |
---|
470 | !-- 8 - heat capacity of wall layer 3, 9 - thermal conductivity of wall layer 1, |
---|
471 | !-- 10 - thermal conductivity of wall layer 2, 11 - thermal conductivity of wall layer 3, |
---|
472 | !-- 12 - indoor target summer temperature ( K ), 13 - indoor target winter temperature (K), |
---|
473 | !-- 14 - emissivity of wall fraction, 15 - emissivity of green fraction, 16 - emissivity of window fraction, |
---|
474 | !-- 17 - transmissivity of window fraction, 18 - z0, 19 - z0h/z0q, 20 - ground floor height, |
---|
475 | !-- 21 - ground floor wall fraction, 22 - ground floor window fraction, 23 ground floor green fraction, |
---|
476 | !-- 24 - ground floor green fraction on roof, 25 - ground floor lai of green fraction, |
---|
477 | !-- 26 - ground floor heat capacity of wall layer 1, 27 - ground floor heat capacity of wall layer 1, |
---|
478 | !-- 28 - ground floor heat capacity of wall layer 3, 29 - ground floor thermal conductivity of wall layer 1, |
---|
479 | !-- 30 - ground floor thermal conductivity of wall layer 2, 31 - ground floor thermal conductivity of wall layer 3, |
---|
480 | !-- 32 - ground floor emissivity of wall fraction, 33 - ground floor emissivity of green fraction, |
---|
481 | !-- 34 - ground floor emissivity of window fraction, 35 - ground floor transmissivity of window fraction, |
---|
482 | !-- 36 - ground floor z0, 37 - ground floor z0h/z0q, 38 - albedo type wall fraction |
---|
483 | !-- 39 - albedo type green fraction, 40 - albedo type window fraction |
---|
484 | !-- 41 - wall layer thickness - 1st layer, 42 - wall layer thickness - 2nd layer, |
---|
485 | !-- 43 - wall layer thickness - 3rd layer, 44 - wall layer thickness - 4th layer, |
---|
486 | !-- 45 - heat capacity of the wall surface, 46 - heat conductivity |
---|
487 | !-- Please note, only preleminary dummy values so far! |
---|
488 | REAL(wp), DIMENSION(0:46,1:7), PARAMETER :: building_pars = RESHAPE( (/ & |
---|
489 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, & !parameter 0-5 |
---|
490 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 6-11 |
---|
491 | 296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp, & !parameter 12-17 |
---|
492 | 0.001_wp, 0.0001_wp, 4.0_wp, & !parameter 18-20 |
---|
493 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp, & !parameter 21-25 |
---|
494 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, & !parameter 26-28 |
---|
495 | 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 29-31 |
---|
496 | 0.9_wp, 0.4_wp, 0.4_wp, 0.4_wp, 0.01_wp, 0.001_wp, & !parameter 32-37 |
---|
497 | 24.0_wp, 24.0_wp, 24.0_wp, & !parameter 38-40 |
---|
498 | 0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp, & !parameter 41-44 |
---|
499 | 20000.0_wp, 10.0_wp, & !parameter 45-46 - end of type 1 |
---|
500 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, & !parameter 0-5 |
---|
501 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 6-11 |
---|
502 | 296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp, & !parameter 12-17 |
---|
503 | 0.001_wp, 0.0001_wp, 4.0_wp, & !parameter 18-20 |
---|
504 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp, & !parameter 21-25 |
---|
505 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, & !parameter 26-28 |
---|
506 | 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 29-31 |
---|
507 | 0.9_wp, 0.4_wp, 0.4_wp, 0.4_wp, 0.01_wp, 0.001_wp, & !parameter 32-37 |
---|
508 | 24.0_wp, 24.0_wp, 24.0_wp, & !parameter 38-40 |
---|
509 | 0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp, & !parameter 41-44 |
---|
510 | 20000.0_wp, 10.0_wp, & !parameter 45-46 - end of type 2 |
---|
511 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, & !parameter 0-5 |
---|
512 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 6-11 |
---|
513 | 296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp, & !parameter 12-17 |
---|
514 | 0.001_wp, 0.0001_wp, 4.0_wp, & !parameter 18-20 |
---|
515 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp, & !parameter 21-25 |
---|
516 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, & !parameter 26-28 |
---|
517 | 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 29-31 |
---|
518 | 0.9_wp, 0.4_wp, 0.4_wp, 0.4_wp, 0.01_wp, 0.001_wp, & !parameter 32-37 |
---|
519 | 24.0_wp, 24.0_wp, 24.0_wp, & !parameter 38-40 |
---|
520 | 0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp, & !parameter 41-44 |
---|
521 | 20000.0_wp, 10.0_wp, & !parameter 45-46 - end of type 3 |
---|
522 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, & !parameter 0-5 |
---|
523 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 6-11 |
---|
524 | 296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp, & !parameter 12-17 |
---|
525 | 0.01_wp, 0.001_wp, 4.0_wp, & !parameter 18-20 |
---|
526 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp, & !parameter 21-25 |
---|
527 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, & !parameter 26-28 |
---|
528 | 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 29-31 |
---|
529 | 0.9_wp, 0.4_wp, 0.4_wp, 0.4_wp, 0.01_wp, 0.001_wp, & !parameter 32-37 |
---|
530 | 24.0_wp, 24.0_wp, 24.0_wp, & !parameter 38-40 |
---|
531 | 0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp, & !parameter 41-44 |
---|
532 | 20000.0_wp, 10.0_wp, & !parameter 45-46 - end of type 4 |
---|
533 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, & !parameter 0-5 |
---|
534 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 6-11 |
---|
535 | 296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp, & !parameter 12-17 |
---|
536 | 0.001_wp, 0.0001_wp, 4.0_wp, & !parameter 18-20 |
---|
537 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp, & !parameter 21-25 |
---|
538 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, & !parameter 26-28 |
---|
539 | 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 29-31 |
---|
540 | 0.9_wp, 0.4_wp, 0.4_wp, 0.4_wp, 0.01_wp, 0.001_wp, & !parameter 32-37 |
---|
541 | 24.0_wp, 24.0_wp, 24.0_wp, & !parameter 38-40 |
---|
542 | 0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp, & !parameter 41-44 |
---|
543 | 20000.0_wp, 10.0_wp, & !parameter 45-46 - end of type 5 |
---|
544 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, & !parameter 0-5 |
---|
545 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 6-11 |
---|
546 | 296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp, & !parameter 12-17 |
---|
547 | 0.001_wp, 0.0001_wp, 4.0_wp, & !parameter 18-20 |
---|
548 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp, & !parameter 21-25 |
---|
549 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, & !parameter 26-28 |
---|
550 | 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 29-31 |
---|
551 | 0.9_wp, 0.4_wp, 0.4_wp, 0.4_wp, 0.01_wp, 0.001_wp, & !parameter 32-37 |
---|
552 | 24.0_wp, 24.0_wp, 24.0_wp, & !parameter 38-40 |
---|
553 | 0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp, & !parameter 41-44 |
---|
554 | 20000.0_wp, 10.0_wp, & !parameter 45-46 - end of type 6 |
---|
555 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, & !parameter 0-5 |
---|
556 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 6-11 |
---|
557 | 296.15_wp, 293.15_wp, 0.9_wp, 0.9_wp, 0.01_wp, 0.99_wp, & !parameter 12-17 |
---|
558 | 0.001_wp, 0.0001_wp, 0.0_wp, & !parameter 18-20 |
---|
559 | 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp, & !parameter 21-25 |
---|
560 | 1000000.0_wp, 1000000.0_wp, 1000000.0_wp, & !parameter 26-28 |
---|
561 | 0.3_wp, 0.3_wp, 0.3_wp, & !parameter 29-31 |
---|
562 | 0.9_wp, 0.4_wp, 0.4_wp, 0.4_wp, 0.01_wp, 0.001_wp, & !parameter 32-37 |
---|
563 | 24.0_wp, 24.0_wp, 24.0_wp, & !parameter 38-40 |
---|
564 | 0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp, & !parameter 41-44 |
---|
565 | 20000.0_wp, 10.0_wp & !parameter 45-46 - end of type 7 (bridges) |
---|
566 | /), & |
---|
567 | (/47, 7/) ) |
---|
568 | |
---|
569 | ! |
---|
570 | !-- Type for surface temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
571 | TYPE t_surf_vertical |
---|
572 | REAL(wp), DIMENSION(:), ALLOCATABLE :: t |
---|
573 | END TYPE t_surf_vertical |
---|
574 | ! |
---|
575 | !-- Type for wall temperatures at vertical walls. Is not necessary for horizontal walls. |
---|
576 | TYPE t_wall_vertical |
---|
577 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t |
---|
578 | END TYPE t_wall_vertical |
---|
579 | |
---|
580 | |
---|
581 | !-- arrays for time averages |
---|
582 | !-- 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 |
---|
583 | REAL(wp), DIMENSION(:), ALLOCATABLE :: rad_net_av !< average of rad_net_l |
---|
584 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinsw_av !< average of sw radiation falling to local surface including radiation from reflections |
---|
585 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlw_av !< average of lw radiation falling to local surface including radiation from reflections |
---|
586 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswdir_av !< average of direct sw radiation falling to local surface |
---|
587 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswdif_av !< average of diffuse sw radiation from sky and model boundary falling to local surface |
---|
588 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlwdif_av !< average of diffuse lw radiation from sky and model boundary falling to local surface |
---|
589 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinswref_av !< average of sw radiation falling to surface from reflections |
---|
590 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinlwref_av !< average of lw radiation falling to surface from reflections |
---|
591 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfoutsw_av !< average of total sw radiation outgoing from nonvirtual surfaces surfaces after all reflection |
---|
592 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfoutlw_av !< average of total lw radiation outgoing from nonvirtual surfaces surfaces after all reflection |
---|
593 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfins_av !< average of array of residua of sw radiation absorbed in surface after last reflection |
---|
594 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfinl_av !< average of array of residua of lw radiation absorbed in surface after last reflection |
---|
595 | REAL(wp), DIMENSION(:), ALLOCATABLE :: surfhf_av !< average of total radiation flux incoming to minus outgoing from local surface |
---|
596 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_av !< average of wghf_eb |
---|
597 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wshf_eb_av !< average of wshf_eb |
---|
598 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_wall_av !< Average of t_wall |
---|
599 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_green_av !< average of wghf_eb_green |
---|
600 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_green_av !< Average of t_green |
---|
601 | REAL(wp), DIMENSION(:), ALLOCATABLE :: wghf_eb_window_av !< average of wghf_eb_window |
---|
602 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_window_av !< Average of t_window |
---|
603 | |
---|
604 | |
---|
605 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
606 | !-- anthropogenic heat sources |
---|
607 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
608 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: aheat !< daily average of anthropogenic heat (W/m2) |
---|
609 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: aheatprof !< diurnal profiles of anthropogenic heat for particular layers |
---|
610 | INTEGER(iwp) :: naheatlayers = 1 !< number of layers of anthropogenic heat |
---|
611 | |
---|
612 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
613 | !-- wall surface model |
---|
614 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
615 | !-- wall surface model constants |
---|
616 | INTEGER(iwp), PARAMETER :: nzb_wall = 0 !< inner side of the wall model (to be switched) |
---|
617 | INTEGER(iwp), PARAMETER :: nzt_wall = 3 !< outer side of the wall model (to be switched) |
---|
618 | INTEGER(iwp), PARAMETER :: nzw = 4 !< number of wall layers (fixed for now) |
---|
619 | |
---|
620 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
621 | !< normalized soil, wall and roof layer depths (m/m) |
---|
622 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
623 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
624 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
625 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_window = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
626 | !< normalized window layer depths (m/m) |
---|
627 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /) |
---|
628 | !< normalized green layer depths (m/m) |
---|
629 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /) |
---|
630 | ! REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: zwn_default_green = (/0.33_wp, 0.66_wp, 1.0_wp /) |
---|
631 | |
---|
632 | |
---|
633 | REAL(wp) :: wall_inner_temperature = 295.0_wp !< temperature of the inner wall surface (~22 degrees C) (K) |
---|
634 | REAL(wp) :: roof_inner_temperature = 295.0_wp !< temperature of the inner roof surface (~22 degrees C) (K) |
---|
635 | REAL(wp) :: soil_inner_temperature = 288.0_wp !< temperature of the deep soil (~15 degrees C) (K) |
---|
636 | REAL(wp) :: window_inner_temperature = 295.0_wp !< temperature of the inner window surface (~22 degrees C) (K) |
---|
637 | |
---|
638 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
639 | !-- surface and material model variables for walls, ground, roofs |
---|
640 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
641 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn !< normalized wall layer depths (m) |
---|
642 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_window !< normalized window layer depths (m) |
---|
643 | REAL(wp), DIMENSION(:), ALLOCATABLE :: zwn_green !< normalized green layer depths (m) |
---|
644 | |
---|
645 | #if defined( __nopointer ) |
---|
646 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_h !< wall surface temperature (K) at horizontal walls |
---|
647 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_h_p !< progn. wall surface temperature (K) at horizontal walls |
---|
648 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h !< window surface temperature (K) at horizontal walls |
---|
649 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_p !< progn. window surface temperature (K) at horizontal walls |
---|
650 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h !< green surface temperature (K) at horizontal walls |
---|
651 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_p !< progn. green surface temperature (K) at horizontal walls |
---|
652 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h !< near surface temperature (10cm) (K) at horizontal walls |
---|
653 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_p !< progn. near surface temperature (10cm) (K) at horizontal walls |
---|
654 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_v |
---|
655 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_v_p |
---|
656 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v |
---|
657 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_p |
---|
658 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v |
---|
659 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_p |
---|
660 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v |
---|
661 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_p |
---|
662 | #else |
---|
663 | REAL(wp), DIMENSION(:), POINTER :: t_surf_h |
---|
664 | REAL(wp), DIMENSION(:), POINTER :: t_surf_h_p |
---|
665 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h |
---|
666 | REAL(wp), DIMENSION(:), POINTER :: t_surf_window_h_p |
---|
667 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h |
---|
668 | REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h_p |
---|
669 | REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h |
---|
670 | REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h_p |
---|
671 | |
---|
672 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_h_1 |
---|
673 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_h_2 |
---|
674 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_1 |
---|
675 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_h_2 |
---|
676 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_1 |
---|
677 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_2 |
---|
678 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_1 |
---|
679 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_2 |
---|
680 | |
---|
681 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_v |
---|
682 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_v_p |
---|
683 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v |
---|
684 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_window_v_p |
---|
685 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v |
---|
686 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v_p |
---|
687 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v |
---|
688 | TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v_p |
---|
689 | |
---|
690 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_v_1 |
---|
691 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_v_2 |
---|
692 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_1 |
---|
693 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_window_v_2 |
---|
694 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_1 |
---|
695 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_2 |
---|
696 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_1 |
---|
697 | TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_2 |
---|
698 | |
---|
699 | #endif |
---|
700 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_av !< average of wall surface temperature (K) |
---|
701 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_av !< average of window surface temperature (K) |
---|
702 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_av !< average of green wall surface temperature (K) |
---|
703 | REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_av !< average of whole wall surface temperature (K) |
---|
704 | |
---|
705 | !-- Temporal tendencies for time stepping |
---|
706 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_m !< surface temperature tendency of wall (K) |
---|
707 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_window_m !< surface temperature tendency of window (K) |
---|
708 | REAL(wp), DIMENSION(:), ALLOCATABLE :: tt_surface_green_m !< surface temperature tendency of green wall (K) |
---|
709 | |
---|
710 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
711 | !-- Energy balance variables |
---|
712 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
713 | !-- parameters of the land, roof and wall surfaces |
---|
714 | |
---|
715 | #if defined( __nopointer ) |
---|
716 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h !< Wall temperature (K) |
---|
717 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_av !< Average of t_wall |
---|
718 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_p !< Prog. wall temperature (K) |
---|
719 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h !< Window temperature (K) |
---|
720 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_av !< Average of t_window |
---|
721 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_p !< Prog. window temperature (K) |
---|
722 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h !< Green temperature (K) |
---|
723 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_av !< Average of t_green |
---|
724 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_p !< Prog. green temperature (K) |
---|
725 | |
---|
726 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v !< Wall temperature (K) |
---|
727 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_av !< Average of t_wall |
---|
728 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_p !< Prog. wall temperature (K) |
---|
729 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v !< Window temperature (K) |
---|
730 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_av !< Average of t_window |
---|
731 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_p !< Prog. window temperature (K) |
---|
732 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v !< Green temperature (K) |
---|
733 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_av !< Average of t_green |
---|
734 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_p !< Prog. green temperature (K) |
---|
735 | #else |
---|
736 | REAL(wp), DIMENSION(:,:), POINTER :: t_wall_h, t_wall_h_p |
---|
737 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_wall_h_av, t_wall_h_1, t_wall_h_2 |
---|
738 | REAL(wp), DIMENSION(:,:), POINTER :: t_window_h, t_window_h_p |
---|
739 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_window_h_av, t_window_h_1, t_window_h_2 |
---|
740 | REAL(wp), DIMENSION(:,:), POINTER :: t_green_h, t_green_h_p |
---|
741 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: t_green_h_av, t_green_h_1, t_green_h_2 |
---|
742 | |
---|
743 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_wall_v, t_wall_v_p |
---|
744 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_wall_v_av, t_wall_v_1, t_wall_v_2 |
---|
745 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_window_v, t_window_v_p |
---|
746 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_window_v_av, t_window_v_1, t_window_v_2 |
---|
747 | TYPE(t_wall_vertical), DIMENSION(:), POINTER :: t_green_v, t_green_v_p |
---|
748 | TYPE(t_wall_vertical), DIMENSION(0:3), TARGET :: t_green_v_av, t_green_v_1, t_green_v_2 |
---|
749 | #endif |
---|
750 | |
---|
751 | !-- Wall temporal tendencies for time stepping |
---|
752 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_wall_m !< t_wall prognostic array |
---|
753 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_window_m !< t_window prognostic array |
---|
754 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tt_green_m !< t_green prognostic array |
---|
755 | |
---|
756 | !-- Surface and material parameters classes (surface_type) |
---|
757 | !-- albedo, emissivity, lambda_surf, roughness, thickness, volumetric heat capacity, thermal conductivity |
---|
758 | INTEGER(iwp) :: n_surface_types !< number of the wall type categories |
---|
759 | INTEGER(iwp), PARAMETER :: n_surface_params = 9 !< number of parameters for each type of the wall |
---|
760 | INTEGER(iwp), PARAMETER :: ialbedo = 1 !< albedo of the surface |
---|
761 | INTEGER(iwp), PARAMETER :: iemiss = 2 !< emissivity of the surface |
---|
762 | INTEGER(iwp), PARAMETER :: ilambdas = 3 !< heat conductivity lambda S between surface and material ( W m-2 K-1 ) |
---|
763 | INTEGER(iwp), PARAMETER :: irough = 4 !< roughness length z0 for movements |
---|
764 | INTEGER(iwp), PARAMETER :: iroughh = 5 !< roughness length z0h for scalars (heat, humidity,...) |
---|
765 | INTEGER(iwp), PARAMETER :: icsurf = 6 !< Surface skin layer heat capacity (J m-2 K-1 ) |
---|
766 | INTEGER(iwp), PARAMETER :: ithick = 7 !< thickness of the surface (wall, roof, land) ( m ) |
---|
767 | INTEGER(iwp), PARAMETER :: irhoC = 8 !< volumetric heat capacity rho*C of the material ( J m-3 K-1 ) |
---|
768 | INTEGER(iwp), PARAMETER :: ilambdah = 9 !< thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
769 | CHARACTER(12), DIMENSION(:), ALLOCATABLE :: surface_type_names !< names of wall types (used only for reports) |
---|
770 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: surface_type_codes !< codes of wall types |
---|
771 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: surface_params !< parameters of wall types |
---|
772 | |
---|
773 | |
---|
774 | !-- interfaces of subroutines accessed from outside of this module |
---|
775 | INTERFACE usm_boundary_condition |
---|
776 | MODULE PROCEDURE usm_boundary_condition |
---|
777 | END INTERFACE usm_boundary_condition |
---|
778 | |
---|
779 | INTERFACE usm_check_data_output |
---|
780 | MODULE PROCEDURE usm_check_data_output |
---|
781 | END INTERFACE usm_check_data_output |
---|
782 | |
---|
783 | INTERFACE usm_check_parameters |
---|
784 | MODULE PROCEDURE usm_check_parameters |
---|
785 | END INTERFACE usm_check_parameters |
---|
786 | |
---|
787 | INTERFACE usm_data_output_3d |
---|
788 | MODULE PROCEDURE usm_data_output_3d |
---|
789 | END INTERFACE usm_data_output_3d |
---|
790 | |
---|
791 | INTERFACE usm_define_netcdf_grid |
---|
792 | MODULE PROCEDURE usm_define_netcdf_grid |
---|
793 | END INTERFACE usm_define_netcdf_grid |
---|
794 | |
---|
795 | INTERFACE usm_init_urban_surface |
---|
796 | MODULE PROCEDURE usm_init_urban_surface |
---|
797 | END INTERFACE usm_init_urban_surface |
---|
798 | |
---|
799 | INTERFACE usm_material_heat_model |
---|
800 | MODULE PROCEDURE usm_material_heat_model |
---|
801 | END INTERFACE usm_material_heat_model |
---|
802 | |
---|
803 | INTERFACE usm_green_heat_model |
---|
804 | MODULE PROCEDURE usm_green_heat_model |
---|
805 | END INTERFACE usm_green_heat_model |
---|
806 | |
---|
807 | INTERFACE usm_parin |
---|
808 | MODULE PROCEDURE usm_parin |
---|
809 | END INTERFACE usm_parin |
---|
810 | |
---|
811 | INTERFACE usm_temperature_near_surface |
---|
812 | MODULE PROCEDURE usm_temperature_near_surface |
---|
813 | END INTERFACE usm_temperature_near_surface |
---|
814 | |
---|
815 | INTERFACE usm_rrd_local |
---|
816 | MODULE PROCEDURE usm_rrd_local |
---|
817 | END INTERFACE usm_rrd_local |
---|
818 | |
---|
819 | INTERFACE usm_surface_energy_balance |
---|
820 | MODULE PROCEDURE usm_surface_energy_balance |
---|
821 | END INTERFACE usm_surface_energy_balance |
---|
822 | |
---|
823 | INTERFACE usm_swap_timelevel |
---|
824 | MODULE PROCEDURE usm_swap_timelevel |
---|
825 | END INTERFACE usm_swap_timelevel |
---|
826 | |
---|
827 | INTERFACE usm_wrd_local |
---|
828 | MODULE PROCEDURE usm_wrd_local |
---|
829 | END INTERFACE usm_wrd_local |
---|
830 | |
---|
831 | INTERFACE usm_allocate_surface |
---|
832 | MODULE PROCEDURE usm_allocate_surface |
---|
833 | END INTERFACE usm_allocate_surface |
---|
834 | |
---|
835 | INTERFACE usm_average_3d_data |
---|
836 | MODULE PROCEDURE usm_average_3d_data |
---|
837 | END INTERFACE usm_average_3d_data |
---|
838 | |
---|
839 | |
---|
840 | SAVE |
---|
841 | |
---|
842 | PRIVATE |
---|
843 | |
---|
844 | !-- Public functions |
---|
845 | PUBLIC usm_boundary_condition, usm_check_parameters, usm_init_urban_surface,& |
---|
846 | usm_rrd_local, & |
---|
847 | usm_surface_energy_balance, usm_material_heat_model, & |
---|
848 | usm_swap_timelevel, usm_check_data_output, usm_average_3d_data, & |
---|
849 | usm_data_output_3d, usm_define_netcdf_grid, usm_parin, & |
---|
850 | usm_wrd_local, usm_allocate_surface |
---|
851 | |
---|
852 | !-- Public parameters, constants and initial values |
---|
853 | PUBLIC usm_anthropogenic_heat, usm_material_model, & |
---|
854 | usm_green_heat_model, usm_temperature_near_surface |
---|
855 | |
---|
856 | |
---|
857 | |
---|
858 | CONTAINS |
---|
859 | |
---|
860 | !------------------------------------------------------------------------------! |
---|
861 | ! Description: |
---|
862 | ! ------------ |
---|
863 | !> This subroutine creates the necessary indices of the urban surfaces |
---|
864 | !> and plant canopy and it allocates the needed arrays for USM |
---|
865 | !------------------------------------------------------------------------------! |
---|
866 | SUBROUTINE usm_allocate_surface |
---|
867 | |
---|
868 | IMPLICIT NONE |
---|
869 | |
---|
870 | INTEGER(iwp) :: l |
---|
871 | |
---|
872 | ! |
---|
873 | !-- Allocate radiation arrays which are part of the new data type. |
---|
874 | !-- For horizontal surfaces. |
---|
875 | ALLOCATE( surf_usm_h%surfhf(1:surf_usm_h%ns) ) |
---|
876 | ALLOCATE( surf_usm_h%rad_net_l(1:surf_usm_h%ns) ) |
---|
877 | ! |
---|
878 | !-- For vertical surfaces |
---|
879 | DO l = 0, 3 |
---|
880 | ALLOCATE( surf_usm_v(l)%surfhf(1:surf_usm_v(l)%ns) ) |
---|
881 | ALLOCATE( surf_usm_v(l)%rad_net_l(1:surf_usm_v(l)%ns) ) |
---|
882 | ENDDO |
---|
883 | |
---|
884 | !-- Wall surface model |
---|
885 | !-- allocate arrays for wall surface model and define pointers |
---|
886 | |
---|
887 | !-- allocate array of wall types and wall parameters |
---|
888 | ALLOCATE ( surf_usm_h%surface_types(1:surf_usm_h%ns) ) |
---|
889 | DO l = 0, 3 |
---|
890 | ALLOCATE( surf_usm_v(l)%surface_types(1:surf_usm_v(l)%ns) ) |
---|
891 | ENDDO |
---|
892 | ! |
---|
893 | !-- Allocate albedo_type and albedo. Each surface element |
---|
894 | !-- has 3 values, 0: wall fraction, 1: green fraction, 2: window fraction. |
---|
895 | ALLOCATE( surf_usm_h%albedo_type(0:2,1:surf_usm_h%ns) ) |
---|
896 | ALLOCATE( surf_usm_h%albedo(0:2,1:surf_usm_h%ns) ) |
---|
897 | surf_usm_h%albedo_type = albedo_type |
---|
898 | DO l = 0, 3 |
---|
899 | ALLOCATE( surf_usm_v(l)%albedo_type(0:2,1:surf_usm_v(l)%ns) ) |
---|
900 | ALLOCATE( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns) ) |
---|
901 | surf_usm_v(l)%albedo_type = albedo_type |
---|
902 | ENDDO |
---|
903 | |
---|
904 | |
---|
905 | ! |
---|
906 | !-- Allocate indoor target temperature for summer and winter |
---|
907 | ALLOCATE( surf_usm_h%target_temp_summer(1:surf_usm_h%ns) ) |
---|
908 | ALLOCATE( surf_usm_h%target_temp_winter(1:surf_usm_h%ns) ) |
---|
909 | DO l = 0, 3 |
---|
910 | ALLOCATE( surf_usm_v(l)%target_temp_summer(1:surf_usm_v(l)%ns) ) |
---|
911 | ALLOCATE( surf_usm_v(l)%target_temp_winter(1:surf_usm_v(l)%ns) ) |
---|
912 | ENDDO |
---|
913 | ! |
---|
914 | !-- Allocate flag indicating ground floor level surface elements |
---|
915 | ALLOCATE ( surf_usm_h%ground_level(1:surf_usm_h%ns) ) |
---|
916 | DO l = 0, 3 |
---|
917 | ALLOCATE( surf_usm_v(l)%ground_level(1:surf_usm_v(l)%ns) ) |
---|
918 | ENDDO |
---|
919 | ! |
---|
920 | !-- Allocate arrays for relative surface fraction. |
---|
921 | !-- 0 - wall fraction, 1 - green fraction, 2 - window fraction |
---|
922 | ALLOCATE( surf_usm_h%frac(0:2,1:surf_usm_h%ns) ) |
---|
923 | surf_usm_h%frac = 0.0_wp |
---|
924 | DO l = 0, 3 |
---|
925 | ALLOCATE( surf_usm_v(l)%frac(0:2,1:surf_usm_v(l)%ns) ) |
---|
926 | surf_usm_v(l)%frac = 0.0_wp |
---|
927 | ENDDO |
---|
928 | |
---|
929 | !-- wall and roof surface parameters. First for horizontal surfaces |
---|
930 | ALLOCATE ( surf_usm_h%isroof_surf(1:surf_usm_h%ns) ) |
---|
931 | ALLOCATE ( surf_usm_h%lambda_surf(1:surf_usm_h%ns) ) |
---|
932 | ALLOCATE ( surf_usm_h%lambda_surf_window(1:surf_usm_h%ns) ) |
---|
933 | ALLOCATE ( surf_usm_h%lambda_surf_green(1:surf_usm_h%ns) ) |
---|
934 | ALLOCATE ( surf_usm_h%c_surface(1:surf_usm_h%ns) ) |
---|
935 | ALLOCATE ( surf_usm_h%c_surface_window(1:surf_usm_h%ns) ) |
---|
936 | ALLOCATE ( surf_usm_h%c_surface_green(1:surf_usm_h%ns) ) |
---|
937 | ALLOCATE ( surf_usm_h%transmissivity(1:surf_usm_h%ns) ) |
---|
938 | ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns) ) |
---|
939 | ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns) ) |
---|
940 | ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns) ) |
---|
941 | ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns) ) |
---|
942 | ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns) ) |
---|
943 | |
---|
944 | ! |
---|
945 | !-- For vertical surfaces. |
---|
946 | DO l = 0, 3 |
---|
947 | ALLOCATE ( surf_usm_v(l)%lambda_surf(1:surf_usm_v(l)%ns) ) |
---|
948 | ALLOCATE ( surf_usm_v(l)%c_surface(1:surf_usm_v(l)%ns) ) |
---|
949 | ALLOCATE ( surf_usm_v(l)%lambda_surf_window(1:surf_usm_v(l)%ns) ) |
---|
950 | ALLOCATE ( surf_usm_v(l)%c_surface_window(1:surf_usm_v(l)%ns) ) |
---|
951 | ALLOCATE ( surf_usm_v(l)%lambda_surf_green(1:surf_usm_v(l)%ns) ) |
---|
952 | ALLOCATE ( surf_usm_v(l)%c_surface_green(1:surf_usm_v(l)%ns) ) |
---|
953 | ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns) ) |
---|
954 | ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns) ) |
---|
955 | ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns) ) |
---|
956 | ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) |
---|
957 | ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) |
---|
958 | ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) |
---|
959 | ENDDO |
---|
960 | |
---|
961 | ! |
---|
962 | !-- allocate wall and roof material parameters. First for horizontal surfaces |
---|
963 | ALLOCATE ( surf_usm_h%thickness_wall(1:surf_usm_h%ns) ) |
---|
964 | ALLOCATE ( surf_usm_h%thickness_window(1:surf_usm_h%ns) ) |
---|
965 | ALLOCATE ( surf_usm_h%thickness_green(1:surf_usm_h%ns) ) |
---|
966 | ALLOCATE ( surf_usm_h%lambda_h(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
967 | ALLOCATE ( surf_usm_h%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
968 | ALLOCATE ( surf_usm_h%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
969 | ALLOCATE ( surf_usm_h%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
970 | ALLOCATE ( surf_usm_h%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
971 | ALLOCATE ( surf_usm_h%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
972 | |
---|
973 | ! |
---|
974 | !-- For vertical surfaces. |
---|
975 | DO l = 0, 3 |
---|
976 | ALLOCATE ( surf_usm_v(l)%thickness_wall(1:surf_usm_v(l)%ns) ) |
---|
977 | ALLOCATE ( surf_usm_v(l)%thickness_window(1:surf_usm_v(l)%ns) ) |
---|
978 | ALLOCATE ( surf_usm_v(l)%thickness_green(1:surf_usm_v(l)%ns) ) |
---|
979 | ALLOCATE ( surf_usm_v(l)%lambda_h(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
980 | ALLOCATE ( surf_usm_v(l)%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
981 | ALLOCATE ( surf_usm_v(l)%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
982 | ALLOCATE ( surf_usm_v(l)%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
983 | ALLOCATE ( surf_usm_v(l)%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
984 | ALLOCATE ( surf_usm_v(l)%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
985 | ENDDO |
---|
986 | |
---|
987 | !-- allocate wall and roof layers sizes. For horizontal surfaces. |
---|
988 | ALLOCATE ( zwn(nzb_wall:nzt_wall) ) |
---|
989 | ALLOCATE ( surf_usm_h%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
990 | ALLOCATE ( zwn_window(nzb_wall:nzt_wall) ) |
---|
991 | ALLOCATE ( surf_usm_h%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
992 | ALLOCATE ( zwn_green(nzb_wall:nzt_wall) ) |
---|
993 | ALLOCATE ( surf_usm_h%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
994 | ALLOCATE ( surf_usm_h%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
995 | ALLOCATE ( surf_usm_h%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
996 | ALLOCATE ( surf_usm_h%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
997 | ALLOCATE ( surf_usm_h%zw(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
998 | ALLOCATE ( surf_usm_h%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
999 | ALLOCATE ( surf_usm_h%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1000 | ALLOCATE ( surf_usm_h%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1001 | ALLOCATE ( surf_usm_h%zw_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1002 | ALLOCATE ( surf_usm_h%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1003 | ALLOCATE ( surf_usm_h%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1004 | ALLOCATE ( surf_usm_h%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1005 | ALLOCATE ( surf_usm_h%zw_green(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1006 | ! |
---|
1007 | !-- For vertical surfaces. |
---|
1008 | DO l = 0, 3 |
---|
1009 | ALLOCATE ( surf_usm_v(l)%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1010 | ALLOCATE ( surf_usm_v(l)%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1011 | ALLOCATE ( surf_usm_v(l)%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1012 | ALLOCATE ( surf_usm_v(l)%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1013 | ALLOCATE ( surf_usm_v(l)%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1014 | ALLOCATE ( surf_usm_v(l)%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1015 | ALLOCATE ( surf_usm_v(l)%zw(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1016 | ALLOCATE ( surf_usm_v(l)%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1017 | ALLOCATE ( surf_usm_v(l)%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1018 | ALLOCATE ( surf_usm_v(l)%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1019 | ALLOCATE ( surf_usm_v(l)%zw_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1020 | ALLOCATE ( surf_usm_v(l)%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1021 | ALLOCATE ( surf_usm_v(l)%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1022 | ALLOCATE ( surf_usm_v(l)%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1023 | ALLOCATE ( surf_usm_v(l)%zw_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1024 | ENDDO |
---|
1025 | |
---|
1026 | !-- allocate wall and roof temperature arrays, for horizontal walls |
---|
1027 | #if defined( __nopointer ) |
---|
1028 | IF ( .NOT. ALLOCATED( t_surf_h ) ) & |
---|
1029 | ALLOCATE ( t_surf_h(1:surf_usm_h%ns) ) |
---|
1030 | IF ( .NOT. ALLOCATED( t_surf_h_p ) ) & |
---|
1031 | ALLOCATE ( t_surf_h_p(1:surf_usm_h%ns) ) |
---|
1032 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
1033 | ALLOCATE ( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1034 | IF ( .NOT. ALLOCATED( t_wall_h_p ) ) & |
---|
1035 | ALLOCATE ( t_wall_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1036 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
1037 | ALLOCATE ( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
1038 | IF ( .NOT. ALLOCATED( t_surf_window_h_p ) ) & |
---|
1039 | ALLOCATE ( t_surf_window_h_p(1:surf_usm_h%ns) ) |
---|
1040 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
1041 | ALLOCATE ( t_window_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1042 | IF ( .NOT. ALLOCATED( t_window_h_p ) ) & |
---|
1043 | ALLOCATE ( t_window_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1044 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
1045 | ALLOCATE ( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
1046 | IF ( .NOT. ALLOCATED( t_surf_green_h_p ) ) & |
---|
1047 | ALLOCATE ( t_surf_green_h_p(1:surf_usm_h%ns) ) |
---|
1048 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
1049 | ALLOCATE ( t_green_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1050 | IF ( .NOT. ALLOCATED( t_green_h_p ) ) & |
---|
1051 | ALLOCATE ( t_green_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1052 | IF ( .NOT. ALLOCATED( t_surf_10cm_h ) ) & |
---|
1053 | ALLOCATE ( t_surf_10cm_h(1:surf_usm_h%ns) ) |
---|
1054 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_p ) ) & |
---|
1055 | ALLOCATE ( t_surf_10cm_h_p(1:surf_usm_h%ns) ) |
---|
1056 | #else |
---|
1057 | ! |
---|
1058 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1059 | !-- might be already allocated. |
---|
1060 | IF ( .NOT. ALLOCATED( t_surf_h_1 ) ) & |
---|
1061 | ALLOCATE ( t_surf_h_1(1:surf_usm_h%ns) ) |
---|
1062 | IF ( .NOT. ALLOCATED( t_surf_h_2 ) ) & |
---|
1063 | ALLOCATE ( t_surf_h_2(1:surf_usm_h%ns) ) |
---|
1064 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
1065 | ALLOCATE ( t_wall_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1066 | IF ( .NOT. ALLOCATED( t_wall_h_2 ) ) & |
---|
1067 | ALLOCATE ( t_wall_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1068 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
1069 | ALLOCATE ( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
1070 | IF ( .NOT. ALLOCATED( t_surf_window_h_2 ) ) & |
---|
1071 | ALLOCATE ( t_surf_window_h_2(1:surf_usm_h%ns) ) |
---|
1072 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
1073 | ALLOCATE ( t_window_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1074 | IF ( .NOT. ALLOCATED( t_window_h_2 ) ) & |
---|
1075 | ALLOCATE ( t_window_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1076 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
1077 | ALLOCATE ( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
1078 | IF ( .NOT. ALLOCATED( t_surf_green_h_2 ) ) & |
---|
1079 | ALLOCATE ( t_surf_green_h_2(1:surf_usm_h%ns) ) |
---|
1080 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
1081 | ALLOCATE ( t_green_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1082 | IF ( .NOT. ALLOCATED( t_green_h_2 ) ) & |
---|
1083 | ALLOCATE ( t_green_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1084 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_1 ) ) & |
---|
1085 | ALLOCATE ( t_surf_10cm_h_1(1:surf_usm_h%ns) ) |
---|
1086 | IF ( .NOT. ALLOCATED( t_surf_10cm_h_2 ) ) & |
---|
1087 | ALLOCATE ( t_surf_10cm_h_2(1:surf_usm_h%ns) ) |
---|
1088 | ! |
---|
1089 | !-- initial assignment of the pointers |
---|
1090 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
1091 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
1092 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
1093 | t_surf_h => t_surf_h_1; t_surf_h_p => t_surf_h_2 |
---|
1094 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
1095 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
1096 | t_surf_10cm_h => t_surf_10cm_h_1; t_surf_10cm_h_p => t_surf_10cm_h_2 |
---|
1097 | |
---|
1098 | #endif |
---|
1099 | |
---|
1100 | !-- allocate wall and roof temperature arrays, for vertical walls if required |
---|
1101 | #if defined( __nopointer ) |
---|
1102 | DO l = 0, 3 |
---|
1103 | IF ( .NOT. ALLOCATED( t_surf_v(l)%t ) ) & |
---|
1104 | ALLOCATE ( t_surf_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1105 | IF ( .NOT. ALLOCATED( t_surf_v_p(l)%t ) ) & |
---|
1106 | ALLOCATE ( t_surf_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1107 | IF ( .NOT. ALLOCATED( t_wall_v(l)%t ) ) & |
---|
1108 | ALLOCATE ( t_wall_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1109 | IF ( .NOT. ALLOCATED( t_wall_v_p(l)%t ) ) & |
---|
1110 | ALLOCATE ( t_wall_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1111 | IF ( .NOT. ALLOCATED( t_surf_window_v(l)%t ) ) & |
---|
1112 | ALLOCATE ( t_surf_window_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1113 | IF ( .NOT. ALLOCATED( t_surf_window_v_p(l)%t ) ) & |
---|
1114 | ALLOCATE ( t_surf_window_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1115 | IF ( .NOT. ALLOCATED( t_window_v(l)%t ) ) & |
---|
1116 | ALLOCATE ( t_window_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1117 | IF ( .NOT. ALLOCATED( t_window_v_p(l)%t ) ) & |
---|
1118 | ALLOCATE ( t_window_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1119 | IF ( .NOT. ALLOCATED( t_green_v(l)%t ) ) & |
---|
1120 | ALLOCATE ( t_green_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1121 | IF ( .NOT. ALLOCATED( t_green_v_p(l)%t ) ) & |
---|
1122 | ALLOCATE ( t_green_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1123 | IF ( .NOT. ALLOCATED( t_surf_green_v(l)%t ) ) & |
---|
1124 | ALLOCATE ( t_surf_green_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1125 | IF ( .NOT. ALLOCATED( t_surf_green_v_p(l)%t ) ) & |
---|
1126 | ALLOCATE ( t_surf_green_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1127 | IF ( .NOT. ALLOCATED( t_surf_10cm_v(l)%t ) ) & |
---|
1128 | ALLOCATE ( t_surf_10cm_v(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1129 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_p(l)%t ) ) & |
---|
1130 | ALLOCATE ( t_surf_10cm_v_p(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1131 | ENDDO |
---|
1132 | #else |
---|
1133 | ! |
---|
1134 | !-- Allocate if required. Note, in case of restarts, some of these arrays |
---|
1135 | !-- might be already allocated. |
---|
1136 | DO l = 0, 3 |
---|
1137 | IF ( .NOT. ALLOCATED( t_surf_v_1(l)%t ) ) & |
---|
1138 | ALLOCATE ( t_surf_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1139 | IF ( .NOT. ALLOCATED( t_surf_v_2(l)%t ) ) & |
---|
1140 | ALLOCATE ( t_surf_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1141 | IF ( .NOT. ALLOCATED( t_wall_v_1(l)%t ) ) & |
---|
1142 | ALLOCATE ( t_wall_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1143 | IF ( .NOT. ALLOCATED( t_wall_v_2(l)%t ) ) & |
---|
1144 | ALLOCATE ( t_wall_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1145 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(l)%t ) ) & |
---|
1146 | ALLOCATE ( t_surf_window_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1147 | IF ( .NOT. ALLOCATED( t_surf_window_v_2(l)%t ) ) & |
---|
1148 | ALLOCATE ( t_surf_window_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1149 | IF ( .NOT. ALLOCATED( t_window_v_1(l)%t ) ) & |
---|
1150 | ALLOCATE ( t_window_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1151 | IF ( .NOT. ALLOCATED( t_window_v_2(l)%t ) ) & |
---|
1152 | ALLOCATE ( t_window_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1153 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(l)%t ) ) & |
---|
1154 | ALLOCATE ( t_surf_green_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1155 | IF ( .NOT. ALLOCATED( t_surf_green_v_2(l)%t ) ) & |
---|
1156 | ALLOCATE ( t_surf_green_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1157 | IF ( .NOT. ALLOCATED( t_green_v_1(l)%t ) ) & |
---|
1158 | ALLOCATE ( t_green_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1159 | IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) ) & |
---|
1160 | ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1161 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_1(l)%t ) ) & |
---|
1162 | ALLOCATE ( t_surf_10cm_v_1(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1163 | IF ( .NOT. ALLOCATED( t_surf_10cm_v_2(l)%t ) ) & |
---|
1164 | ALLOCATE ( t_surf_10cm_v_2(l)%t(1:surf_usm_v(l)%ns) ) |
---|
1165 | ENDDO |
---|
1166 | ! |
---|
1167 | !-- initial assignment of the pointers |
---|
1168 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
1169 | t_surf_v => t_surf_v_1; t_surf_v_p => t_surf_v_2 |
---|
1170 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
1171 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
1172 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
1173 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
1174 | t_surf_10cm_v => t_surf_10cm_v_1; t_surf_10cm_v_p => t_surf_10cm_v_2 |
---|
1175 | |
---|
1176 | #endif |
---|
1177 | ! |
---|
1178 | !-- Allocate intermediate timestep arrays. For horizontal surfaces. |
---|
1179 | ALLOCATE ( surf_usm_h%tt_surface_m(1:surf_usm_h%ns) ) |
---|
1180 | ALLOCATE ( surf_usm_h%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1181 | ALLOCATE ( surf_usm_h%tt_surface_window_m(1:surf_usm_h%ns) ) |
---|
1182 | ALLOCATE ( surf_usm_h%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1183 | ALLOCATE ( surf_usm_h%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
1184 | ALLOCATE ( surf_usm_h%tt_surface_green_m(1:surf_usm_h%ns) ) |
---|
1185 | |
---|
1186 | ! |
---|
1187 | !-- Set inital values for prognostic quantities |
---|
1188 | IF ( ALLOCATED( surf_usm_h%tt_surface_m ) ) surf_usm_h%tt_surface_m = 0.0_wp |
---|
1189 | IF ( ALLOCATED( surf_usm_h%tt_wall_m ) ) surf_usm_h%tt_wall_m = 0.0_wp |
---|
1190 | IF ( ALLOCATED( surf_usm_h%tt_surface_window_m ) ) surf_usm_h%tt_surface_window_m = 0.0_wp |
---|
1191 | IF ( ALLOCATED( surf_usm_h%tt_window_m ) ) surf_usm_h%tt_window_m = 0.0_wp |
---|
1192 | IF ( ALLOCATED( surf_usm_h%tt_green_m ) ) surf_usm_h%tt_green_m = 0.0_wp |
---|
1193 | IF ( ALLOCATED( surf_usm_h%tt_surface_green_m ) ) surf_usm_h%tt_surface_green_m = 0.0_wp |
---|
1194 | ! |
---|
1195 | !-- Now, for vertical surfaces |
---|
1196 | DO l = 0, 3 |
---|
1197 | ALLOCATE ( surf_usm_v(l)%tt_surface_m(1:surf_usm_v(l)%ns) ) |
---|
1198 | ALLOCATE ( surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1199 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_m ) ) surf_usm_v(l)%tt_surface_m = 0.0_wp |
---|
1200 | IF ( ALLOCATED( surf_usm_v(l)%tt_wall_m ) ) surf_usm_v(l)%tt_wall_m = 0.0_wp |
---|
1201 | ALLOCATE ( surf_usm_v(l)%tt_surface_window_m(1:surf_usm_v(l)%ns) ) |
---|
1202 | ALLOCATE ( surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1203 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_window_m ) ) surf_usm_v(l)%tt_surface_window_m = 0.0_wp |
---|
1204 | IF ( ALLOCATED( surf_usm_v(l)%tt_window_m ) ) surf_usm_v(l)%tt_window_m = 0.0_wp |
---|
1205 | ALLOCATE ( surf_usm_v(l)%tt_surface_green_m(1:surf_usm_v(l)%ns) ) |
---|
1206 | IF ( ALLOCATED( surf_usm_v(l)%tt_surface_green_m ) ) surf_usm_v(l)%tt_surface_green_m = 0.0_wp |
---|
1207 | ALLOCATE ( surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) |
---|
1208 | IF ( ALLOCATED( surf_usm_v(l)%tt_green_m ) ) surf_usm_v(l)%tt_green_m = 0.0_wp |
---|
1209 | ENDDO |
---|
1210 | |
---|
1211 | !-- allocate wall heat flux output array and set initial values. For horizontal surfaces |
---|
1212 | ! ALLOCATE ( surf_usm_h%wshf(1:surf_usm_h%ns) ) !can be removed |
---|
1213 | ALLOCATE ( surf_usm_h%wshf_eb(1:surf_usm_h%ns) ) |
---|
1214 | ALLOCATE ( surf_usm_h%wghf_eb(1:surf_usm_h%ns) ) |
---|
1215 | ALLOCATE ( surf_usm_h%wghf_eb_window(1:surf_usm_h%ns) ) |
---|
1216 | ALLOCATE ( surf_usm_h%wghf_eb_green(1:surf_usm_h%ns) ) |
---|
1217 | ALLOCATE ( surf_usm_h%iwghf_eb(1:surf_usm_h%ns) ) |
---|
1218 | ALLOCATE ( surf_usm_h%iwghf_eb_window(1:surf_usm_h%ns) ) |
---|
1219 | IF ( ALLOCATED( surf_usm_h%wshf ) ) surf_usm_h%wshf = 0.0_wp |
---|
1220 | IF ( ALLOCATED( surf_usm_h%wshf_eb ) ) surf_usm_h%wshf_eb = 0.0_wp |
---|
1221 | IF ( ALLOCATED( surf_usm_h%wghf_eb ) ) surf_usm_h%wghf_eb = 0.0_wp |
---|
1222 | IF ( ALLOCATED( surf_usm_h%wghf_eb_window ) ) surf_usm_h%wghf_eb_window = 0.0_wp |
---|
1223 | IF ( ALLOCATED( surf_usm_h%wghf_eb_green ) ) surf_usm_h%wghf_eb_green = 0.0_wp |
---|
1224 | IF ( ALLOCATED( surf_usm_h%iwghf_eb ) ) surf_usm_h%iwghf_eb = 0.0_wp |
---|
1225 | IF ( ALLOCATED( surf_usm_h%iwghf_eb_window ) ) surf_usm_h%iwghf_eb_window = 0.0_wp |
---|
1226 | ! |
---|
1227 | !-- Now, for vertical surfaces |
---|
1228 | DO l = 0, 3 |
---|
1229 | ! ALLOCATE ( surf_usm_v(l)%wshf(1:surf_usm_v(l)%ns) ) ! can be removed |
---|
1230 | ALLOCATE ( surf_usm_v(l)%wshf_eb(1:surf_usm_v(l)%ns) ) |
---|
1231 | ALLOCATE ( surf_usm_v(l)%wghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1232 | ALLOCATE ( surf_usm_v(l)%wghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1233 | ALLOCATE ( surf_usm_v(l)%wghf_eb_green(1:surf_usm_v(l)%ns) ) |
---|
1234 | ALLOCATE ( surf_usm_v(l)%iwghf_eb(1:surf_usm_v(l)%ns) ) |
---|
1235 | ALLOCATE ( surf_usm_v(l)%iwghf_eb_window(1:surf_usm_v(l)%ns) ) |
---|
1236 | IF ( ALLOCATED( surf_usm_v(l)%wshf ) ) surf_usm_v(l)%wshf = 0.0_wp |
---|
1237 | IF ( ALLOCATED( surf_usm_v(l)%wshf_eb ) ) surf_usm_v(l)%wshf_eb = 0.0_wp |
---|
1238 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb ) ) surf_usm_v(l)%wghf_eb = 0.0_wp |
---|
1239 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_window ) ) surf_usm_v(l)%wghf_eb_window = 0.0_wp |
---|
1240 | IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_green ) ) surf_usm_v(l)%wghf_eb_green = 0.0_wp |
---|
1241 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb ) ) surf_usm_v(l)%iwghf_eb = 0.0_wp |
---|
1242 | IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) ) surf_usm_v(l)%iwghf_eb_window = 0.0_wp |
---|
1243 | ENDDO |
---|
1244 | |
---|
1245 | END SUBROUTINE usm_allocate_surface |
---|
1246 | |
---|
1247 | |
---|
1248 | !------------------------------------------------------------------------------! |
---|
1249 | ! Description: |
---|
1250 | ! ------------ |
---|
1251 | !> Sum up and time-average urban surface output quantities as well as allocate |
---|
1252 | !> the array necessary for storing the average. |
---|
1253 | !------------------------------------------------------------------------------! |
---|
1254 | SUBROUTINE usm_average_3d_data( mode, variable ) |
---|
1255 | |
---|
1256 | IMPLICIT NONE |
---|
1257 | |
---|
1258 | CHARACTER (len=*), INTENT(IN) :: mode |
---|
1259 | CHARACTER (len=*), INTENT(IN) :: variable |
---|
1260 | |
---|
1261 | INTEGER(iwp) :: i, j, k, l, m, ids, idsint, iwl, istat |
---|
1262 | CHARACTER (len=varnamelength) :: var, surfid |
---|
1263 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
1264 | CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
1265 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
1266 | |
---|
1267 | !-- find the real name of the variable |
---|
1268 | ids = -1 |
---|
1269 | var = TRIM(variable) |
---|
1270 | DO i = 0, nd-1 |
---|
1271 | k = len(TRIM(var)) |
---|
1272 | j = len(TRIM(dirname(i))) |
---|
1273 | IF ( var(k-j+1:k) == dirname(i) ) THEN |
---|
1274 | ids = i |
---|
1275 | idsint = dirint(ids) |
---|
1276 | var = var(:k-j) |
---|
1277 | EXIT |
---|
1278 | ENDIF |
---|
1279 | ENDDO |
---|
1280 | IF ( ids == -1 ) THEN |
---|
1281 | var = TRIM(variable) |
---|
1282 | ENDIF |
---|
1283 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
1284 | !-- wall layers |
---|
1285 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
1286 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1287 | var = var(1:10) |
---|
1288 | ELSE |
---|
1289 | !-- wrong wall layer index |
---|
1290 | RETURN |
---|
1291 | ENDIF |
---|
1292 | ENDIF |
---|
1293 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
1294 | !-- wall layers |
---|
1295 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
1296 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1297 | var = var(1:12) |
---|
1298 | ELSE |
---|
1299 | !-- wrong window layer index |
---|
1300 | RETURN |
---|
1301 | ENDIF |
---|
1302 | ENDIF |
---|
1303 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
1304 | !-- wall layers |
---|
1305 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
1306 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
1307 | var = var(1:11) |
---|
1308 | ELSE |
---|
1309 | !-- wrong green layer index |
---|
1310 | RETURN |
---|
1311 | ENDIF |
---|
1312 | ENDIF |
---|
1313 | |
---|
1314 | IF ( mode == 'allocate' ) THEN |
---|
1315 | |
---|
1316 | SELECT CASE ( TRIM( var ) ) |
---|
1317 | |
---|
1318 | CASE ( 'usm_rad_net' ) |
---|
1319 | !-- array of complete radiation balance |
---|
1320 | IF ( .NOT. ALLOCATED(surf_usm_h%rad_net_av) ) THEN |
---|
1321 | ALLOCATE( surf_usm_h%rad_net_av(1:surf_usm_h%ns) ) |
---|
1322 | surf_usm_h%rad_net_av = 0.0_wp |
---|
1323 | ENDIF |
---|
1324 | DO l = 0, 3 |
---|
1325 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%rad_net_av) ) THEN |
---|
1326 | ALLOCATE( surf_usm_v(l)%rad_net_av(1:surf_usm_v(l)%ns) ) |
---|
1327 | surf_usm_v(l)%rad_net_av = 0.0_wp |
---|
1328 | ENDIF |
---|
1329 | ENDDO |
---|
1330 | |
---|
1331 | CASE ( 'usm_rad_insw' ) |
---|
1332 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1333 | IF ( .NOT. ALLOCATED(surfinsw_av) ) THEN |
---|
1334 | ALLOCATE( surfinsw_av(nsurfl) ) |
---|
1335 | surfinsw_av = 0.0_wp |
---|
1336 | ENDIF |
---|
1337 | |
---|
1338 | CASE ( 'usm_rad_inlw' ) |
---|
1339 | !-- array of lw radiation falling to surface after i-th reflection |
---|
1340 | IF ( .NOT. ALLOCATED(surfinlw_av) ) THEN |
---|
1341 | ALLOCATE( surfinlw_av(nsurfl) ) |
---|
1342 | surfinlw_av = 0.0_wp |
---|
1343 | ENDIF |
---|
1344 | |
---|
1345 | CASE ( 'usm_rad_inswdir' ) |
---|
1346 | !-- array of direct sw radiation falling to surface from sun |
---|
1347 | IF ( .NOT. ALLOCATED(surfinswdir_av) ) THEN |
---|
1348 | ALLOCATE( surfinswdir_av(nsurfl) ) |
---|
1349 | surfinswdir_av = 0.0_wp |
---|
1350 | ENDIF |
---|
1351 | |
---|
1352 | CASE ( 'usm_rad_inswdif' ) |
---|
1353 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
1354 | IF ( .NOT. ALLOCATED(surfinswdif_av) ) THEN |
---|
1355 | ALLOCATE( surfinswdif_av(nsurfl) ) |
---|
1356 | surfinswdif_av = 0.0_wp |
---|
1357 | ENDIF |
---|
1358 | |
---|
1359 | CASE ( 'usm_rad_inswref' ) |
---|
1360 | !-- array of sw radiation falling to surface from reflections |
---|
1361 | IF ( .NOT. ALLOCATED(surfinswref_av) ) THEN |
---|
1362 | ALLOCATE( surfinswref_av(nsurfl) ) |
---|
1363 | surfinswref_av = 0.0_wp |
---|
1364 | ENDIF |
---|
1365 | |
---|
1366 | CASE ( 'usm_rad_inlwdif' ) |
---|
1367 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1368 | IF ( .NOT. ALLOCATED(surfinlwdif_av) ) THEN |
---|
1369 | ALLOCATE( surfinlwdif_av(nsurfl) ) |
---|
1370 | surfinlwdif_av = 0.0_wp |
---|
1371 | ENDIF |
---|
1372 | |
---|
1373 | CASE ( 'usm_rad_inlwref' ) |
---|
1374 | !-- array of lw radiation falling to surface from reflections |
---|
1375 | IF ( .NOT. ALLOCATED(surfinlwref_av) ) THEN |
---|
1376 | ALLOCATE( surfinlwref_av(nsurfl) ) |
---|
1377 | surfinlwref_av = 0.0_wp |
---|
1378 | ENDIF |
---|
1379 | |
---|
1380 | CASE ( 'usm_rad_outsw' ) |
---|
1381 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
1382 | IF ( .NOT. ALLOCATED(surfoutsw_av) ) THEN |
---|
1383 | ALLOCATE( surfoutsw_av(nsurfl) ) |
---|
1384 | surfoutsw_av = 0.0_wp |
---|
1385 | ENDIF |
---|
1386 | |
---|
1387 | CASE ( 'usm_rad_outlw' ) |
---|
1388 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
1389 | IF ( .NOT. ALLOCATED(surfoutlw_av) ) THEN |
---|
1390 | ALLOCATE( surfoutlw_av(nsurfl) ) |
---|
1391 | surfoutlw_av = 0.0_wp |
---|
1392 | ENDIF |
---|
1393 | CASE ( 'usm_rad_ressw' ) |
---|
1394 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
1395 | IF ( .NOT. ALLOCATED(surfins_av) ) THEN |
---|
1396 | ALLOCATE( surfins_av(nsurfl) ) |
---|
1397 | surfins_av = 0.0_wp |
---|
1398 | ENDIF |
---|
1399 | |
---|
1400 | CASE ( 'usm_rad_reslw' ) |
---|
1401 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
1402 | IF ( .NOT. ALLOCATED(surfinl_av) ) THEN |
---|
1403 | ALLOCATE( surfinl_av(nsurfl) ) |
---|
1404 | surfinl_av = 0.0_wp |
---|
1405 | ENDIF |
---|
1406 | |
---|
1407 | CASE ( 'usm_rad_hf' ) |
---|
1408 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
1409 | IF ( .NOT. ALLOCATED(surf_usm_h%surfhf_av) ) THEN |
---|
1410 | ALLOCATE( surf_usm_h%surfhf_av(1:surf_usm_h%ns) ) |
---|
1411 | surf_usm_h%surfhf_av = 0.0_wp |
---|
1412 | ENDIF |
---|
1413 | DO l = 0, 3 |
---|
1414 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%surfhf_av) ) THEN |
---|
1415 | ALLOCATE( surf_usm_v(l)%surfhf_av(1:surf_usm_v(l)%ns) ) |
---|
1416 | surf_usm_v(l)%surfhf_av = 0.0_wp |
---|
1417 | ENDIF |
---|
1418 | ENDDO |
---|
1419 | |
---|
1420 | CASE ( 'usm_wshf' ) |
---|
1421 | !-- array of sensible heat flux from surfaces |
---|
1422 | !-- land surfaces |
---|
1423 | IF ( .NOT. ALLOCATED(surf_usm_h%wshf_eb_av) ) THEN |
---|
1424 | ALLOCATE( surf_usm_h%wshf_eb_av(1:surf_usm_h%ns) ) |
---|
1425 | surf_usm_h%wshf_eb_av = 0.0_wp |
---|
1426 | ENDIF |
---|
1427 | DO l = 0, 3 |
---|
1428 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wshf_eb_av) ) THEN |
---|
1429 | ALLOCATE( surf_usm_v(l)%wshf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1430 | surf_usm_v(l)%wshf_eb_av = 0.0_wp |
---|
1431 | ENDIF |
---|
1432 | ENDDO |
---|
1433 | ! |
---|
1434 | !-- Please note, the following output quantities belongs to the |
---|
1435 | !-- individual tile fractions - ground heat flux at wall-, window-, |
---|
1436 | !-- and green fraction. Aggregated ground-heat flux is treated |
---|
1437 | !-- accordingly in average_3d_data, sum_up_3d_data, etc.. |
---|
1438 | CASE ( 'usm_wghf' ) |
---|
1439 | !-- array of heat flux from ground (wall, roof, land) |
---|
1440 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_av) ) THEN |
---|
1441 | ALLOCATE( surf_usm_h%wghf_eb_av(1:surf_usm_h%ns) ) |
---|
1442 | surf_usm_h%wghf_eb_av = 0.0_wp |
---|
1443 | ENDIF |
---|
1444 | DO l = 0, 3 |
---|
1445 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_av) ) THEN |
---|
1446 | ALLOCATE( surf_usm_v(l)%wghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1447 | surf_usm_v(l)%wghf_eb_av = 0.0_wp |
---|
1448 | ENDIF |
---|
1449 | ENDDO |
---|
1450 | |
---|
1451 | CASE ( 'usm_wghf_window' ) |
---|
1452 | !-- array of heat flux from window ground (wall, roof, land) |
---|
1453 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_window_av) ) THEN |
---|
1454 | ALLOCATE( surf_usm_h%wghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
1455 | surf_usm_h%wghf_eb_window_av = 0.0_wp |
---|
1456 | ENDIF |
---|
1457 | DO l = 0, 3 |
---|
1458 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_window_av) ) THEN |
---|
1459 | ALLOCATE( surf_usm_v(l)%wghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
1460 | surf_usm_v(l)%wghf_eb_window_av = 0.0_wp |
---|
1461 | ENDIF |
---|
1462 | ENDDO |
---|
1463 | |
---|
1464 | CASE ( 'usm_wghf_green' ) |
---|
1465 | !-- array of heat flux from green ground (wall, roof, land) |
---|
1466 | IF ( .NOT. ALLOCATED(surf_usm_h%wghf_eb_green_av) ) THEN |
---|
1467 | ALLOCATE( surf_usm_h%wghf_eb_green_av(1:surf_usm_h%ns) ) |
---|
1468 | surf_usm_h%wghf_eb_green_av = 0.0_wp |
---|
1469 | ENDIF |
---|
1470 | DO l = 0, 3 |
---|
1471 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%wghf_eb_green_av) ) THEN |
---|
1472 | ALLOCATE( surf_usm_v(l)%wghf_eb_green_av(1:surf_usm_v(l)%ns) ) |
---|
1473 | surf_usm_v(l)%wghf_eb_green_av = 0.0_wp |
---|
1474 | ENDIF |
---|
1475 | ENDDO |
---|
1476 | |
---|
1477 | CASE ( 'usm_iwghf' ) |
---|
1478 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
1479 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_av) ) THEN |
---|
1480 | ALLOCATE( surf_usm_h%iwghf_eb_av(1:surf_usm_h%ns) ) |
---|
1481 | surf_usm_h%iwghf_eb_av = 0.0_wp |
---|
1482 | ENDIF |
---|
1483 | DO l = 0, 3 |
---|
1484 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_av) ) THEN |
---|
1485 | ALLOCATE( surf_usm_v(l)%iwghf_eb_av(1:surf_usm_v(l)%ns) ) |
---|
1486 | surf_usm_v(l)%iwghf_eb_av = 0.0_wp |
---|
1487 | ENDIF |
---|
1488 | ENDDO |
---|
1489 | |
---|
1490 | CASE ( 'usm_iwghf_window' ) |
---|
1491 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
1492 | IF ( .NOT. ALLOCATED(surf_usm_h%iwghf_eb_window_av) ) THEN |
---|
1493 | ALLOCATE( surf_usm_h%iwghf_eb_window_av(1:surf_usm_h%ns) ) |
---|
1494 | surf_usm_h%iwghf_eb_window_av = 0.0_wp |
---|
1495 | ENDIF |
---|
1496 | DO l = 0, 3 |
---|
1497 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%iwghf_eb_window_av) ) THEN |
---|
1498 | ALLOCATE( surf_usm_v(l)%iwghf_eb_window_av(1:surf_usm_v(l)%ns) ) |
---|
1499 | surf_usm_v(l)%iwghf_eb_window_av = 0.0_wp |
---|
1500 | ENDIF |
---|
1501 | ENDDO |
---|
1502 | |
---|
1503 | CASE ( 'usm_t_surf' ) |
---|
1504 | !-- surface temperature for surfaces |
---|
1505 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_av) ) THEN |
---|
1506 | ALLOCATE( surf_usm_h%t_surf_av(1:surf_usm_h%ns) ) |
---|
1507 | surf_usm_h%t_surf_av = 0.0_wp |
---|
1508 | ENDIF |
---|
1509 | DO l = 0, 3 |
---|
1510 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_av) ) THEN |
---|
1511 | ALLOCATE( surf_usm_v(l)%t_surf_av(1:surf_usm_v(l)%ns) ) |
---|
1512 | surf_usm_v(l)%t_surf_av = 0.0_wp |
---|
1513 | ENDIF |
---|
1514 | ENDDO |
---|
1515 | |
---|
1516 | CASE ( 'usm_t_surf_window' ) |
---|
1517 | !-- surface temperature for window surfaces |
---|
1518 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_window_av) ) THEN |
---|
1519 | ALLOCATE( surf_usm_h%t_surf_window_av(1:surf_usm_h%ns) ) |
---|
1520 | surf_usm_h%t_surf_window_av = 0.0_wp |
---|
1521 | ENDIF |
---|
1522 | DO l = 0, 3 |
---|
1523 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_window_av) ) THEN |
---|
1524 | ALLOCATE( surf_usm_v(l)%t_surf_window_av(1:surf_usm_v(l)%ns) ) |
---|
1525 | surf_usm_v(l)%t_surf_window_av = 0.0_wp |
---|
1526 | ENDIF |
---|
1527 | ENDDO |
---|
1528 | |
---|
1529 | CASE ( 'usm_t_surf_green' ) |
---|
1530 | !-- surface temperature for green surfaces |
---|
1531 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_green_av) ) THEN |
---|
1532 | ALLOCATE( surf_usm_h%t_surf_green_av(1:surf_usm_h%ns) ) |
---|
1533 | surf_usm_h%t_surf_green_av = 0.0_wp |
---|
1534 | ENDIF |
---|
1535 | DO l = 0, 3 |
---|
1536 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_green_av) ) THEN |
---|
1537 | ALLOCATE( surf_usm_v(l)%t_surf_green_av(1:surf_usm_v(l)%ns) ) |
---|
1538 | surf_usm_v(l)%t_surf_green_av = 0.0_wp |
---|
1539 | ENDIF |
---|
1540 | ENDDO |
---|
1541 | |
---|
1542 | CASE ( 'usm_t_surf_10cm' ) |
---|
1543 | !-- near surface temperature for whole surfaces |
---|
1544 | IF ( .NOT. ALLOCATED(surf_usm_h%t_surf_10cm_av) ) THEN |
---|
1545 | ALLOCATE( surf_usm_h%t_surf_10cm_av(1:surf_usm_h%ns) ) |
---|
1546 | surf_usm_h%t_surf_10cm_av = 0.0_wp |
---|
1547 | ENDIF |
---|
1548 | DO l = 0, 3 |
---|
1549 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_surf_10cm_av) ) THEN |
---|
1550 | ALLOCATE( surf_usm_v(l)%t_surf_10cm_av(1:surf_usm_v(l)%ns) ) |
---|
1551 | surf_usm_v(l)%t_surf_10cm_av = 0.0_wp |
---|
1552 | ENDIF |
---|
1553 | ENDDO |
---|
1554 | |
---|
1555 | CASE ( 'usm_t_wall' ) |
---|
1556 | !-- wall temperature for iwl layer of walls and land |
---|
1557 | IF ( .NOT. ALLOCATED(surf_usm_h%t_wall_av) ) THEN |
---|
1558 | ALLOCATE( surf_usm_h%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1559 | surf_usm_h%t_wall_av = 0.0_wp |
---|
1560 | ENDIF |
---|
1561 | DO l = 0, 3 |
---|
1562 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_wall_av) ) THEN |
---|
1563 | ALLOCATE( surf_usm_v(l)%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1564 | surf_usm_v(l)%t_wall_av = 0.0_wp |
---|
1565 | ENDIF |
---|
1566 | ENDDO |
---|
1567 | |
---|
1568 | CASE ( 'usm_t_window' ) |
---|
1569 | !-- window temperature for iwl layer of walls and land |
---|
1570 | IF ( .NOT. ALLOCATED(surf_usm_h%t_window_av) ) THEN |
---|
1571 | ALLOCATE( surf_usm_h%t_window_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1572 | surf_usm_h%t_window_av = 0.0_wp |
---|
1573 | ENDIF |
---|
1574 | DO l = 0, 3 |
---|
1575 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_window_av) ) THEN |
---|
1576 | ALLOCATE( surf_usm_v(l)%t_window_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1577 | surf_usm_v(l)%t_window_av = 0.0_wp |
---|
1578 | ENDIF |
---|
1579 | ENDDO |
---|
1580 | |
---|
1581 | CASE ( 'usm_t_green' ) |
---|
1582 | !-- green temperature for iwl layer of walls and land |
---|
1583 | IF ( .NOT. ALLOCATED(surf_usm_h%t_green_av) ) THEN |
---|
1584 | ALLOCATE( surf_usm_h%t_green_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) ) |
---|
1585 | surf_usm_h%t_green_av = 0.0_wp |
---|
1586 | ENDIF |
---|
1587 | DO l = 0, 3 |
---|
1588 | IF ( .NOT. ALLOCATED(surf_usm_v(l)%t_green_av) ) THEN |
---|
1589 | ALLOCATE( surf_usm_v(l)%t_green_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) ) |
---|
1590 | surf_usm_v(l)%t_green_av = 0.0_wp |
---|
1591 | ENDIF |
---|
1592 | ENDDO |
---|
1593 | |
---|
1594 | CASE DEFAULT |
---|
1595 | CONTINUE |
---|
1596 | |
---|
1597 | END SELECT |
---|
1598 | |
---|
1599 | ELSEIF ( mode == 'sum' ) THEN |
---|
1600 | |
---|
1601 | SELECT CASE ( TRIM( var ) ) |
---|
1602 | |
---|
1603 | CASE ( 'usm_rad_net' ) |
---|
1604 | !-- array of complete radiation balance |
---|
1605 | DO m = 1, surf_usm_h%ns |
---|
1606 | surf_usm_h%rad_net_av(m) = & |
---|
1607 | surf_usm_h%rad_net_av(m) + & |
---|
1608 | surf_usm_h%rad_net_l(m) |
---|
1609 | ENDDO |
---|
1610 | DO l = 0, 3 |
---|
1611 | DO m = 1, surf_usm_v(l)%ns |
---|
1612 | surf_usm_v(l)%rad_net_av(m) = & |
---|
1613 | surf_usm_v(l)%rad_net_av(m) + & |
---|
1614 | surf_usm_v(l)%rad_net_l(m) |
---|
1615 | ENDDO |
---|
1616 | ENDDO |
---|
1617 | |
---|
1618 | CASE ( 'usm_rad_insw' ) |
---|
1619 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1620 | DO l = 1, nsurfl |
---|
1621 | IF ( surfl(id,l) == idsint ) THEN |
---|
1622 | surfinsw_av(l) = surfinsw_av(l) + surfinsw(l) |
---|
1623 | ENDIF |
---|
1624 | ENDDO |
---|
1625 | |
---|
1626 | CASE ( 'usm_rad_inlw' ) |
---|
1627 | !-- array of lw radiation falling to surface after i-th reflection |
---|
1628 | DO l = 1, nsurfl |
---|
1629 | IF ( surfl(id,l) == idsint ) THEN |
---|
1630 | surfinlw_av(l) = surfinlw_av(l) + surfinlw(l) |
---|
1631 | ENDIF |
---|
1632 | ENDDO |
---|
1633 | |
---|
1634 | CASE ( 'usm_rad_inswdir' ) |
---|
1635 | !-- array of direct sw radiation falling to surface from sun |
---|
1636 | DO l = 1, nsurfl |
---|
1637 | IF ( surfl(id,l) == idsint ) THEN |
---|
1638 | surfinswdir_av(l) = surfinswdir_av(l) + surfinswdir(l) |
---|
1639 | ENDIF |
---|
1640 | ENDDO |
---|
1641 | |
---|
1642 | CASE ( 'usm_rad_inswdif' ) |
---|
1643 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
1644 | DO l = 1, nsurfl |
---|
1645 | IF ( surfl(id,l) == idsint ) THEN |
---|
1646 | surfinswdif_av(l) = surfinswdif_av(l) + surfinswdif(l) |
---|
1647 | ENDIF |
---|
1648 | ENDDO |
---|
1649 | |
---|
1650 | CASE ( 'usm_rad_inswref' ) |
---|
1651 | !-- array of sw radiation falling to surface from reflections |
---|
1652 | DO l = 1, nsurfl |
---|
1653 | IF ( surfl(id,l) == idsint ) THEN |
---|
1654 | surfinswref_av(l) = surfinswref_av(l) + surfinsw(l) - & |
---|
1655 | surfinswdir(l) - surfinswdif(l) |
---|
1656 | ENDIF |
---|
1657 | ENDDO |
---|
1658 | |
---|
1659 | |
---|
1660 | CASE ( 'usm_rad_inlwdif' ) |
---|
1661 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1662 | DO l = 1, nsurfl |
---|
1663 | IF ( surfl(id,l) == idsint ) THEN |
---|
1664 | surfinlwdif_av(l) = surfinlwdif_av(l) + surfinlwdif(l) |
---|
1665 | ENDIF |
---|
1666 | ENDDO |
---|
1667 | ! |
---|
1668 | CASE ( 'usm_rad_inlwref' ) |
---|
1669 | !-- array of lw radiation falling to surface from reflections |
---|
1670 | DO l = 1, nsurfl |
---|
1671 | IF ( surfl(id,l) == idsint ) THEN |
---|
1672 | surfinlwref_av(l) = surfinlwref_av(l) + & |
---|
1673 | surfinlw(l) - surfinlwdif(l) |
---|
1674 | ENDIF |
---|
1675 | ENDDO |
---|
1676 | |
---|
1677 | CASE ( 'usm_rad_outsw' ) |
---|
1678 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
1679 | DO l = 1, nsurfl |
---|
1680 | IF ( surfl(id,l) == idsint ) THEN |
---|
1681 | surfoutsw_av(l) = surfoutsw_av(l) + surfoutsw(l) |
---|
1682 | ENDIF |
---|
1683 | ENDDO |
---|
1684 | |
---|
1685 | CASE ( 'usm_rad_outlw' ) |
---|
1686 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
1687 | DO l = 1, nsurfl |
---|
1688 | IF ( surfl(id,l) == idsint ) THEN |
---|
1689 | surfoutlw_av(l) = surfoutlw_av(l) + surfoutlw(l) |
---|
1690 | ENDIF |
---|
1691 | ENDDO |
---|
1692 | |
---|
1693 | CASE ( 'usm_rad_ressw' ) |
---|
1694 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
1695 | DO l = 1, nsurfl |
---|
1696 | IF ( surfl(id,l) == idsint ) THEN |
---|
1697 | surfins_av(l) = surfins_av(l) + surfins(l) |
---|
1698 | ENDIF |
---|
1699 | ENDDO |
---|
1700 | |
---|
1701 | CASE ( 'usm_rad_reslw' ) |
---|
1702 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
1703 | DO l = 1, nsurfl |
---|
1704 | IF ( surfl(id,l) == idsint ) THEN |
---|
1705 | surfinl_av(l) = surfinl_av(l) + surfinl(l) |
---|
1706 | ENDIF |
---|
1707 | ENDDO |
---|
1708 | |
---|
1709 | CASE ( 'usm_rad_hf' ) |
---|
1710 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
1711 | DO m = 1, surf_usm_h%ns |
---|
1712 | surf_usm_h%surfhf_av(m) = & |
---|
1713 | surf_usm_h%surfhf_av(m) + & |
---|
1714 | surf_usm_h%surfhf(m) |
---|
1715 | ENDDO |
---|
1716 | DO l = 0, 3 |
---|
1717 | DO m = 1, surf_usm_v(l)%ns |
---|
1718 | surf_usm_v(l)%surfhf_av(m) = & |
---|
1719 | surf_usm_v(l)%surfhf_av(m) + & |
---|
1720 | surf_usm_v(l)%surfhf(m) |
---|
1721 | ENDDO |
---|
1722 | ENDDO |
---|
1723 | |
---|
1724 | CASE ( 'usm_wshf' ) |
---|
1725 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
1726 | DO m = 1, surf_usm_h%ns |
---|
1727 | surf_usm_h%wshf_eb_av(m) = & |
---|
1728 | surf_usm_h%wshf_eb_av(m) + & |
---|
1729 | surf_usm_h%wshf_eb(m) |
---|
1730 | ENDDO |
---|
1731 | DO l = 0, 3 |
---|
1732 | DO m = 1, surf_usm_v(l)%ns |
---|
1733 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
1734 | surf_usm_v(l)%wshf_eb_av(m) + & |
---|
1735 | surf_usm_v(l)%wshf_eb(m) |
---|
1736 | ENDDO |
---|
1737 | ENDDO |
---|
1738 | |
---|
1739 | CASE ( 'usm_wghf' ) |
---|
1740 | !-- array of heat flux from ground (wall, roof, land) |
---|
1741 | DO m = 1, surf_usm_h%ns |
---|
1742 | surf_usm_h%wghf_eb_av(m) = & |
---|
1743 | surf_usm_h%wghf_eb_av(m) + & |
---|
1744 | surf_usm_h%wghf_eb(m) |
---|
1745 | ENDDO |
---|
1746 | DO l = 0, 3 |
---|
1747 | DO m = 1, surf_usm_v(l)%ns |
---|
1748 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
1749 | surf_usm_v(l)%wghf_eb_av(m) + & |
---|
1750 | surf_usm_v(l)%wghf_eb(m) |
---|
1751 | ENDDO |
---|
1752 | ENDDO |
---|
1753 | |
---|
1754 | CASE ( 'usm_wghf_window' ) |
---|
1755 | !-- array of heat flux from window ground (wall, roof, land) |
---|
1756 | DO m = 1, surf_usm_h%ns |
---|
1757 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
1758 | surf_usm_h%wghf_eb_window_av(m) + & |
---|
1759 | surf_usm_h%wghf_eb_window(m) |
---|
1760 | ENDDO |
---|
1761 | DO l = 0, 3 |
---|
1762 | DO m = 1, surf_usm_v(l)%ns |
---|
1763 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
1764 | surf_usm_v(l)%wghf_eb_window_av(m) + & |
---|
1765 | surf_usm_v(l)%wghf_eb_window(m) |
---|
1766 | ENDDO |
---|
1767 | ENDDO |
---|
1768 | |
---|
1769 | CASE ( 'usm_wghf_green' ) |
---|
1770 | !-- array of heat flux from green ground (wall, roof, land) |
---|
1771 | DO m = 1, surf_usm_h%ns |
---|
1772 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
1773 | surf_usm_h%wghf_eb_green_av(m) + & |
---|
1774 | surf_usm_h%wghf_eb_green(m) |
---|
1775 | ENDDO |
---|
1776 | DO l = 0, 3 |
---|
1777 | DO m = 1, surf_usm_v(l)%ns |
---|
1778 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
1779 | surf_usm_v(l)%wghf_eb_green_av(m) + & |
---|
1780 | surf_usm_v(l)%wghf_eb_green(m) |
---|
1781 | ENDDO |
---|
1782 | ENDDO |
---|
1783 | |
---|
1784 | CASE ( 'usm_iwghf' ) |
---|
1785 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
1786 | DO m = 1, surf_usm_h%ns |
---|
1787 | surf_usm_h%iwghf_eb_av(m) = & |
---|
1788 | surf_usm_h%iwghf_eb_av(m) + & |
---|
1789 | surf_usm_h%iwghf_eb(m) |
---|
1790 | ENDDO |
---|
1791 | DO l = 0, 3 |
---|
1792 | DO m = 1, surf_usm_v(l)%ns |
---|
1793 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
1794 | surf_usm_v(l)%iwghf_eb_av(m) + & |
---|
1795 | surf_usm_v(l)%iwghf_eb(m) |
---|
1796 | ENDDO |
---|
1797 | ENDDO |
---|
1798 | |
---|
1799 | CASE ( 'usm_iwghf_window' ) |
---|
1800 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
1801 | DO m = 1, surf_usm_h%ns |
---|
1802 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
1803 | surf_usm_h%iwghf_eb_window_av(m) + & |
---|
1804 | surf_usm_h%iwghf_eb_window(m) |
---|
1805 | ENDDO |
---|
1806 | DO l = 0, 3 |
---|
1807 | DO m = 1, surf_usm_v(l)%ns |
---|
1808 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
1809 | surf_usm_v(l)%iwghf_eb_window_av(m) + & |
---|
1810 | surf_usm_v(l)%iwghf_eb_window(m) |
---|
1811 | ENDDO |
---|
1812 | ENDDO |
---|
1813 | |
---|
1814 | CASE ( 'usm_t_surf' ) |
---|
1815 | !-- surface temperature for surfaces |
---|
1816 | DO m = 1, surf_usm_h%ns |
---|
1817 | surf_usm_h%t_surf_av(m) = & |
---|
1818 | surf_usm_h%t_surf_av(m) + & |
---|
1819 | t_surf_h(m) |
---|
1820 | ENDDO |
---|
1821 | DO l = 0, 3 |
---|
1822 | DO m = 1, surf_usm_v(l)%ns |
---|
1823 | surf_usm_v(l)%t_surf_av(m) = & |
---|
1824 | surf_usm_v(l)%t_surf_av(m) + & |
---|
1825 | t_surf_v(l)%t(m) |
---|
1826 | ENDDO |
---|
1827 | ENDDO |
---|
1828 | |
---|
1829 | CASE ( 'usm_t_surf_window' ) |
---|
1830 | !-- surface temperature for window surfaces |
---|
1831 | DO m = 1, surf_usm_h%ns |
---|
1832 | surf_usm_h%t_surf_window_av(m) = & |
---|
1833 | surf_usm_h%t_surf_window_av(m) + & |
---|
1834 | t_surf_window_h(m) |
---|
1835 | ENDDO |
---|
1836 | DO l = 0, 3 |
---|
1837 | DO m = 1, surf_usm_v(l)%ns |
---|
1838 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
1839 | surf_usm_v(l)%t_surf_window_av(m) + & |
---|
1840 | t_surf_window_v(l)%t(m) |
---|
1841 | ENDDO |
---|
1842 | ENDDO |
---|
1843 | |
---|
1844 | CASE ( 'usm_t_surf_green' ) |
---|
1845 | !-- surface temperature for green surfaces |
---|
1846 | DO m = 1, surf_usm_h%ns |
---|
1847 | surf_usm_h%t_surf_green_av(m) = & |
---|
1848 | surf_usm_h%t_surf_green_av(m) + & |
---|
1849 | t_surf_green_h(m) |
---|
1850 | ENDDO |
---|
1851 | DO l = 0, 3 |
---|
1852 | DO m = 1, surf_usm_v(l)%ns |
---|
1853 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
1854 | surf_usm_v(l)%t_surf_green_av(m) + & |
---|
1855 | t_surf_green_v(l)%t(m) |
---|
1856 | ENDDO |
---|
1857 | ENDDO |
---|
1858 | |
---|
1859 | CASE ( 'usm_t_surf_10cm' ) |
---|
1860 | !-- near surface temperature for whole surfaces |
---|
1861 | DO m = 1, surf_usm_h%ns |
---|
1862 | surf_usm_h%t_surf_10cm_av(m) = & |
---|
1863 | surf_usm_h%t_surf_10cm_av(m) + & |
---|
1864 | t_surf_10cm_h(m) |
---|
1865 | ENDDO |
---|
1866 | DO l = 0, 3 |
---|
1867 | DO m = 1, surf_usm_v(l)%ns |
---|
1868 | surf_usm_v(l)%t_surf_10cm_av(m) = & |
---|
1869 | surf_usm_v(l)%t_surf_10cm_av(m) + & |
---|
1870 | t_surf_10cm_v(l)%t(m) |
---|
1871 | ENDDO |
---|
1872 | ENDDO |
---|
1873 | |
---|
1874 | |
---|
1875 | CASE ( 'usm_t_wall' ) |
---|
1876 | !-- wall temperature for iwl layer of walls and land |
---|
1877 | DO m = 1, surf_usm_h%ns |
---|
1878 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
1879 | surf_usm_h%t_wall_av(iwl,m) + & |
---|
1880 | t_wall_h(iwl,m) |
---|
1881 | ENDDO |
---|
1882 | DO l = 0, 3 |
---|
1883 | DO m = 1, surf_usm_v(l)%ns |
---|
1884 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
1885 | surf_usm_v(l)%t_wall_av(iwl,m) + & |
---|
1886 | t_wall_v(l)%t(iwl,m) |
---|
1887 | ENDDO |
---|
1888 | ENDDO |
---|
1889 | |
---|
1890 | CASE ( 'usm_t_window' ) |
---|
1891 | !-- window temperature for iwl layer of walls and land |
---|
1892 | DO m = 1, surf_usm_h%ns |
---|
1893 | surf_usm_h%t_window_av(iwl,m) = & |
---|
1894 | surf_usm_h%t_window_av(iwl,m) + & |
---|
1895 | t_window_h(iwl,m) |
---|
1896 | ENDDO |
---|
1897 | DO l = 0, 3 |
---|
1898 | DO m = 1, surf_usm_v(l)%ns |
---|
1899 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
1900 | surf_usm_v(l)%t_window_av(iwl,m) + & |
---|
1901 | t_window_v(l)%t(iwl,m) |
---|
1902 | ENDDO |
---|
1903 | ENDDO |
---|
1904 | |
---|
1905 | CASE ( 'usm_t_green' ) |
---|
1906 | !-- green temperature for iwl layer of walls and land |
---|
1907 | DO m = 1, surf_usm_h%ns |
---|
1908 | surf_usm_h%t_green_av(iwl,m) = & |
---|
1909 | surf_usm_h%t_green_av(iwl,m) + & |
---|
1910 | t_green_h(iwl,m) |
---|
1911 | ENDDO |
---|
1912 | DO l = 0, 3 |
---|
1913 | DO m = 1, surf_usm_v(l)%ns |
---|
1914 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
1915 | surf_usm_v(l)%t_green_av(iwl,m) + & |
---|
1916 | t_green_v(l)%t(iwl,m) |
---|
1917 | ENDDO |
---|
1918 | ENDDO |
---|
1919 | |
---|
1920 | CASE DEFAULT |
---|
1921 | CONTINUE |
---|
1922 | |
---|
1923 | END SELECT |
---|
1924 | |
---|
1925 | ELSEIF ( mode == 'average' ) THEN |
---|
1926 | |
---|
1927 | SELECT CASE ( TRIM( var ) ) |
---|
1928 | |
---|
1929 | CASE ( 'usm_rad_net' ) |
---|
1930 | !-- array of complete radiation balance |
---|
1931 | DO m = 1, surf_usm_h%ns |
---|
1932 | surf_usm_h%rad_net_av(m) = & |
---|
1933 | surf_usm_h%rad_net_av(m) / & |
---|
1934 | REAL( average_count_3d, kind=wp ) |
---|
1935 | ENDDO |
---|
1936 | DO l = 0, 3 |
---|
1937 | DO m = 1, surf_usm_v(l)%ns |
---|
1938 | surf_usm_v(l)%rad_net_av(m) = & |
---|
1939 | surf_usm_v(l)%rad_net_av(m) / & |
---|
1940 | REAL( average_count_3d, kind=wp ) |
---|
1941 | ENDDO |
---|
1942 | ENDDO |
---|
1943 | |
---|
1944 | CASE ( 'usm_rad_insw' ) |
---|
1945 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1946 | DO l = 1, nsurfl |
---|
1947 | IF ( surfl(id,l) == idsint ) THEN |
---|
1948 | surfinsw_av(l) = surfinsw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
1949 | ENDIF |
---|
1950 | ENDDO |
---|
1951 | |
---|
1952 | CASE ( 'usm_rad_inlw' ) |
---|
1953 | !-- array of lw radiation falling to surface after i-th reflection |
---|
1954 | DO l = 1, nsurfl |
---|
1955 | IF ( surfl(id,l) == idsint ) THEN |
---|
1956 | surfinlw_av(l) = surfinlw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
1957 | ENDIF |
---|
1958 | ENDDO |
---|
1959 | |
---|
1960 | CASE ( 'usm_rad_inswdir' ) |
---|
1961 | !-- array of direct sw radiation falling to surface from sun |
---|
1962 | DO l = 1, nsurfl |
---|
1963 | IF ( surfl(id,l) == idsint ) THEN |
---|
1964 | surfinswdir_av(l) = surfinswdir_av(l) / REAL( average_count_3d, kind=wp ) |
---|
1965 | ENDIF |
---|
1966 | ENDDO |
---|
1967 | |
---|
1968 | CASE ( 'usm_rad_inswdif' ) |
---|
1969 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
1970 | DO l = 1, nsurfl |
---|
1971 | IF ( surfl(id,l) == idsint ) THEN |
---|
1972 | surfinswdif_av(l) = surfinswdif_av(l) / REAL( average_count_3d, kind=wp ) |
---|
1973 | ENDIF |
---|
1974 | ENDDO |
---|
1975 | |
---|
1976 | CASE ( 'usm_rad_inswref' ) |
---|
1977 | !-- array of sw radiation falling to surface from reflections |
---|
1978 | DO l = 1, nsurfl |
---|
1979 | IF ( surfl(id,l) == idsint ) THEN |
---|
1980 | surfinswref_av(l) = surfinswref_av(l) / REAL( average_count_3d, kind=wp ) |
---|
1981 | ENDIF |
---|
1982 | ENDDO |
---|
1983 | |
---|
1984 | CASE ( 'usm_rad_inlwdif' ) |
---|
1985 | !-- array of sw radiation falling to surface after i-th reflection |
---|
1986 | DO l = 1, nsurfl |
---|
1987 | IF ( surfl(id,l) == idsint ) THEN |
---|
1988 | surfinlwdif_av(l) = surfinlwdif_av(l) / REAL( average_count_3d, kind=wp ) |
---|
1989 | ENDIF |
---|
1990 | ENDDO |
---|
1991 | |
---|
1992 | CASE ( 'usm_rad_inlwref' ) |
---|
1993 | !-- array of lw radiation falling to surface from reflections |
---|
1994 | DO l = 1, nsurfl |
---|
1995 | IF ( surfl(id,l) == idsint ) THEN |
---|
1996 | surfinlwref_av(l) = surfinlwref_av(l) / REAL( average_count_3d, kind=wp ) |
---|
1997 | ENDIF |
---|
1998 | ENDDO |
---|
1999 | |
---|
2000 | CASE ( 'usm_rad_outsw' ) |
---|
2001 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
2002 | DO l = 1, nsurfl |
---|
2003 | IF ( surfl(id,l) == idsint ) THEN |
---|
2004 | surfoutsw_av(l) = surfoutsw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2005 | ENDIF |
---|
2006 | ENDDO |
---|
2007 | |
---|
2008 | CASE ( 'usm_rad_outlw' ) |
---|
2009 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
2010 | DO l = 1, nsurfl |
---|
2011 | IF ( surfl(id,l) == idsint ) THEN |
---|
2012 | surfoutlw_av(l) = surfoutlw_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2013 | ENDIF |
---|
2014 | ENDDO |
---|
2015 | |
---|
2016 | CASE ( 'usm_rad_ressw' ) |
---|
2017 | !-- array of residua of sw radiation absorbed in surface after last reflection |
---|
2018 | DO l = 1, nsurfl |
---|
2019 | IF ( surfl(id,l) == idsint ) THEN |
---|
2020 | surfins_av(l) = surfins_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2021 | ENDIF |
---|
2022 | ENDDO |
---|
2023 | |
---|
2024 | CASE ( 'usm_rad_reslw' ) |
---|
2025 | !-- array of residua of lw radiation absorbed in surface after last reflection |
---|
2026 | DO l = 1, nsurfl |
---|
2027 | IF ( surfl(id,l) == idsint ) THEN |
---|
2028 | surfinl_av(l) = surfinl_av(l) / REAL( average_count_3d, kind=wp ) |
---|
2029 | ENDIF |
---|
2030 | ENDDO |
---|
2031 | |
---|
2032 | CASE ( 'usm_rad_hf' ) |
---|
2033 | !-- array of heat flux from radiation for surfaces after i-th reflection |
---|
2034 | DO m = 1, surf_usm_h%ns |
---|
2035 | surf_usm_h%surfhf_av(m) = & |
---|
2036 | surf_usm_h%surfhf_av(m) / & |
---|
2037 | REAL( average_count_3d, kind=wp ) |
---|
2038 | ENDDO |
---|
2039 | DO l = 0, 3 |
---|
2040 | DO m = 1, surf_usm_v(l)%ns |
---|
2041 | surf_usm_v(l)%surfhf_av(m) = & |
---|
2042 | surf_usm_v(l)%surfhf_av(m) / & |
---|
2043 | REAL( average_count_3d, kind=wp ) |
---|
2044 | ENDDO |
---|
2045 | ENDDO |
---|
2046 | |
---|
2047 | CASE ( 'usm_wshf' ) |
---|
2048 | !-- array of sensible heat flux from surfaces (land, roof, wall) |
---|
2049 | DO m = 1, surf_usm_h%ns |
---|
2050 | surf_usm_h%wshf_eb_av(m) = & |
---|
2051 | surf_usm_h%wshf_eb_av(m) / & |
---|
2052 | REAL( average_count_3d, kind=wp ) |
---|
2053 | ENDDO |
---|
2054 | DO l = 0, 3 |
---|
2055 | DO m = 1, surf_usm_v(l)%ns |
---|
2056 | surf_usm_v(l)%wshf_eb_av(m) = & |
---|
2057 | surf_usm_v(l)%wshf_eb_av(m) / & |
---|
2058 | REAL( average_count_3d, kind=wp ) |
---|
2059 | ENDDO |
---|
2060 | ENDDO |
---|
2061 | |
---|
2062 | CASE ( 'usm_wghf' ) |
---|
2063 | !-- array of heat flux from ground (wall, roof, land) |
---|
2064 | DO m = 1, surf_usm_h%ns |
---|
2065 | surf_usm_h%wghf_eb_av(m) = & |
---|
2066 | surf_usm_h%wghf_eb_av(m) / & |
---|
2067 | REAL( average_count_3d, kind=wp ) |
---|
2068 | ENDDO |
---|
2069 | DO l = 0, 3 |
---|
2070 | DO m = 1, surf_usm_v(l)%ns |
---|
2071 | surf_usm_v(l)%wghf_eb_av(m) = & |
---|
2072 | surf_usm_v(l)%wghf_eb_av(m) / & |
---|
2073 | REAL( average_count_3d, kind=wp ) |
---|
2074 | ENDDO |
---|
2075 | ENDDO |
---|
2076 | |
---|
2077 | CASE ( 'usm_wghf_window' ) |
---|
2078 | !-- array of heat flux from window ground (wall, roof, land) |
---|
2079 | DO m = 1, surf_usm_h%ns |
---|
2080 | surf_usm_h%wghf_eb_window_av(m) = & |
---|
2081 | surf_usm_h%wghf_eb_window_av(m) / & |
---|
2082 | REAL( average_count_3d, kind=wp ) |
---|
2083 | ENDDO |
---|
2084 | DO l = 0, 3 |
---|
2085 | DO m = 1, surf_usm_v(l)%ns |
---|
2086 | surf_usm_v(l)%wghf_eb_window_av(m) = & |
---|
2087 | surf_usm_v(l)%wghf_eb_window_av(m) / & |
---|
2088 | REAL( average_count_3d, kind=wp ) |
---|
2089 | ENDDO |
---|
2090 | ENDDO |
---|
2091 | |
---|
2092 | CASE ( 'usm_wghf_green' ) |
---|
2093 | !-- array of heat flux from green ground (wall, roof, land) |
---|
2094 | DO m = 1, surf_usm_h%ns |
---|
2095 | surf_usm_h%wghf_eb_green_av(m) = & |
---|
2096 | surf_usm_h%wghf_eb_green_av(m) / & |
---|
2097 | REAL( average_count_3d, kind=wp ) |
---|
2098 | ENDDO |
---|
2099 | DO l = 0, 3 |
---|
2100 | DO m = 1, surf_usm_v(l)%ns |
---|
2101 | surf_usm_v(l)%wghf_eb_green_av(m) = & |
---|
2102 | surf_usm_v(l)%wghf_eb_green_av(m) / & |
---|
2103 | REAL( average_count_3d, kind=wp ) |
---|
2104 | ENDDO |
---|
2105 | ENDDO |
---|
2106 | |
---|
2107 | CASE ( 'usm_iwghf' ) |
---|
2108 | !-- array of heat flux from indoor ground (wall, roof, land) |
---|
2109 | DO m = 1, surf_usm_h%ns |
---|
2110 | surf_usm_h%iwghf_eb_av(m) = & |
---|
2111 | surf_usm_h%iwghf_eb_av(m) / & |
---|
2112 | REAL( average_count_3d, kind=wp ) |
---|
2113 | ENDDO |
---|
2114 | DO l = 0, 3 |
---|
2115 | DO m = 1, surf_usm_v(l)%ns |
---|
2116 | surf_usm_v(l)%iwghf_eb_av(m) = & |
---|
2117 | surf_usm_v(l)%iwghf_eb_av(m) / & |
---|
2118 | REAL( average_count_3d, kind=wp ) |
---|
2119 | ENDDO |
---|
2120 | ENDDO |
---|
2121 | |
---|
2122 | CASE ( 'usm_iwghf_window' ) |
---|
2123 | !-- array of heat flux from indoor window ground (wall, roof, land) |
---|
2124 | DO m = 1, surf_usm_h%ns |
---|
2125 | surf_usm_h%iwghf_eb_window_av(m) = & |
---|
2126 | surf_usm_h%iwghf_eb_window_av(m) / & |
---|
2127 | REAL( average_count_3d, kind=wp ) |
---|
2128 | ENDDO |
---|
2129 | DO l = 0, 3 |
---|
2130 | DO m = 1, surf_usm_v(l)%ns |
---|
2131 | surf_usm_v(l)%iwghf_eb_window_av(m) = & |
---|
2132 | surf_usm_v(l)%iwghf_eb_window_av(m) / & |
---|
2133 | REAL( average_count_3d, kind=wp ) |
---|
2134 | ENDDO |
---|
2135 | ENDDO |
---|
2136 | |
---|
2137 | CASE ( 'usm_t_surf' ) |
---|
2138 | !-- surface temperature for surfaces |
---|
2139 | DO m = 1, surf_usm_h%ns |
---|
2140 | surf_usm_h%t_surf_av(m) = & |
---|
2141 | surf_usm_h%t_surf_av(m) / & |
---|
2142 | REAL( average_count_3d, kind=wp ) |
---|
2143 | ENDDO |
---|
2144 | DO l = 0, 3 |
---|
2145 | DO m = 1, surf_usm_v(l)%ns |
---|
2146 | surf_usm_v(l)%t_surf_av(m) = & |
---|
2147 | surf_usm_v(l)%t_surf_av(m) / & |
---|
2148 | REAL( average_count_3d, kind=wp ) |
---|
2149 | ENDDO |
---|
2150 | ENDDO |
---|
2151 | |
---|
2152 | CASE ( 'usm_t_surf_window' ) |
---|
2153 | !-- surface temperature for window surfaces |
---|
2154 | DO m = 1, surf_usm_h%ns |
---|
2155 | surf_usm_h%t_surf_window_av(m) = & |
---|
2156 | surf_usm_h%t_surf_window_av(m) / & |
---|
2157 | REAL( average_count_3d, kind=wp ) |
---|
2158 | ENDDO |
---|
2159 | DO l = 0, 3 |
---|
2160 | DO m = 1, surf_usm_v(l)%ns |
---|
2161 | surf_usm_v(l)%t_surf_window_av(m) = & |
---|
2162 | surf_usm_v(l)%t_surf_window_av(m) / & |
---|
2163 | REAL( average_count_3d, kind=wp ) |
---|
2164 | ENDDO |
---|
2165 | ENDDO |
---|
2166 | |
---|
2167 | CASE ( 'usm_t_surf_green' ) |
---|
2168 | !-- surface temperature for green surfaces |
---|
2169 | DO m = 1, surf_usm_h%ns |
---|
2170 | surf_usm_h%t_surf_green_av(m) = & |
---|
2171 | surf_usm_h%t_surf_green_av(m) / & |
---|
2172 | REAL( average_count_3d, kind=wp ) |
---|
2173 | ENDDO |
---|
2174 | DO l = 0, 3 |
---|
2175 | DO m = 1, surf_usm_v(l)%ns |
---|
2176 | surf_usm_v(l)%t_surf_green_av(m) = & |
---|
2177 | surf_usm_v(l)%t_surf_green_av(m) / & |
---|
2178 | REAL( average_count_3d, kind=wp ) |
---|
2179 | ENDDO |
---|
2180 | ENDDO |
---|
2181 | |
---|
2182 | CASE ( 'usm_t_surf_10cm' ) |
---|
2183 | !-- near surface temperature for whole surfaces |
---|
2184 | DO m = 1, surf_usm_h%ns |
---|
2185 | surf_usm_h%t_surf_10cm_av(m) = & |
---|
2186 | surf_usm_h%t_surf_10cm_av(m) / & |
---|
2187 | REAL( average_count_3d, kind=wp ) |
---|
2188 | ENDDO |
---|
2189 | DO l = 0, 3 |
---|
2190 | DO m = 1, surf_usm_v(l)%ns |
---|
2191 | surf_usm_v(l)%t_surf_10cm_av(m) = & |
---|
2192 | surf_usm_v(l)%t_surf_10cm_av(m) / & |
---|
2193 | REAL( average_count_3d, kind=wp ) |
---|
2194 | ENDDO |
---|
2195 | ENDDO |
---|
2196 | |
---|
2197 | CASE ( 'usm_t_wall' ) |
---|
2198 | !-- wall temperature for iwl layer of walls and land |
---|
2199 | DO m = 1, surf_usm_h%ns |
---|
2200 | surf_usm_h%t_wall_av(iwl,m) = & |
---|
2201 | surf_usm_h%t_wall_av(iwl,m) / & |
---|
2202 | REAL( average_count_3d, kind=wp ) |
---|
2203 | ENDDO |
---|
2204 | DO l = 0, 3 |
---|
2205 | DO m = 1, surf_usm_v(l)%ns |
---|
2206 | surf_usm_v(l)%t_wall_av(iwl,m) = & |
---|
2207 | surf_usm_v(l)%t_wall_av(iwl,m) / & |
---|
2208 | REAL( average_count_3d, kind=wp ) |
---|
2209 | ENDDO |
---|
2210 | ENDDO |
---|
2211 | |
---|
2212 | CASE ( 'usm_t_window' ) |
---|
2213 | !-- window temperature for iwl layer of walls and land |
---|
2214 | DO m = 1, surf_usm_h%ns |
---|
2215 | surf_usm_h%t_window_av(iwl,m) = & |
---|
2216 | surf_usm_h%t_window_av(iwl,m) / & |
---|
2217 | REAL( average_count_3d, kind=wp ) |
---|
2218 | ENDDO |
---|
2219 | DO l = 0, 3 |
---|
2220 | DO m = 1, surf_usm_v(l)%ns |
---|
2221 | surf_usm_v(l)%t_window_av(iwl,m) = & |
---|
2222 | surf_usm_v(l)%t_window_av(iwl,m) / & |
---|
2223 | REAL( average_count_3d, kind=wp ) |
---|
2224 | ENDDO |
---|
2225 | ENDDO |
---|
2226 | |
---|
2227 | CASE ( 'usm_t_green' ) |
---|
2228 | !-- green temperature for iwl layer of walls and land |
---|
2229 | DO m = 1, surf_usm_h%ns |
---|
2230 | surf_usm_h%t_green_av(iwl,m) = & |
---|
2231 | surf_usm_h%t_green_av(iwl,m) / & |
---|
2232 | REAL( average_count_3d, kind=wp ) |
---|
2233 | ENDDO |
---|
2234 | DO l = 0, 3 |
---|
2235 | DO m = 1, surf_usm_v(l)%ns |
---|
2236 | surf_usm_v(l)%t_green_av(iwl,m) = & |
---|
2237 | surf_usm_v(l)%t_green_av(iwl,m) / & |
---|
2238 | REAL( average_count_3d, kind=wp ) |
---|
2239 | ENDDO |
---|
2240 | ENDDO |
---|
2241 | |
---|
2242 | |
---|
2243 | END SELECT |
---|
2244 | |
---|
2245 | ENDIF |
---|
2246 | |
---|
2247 | END SUBROUTINE usm_average_3d_data |
---|
2248 | |
---|
2249 | |
---|
2250 | |
---|
2251 | !------------------------------------------------------------------------------! |
---|
2252 | ! Description: |
---|
2253 | ! ------------ |
---|
2254 | !> Set internal Neumann boundary condition at outer soil grid points |
---|
2255 | !> for temperature and humidity. |
---|
2256 | !------------------------------------------------------------------------------! |
---|
2257 | SUBROUTINE usm_boundary_condition |
---|
2258 | |
---|
2259 | IMPLICIT NONE |
---|
2260 | |
---|
2261 | INTEGER(iwp) :: i !< grid index x-direction |
---|
2262 | INTEGER(iwp) :: ioff !< offset index x-direction indicating location of soil grid point |
---|
2263 | INTEGER(iwp) :: j !< grid index y-direction |
---|
2264 | INTEGER(iwp) :: joff !< offset index x-direction indicating location of soil grid point |
---|
2265 | INTEGER(iwp) :: k !< grid index z-direction |
---|
2266 | INTEGER(iwp) :: koff !< offset index x-direction indicating location of soil grid point |
---|
2267 | INTEGER(iwp) :: l !< running index surface-orientation |
---|
2268 | INTEGER(iwp) :: m !< running index surface elements |
---|
2269 | |
---|
2270 | koff = surf_usm_h%koff |
---|
2271 | DO m = 1, surf_usm_h%ns |
---|
2272 | i = surf_usm_h%i(m) |
---|
2273 | j = surf_usm_h%j(m) |
---|
2274 | k = surf_usm_h%k(m) |
---|
2275 | pt(k+koff,j,i) = pt(k,j,i) |
---|
2276 | ENDDO |
---|
2277 | |
---|
2278 | DO l = 0, 3 |
---|
2279 | ioff = surf_usm_v(l)%ioff |
---|
2280 | joff = surf_usm_v(l)%joff |
---|
2281 | DO m = 1, surf_usm_v(l)%ns |
---|
2282 | i = surf_usm_v(l)%i(m) |
---|
2283 | j = surf_usm_v(l)%j(m) |
---|
2284 | k = surf_usm_v(l)%k(m) |
---|
2285 | pt(k,j+joff,i+ioff) = pt(k,j,i) |
---|
2286 | ENDDO |
---|
2287 | ENDDO |
---|
2288 | |
---|
2289 | END SUBROUTINE usm_boundary_condition |
---|
2290 | |
---|
2291 | |
---|
2292 | !------------------------------------------------------------------------------! |
---|
2293 | ! |
---|
2294 | ! Description: |
---|
2295 | ! ------------ |
---|
2296 | !> Subroutine checks variables and assigns units. |
---|
2297 | !> It is called out from subroutine check_parameters. |
---|
2298 | !------------------------------------------------------------------------------! |
---|
2299 | SUBROUTINE usm_check_data_output( variable, unit ) |
---|
2300 | |
---|
2301 | IMPLICIT NONE |
---|
2302 | |
---|
2303 | CHARACTER (len=*),INTENT(IN) :: variable !: |
---|
2304 | CHARACTER (len=*),INTENT(OUT) :: unit !: |
---|
2305 | |
---|
2306 | CHARACTER (len=varnamelength) :: var |
---|
2307 | |
---|
2308 | var = TRIM(variable) |
---|
2309 | IF ( var(1:12) == 'usm_rad_net_' .OR. var(1:13) == 'usm_rad_insw_' .OR. & |
---|
2310 | var(1:13) == 'usm_rad_inlw_' .OR. var(1:16) == 'usm_rad_inswdir_' .OR. & |
---|
2311 | var(1:16) == 'usm_rad_inswdif_' .OR. var(1:16) == 'usm_rad_inswref_' .OR. & |
---|
2312 | var(1:16) == 'usm_rad_inlwdif_' .OR. var(1:16) == 'usm_rad_inlwref_' .OR. & |
---|
2313 | var(1:14) == 'usm_rad_outsw_' .OR. var(1:14) == 'usm_rad_outlw_' .OR. & |
---|
2314 | var(1:14) == 'usm_rad_ressw_' .OR. var(1:14) == 'usm_rad_reslw_' .OR. & |
---|
2315 | var(1:11) == 'usm_rad_hf_' .OR. & |
---|
2316 | var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
2317 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
2318 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' ) THEN |
---|
2319 | unit = 'W/m2' |
---|
2320 | ELSE IF ( var(1:10) == 'usm_t_surf' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
2321 | var(1:12) == 'usm_t_window' .OR. var(1:17) == 'usm_t_surf_window' .OR. & |
---|
2322 | var(1:16) == 'usm_t_surf_green' .OR. & |
---|
2323 | var(1:11) == 'usm_t_green' .OR. & |
---|
2324 | var(1:15) == 'usm_t_surf_10cm') THEN |
---|
2325 | unit = 'K' |
---|
2326 | ELSE IF ( var(1:9) == 'usm_surfz' .OR. var(1:7) == 'usm_svf' .OR. & |
---|
2327 | var(1:7) == 'usm_dif' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
2328 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
2329 | var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' ) THEN |
---|
2330 | unit = '1' |
---|
2331 | ELSE |
---|
2332 | unit = 'illegal' |
---|
2333 | ENDIF |
---|
2334 | |
---|
2335 | END SUBROUTINE usm_check_data_output |
---|
2336 | |
---|
2337 | |
---|
2338 | !------------------------------------------------------------------------------! |
---|
2339 | ! Description: |
---|
2340 | ! ------------ |
---|
2341 | !> Check parameters routine for urban surface model |
---|
2342 | !------------------------------------------------------------------------------! |
---|
2343 | SUBROUTINE usm_check_parameters |
---|
2344 | |
---|
2345 | USE control_parameters, & |
---|
2346 | ONLY: bc_pt_b, bc_q_b, constant_flux_layer, large_scale_forcing, & |
---|
2347 | lsf_surf, topography |
---|
2348 | |
---|
2349 | ! |
---|
2350 | !-- Dirichlet boundary conditions are required as the surface fluxes are |
---|
2351 | !-- calculated from the temperature/humidity gradients in the urban surface |
---|
2352 | !-- model |
---|
2353 | IF ( bc_pt_b == 'neumann' .OR. bc_q_b == 'neumann' ) THEN |
---|
2354 | message_string = 'urban surface model requires setting of '// & |
---|
2355 | 'bc_pt_b = "dirichlet" and '// & |
---|
2356 | 'bc_q_b = "dirichlet"' |
---|
2357 | CALL message( 'usm_check_parameters', 'PA0590', 1, 2, 0, 6, 0 ) |
---|
2358 | ENDIF |
---|
2359 | |
---|
2360 | IF ( .NOT. constant_flux_layer ) THEN |
---|
2361 | message_string = 'urban surface model requires '// & |
---|
2362 | 'constant_flux_layer = .T.' |
---|
2363 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
2364 | ENDIF |
---|
2365 | |
---|
2366 | IF ( .NOT. radiation ) THEN |
---|
2367 | message_string = 'urban surface model requires '// & |
---|
2368 | 'the radiation model to be switched on' |
---|
2369 | CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 ) |
---|
2370 | ENDIF |
---|
2371 | ! |
---|
2372 | !-- Surface forcing has to be disabled for LSF in case of enabled |
---|
2373 | !-- urban surface module |
---|
2374 | IF ( large_scale_forcing ) THEN |
---|
2375 | lsf_surf = .FALSE. |
---|
2376 | ENDIF |
---|
2377 | ! |
---|
2378 | !-- Topography |
---|
2379 | IF ( topography == 'flat' ) THEN |
---|
2380 | message_string = 'topography /= "flat" is required '// & |
---|
2381 | 'when using the urban surface model' |
---|
2382 | CALL message( 'check_parameters', 'PA0592', 1, 2, 0, 6, 0 ) |
---|
2383 | ENDIF |
---|
2384 | ! |
---|
2385 | !-- naheatlayers |
---|
2386 | IF ( naheatlayers > nzt ) THEN |
---|
2387 | message_string = 'number of anthropogenic heat layers '// & |
---|
2388 | '"naheatlayers" can not be larger than'// & |
---|
2389 | ' number of domain layers "nzt"' |
---|
2390 | CALL message( 'check_parameters', 'PA0593', 1, 2, 0, 6, 0 ) |
---|
2391 | ENDIF |
---|
2392 | |
---|
2393 | END SUBROUTINE usm_check_parameters |
---|
2394 | |
---|
2395 | |
---|
2396 | !------------------------------------------------------------------------------! |
---|
2397 | ! |
---|
2398 | ! Description: |
---|
2399 | ! ------------ |
---|
2400 | !> Output of the 3D-arrays in netCDF and/or AVS format |
---|
2401 | !> for variables of urban_surface model. |
---|
2402 | !> It resorts the urban surface module output quantities from surf style |
---|
2403 | !> indexing into temporary 3D array with indices (i,j,k). |
---|
2404 | !> It is called from subroutine data_output_3d. |
---|
2405 | !------------------------------------------------------------------------------! |
---|
2406 | SUBROUTINE usm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) |
---|
2407 | |
---|
2408 | IMPLICIT NONE |
---|
2409 | |
---|
2410 | INTEGER(iwp), INTENT(IN) :: av !< |
---|
2411 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
2412 | INTEGER(iwp), INTENT(IN) :: nzb_do !< lower limit of the data output (usually 0) |
---|
2413 | INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) |
---|
2414 | LOGICAL, INTENT(OUT) :: found !< |
---|
2415 | REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< sp - it has to correspond to module data_output_3d |
---|
2416 | REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: temp_pf !< temp array for urban surface output procedure |
---|
2417 | |
---|
2418 | CHARACTER (len=varnamelength) :: var, surfid |
---|
2419 | INTEGER(iwp), PARAMETER :: nd = 5 |
---|
2420 | CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /) |
---|
2421 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /) |
---|
2422 | INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER :: diridx = (/ -1, 1, 0, 3, 2 /) |
---|
2423 | !< index for surf_*_v: 0:3 = (North, South, East, West) |
---|
2424 | INTEGER(iwp), DIMENSION(0:nd-1) :: dirstart |
---|
2425 | INTEGER(iwp), DIMENSION(0:nd-1) :: dirend |
---|
2426 | INTEGER(iwp) :: ids,idsint,idsidx,isurf,isvf,isurfs,isurflt |
---|
2427 | INTEGER(iwp) :: is,js,ks,i,j,k,iwl,istat, l, m |
---|
2428 | INTEGER(iwp) :: k_topo !< topography top index |
---|
2429 | |
---|
2430 | dirstart = (/ startland, startwall, startwall, startwall, startwall /) |
---|
2431 | dirend = (/ endland, endwall, endwall, endwall, endwall /) |
---|
2432 | |
---|
2433 | found = .TRUE. |
---|
2434 | temp_pf = -1._wp |
---|
2435 | |
---|
2436 | ids = -1 |
---|
2437 | var = TRIM(variable) |
---|
2438 | DO i = 0, nd-1 |
---|
2439 | k = len(TRIM(var)) |
---|
2440 | j = len(TRIM(dirname(i))) |
---|
2441 | IF ( var(k-j+1:k) == dirname(i) ) THEN |
---|
2442 | ids = i |
---|
2443 | idsint = dirint(ids) |
---|
2444 | idsidx = diridx(ids) |
---|
2445 | var = var(:k-j) |
---|
2446 | EXIT |
---|
2447 | ENDIF |
---|
2448 | ENDDO |
---|
2449 | IF ( ids == -1 ) THEN |
---|
2450 | var = TRIM(variable) |
---|
2451 | ENDIF |
---|
2452 | IF ( var(1:11) == 'usm_t_wall_' .AND. len(TRIM(var)) >= 12 ) THEN |
---|
2453 | !-- wall layers |
---|
2454 | READ(var(12:12), '(I1)', iostat=istat ) iwl |
---|
2455 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2456 | var = var(1:10) |
---|
2457 | ENDIF |
---|
2458 | ENDIF |
---|
2459 | IF ( var(1:13) == 'usm_t_window_' .AND. len(TRIM(var)) >= 14 ) THEN |
---|
2460 | !-- window layers |
---|
2461 | READ(var(14:14), '(I1)', iostat=istat ) iwl |
---|
2462 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2463 | var = var(1:12) |
---|
2464 | ENDIF |
---|
2465 | ENDIF |
---|
2466 | IF ( var(1:12) == 'usm_t_green_' .AND. len(TRIM(var)) >= 13 ) THEN |
---|
2467 | !-- green layers |
---|
2468 | READ(var(13:13), '(I1)', iostat=istat ) iwl |
---|
2469 | IF ( istat == 0 .AND. iwl >= nzb_wall .AND. iwl <= nzt_wall ) THEN |
---|
2470 | var = var(1:11) |
---|
2471 | ENDIF |
---|
2472 | ENDIF |
---|
2473 | IF ( (var(1:8) == 'usm_svf_' .OR. var(1:8) == 'usm_dif_') .AND. len(TRIM(var)) >= 13 ) THEN |
---|
2474 | !-- svf values to particular surface |
---|
2475 | surfid = var(9:) |
---|
2476 | i = index(surfid,'_') |
---|
2477 | j = index(surfid(i+1:),'_') |
---|
2478 | READ(surfid(1:i-1),*, iostat=istat ) is |
---|
2479 | IF ( istat == 0 ) THEN |
---|
2480 | READ(surfid(i+1:i+j-1),*, iostat=istat ) js |
---|
2481 | ENDIF |
---|
2482 | IF ( istat == 0 ) THEN |
---|
2483 | READ(surfid(i+j+1:),*, iostat=istat ) ks |
---|
2484 | ENDIF |
---|
2485 | IF ( istat == 0 ) THEN |
---|
2486 | var = var(1:7) |
---|
2487 | ENDIF |
---|
2488 | ENDIF |
---|
2489 | |
---|
2490 | SELECT CASE ( TRIM(var) ) |
---|
2491 | |
---|
2492 | CASE ( 'usm_surfz' ) |
---|
2493 | !-- array of lw radiation falling to local surface after i-th reflection |
---|
2494 | IF ( idsint == iup_u ) THEN |
---|
2495 | DO m = 1, surf_usm_h%ns |
---|
2496 | i = surf_usm_h%i(m) |
---|
2497 | j = surf_usm_h%j(m) |
---|
2498 | k = surf_usm_h%k(m) |
---|
2499 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) ) |
---|
2500 | ENDDO |
---|
2501 | ELSE |
---|
2502 | l = idsidx |
---|
2503 | DO m = 1, surf_usm_v(l)%ns |
---|
2504 | i = surf_usm_v(l)%i(m) |
---|
2505 | j = surf_usm_v(l)%j(m) |
---|
2506 | k = surf_usm_v(l)%k(m) |
---|
2507 | temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) + 1.0_wp ) |
---|
2508 | ENDDO |
---|
2509 | ENDIF |
---|
2510 | |
---|
2511 | CASE ( 'usm_surfcat' ) |
---|
2512 | !-- surface category |
---|
2513 | IF ( idsint == iup_u ) THEN |
---|
2514 | DO m = 1, surf_usm_h%ns |
---|
2515 | i = surf_usm_h%i(m) |
---|
2516 | j = surf_usm_h%j(m) |
---|
2517 | k = surf_usm_h%k(m) |
---|
2518 | temp_pf(k,j,i) = surf_usm_h%surface_types(m) |
---|
2519 | ENDDO |
---|
2520 | ELSE |
---|
2521 | l = idsidx |
---|
2522 | DO m = 1, surf_usm_v(l)%ns |
---|
2523 | i = surf_usm_v(l)%i(m) |
---|
2524 | j = surf_usm_v(l)%j(m) |
---|
2525 | k = surf_usm_v(l)%k(m) |
---|
2526 | temp_pf(k,j,i) = surf_usm_v(l)%surface_types(m) |
---|
2527 | ENDDO |
---|
2528 | ENDIF |
---|
2529 | |
---|
2530 | CASE ( 'usm_surfalb' ) |
---|
2531 | !-- surface albedo, weighted average |
---|
2532 | IF ( idsint == iup_u ) THEN |
---|
2533 | DO m = 1, surf_usm_h%ns |
---|
2534 | i = surf_usm_h%i(m) |
---|
2535 | j = surf_usm_h%j(m) |
---|
2536 | k = surf_usm_h%k(m) |
---|
2537 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
2538 | surf_usm_h%albedo(ind_veg_wall,m) + & |
---|
2539 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
2540 | surf_usm_h%albedo(ind_pav_green,m) + & |
---|
2541 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
2542 | surf_usm_h%albedo(ind_wat_win,m) |
---|
2543 | ENDDO |
---|
2544 | ELSE |
---|
2545 | l = idsidx |
---|
2546 | DO m = 1, surf_usm_v(l)%ns |
---|
2547 | i = surf_usm_v(l)%i(m) |
---|
2548 | j = surf_usm_v(l)%j(m) |
---|
2549 | k = surf_usm_v(l)%k(m) |
---|
2550 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
2551 | surf_usm_v(l)%albedo(ind_veg_wall,m) + & |
---|
2552 | surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
2553 | surf_usm_v(l)%albedo(ind_pav_green,m) + & |
---|
2554 | surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
2555 | surf_usm_v(l)%albedo(ind_wat_win,m) |
---|
2556 | ENDDO |
---|
2557 | ENDIF |
---|
2558 | |
---|
2559 | CASE ( 'usm_surfemis' ) |
---|
2560 | !-- surface emissivity, weighted average |
---|
2561 | IF ( idsint == iup_u ) THEN |
---|
2562 | DO m = 1, surf_usm_h%ns |
---|
2563 | i = surf_usm_h%i(m) |
---|
2564 | j = surf_usm_h%j(m) |
---|
2565 | k = surf_usm_h%k(m) |
---|
2566 | temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m) * & |
---|
2567 | surf_usm_h%emissivity(ind_veg_wall,m) + & |
---|
2568 | surf_usm_h%frac(ind_pav_green,m) * & |
---|
2569 | surf_usm_h%emissivity(ind_pav_green,m) + & |
---|
2570 | surf_usm_h%frac(ind_wat_win,m) * & |
---|
2571 | surf_usm_h%emissivity(ind_wat_win,m) |
---|
2572 | ENDDO |
---|
2573 | ELSE |
---|
2574 | l = idsidx |
---|
2575 | DO m = 1, surf_usm_v(l)%ns |
---|
2576 | i = surf_usm_v(l)%i(m) |
---|
2577 | j = surf_usm_v(l)%j(m) |
---|
2578 | k = surf_usm_v(l)%k(m) |
---|
2579 | temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m) *& |
---|
2580 | surf_usm_v(l)%emissivity(ind_veg_wall,m) +& |
---|
2581 | surf_usm_v(l)%frac(ind_pav_green,m) *& |
---|
2582 | surf_usm_v(l)%emissivity(ind_pav_green,m)+& |
---|
2583 | surf_usm_v(l)%frac(ind_wat_win,m) *& |
---|
2584 | surf_usm_v(l)%emissivity(ind_wat_win,m) |
---|
2585 | ENDDO |
---|
2586 | ENDIF |
---|
2587 | |
---|
2588 | CASE ( 'usm_surfwintrans' ) |
---|
2589 | !-- transmissivity window tiles |
---|
2590 | IF ( idsint == iup_u ) THEN |
---|
2591 | DO m = 1, surf_usm_h%ns |
---|
2592 | i = surf_usm_h%i(m) |
---|
2593 | j = surf_usm_h%j(m) |
---|
2594 | k = surf_usm_h%k(m) |
---|
2595 | temp_pf(k,j,i) = surf_usm_h%transmissivity(m) |
---|
2596 | ENDDO |
---|
2597 | ELSE |
---|
2598 | l = idsidx |
---|
2599 | DO m = 1, surf_usm_v(l)%ns |
---|
2600 | i = surf_usm_v(l)%i(m) |
---|
2601 | j = surf_usm_v(l)%j(m) |
---|
2602 | k = surf_usm_v(l)%k(m) |
---|
2603 | temp_pf(k,j,i) = surf_usm_v(l)%transmissivity(m) |
---|
2604 | ENDDO |
---|
2605 | ENDIF |
---|
2606 | |
---|
2607 | CASE ( 'usm_skyvf' ) |
---|
2608 | !-- sky view factor |
---|
2609 | DO isurf = dirstart(ids), dirend(ids) |
---|
2610 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2611 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvf(isurf) |
---|
2612 | ENDIF |
---|
2613 | ENDDO |
---|
2614 | |
---|
2615 | CASE ( 'usm_skyvft' ) |
---|
2616 | !-- sky view factor |
---|
2617 | DO isurf = dirstart(ids), dirend(ids) |
---|
2618 | IF ( surfl(id,isurf) == ids ) THEN |
---|
2619 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvft(isurf) |
---|
2620 | ENDIF |
---|
2621 | ENDDO |
---|
2622 | |
---|
2623 | ! |
---|
2624 | !-- Not adjusted so far |
---|
2625 | CASE ( 'usm_svf', 'usm_dif' ) |
---|
2626 | !-- shape view factors or iradiance factors to selected surface |
---|
2627 | IF ( TRIM(var)=='usm_svf' ) THEN |
---|
2628 | k = 1 |
---|
2629 | ELSE |
---|
2630 | k = 2 |
---|
2631 | ENDIF |
---|
2632 | DO isvf = 1, nsvfl |
---|
2633 | isurflt = svfsurf(1, isvf) |
---|
2634 | isurfs = svfsurf(2, isvf) |
---|
2635 | |
---|
2636 | IF ( surf(ix,isurfs) == is .AND. surf(iy,isurfs) == js .AND. & |
---|
2637 | surf(iz,isurfs) == ks .AND. surf(id,isurfs) == idsint ) THEN |
---|
2638 | !-- correct source surface |
---|
2639 | temp_pf(surfl(iz,isurflt),surfl(iy,isurflt),surfl(ix,isurflt)) = svf(k,isvf) |
---|
2640 | ENDIF |
---|
2641 | ENDDO |
---|
2642 | |
---|
2643 | CASE ( 'usm_rad_net' ) |
---|
2644 | !-- array of complete radiation balance |
---|
2645 | IF ( av == 0 ) THEN |
---|
2646 | IF ( idsint == iup_u ) THEN |
---|
2647 | DO m = 1, surf_usm_h%ns |
---|
2648 | i = surf_usm_h%i(m) |
---|
2649 | j = surf_usm_h%j(m) |
---|
2650 | k = surf_usm_h%k(m) |
---|
2651 | temp_pf(k,j,i) = surf_usm_h%rad_net_l(m) |
---|
2652 | ENDDO |
---|
2653 | ELSE |
---|
2654 | l = idsidx |
---|
2655 | DO m = 1, surf_usm_v(l)%ns |
---|
2656 | i = surf_usm_v(l)%i(m) |
---|
2657 | j = surf_usm_v(l)%j(m) |
---|
2658 | k = surf_usm_v(l)%k(m) |
---|
2659 | temp_pf(k,j,i) = surf_usm_v(l)%rad_net_l(m) |
---|
2660 | ENDDO |
---|
2661 | ENDIF |
---|
2662 | ELSE |
---|
2663 | IF ( idsint == iup_u ) THEN |
---|
2664 | DO m = 1, surf_usm_h%ns |
---|
2665 | i = surf_usm_h%i(m) |
---|
2666 | j = surf_usm_h%j(m) |
---|
2667 | k = surf_usm_h%k(m) |
---|
2668 | temp_pf(k,j,i) = surf_usm_h%rad_net_av(m) |
---|
2669 | ENDDO |
---|
2670 | ELSE |
---|
2671 | l = idsidx |
---|
2672 | DO m = 1, surf_usm_v(l)%ns |
---|
2673 | i = surf_usm_v(l)%i(m) |
---|
2674 | j = surf_usm_v(l)%j(m) |
---|
2675 | k = surf_usm_v(l)%k(m) |
---|
2676 | temp_pf(k,j,i) = surf_usm_v(l)%rad_net_av(m) |
---|
2677 | ENDDO |
---|
2678 | ENDIF |
---|
2679 | ENDIF |
---|
2680 | |
---|
2681 | CASE ( 'usm_rad_insw' ) |
---|
2682 | !-- array of sw radiation falling to surface after i-th reflection |
---|
2683 | DO isurf = dirstart(ids), dirend(ids) |
---|
2684 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2685 | IF ( av == 0 ) THEN |
---|
2686 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw(isurf) |
---|
2687 | ELSE |
---|
2688 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw_av(isurf) |
---|
2689 | ENDIF |
---|
2690 | ENDIF |
---|
2691 | ENDDO |
---|
2692 | |
---|
2693 | CASE ( 'usm_rad_inlw' ) |
---|
2694 | !-- array of lw radiation falling to surface after i-th reflection |
---|
2695 | DO isurf = dirstart(ids), dirend(ids) |
---|
2696 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2697 | IF ( av == 0 ) THEN |
---|
2698 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf) |
---|
2699 | ELSE |
---|
2700 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw_av(isurf) |
---|
2701 | ENDIF |
---|
2702 | ENDIF |
---|
2703 | ENDDO |
---|
2704 | |
---|
2705 | CASE ( 'usm_rad_inswdir' ) |
---|
2706 | !-- array of direct sw radiation falling to surface from sun |
---|
2707 | DO isurf = dirstart(ids), dirend(ids) |
---|
2708 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2709 | IF ( av == 0 ) THEN |
---|
2710 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir(isurf) |
---|
2711 | ELSE |
---|
2712 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir_av(isurf) |
---|
2713 | ENDIF |
---|
2714 | ENDIF |
---|
2715 | ENDDO |
---|
2716 | |
---|
2717 | CASE ( 'usm_rad_inswdif' ) |
---|
2718 | !-- array of difusion sw radiation falling to surface from sky and borders of the domain |
---|
2719 | DO isurf = dirstart(ids), dirend(ids) |
---|
2720 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2721 | IF ( av == 0 ) THEN |
---|
2722 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif(isurf) |
---|
2723 | ELSE |
---|
2724 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif_av(isurf) |
---|
2725 | ENDIF |
---|
2726 | ENDIF |
---|
2727 | ENDDO |
---|
2728 | |
---|
2729 | CASE ( 'usm_rad_inswref' ) |
---|
2730 | !-- array of sw radiation falling to surface from reflections |
---|
2731 | DO isurf = dirstart(ids), dirend(ids) |
---|
2732 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2733 | IF ( av == 0 ) THEN |
---|
2734 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = & |
---|
2735 | surfinsw(isurf) - surfinswdir(isurf) - surfinswdif(isurf) |
---|
2736 | ELSE |
---|
2737 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswref_av(isurf) |
---|
2738 | ENDIF |
---|
2739 | ENDIF |
---|
2740 | ENDDO |
---|
2741 | |
---|
2742 | CASE ( 'usm_rad_inlwdif' ) |
---|
2743 | !-- array of difusion lw radiation falling to surface from sky and borders of the domain |
---|
2744 | DO isurf = dirstart(ids), dirend(ids) |
---|
2745 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2746 | IF ( av == 0 ) THEN |
---|
2747 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif(isurf) |
---|
2748 | ELSE |
---|
2749 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif_av(isurf) |
---|
2750 | ENDIF |
---|
2751 | ENDIF |
---|
2752 | ENDDO |
---|
2753 | |
---|
2754 | CASE ( 'usm_rad_inlwref' ) |
---|
2755 | !-- array of lw radiation falling to surface from reflections |
---|
2756 | DO isurf = dirstart(ids), dirend(ids) |
---|
2757 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2758 | IF ( av == 0 ) THEN |
---|
2759 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf) - surfinlwdif(isurf) |
---|
2760 | ELSE |
---|
2761 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwref_av(isurf) |
---|
2762 | ENDIF |
---|
2763 | ENDIF |
---|
2764 | ENDDO |
---|
2765 | |
---|
2766 | CASE ( 'usm_rad_outsw' ) |
---|
2767 | !-- array of sw radiation emitted from surface after i-th reflection |
---|
2768 | DO isurf = dirstart(ids), dirend(ids) |
---|
2769 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2770 | IF ( av == 0 ) THEN |
---|
2771 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw(isurf) |
---|
2772 | ELSE |
---|
2773 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw_av(isurf) |
---|
2774 | ENDIF |
---|
2775 | ENDIF |
---|
2776 | ENDDO |
---|
2777 | |
---|
2778 | CASE ( 'usm_rad_outlw' ) |
---|
2779 | !-- array of lw radiation emitted from surface after i-th reflection |
---|
2780 | DO isurf = dirstart(ids), dirend(ids) |
---|
2781 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2782 | IF ( av == 0 ) THEN |
---|
2783 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw(isurf) |
---|
2784 | ELSE |
---|
2785 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw_av(isurf) |
---|
2786 | ENDIF |
---|
2787 | ENDIF |
---|
2788 | ENDDO |
---|
2789 | |
---|
2790 | CASE ( 'usm_rad_ressw' ) |
---|
2791 | !-- average of array of residua of sw radiation absorbed in surface after last reflection |
---|
2792 | DO isurf = dirstart(ids), dirend(ids) |
---|
2793 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2794 | IF ( av == 0 ) THEN |
---|
2795 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins(isurf) |
---|
2796 | ELSE |
---|
2797 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins_av(isurf) |
---|
2798 | ENDIF |
---|
2799 | ENDIF |
---|
2800 | ENDDO |
---|
2801 | |
---|
2802 | CASE ( 'usm_rad_reslw' ) |
---|
2803 | !-- average of array of residua of lw radiation absorbed in surface after last reflection |
---|
2804 | DO isurf = dirstart(ids), dirend(ids) |
---|
2805 | IF ( surfl(id,isurf) == idsint ) THEN |
---|
2806 | IF ( av == 0 ) THEN |
---|
2807 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl(isurf) |
---|
2808 | ELSE |
---|
2809 | temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl_av(isurf) |
---|
2810 | ENDIF |
---|
2811 | ENDIF |
---|
2812 | ENDDO |
---|
2813 | |
---|
2814 | CASE ( 'usm_rad_hf' ) |
---|
2815 | !-- array of heat flux from radiation for surfaces after all reflections |
---|
2816 | IF ( av == 0 ) THEN |
---|
2817 | IF ( idsint == iup_u ) THEN |
---|
2818 | DO m = 1, surf_usm_h%ns |
---|
2819 | i = surf_usm_h%i(m) |
---|
2820 | j = surf_usm_h%j(m) |
---|
2821 | k = surf_usm_h%k(m) |
---|
2822 | temp_pf(k,j,i) = surf_usm_h%surfhf(m) |
---|
2823 | ENDDO |
---|
2824 | ELSE |
---|
2825 | l = idsidx |
---|
2826 | DO m = 1, surf_usm_v(l)%ns |
---|
2827 | i = surf_usm_v(l)%i(m) |
---|
2828 | j = surf_usm_v(l)%j(m) |
---|
2829 | k = surf_usm_v(l)%k(m) |
---|
2830 | temp_pf(k,j,i) = surf_usm_v(l)%surfhf(m) |
---|
2831 | ENDDO |
---|
2832 | ENDIF |
---|
2833 | ELSE |
---|
2834 | IF ( idsint == iup_u ) THEN |
---|
2835 | DO m = 1, surf_usm_h%ns |
---|
2836 | i = surf_usm_h%i(m) |
---|
2837 | j = surf_usm_h%j(m) |
---|
2838 | k = surf_usm_h%k(m) |
---|
2839 | temp_pf(k,j,i) = surf_usm_h%surfhf_av(m) |
---|
2840 | ENDDO |
---|
2841 | ELSE |
---|
2842 | l = idsidx |
---|
2843 | DO m = 1, surf_usm_v(l)%ns |
---|
2844 | i = surf_usm_v(l)%i(m) |
---|
2845 | j = surf_usm_v(l)%j(m) |
---|
2846 | k = surf_usm_v(l)%k(m) |
---|
2847 | temp_pf(k,j,i) = surf_usm_v(l)%surfhf_av(m) |
---|
2848 | ENDDO |
---|
2849 | ENDIF |
---|
2850 | ENDIF |
---|
2851 | |
---|
2852 | CASE ( 'usm_wshf' ) |
---|
2853 | !-- array of sensible heat flux from surfaces |
---|
2854 | IF ( av == 0 ) THEN |
---|
2855 | IF ( idsint == iup_u ) THEN |
---|
2856 | DO m = 1, surf_usm_h%ns |
---|
2857 | i = surf_usm_h%i(m) |
---|
2858 | j = surf_usm_h%j(m) |
---|
2859 | k = surf_usm_h%k(m) |
---|
2860 | temp_pf(k,j,i) = surf_usm_h%wshf_eb(m) |
---|
2861 | ENDDO |
---|
2862 | ELSE |
---|
2863 | l = idsidx |
---|
2864 | DO m = 1, surf_usm_v(l)%ns |
---|
2865 | i = surf_usm_v(l)%i(m) |
---|
2866 | j = surf_usm_v(l)%j(m) |
---|
2867 | k = surf_usm_v(l)%k(m) |
---|
2868 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb(m) |
---|
2869 | ENDDO |
---|
2870 | ENDIF |
---|
2871 | ELSE |
---|
2872 | IF ( idsint == iup_u ) THEN |
---|
2873 | DO m = 1, surf_usm_h%ns |
---|
2874 | i = surf_usm_h%i(m) |
---|
2875 | j = surf_usm_h%j(m) |
---|
2876 | k = surf_usm_h%k(m) |
---|
2877 | temp_pf(k,j,i) = surf_usm_h%wshf_eb_av(m) |
---|
2878 | ENDDO |
---|
2879 | ELSE |
---|
2880 | l = idsidx |
---|
2881 | DO m = 1, surf_usm_v(l)%ns |
---|
2882 | i = surf_usm_v(l)%i(m) |
---|
2883 | j = surf_usm_v(l)%j(m) |
---|
2884 | k = surf_usm_v(l)%k(m) |
---|
2885 | temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb_av(m) |
---|
2886 | ENDDO |
---|
2887 | ENDIF |
---|
2888 | ENDIF |
---|
2889 | |
---|
2890 | |
---|
2891 | CASE ( 'usm_wghf' ) |
---|
2892 | !-- array of heat flux from ground (land, wall, roof) |
---|
2893 | IF ( av == 0 ) THEN |
---|
2894 | IF ( idsint == iup_u ) THEN |
---|
2895 | DO m = 1, surf_usm_h%ns |
---|
2896 | i = surf_usm_h%i(m) |
---|
2897 | j = surf_usm_h%j(m) |
---|
2898 | k = surf_usm_h%k(m) |
---|
2899 | temp_pf(k,j,i) = surf_usm_h%wghf_eb(m) |
---|
2900 | ENDDO |
---|
2901 | ELSE |
---|
2902 | l = idsidx |
---|
2903 | DO m = 1, surf_usm_v(l)%ns |
---|
2904 | i = surf_usm_v(l)%i(m) |
---|
2905 | j = surf_usm_v(l)%j(m) |
---|
2906 | k = surf_usm_v(l)%k(m) |
---|
2907 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb(m) |
---|
2908 | ENDDO |
---|
2909 | ENDIF |
---|
2910 | ELSE |
---|
2911 | IF ( idsint == iup_u ) THEN |
---|
2912 | DO m = 1, surf_usm_h%ns |
---|
2913 | i = surf_usm_h%i(m) |
---|
2914 | j = surf_usm_h%j(m) |
---|
2915 | k = surf_usm_h%k(m) |
---|
2916 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_av(m) |
---|
2917 | ENDDO |
---|
2918 | ELSE |
---|
2919 | l = idsidx |
---|
2920 | DO m = 1, surf_usm_v(l)%ns |
---|
2921 | i = surf_usm_v(l)%i(m) |
---|
2922 | j = surf_usm_v(l)%j(m) |
---|
2923 | k = surf_usm_v(l)%k(m) |
---|
2924 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_av(m) |
---|
2925 | ENDDO |
---|
2926 | ENDIF |
---|
2927 | ENDIF |
---|
2928 | |
---|
2929 | CASE ( 'usm_wghf_window' ) |
---|
2930 | !-- array of heat flux from window ground (land, wall, roof) |
---|
2931 | |
---|
2932 | IF ( av == 0 ) THEN |
---|
2933 | IF ( idsint == iup_u ) THEN |
---|
2934 | DO m = 1, surf_usm_h%ns |
---|
2935 | i = surf_usm_h%i(m) |
---|
2936 | j = surf_usm_h%j(m) |
---|
2937 | k = surf_usm_h%k(m) |
---|
2938 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window(m) |
---|
2939 | ENDDO |
---|
2940 | ELSE |
---|
2941 | l = idsidx |
---|
2942 | DO m = 1, surf_usm_v(l)%ns |
---|
2943 | i = surf_usm_v(l)%i(m) |
---|
2944 | j = surf_usm_v(l)%j(m) |
---|
2945 | k = surf_usm_v(l)%k(m) |
---|
2946 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window(m) |
---|
2947 | ENDDO |
---|
2948 | ENDIF |
---|
2949 | ELSE |
---|
2950 | IF ( idsint == iup_u ) THEN |
---|
2951 | DO m = 1, surf_usm_h%ns |
---|
2952 | i = surf_usm_h%i(m) |
---|
2953 | j = surf_usm_h%j(m) |
---|
2954 | k = surf_usm_h%k(m) |
---|
2955 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_window_av(m) |
---|
2956 | ENDDO |
---|
2957 | ELSE |
---|
2958 | l = idsidx |
---|
2959 | DO m = 1, surf_usm_v(l)%ns |
---|
2960 | i = surf_usm_v(l)%i(m) |
---|
2961 | j = surf_usm_v(l)%j(m) |
---|
2962 | k = surf_usm_v(l)%k(m) |
---|
2963 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window_av(m) |
---|
2964 | ENDDO |
---|
2965 | ENDIF |
---|
2966 | ENDIF |
---|
2967 | |
---|
2968 | CASE ( 'usm_wghf_green' ) |
---|
2969 | !-- array of heat flux from green ground (land, wall, roof) |
---|
2970 | |
---|
2971 | IF ( av == 0 ) THEN |
---|
2972 | IF ( idsint == iup_u ) THEN |
---|
2973 | DO m = 1, surf_usm_h%ns |
---|
2974 | i = surf_usm_h%i(m) |
---|
2975 | j = surf_usm_h%j(m) |
---|
2976 | k = surf_usm_h%k(m) |
---|
2977 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green(m) |
---|
2978 | ENDDO |
---|
2979 | ELSE |
---|
2980 | l = idsidx |
---|
2981 | DO m = 1, surf_usm_v(l)%ns |
---|
2982 | i = surf_usm_v(l)%i(m) |
---|
2983 | j = surf_usm_v(l)%j(m) |
---|
2984 | k = surf_usm_v(l)%k(m) |
---|
2985 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green(m) |
---|
2986 | ENDDO |
---|
2987 | ENDIF |
---|
2988 | ELSE |
---|
2989 | IF ( idsint == iup_u ) THEN |
---|
2990 | DO m = 1, surf_usm_h%ns |
---|
2991 | i = surf_usm_h%i(m) |
---|
2992 | j = surf_usm_h%j(m) |
---|
2993 | k = surf_usm_h%k(m) |
---|
2994 | temp_pf(k,j,i) = surf_usm_h%wghf_eb_green_av(m) |
---|
2995 | ENDDO |
---|
2996 | ELSE |
---|
2997 | l = idsidx |
---|
2998 | DO m = 1, surf_usm_v(l)%ns |
---|
2999 | i = surf_usm_v(l)%i(m) |
---|
3000 | j = surf_usm_v(l)%j(m) |
---|
3001 | k = surf_usm_v(l)%k(m) |
---|
3002 | temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green_av(m) |
---|
3003 | ENDDO |
---|
3004 | ENDIF |
---|
3005 | ENDIF |
---|
3006 | |
---|
3007 | CASE ( 'usm_iwghf' ) |
---|
3008 | !-- array of heat flux from indoor ground (land, wall, roof) |
---|
3009 | IF ( av == 0 ) THEN |
---|
3010 | IF ( idsint == iup_u ) THEN |
---|
3011 | DO m = 1, surf_usm_h%ns |
---|
3012 | i = surf_usm_h%i(m) |
---|
3013 | j = surf_usm_h%j(m) |
---|
3014 | k = surf_usm_h%k(m) |
---|
3015 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb(m) |
---|
3016 | ENDDO |
---|
3017 | ELSE |
---|
3018 | l = idsidx |
---|
3019 | DO m = 1, surf_usm_v(l)%ns |
---|
3020 | i = surf_usm_v(l)%i(m) |
---|
3021 | j = surf_usm_v(l)%j(m) |
---|
3022 | k = surf_usm_v(l)%k(m) |
---|
3023 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb(m) |
---|
3024 | ENDDO |
---|
3025 | ENDIF |
---|
3026 | ELSE |
---|
3027 | IF ( idsint == iup_u ) THEN |
---|
3028 | DO m = 1, surf_usm_h%ns |
---|
3029 | i = surf_usm_h%i(m) |
---|
3030 | j = surf_usm_h%j(m) |
---|
3031 | k = surf_usm_h%k(m) |
---|
3032 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_av(m) |
---|
3033 | ENDDO |
---|
3034 | ELSE |
---|
3035 | l = idsidx |
---|
3036 | DO m = 1, surf_usm_v(l)%ns |
---|
3037 | i = surf_usm_v(l)%i(m) |
---|
3038 | j = surf_usm_v(l)%j(m) |
---|
3039 | k = surf_usm_v(l)%k(m) |
---|
3040 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_av(m) |
---|
3041 | ENDDO |
---|
3042 | ENDIF |
---|
3043 | ENDIF |
---|
3044 | |
---|
3045 | CASE ( 'usm_iwghf_window' ) |
---|
3046 | !-- array of heat flux from indoor window ground (land, wall, roof) |
---|
3047 | |
---|
3048 | IF ( av == 0 ) THEN |
---|
3049 | IF ( idsint == iup_u ) THEN |
---|
3050 | DO m = 1, surf_usm_h%ns |
---|
3051 | i = surf_usm_h%i(m) |
---|
3052 | j = surf_usm_h%j(m) |
---|
3053 | k = surf_usm_h%k(m) |
---|
3054 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window(m) |
---|
3055 | ENDDO |
---|
3056 | ELSE |
---|
3057 | l = idsidx |
---|
3058 | DO m = 1, surf_usm_v(l)%ns |
---|
3059 | i = surf_usm_v(l)%i(m) |
---|
3060 | j = surf_usm_v(l)%j(m) |
---|
3061 | k = surf_usm_v(l)%k(m) |
---|
3062 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window(m) |
---|
3063 | ENDDO |
---|
3064 | ENDIF |
---|
3065 | ELSE |
---|
3066 | IF ( idsint == iup_u ) THEN |
---|
3067 | DO m = 1, surf_usm_h%ns |
---|
3068 | i = surf_usm_h%i(m) |
---|
3069 | j = surf_usm_h%j(m) |
---|
3070 | k = surf_usm_h%k(m) |
---|
3071 | temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window_av(m) |
---|
3072 | ENDDO |
---|
3073 | ELSE |
---|
3074 | l = idsidx |
---|
3075 | DO m = 1, surf_usm_v(l)%ns |
---|
3076 | i = surf_usm_v(l)%i(m) |
---|
3077 | j = surf_usm_v(l)%j(m) |
---|
3078 | k = surf_usm_v(l)%k(m) |
---|
3079 | temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window_av(m) |
---|
3080 | ENDDO |
---|
3081 | ENDIF |
---|
3082 | ENDIF |
---|
3083 | |
---|
3084 | CASE ( 'usm_t_surf' ) |
---|
3085 | !-- surface temperature for surfaces |
---|
3086 | IF ( av == 0 ) THEN |
---|
3087 | IF ( idsint == iup_u ) THEN |
---|
3088 | DO m = 1, surf_usm_h%ns |
---|
3089 | i = surf_usm_h%i(m) |
---|
3090 | j = surf_usm_h%j(m) |
---|
3091 | k = surf_usm_h%k(m) |
---|
3092 | temp_pf(k,j,i) = t_surf_h(m) |
---|
3093 | ENDDO |
---|
3094 | ELSE |
---|
3095 | l = idsidx |
---|
3096 | DO m = 1, surf_usm_v(l)%ns |
---|
3097 | i = surf_usm_v(l)%i(m) |
---|
3098 | j = surf_usm_v(l)%j(m) |
---|
3099 | k = surf_usm_v(l)%k(m) |
---|
3100 | temp_pf(k,j,i) = t_surf_v(l)%t(m) |
---|
3101 | ENDDO |
---|
3102 | ENDIF |
---|
3103 | ELSE |
---|
3104 | IF ( idsint == iup_u ) THEN |
---|
3105 | DO m = 1, surf_usm_h%ns |
---|
3106 | i = surf_usm_h%i(m) |
---|
3107 | j = surf_usm_h%j(m) |
---|
3108 | k = surf_usm_h%k(m) |
---|
3109 | temp_pf(k,j,i) = surf_usm_h%t_surf_av(m) |
---|
3110 | ENDDO |
---|
3111 | ELSE |
---|
3112 | l = idsidx |
---|
3113 | DO m = 1, surf_usm_v(l)%ns |
---|
3114 | i = surf_usm_v(l)%i(m) |
---|
3115 | j = surf_usm_v(l)%j(m) |
---|
3116 | k = surf_usm_v(l)%k(m) |
---|
3117 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_av(m) |
---|
3118 | ENDDO |
---|
3119 | ENDIF |
---|
3120 | ENDIF |
---|
3121 | |
---|
3122 | CASE ( 'usm_t_surf_window' ) |
---|
3123 | !-- surface temperature for window surfaces |
---|
3124 | |
---|
3125 | IF ( av == 0 ) THEN |
---|
3126 | IF ( idsint == iup_u ) THEN |
---|
3127 | DO m = 1, surf_usm_h%ns |
---|
3128 | i = surf_usm_h%i(m) |
---|
3129 | j = surf_usm_h%j(m) |
---|
3130 | k = surf_usm_h%k(m) |
---|
3131 | temp_pf(k,j,i) = t_surf_window_h(m) |
---|
3132 | ENDDO |
---|
3133 | ELSE |
---|
3134 | l = idsidx |
---|
3135 | DO m = 1, surf_usm_v(l)%ns |
---|
3136 | i = surf_usm_v(l)%i(m) |
---|
3137 | j = surf_usm_v(l)%j(m) |
---|
3138 | k = surf_usm_v(l)%k(m) |
---|
3139 | temp_pf(k,j,i) = t_surf_window_v(l)%t(m) |
---|
3140 | ENDDO |
---|
3141 | ENDIF |
---|
3142 | |
---|
3143 | ELSE |
---|
3144 | IF ( idsint == iup_u ) THEN |
---|
3145 | DO m = 1, surf_usm_h%ns |
---|
3146 | i = surf_usm_h%i(m) |
---|
3147 | j = surf_usm_h%j(m) |
---|
3148 | k = surf_usm_h%k(m) |
---|
3149 | temp_pf(k,j,i) = surf_usm_h%t_surf_window_av(m) |
---|
3150 | ENDDO |
---|
3151 | ELSE |
---|
3152 | l = idsidx |
---|
3153 | DO m = 1, surf_usm_v(l)%ns |
---|
3154 | i = surf_usm_v(l)%i(m) |
---|
3155 | j = surf_usm_v(l)%j(m) |
---|
3156 | k = surf_usm_v(l)%k(m) |
---|
3157 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_window_av(m) |
---|
3158 | ENDDO |
---|
3159 | |
---|
3160 | ENDIF |
---|
3161 | |
---|
3162 | ENDIF |
---|
3163 | |
---|
3164 | CASE ( 'usm_t_surf_green' ) |
---|
3165 | !-- surface temperature for green surfaces |
---|
3166 | |
---|
3167 | IF ( av == 0 ) THEN |
---|
3168 | IF ( idsint == iup_u ) THEN |
---|
3169 | DO m = 1, surf_usm_h%ns |
---|
3170 | i = surf_usm_h%i(m) |
---|
3171 | j = surf_usm_h%j(m) |
---|
3172 | k = surf_usm_h%k(m) |
---|
3173 | temp_pf(k,j,i) = t_surf_green_h(m) |
---|
3174 | ENDDO |
---|
3175 | ELSE |
---|
3176 | l = idsidx |
---|
3177 | DO m = 1, surf_usm_v(l)%ns |
---|
3178 | i = surf_usm_v(l)%i(m) |
---|
3179 | j = surf_usm_v(l)%j(m) |
---|
3180 | k = surf_usm_v(l)%k(m) |
---|
3181 | temp_pf(k,j,i) = t_surf_green_v(l)%t(m) |
---|
3182 | ENDDO |
---|
3183 | ENDIF |
---|
3184 | |
---|
3185 | ELSE |
---|
3186 | IF ( idsint == iup_u ) THEN |
---|
3187 | DO m = 1, surf_usm_h%ns |
---|
3188 | i = surf_usm_h%i(m) |
---|
3189 | j = surf_usm_h%j(m) |
---|
3190 | k = surf_usm_h%k(m) |
---|
3191 | temp_pf(k,j,i) = surf_usm_h%t_surf_green_av(m) |
---|
3192 | ENDDO |
---|
3193 | ELSE |
---|
3194 | l = idsidx |
---|
3195 | DO m = 1, surf_usm_v(l)%ns |
---|
3196 | i = surf_usm_v(l)%i(m) |
---|
3197 | j = surf_usm_v(l)%j(m) |
---|
3198 | k = surf_usm_v(l)%k(m) |
---|
3199 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_green_av(m) |
---|
3200 | ENDDO |
---|
3201 | |
---|
3202 | ENDIF |
---|
3203 | |
---|
3204 | ENDIF |
---|
3205 | |
---|
3206 | CASE ( 'usm_t_surf_10cm' ) |
---|
3207 | !-- near surface temperature for whole surfaces |
---|
3208 | |
---|
3209 | IF ( av == 0 ) THEN |
---|
3210 | IF ( idsint == iup_u ) THEN |
---|
3211 | DO m = 1, surf_usm_h%ns |
---|
3212 | i = surf_usm_h%i(m) |
---|
3213 | j = surf_usm_h%j(m) |
---|
3214 | k = surf_usm_h%k(m) |
---|
3215 | temp_pf(k,j,i) = t_surf_10cm_h(m) |
---|
3216 | ENDDO |
---|
3217 | ELSE |
---|
3218 | l = idsidx |
---|
3219 | DO m = 1, surf_usm_v(l)%ns |
---|
3220 | i = surf_usm_v(l)%i(m) |
---|
3221 | j = surf_usm_v(l)%j(m) |
---|
3222 | k = surf_usm_v(l)%k(m) |
---|
3223 | temp_pf(k,j,i) = t_surf_10cm_v(l)%t(m) |
---|
3224 | ENDDO |
---|
3225 | ENDIF |
---|
3226 | |
---|
3227 | ELSE |
---|
3228 | IF ( idsint == iup_u ) THEN |
---|
3229 | DO m = 1, surf_usm_h%ns |
---|
3230 | i = surf_usm_h%i(m) |
---|
3231 | j = surf_usm_h%j(m) |
---|
3232 | k = surf_usm_h%k(m) |
---|
3233 | temp_pf(k,j,i) = surf_usm_h%t_surf_10cm_av(m) |
---|
3234 | ENDDO |
---|
3235 | ELSE |
---|
3236 | l = idsidx |
---|
3237 | DO m = 1, surf_usm_v(l)%ns |
---|
3238 | i = surf_usm_v(l)%i(m) |
---|
3239 | j = surf_usm_v(l)%j(m) |
---|
3240 | k = surf_usm_v(l)%k(m) |
---|
3241 | temp_pf(k,j,i) = surf_usm_v(l)%t_surf_10cm_av(m) |
---|
3242 | ENDDO |
---|
3243 | |
---|
3244 | ENDIF |
---|
3245 | |
---|
3246 | ENDIF |
---|
3247 | |
---|
3248 | |
---|
3249 | CASE ( 'usm_t_wall' ) |
---|
3250 | !-- wall temperature for iwl layer of walls and land |
---|
3251 | IF ( av == 0 ) THEN |
---|
3252 | IF ( idsint == iup_u ) THEN |
---|
3253 | DO m = 1, surf_usm_h%ns |
---|
3254 | i = surf_usm_h%i(m) |
---|
3255 | j = surf_usm_h%j(m) |
---|
3256 | k = surf_usm_h%k(m) |
---|
3257 | temp_pf(k,j,i) = t_wall_h(iwl,m) |
---|
3258 | ENDDO |
---|
3259 | ELSE |
---|
3260 | l = idsidx |
---|
3261 | DO m = 1, surf_usm_v(l)%ns |
---|
3262 | i = surf_usm_v(l)%i(m) |
---|
3263 | j = surf_usm_v(l)%j(m) |
---|
3264 | k = surf_usm_v(l)%k(m) |
---|
3265 | temp_pf(k,j,i) = t_wall_v(l)%t(iwl,m) |
---|
3266 | ENDDO |
---|
3267 | ENDIF |
---|
3268 | ELSE |
---|
3269 | IF ( idsint == iup_u ) THEN |
---|
3270 | DO m = 1, surf_usm_h%ns |
---|
3271 | i = surf_usm_h%i(m) |
---|
3272 | j = surf_usm_h%j(m) |
---|
3273 | k = surf_usm_h%k(m) |
---|
3274 | temp_pf(k,j,i) = surf_usm_h%t_wall_av(iwl,m) |
---|
3275 | ENDDO |
---|
3276 | ELSE |
---|
3277 | l = idsidx |
---|
3278 | DO m = 1, surf_usm_v(l)%ns |
---|
3279 | i = surf_usm_v(l)%i(m) |
---|
3280 | j = surf_usm_v(l)%j(m) |
---|
3281 | k = surf_usm_v(l)%k(m) |
---|
3282 | temp_pf(k,j,i) = surf_usm_v(l)%t_wall_av(iwl,m) |
---|
3283 | ENDDO |
---|
3284 | ENDIF |
---|
3285 | ENDIF |
---|
3286 | |
---|
3287 | CASE ( 'usm_t_window' ) |
---|
3288 | !-- window temperature for iwl layer of walls and land |
---|
3289 | IF ( av == 0 ) THEN |
---|
3290 | IF ( idsint == iup_u ) THEN |
---|
3291 | DO m = 1, surf_usm_h%ns |
---|
3292 | i = surf_usm_h%i(m) |
---|
3293 | j = surf_usm_h%j(m) |
---|
3294 | k = surf_usm_h%k(m) |
---|
3295 | temp_pf(k,j,i) = t_window_h(iwl,m) |
---|
3296 | ENDDO |
---|
3297 | ELSE |
---|
3298 | l = idsidx |
---|
3299 | DO m = 1, surf_usm_v(l)%ns |
---|
3300 | i = surf_usm_v(l)%i(m) |
---|
3301 | j = surf_usm_v(l)%j(m) |
---|
3302 | k = surf_usm_v(l)%k(m) |
---|
3303 | temp_pf(k,j,i) = t_window_v(l)%t(iwl,m) |
---|
3304 | ENDDO |
---|
3305 | ENDIF |
---|
3306 | ELSE |
---|
3307 | IF ( idsint == iup_u ) THEN |
---|
3308 | DO m = 1, surf_usm_h%ns |
---|
3309 | i = surf_usm_h%i(m) |
---|
3310 | j = surf_usm_h%j(m) |
---|
3311 | k = surf_usm_h%k(m) |
---|
3312 | temp_pf(k,j,i) = surf_usm_h%t_window_av(iwl,m) |
---|
3313 | ENDDO |
---|
3314 | ELSE |
---|
3315 | l = idsidx |
---|
3316 | DO m = 1, surf_usm_v(l)%ns |
---|
3317 | i = surf_usm_v(l)%i(m) |
---|
3318 | j = surf_usm_v(l)%j(m) |
---|
3319 | k = surf_usm_v(l)%k(m) |
---|
3320 | temp_pf(k,j,i) = surf_usm_v(l)%t_window_av(iwl,m) |
---|
3321 | ENDDO |
---|
3322 | ENDIF |
---|
3323 | ENDIF |
---|
3324 | |
---|
3325 | CASE ( 'usm_t_green' ) |
---|
3326 | !-- green temperature for iwl layer of walls and land |
---|
3327 | IF ( av == 0 ) THEN |
---|
3328 | IF ( idsint == iup_u ) THEN |
---|
3329 | DO m = 1, surf_usm_h%ns |
---|
3330 | i = surf_usm_h%i(m) |
---|
3331 | j = surf_usm_h%j(m) |
---|
3332 | k = surf_usm_h%k(m) |
---|
3333 | temp_pf(k,j,i) = t_green_h(iwl,m) |
---|
3334 | ENDDO |
---|
3335 | ELSE |
---|
3336 | l = idsidx |
---|
3337 | DO m = 1, surf_usm_v(l)%ns |
---|
3338 | i = surf_usm_v(l)%i(m) |
---|
3339 | j = surf_usm_v(l)%j(m) |
---|
3340 | k = surf_usm_v(l)%k(m) |
---|
3341 | temp_pf(k,j,i) = t_green_v(l)%t(iwl,m) |
---|
3342 | ENDDO |
---|
3343 | ENDIF |
---|
3344 | ELSE |
---|
3345 | IF ( idsint == iup_u ) THEN |
---|
3346 | DO m = 1, surf_usm_h%ns |
---|
3347 | i = surf_usm_h%i(m) |
---|
3348 | j = surf_usm_h%j(m) |
---|
3349 | k = surf_usm_h%k(m) |
---|
3350 | temp_pf(k,j,i) = surf_usm_h%t_green_av(iwl,m) |
---|
3351 | ENDDO |
---|
3352 | ELSE |
---|
3353 | l = idsidx |
---|
3354 | DO m = 1, surf_usm_v(l)%ns |
---|
3355 | i = surf_usm_v(l)%i(m) |
---|
3356 | j = surf_usm_v(l)%j(m) |
---|
3357 | k = surf_usm_v(l)%k(m) |
---|
3358 | temp_pf(k,j,i) = surf_usm_v(l)%t_green_av(iwl,m) |
---|
3359 | ENDDO |
---|
3360 | ENDIF |
---|
3361 | ENDIF |
---|
3362 | |
---|
3363 | |
---|
3364 | CASE DEFAULT |
---|
3365 | found = .FALSE. |
---|
3366 | |
---|
3367 | END SELECT |
---|
3368 | |
---|
3369 | ! |
---|
3370 | !-- Rearrange dimensions for NetCDF output |
---|
3371 | !-- FIXME: this may generate FPE overflow upon conversion from DP to SP |
---|
3372 | DO j = nys, nyn |
---|
3373 | DO i = nxl, nxr |
---|
3374 | DO k = nzb_do, nzt_do |
---|
3375 | local_pf(i,j,k) = temp_pf(k,j,i) |
---|
3376 | ENDDO |
---|
3377 | ENDDO |
---|
3378 | ENDDO |
---|
3379 | |
---|
3380 | END SUBROUTINE usm_data_output_3d |
---|
3381 | |
---|
3382 | |
---|
3383 | !------------------------------------------------------------------------------! |
---|
3384 | ! |
---|
3385 | ! Description: |
---|
3386 | ! ------------ |
---|
3387 | !> Soubroutine defines appropriate grid for netcdf variables. |
---|
3388 | !> It is called out from subroutine netcdf. |
---|
3389 | !------------------------------------------------------------------------------! |
---|
3390 | SUBROUTINE usm_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) |
---|
3391 | |
---|
3392 | IMPLICIT NONE |
---|
3393 | |
---|
3394 | CHARACTER (len=*), INTENT(IN) :: variable !< |
---|
3395 | LOGICAL, INTENT(OUT) :: found !< |
---|
3396 | CHARACTER (len=*), INTENT(OUT) :: grid_x !< |
---|
3397 | CHARACTER (len=*), INTENT(OUT) :: grid_y !< |
---|
3398 | CHARACTER (len=*), INTENT(OUT) :: grid_z !< |
---|
3399 | |
---|
3400 | CHARACTER (len=varnamelength) :: var |
---|
3401 | |
---|
3402 | var = TRIM(variable) |
---|
3403 | IF ( var(1:12) == 'usm_rad_net_' .OR. var(1:13) == 'usm_rad_insw_' .OR. & |
---|
3404 | var(1:13) == 'usm_rad_inlw_' .OR. var(1:16) == 'usm_rad_inswdir_' .OR. & |
---|
3405 | var(1:16) == 'usm_rad_inswdif_' .OR. var(1:16) == 'usm_rad_inswref_' .OR. & |
---|
3406 | var(1:16) == 'usm_rad_inlwdif_' .OR. var(1:16) == 'usm_rad_inlwref_' .OR. & |
---|
3407 | var(1:14) == 'usm_rad_outsw_' .OR. var(1:14) == 'usm_rad_outlw_' .OR. & |
---|
3408 | var(1:14) == 'usm_rad_ressw_' .OR. var(1:14) == 'usm_rad_reslw_' .OR. & |
---|
3409 | var(1:11) == 'usm_rad_hf_' .OR. & |
---|
3410 | var(1:9) == 'usm_wshf_' .OR. var(1:9) == 'usm_wghf_' .OR. & |
---|
3411 | var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR. & |
---|
3412 | var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_' .OR. & |
---|
3413 | var(1:10) == 'usm_t_surf' .OR. var(1:10) == 'usm_t_wall' .OR. & |
---|
3414 | var(1:17) == 'usm_t_surf_window' .OR. var(1:12) == 'usm_t_window' .OR. & |
---|
3415 | var(1:16) == 'usm_t_surf_green' .OR. & |
---|
3416 | var(1:15) == 'usm_t_surf_10cm' .OR. & |
---|
3417 | var(1:9) == 'usm_surfz' .OR. var(1:7) == 'usm_svf' .OR. & |
---|
3418 | var(1:7) == 'usm_dif' .OR. var(1:11) == 'usm_surfcat' .OR. & |
---|
3419 | var(1:11) == 'usm_surfalb' .OR. var(1:12) == 'usm_surfemis' .OR. & |
---|
3420 | var(1:16) == 'usm_surfwintrans' .OR. & |
---|
3421 | var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' ) THEN |
---|
3422 | |
---|
3423 | found = .TRUE. |
---|
3424 | grid_x = 'x' |
---|
3425 | grid_y = 'y' |
---|
3426 | grid_z = 'zu' |
---|
3427 | ELSE |
---|
3428 | found = .FALSE. |
---|
3429 | grid_x = 'none' |
---|
3430 | grid_y = 'none' |
---|
3431 | grid_z = 'none' |
---|
3432 | ENDIF |
---|
3433 | |
---|
3434 | END SUBROUTINE usm_define_netcdf_grid |
---|
3435 | |
---|
3436 | |
---|
3437 | !------------------------------------------------------------------------------! |
---|
3438 | ! Description: |
---|
3439 | ! ------------ |
---|
3440 | !> Initialization of the wall surface model |
---|
3441 | !------------------------------------------------------------------------------! |
---|
3442 | SUBROUTINE usm_init_material_model |
---|
3443 | |
---|
3444 | IMPLICIT NONE |
---|
3445 | |
---|
3446 | INTEGER(iwp) :: k, l, m !< running indices |
---|
3447 | |
---|
3448 | CALL location_message( ' initialization of wall surface model', .TRUE. ) |
---|
3449 | |
---|
3450 | !-- Calculate wall grid spacings. |
---|
3451 | !-- Temperature is defined at the center of the wall layers, |
---|
3452 | !-- whereas gradients/fluxes are defined at the edges (_stag) |
---|
3453 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
3454 | DO m = 1, surf_usm_h%ns |
---|
3455 | |
---|
3456 | surf_usm_h%dz_wall(nzb_wall,m) = surf_usm_h%zw(nzb_wall,m) |
---|
3457 | DO k = nzb_wall+1, nzt_wall |
---|
3458 | surf_usm_h%dz_wall(k,m) = surf_usm_h%zw(k,m) - & |
---|
3459 | surf_usm_h%zw(k-1,m) |
---|
3460 | ENDDO |
---|
3461 | surf_usm_h%dz_window(nzb_wall,m) = surf_usm_h%zw_window(nzb_wall,m) |
---|
3462 | DO k = nzb_wall+1, nzt_wall |
---|
3463 | surf_usm_h%dz_window(k,m) = surf_usm_h%zw_window(k,m) - & |
---|
3464 | surf_usm_h%zw_window(k-1,m) |
---|
3465 | ENDDO |
---|
3466 | surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m) |
---|
3467 | DO k = nzb_wall+1, nzt_wall |
---|
3468 | surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) - & |
---|
3469 | surf_usm_h%zw_green(k-1,m) |
---|
3470 | ENDDO |
---|
3471 | |
---|
3472 | surf_usm_h%dz_wall(nzt_wall+1,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
3473 | |
---|
3474 | DO k = nzb_wall, nzt_wall-1 |
---|
3475 | surf_usm_h%dz_wall_stag(k,m) = 0.5 * ( & |
---|
3476 | surf_usm_h%dz_wall(k+1,m) + surf_usm_h%dz_wall(k,m) ) |
---|
3477 | ENDDO |
---|
3478 | surf_usm_h%dz_wall_stag(nzt_wall,m) = surf_usm_h%dz_wall(nzt_wall,m) |
---|
3479 | |
---|
3480 | surf_usm_h%dz_window(nzt_wall+1,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
3481 | |
---|
3482 | DO k = nzb_wall, nzt_wall-1 |
---|
3483 | surf_usm_h%dz_window_stag(k,m) = 0.5 * ( & |
---|
3484 | surf_usm_h%dz_window(k+1,m) + surf_usm_h%dz_window(k,m) ) |
---|
3485 | ENDDO |
---|
3486 | surf_usm_h%dz_window_stag(nzt_wall,m) = surf_usm_h%dz_window(nzt_wall,m) |
---|
3487 | |
---|
3488 | surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3489 | |
---|
3490 | DO k = nzb_wall, nzt_wall-1 |
---|
3491 | surf_usm_h%dz_green_stag(k,m) = 0.5 * ( & |
---|
3492 | surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) ) |
---|
3493 | ENDDO |
---|
3494 | surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m) |
---|
3495 | ENDDO |
---|
3496 | surf_usm_h%ddz_wall = 1.0_wp / surf_usm_h%dz_wall |
---|
3497 | surf_usm_h%ddz_wall_stag = 1.0_wp / surf_usm_h%dz_wall_stag |
---|
3498 | surf_usm_h%ddz_window = 1.0_wp / surf_usm_h%dz_window |
---|
3499 | surf_usm_h%ddz_window_stag = 1.0_wp / surf_usm_h%dz_window_stag |
---|
3500 | surf_usm_h%ddz_green = 1.0_wp / surf_usm_h%dz_green |
---|
3501 | surf_usm_h%ddz_green_stag = 1.0_wp / surf_usm_h%dz_green_stag |
---|
3502 | ! |
---|
3503 | !-- For vertical surfaces |
---|
3504 | DO l = 0, 3 |
---|
3505 | DO m = 1, surf_usm_v(l)%ns |
---|
3506 | surf_usm_v(l)%dz_wall(nzb_wall,m) = surf_usm_v(l)%zw(nzb_wall,m) |
---|
3507 | DO k = nzb_wall+1, nzt_wall |
---|
3508 | surf_usm_v(l)%dz_wall(k,m) = surf_usm_v(l)%zw(k,m) - & |
---|
3509 | surf_usm_v(l)%zw(k-1,m) |
---|
3510 | ENDDO |
---|
3511 | surf_usm_v(l)%dz_window(nzb_wall,m) = surf_usm_v(l)%zw_window(nzb_wall,m) |
---|
3512 | DO k = nzb_wall+1, nzt_wall |
---|
3513 | surf_usm_v(l)%dz_window(k,m) = surf_usm_v(l)%zw_window(k,m) - & |
---|
3514 | surf_usm_v(l)%zw_window(k-1,m) |
---|
3515 | ENDDO |
---|
3516 | surf_usm_v(l)%dz_green(nzb_wall,m) = surf_usm_v(l)%zw_green(nzb_wall,m) |
---|
3517 | DO k = nzb_wall+1, nzt_wall |
---|
3518 | surf_usm_v(l)%dz_green(k,m) = surf_usm_v(l)%zw_green(k,m) - & |
---|
3519 | surf_usm_v(l)%zw_green(k-1,m) |
---|
3520 | ENDDO |
---|
3521 | |
---|
3522 | surf_usm_v(l)%dz_wall(nzt_wall+1,m) = & |
---|
3523 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
3524 | |
---|
3525 | DO k = nzb_wall, nzt_wall-1 |
---|
3526 | surf_usm_v(l)%dz_wall_stag(k,m) = 0.5 * ( & |
---|
3527 | surf_usm_v(l)%dz_wall(k+1,m) + & |
---|
3528 | surf_usm_v(l)%dz_wall(k,m) ) |
---|
3529 | ENDDO |
---|
3530 | surf_usm_v(l)%dz_wall_stag(nzt_wall,m) = & |
---|
3531 | surf_usm_v(l)%dz_wall(nzt_wall,m) |
---|
3532 | surf_usm_v(l)%dz_window(nzt_wall+1,m) = & |
---|
3533 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
3534 | |
---|
3535 | DO k = nzb_wall, nzt_wall-1 |
---|
3536 | surf_usm_v(l)%dz_window_stag(k,m) = 0.5 * ( & |
---|
3537 | surf_usm_v(l)%dz_window(k+1,m) + & |
---|
3538 | surf_usm_v(l)%dz_window(k,m) ) |
---|
3539 | ENDDO |
---|
3540 | surf_usm_v(l)%dz_window_stag(nzt_wall,m) = & |
---|
3541 | surf_usm_v(l)%dz_window(nzt_wall,m) |
---|
3542 | surf_usm_v(l)%dz_green(nzt_wall+1,m) = & |
---|
3543 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
3544 | |
---|
3545 | DO k = nzb_wall, nzt_wall-1 |
---|
3546 | surf_usm_v(l)%dz_green_stag(k,m) = 0.5 * ( & |
---|
3547 | surf_usm_v(l)%dz_green(k+1,m) + & |
---|
3548 | surf_usm_v(l)%dz_green(k,m) ) |
---|
3549 | ENDDO |
---|
3550 | surf_usm_v(l)%dz_green_stag(nzt_wall,m) = & |
---|
3551 | surf_usm_v(l)%dz_green(nzt_wall,m) |
---|
3552 | ENDDO |
---|
3553 | surf_usm_v(l)%ddz_wall = 1.0_wp / surf_usm_v(l)%dz_wall |
---|
3554 | surf_usm_v(l)%ddz_wall_stag = 1.0_wp / surf_usm_v(l)%dz_wall_stag |
---|
3555 | surf_usm_v(l)%ddz_window = 1.0_wp / surf_usm_v(l)%dz_window |
---|
3556 | surf_usm_v(l)%ddz_window_stag = 1.0_wp / surf_usm_v(l)%dz_window_stag |
---|
3557 | surf_usm_v(l)%ddz_green = 1.0_wp / surf_usm_v(l)%dz_green |
---|
3558 | surf_usm_v(l)%ddz_green_stag = 1.0_wp / surf_usm_v(l)%dz_green_stag |
---|
3559 | ENDDO |
---|
3560 | |
---|
3561 | |
---|
3562 | CALL location_message( ' wall structures filed out', .TRUE. ) |
---|
3563 | |
---|
3564 | CALL location_message( ' initialization of wall surface model finished', .TRUE. ) |
---|
3565 | |
---|
3566 | END SUBROUTINE usm_init_material_model |
---|
3567 | |
---|
3568 | |
---|
3569 | !------------------------------------------------------------------------------! |
---|
3570 | ! Description: |
---|
3571 | ! ------------ |
---|
3572 | !> Initialization of the urban surface model |
---|
3573 | !------------------------------------------------------------------------------! |
---|
3574 | SUBROUTINE usm_init_urban_surface |
---|
3575 | |
---|
3576 | USE arrays_3d, & |
---|
3577 | ONLY: zw |
---|
3578 | |
---|
3579 | USE netcdf_data_input_mod, & |
---|
3580 | ONLY: building_pars_f, building_type_f, terrain_height_f |
---|
3581 | |
---|
3582 | IMPLICIT NONE |
---|
3583 | |
---|
3584 | INTEGER(iwp) :: i !< loop index x-dirction |
---|
3585 | INTEGER(iwp) :: ind_emis_wall !< index in input list for wall emissivity |
---|
3586 | INTEGER(iwp) :: ind_emis_green !< index in input list for green emissivity |
---|
3587 | INTEGER(iwp) :: ind_emis_win !< index in input list for window emissivity |
---|
3588 | INTEGER(iwp) :: ind_green_frac_w !< index in input list for green fraction on wall |
---|
3589 | INTEGER(iwp) :: ind_green_frac_r !< index in input list for green fraction on roof |
---|
3590 | INTEGER(iwp) :: ind_hc1 !< index in input list for heat capacity at first wall layer |
---|
3591 | INTEGER(iwp) :: ind_hc2 !< index in input list for heat capacity at second wall layer |
---|
3592 | INTEGER(iwp) :: ind_hc3 !< index in input list for heat capacity at third wall layer |
---|
3593 | INTEGER(iwp) :: ind_lai_r !< index in input list for LAI on roof |
---|
3594 | INTEGER(iwp) :: ind_lai_w !< index in input list for LAI on wall |
---|
3595 | INTEGER(iwp) :: ind_tc1 !< index in input list for thermal conductivity at first wall layer |
---|
3596 | INTEGER(iwp) :: ind_tc2 !< index in input list for thermal conductivity at second wall layer |
---|
3597 | INTEGER(iwp) :: ind_tc3 !< index in input list for thermal conductivity at third wall layer |
---|
3598 | INTEGER(iwp) :: ind_trans !< index in input list for window transmissivity |
---|
3599 | INTEGER(iwp) :: ind_wall_frac !< index in input list for wall fraction |
---|
3600 | INTEGER(iwp) :: ind_win_frac !< index in input list for window fraction |
---|
3601 | INTEGER(iwp) :: ind_z0 !< index in input list for z0 |
---|
3602 | INTEGER(iwp) :: ind_z0qh !< index in input list for z0h / z0q |
---|
3603 | INTEGER(iwp) :: j !< loop index y-dirction |
---|
3604 | INTEGER(iwp) :: k !< loop index z-dirction |
---|
3605 | INTEGER(iwp) :: l !< loop index surface orientation |
---|
3606 | INTEGER(iwp) :: m !< loop index surface element |
---|
3607 | INTEGER(iwp) :: st !< dummy |
---|
3608 | |
---|
3609 | REAL(wp) :: c, d, tin, twin |
---|
3610 | REAL(wp) :: ground_floor_level_l !< local height of ground floor level |
---|
3611 | REAL(wp) :: z_agl !< height above ground |
---|
3612 | REAL(wp), DIMENSION(nzb:nzt) :: exn !< value of the Exner function in layers |
---|
3613 | |
---|
3614 | ! |
---|
3615 | !-- NOPOINTER version not implemented yet |
---|
3616 | #if defined( __nopointer ) |
---|
3617 | message_string = 'The urban surface module only runs with POINTER version' |
---|
3618 | CALL message( 'urban_surface_mod', 'PA0452', 1, 2, 0, 6, 0 ) |
---|
3619 | #endif |
---|
3620 | |
---|
3621 | CALL cpu_log( log_point_s(78), 'usm_init', 'start' ) |
---|
3622 | !-- surface forcing have to be disabled for LSF |
---|
3623 | !-- in case of enabled urban surface module |
---|
3624 | IF ( large_scale_forcing ) THEN |
---|
3625 | lsf_surf = .FALSE. |
---|
3626 | ENDIF |
---|
3627 | |
---|
3628 | ! |
---|
3629 | !-- Flag surface elements belonging to the ground floor level. Therefore, |
---|
3630 | !-- use terrain height array from file, if available. This flag is later used |
---|
3631 | !-- to control initialization of surface attributes. |
---|
3632 | surf_usm_h%ground_level = .FALSE. |
---|
3633 | DO m = 1, surf_usm_h%ns |
---|
3634 | i = surf_usm_h%i(m) |
---|
3635 | j = surf_usm_h%j(m) |
---|
3636 | k = surf_usm_h%k(m) |
---|
3637 | ! |
---|
3638 | !-- Get local ground level. If no ground level is given in input file, |
---|
3639 | !-- use default value. |
---|
3640 | ground_floor_level_l = ground_floor_level |
---|
3641 | IF ( building_pars_f%from_file ) THEN |
---|
3642 | IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
3643 | building_pars_f%fill ) & |
---|
3644 | ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
3645 | ENDIF |
---|
3646 | ! |
---|
3647 | !-- Determine height of surface element above ground level |
---|
3648 | IF ( terrain_height_f%from_file ) THEN |
---|
3649 | z_agl = zw(k) - terrain_height_f%var(j,i) |
---|
3650 | ELSE |
---|
3651 | z_agl = zw(k) |
---|
3652 | ENDIF |
---|
3653 | ! |
---|
3654 | !-- Set flag for ground level |
---|
3655 | IF ( z_agl <= ground_floor_level_l ) & |
---|
3656 | surf_usm_h%ground_level(m) = .TRUE. |
---|
3657 | ENDDO |
---|
3658 | |
---|
3659 | DO l = 0, 3 |
---|
3660 | surf_usm_v(l)%ground_level = .FALSE. |
---|
3661 | DO m = 1, surf_usm_v(l)%ns |
---|
3662 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
3663 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
3664 | k = surf_usm_v(l)%k(m) |
---|
3665 | ! |
---|
3666 | !-- Get local ground level. If no ground level is given in input file, |
---|
3667 | !-- use default value. |
---|
3668 | ground_floor_level_l = ground_floor_level |
---|
3669 | IF ( building_pars_f%from_file ) THEN |
---|
3670 | IF ( building_pars_f%pars_xy(ind_gflh,j,i) /= & |
---|
3671 | building_pars_f%fill ) & |
---|
3672 | ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i) |
---|
3673 | ENDIF |
---|
3674 | ! |
---|
3675 | !-- Determine height of surface element above ground level. Please |
---|
3676 | !-- note, height of surface element is determined with respect to |
---|
3677 | !-- its height of the adjoing atmospheric grid point. |
---|
3678 | IF ( terrain_height_f%from_file ) THEN |
---|
3679 | z_agl = zw(k) - terrain_height_f%var(j-surf_usm_v(l)%joff, & |
---|
3680 | i-surf_usm_v(l)%ioff) |
---|
3681 | ELSE |
---|
3682 | z_agl = zw(k) |
---|
3683 | ENDIF |
---|
3684 | ! |
---|
3685 | !-- Set flag for ground level |
---|
3686 | IF ( z_agl <= ground_floor_level_l ) & |
---|
3687 | surf_usm_v(l)%ground_level(m) = .TRUE. |
---|
3688 | |
---|
3689 | ENDDO |
---|
3690 | ENDDO |
---|
3691 | ! |
---|
3692 | !-- Initialization of resistances. |
---|
3693 | DO m = 1, surf_usm_h%ns |
---|
3694 | surf_usm_h%r_a(m) = 50.0_wp |
---|
3695 | surf_usm_h%r_a_green(m) = 50.0_wp |
---|
3696 | surf_usm_h%r_a_window(m) = 50.0_wp |
---|
3697 | ENDDO |
---|
3698 | DO l = 0, 3 |
---|
3699 | DO m = 1, surf_usm_v(l)%ns |
---|
3700 | surf_usm_v(l)%r_a(m) = 50.0_wp |
---|
3701 | surf_usm_v(l)%r_a_green(m) = 50.0_wp |
---|
3702 | surf_usm_v(l)%r_a_window(m) = 50.0_wp |
---|
3703 | ENDDO |
---|
3704 | ENDDO |
---|
3705 | ! |
---|
3706 | !-- Initialize urban-type surface attribute. According to initialization in |
---|
3707 | !-- land-surface model, follow a 3-level approach. |
---|
3708 | !-- Level 1 - initialization via default attributes |
---|
3709 | DO m = 1, surf_usm_h%ns |
---|
3710 | ! |
---|
3711 | !-- Now, all horizontal surfaces are roof surfaces (?) |
---|
3712 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
3713 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
3714 | ! |
---|
3715 | !-- In order to distinguish between ground floor level and |
---|
3716 | !-- above-ground-floor level surfaces, set input indices. |
---|
3717 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
3718 | surf_usm_h%ground_level(m) ) |
---|
3719 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
3720 | surf_usm_h%ground_level(m) ) |
---|
3721 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
3722 | surf_usm_h%ground_level(m) ) |
---|
3723 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
3724 | surf_usm_h%ground_level(m) ) |
---|
3725 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
3726 | surf_usm_h%ground_level(m) ) |
---|
3727 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
3728 | surf_usm_h%ground_level(m) ) |
---|
3729 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
3730 | surf_usm_h%ground_level(m) ) |
---|
3731 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
3732 | surf_usm_h%ground_level(m) ) |
---|
3733 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
3734 | surf_usm_h%ground_level(m) ) |
---|
3735 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
3736 | surf_usm_h%ground_level(m) ) |
---|
3737 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
3738 | surf_usm_h%ground_level(m) ) |
---|
3739 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
3740 | surf_usm_h%ground_level(m) ) |
---|
3741 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
3742 | surf_usm_h%ground_level(m) ) |
---|
3743 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
3744 | surf_usm_h%ground_level(m) ) |
---|
3745 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
3746 | surf_usm_h%ground_level(m) ) |
---|
3747 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
3748 | surf_usm_h%ground_level(m) ) |
---|
3749 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
3750 | surf_usm_h%ground_level(m) ) |
---|
3751 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
3752 | surf_usm_h%ground_level(m) ) |
---|
3753 | ! |
---|
3754 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
3755 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,building_type) |
---|
3756 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,building_type) |
---|
3757 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac,building_type) |
---|
3758 | surf_usm_h%lai(m) = building_pars(ind_green_frac_r,building_type) |
---|
3759 | |
---|
3760 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
3761 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
3762 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
3763 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
3764 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
3765 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
3766 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
3767 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
3768 | surf_usm_h%rho_c_green(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
3769 | surf_usm_h%rho_c_green(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
3770 | surf_usm_h%rho_c_green(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
3771 | surf_usm_h%rho_c_green(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
3772 | surf_usm_h%lambda_h_green(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
3773 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
3774 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
3775 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
3776 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
3777 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
3778 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
3779 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
3780 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
3781 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
3782 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
3783 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
3784 | |
---|
3785 | surf_usm_h%target_temp_summer(m) = building_pars(12,building_type) |
---|
3786 | surf_usm_h%target_temp_winter(m) = building_pars(13,building_type) |
---|
3787 | ! |
---|
3788 | !-- emissivity of wall-, green- and window fraction |
---|
3789 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,building_type) |
---|
3790 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,building_type) |
---|
3791 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,building_type) |
---|
3792 | |
---|
3793 | surf_usm_h%transmissivity(m) = building_pars(ind_trans,building_type) |
---|
3794 | |
---|
3795 | surf_usm_h%z0(m) = building_pars(ind_z0,building_type) |
---|
3796 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
3797 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
3798 | ! |
---|
3799 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
3800 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,building_type) ) |
---|
3801 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,building_type) ) |
---|
3802 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,building_type) ) |
---|
3803 | |
---|
3804 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
3805 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
3806 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
3807 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
3808 | |
---|
3809 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
3810 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
3811 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
3812 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
3813 | |
---|
3814 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
3815 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
3816 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
3817 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
3818 | |
---|
3819 | surf_usm_h%c_surface(m) = building_pars(45,building_type) |
---|
3820 | surf_usm_h%lambda_surf(m) = building_pars(46,building_type) |
---|
3821 | surf_usm_h%c_surface_green(m) = building_pars(45,building_type) |
---|
3822 | surf_usm_h%lambda_surf_green(m) = building_pars(46,building_type) |
---|
3823 | surf_usm_h%c_surface_window(m) = building_pars(45,building_type) |
---|
3824 | surf_usm_h%lambda_surf_window(m) = building_pars(46,building_type) |
---|
3825 | |
---|
3826 | ENDDO |
---|
3827 | |
---|
3828 | DO l = 0, 3 |
---|
3829 | DO m = 1, surf_usm_v(l)%ns |
---|
3830 | |
---|
3831 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for root surface |
---|
3832 | ! |
---|
3833 | !-- In order to distinguish between ground floor level and |
---|
3834 | !-- above-ground-floor level surfaces, set input indices. |
---|
3835 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
3836 | surf_usm_v(l)%ground_level(m) ) |
---|
3837 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
3838 | surf_usm_v(l)%ground_level(m) ) |
---|
3839 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
3840 | surf_usm_v(l)%ground_level(m) ) |
---|
3841 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
3842 | surf_usm_v(l)%ground_level(m) ) |
---|
3843 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
3844 | surf_usm_v(l)%ground_level(m) ) |
---|
3845 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
3846 | surf_usm_v(l)%ground_level(m) ) |
---|
3847 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
3848 | surf_usm_v(l)%ground_level(m) ) |
---|
3849 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
3850 | surf_usm_v(l)%ground_level(m) ) |
---|
3851 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
3852 | surf_usm_v(l)%ground_level(m) ) |
---|
3853 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
3854 | surf_usm_v(l)%ground_level(m) ) |
---|
3855 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
3856 | surf_usm_v(l)%ground_level(m) ) |
---|
3857 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
3858 | surf_usm_v(l)%ground_level(m) ) |
---|
3859 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
3860 | surf_usm_v(l)%ground_level(m) ) |
---|
3861 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
3862 | surf_usm_v(l)%ground_level(m) ) |
---|
3863 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
3864 | surf_usm_v(l)%ground_level(m) ) |
---|
3865 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
3866 | surf_usm_v(l)%ground_level(m) ) |
---|
3867 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
3868 | surf_usm_v(l)%ground_level(m) ) |
---|
3869 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
3870 | surf_usm_v(l)%ground_level(m) ) |
---|
3871 | |
---|
3872 | ! |
---|
3873 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
3874 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,building_type) |
---|
3875 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,building_type) |
---|
3876 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,building_type) |
---|
3877 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,building_type) |
---|
3878 | |
---|
3879 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
3880 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
3881 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
3882 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
3883 | |
---|
3884 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
3885 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
3886 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
3887 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
3888 | |
---|
3889 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1,building_type) |
---|
3890 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1,building_type) |
---|
3891 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2,building_type) |
---|
3892 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3,building_type) |
---|
3893 | |
---|
3894 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
3895 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
3896 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
3897 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
3898 | |
---|
3899 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
3900 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
3901 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
3902 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
3903 | |
---|
3904 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1,building_type) |
---|
3905 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1,building_type) |
---|
3906 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2,building_type) |
---|
3907 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3,building_type) |
---|
3908 | |
---|
3909 | surf_usm_v(l)%target_temp_summer(m) = building_pars(12,building_type) |
---|
3910 | surf_usm_v(l)%target_temp_winter(m) = building_pars(13,building_type) |
---|
3911 | ! |
---|
3912 | !-- emissivity of wall-, green- and window fraction |
---|
3913 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,building_type) |
---|
3914 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,building_type) |
---|
3915 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,building_type) |
---|
3916 | |
---|
3917 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,building_type) |
---|
3918 | |
---|
3919 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,building_type) |
---|
3920 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,building_type) |
---|
3921 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,building_type) |
---|
3922 | |
---|
3923 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,building_type) ) |
---|
3924 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,building_type) ) |
---|
3925 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,building_type) ) |
---|
3926 | |
---|
3927 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
3928 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
3929 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
3930 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
3931 | |
---|
3932 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
3933 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
3934 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
3935 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
3936 | |
---|
3937 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1,building_type) |
---|
3938 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2,building_type) |
---|
3939 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3,building_type) |
---|
3940 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4,building_type) |
---|
3941 | |
---|
3942 | surf_usm_v(l)%c_surface(m) = building_pars(45,building_type) |
---|
3943 | surf_usm_v(l)%lambda_surf(m) = building_pars(46,building_type) |
---|
3944 | surf_usm_v(l)%c_surface_green(m) = building_pars(45,building_type) |
---|
3945 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(46,building_type) |
---|
3946 | surf_usm_v(l)%c_surface_window(m) = building_pars(45,building_type) |
---|
3947 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(46,building_type) |
---|
3948 | |
---|
3949 | ENDDO |
---|
3950 | ENDDO |
---|
3951 | ! |
---|
3952 | !-- Level 2 - initialization via building type read from file |
---|
3953 | IF ( building_type_f%from_file ) THEN |
---|
3954 | DO m = 1, surf_usm_h%ns |
---|
3955 | i = surf_usm_h%i(m) |
---|
3956 | j = surf_usm_h%j(m) |
---|
3957 | ! |
---|
3958 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
3959 | st = building_type_f%var(j,i) |
---|
3960 | IF ( st /= building_type_f%fill ) THEN |
---|
3961 | |
---|
3962 | ! |
---|
3963 | !-- In order to distinguish between ground floor level and |
---|
3964 | !-- above-ground-floor level surfaces, set input indices. |
---|
3965 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
3966 | surf_usm_h%ground_level(m) ) |
---|
3967 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
3968 | surf_usm_h%ground_level(m) ) |
---|
3969 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
3970 | surf_usm_h%ground_level(m) ) |
---|
3971 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
3972 | surf_usm_h%ground_level(m) ) |
---|
3973 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
3974 | surf_usm_h%ground_level(m) ) |
---|
3975 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
3976 | surf_usm_h%ground_level(m) ) |
---|
3977 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
3978 | surf_usm_h%ground_level(m) ) |
---|
3979 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
3980 | surf_usm_h%ground_level(m) ) |
---|
3981 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
3982 | surf_usm_h%ground_level(m) ) |
---|
3983 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
3984 | surf_usm_h%ground_level(m) ) |
---|
3985 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
3986 | surf_usm_h%ground_level(m) ) |
---|
3987 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
3988 | surf_usm_h%ground_level(m) ) |
---|
3989 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
3990 | surf_usm_h%ground_level(m) ) |
---|
3991 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
3992 | surf_usm_h%ground_level(m) ) |
---|
3993 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
3994 | surf_usm_h%ground_level(m) ) |
---|
3995 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
3996 | surf_usm_h%ground_level(m) ) |
---|
3997 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
3998 | surf_usm_h%ground_level(m) ) |
---|
3999 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4000 | surf_usm_h%ground_level(m) ) |
---|
4001 | |
---|
4002 | ! |
---|
4003 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4004 | surf_usm_h%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,st) |
---|
4005 | surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,st) |
---|
4006 | surf_usm_h%frac(ind_wat_win,m) = building_pars(ind_win_frac,st) |
---|
4007 | surf_usm_h%lai(m) = building_pars(ind_green_frac_r,st) |
---|
4008 | |
---|
4009 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
4010 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
4011 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
4012 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
4013 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
4014 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
4015 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
4016 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
4017 | |
---|
4018 | surf_usm_h%rho_c_green(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
4019 | surf_usm_h%rho_c_green(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
4020 | surf_usm_h%rho_c_green(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
4021 | surf_usm_h%rho_c_green(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
4022 | surf_usm_h%lambda_h_green(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
4023 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
4024 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
4025 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
4026 | |
---|
4027 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
4028 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
4029 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
4030 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
4031 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
4032 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
4033 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
4034 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
4035 | |
---|
4036 | surf_usm_h%target_temp_summer(m) = building_pars(12,st) |
---|
4037 | surf_usm_h%target_temp_winter(m) = building_pars(13,st) |
---|
4038 | ! |
---|
4039 | !-- emissivity of wall-, green- and window fraction |
---|
4040 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,st) |
---|
4041 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,st) |
---|
4042 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,st) |
---|
4043 | |
---|
4044 | surf_usm_h%transmissivity(m) = building_pars(ind_trans,st) |
---|
4045 | |
---|
4046 | surf_usm_h%z0(m) = building_pars(ind_z0,st) |
---|
4047 | surf_usm_h%z0h(m) = building_pars(ind_z0qh,st) |
---|
4048 | surf_usm_h%z0q(m) = building_pars(ind_z0qh,st) |
---|
4049 | ! |
---|
4050 | !-- albedo type for wall fraction, green fraction, window fraction |
---|
4051 | surf_usm_h%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,st) ) |
---|
4052 | surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,st) ) |
---|
4053 | surf_usm_h%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,st) ) |
---|
4054 | |
---|
4055 | surf_usm_h%zw(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4056 | surf_usm_h%zw(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4057 | surf_usm_h%zw(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4058 | surf_usm_h%zw(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4059 | |
---|
4060 | surf_usm_h%zw_green(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4061 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4062 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4063 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4064 | |
---|
4065 | surf_usm_h%zw_window(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4066 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4067 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4068 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4069 | |
---|
4070 | surf_usm_h%c_surface(m) = building_pars(45,st) |
---|
4071 | surf_usm_h%lambda_surf(m) = building_pars(46,st) |
---|
4072 | surf_usm_h%c_surface_green(m) = building_pars(45,st) |
---|
4073 | surf_usm_h%lambda_surf_green(m) = building_pars(46,st) |
---|
4074 | surf_usm_h%c_surface_window(m) = building_pars(45,st) |
---|
4075 | surf_usm_h%lambda_surf_window(m) = building_pars(46,st) |
---|
4076 | |
---|
4077 | ENDIF |
---|
4078 | ENDDO |
---|
4079 | |
---|
4080 | DO l = 0, 3 |
---|
4081 | DO m = 1, surf_usm_v(l)%ns |
---|
4082 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4083 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4084 | ! |
---|
4085 | !-- For the moment, limit building type to 6 (to overcome errors in input file). |
---|
4086 | |
---|
4087 | st = building_type_f%var(j,i) |
---|
4088 | IF ( st /= building_type_f%fill ) THEN |
---|
4089 | |
---|
4090 | ! |
---|
4091 | !-- In order to distinguish between ground floor level and |
---|
4092 | !-- above-ground-floor level surfaces, set input indices. |
---|
4093 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4094 | surf_usm_v(l)%ground_level(m) ) |
---|
4095 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4096 | surf_usm_v(l)%ground_level(m) ) |
---|
4097 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4098 | surf_usm_v(l)%ground_level(m) ) |
---|
4099 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4100 | surf_usm_v(l)%ground_level(m) ) |
---|
4101 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4102 | surf_usm_v(l)%ground_level(m) ) |
---|
4103 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4104 | surf_usm_v(l)%ground_level(m) ) |
---|
4105 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4106 | surf_usm_v(l)%ground_level(m) ) |
---|
4107 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4108 | surf_usm_v(l)%ground_level(m) ) |
---|
4109 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4110 | surf_usm_v(l)%ground_level(m) ) |
---|
4111 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4112 | surf_usm_v(l)%ground_level(m) ) |
---|
4113 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4114 | surf_usm_v(l)%ground_level(m) ) |
---|
4115 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4116 | surf_usm_v(l)%ground_level(m) ) |
---|
4117 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4118 | surf_usm_v(l)%ground_level(m) ) |
---|
4119 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4120 | surf_usm_v(l)%ground_level(m) ) |
---|
4121 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4122 | surf_usm_v(l)%ground_level(m) ) |
---|
4123 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4124 | surf_usm_v(l)%ground_level(m) ) |
---|
4125 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4126 | surf_usm_v(l)%ground_level(m) ) |
---|
4127 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4128 | surf_usm_v(l)%ground_level(m) ) |
---|
4129 | |
---|
4130 | ! |
---|
4131 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4132 | surf_usm_v(l)%frac(ind_veg_wall,m) = building_pars(ind_wall_frac,st) |
---|
4133 | surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,st) |
---|
4134 | surf_usm_v(l)%frac(ind_wat_win,m) = building_pars(ind_win_frac,st) |
---|
4135 | surf_usm_v(l)%lai(m) = building_pars(ind_lai_w,st) |
---|
4136 | |
---|
4137 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
4138 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
4139 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
4140 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
4141 | |
---|
4142 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
4143 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
4144 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
4145 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
4146 | |
---|
4147 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars(ind_hc1,st) |
---|
4148 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1,st) |
---|
4149 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2,st) |
---|
4150 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3,st) |
---|
4151 | |
---|
4152 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
4153 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
4154 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
4155 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
4156 | |
---|
4157 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
4158 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
4159 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
4160 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
4161 | |
---|
4162 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars(ind_tc1,st) |
---|
4163 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1,st) |
---|
4164 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2,st) |
---|
4165 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3,st) |
---|
4166 | |
---|
4167 | surf_usm_v(l)%target_temp_summer(m) = building_pars(12,st) |
---|
4168 | surf_usm_v(l)%target_temp_winter(m) = building_pars(13,st) |
---|
4169 | ! |
---|
4170 | !-- emissivity of wall-, green- and window fraction |
---|
4171 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars(ind_emis_wall,st) |
---|
4172 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,st) |
---|
4173 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars(ind_emis_win,st) |
---|
4174 | |
---|
4175 | surf_usm_v(l)%transmissivity(m) = building_pars(ind_trans,st) |
---|
4176 | |
---|
4177 | surf_usm_v(l)%z0(m) = building_pars(ind_z0,st) |
---|
4178 | surf_usm_v(l)%z0h(m) = building_pars(ind_z0qh,st) |
---|
4179 | surf_usm_v(l)%z0q(m) = building_pars(ind_z0qh,st) |
---|
4180 | |
---|
4181 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = INT( building_pars(ind_alb_wall,st) ) |
---|
4182 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,st) ) |
---|
4183 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = INT( building_pars(ind_alb_win,st) ) |
---|
4184 | |
---|
4185 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4186 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4187 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4188 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4189 | |
---|
4190 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4191 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4192 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4193 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4194 | |
---|
4195 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars(ind_thick_1,st) |
---|
4196 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars(ind_thick_2,st) |
---|
4197 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars(ind_thick_3,st) |
---|
4198 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars(ind_thick_4,st) |
---|
4199 | |
---|
4200 | surf_usm_v(l)%c_surface(m) = building_pars(45,st) |
---|
4201 | surf_usm_v(l)%lambda_surf(m) = building_pars(46,st) |
---|
4202 | surf_usm_v(l)%c_surface_green(m) = building_pars(45,st) |
---|
4203 | surf_usm_v(l)%lambda_surf_green(m) = building_pars(46,st) |
---|
4204 | surf_usm_v(l)%c_surface_window(m) = building_pars(45,st) |
---|
4205 | surf_usm_v(l)%lambda_surf_window(m) = building_pars(46,st) |
---|
4206 | |
---|
4207 | |
---|
4208 | ENDIF |
---|
4209 | ENDDO |
---|
4210 | ENDDO |
---|
4211 | ENDIF |
---|
4212 | |
---|
4213 | ! |
---|
4214 | !-- Level 3 - initialization via building_pars read from file |
---|
4215 | IF ( building_pars_f%from_file ) THEN |
---|
4216 | DO m = 1, surf_usm_h%ns |
---|
4217 | i = surf_usm_h%i(m) |
---|
4218 | j = surf_usm_h%j(m) |
---|
4219 | |
---|
4220 | ! |
---|
4221 | !-- In order to distinguish between ground floor level and |
---|
4222 | !-- above-ground-floor level surfaces, set input indices. |
---|
4223 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4224 | surf_usm_h%ground_level(m) ) |
---|
4225 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4226 | surf_usm_h%ground_level(m) ) |
---|
4227 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4228 | surf_usm_h%ground_level(m) ) |
---|
4229 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4230 | surf_usm_h%ground_level(m) ) |
---|
4231 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4232 | surf_usm_h%ground_level(m) ) |
---|
4233 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4234 | surf_usm_h%ground_level(m) ) |
---|
4235 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4236 | surf_usm_h%ground_level(m) ) |
---|
4237 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4238 | surf_usm_h%ground_level(m) ) |
---|
4239 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4240 | surf_usm_h%ground_level(m) ) |
---|
4241 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4242 | surf_usm_h%ground_level(m) ) |
---|
4243 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4244 | surf_usm_h%ground_level(m) ) |
---|
4245 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4246 | surf_usm_h%ground_level(m) ) |
---|
4247 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4248 | surf_usm_h%ground_level(m) ) |
---|
4249 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4250 | surf_usm_h%ground_level(m) ) |
---|
4251 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4252 | surf_usm_h%ground_level(m) ) |
---|
4253 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4254 | surf_usm_h%ground_level(m) ) |
---|
4255 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4256 | surf_usm_h%ground_level(m) ) |
---|
4257 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4258 | surf_usm_h%ground_level(m) ) |
---|
4259 | |
---|
4260 | ! |
---|
4261 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4262 | IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= building_pars_f%fill ) & |
---|
4263 | surf_usm_h%frac(ind_veg_wall,m) = building_pars_f%pars_xy(ind_wall_frac,j,i) |
---|
4264 | IF ( building_pars_f%pars_xy(ind_green_frac_r,j,i) /= building_pars_f%fill ) & |
---|
4265 | surf_usm_h%frac(ind_pav_green,m) = building_pars_f%pars_xy(ind_green_frac_r,j,i) |
---|
4266 | IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= building_pars_f%fill ) & |
---|
4267 | surf_usm_h%frac(ind_wat_win,m) = building_pars_f%pars_xy(ind_win_frac,j,i) |
---|
4268 | |
---|
4269 | |
---|
4270 | IF ( building_pars_f%pars_xy(ind_lai_r,j,i) /= building_pars_f%fill ) & |
---|
4271 | surf_usm_h%lai(m) = building_pars_f%pars_xy(ind_lai_r,j,i) |
---|
4272 | |
---|
4273 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
4274 | surf_usm_h%rho_c_wall(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4275 | surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4276 | ENDIF |
---|
4277 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4278 | surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4279 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4280 | surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4281 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
4282 | surf_usm_h%rho_c_green(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4283 | surf_usm_h%rho_c_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4284 | ENDIF |
---|
4285 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4286 | surf_usm_h%rho_c_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4287 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4288 | surf_usm_h%rho_c_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4289 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
4290 | surf_usm_h%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4291 | surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4292 | ENDIF |
---|
4293 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4294 | surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4295 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4296 | surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4297 | |
---|
4298 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4299 | surf_usm_h%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4300 | surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4301 | ENDIF |
---|
4302 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4303 | surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4304 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4305 | surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4306 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4307 | surf_usm_h%lambda_h_green(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4308 | surf_usm_h%lambda_h_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4309 | ENDIF |
---|
4310 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4311 | surf_usm_h%lambda_h_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4312 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4313 | surf_usm_h%lambda_h_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4314 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4315 | surf_usm_h%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4316 | surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4317 | ENDIF |
---|
4318 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4319 | surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4320 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4321 | surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4322 | |
---|
4323 | IF ( building_pars_f%pars_xy(12,j,i) /= building_pars_f%fill ) & |
---|
4324 | surf_usm_h%target_temp_summer(m) = building_pars_f%pars_xy(12,j,i) |
---|
4325 | IF ( building_pars_f%pars_xy(13,j,i) /= building_pars_f%fill ) & |
---|
4326 | surf_usm_h%target_temp_winter(m) = building_pars_f%pars_xy(13,j,i) |
---|
4327 | |
---|
4328 | IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill ) & |
---|
4329 | surf_usm_h%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall,j,i) |
---|
4330 | IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )& |
---|
4331 | surf_usm_h%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green,j,i) |
---|
4332 | IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill ) & |
---|
4333 | surf_usm_h%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win,j,i) |
---|
4334 | |
---|
4335 | IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill ) & |
---|
4336 | surf_usm_h%transmissivity(m) = building_pars_f%pars_xy(ind_trans,j,i) |
---|
4337 | |
---|
4338 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
4339 | surf_usm_h%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
4340 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4341 | surf_usm_h%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4342 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4343 | surf_usm_h%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4344 | |
---|
4345 | IF ( building_pars_f%pars_xy(ind_alb_wall,j,i) /= building_pars_f%fill ) & |
---|
4346 | surf_usm_h%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall,j,i) |
---|
4347 | IF ( building_pars_f%pars_xy(ind_alb_green,j,i) /= building_pars_f%fill ) & |
---|
4348 | surf_usm_h%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green,j,i) |
---|
4349 | IF ( building_pars_f%pars_xy(ind_alb_win,j,i) /= building_pars_f%fill ) & |
---|
4350 | surf_usm_h%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win,j,i) |
---|
4351 | |
---|
4352 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
4353 | surf_usm_h%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
4354 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
4355 | surf_usm_h%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
4356 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
4357 | surf_usm_h%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
4358 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
4359 | surf_usm_h%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
4360 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
4361 | surf_usm_h%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
4362 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
4363 | surf_usm_h%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
4364 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
4365 | surf_usm_h%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
4366 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
4367 | surf_usm_h%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
4368 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
4369 | surf_usm_h%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
4370 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
4371 | surf_usm_h%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
4372 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
4373 | surf_usm_h%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
4374 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
4375 | surf_usm_h%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
4376 | |
---|
4377 | IF ( building_pars_f%pars_xy(45,j,i) /= building_pars_f%fill ) & |
---|
4378 | surf_usm_h%c_surface(m) = building_pars_f%pars_xy(45,j,i) |
---|
4379 | IF ( building_pars_f%pars_xy(46,j,i) /= building_pars_f%fill ) & |
---|
4380 | surf_usm_h%lambda_surf(m) = building_pars_f%pars_xy(46,j,i) |
---|
4381 | IF ( building_pars_f%pars_xy(45,j,i) /= building_pars_f%fill ) & |
---|
4382 | surf_usm_h%c_surface_green(m) = building_pars_f%pars_xy(45,j,i) |
---|
4383 | IF ( building_pars_f%pars_xy(46,j,i) /= building_pars_f%fill ) & |
---|
4384 | surf_usm_h%lambda_surf_green(m) = building_pars_f%pars_xy(46,j,i) |
---|
4385 | IF ( building_pars_f%pars_xy(45,j,i) /= building_pars_f%fill ) & |
---|
4386 | surf_usm_h%c_surface_window(m) = building_pars_f%pars_xy(45,j,i) |
---|
4387 | IF ( building_pars_f%pars_xy(46,j,i) /= building_pars_f%fill ) & |
---|
4388 | surf_usm_h%lambda_surf_window(m) = building_pars_f%pars_xy(46,j,i) |
---|
4389 | ENDDO |
---|
4390 | |
---|
4391 | |
---|
4392 | |
---|
4393 | DO l = 0, 3 |
---|
4394 | DO m = 1, surf_usm_v(l)%ns |
---|
4395 | i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff |
---|
4396 | j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff |
---|
4397 | |
---|
4398 | ! |
---|
4399 | !-- In order to distinguish between ground floor level and |
---|
4400 | !-- above-ground-floor level surfaces, set input indices. |
---|
4401 | ind_wall_frac = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl, & |
---|
4402 | surf_usm_v(l)%ground_level(m) ) |
---|
4403 | ind_win_frac = MERGE( ind_win_frac_gfl, ind_win_frac_agfl, & |
---|
4404 | surf_usm_v(l)%ground_level(m) ) |
---|
4405 | ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, & |
---|
4406 | surf_usm_v(l)%ground_level(m) ) |
---|
4407 | ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, & |
---|
4408 | surf_usm_v(l)%ground_level(m) ) |
---|
4409 | ind_lai_r = MERGE( ind_lai_r_gfl, ind_lai_r_agfl, & |
---|
4410 | surf_usm_v(l)%ground_level(m) ) |
---|
4411 | ind_lai_w = MERGE( ind_lai_w_gfl, ind_lai_w_agfl, & |
---|
4412 | surf_usm_v(l)%ground_level(m) ) |
---|
4413 | ind_hc1 = MERGE( ind_hc1_gfl, ind_hc1_agfl, & |
---|
4414 | surf_usm_v(l)%ground_level(m) ) |
---|
4415 | ind_hc2 = MERGE( ind_hc2_gfl, ind_hc2_agfl, & |
---|
4416 | surf_usm_v(l)%ground_level(m) ) |
---|
4417 | ind_hc3 = MERGE( ind_hc3_gfl, ind_hc3_agfl, & |
---|
4418 | surf_usm_v(l)%ground_level(m) ) |
---|
4419 | ind_tc1 = MERGE( ind_tc1_gfl, ind_tc1_agfl, & |
---|
4420 | surf_usm_v(l)%ground_level(m) ) |
---|
4421 | ind_tc2 = MERGE( ind_tc2_gfl, ind_tc2_agfl, & |
---|
4422 | surf_usm_v(l)%ground_level(m) ) |
---|
4423 | ind_tc3 = MERGE( ind_tc3_gfl, ind_tc3_agfl, & |
---|
4424 | surf_usm_v(l)%ground_level(m) ) |
---|
4425 | ind_emis_wall = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl, & |
---|
4426 | surf_usm_v(l)%ground_level(m) ) |
---|
4427 | ind_emis_green = MERGE( ind_emis_green_gfl, ind_emis_green_agfl, & |
---|
4428 | surf_usm_v(l)%ground_level(m) ) |
---|
4429 | ind_emis_win = MERGE( ind_emis_win_gfl, ind_emis_win_agfl, & |
---|
4430 | surf_usm_v(l)%ground_level(m) ) |
---|
4431 | ind_trans = MERGE( ind_trans_gfl, ind_trans_agfl, & |
---|
4432 | surf_usm_v(l)%ground_level(m) ) |
---|
4433 | ind_z0 = MERGE( ind_z0_gfl, ind_z0_agfl, & |
---|
4434 | surf_usm_v(l)%ground_level(m) ) |
---|
4435 | ind_z0qh = MERGE( ind_z0qh_gfl, ind_z0qh_agfl, & |
---|
4436 | surf_usm_v(l)%ground_level(m) ) |
---|
4437 | |
---|
4438 | ! |
---|
4439 | !-- Initialize relatvie wall- (0), green- (1) and window (2) fractions |
---|
4440 | IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= & |
---|
4441 | building_pars_f%fill ) & |
---|
4442 | surf_usm_v(l)%frac(ind_veg_wall,m) = & |
---|
4443 | building_pars_f%pars_xy(ind_wall_frac,j,i) |
---|
4444 | IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /= & |
---|
4445 | building_pars_f%fill ) & |
---|
4446 | surf_usm_v(l)%frac(ind_pav_green,m) = & |
---|
4447 | building_pars_f%pars_xy(ind_green_frac_w,j,i) |
---|
4448 | IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= & |
---|
4449 | building_pars_f%fill ) & |
---|
4450 | surf_usm_v(l)%frac(ind_wat_win,m) = & |
---|
4451 | building_pars_f%pars_xy(ind_win_frac,j,i) |
---|
4452 | |
---|
4453 | IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill ) & |
---|
4454 | surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i) |
---|
4455 | |
---|
4456 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) & |
---|
4457 | THEN |
---|
4458 | surf_usm_v(l)%rho_c_wall(nzb_wall,m) = & |
---|
4459 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4460 | surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = & |
---|
4461 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4462 | ENDIF |
---|
4463 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4464 | surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = & |
---|
4465 | building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4466 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4467 | surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = & |
---|
4468 | building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4469 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
4470 | surf_usm_v(l)%rho_c_green(nzb_wall,m) = & |
---|
4471 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4472 | surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = & |
---|
4473 | building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4474 | ENDIF |
---|
4475 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4476 | surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4477 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4478 | surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4479 | IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill ) THEN |
---|
4480 | surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4481 | surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i) |
---|
4482 | ENDIF |
---|
4483 | IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill ) & |
---|
4484 | surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i) |
---|
4485 | IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill ) & |
---|
4486 | surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i) |
---|
4487 | |
---|
4488 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4489 | surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4490 | surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4491 | ENDIF |
---|
4492 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4493 | surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4494 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4495 | surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4496 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4497 | surf_usm_v(l)%lambda_h_green(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4498 | surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4499 | ENDIF |
---|
4500 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4501 | surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4502 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4503 | surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4504 | IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill ) THEN |
---|
4505 | surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4506 | surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i) |
---|
4507 | ENDIF |
---|
4508 | IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill ) & |
---|
4509 | surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i) |
---|
4510 | IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill ) & |
---|
4511 | surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i) |
---|
4512 | |
---|
4513 | IF ( building_pars_f%pars_xy(12,j,i) /= building_pars_f%fill ) & |
---|
4514 | surf_usm_v(l)%target_temp_summer(m) = building_pars_f%pars_xy(12,j,i) |
---|
4515 | IF ( building_pars_f%pars_xy(13,j,i) /= building_pars_f%fill ) & |
---|
4516 | surf_usm_v(l)%target_temp_winter(m) = building_pars_f%pars_xy(13,j,i) |
---|
4517 | |
---|
4518 | IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill ) & |
---|
4519 | surf_usm_v(l)%emissivity(ind_veg_wall,m) = building_pars_f%pars_xy(ind_emis_wall,j,i) |
---|
4520 | IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )& |
---|
4521 | surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green,j,i) |
---|
4522 | IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill ) & |
---|
4523 | surf_usm_v(l)%emissivity(ind_wat_win,m) = building_pars_f%pars_xy(ind_emis_win,j,i) |
---|
4524 | |
---|
4525 | IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill ) & |
---|
4526 | surf_usm_v(l)%transmissivity(m) = building_pars_f%pars_xy(ind_trans,j,i) |
---|
4527 | |
---|
4528 | IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill ) & |
---|
4529 | surf_usm_v(l)%z0(m) = building_pars_f%pars_xy(ind_z0,j,i) |
---|
4530 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4531 | surf_usm_v(l)%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4532 | IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill ) & |
---|
4533 | surf_usm_v(l)%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i) |
---|
4534 | |
---|
4535 | IF ( building_pars_f%pars_xy(ind_alb_wall,j,i) /= building_pars_f%fill ) & |
---|
4536 | surf_usm_v(l)%albedo_type(ind_veg_wall,m) = building_pars_f%pars_xy(ind_alb_wall,j,i) |
---|
4537 | IF ( building_pars_f%pars_xy(ind_alb_green,j,i) /= building_pars_f%fill ) & |
---|
4538 | surf_usm_v(l)%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green,j,i) |
---|
4539 | IF ( building_pars_f%pars_xy(ind_alb_win,j,i) /= building_pars_f%fill ) & |
---|
4540 | surf_usm_v(l)%albedo_type(ind_wat_win,m) = building_pars_f%pars_xy(ind_alb_win,j,i) |
---|
4541 | |
---|
4542 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
4543 | surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
4544 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
4545 | surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
4546 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
4547 | surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
4548 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
4549 | surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
4550 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
4551 | surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
4552 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
4553 | surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
4554 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
4555 | surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
4556 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
4557 | surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
4558 | IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill ) & |
---|
4559 | surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i) |
---|
4560 | IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill ) & |
---|
4561 | surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i) |
---|
4562 | IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill ) & |
---|
4563 | surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i) |
---|
4564 | IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill ) & |
---|
4565 | surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i) |
---|
4566 | |
---|
4567 | IF ( building_pars_f%pars_xy(45,j,i) /= building_pars_f%fill ) & |
---|
4568 | surf_usm_v(l)%c_surface(m) = building_pars_f%pars_xy(45,j,i) |
---|
4569 | IF ( building_pars_f%pars_xy(46,j,i) /= building_pars_f%fill ) & |
---|
4570 | surf_usm_v(l)%lambda_surf(m) = building_pars_f%pars_xy(46,j,i) |
---|
4571 | IF ( building_pars_f%pars_xy(45,j,i) /= building_pars_f%fill ) & |
---|
4572 | surf_usm_v(l)%c_surface_green(m) = building_pars_f%pars_xy(45,j,i) |
---|
4573 | IF ( building_pars_f%pars_xy(46,j,i) /= building_pars_f%fill ) & |
---|
4574 | surf_usm_v(l)%lambda_surf_green(m) = building_pars_f%pars_xy(46,j,i) |
---|
4575 | IF ( building_pars_f%pars_xy(45,j,i) /= building_pars_f%fill ) & |
---|
4576 | surf_usm_v(l)%c_surface_window(m) = building_pars_f%pars_xy(45,j,i) |
---|
4577 | IF ( building_pars_f%pars_xy(46,j,i) /= building_pars_f%fill ) & |
---|
4578 | surf_usm_v(l)%lambda_surf_window(m) = building_pars_f%pars_xy(46,j,i) |
---|
4579 | |
---|
4580 | ENDDO |
---|
4581 | ENDDO |
---|
4582 | ENDIF |
---|
4583 | ! |
---|
4584 | !-- Read the surface_types array. |
---|
4585 | !-- Please note, here also initialization of surface attributes is done as |
---|
4586 | !-- long as _urbsurf and _surfpar files are available. Values from above |
---|
4587 | !-- will be overwritten. This might be removed later, but is still in the |
---|
4588 | !-- code to enable compatibility with older model version. |
---|
4589 | CALL usm_read_urban_surface_types() |
---|
4590 | |
---|
4591 | !-- init material heat model |
---|
4592 | CALL usm_init_material_model() |
---|
4593 | |
---|
4594 | !-- init anthropogenic sources of heat |
---|
4595 | IF ( usm_anthropogenic_heat ) THEN |
---|
4596 | !-- init anthropogenic sources of heat (from transportation for now) |
---|
4597 | CALL usm_read_anthropogenic_heat() |
---|
4598 | ENDIF |
---|
4599 | |
---|
4600 | IF ( plant_canopy ) THEN |
---|
4601 | |
---|
4602 | IF ( .NOT. ALLOCATED( pc_heating_rate) ) THEN |
---|
4603 | !-- then pc_heating_rate is allocated in init_plant_canopy |
---|
4604 | !-- in case of cthf /= 0 => we need to allocate it for our use here |
---|
4605 | ALLOCATE( pc_heating_rate(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
4606 | |
---|
4607 | pc_heating_rate = 0.0_wp |
---|
4608 | |
---|
4609 | ENDIF |
---|
4610 | |
---|
4611 | IF ( .NOT. ALLOCATED( pc_transpiration_rate) ) THEN |
---|
4612 | !-- then pc_heating_rate is allocated in init_plant_canopy |
---|
4613 | !-- in case of cthf /= 0 => we need to allocate it for our use here |
---|
4614 | ALLOCATE( pc_transpiration_rate(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
4615 | |
---|
4616 | pc_transpiration_rate = 0.0_wp |
---|
4617 | |
---|
4618 | |
---|
4619 | ENDIF |
---|
4620 | ENDIF |
---|
4621 | ! |
---|
4622 | !-- Check for consistent initialization. |
---|
4623 | !-- Check if roughness length for momentum, or heat, exceed surface-layer |
---|
4624 | !-- height and decrease local roughness length where necessary. |
---|
4625 | DO m = 1, surf_usm_h%ns |
---|
4626 | IF ( surf_usm_h%z0(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
4627 | |
---|
4628 | surf_usm_h%z0(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
4629 | |
---|
4630 | WRITE( message_string, * ) 'z0 exceeds surface-layer height ' // & |
---|
4631 | 'at horizontal urban surface and is ' // & |
---|
4632 | 'decreased appropriately at grid point (i,j) = ', & |
---|
4633 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
4634 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
4635 | 0, 0, 0, 6, 0 ) |
---|
4636 | ENDIF |
---|
4637 | IF ( surf_usm_h%z0h(m) >= surf_usm_h%z_mo(m) ) THEN |
---|
4638 | |
---|
4639 | surf_usm_h%z0h(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
4640 | surf_usm_h%z0q(m) = 0.9_wp * surf_usm_h%z_mo(m) |
---|
4641 | |
---|
4642 | WRITE( message_string, * ) 'z0h exceeds surface-layer height ' // & |
---|
4643 | 'at horizontal urban surface and is ' // & |
---|
4644 | 'decreased appropriately at grid point (i,j) = ', & |
---|
4645 | surf_usm_h%i(m), surf_usm_h%j(m) |
---|
4646 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
4647 | 0, 0, 0, 6, 0 ) |
---|
4648 | ENDIF |
---|
4649 | ENDDO |
---|
4650 | |
---|
4651 | DO l = 0, 3 |
---|
4652 | DO m = 1, surf_usm_v(l)%ns |
---|
4653 | IF ( surf_usm_v(l)%z0(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
4654 | |
---|
4655 | surf_usm_v(l)%z0(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
4656 | |
---|
4657 | WRITE( message_string, * ) 'z0 exceeds surface-layer height '//& |
---|
4658 | 'at vertical urban surface and is ' // & |
---|
4659 | 'decreased appropriately at grid point (i,j) = ', & |
---|
4660 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
4661 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
4662 | CALL message( 'urban_surface_model_mod', 'PA0503', & |
---|
4663 | 0, 0, 0, 6, 0 ) |
---|
4664 | ENDIF |
---|
4665 | IF ( surf_usm_v(l)%z0h(m) >= surf_usm_v(l)%z_mo(m) ) THEN |
---|
4666 | |
---|
4667 | surf_usm_v(l)%z0h(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
4668 | surf_usm_v(l)%z0q(m) = 0.9_wp * surf_usm_v(l)%z_mo(m) |
---|
4669 | |
---|
4670 | WRITE( message_string, * ) 'z0h exceeds surface-layer height '//& |
---|
4671 | 'at vertical urban surface and is ' // & |
---|
4672 | 'decreased appropriately at grid point (i,j) = ', & |
---|
4673 | surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff, & |
---|
4674 | surf_usm_v(l)%j(m)+surf_usm_v(l)%joff |
---|
4675 | CALL message( 'urban_surface_model_mod', 'PA0507', & |
---|
4676 | 0, 0, 0, 6, 0 ) |
---|
4677 | ENDIF |
---|
4678 | ENDDO |
---|
4679 | ENDDO |
---|
4680 | |
---|
4681 | !-- Intitialization of the surface and wall/ground/roof temperature |
---|
4682 | |
---|
4683 | !-- Initialization for restart runs |
---|
4684 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. & |
---|
4685 | TRIM( initializing_actions ) /= 'cyclic_fill' ) THEN |
---|
4686 | |
---|
4687 | !-- Calculate initial surface temperature from pt of adjacent gridbox |
---|
4688 | #if ! defined( __nopointer ) |
---|
4689 | exn(nzb:nzt) = (hyp(nzb:nzt) / 100000.0_wp )**0.286_wp !< Exner function |
---|
4690 | #endif |
---|
4691 | |
---|
4692 | ! |
---|
4693 | !-- At horizontal surfaces. Please note, t_surf_h is defined on a |
---|
4694 | !-- different data type, but with the same dimension. |
---|
4695 | #if ! defined( __nopointer ) |
---|
4696 | DO m = 1, surf_usm_h%ns |
---|
4697 | i = surf_usm_h%i(m) |
---|
4698 | j = surf_usm_h%j(m) |
---|
4699 | k = surf_usm_h%k(m) |
---|
4700 | |
---|
4701 | t_surf_h(m) = pt(k,j,i) * exn(k) |
---|
4702 | t_surf_window_h(m) = pt(k,j,i) * exn(k) |
---|
4703 | t_surf_green_h(m) = pt(k,j,i) * exn(k) |
---|
4704 | surf_usm_h%pt_surface(m) = pt(k,j,i) * exn(k) |
---|
4705 | ENDDO |
---|
4706 | ! |
---|
4707 | !-- At vertical surfaces. |
---|
4708 | DO l = 0, 3 |
---|
4709 | DO m = 1, surf_usm_v(l)%ns |
---|
4710 | i = surf_usm_v(l)%i(m) |
---|
4711 | j = surf_usm_v(l)%j(m) |
---|
4712 | k = surf_usm_v(l)%k(m) |
---|
4713 | |
---|
4714 | t_surf_v(l)%t(m) = pt(k,j,i) * exn(k) |
---|
4715 | t_surf_window_v(l)%t(m) = pt(k,j,i) * exn(k) |
---|
4716 | t_surf_green_v(l)%t(m) = pt(k,j,i) * exn(k) |
---|
4717 | surf_usm_v(l)%pt_surface(m) = pt(k,j,i) * exn(k) |
---|
4718 | ENDDO |
---|
4719 | ENDDO |
---|
4720 | #endif |
---|
4721 | ! |
---|
4722 | !-- For the sake of correct initialization, set also q_surface. |
---|
4723 | !-- Note, at urban surfaces q_surface is initialized with 0. |
---|
4724 | IF ( humidity ) THEN |
---|
4725 | DO m = 1, surf_usm_h%ns |
---|
4726 | surf_usm_h%q_surface(m) = 0.0_wp |
---|
4727 | ENDDO |
---|
4728 | DO l = 0, 3 |
---|
4729 | DO m = 1, surf_usm_v(l)%ns |
---|
4730 | surf_usm_v(l)%q_surface(m) = 0.0_wp |
---|
4731 | ENDDO |
---|
4732 | ENDDO |
---|
4733 | ENDIF |
---|
4734 | |
---|
4735 | !-- initial values for t_wall |
---|
4736 | !-- outer value is set to surface temperature |
---|
4737 | !-- inner value is set to wall_inner_temperature |
---|
4738 | !-- and profile is logaritmic (linear in nz). |
---|
4739 | !-- Horizontal surfaces |
---|
4740 | DO m = 1, surf_usm_h%ns |
---|
4741 | ! |
---|
4742 | !-- Roof |
---|
4743 | IF ( surf_usm_h%isroof_surf(m) ) THEN |
---|
4744 | tin = roof_inner_temperature |
---|
4745 | twin = window_inner_temperature |
---|
4746 | ! |
---|
4747 | !-- Normal land surface |
---|
4748 | ELSE |
---|
4749 | tin = soil_inner_temperature |
---|
4750 | twin = window_inner_temperature |
---|
4751 | ENDIF |
---|
4752 | |
---|
4753 | DO k = nzb_wall, nzt_wall+1 |
---|
4754 | c = REAL( k - nzb_wall, wp ) / & |
---|
4755 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
4756 | |
---|
4757 | t_wall_h(k,m) = ( 1.0_wp - c ) * t_surf_h(m) + c * tin |
---|
4758 | t_window_h(k,m) = ( 1.0_wp - c ) * t_surf_window_h(m) + c * twin |
---|
4759 | t_green_h(k,m) = t_surf_h(m) |
---|
4760 | ENDDO |
---|
4761 | ENDDO |
---|
4762 | ! |
---|
4763 | !-- Vertical surfaces |
---|
4764 | DO l = 0, 3 |
---|
4765 | DO m = 1, surf_usm_v(l)%ns |
---|
4766 | ! |
---|
4767 | !-- Inner wall |
---|
4768 | tin = wall_inner_temperature |
---|
4769 | twin = window_inner_temperature |
---|
4770 | |
---|
4771 | DO k = nzb_wall, nzt_wall+1 |
---|
4772 | c = REAL( k - nzb_wall, wp ) / & |
---|
4773 | REAL( nzt_wall + 1 - nzb_wall , wp ) |
---|
4774 | t_wall_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_v(l)%t(m) + c * tin |
---|
4775 | t_window_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_window_v(l)%t(m) + c * twin |
---|
4776 | t_green_v(l)%t(k,m) = t_surf_v(l)%t(m) |
---|
4777 | ENDDO |
---|
4778 | ENDDO |
---|
4779 | ENDDO |
---|
4780 | ELSE |
---|
4781 | !-- If specified, replace constant wall temperatures with fully 3D values from file |
---|
4782 | IF ( read_wall_temp_3d ) CALL usm_read_wall_temperature() |
---|
4783 | ! |
---|
4784 | ENDIF |
---|
4785 | |
---|
4786 | !-- |
---|
4787 | !-- Possibly DO user-defined actions (e.g. define heterogeneous wall surface) |
---|
4788 | CALL user_init_urban_surface |
---|
4789 | |
---|
4790 | !-- initialize prognostic values for the first timestep |
---|
4791 | t_surf_h_p = t_surf_h |
---|
4792 | t_surf_v_p = t_surf_v |
---|
4793 | t_surf_window_h_p = t_surf_window_h |
---|
4794 | t_surf_window_v_p = t_surf_window_v |
---|
4795 | t_surf_green_h_p = t_surf_green_h |
---|
4796 | t_surf_green_v_p = t_surf_green_v |
---|
4797 | t_surf_10cm_h_p = t_surf_10cm_h |
---|
4798 | t_surf_10cm_v_p = t_surf_10cm_v |
---|
4799 | |
---|
4800 | t_wall_h_p = t_wall_h |
---|
4801 | t_wall_v_p = t_wall_v |
---|
4802 | t_window_h_p = t_window_h |
---|
4803 | t_window_v_p = t_window_v |
---|
4804 | t_green_h_p = t_green_h |
---|
4805 | t_green_v_p = t_green_v |
---|
4806 | |
---|
4807 | !-- Adjust radiative fluxes for urban surface at model start |
---|
4808 | !CALL radiation_interaction |
---|
4809 | !-- TODO: interaction should be called once before first output, |
---|
4810 | !-- that is not yet possible. |
---|
4811 | |
---|
4812 | CALL cpu_log( log_point_s(78), 'usm_init', 'stop' ) |
---|
4813 | |
---|
4814 | END SUBROUTINE usm_init_urban_surface |
---|
4815 | |
---|
4816 | |
---|
4817 | !------------------------------------------------------------------------------! |
---|
4818 | ! Description: |
---|
4819 | ! ------------ |
---|
4820 | ! |
---|
4821 | !> Wall model as part of the urban surface model. The model predicts wall |
---|
4822 | !> temperature. |
---|
4823 | !------------------------------------------------------------------------------! |
---|
4824 | SUBROUTINE usm_material_heat_model |
---|
4825 | |
---|
4826 | |
---|
4827 | IMPLICIT NONE |
---|
4828 | |
---|
4829 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
4830 | |
---|
4831 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wtend, wintend !< tendency |
---|
4832 | |
---|
4833 | ! |
---|
4834 | !-- For horizontal surfaces |
---|
4835 | DO m = 1, surf_usm_h%ns |
---|
4836 | ! |
---|
4837 | !-- Obtain indices |
---|
4838 | i = surf_usm_h%i(m) |
---|
4839 | j = surf_usm_h%j(m) |
---|
4840 | k = surf_usm_h%k(m) |
---|
4841 | ! |
---|
4842 | !-- prognostic equation for ground/roof temperature t_wall_h |
---|
4843 | wtend(:) = 0.0_wp |
---|
4844 | wtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzb_wall,m)) * & |
---|
4845 | ( surf_usm_h%lambda_h(nzb_wall,m) * & |
---|
4846 | ( t_wall_h(nzb_wall+1,m) & |
---|
4847 | - t_wall_h(nzb_wall,m) ) * & |
---|
4848 | surf_usm_h%ddz_wall(nzb_wall+1,m) & |
---|
4849 | + surf_usm_h%frac(ind_veg_wall,m) & |
---|
4850 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
4851 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
4852 | * surf_usm_h%wghf_eb(m) & |
---|
4853 | - surf_usm_h%frac(ind_pav_green,m) & |
---|
4854 | / (surf_usm_h%frac(ind_veg_wall,m) & |
---|
4855 | + surf_usm_h%frac(ind_pav_green,m) ) & |
---|
4856 | * ( surf_usm_h%lambda_h_green(nzt_wall,m) & |
---|
4857 | * surf_usm_h%ddz_green(nzt_wall,m) & |
---|
4858 | + surf_usm_h%lambda_h(nzb_wall,m) & |
---|
4859 | * surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
4860 | / ( surf_usm_h%ddz_green(nzt_wall,m) & |
---|
4861 | + surf_usm_h%ddz_wall(nzb_wall,m) ) & |
---|
4862 | * ( t_wall_h(nzb_wall,m) & |
---|
4863 | - t_green_h(nzt_wall,m) ) ) * & |
---|
4864 | surf_usm_h%ddz_wall_stag(nzb_wall,m) |
---|
4865 | |
---|
4866 | !dummy value for testing |
---|
4867 | surf_usm_h%iwghf_eb(m) = 0. |
---|
4868 | |
---|
4869 | IF ( indoor_model ) then |
---|
4870 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
4871 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
4872 | * ( surf_usm_h%lambda_h(kw,m) & |
---|
4873 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
4874 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
4875 | - surf_usm_h%lambda_h(kw-1,m) & |
---|
4876 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
4877 | * surf_usm_h%ddz_wall(kw,m) & |
---|
4878 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
4879 | ENDDO |
---|
4880 | wtend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzt_wall,m)) * & |
---|
4881 | ( surf_usm_h%lambda_h(nzt_wall-1,m) * & |
---|
4882 | ( t_wall_h(nzt_wall,m) & |
---|
4883 | - t_wall_h(nzt_wall-1,m) ) * & |
---|
4884 | surf_usm_h%ddz_wall(nzt_wall,m) & |
---|
4885 | + surf_usm_h%iwghf_eb(m) ) * & |
---|
4886 | surf_usm_h%ddz_wall_stag(nzt_wall,m) |
---|
4887 | ELSE |
---|
4888 | DO kw = nzb_wall+1, nzt_wall |
---|
4889 | wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m)) & |
---|
4890 | * ( surf_usm_h%lambda_h(kw,m) & |
---|
4891 | * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) ) & |
---|
4892 | * surf_usm_h%ddz_wall(kw+1,m) & |
---|
4893 | - surf_usm_h%lambda_h(kw-1,m) & |
---|
4894 | * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) ) & |
---|
4895 | * surf_usm_h%ddz_wall(kw,m) & |
---|
4896 | ) * surf_usm_h%ddz_wall_stag(kw,m) |
---|
4897 | ENDDO |
---|
4898 | ENDIF |
---|
4899 | |
---|
4900 | t_wall_h_p(nzb_wall:nzt_wall,m) = t_wall_h(nzb_wall:nzt_wall,m) & |
---|
4901 | + dt_3d * ( tsc(2) & |
---|
4902 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
4903 | * surf_usm_h%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
4904 | |
---|
4905 | !-- prognostic equation for ground/roof window temperature t_window_h |
---|
4906 | wintend(:) = 0.0_wp |
---|
4907 | wintend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzb_wall,m)) * & |
---|
4908 | ( surf_usm_h%lambda_h_window(nzb_wall,m) * & |
---|
4909 | ( t_window_h(nzb_wall+1,m) & |
---|
4910 | - t_window_h(nzb_wall,m) ) * & |
---|
4911 | surf_usm_h%ddz_window(nzb_wall+1,m) & |
---|
4912 | + surf_usm_h%wghf_eb_window(m) & |
---|
4913 | + surf_usm_h%rad_sw_in(m) & |
---|
4914 | * (1.0_wp - exp(-surf_usm_h%transmissivity(m) & |
---|
4915 | * surf_usm_h%zw_window(nzb_wall,m) ) ) & |
---|
4916 | ) * surf_usm_h%ddz_window_stag(nzb_wall,m) |
---|
4917 | |
---|
4918 | IF ( indoor_model ) then |
---|
4919 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
4920 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
4921 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
4922 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
4923 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
4924 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
4925 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
4926 | * surf_usm_h%ddz_window(kw,m) & |
---|
4927 | + surf_usm_h%rad_sw_in(m) & |
---|
4928 | * (exp(-surf_usm_h%transmissivity(m) & |
---|
4929 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
4930 | - exp(-surf_usm_h%transmissivity(m) & |
---|
4931 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
4932 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
4933 | |
---|
4934 | ENDDO |
---|
4935 | wintend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzt_wall,m)) * & |
---|
4936 | ( surf_usm_h%lambda_h_window(nzt_wall-1,m) * & |
---|
4937 | ( t_window_h(nzt_wall,m) & |
---|
4938 | - t_window_h(nzt_wall-1,m) ) * & |
---|
4939 | surf_usm_h%ddz_window(nzt_wall,m) & |
---|
4940 | + surf_usm_h%iwghf_eb_window(m) & |
---|
4941 | + surf_usm_h%rad_sw_in(m) & |
---|
4942 | * (1.0_wp - exp(-surf_usm_h%transmissivity(m) & |
---|
4943 | * surf_usm_h%zw_window(nzt_wall,m) ) ) & |
---|
4944 | ) * surf_usm_h%ddz_window_stag(nzt_wall,m) |
---|
4945 | ELSE |
---|
4946 | DO kw = nzb_wall+1, nzt_wall |
---|
4947 | wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m)) & |
---|
4948 | * ( surf_usm_h%lambda_h_window(kw,m) & |
---|
4949 | * ( t_window_h(kw+1,m) - t_window_h(kw,m) ) & |
---|
4950 | * surf_usm_h%ddz_window(kw+1,m) & |
---|
4951 | - surf_usm_h%lambda_h_window(kw-1,m) & |
---|
4952 | * ( t_window_h(kw,m) - t_window_h(kw-1,m) ) & |
---|
4953 | * surf_usm_h%ddz_window(kw,m) & |
---|
4954 | + surf_usm_h%rad_sw_in(m) & |
---|
4955 | * (exp(-surf_usm_h%transmissivity(m) & |
---|
4956 | * surf_usm_h%zw_window(kw-1,m) ) & |
---|
4957 | - exp(-surf_usm_h%transmissivity(m) & |
---|
4958 | * surf_usm_h%zw_window(kw,m) ) ) & |
---|
4959 | ) * surf_usm_h%ddz_window_stag(kw,m) |
---|
4960 | |
---|
4961 | ENDDO |
---|
4962 | ENDIF |
---|
4963 | |
---|
4964 | t_window_h_p(nzb_wall:nzt_wall,m) = t_window_h(nzb_wall:nzt_wall,m) & |
---|
4965 | + dt_3d * ( tsc(2) & |
---|
4966 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
4967 | * surf_usm_h%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
4968 | |
---|
4969 | ! |
---|
4970 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
4971 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
4972 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
4973 | DO kw = nzb_wall, nzt_wall |
---|
4974 | surf_usm_h%tt_wall_m(kw,m) = wtend(kw) |
---|
4975 | ENDDO |
---|
4976 | ELSEIF ( intermediate_timestep_count < & |
---|
4977 | intermediate_timestep_count_max ) THEN |
---|
4978 | DO kw = nzb_wall, nzt_wall |
---|
4979 | surf_usm_h%tt_wall_m(kw,m) = -9.5625_wp * wtend(kw) + & |
---|
4980 | 5.3125_wp * surf_usm_h%tt_wall_m(kw,m) |
---|
4981 | ENDDO |
---|
4982 | ENDIF |
---|
4983 | ENDIF |
---|
4984 | |
---|
4985 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
4986 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
4987 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
4988 | DO kw = nzb_wall, nzt_wall |
---|
4989 | surf_usm_h%tt_window_m(kw,m) = wintend(kw) |
---|
4990 | ENDDO |
---|
4991 | ELSEIF ( intermediate_timestep_count < & |
---|
4992 | intermediate_timestep_count_max ) THEN |
---|
4993 | DO kw = nzb_wall, nzt_wall |
---|
4994 | surf_usm_h%tt_window_m(kw,m) = -9.5625_wp * wintend(kw) + & |
---|
4995 | 5.3125_wp * surf_usm_h%tt_window_m(kw,m) |
---|
4996 | ENDDO |
---|
4997 | ENDIF |
---|
4998 | ENDIF |
---|
4999 | ENDDO |
---|
5000 | |
---|
5001 | ! |
---|
5002 | !-- For vertical surfaces |
---|
5003 | DO l = 0, 3 |
---|
5004 | DO m = 1, surf_usm_v(l)%ns |
---|
5005 | ! |
---|
5006 | !-- Obtain indices |
---|
5007 | i = surf_usm_v(l)%i(m) |
---|
5008 | j = surf_usm_v(l)%j(m) |
---|
5009 | k = surf_usm_v(l)%k(m) |
---|
5010 | ! |
---|
5011 | !-- prognostic equation for wall temperature t_wall_v |
---|
5012 | wtend(:) = 0.0_wp |
---|
5013 | |
---|
5014 | wtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzb_wall,m)) * & |
---|
5015 | ( surf_usm_v(l)%lambda_h(nzb_wall,m) * & |
---|
5016 | ( t_wall_v(l)%t(nzb_wall+1,m) & |
---|
5017 | - t_wall_v(l)%t(nzb_wall,m) ) * & |
---|
5018 | surf_usm_v(l)%ddz_wall(nzb_wall+1,m) & |
---|
5019 | + surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5020 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5021 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
5022 | * surf_usm_v(l)%wghf_eb(m) & |
---|
5023 | - surf_usm_v(l)%frac(ind_pav_green,m) & |
---|
5024 | / (surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
5025 | + surf_usm_v(l)%frac(ind_pav_green,m) ) & |
---|
5026 | * ( surf_usm_v(l)%lambda_h_green(nzt_wall,m) & |
---|
5027 | * surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
5028 | + surf_usm_v(l)%lambda_h(nzb_wall,m) & |
---|
5029 | * surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
5030 | / ( surf_usm_v(l)%ddz_green(nzt_wall,m) & |
---|
5031 | + surf_usm_v(l)%ddz_wall(nzb_wall,m) ) & |
---|
5032 | * ( t_wall_v(l)%t(nzb_wall,m) & |
---|
5033 | - t_green_v(l)%t(nzt_wall,m) ) ) * & |
---|
5034 | surf_usm_v(l)%ddz_wall_stag(nzb_wall,m) |
---|
5035 | |
---|
5036 | !dummy value for testing |
---|
5037 | surf_usm_v(l)%iwghf_eb(m) = 0. |
---|
5038 | |
---|
5039 | IF ( indoor_model ) then |
---|
5040 | DO kw = nzb_wall+1, nzt_wall-1 |
---|
5041 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
5042 | * ( surf_usm_v(l)%lambda_h(kw,m) & |
---|
5043 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
5044 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
5045 | - surf_usm_v(l)%lambda_h(kw-1,m) & |
---|
5046 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
5047 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
5048 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
5049 | ENDDO |
---|
5050 | wtend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzt_wall,m)) * & |
---|
5051 | ( surf_usm_v(l)%lambda_h(nzt_wall-1,m) * & |
---|
5052 | ( t_wall_v(l)%t(nzt_wall,m) & |
---|
5053 | - t_wall_v(l)%t(nzt_wall-1,m) ) * & |
---|
5054 | surf_usm_v(l)%ddz_wall(nzt_wall,m) & |
---|
5055 | + surf_usm_v(l)%iwghf_eb(m) ) * & |
---|
5056 | surf_usm_v(l)%ddz_wall_stag(nzt_wall,m) |
---|
5057 | ELSE |
---|
5058 | DO kw = nzb_wall+1, nzt_wall |
---|
5059 | wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m)) & |
---|
5060 | * ( surf_usm_v(l)%lambda_h(kw,m) & |
---|
5061 | * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )& |
---|
5062 | * surf_usm_v(l)%ddz_wall(kw+1,m) & |
---|
5063 | - surf_usm_v(l)%lambda_h(kw-1,m) & |
---|
5064 | * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )& |
---|
5065 | * surf_usm_v(l)%ddz_wall(kw,m) & |
---|
5066 | ) * surf_usm_v(l)%ddz_wall_stag(kw,m) |
---|
5067 | ENDDO |
---|
5068 | ENDIF |
---|
5069 | |
---|
5070 | t_wall_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
5071 | t_wall_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
5072 | + dt_3d * ( tsc(2) & |
---|
5073 | * wtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5074 | * surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall,m) ) |
---|
5075 | |
---|
5076 | !-- prognostic equation for window temperature t_window_v |
---|
5077 | wintend(:) = 0.0_wp |
---|
5078 | wintend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzb_wall,m)) * & |
---|
5079 | ( surf_usm_v(l)%lambda_h_window(nzb_wall,m) * & |
---|
5080 | ( t_window_v(l)%t(nzb_wall+1,m) & |
---|
5081 | - t_window_v(l)%t(nzb_wall,m) ) * & |
---|
5082 | surf_usm_v(l)%ddz_window(nzb_wall+1,m) & |
---|
5083 | + surf_usm_v(l)%wghf_eb_window(m) & |
---|
5084 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5085 | * (1.0_wp - exp(-surf_usm_v(l)%transmissivity(m) & |
---|
5086 | * surf_usm_v(l)%zw_window(nzb_wall,m) ) ) & |
---|
5087 | ) * surf_usm_v(l)%ddz_window_stag(nzb_wall,m) |
---|
5088 | |
---|
5089 | IF ( indoor_model ) then |
---|
5090 | DO kw = nzb_wall+1, nzt_wall -1 |
---|
5091 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
5092 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
5093 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
5094 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
5095 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
5096 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
5097 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
5098 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5099 | * (exp(-surf_usm_v(l)%transmissivity(m) & |
---|
5100 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
5101 | - exp(-surf_usm_v(l)%transmissivity(m) & |
---|
5102 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
5103 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
5104 | ENDDO |
---|
5105 | wintend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzt_wall,m)) * & |
---|
5106 | ( surf_usm_v(l)%lambda_h_window(nzt_wall-1,m) * & |
---|
5107 | ( t_window_v(l)%t(nzt_wall,m) & |
---|
5108 | - t_window_v(l)%t(nzt_wall-1,m) ) * & |
---|
5109 | surf_usm_v(l)%ddz_window(nzt_wall,m) & |
---|
5110 | + surf_usm_v(l)%iwghf_eb_window(m) & |
---|
5111 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5112 | * (1.0_wp - exp(-surf_usm_v(l)%transmissivity(m) & |
---|
5113 | * surf_usm_v(l)%zw_window(nzt_wall,m) ) ) & |
---|
5114 | ) * surf_usm_v(l)%ddz_window_stag(nzt_wall,m) |
---|
5115 | ELSE |
---|
5116 | DO kw = nzb_wall+1, nzt_wall |
---|
5117 | wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m)) & |
---|
5118 | * ( surf_usm_v(l)%lambda_h_window(kw,m) & |
---|
5119 | * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) & |
---|
5120 | * surf_usm_v(l)%ddz_window(kw+1,m) & |
---|
5121 | - surf_usm_v(l)%lambda_h_window(kw-1,m) & |
---|
5122 | * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) & |
---|
5123 | * surf_usm_v(l)%ddz_window(kw,m) & |
---|
5124 | + surf_usm_v(l)%rad_sw_in(m) & |
---|
5125 | * (exp(-surf_usm_v(l)%transmissivity(m) & |
---|
5126 | * surf_usm_v(l)%zw_window(kw-1,m) ) & |
---|
5127 | - exp(-surf_usm_v(l)%transmissivity(m) & |
---|
5128 | * surf_usm_v(l)%zw_window(kw,m) ) ) & |
---|
5129 | ) * surf_usm_v(l)%ddz_window_stag(kw,m) |
---|
5130 | ENDDO |
---|
5131 | ENDIF |
---|
5132 | |
---|
5133 | t_window_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
5134 | t_window_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
5135 | + dt_3d * ( tsc(2) & |
---|
5136 | * wintend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5137 | * surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall,m) ) |
---|
5138 | |
---|
5139 | ! |
---|
5140 | !-- calculate t_wall tendencies for the next Runge-Kutta step |
---|
5141 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5142 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5143 | DO kw = nzb_wall, nzt_wall |
---|
5144 | surf_usm_v(l)%tt_wall_m(kw,m) = wtend(kw) |
---|
5145 | ENDDO |
---|
5146 | ELSEIF ( intermediate_timestep_count < & |
---|
5147 | intermediate_timestep_count_max ) THEN |
---|
5148 | DO kw = nzb_wall, nzt_wall |
---|
5149 | surf_usm_v(l)%tt_wall_m(kw,m) = & |
---|
5150 | - 9.5625_wp * wtend(kw) + & |
---|
5151 | 5.3125_wp * surf_usm_v(l)%tt_wall_m(kw,m) |
---|
5152 | ENDDO |
---|
5153 | ENDIF |
---|
5154 | ENDIF |
---|
5155 | !-- calculate t_window tendencies for the next Runge-Kutta step |
---|
5156 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5157 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5158 | DO kw = nzb_wall, nzt_wall |
---|
5159 | surf_usm_v(l)%tt_window_m(kw,m) = wintend(kw) |
---|
5160 | ENDDO |
---|
5161 | ELSEIF ( intermediate_timestep_count < & |
---|
5162 | intermediate_timestep_count_max ) THEN |
---|
5163 | DO kw = nzb_wall, nzt_wall |
---|
5164 | surf_usm_v(l)%tt_window_m(kw,m) = & |
---|
5165 | - 9.5625_wp * wintend(kw) + & |
---|
5166 | 5.3125_wp * surf_usm_v(l)%tt_window_m(kw,m) |
---|
5167 | ENDDO |
---|
5168 | ENDIF |
---|
5169 | ENDIF |
---|
5170 | ENDDO |
---|
5171 | ENDDO |
---|
5172 | |
---|
5173 | END SUBROUTINE usm_material_heat_model |
---|
5174 | |
---|
5175 | !------------------------------------------------------------------------------! |
---|
5176 | ! Description: |
---|
5177 | ! ------------ |
---|
5178 | ! |
---|
5179 | !> Green and substrate model as part of the urban surface model. The model predicts ground |
---|
5180 | !> temperatures. |
---|
5181 | !------------------------------------------------------------------------------! |
---|
5182 | SUBROUTINE usm_green_heat_model |
---|
5183 | |
---|
5184 | |
---|
5185 | IMPLICIT NONE |
---|
5186 | |
---|
5187 | INTEGER(iwp) :: i,j,k,l,kw, m !< running indices |
---|
5188 | |
---|
5189 | REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: gtend !< tendency |
---|
5190 | |
---|
5191 | ! |
---|
5192 | !-- For horizontal surfaces |
---|
5193 | DO m = 1, surf_usm_h%ns |
---|
5194 | ! |
---|
5195 | !-- Obtain indices |
---|
5196 | i = surf_usm_h%i(m) |
---|
5197 | j = surf_usm_h%j(m) |
---|
5198 | k = surf_usm_h%k(m) |
---|
5199 | |
---|
5200 | t_green_h(nzt_wall+1,m) = t_wall_h(nzb_wall,m) |
---|
5201 | ! |
---|
5202 | !-- prognostic equation for ground/roof temperature t_green_h |
---|
5203 | gtend(:) = 0.0_wp |
---|
5204 | gtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_green(nzb_wall,m)) * & |
---|
5205 | ( surf_usm_h%lambda_h_green(nzb_wall,m) * & |
---|
5206 | ( t_green_h(nzb_wall+1,m) & |
---|
5207 | - t_green_h(nzb_wall,m) ) * & |
---|
5208 | surf_usm_h%ddz_green(nzb_wall+1,m) & |
---|
5209 | + surf_usm_h%wghf_eb_green(m) ) * & |
---|
5210 | surf_usm_h%ddz_green_stag(nzb_wall,m) |
---|
5211 | |
---|
5212 | DO kw = nzb_wall+1, nzt_wall |
---|
5213 | gtend(kw) = (1.0_wp / surf_usm_h%rho_c_green(kw,m)) & |
---|
5214 | * ( surf_usm_h%lambda_h_green(kw,m) & |
---|
5215 | * ( t_green_h(kw+1,m) - t_green_h(kw,m) ) & |
---|
5216 | * surf_usm_h%ddz_green(kw+1,m) & |
---|
5217 | - surf_usm_h%lambda_h_green(kw-1,m) & |
---|
5218 | * ( t_green_h(kw,m) - t_green_h(kw-1,m) ) & |
---|
5219 | * surf_usm_h%ddz_green(kw,m) & |
---|
5220 | ) * surf_usm_h%ddz_green_stag(kw,m) |
---|
5221 | ENDDO |
---|
5222 | |
---|
5223 | t_green_h_p(nzb_wall:nzt_wall,m) = t_green_h(nzb_wall:nzt_wall,m) & |
---|
5224 | + dt_3d * ( tsc(2) & |
---|
5225 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5226 | * surf_usm_h%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
5227 | |
---|
5228 | |
---|
5229 | ! |
---|
5230 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
5231 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5232 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5233 | DO kw = nzb_wall, nzt_wall |
---|
5234 | surf_usm_h%tt_green_m(kw,m) = gtend(kw) |
---|
5235 | ENDDO |
---|
5236 | ELSEIF ( intermediate_timestep_count < & |
---|
5237 | intermediate_timestep_count_max ) THEN |
---|
5238 | DO kw = nzb_wall, nzt_wall |
---|
5239 | surf_usm_h%tt_green_m(kw,m) = -9.5625_wp * gtend(kw) + & |
---|
5240 | 5.3125_wp * surf_usm_h%tt_green_m(kw,m) |
---|
5241 | ENDDO |
---|
5242 | ENDIF |
---|
5243 | ENDIF |
---|
5244 | ENDDO |
---|
5245 | |
---|
5246 | ! |
---|
5247 | !-- For vertical surfaces |
---|
5248 | DO l = 0, 3 |
---|
5249 | DO m = 1, surf_usm_v(l)%ns |
---|
5250 | ! |
---|
5251 | !-- Obtain indices |
---|
5252 | i = surf_usm_v(l)%i(m) |
---|
5253 | j = surf_usm_v(l)%j(m) |
---|
5254 | k = surf_usm_v(l)%k(m) |
---|
5255 | |
---|
5256 | t_green_v(l)%t(nzt_wall+1,m) = t_wall_v(l)%t(nzb_wall,m) |
---|
5257 | ! |
---|
5258 | !-- prognostic equation for green temperature t_green_v |
---|
5259 | gtend(:) = 0.0_wp |
---|
5260 | gtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_green(nzb_wall,m)) * & |
---|
5261 | ( surf_usm_v(l)%lambda_h_green(nzb_wall,m) * & |
---|
5262 | ( t_green_v(l)%t(nzb_wall+1,m) & |
---|
5263 | - t_green_v(l)%t(nzb_wall,m) ) * & |
---|
5264 | surf_usm_v(l)%ddz_green(nzb_wall+1,m) & |
---|
5265 | + surf_usm_v(l)%wghf_eb(m) ) * & |
---|
5266 | surf_usm_v(l)%ddz_green_stag(nzb_wall,m) |
---|
5267 | |
---|
5268 | DO kw = nzb_wall+1, nzt_wall |
---|
5269 | gtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_green(kw,m)) & |
---|
5270 | * ( surf_usm_v(l)%lambda_h_green(kw,m) & |
---|
5271 | * ( t_green_v(l)%t(kw+1,m) - t_green_v(l)%t(kw,m) ) & |
---|
5272 | * surf_usm_v(l)%ddz_green(kw+1,m) & |
---|
5273 | - surf_usm_v(l)%lambda_h(kw-1,m) & |
---|
5274 | * ( t_green_v(l)%t(kw,m) - t_green_v(l)%t(kw-1,m) ) & |
---|
5275 | * surf_usm_v(l)%ddz_green(kw,m) ) & |
---|
5276 | * surf_usm_v(l)%ddz_green_stag(kw,m) |
---|
5277 | ENDDO |
---|
5278 | |
---|
5279 | t_green_v_p(l)%t(nzb_wall:nzt_wall,m) = & |
---|
5280 | t_green_v(l)%t(nzb_wall:nzt_wall,m) & |
---|
5281 | + dt_3d * ( tsc(2) & |
---|
5282 | * gtend(nzb_wall:nzt_wall) + tsc(3) & |
---|
5283 | * surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall,m) ) |
---|
5284 | |
---|
5285 | ! |
---|
5286 | !-- calculate t_green tendencies for the next Runge-Kutta step |
---|
5287 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
5288 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
5289 | DO kw = nzb_wall, nzt_wall |
---|
5290 | surf_usm_v(l)%tt_green_m(kw,m) = gtend(kw) |
---|
5291 | ENDDO |
---|
5292 | ELSEIF ( intermediate_timestep_count < & |
---|
5293 | intermediate_timestep_count_max ) THEN |
---|
5294 | DO kw = nzb_wall, nzt_wall |
---|
5295 | surf_usm_v(l)%tt_green_m(kw,m) = & |
---|
5296 | - 9.5625_wp * gtend(kw) + & |
---|
5297 | 5.3125_wp * surf_usm_v(l)%tt_green_m(kw,m) |
---|
5298 | ENDDO |
---|
5299 | ENDIF |
---|
5300 | ENDIF |
---|
5301 | |
---|
5302 | ENDDO |
---|
5303 | ENDDO |
---|
5304 | |
---|
5305 | END SUBROUTINE usm_green_heat_model |
---|
5306 | |
---|
5307 | !------------------------------------------------------------------------------! |
---|
5308 | ! Description: |
---|
5309 | ! ------------ |
---|
5310 | !> Parin for &usm_par for urban surface model |
---|
5311 | !------------------------------------------------------------------------------! |
---|
5312 | SUBROUTINE usm_parin |
---|
5313 | |
---|
5314 | IMPLICIT NONE |
---|
5315 | |
---|
5316 | CHARACTER (LEN=80) :: line !< string containing current line of file PARIN |
---|
5317 | |
---|
5318 | NAMELIST /urban_surface_par/ & |
---|
5319 | building_type, & |
---|
5320 | land_category, & |
---|
5321 | naheatlayers, & |
---|
5322 | pedestrian_category, & |
---|
5323 | roughness_concrete, & |
---|
5324 | read_wall_temp_3d, & |
---|
5325 | roof_category, & |
---|
5326 | urban_surface, & |
---|
5327 | usm_anthropogenic_heat, & |
---|
5328 | usm_material_model, & |
---|
5329 | wall_category, & |
---|
5330 | indoor_model, & |
---|
5331 | wall_inner_temperature, & |
---|
5332 | roof_inner_temperature, & |
---|
5333 | soil_inner_temperature, & |
---|
5334 | window_inner_temperature |
---|
5335 | |
---|
5336 | NAMELIST /urban_surface_parameters/ & |
---|
5337 | building_type, & |
---|
5338 | land_category, & |
---|
5339 | naheatlayers, & |
---|
5340 | pedestrian_category, & |
---|
5341 | roughness_concrete, & |
---|
5342 | read_wall_temp_3d, & |
---|
5343 | roof_category, & |
---|
5344 | urban_surface, & |
---|
5345 | usm_anthropogenic_heat, & |
---|
5346 | usm_material_model, & |
---|
5347 | wall_category, & |
---|
5348 | indoor_model, & |
---|
5349 | wall_inner_temperature, & |
---|
5350 | roof_inner_temperature, & |
---|
5351 | soil_inner_temperature, & |
---|
5352 | window_inner_temperature |
---|
5353 | ! |
---|
5354 | !-- Try to find urban surface model package |
---|
5355 | REWIND ( 11 ) |
---|
5356 | line = ' ' |
---|
5357 | DO WHILE ( INDEX( line, '&urban_surface_parameters' ) == 0 ) |
---|
5358 | READ ( 11, '(A)', END=10 ) line |
---|
5359 | ENDDO |
---|
5360 | BACKSPACE ( 11 ) |
---|
5361 | |
---|
5362 | ! |
---|
5363 | !-- Read user-defined namelist |
---|
5364 | READ ( 11, urban_surface_parameters ) |
---|
5365 | ! |
---|
5366 | !-- Set flag that indicates that the land surface model is switched on |
---|
5367 | urban_surface = .TRUE. |
---|
5368 | |
---|
5369 | GOTO 12 |
---|
5370 | ! |
---|
5371 | !-- Try to find old namelist |
---|
5372 | 10 REWIND ( 11 ) |
---|
5373 | line = ' ' |
---|
5374 | DO WHILE ( INDEX( line, '&urban_surface_par' ) == 0 ) |
---|
5375 | READ ( 11, '(A)', END=12 ) line |
---|
5376 | ENDDO |
---|
5377 | BACKSPACE ( 11 ) |
---|
5378 | |
---|
5379 | ! |
---|
5380 | !-- Read user-defined namelist |
---|
5381 | READ ( 11, urban_surface_par ) |
---|
5382 | |
---|
5383 | message_string = 'namelist urban_surface_par is deprecated and will be ' // & |
---|
5384 | 'removed in near future. Please use namelist ' // & |
---|
5385 | 'urban_surface_parameters instead' |
---|
5386 | CALL message( 'usm_parin', 'PA0487', 0, 1, 0, 6, 0 ) |
---|
5387 | ! |
---|
5388 | !-- Set flag that indicates that the land surface model is switched on |
---|
5389 | urban_surface = .TRUE. |
---|
5390 | |
---|
5391 | 12 CONTINUE |
---|
5392 | |
---|
5393 | |
---|
5394 | END SUBROUTINE usm_parin |
---|
5395 | |
---|
5396 | !------------------------------------------------------------------------------! |
---|
5397 | ! Description: |
---|
5398 | ! ------------ |
---|
5399 | !> Calculates temperature near surface (10 cm) for indoor model |
---|
5400 | !------------------------------------------------------------------------------! |
---|
5401 | SUBROUTINE usm_temperature_near_surface |
---|
5402 | |
---|
5403 | IMPLICIT NONE |
---|
5404 | |
---|
5405 | INTEGER(iwp) :: i, j, k, l, m !< running indices |
---|
5406 | |
---|
5407 | ! |
---|
5408 | !-- First, treat horizontal surface elements |
---|
5409 | DO m = 1, surf_usm_h%ns |
---|
5410 | |
---|
5411 | !-- Get indices of respective grid point |
---|
5412 | i = surf_usm_h%i(m) |
---|
5413 | j = surf_usm_h%j(m) |
---|
5414 | k = surf_usm_h%k(m) |
---|
5415 | |
---|
5416 | t_surf_10cm_h(m) = surf_usm_h%pt_surface(m) + surf_usm_h%ts(m) / kappa & |
---|
5417 | * ( log( 0.1_wp / surf_usm_h%z0h(m) ) & |
---|
5418 | - psi_h( 0.1_wp / surf_usm_h%ol(m) ) & |
---|
5419 | + psi_h( surf_usm_h%z0h(m) / surf_usm_h%ol(m) ) ) |
---|
5420 | |
---|
5421 | ENDDO |
---|
5422 | ! |
---|
5423 | !-- Now, treat vertical surface elements |
---|
5424 | DO l = 0, 3 |
---|
5425 | DO m = 1, surf_usm_v(l)%ns |
---|
5426 | |
---|
5427 | !-- Get indices of respective grid point |
---|
5428 | i = surf_usm_v(l)%i(m) |
---|
5429 | j = surf_usm_v(l)%j(m) |
---|
5430 | k = surf_usm_v(l)%k(m) |
---|
5431 | |
---|
5432 | t_surf_10cm_v(l)%t(m) =surf_usm_v(l)%pt_surface(m) + surf_usm_v(l)%ts(m) / kappa & |
---|
5433 | * ( log( 0.1_wp / surf_usm_v(l)%z0h(m) ) & |
---|
5434 | - psi_h( 0.1_wp / surf_usm_v(l)%ol(m) ) & |
---|
5435 | + psi_h( surf_usm_v(l)%z0h(m) / surf_usm_v(l)%ol(m) ) ) |
---|
5436 | |
---|
5437 | ENDDO |
---|
5438 | |
---|
5439 | ENDDO |
---|
5440 | |
---|
5441 | |
---|
5442 | END SUBROUTINE usm_temperature_near_surface |
---|
5443 | |
---|
5444 | |
---|
5445 | |
---|
5446 | !------------------------------------------------------------------------------! |
---|
5447 | ! Description: |
---|
5448 | ! ------------ |
---|
5449 | ! |
---|
5450 | !> This subroutine is part of the urban surface model. |
---|
5451 | !> It reads daily heat produced by anthropogenic sources |
---|
5452 | !> and the diurnal cycle of the heat. |
---|
5453 | !------------------------------------------------------------------------------! |
---|
5454 | SUBROUTINE usm_read_anthropogenic_heat |
---|
5455 | |
---|
5456 | INTEGER(iwp) :: i,j,k,ii |
---|
5457 | REAL(wp) :: heat |
---|
5458 | |
---|
5459 | !-- allocation of array of sources of anthropogenic heat and their diural profile |
---|
5460 | ALLOCATE( aheat(naheatlayers,nys:nyn,nxl:nxr) ) |
---|
5461 | ALLOCATE( aheatprof(naheatlayers,0:24) ) |
---|
5462 | |
---|
5463 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
5464 | !-- read daily amount of heat and its daily cycle |
---|
5465 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
5466 | aheat = 0.0_wp |
---|
5467 | DO ii = 0, io_blocks-1 |
---|
5468 | IF ( ii == io_group ) THEN |
---|
5469 | |
---|
5470 | !-- open anthropogenic heat file |
---|
5471 | OPEN( 151, file='ANTHROPOGENIC_HEAT'//TRIM(coupling_char), action='read', & |
---|
5472 | status='old', form='formatted', err=11 ) |
---|
5473 | i = 0 |
---|
5474 | j = 0 |
---|
5475 | DO |
---|
5476 | READ( 151, *, err=12, end=13 ) i, j, k, heat |
---|
5477 | IF ( i >= nxl .AND. i <= nxr .AND. j >= nys .AND. j <= nyn ) THEN |
---|
5478 | IF ( k <= naheatlayers .AND. k > get_topography_top_index_ji( j, i, 's' ) ) THEN |
---|
5479 | !-- write heat into the array |
---|
5480 | aheat(k,j,i) = heat |
---|
5481 | ENDIF |
---|
5482 | ENDIF |
---|
5483 | CYCLE |
---|
5484 | 12 WRITE(message_string,'(a,2i4)') 'error in file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' after line ',i,j |
---|
5485 | CALL message( 'usm_read_anthropogenic_heat', 'PA0515', 0, 1, 0, 6, 0 ) |
---|
5486 | ENDDO |
---|
5487 | 13 CLOSE(151) |
---|
5488 | CYCLE |
---|
5489 | 11 message_string = 'file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' does not exist' |
---|
5490 | CALL message( 'usm_read_anthropogenic_heat', 'PA0516', 1, 2, 0, 6, 0 ) |
---|
5491 | ENDIF |
---|
5492 | |
---|
5493 | #if defined( __parallel ) |
---|
5494 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
5495 | #endif |
---|
5496 | ENDDO |
---|
5497 | |
---|
5498 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
5499 | !-- read diurnal profiles of heat sources |
---|
5500 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
5501 | aheatprof = 0.0_wp |
---|
5502 | DO ii = 0, io_blocks-1 |
---|
5503 | IF ( ii == io_group ) THEN |
---|
5504 | |
---|
5505 | !-- open anthropogenic heat profile file |
---|
5506 | OPEN( 151, file='ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char), action='read', & |
---|
5507 | status='old', form='formatted', err=21 ) |
---|
5508 | i = 0 |
---|
5509 | DO |
---|
5510 | READ( 151, *, err=22, end=23 ) i, k, heat |
---|
5511 | IF ( i >= 0 .AND. i <= 24 .AND. k <= naheatlayers ) THEN |
---|
5512 | !-- write heat into the array |
---|
5513 | aheatprof(k,i) = heat |
---|
5514 | ENDIF |
---|
5515 | CYCLE |
---|
5516 | 22 WRITE(message_string,'(a,i4)') 'error in file ANTHROPOGENIC_HEAT_PROFILE'// & |
---|
5517 | TRIM(coupling_char)//' after line ',i |
---|
5518 | CALL message( 'usm_read_anthropogenic_heat', 'PA0517', 0, 1, 0, 6, 0 ) |
---|
5519 | ENDDO |
---|
5520 | aheatprof(:,24) = aheatprof(:,0) |
---|
5521 | 23 CLOSE(151) |
---|
5522 | CYCLE |
---|
5523 | 21 message_string = 'file ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char)//' does not exist' |
---|
5524 | CALL message( 'usm_read_anthropogenic_heat', 'PA0518', 1, 2, 0, 6, 0 ) |
---|
5525 | ENDIF |
---|
5526 | |
---|
5527 | #if defined( __parallel ) |
---|
5528 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
5529 | #endif |
---|
5530 | ENDDO |
---|
5531 | |
---|
5532 | END SUBROUTINE usm_read_anthropogenic_heat |
---|
5533 | |
---|
5534 | |
---|
5535 | !------------------------------------------------------------------------------! |
---|
5536 | ! Description: |
---|
5537 | ! ------------ |
---|
5538 | !> Soubroutine reads t_surf and t_wall data from restart files |
---|
5539 | !------------------------------------------------------------------------------! |
---|
5540 | SUBROUTINE usm_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & |
---|
5541 | nxr_on_file, nynf, nync, nyn_on_file, nysf, nysc,& |
---|
5542 | nys_on_file, found ) |
---|
5543 | |
---|
5544 | |
---|
5545 | USE control_parameters, & |
---|
5546 | ONLY: length, restart_string |
---|
5547 | |
---|
5548 | IMPLICIT NONE |
---|
5549 | |
---|
5550 | CHARACTER (LEN=1) :: dum !< dummy to create correct string for reading input variable |
---|
5551 | |
---|
5552 | INTEGER(iwp) :: l !< index variable for surface type |
---|
5553 | INTEGER(iwp) :: i !< running index over input files |
---|
5554 | INTEGER(iwp) :: k !< running index over previous input files covering current local domain |
---|
5555 | INTEGER(iwp) :: ns_h_on_file_usm !< number of horizontal surface elements (urban type) on file |
---|
5556 | INTEGER(iwp) :: nxlc !< index of left boundary on current subdomain |
---|
5557 | INTEGER(iwp) :: nxlf !< index of left boundary on former subdomain |
---|
5558 | INTEGER(iwp) :: nxl_on_file !< index of left boundary on former local domain |
---|
5559 | INTEGER(iwp) :: nxrc !< index of right boundary on current subdomain |
---|
5560 | INTEGER(iwp) :: nxrf !< index of right boundary on former subdomain |
---|
5561 | INTEGER(iwp) :: nxr_on_file !< index of right boundary on former local domain |
---|
5562 | INTEGER(iwp) :: nync !< index of north boundary on current subdomain |
---|
5563 | INTEGER(iwp) :: nynf !< index of north boundary on former subdomain |
---|
5564 | INTEGER(iwp) :: nyn_on_file !< index of north boundary on former local domain |
---|
5565 | INTEGER(iwp) :: nysc !< index of south boundary on current subdomain |
---|
5566 | INTEGER(iwp) :: nysf !< index of south boundary on former subdomain |
---|
5567 | INTEGER(iwp) :: nys_on_file !< index of south boundary on former local domain |
---|
5568 | |
---|
5569 | INTEGER(iwp) :: ns_v_on_file_usm(0:3) !< number of vertical surface elements (urban type) on file |
---|
5570 | |
---|
5571 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: start_index_on_file |
---|
5572 | INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE :: end_index_on_file |
---|
5573 | |
---|
5574 | LOGICAL, INTENT(OUT) :: found |
---|
5575 | |
---|
5576 | REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tmp_surf_h, tmp_surf_window_h, tmp_surf_green_h |
---|
5577 | REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE :: tmp_wall_h, tmp_window_h, tmp_green_h |
---|
5578 | |
---|
5579 | TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE :: tmp_surf_v, tmp_surf_window_v, tmp_surf_green_v |
---|
5580 | TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE :: tmp_wall_v, tmp_window_v, tmp_green_v |
---|
5581 | |
---|
5582 | |
---|
5583 | found = .TRUE. |
---|
5584 | |
---|
5585 | |
---|
5586 | SELECT CASE ( restart_string(1:length) ) |
---|
5587 | |
---|
5588 | CASE ( 'ns_h_on_file_usm') |
---|
5589 | IF ( k == 1 ) THEN |
---|
5590 | READ ( 13 ) ns_h_on_file_usm |
---|
5591 | |
---|
5592 | IF ( ALLOCATED( tmp_surf_h ) ) DEALLOCATE( tmp_surf_h ) |
---|
5593 | IF ( ALLOCATED( tmp_wall_h ) ) DEALLOCATE( tmp_wall_h ) |
---|
5594 | IF ( ALLOCATED( tmp_surf_window_h ) ) & |
---|
5595 | DEALLOCATE( tmp_surf_window_h ) |
---|
5596 | IF ( ALLOCATED( tmp_window_h) ) DEALLOCATE( tmp_window_h ) |
---|
5597 | IF ( ALLOCATED( tmp_surf_green_h) ) & |
---|
5598 | DEALLOCATE( tmp_surf_green_h ) |
---|
5599 | IF ( ALLOCATED( tmp_green_h) ) DEALLOCATE( tmp_green_h ) |
---|
5600 | |
---|
5601 | ! |
---|
5602 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
5603 | !-- the size of allocated surface elements do not necessarily |
---|
5604 | !-- need to match the size of present surface elements on |
---|
5605 | !-- current processor, as the number of processors between |
---|
5606 | !-- restarts can change. |
---|
5607 | ALLOCATE( tmp_surf_h(1:ns_h_on_file_usm) ) |
---|
5608 | ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1, & |
---|
5609 | 1:ns_h_on_file_usm) ) |
---|
5610 | ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) ) |
---|
5611 | ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1, & |
---|
5612 | 1:ns_h_on_file_usm) ) |
---|
5613 | ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) ) |
---|
5614 | ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1, & |
---|
5615 | 1:ns_h_on_file_usm) ) |
---|
5616 | |
---|
5617 | ENDIF |
---|
5618 | |
---|
5619 | CASE ( 'ns_v_on_file_usm') |
---|
5620 | IF ( k == 1 ) THEN |
---|
5621 | READ ( 13 ) ns_v_on_file_usm |
---|
5622 | |
---|
5623 | DO l = 0, 3 |
---|
5624 | IF ( ALLOCATED( tmp_surf_v(l)%t ) ) & |
---|
5625 | DEALLOCATE( tmp_surf_v(l)%t ) |
---|
5626 | IF ( ALLOCATED( tmp_wall_v(l)%t ) ) & |
---|
5627 | DEALLOCATE( tmp_wall_v(l)%t ) |
---|
5628 | IF ( ALLOCATED( tmp_surf_window_v(l)%t ) ) & |
---|
5629 | DEALLOCATE( tmp_surf_window_v(l)%t ) |
---|
5630 | IF ( ALLOCATED( tmp_window_v(l)%t ) ) & |
---|
5631 | DEALLOCATE( tmp_window_v(l)%t ) |
---|
5632 | IF ( ALLOCATED( tmp_surf_green_v(l)%t ) ) & |
---|
5633 | DEALLOCATE( tmp_surf_green_v(l)%t ) |
---|
5634 | IF ( ALLOCATED( tmp_green_v(l)%t ) ) & |
---|
5635 | DEALLOCATE( tmp_green_v(l)%t ) |
---|
5636 | ENDDO |
---|
5637 | |
---|
5638 | ! |
---|
5639 | !-- Allocate temporary arrays for reading data on file. Note, |
---|
5640 | !-- the size of allocated surface elements do not necessarily |
---|
5641 | !-- need to match the size of present surface elements on |
---|
5642 | !-- current processor, as the number of processors between |
---|
5643 | !-- restarts can change. |
---|
5644 | DO l = 0, 3 |
---|
5645 | ALLOCATE( tmp_surf_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
5646 | ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
5647 | 1:ns_v_on_file_usm(l) ) ) |
---|
5648 | ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
5649 | ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
5650 | 1:ns_v_on_file_usm(l) ) ) |
---|
5651 | ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) ) |
---|
5652 | ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1, & |
---|
5653 | 1:ns_v_on_file_usm(l) ) ) |
---|
5654 | ENDDO |
---|
5655 | |
---|
5656 | ENDIF |
---|
5657 | |
---|
5658 | CASE ( 'usm_start_index_h', 'usm_start_index_v' ) |
---|
5659 | IF ( k == 1 ) THEN |
---|
5660 | |
---|
5661 | IF ( ALLOCATED( start_index_on_file ) ) & |
---|
5662 | DEALLOCATE( start_index_on_file ) |
---|
5663 | |
---|
5664 | ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file, & |
---|
5665 | nxl_on_file:nxr_on_file) ) |
---|
5666 | |
---|
5667 | READ ( 13 ) start_index_on_file |
---|
5668 | |
---|
5669 | ENDIF |
---|
5670 | |
---|
5671 | CASE ( 'usm_end_index_h', 'usm_end_index_v' ) |
---|
5672 | IF ( k == 1 ) THEN |
---|
5673 | |
---|
5674 | IF ( ALLOCATED( end_index_on_file ) ) & |
---|
5675 | DEALLOCATE( end_index_on_file ) |
---|
5676 | |
---|
5677 | ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file, & |
---|
5678 | nxl_on_file:nxr_on_file) ) |
---|
5679 | |
---|
5680 | READ ( 13 ) end_index_on_file |
---|
5681 | |
---|
5682 | ENDIF |
---|
5683 | |
---|
5684 | CASE ( 't_surf_h' ) |
---|
5685 | #if defined( __nopointer ) |
---|
5686 | IF ( k == 1 ) THEN |
---|
5687 | IF ( .NOT. ALLOCATED( t_surf_h ) ) & |
---|
5688 | ALLOCATE( t_surf_h(1:surf_usm_h%ns) ) |
---|
5689 | READ ( 13 ) tmp_surf_h |
---|
5690 | ENDIF |
---|
5691 | CALL surface_restore_elements( & |
---|
5692 | t_surf_h, tmp_surf_h, & |
---|
5693 | surf_usm_h%start_index, & |
---|
5694 | start_index_on_file, & |
---|
5695 | end_index_on_file, & |
---|
5696 | nxlc, nysc, & |
---|
5697 | nxlf, nxrf, nysf, nynf, & |
---|
5698 | nys_on_file, nyn_on_file, & |
---|
5699 | nxl_on_file,nxr_on_file ) |
---|
5700 | #else |
---|
5701 | IF ( k == 1 ) THEN |
---|
5702 | IF ( .NOT. ALLOCATED( t_surf_h_1 ) ) & |
---|
5703 | ALLOCATE( t_surf_h_1(1:surf_usm_h%ns) ) |
---|
5704 | READ ( 13 ) tmp_surf_h |
---|
5705 | ENDIF |
---|
5706 | CALL surface_restore_elements( & |
---|
5707 | t_surf_h_1, tmp_surf_h, & |
---|
5708 | surf_usm_h%start_index, & |
---|
5709 | start_index_on_file, & |
---|
5710 | end_index_on_file, & |
---|
5711 | nxlc, nysc, & |
---|
5712 | nxlf, nxrf, nysf, nynf, & |
---|
5713 | nys_on_file, nyn_on_file, & |
---|
5714 | nxl_on_file,nxr_on_file ) |
---|
5715 | #endif |
---|
5716 | |
---|
5717 | CASE ( 't_surf_v(0)' ) |
---|
5718 | #if defined( __nopointer ) |
---|
5719 | IF ( k == 1 ) THEN |
---|
5720 | IF ( .NOT. ALLOCATED( t_surf_v(0)%t ) ) & |
---|
5721 | ALLOCATE( t_surf_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
5722 | READ ( 13 ) tmp_surf_v(0)%t |
---|
5723 | ENDIF |
---|
5724 | CALL surface_restore_elements( & |
---|
5725 | t_surf_v(0)%t, tmp_surf_v(0)%t, & |
---|
5726 | surf_usm_v(0)%start_index, & |
---|
5727 | start_index_on_file, & |
---|
5728 | end_index_on_file, & |
---|
5729 | nxlc, nysc, & |
---|
5730 | nxlf, nxrf, nysf, nynf, & |
---|
5731 | nys_on_file, nyn_on_file, & |
---|
5732 | nxl_on_file,nxr_on_file ) |
---|
5733 | #else |
---|
5734 | IF ( k == 1 ) THEN |
---|
5735 | IF ( .NOT. ALLOCATED( t_surf_v_1(0)%t ) ) & |
---|
5736 | ALLOCATE( t_surf_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
5737 | READ ( 13 ) tmp_surf_v(0)%t |
---|
5738 | ENDIF |
---|
5739 | CALL surface_restore_elements( & |
---|
5740 | t_surf_v_1(0)%t, tmp_surf_v(0)%t, & |
---|
5741 | surf_usm_v(0)%start_index, & |
---|
5742 | start_index_on_file, & |
---|
5743 | end_index_on_file, & |
---|
5744 | nxlc, nysc, & |
---|
5745 | nxlf, nxrf, nysf, nynf, & |
---|
5746 | nys_on_file, nyn_on_file, & |
---|
5747 | nxl_on_file,nxr_on_file ) |
---|
5748 | #endif |
---|
5749 | |
---|
5750 | CASE ( 't_surf_v(1)' ) |
---|
5751 | #if defined( __nopointer ) |
---|
5752 | IF ( k == 1 ) THEN |
---|
5753 | IF ( .NOT. ALLOCATED( t_surf_v(1)%t ) ) & |
---|
5754 | ALLOCATE( t_surf_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
5755 | READ ( 13 ) tmp_surf_v(1)%t |
---|
5756 | ENDIF |
---|
5757 | CALL surface_restore_elements( & |
---|
5758 | t_surf_v(1)%t, tmp_surf_v(1)%t, & |
---|
5759 | surf_usm_v(1)%start_index, & |
---|
5760 | start_index_on_file, & |
---|
5761 | end_index_on_file, & |
---|
5762 | nxlc, nysc, & |
---|
5763 | nxlf, nxrf, nysf, nynf, & |
---|
5764 | nys_on_file, nyn_on_file, & |
---|
5765 | nxl_on_file,nxr_on_file ) |
---|
5766 | #else |
---|
5767 | IF ( k == 1 ) THEN |
---|
5768 | IF ( .NOT. ALLOCATED( t_surf_v_1(1)%t ) ) & |
---|
5769 | ALLOCATE( t_surf_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
5770 | READ ( 13 ) tmp_surf_v(1)%t |
---|
5771 | ENDIF |
---|
5772 | CALL surface_restore_elements( & |
---|
5773 | t_surf_v_1(1)%t, tmp_surf_v(1)%t, & |
---|
5774 | surf_usm_v(1)%start_index, & |
---|
5775 | start_index_on_file, & |
---|
5776 | end_index_on_file, & |
---|
5777 | nxlc, nysc, & |
---|
5778 | nxlf, nxrf, nysf, nynf, & |
---|
5779 | nys_on_file, nyn_on_file, & |
---|
5780 | nxl_on_file,nxr_on_file ) |
---|
5781 | #endif |
---|
5782 | |
---|
5783 | CASE ( 't_surf_v(2)' ) |
---|
5784 | #if defined( __nopointer ) |
---|
5785 | IF ( k == 1 ) THEN |
---|
5786 | IF ( .NOT. ALLOCATED( t_surf_v(2)%t ) ) & |
---|
5787 | ALLOCATE( t_surf_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
5788 | READ ( 13 ) tmp_surf_v(2)%t |
---|
5789 | ENDIF |
---|
5790 | CALL surface_restore_elements( & |
---|
5791 | t_surf_v(2)%t, tmp_surf_v(2)%t, & |
---|
5792 | surf_usm_v(2)%start_index, & |
---|
5793 | start_index_on_file, & |
---|
5794 | end_index_on_file, & |
---|
5795 | nxlc, nysc, & |
---|
5796 | nxlf, nxrf, nysf, nynf, & |
---|
5797 | nys_on_file, nyn_on_file, & |
---|
5798 | nxl_on_file,nxr_on_file ) |
---|
5799 | #else |
---|
5800 | IF ( k == 1 ) THEN |
---|
5801 | IF ( .NOT. ALLOCATED( t_surf_v_1(2)%t ) ) & |
---|
5802 | ALLOCATE( t_surf_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
5803 | READ ( 13 ) tmp_surf_v(2)%t |
---|
5804 | ENDIF |
---|
5805 | CALL surface_restore_elements( & |
---|
5806 | t_surf_v_1(2)%t, tmp_surf_v(2)%t, & |
---|
5807 | surf_usm_v(2)%start_index, & |
---|
5808 | start_index_on_file, & |
---|
5809 | end_index_on_file, & |
---|
5810 | nxlc, nysc, & |
---|
5811 | nxlf, nxrf, nysf, nynf, & |
---|
5812 | nys_on_file, nyn_on_file, & |
---|
5813 | nxl_on_file,nxr_on_file ) |
---|
5814 | #endif |
---|
5815 | |
---|
5816 | CASE ( 't_surf_v(3)' ) |
---|
5817 | #if defined( __nopointer ) |
---|
5818 | IF ( k == 1 ) THEN |
---|
5819 | IF ( .NOT. ALLOCATED( t_surf_v(3)%t ) ) & |
---|
5820 | ALLOCATE( t_surf_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
5821 | READ ( 13 ) tmp_surf_v(3)%t |
---|
5822 | ENDIF |
---|
5823 | CALL surface_restore_elements( & |
---|
5824 | t_surf_v(3)%t, tmp_surf_v(3)%t, & |
---|
5825 | surf_usm_v(3)%start_index, & |
---|
5826 | start_index_on_file, & |
---|
5827 | end_index_on_file, & |
---|
5828 | nxlc, nysc, & |
---|
5829 | nxlf, nxrf, nysf, nynf, & |
---|
5830 | nys_on_file, nyn_on_file, & |
---|
5831 | nxl_on_file,nxr_on_file ) |
---|
5832 | #else |
---|
5833 | IF ( k == 1 ) THEN |
---|
5834 | IF ( .NOT. ALLOCATED( t_surf_v_1(3)%t ) ) & |
---|
5835 | ALLOCATE( t_surf_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
5836 | READ ( 13 ) tmp_surf_v(3)%t |
---|
5837 | ENDIF |
---|
5838 | CALL surface_restore_elements( & |
---|
5839 | t_surf_v_1(3)%t, tmp_surf_v(3)%t, & |
---|
5840 | surf_usm_v(3)%start_index, & |
---|
5841 | start_index_on_file, & |
---|
5842 | end_index_on_file, & |
---|
5843 | nxlc, nysc, & |
---|
5844 | nxlf, nxrf, nysf, nynf, & |
---|
5845 | nys_on_file, nyn_on_file, & |
---|
5846 | nxl_on_file,nxr_on_file ) |
---|
5847 | #endif |
---|
5848 | CASE ( 't_surf_green_h' ) |
---|
5849 | #if defined( __nopointer ) |
---|
5850 | IF ( k == 1 ) THEN |
---|
5851 | IF ( .NOT. ALLOCATED( t_surf_green_h ) ) & |
---|
5852 | ALLOCATE( t_surf_green_h(1:surf_usm_h%ns) ) |
---|
5853 | READ ( 13 ) tmp_surf_green_h |
---|
5854 | ENDIF |
---|
5855 | CALL surface_restore_elements( & |
---|
5856 | t_surf_green_h, tmp_surf_green_h, & |
---|
5857 | surf_usm_h%start_index, & |
---|
5858 | start_index_on_file, & |
---|
5859 | end_index_on_file, & |
---|
5860 | nxlc, nysc, & |
---|
5861 | nxlf, nxrf, nysf, nynf, & |
---|
5862 | nys_on_file, nyn_on_file, & |
---|
5863 | nxl_on_file,nxr_on_file ) |
---|
5864 | #else |
---|
5865 | IF ( k == 1 ) THEN |
---|
5866 | IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) ) & |
---|
5867 | ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) ) |
---|
5868 | READ ( 13 ) tmp_surf_green_h |
---|
5869 | ENDIF |
---|
5870 | CALL surface_restore_elements( & |
---|
5871 | t_surf_green_h_1, tmp_surf_green_h, & |
---|
5872 | surf_usm_h%start_index, & |
---|
5873 | start_index_on_file, & |
---|
5874 | end_index_on_file, & |
---|
5875 | nxlc, nysc, & |
---|
5876 | nxlf, nxrf, nysf, nynf, & |
---|
5877 | nys_on_file, nyn_on_file, & |
---|
5878 | nxl_on_file,nxr_on_file ) |
---|
5879 | #endif |
---|
5880 | |
---|
5881 | CASE ( 't_surf_green_v(0)' ) |
---|
5882 | #if defined( __nopointer ) |
---|
5883 | IF ( k == 1 ) THEN |
---|
5884 | IF ( .NOT. ALLOCATED( t_surf_green_v(0)%t ) ) & |
---|
5885 | ALLOCATE( t_surf_green_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
5886 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
5887 | ENDIF |
---|
5888 | CALL surface_restore_elements( & |
---|
5889 | t_surf_green_v(0)%t, & |
---|
5890 | tmp_surf_green_v(0)%t, & |
---|
5891 | surf_usm_v(0)%start_index, & |
---|
5892 | start_index_on_file, & |
---|
5893 | end_index_on_file, & |
---|
5894 | nxlc, nysc, & |
---|
5895 | nxlf, nxrf, nysf, nynf, & |
---|
5896 | nys_on_file, nyn_on_file, & |
---|
5897 | nxl_on_file,nxr_on_file ) |
---|
5898 | #else |
---|
5899 | IF ( k == 1 ) THEN |
---|
5900 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(0)%t ) ) & |
---|
5901 | ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
5902 | READ ( 13 ) tmp_surf_green_v(0)%t |
---|
5903 | ENDIF |
---|
5904 | CALL surface_restore_elements( & |
---|
5905 | t_surf_green_v_1(0)%t, & |
---|
5906 | tmp_surf_green_v(0)%t, & |
---|
5907 | surf_usm_v(0)%start_index, & |
---|
5908 | start_index_on_file, & |
---|
5909 | end_index_on_file, & |
---|
5910 | nxlc, nysc, & |
---|
5911 | nxlf, nxrf, nysf, nynf, & |
---|
5912 | nys_on_file, nyn_on_file, & |
---|
5913 | nxl_on_file,nxr_on_file ) |
---|
5914 | #endif |
---|
5915 | |
---|
5916 | CASE ( 't_surf_green_v(1)' ) |
---|
5917 | #if defined( __nopointer ) |
---|
5918 | IF ( k == 1 ) THEN |
---|
5919 | IF ( .NOT. ALLOCATED( t_surf_green_v(1)%t ) ) & |
---|
5920 | ALLOCATE( t_surf_green_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
5921 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
5922 | ENDIF |
---|
5923 | CALL surface_restore_elements( & |
---|
5924 | t_surf_green_v(1)%t, & |
---|
5925 | tmp_surf_green_v(1)%t, & |
---|
5926 | surf_usm_v(1)%start_index, & |
---|
5927 | start_index_on_file, & |
---|
5928 | end_index_on_file, & |
---|
5929 | nxlc, nysc, & |
---|
5930 | nxlf, nxrf, nysf, nynf, & |
---|
5931 | nys_on_file, nyn_on_file, & |
---|
5932 | nxl_on_file,nxr_on_file ) |
---|
5933 | #else |
---|
5934 | IF ( k == 1 ) THEN |
---|
5935 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(1)%t ) ) & |
---|
5936 | ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
5937 | READ ( 13 ) tmp_surf_green_v(1)%t |
---|
5938 | ENDIF |
---|
5939 | CALL surface_restore_elements( & |
---|
5940 | t_surf_green_v_1(1)%t, & |
---|
5941 | tmp_surf_green_v(1)%t, & |
---|
5942 | surf_usm_v(1)%start_index, & |
---|
5943 | start_index_on_file, & |
---|
5944 | end_index_on_file, & |
---|
5945 | nxlc, nysc, & |
---|
5946 | nxlf, nxrf, nysf, nynf, & |
---|
5947 | nys_on_file, nyn_on_file, & |
---|
5948 | nxl_on_file,nxr_on_file ) |
---|
5949 | #endif |
---|
5950 | |
---|
5951 | CASE ( 't_surf_green_v(2)' ) |
---|
5952 | #if defined( __nopointer ) |
---|
5953 | IF ( k == 1 ) THEN |
---|
5954 | IF ( .NOT. ALLOCATED( t_surf_green_v(2)%t ) ) & |
---|
5955 | ALLOCATE( t_surf_green_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
5956 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
5957 | ENDIF |
---|
5958 | CALL surface_restore_elements( & |
---|
5959 | t_surf_green_v(2)%t, & |
---|
5960 | tmp_surf_green_v(2)%t, & |
---|
5961 | surf_usm_v(2)%start_index, & |
---|
5962 | start_index_on_file, & |
---|
5963 | end_index_on_file, & |
---|
5964 | nxlc, nysc, & |
---|
5965 | nxlf, nxrf, nysf, nynf, & |
---|
5966 | nys_on_file, nyn_on_file, & |
---|
5967 | nxl_on_file,nxr_on_file ) |
---|
5968 | #else |
---|
5969 | IF ( k == 1 ) THEN |
---|
5970 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(2)%t ) ) & |
---|
5971 | ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
5972 | READ ( 13 ) tmp_surf_green_v(2)%t |
---|
5973 | ENDIF |
---|
5974 | CALL surface_restore_elements( & |
---|
5975 | t_surf_green_v_1(2)%t, & |
---|
5976 | tmp_surf_green_v(2)%t, & |
---|
5977 | surf_usm_v(2)%start_index, & |
---|
5978 | start_index_on_file, & |
---|
5979 | end_index_on_file, & |
---|
5980 | nxlc, nysc, & |
---|
5981 | nxlf, nxrf, nysf, nynf, & |
---|
5982 | nys_on_file, nyn_on_file, & |
---|
5983 | nxl_on_file,nxr_on_file ) |
---|
5984 | #endif |
---|
5985 | |
---|
5986 | CASE ( 't_surf_green_v(3)' ) |
---|
5987 | #if defined( __nopointer ) |
---|
5988 | IF ( k == 1 ) THEN |
---|
5989 | IF ( .NOT. ALLOCATED( t_surf_green_v(3)%t ) ) & |
---|
5990 | ALLOCATE( t_surf_green_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
5991 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
5992 | ENDIF |
---|
5993 | CALL surface_restore_elements( & |
---|
5994 | t_surf_green_v(3)%t, & |
---|
5995 | tmp_surf_green_v(3)%t, & |
---|
5996 | surf_usm_v(3)%start_index, & |
---|
5997 | start_index_on_file, & |
---|
5998 | end_index_on_file, & |
---|
5999 | nxlc, nysc, & |
---|
6000 | nxlf, nxrf, nysf, nynf, & |
---|
6001 | nys_on_file, nyn_on_file, & |
---|
6002 | nxl_on_file,nxr_on_file ) |
---|
6003 | #else |
---|
6004 | IF ( k == 1 ) THEN |
---|
6005 | IF ( .NOT. ALLOCATED( t_surf_green_v_1(3)%t ) ) & |
---|
6006 | ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6007 | READ ( 13 ) tmp_surf_green_v(3)%t |
---|
6008 | ENDIF |
---|
6009 | CALL surface_restore_elements( & |
---|
6010 | t_surf_green_v_1(3)%t, & |
---|
6011 | tmp_surf_green_v(3)%t, & |
---|
6012 | surf_usm_v(3)%start_index, & |
---|
6013 | start_index_on_file, & |
---|
6014 | end_index_on_file, & |
---|
6015 | nxlc, nysc, & |
---|
6016 | nxlf, nxrf, nysf, nynf, & |
---|
6017 | nys_on_file, nyn_on_file, & |
---|
6018 | nxl_on_file,nxr_on_file ) |
---|
6019 | #endif |
---|
6020 | CASE ( 't_surf_window_h' ) |
---|
6021 | #if defined( __nopointer ) |
---|
6022 | IF ( k == 1 ) THEN |
---|
6023 | IF ( .NOT. ALLOCATED( t_surf_window_h ) ) & |
---|
6024 | ALLOCATE( t_surf_window_h(1:surf_usm_h%ns) ) |
---|
6025 | READ ( 13 ) tmp_surf_window_h |
---|
6026 | ENDIF |
---|
6027 | CALL surface_restore_elements( & |
---|
6028 | t_surf_window_h, tmp_surf_window_h, & |
---|
6029 | surf_usm_h%start_index, & |
---|
6030 | start_index_on_file, & |
---|
6031 | end_index_on_file, & |
---|
6032 | nxlc, nysc, & |
---|
6033 | nxlf, nxrf, nysf, nynf, & |
---|
6034 | nys_on_file, nyn_on_file, & |
---|
6035 | nxl_on_file,nxr_on_file ) |
---|
6036 | #else |
---|
6037 | IF ( k == 1 ) THEN |
---|
6038 | IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) ) & |
---|
6039 | ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) ) |
---|
6040 | READ ( 13 ) tmp_surf_window_h |
---|
6041 | ENDIF |
---|
6042 | CALL surface_restore_elements( & |
---|
6043 | t_surf_window_h_1, & |
---|
6044 | tmp_surf_window_h, & |
---|
6045 | surf_usm_h%start_index, & |
---|
6046 | start_index_on_file, & |
---|
6047 | end_index_on_file, & |
---|
6048 | nxlc, nysc, & |
---|
6049 | nxlf, nxrf, nysf, nynf, & |
---|
6050 | nys_on_file, nyn_on_file, & |
---|
6051 | nxl_on_file,nxr_on_file ) |
---|
6052 | #endif |
---|
6053 | |
---|
6054 | CASE ( 't_surf_window_v(0)' ) |
---|
6055 | #if defined( __nopointer ) |
---|
6056 | IF ( k == 1 ) THEN |
---|
6057 | IF ( .NOT. ALLOCATED( t_surf_window_v(0)%t ) ) & |
---|
6058 | ALLOCATE( t_surf_window_v(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6059 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
6060 | ENDIF |
---|
6061 | CALL surface_restore_elements( & |
---|
6062 | t_surf_window_v(0)%t, & |
---|
6063 | tmp_surf_window_v(0)%t, & |
---|
6064 | surf_usm_v(0)%start_index, & |
---|
6065 | start_index_on_file, & |
---|
6066 | end_index_on_file, & |
---|
6067 | nxlc, nysc, & |
---|
6068 | nxlf, nxrf, nysf, nynf, & |
---|
6069 | nys_on_file, nyn_on_file, & |
---|
6070 | nxl_on_file,nxr_on_file ) |
---|
6071 | #else |
---|
6072 | IF ( k == 1 ) THEN |
---|
6073 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(0)%t ) ) & |
---|
6074 | ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) ) |
---|
6075 | READ ( 13 ) tmp_surf_window_v(0)%t |
---|
6076 | ENDIF |
---|
6077 | CALL surface_restore_elements( & |
---|
6078 | t_surf_window_v_1(0)%t, & |
---|
6079 | tmp_surf_window_v(0)%t, & |
---|
6080 | surf_usm_v(0)%start_index, & |
---|
6081 | start_index_on_file, & |
---|
6082 | end_index_on_file, & |
---|
6083 | nxlc, nysc, & |
---|
6084 | nxlf, nxrf, nysf, nynf, & |
---|
6085 | nys_on_file, nyn_on_file, & |
---|
6086 | nxl_on_file,nxr_on_file ) |
---|
6087 | #endif |
---|
6088 | |
---|
6089 | CASE ( 't_surf_window_v(1)' ) |
---|
6090 | #if defined( __nopointer ) |
---|
6091 | IF ( k == 1 ) THEN |
---|
6092 | IF ( .NOT. ALLOCATED( t_surf_window_v(1)%t ) ) & |
---|
6093 | ALLOCATE( t_surf_window_v(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6094 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
6095 | ENDIF |
---|
6096 | CALL surface_restore_elements( & |
---|
6097 | t_surf_window_v(1)%t, & |
---|
6098 | tmp_surf_window_v(1)%t, & |
---|
6099 | surf_usm_v(1)%start_index, & |
---|
6100 | start_index_on_file, & |
---|
6101 | end_index_on_file, & |
---|
6102 | nxlc, nysc, & |
---|
6103 | nxlf, nxrf, nysf, nynf, & |
---|
6104 | nys_on_file, nyn_on_file, & |
---|
6105 | nxl_on_file,nxr_on_file ) |
---|
6106 | #else |
---|
6107 | IF ( k == 1 ) THEN |
---|
6108 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(1)%t ) ) & |
---|
6109 | ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) ) |
---|
6110 | READ ( 13 ) tmp_surf_window_v(1)%t |
---|
6111 | ENDIF |
---|
6112 | CALL surface_restore_elements( & |
---|
6113 | t_surf_window_v_1(1)%t, & |
---|
6114 | tmp_surf_window_v(1)%t, & |
---|
6115 | surf_usm_v(1)%start_index, & |
---|
6116 | start_index_on_file, & |
---|
6117 | end_index_on_file, & |
---|
6118 | nxlc, nysc, & |
---|
6119 | nxlf, nxrf, nysf, nynf, & |
---|
6120 | nys_on_file, nyn_on_file, & |
---|
6121 | nxl_on_file,nxr_on_file ) |
---|
6122 | #endif |
---|
6123 | |
---|
6124 | CASE ( 't_surf_window_v(2)' ) |
---|
6125 | #if defined( __nopointer ) |
---|
6126 | IF ( k == 1 ) THEN |
---|
6127 | IF ( .NOT. ALLOCATED( t_surf_window_v(2)%t ) ) & |
---|
6128 | ALLOCATE( t_surf_window_v(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6129 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
6130 | ENDIF |
---|
6131 | CALL surface_restore_elements( & |
---|
6132 | t_surf_window_v(2)%t, & |
---|
6133 | tmp_surf_window_v(2)%t, & |
---|
6134 | surf_usm_v(2)%start_index, & |
---|
6135 | start_index_on_file, & |
---|
6136 | end_index_on_file, & |
---|
6137 | nxlc, nysc, & |
---|
6138 | nxlf, nxrf, nysf, nynf, & |
---|
6139 | nys_on_file, nyn_on_file, & |
---|
6140 | nxl_on_file,nxr_on_file ) |
---|
6141 | #else |
---|
6142 | IF ( k == 1 ) THEN |
---|
6143 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(2)%t ) ) & |
---|
6144 | ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) ) |
---|
6145 | READ ( 13 ) tmp_surf_window_v(2)%t |
---|
6146 | ENDIF |
---|
6147 | CALL surface_restore_elements( & |
---|
6148 | t_surf_window_v_1(2)%t, & |
---|
6149 | tmp_surf_window_v(2)%t, & |
---|
6150 | surf_usm_v(2)%start_index, & |
---|
6151 | start_index_on_file, & |
---|
6152 | end_index_on_file, & |
---|
6153 | nxlc, nysc, & |
---|
6154 | nxlf, nxrf, nysf, nynf, & |
---|
6155 | nys_on_file, nyn_on_file, & |
---|
6156 | nxl_on_file,nxr_on_file ) |
---|
6157 | #endif |
---|
6158 | |
---|
6159 | CASE ( 't_surf_window_v(3)' ) |
---|
6160 | #if defined( __nopointer ) |
---|
6161 | IF ( k == 1 ) THEN |
---|
6162 | IF ( .NOT. ALLOCATED( t_surf_window_v(3)%t ) ) & |
---|
6163 | ALLOCATE( t_surf_window_v(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6164 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
6165 | ENDIF |
---|
6166 | CALL surface_restore_elements( & |
---|
6167 | t_surf_window_v(3)%t, & |
---|
6168 | tmp_surf_window_v(3)%t, & |
---|
6169 | surf_usm_v(3)%start_index, & |
---|
6170 | start_index_on_file, & |
---|
6171 | end_index_on_file, & |
---|
6172 | nxlc, nysc, & |
---|
6173 | nxlf, nxrf, nysf, nynf, & |
---|
6174 | nys_on_file, nyn_on_file, & |
---|
6175 | nxl_on_file,nxr_on_file ) |
---|
6176 | #else |
---|
6177 | IF ( k == 1 ) THEN |
---|
6178 | IF ( .NOT. ALLOCATED( t_surf_window_v_1(3)%t ) ) & |
---|
6179 | ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) ) |
---|
6180 | READ ( 13 ) tmp_surf_window_v(3)%t |
---|
6181 | ENDIF |
---|
6182 | CALL surface_restore_elements( & |
---|
6183 | t_surf_window_v_1(3)%t, & |
---|
6184 | tmp_surf_window_v(3)%t, & |
---|
6185 | surf_usm_v(3)%start_index, & |
---|
6186 | start_index_on_file, & |
---|
6187 | end_index_on_file, & |
---|
6188 | nxlc, nysc, & |
---|
6189 | nxlf, nxrf, nysf, nynf, & |
---|
6190 | nys_on_file, nyn_on_file, & |
---|
6191 | nxl_on_file,nxr_on_file ) |
---|
6192 | #endif |
---|
6193 | CASE ( 't_wall_h' ) |
---|
6194 | #if defined( __nopointer ) |
---|
6195 | IF ( k == 1 ) THEN |
---|
6196 | IF ( .NOT. ALLOCATED( t_wall_h ) ) & |
---|
6197 | ALLOCATE( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) |
---|
6198 | READ ( 13 ) tmp_wall_h |
---|
6199 | ENDIF |
---|
6200 | CALL surface_restore_elements( & |
---|
6201 | t_wall_h, tmp_wall_h, & |
---|
6202 | surf_usm_h%start_index, & |
---|
6203 | start_index_on_file, & |
---|
6204 | end_index_on_file, & |
---|
6205 | nxlc, nysc, & |
---|
6206 | nxlf, nxrf, nysf, nynf, & |
---|
6207 | nys_on_file, nyn_on_file, & |
---|
6208 | nxl_on_file,nxr_on_file ) |
---|
6209 | #else |
---|
6210 | IF ( k == 1 ) THEN |
---|
6211 | IF ( .NOT. ALLOCATED( t_wall_h_1 ) ) & |
---|
6212 | ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1, & |
---|
6213 | 1:surf_usm_h%ns) ) |
---|
6214 | READ ( 13 ) tmp_wall_h |
---|
6215 | ENDIF |
---|
6216 | CALL surface_restore_elements( & |
---|
6217 | t_wall_h_1, tmp_wall_h, & |
---|
6218 | surf_usm_h%start_index, & |
---|
6219 | start_index_on_file, & |
---|
6220 | end_index_on_file, & |
---|
6221 | nxlc, nysc, & |
---|
6222 | nxlf, nxrf, nysf, nynf, & |
---|
6223 | nys_on_file, nyn_on_file, & |
---|
6224 | nxl_on_file,nxr_on_file ) |
---|
6225 | #endif |
---|
6226 | CASE ( 't_wall_v(0)' ) |
---|
6227 | #if defined( __nopointer ) |
---|
6228 | IF ( k == 1 ) THEN |
---|
6229 | IF ( .NOT. ALLOCATED( t_wall_v(0)%t ) ) & |
---|
6230 | ALLOCATE( t_wall_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
6231 | 1:surf_usm_v(0)%ns) ) |
---|
6232 | READ ( 13 ) tmp_wall_v(0)%t |
---|
6233 | ENDIF |
---|
6234 | CALL surface_restore_elements( & |
---|
6235 | t_wall_v(0)%t, tmp_wall_v(0)%t, & |
---|
6236 | surf_usm_v(0)%start_index, & |
---|
6237 | start_index_on_file, & |
---|
6238 | end_index_on_file, & |
---|
6239 | nxlc, nysc, & |
---|
6240 | nxlf, nxrf, nysf, nynf, & |
---|
6241 | nys_on_file, nyn_on_file, & |
---|
6242 | nxl_on_file,nxr_on_file ) |
---|
6243 | #else |
---|
6244 | IF ( k == 1 ) THEN |
---|
6245 | IF ( .NOT. ALLOCATED( t_wall_v_1(0)%t ) ) & |
---|
6246 | ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6247 | 1:surf_usm_v(0)%ns) ) |
---|
6248 | READ ( 13 ) tmp_wall_v(0)%t |
---|
6249 | ENDIF |
---|
6250 | CALL surface_restore_elements( & |
---|
6251 | t_wall_v_1(0)%t, tmp_wall_v(0)%t, & |
---|
6252 | surf_usm_v(0)%start_index, & |
---|
6253 | start_index_on_file, & |
---|
6254 | end_index_on_file, & |
---|
6255 | nxlc, nysc, & |
---|
6256 | nxlf, nxrf, nysf, nynf, & |
---|
6257 | nys_on_file, nyn_on_file, & |
---|
6258 | nxl_on_file,nxr_on_file ) |
---|
6259 | #endif |
---|
6260 | CASE ( 't_wall_v(1)' ) |
---|
6261 | #if defined( __nopointer ) |
---|
6262 | IF ( k == 1 ) THEN |
---|
6263 | IF ( .NOT. ALLOCATED( t_wall_v(1)%t ) ) & |
---|
6264 | ALLOCATE( t_wall_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
6265 | 1:surf_usm_v(1)%ns) ) |
---|
6266 | READ ( 13 ) tmp_wall_v(1)%t |
---|
6267 | ENDIF |
---|
6268 | CALL surface_restore_elements( & |
---|
6269 | t_wall_v(1)%t, tmp_wall_v(1)%t, & |
---|
6270 | surf_usm_v(1)%start_index, & |
---|
6271 | start_index_on_file, & |
---|
6272 | end_index_on_file , & |
---|
6273 | nxlc, nysc, & |
---|
6274 | nys_on_file, nyn_on_file, & |
---|
6275 | nxl_on_file, nxr_on_file ) |
---|
6276 | #else |
---|
6277 | IF ( k == 1 ) THEN |
---|
6278 | IF ( .NOT. ALLOCATED( t_wall_v_1(1)%t ) ) & |
---|
6279 | ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
6280 | 1:surf_usm_v(1)%ns) ) |
---|
6281 | READ ( 13 ) tmp_wall_v(1)%t |
---|
6282 | ENDIF |
---|
6283 | CALL surface_restore_elements( & |
---|
6284 | t_wall_v_1(1)%t, tmp_wall_v(1)%t, & |
---|
6285 | surf_usm_v(1)%start_index, & |
---|
6286 | start_index_on_file, & |
---|
6287 | end_index_on_file, & |
---|
6288 | nxlc, nysc, & |
---|
6289 | nxlf, nxrf, nysf, nynf, & |
---|
6290 | nys_on_file, nyn_on_file, & |
---|
6291 | nxl_on_file,nxr_on_file ) |
---|
6292 | #endif |
---|
6293 | CASE ( 't_wall_v(2)' ) |
---|
6294 | #if defined( __nopointer ) |
---|
6295 | IF ( k == 1 ) THEN |
---|
6296 | IF ( .NOT. ALLOCATED( t_wall_v(2)%t ) ) & |
---|
6297 | ALLOCATE( t_wall_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
6298 | 1:surf_usm_v(2)%ns) ) |
---|
6299 | READ ( 13 ) tmp_wall_v(2)%t |
---|
6300 | ENDIF |
---|
6301 | CALL surface_restore_elements( & |
---|
6302 | t_wall_v(2)%t, tmp_wall_v(2)%t, & |
---|
6303 | surf_usm_v(2)%start_index, & |
---|
6304 | start_index_on_file, & |
---|
6305 | end_index_on_file, & |
---|
6306 | nxlc, nysc, & |
---|
6307 | nxlf, nxrf, nysf, nynf, & |
---|
6308 | nys_on_file, nyn_on_file, & |
---|
6309 | nxl_on_file,nxr_on_file ) |
---|
6310 | #else |
---|
6311 | IF ( k == 1 ) THEN |
---|
6312 | IF ( .NOT. ALLOCATED( t_wall_v_1(2)%t ) ) & |
---|
6313 | ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
6314 | 1:surf_usm_v(2)%ns) ) |
---|
6315 | READ ( 13 ) tmp_wall_v(2)%t |
---|
6316 | ENDIF |
---|
6317 | CALL surface_restore_elements( & |
---|
6318 | t_wall_v_1(2)%t, tmp_wall_v(2)%t, & |
---|
6319 | surf_usm_v(2)%start_index, & |
---|
6320 | start_index_on_file, & |
---|
6321 | end_index_on_file , & |
---|
6322 | nxlc, nysc, & |
---|
6323 | nxlf, nxrf, nysf, nynf, & |
---|
6324 | nys_on_file, nyn_on_file, & |
---|
6325 | nxl_on_file,nxr_on_file ) |
---|
6326 | #endif |
---|
6327 | CASE ( 't_wall_v(3)' ) |
---|
6328 | #if defined( __nopointer ) |
---|
6329 | IF ( k == 1 ) THEN |
---|
6330 | IF ( .NOT. ALLOCATED( t_wall_v(3)%t ) ) & |
---|
6331 | ALLOCATE( t_wall_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
6332 | 1:surf_usm_v(3)%ns) ) |
---|
6333 | READ ( 13 ) tmp_wall_v(3)%t |
---|
6334 | ENDIF |
---|
6335 | CALL surface_restore_elements( & |
---|
6336 | t_wall_v(3)%t, tmp_wall_v(3)%t, & |
---|
6337 | surf_usm_v(3)%start_index, & |
---|
6338 | start_index_on_file, & |
---|
6339 | end_index_on_file, & |
---|
6340 | nxlc, nysc, & |
---|
6341 | nxlf, nxrf, nysf, nynf, & |
---|
6342 | nys_on_file, nyn_on_file, & |
---|
6343 | nxl_on_file,nxr_on_file ) |
---|
6344 | #else |
---|
6345 | IF ( k == 1 ) THEN |
---|
6346 | IF ( .NOT. ALLOCATED( t_wall_v_1(3)%t ) ) & |
---|
6347 | ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
6348 | 1:surf_usm_v(3)%ns) ) |
---|
6349 | READ ( 13 ) tmp_wall_v(3)%t |
---|
6350 | ENDIF |
---|
6351 | CALL surface_restore_elements( & |
---|
6352 | t_wall_v_1(3)%t, tmp_wall_v(3)%t, & |
---|
6353 | surf_usm_v(3)%start_index, & |
---|
6354 | start_index_on_file, & |
---|
6355 | end_index_on_file, & |
---|
6356 | nxlc, nysc, & |
---|
6357 | nxlf, nxrf, nysf, nynf, & |
---|
6358 | nys_on_file, nyn_on_file, & |
---|
6359 | nxl_on_file,nxr_on_file ) |
---|
6360 | #endif |
---|
6361 | CASE ( 't_green_h' ) |
---|
6362 | #if defined( __nopointer ) |
---|
6363 | IF ( k == 1 ) THEN |
---|
6364 | IF ( .NOT. ALLOCATED( t_green_h ) ) & |
---|
6365 | ALLOCATE( t_green_h(nzb_wall:nzt_wall+1, & |
---|
6366 | 1:surf_usm_h%ns) ) |
---|
6367 | READ ( 13 ) tmp_green_h |
---|
6368 | ENDIF |
---|
6369 | CALL surface_restore_elements( & |
---|
6370 | t_green_h, tmp_green_h, & |
---|
6371 | surf_usm_h%start_index, & |
---|
6372 | start_index_on_file, & |
---|
6373 | end_index_on_file, & |
---|
6374 | nxlc, nysc, & |
---|
6375 | nxlf, nxrf, nysf, nynf, & |
---|
6376 | nys_on_file, nyn_on_file, & |
---|
6377 | nxl_on_file,nxr_on_file ) |
---|
6378 | #else |
---|
6379 | IF ( k == 1 ) THEN |
---|
6380 | IF ( .NOT. ALLOCATED( t_green_h_1 ) ) & |
---|
6381 | ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1, & |
---|
6382 | 1:surf_usm_h%ns) ) |
---|
6383 | READ ( 13 ) tmp_green_h |
---|
6384 | ENDIF |
---|
6385 | CALL surface_restore_elements( & |
---|
6386 | t_green_h_1, tmp_green_h, & |
---|
6387 | surf_usm_h%start_index, & |
---|
6388 | start_index_on_file, & |
---|
6389 | end_index_on_file, & |
---|
6390 | nxlc, nysc, & |
---|
6391 | nxlf, nxrf, nysf, nynf, & |
---|
6392 | nys_on_file, nyn_on_file, & |
---|
6393 | nxl_on_file,nxr_on_file ) |
---|
6394 | #endif |
---|
6395 | CASE ( 't_green_v(0)' ) |
---|
6396 | #if defined( __nopointer ) |
---|
6397 | IF ( k == 1 ) THEN |
---|
6398 | IF ( .NOT. ALLOCATED( t_green_v(0)%t ) ) & |
---|
6399 | ALLOCATE( t_green_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
6400 | 1:surf_usm_v(0)%ns) ) |
---|
6401 | READ ( 13 ) tmp_green_v(0)%t |
---|
6402 | ENDIF |
---|
6403 | CALL surface_restore_elements( & |
---|
6404 | t_green_v(0)%t, tmp_green_v(0)%t, & |
---|
6405 | surf_usm_v(0)%start_index, & |
---|
6406 | start_index_on_file, & |
---|
6407 | end_index_on_file, & |
---|
6408 | nxlc, nysc, & |
---|
6409 | nxlf, nxrf, nysf, nynf, & |
---|
6410 | nys_on_file, nyn_on_file, & |
---|
6411 | nxl_on_file,nxr_on_file ) |
---|
6412 | #else |
---|
6413 | IF ( k == 1 ) THEN |
---|
6414 | IF ( .NOT. ALLOCATED( t_green_v_1(0)%t ) ) & |
---|
6415 | ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6416 | 1:surf_usm_v(0)%ns) ) |
---|
6417 | READ ( 13 ) tmp_green_v(0)%t |
---|
6418 | ENDIF |
---|
6419 | CALL surface_restore_elements( & |
---|
6420 | t_green_v_1(0)%t, tmp_green_v(0)%t, & |
---|
6421 | surf_usm_v(0)%start_index, & |
---|
6422 | start_index_on_file, & |
---|
6423 | end_index_on_file, & |
---|
6424 | nxlc, nysc, & |
---|
6425 | nxlf, nxrf, nysf, nynf, & |
---|
6426 | nys_on_file, nyn_on_file, & |
---|
6427 | nxl_on_file,nxr_on_file ) |
---|
6428 | #endif |
---|
6429 | CASE ( 't_green_v(1)' ) |
---|
6430 | #if defined( __nopointer ) |
---|
6431 | IF ( k == 1 ) THEN |
---|
6432 | IF ( .NOT. ALLOCATED( t_green_v(1)%t ) ) & |
---|
6433 | ALLOCATE( t_green_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
6434 | 1:surf_usm_v(1)%ns) ) |
---|
6435 | READ ( 13 ) tmp_green_v(1)%t |
---|
6436 | ENDIF |
---|
6437 | CALL surface_restore_elements( & |
---|
6438 | t_green_v(1)%t, tmp_green_v(1)%t, & |
---|
6439 | surf_usm_v(1)%start_index, & |
---|
6440 | start_index_on_file, & |
---|
6441 | end_index_on_file , & |
---|
6442 | nxlc, nysc, & |
---|
6443 | nys_on_file, nyn_on_file, & |
---|
6444 | nxl_on_file,nxr_on_file ) |
---|
6445 | #else |
---|
6446 | IF ( k == 1 ) THEN |
---|
6447 | IF ( .NOT. ALLOCATED( t_green_v_1(1)%t ) ) & |
---|
6448 | ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
6449 | 1:surf_usm_v(1)%ns) ) |
---|
6450 | READ ( 13 ) tmp_green_v(1)%t |
---|
6451 | ENDIF |
---|
6452 | CALL surface_restore_elements( & |
---|
6453 | t_green_v_1(1)%t, tmp_green_v(1)%t, & |
---|
6454 | surf_usm_v(1)%start_index, & |
---|
6455 | start_index_on_file, & |
---|
6456 | end_index_on_file, & |
---|
6457 | nxlc, nysc, & |
---|
6458 | nxlf, nxrf, nysf, nynf, & |
---|
6459 | nys_on_file, nyn_on_file, & |
---|
6460 | nxl_on_file,nxr_on_file ) |
---|
6461 | #endif |
---|
6462 | CASE ( 't_green_v(2)' ) |
---|
6463 | #if defined( __nopointer ) |
---|
6464 | IF ( k == 1 ) THEN |
---|
6465 | IF ( .NOT. ALLOCATED( t_green_v(2)%t ) ) & |
---|
6466 | ALLOCATE( t_green_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
6467 | 1:surf_usm_v(2)%ns) ) |
---|
6468 | READ ( 13 ) tmp_green_v(2)%t |
---|
6469 | ENDIF |
---|
6470 | CALL surface_restore_elements( & |
---|
6471 | t_green_v(2)%t, tmp_green_v(2)%t, & |
---|
6472 | surf_usm_v(2)%start_index, & |
---|
6473 | start_index_on_file, & |
---|
6474 | end_index_on_file, & |
---|
6475 | nxlc, nysc, & |
---|
6476 | nxlf, nxrf, nysf, nynf, & |
---|
6477 | nys_on_file, nyn_on_file, & |
---|
6478 | nxl_on_file,nxr_on_file ) |
---|
6479 | #else |
---|
6480 | IF ( k == 1 ) THEN |
---|
6481 | IF ( .NOT. ALLOCATED( t_green_v_1(2)%t ) ) & |
---|
6482 | ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
6483 | 1:surf_usm_v(2)%ns) ) |
---|
6484 | READ ( 13 ) tmp_green_v(2)%t |
---|
6485 | ENDIF |
---|
6486 | CALL surface_restore_elements( & |
---|
6487 | t_green_v_1(2)%t, tmp_green_v(2)%t, & |
---|
6488 | surf_usm_v(2)%start_index, & |
---|
6489 | start_index_on_file, & |
---|
6490 | end_index_on_file , & |
---|
6491 | nxlc, nysc, & |
---|
6492 | nxlf, nxrf, nysf, nynf, & |
---|
6493 | nys_on_file, nyn_on_file, & |
---|
6494 | nxl_on_file,nxr_on_file ) |
---|
6495 | #endif |
---|
6496 | CASE ( 't_green_v(3)' ) |
---|
6497 | #if defined( __nopointer ) |
---|
6498 | IF ( k == 1 ) THEN |
---|
6499 | IF ( .NOT. ALLOCATED( t_green_v(3)%t ) ) & |
---|
6500 | ALLOCATE( t_green_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
6501 | 1:surf_usm_v(3)%ns) ) |
---|
6502 | READ ( 13 ) tmp_green_v(3)%t |
---|
6503 | ENDIF |
---|
6504 | CALL surface_restore_elements( & |
---|
6505 | t_green_v(3)%t, tmp_green_v(3)%t, & |
---|
6506 | surf_usm_v(3)%start_index, & |
---|
6507 | start_index_on_file, & |
---|
6508 | end_index_on_file, & |
---|
6509 | nxlc, nysc, & |
---|
6510 | nxlf, nxrf, nysf, nynf, & |
---|
6511 | nys_on_file, nyn_on_file, & |
---|
6512 | nxl_on_file,nxr_on_file ) |
---|
6513 | #else |
---|
6514 | IF ( k == 1 ) THEN |
---|
6515 | IF ( .NOT. ALLOCATED( t_green_v_1(3)%t ) ) & |
---|
6516 | ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1, & |
---|
6517 | 1:surf_usm_v(3)%ns) ) |
---|
6518 | READ ( 13 ) tmp_green_v(3)%t |
---|
6519 | ENDIF |
---|
6520 | CALL surface_restore_elements( & |
---|
6521 | t_green_v_1(3)%t, tmp_green_v(3)%t, & |
---|
6522 | surf_usm_v(3)%start_index, & |
---|
6523 | start_index_on_file, & |
---|
6524 | end_index_on_file, & |
---|
6525 | nxlc, nysc, & |
---|
6526 | nxlf, nxrf, nysf, nynf, & |
---|
6527 | nys_on_file, nyn_on_file, & |
---|
6528 | nxl_on_file,nxr_on_file ) |
---|
6529 | #endif |
---|
6530 | CASE ( 't_window_h' ) |
---|
6531 | #if defined( __nopointer ) |
---|
6532 | IF ( k == 1 ) THEN |
---|
6533 | IF ( .NOT. ALLOCATED( t_window_h ) ) & |
---|
6534 | ALLOCATE( t_window_h(nzb_wall:nzt_wall+1, & |
---|
6535 | 1:surf_usm_h%ns) ) |
---|
6536 | READ ( 13 ) tmp_window_h |
---|
6537 | ENDIF |
---|
6538 | CALL surface_restore_elements( & |
---|
6539 | t_window_h, tmp_window_h, & |
---|
6540 | surf_usm_h%start_index, & |
---|
6541 | start_index_on_file, & |
---|
6542 | end_index_on_file, & |
---|
6543 | nxlc, nysc, & |
---|
6544 | nxlf, nxrf, nysf, nynf, & |
---|
6545 | nys_on_file, nyn_on_file, & |
---|
6546 | nxl_on_file,nxr_on_file ) |
---|
6547 | #else |
---|
6548 | IF ( k == 1 ) THEN |
---|
6549 | IF ( .NOT. ALLOCATED( t_window_h_1 ) ) & |
---|
6550 | ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1, & |
---|
6551 | 1:surf_usm_h%ns) ) |
---|
6552 | READ ( 13 ) tmp_window_h |
---|
6553 | ENDIF |
---|
6554 | CALL surface_restore_elements( & |
---|
6555 | t_window_h_1, tmp_window_h, & |
---|
6556 | surf_usm_h%start_index, & |
---|
6557 | start_index_on_file, & |
---|
6558 | end_index_on_file, & |
---|
6559 | nxlc, nysc, & |
---|
6560 | nxlf, nxrf, nysf, nynf, & |
---|
6561 | nys_on_file, nyn_on_file, & |
---|
6562 | nxl_on_file, nxr_on_file ) |
---|
6563 | #endif |
---|
6564 | CASE ( 't_window_v(0)' ) |
---|
6565 | #if defined( __nopointer ) |
---|
6566 | IF ( k == 1 ) THEN |
---|
6567 | IF ( .NOT. ALLOCATED( t_window_v(0)%t ) ) & |
---|
6568 | ALLOCATE( t_window_v(0)%t(nzb_wall:nzt_wall+1, & |
---|
6569 | 1:surf_usm_v(0)%ns) ) |
---|
6570 | READ ( 13 ) tmp_window_v(0)%t |
---|
6571 | ENDIF |
---|
6572 | CALL surface_restore_elements( & |
---|
6573 | t_window_v(0)%t, tmp_window_v(0)%t, & |
---|
6574 | surf_usm_v(0)%start_index, & |
---|
6575 | start_index_on_file, & |
---|
6576 | end_index_on_file, & |
---|
6577 | nxlc, nysc, & |
---|
6578 | nxlf, nxrf, nysf, nynf, & |
---|
6579 | nys_on_file, nyn_on_file, & |
---|
6580 | nxl_on_file, nxr_on_file ) |
---|
6581 | #else |
---|
6582 | IF ( k == 1 ) THEN |
---|
6583 | IF ( .NOT. ALLOCATED( t_window_v_1(0)%t ) ) & |
---|
6584 | ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1, & |
---|
6585 | 1:surf_usm_v(0)%ns) ) |
---|
6586 | READ ( 13 ) tmp_window_v(0)%t |
---|
6587 | ENDIF |
---|
6588 | CALL surface_restore_elements( & |
---|
6589 | t_window_v_1(0)%t, & |
---|
6590 | tmp_window_v(0)%t, & |
---|
6591 | surf_usm_v(0)%start_index, & |
---|
6592 | start_index_on_file, & |
---|
6593 | end_index_on_file, & |
---|
6594 | nxlc, nysc, & |
---|
6595 | nxlf, nxrf, nysf, nynf, & |
---|
6596 | nys_on_file, nyn_on_file, & |
---|
6597 | nxl_on_file,nxr_on_file ) |
---|
6598 | #endif |
---|
6599 | CASE ( 't_window_v(1)' ) |
---|
6600 | #if defined( __nopointer ) |
---|
6601 | IF ( k == 1 ) THEN |
---|
6602 | IF ( .NOT. ALLOCATED( t_window_v(1)%t ) ) & |
---|
6603 | ALLOCATE( t_window_v(1)%t(nzb_wall:nzt_wall+1, & |
---|
6604 | 1:surf_usm_v(1)%ns) ) |
---|
6605 | READ ( 13 ) tmp_window_v(1)%t |
---|
6606 | ENDIF |
---|
6607 | CALL surface_restore_elements( & |
---|
6608 | t_window_v(1)%t, tmp_window_v(1)%t, & |
---|
6609 | surf_usm_v(1)%start_index, & |
---|
6610 | start_index_on_file, & |
---|
6611 | end_index_on_file , & |
---|
6612 | nxlc, nysc, & |
---|
6613 | nys_on_file, nyn_on_file, & |
---|
6614 | nxl_on_file, nxr_on_file ) |
---|
6615 | #else |
---|
6616 | IF ( k == 1 ) THEN |
---|
6617 | IF ( .NOT. ALLOCATED( t_window_v_1(1)%t ) ) & |
---|
6618 | ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1, & |
---|
6619 | 1:surf_usm_v(1)%ns) ) |
---|
6620 | READ ( 13 ) tmp_window_v(1)%t |
---|
6621 | ENDIF |
---|
6622 | CALL surface_restore_elements( & |
---|
6623 | t_window_v_1(1)%t, & |
---|
6624 | tmp_window_v(1)%t, & |
---|
6625 | surf_usm_v(1)%start_index, & |
---|
6626 | start_index_on_file, & |
---|
6627 | end_index_on_file, & |
---|
6628 | nxlc, nysc, & |
---|
6629 | nxlf, nxrf, nysf, nynf, & |
---|
6630 | nys_on_file, nyn_on_file, & |
---|
6631 | nxl_on_file,nxr_on_file ) |
---|
6632 | #endif |
---|
6633 | CASE ( 't_window_v(2)' ) |
---|
6634 | #if defined( __nopointer ) |
---|
6635 | IF ( k == 1 ) THEN |
---|
6636 | IF ( .NOT. ALLOCATED( t_window_v(2)%t ) ) & |
---|
6637 | ALLOCATE( t_window_v(2)%t(nzb_wall:nzt_wall+1, & |
---|
6638 | 1:surf_usm_v(2)%ns) ) |
---|
6639 | READ ( 13 ) tmp_window_v(2)%t |
---|
6640 | ENDIF |
---|
6641 | CALL surface_restore_elements( & |
---|
6642 | t_window_v(2)%t, tmp_window_v(2)%t, & |
---|
6643 | surf_usm_v(2)%start_index, & |
---|
6644 | start_index_on_file, & |
---|
6645 | end_index_on_file, & |
---|
6646 | nxlc, nysc, & |
---|
6647 | nxlf, nxrf, nysf, nynf, & |
---|
6648 | nys_on_file, nyn_on_file, & |
---|
6649 | nxl_on_file,nxr_on_file ) |
---|
6650 | #else |
---|
6651 | IF ( k == 1 ) THEN |
---|
6652 | IF ( .NOT. ALLOCATED( t_window_v_1(2)%t ) ) & |
---|
6653 | ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1, & |
---|
6654 | 1:surf_usm_v(2)%ns) ) |
---|
6655 | READ ( 13 ) tmp_window_v(2)%t |
---|
6656 | ENDIF |
---|
6657 | CALL surface_restore_elements( & |
---|
6658 | t_window_v_1(2)%t, & |
---|
6659 | tmp_window_v(2)%t, & |
---|
6660 | surf_usm_v(2)%start_index, & |
---|
6661 | start_index_on_file, & |
---|
6662 | end_index_on_file , & |
---|
6663 | nxlc, nysc, & |
---|
6664 | nxlf, nxrf, nysf, nynf, & |
---|
6665 | nys_on_file, nyn_on_file, & |
---|
6666 | nxl_on_file,nxr_on_file ) |
---|
6667 | #endif |
---|
6668 | CASE ( 't_window_v(3)' ) |
---|
6669 | #if defined( __nopointer ) |
---|
6670 | IF ( k == 1 ) THEN |
---|
6671 | IF ( .NOT. ALLOCATED( t_window_v(3)%t ) ) & |
---|
6672 | ALLOCATE( t_window_v(3)%t(nzb_wall:nzt_wall+1, & |
---|
6673 | 1:surf_usm_v(3)%ns) ) |
---|
6674 | READ ( 13 ) tmp_window_v(3)%t |
---|
6675 | ENDIF |
---|
6676 | CALL surface_restore_elements( & |
---|
6677 | t_window_v(3)%t, tmp_window_v(3)%t, & |
---|
6678 | surf_usm_v(3)%start_index, & |
---|
6679 | start_index_on_file, & |
---|
6680 | end_index_on_file, & |
---|
6681 | nxlc, nysc, & |
---|
6682 | nxlf, nxrf, nysf, nynf, & |
---|
6683 | nys_on_file, nyn_on_file, & |
---|
6684 | nxl_on_file,nxr_on_file ) |
---|
6685 | #else |
---|
6686 | IF ( k == 1 ) THEN |
---|
6687 | IF ( .NOT. ALLOCATED( t_window_v_1(3)%t ) ) & |
---|
6688 | ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) ) |
---|
6689 | READ ( 13 ) tmp_window_v(3)%t |
---|
6690 | ENDIF |
---|
6691 | CALL surface_restore_elements( & |
---|
6692 | t_window_v_1(3)%t, & |
---|
6693 | tmp_window_v(3)%t, & |
---|
6694 | surf_usm_v(3)%start_index, & |
---|
6695 | start_index_on_file, & |
---|
6696 | end_index_on_file, & |
---|
6697 | nxlc, nysc, & |
---|
6698 | nxlf, nxrf, nysf, nynf, & |
---|
6699 | nys_on_file, nyn_on_file, & |
---|
6700 | nxl_on_file,nxr_on_file ) |
---|
6701 | #endif |
---|
6702 | CASE DEFAULT |
---|
6703 | |
---|
6704 | found = .FALSE. |
---|
6705 | |
---|
6706 | END SELECT |
---|
6707 | |
---|
6708 | |
---|
6709 | END SUBROUTINE usm_rrd_local |
---|
6710 | |
---|
6711 | |
---|
6712 | |
---|
6713 | !------------------------------------------------------------------------------! |
---|
6714 | ! Description: |
---|
6715 | ! ------------ |
---|
6716 | ! |
---|
6717 | !> This subroutine reads walls, roofs and land categories and it parameters |
---|
6718 | !> from input files. |
---|
6719 | !------------------------------------------------------------------------------! |
---|
6720 | SUBROUTINE usm_read_urban_surface_types |
---|
6721 | |
---|
6722 | USE netcdf_data_input_mod, & |
---|
6723 | ONLY: building_pars_f, building_type_f |
---|
6724 | |
---|
6725 | IMPLICIT NONE |
---|
6726 | |
---|
6727 | CHARACTER(12) :: wtn |
---|
6728 | INTEGER(iwp) :: wtc |
---|
6729 | REAL(wp), DIMENSION(n_surface_params) :: wtp |
---|
6730 | |
---|
6731 | INTEGER(iwp), DIMENSION(0:17, nysg:nyng, nxlg:nxrg) :: usm_par |
---|
6732 | REAL(wp), DIMENSION(1:14, nysg:nyng, nxlg:nxrg) :: usm_val |
---|
6733 | INTEGER(iwp) :: k, l, d, iw, jw, kw, it, ip, ii, ij, m |
---|
6734 | INTEGER(iwp) :: i, j |
---|
6735 | INTEGER(iwp) :: nz, roof, dirwe, dirsn |
---|
6736 | INTEGER(iwp) :: category |
---|
6737 | INTEGER(iwp) :: weheight1, wecat1, snheight1, sncat1 |
---|
6738 | INTEGER(iwp) :: weheight2, wecat2, snheight2, sncat2 |
---|
6739 | INTEGER(iwp) :: weheight3, wecat3, snheight3, sncat3 |
---|
6740 | REAL(wp) :: height, albedo, thick |
---|
6741 | REAL(wp) :: wealbedo1, wethick1, snalbedo1, snthick1 |
---|
6742 | REAL(wp) :: wealbedo2, wethick2, snalbedo2, snthick2 |
---|
6743 | REAL(wp) :: wealbedo3, wethick3, snalbedo3, snthick3 |
---|
6744 | |
---|
6745 | LOGICAL :: surfpar |
---|
6746 | LOGICAL :: urbsurf |
---|
6747 | |
---|
6748 | ! |
---|
6749 | !-- If building_pars or building_type are already read from static input |
---|
6750 | !-- file, skip reading ASCII file. |
---|
6751 | IF ( building_type_f%from_file .OR. building_pars_f%from_file ) & |
---|
6752 | RETURN |
---|
6753 | |
---|
6754 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
6755 | !-- read categories of walls and their parameters |
---|
6756 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
6757 | DO ii = 0, io_blocks-1 |
---|
6758 | IF ( ii == io_group ) THEN |
---|
6759 | |
---|
6760 | !-- open urban surface file |
---|
6761 | OPEN( 151, file='SURFACE_PARAMETERS'//coupling_char, action='read', & |
---|
6762 | status='old', form='formatted', err=15 ) |
---|
6763 | !-- first test and get n_surface_types |
---|
6764 | k = 0 |
---|
6765 | l = 0 |
---|
6766 | DO |
---|
6767 | l = l+1 |
---|
6768 | READ( 151, *, err=11, end=12 ) wtc, wtp, wtn |
---|
6769 | k = k+1 |
---|
6770 | CYCLE |
---|
6771 | 11 CONTINUE |
---|
6772 | ENDDO |
---|
6773 | 12 n_surface_types = k |
---|
6774 | ALLOCATE( surface_type_names(n_surface_types) ) |
---|
6775 | ALLOCATE( surface_type_codes(n_surface_types) ) |
---|
6776 | ALLOCATE( surface_params(n_surface_params, n_surface_types) ) |
---|
6777 | !-- real reading |
---|
6778 | rewind( 151 ) |
---|
6779 | k = 0 |
---|
6780 | DO |
---|
6781 | READ( 151, *, err=13, end=14 ) wtc, wtp, wtn |
---|
6782 | k = k+1 |
---|
6783 | surface_type_codes(k) = wtc |
---|
6784 | surface_params(:,k) = wtp |
---|
6785 | surface_type_names(k) = wtn |
---|
6786 | CYCLE |
---|
6787 | 13 WRITE(6,'(i3,a,2i5)') myid, 'readparams2 error k=', k |
---|
6788 | FLUSH(6) |
---|
6789 | CONTINUE |
---|
6790 | ENDDO |
---|
6791 | 14 CLOSE(151) |
---|
6792 | CYCLE |
---|
6793 | 15 message_string = 'file SURFACE_PARAMETERS'//TRIM(coupling_char)//' does not exist' |
---|
6794 | CALL message( 'usm_read_urban_surface_types', 'PA0513', 1, 2, 0, 6, 0 ) |
---|
6795 | ENDIF |
---|
6796 | ENDDO |
---|
6797 | |
---|
6798 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
6799 | !-- read types of surfaces |
---|
6800 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
6801 | usm_par = 0 |
---|
6802 | DO ii = 0, io_blocks-1 |
---|
6803 | IF ( ii == io_group ) THEN |
---|
6804 | |
---|
6805 | ! |
---|
6806 | !-- open csv urban surface file |
---|
6807 | OPEN( 151, file='URBAN_SURFACE'//TRIM(coupling_char), action='read', & |
---|
6808 | status='old', form='formatted', err=23 ) |
---|
6809 | |
---|
6810 | l = 0 |
---|
6811 | DO |
---|
6812 | l = l+1 |
---|
6813 | !-- i, j, height, nz, roof, dirwe, dirsn, category, soilcat, |
---|
6814 | !-- weheight1, wecat1, snheight1, sncat1, weheight2, wecat2, snheight2, sncat2, |
---|
6815 | !-- weheight3, wecat3, snheight3, sncat3 |
---|
6816 | READ( 151, *, err=21, end=25 ) i, j, height, nz, roof, dirwe, dirsn, & |
---|
6817 | category, albedo, thick, & |
---|
6818 | weheight1, wecat1, wealbedo1, wethick1, & |
---|
6819 | weheight2, wecat2, wealbedo2, wethick2, & |
---|
6820 | weheight3, wecat3, wealbedo3, wethick3, & |
---|
6821 | snheight1, sncat1, snalbedo1, snthick1, & |
---|
6822 | snheight2, sncat2, snalbedo2, snthick2, & |
---|
6823 | snheight3, sncat3, snalbedo3, snthick3 |
---|
6824 | |
---|
6825 | IF ( i >= nxlg .AND. i <= nxrg .AND. j >= nysg .AND. j <= nyng ) THEN |
---|
6826 | !-- write integer variables into array |
---|
6827 | usm_par(:,j,i) = (/1, nz, roof, dirwe, dirsn, category, & |
---|
6828 | weheight1, wecat1, weheight2, wecat2, weheight3, wecat3, & |
---|
6829 | snheight1, sncat1, snheight2, sncat2, snheight3, sncat3 /) |
---|
6830 | !-- write real values into array |
---|
6831 | usm_val(:,j,i) = (/ albedo, thick, & |
---|
6832 | wealbedo1, wethick1, wealbedo2, wethick2, & |
---|
6833 | wealbedo3, wethick3, snalbedo1, snthick1, & |
---|
6834 | snalbedo2, snthick2, snalbedo3, snthick3 /) |
---|
6835 | ENDIF |
---|
6836 | CYCLE |
---|
6837 | 21 WRITE (message_string, "(A,I5)") 'errors in file URBAN_SURFACE'//TRIM(coupling_char)//' on line ', l |
---|
6838 | CALL message( 'usm_read_urban_surface_types', 'PA0512', 0, 1, 0, 6, 0 ) |
---|
6839 | ENDDO |
---|
6840 | |
---|
6841 | 23 message_string = 'file URBAN_SURFACE'//TRIM(coupling_char)//' does not exist' |
---|
6842 | CALL message( 'usm_read_urban_surface_types', 'PA0514', 1, 2, 0, 6, 0 ) |
---|
6843 | |
---|
6844 | 25 CLOSE( 151 ) |
---|
6845 | |
---|
6846 | ENDIF |
---|
6847 | #if defined( __parallel ) |
---|
6848 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
6849 | #endif |
---|
6850 | ENDDO |
---|
6851 | |
---|
6852 | ! |
---|
6853 | !-- check completeness and formal correctness of the data |
---|
6854 | DO i = nxlg, nxrg |
---|
6855 | DO j = nysg, nyng |
---|
6856 | IF ( usm_par(0,j,i) /= 0 .AND. ( & !< incomplete data,supply default values later |
---|
6857 | usm_par(1,j,i) < nzb .OR. & |
---|
6858 | usm_par(1,j,i) > nzt .OR. & !< incorrect height (nz < nzb .OR. nz > nzt) |
---|
6859 | usm_par(2,j,i) < 0 .OR. & |
---|
6860 | usm_par(2,j,i) > 1 .OR. & !< incorrect roof sign |
---|
6861 | usm_par(3,j,i) < nzb-nzt .OR. & |
---|
6862 | usm_par(3,j,i) > nzt-nzb .OR. & !< incorrect west-east wall direction sign |
---|
6863 | usm_par(4,j,i) < nzb-nzt .OR. & |
---|
6864 | usm_par(4,j,i) > nzt-nzb .OR. & !< incorrect south-north wall direction sign |
---|
6865 | usm_par(6,j,i) < nzb .OR. & |
---|
6866 | usm_par(6,j,i) > nzt .OR. & !< incorrect pedestrian level height for west-east wall |
---|
6867 | usm_par(8,j,i) > nzt .OR. & |
---|
6868 | usm_par(10,j,i) > nzt .OR. & !< incorrect wall or roof level height for west-east wall |
---|
6869 | usm_par(12,j,i) < nzb .OR. & |
---|
6870 | usm_par(12,j,i) > nzt .OR. & !< incorrect pedestrian level height for south-north wall |
---|
6871 | usm_par(14,j,i) > nzt .OR. & |
---|
6872 | usm_par(16,j,i) > nzt & !< incorrect wall or roof level height for south-north wall |
---|
6873 | ) ) THEN |
---|
6874 | !-- incorrect input data |
---|
6875 | WRITE (message_string, "(A,2I5)") 'missing or incorrect data in file URBAN_SURFACE'// & |
---|
6876 | TRIM(coupling_char)//' for i,j=', i,j |
---|
6877 | CALL message( 'usm_read_urban_surface', 'PA0504', 1, 2, 0, 6, 0 ) |
---|
6878 | ENDIF |
---|
6879 | |
---|
6880 | ENDDO |
---|
6881 | ENDDO |
---|
6882 | ! |
---|
6883 | !-- Assign the surface types to the respective data type. |
---|
6884 | !-- First, for horizontal upward-facing surfaces. |
---|
6885 | DO m = 1, surf_usm_h%ns |
---|
6886 | iw = surf_usm_h%i(m) |
---|
6887 | jw = surf_usm_h%j(m) |
---|
6888 | kw = surf_usm_h%k(m) |
---|
6889 | |
---|
6890 | IF ( usm_par(5,jw,iw) == 0 ) THEN |
---|
6891 | #if ! defined( __nopointer ) |
---|
6892 | IF ( zu(kw) >= roof_height_limit ) THEN |
---|
6893 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
6894 | surf_usm_h%surface_types(m) = roof_category !< default category for root surface |
---|
6895 | ELSE |
---|
6896 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
6897 | surf_usm_h%surface_types(m) = land_category !< default category for land surface |
---|
6898 | ENDIF |
---|
6899 | #endif |
---|
6900 | surf_usm_h%albedo(:,m) = -1.0_wp |
---|
6901 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
6902 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
6903 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
6904 | ELSE |
---|
6905 | IF ( usm_par(2,jw,iw)==0 ) THEN |
---|
6906 | surf_usm_h%isroof_surf(m) = .FALSE. |
---|
6907 | surf_usm_h%thickness_wall(m) = -1.0_wp |
---|
6908 | surf_usm_h%thickness_window(m) = -1.0_wp |
---|
6909 | surf_usm_h%thickness_green(m) = -1.0_wp |
---|
6910 | ELSE |
---|
6911 | surf_usm_h%isroof_surf(m) = .TRUE. |
---|
6912 | surf_usm_h%thickness_wall(m) = usm_val(2,jw,iw) |
---|
6913 | surf_usm_h%thickness_window(m) = usm_val(2,jw,iw) |
---|
6914 | surf_usm_h%thickness_green(m) = usm_val(2,jw,iw) |
---|
6915 | ENDIF |
---|
6916 | surf_usm_h%surface_types(m) = usm_par(5,jw,iw) |
---|
6917 | surf_usm_h%albedo(:,m) = usm_val(1,jw,iw) |
---|
6918 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
6919 | ENDIF |
---|
6920 | ! |
---|
6921 | !-- Find the type position |
---|
6922 | it = surf_usm_h%surface_types(m) |
---|
6923 | ip = -99999 |
---|
6924 | DO k = 1, n_surface_types |
---|
6925 | IF ( surface_type_codes(k) == it ) THEN |
---|
6926 | ip = k |
---|
6927 | EXIT |
---|
6928 | ENDIF |
---|
6929 | ENDDO |
---|
6930 | IF ( ip == -99999 ) THEN |
---|
6931 | !-- wall category not found |
---|
6932 | WRITE (message_string, "(A,I5,A,3I5)") 'wall category ', it, & |
---|
6933 | ' not found for i,j,k=', iw,jw,kw |
---|
6934 | CALL message( 'usm_read_urban_surface', 'PA0506', 1, 2, 0, 6, 0 ) |
---|
6935 | ENDIF |
---|
6936 | ! |
---|
6937 | !-- Albedo |
---|
6938 | IF ( surf_usm_h%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
6939 | surf_usm_h%albedo(:,m) = surface_params(ialbedo,ip) |
---|
6940 | ENDIF |
---|
6941 | !-- Albedo type is 0 (custom), others are replaced later |
---|
6942 | surf_usm_h%albedo_type(:,m) = 0 |
---|
6943 | !-- Transmissivity |
---|
6944 | IF ( surf_usm_h%transmissivity(m) < 0.0_wp ) THEN |
---|
6945 | surf_usm_h%transmissivity(m) = 0.0_wp |
---|
6946 | ENDIF |
---|
6947 | ! |
---|
6948 | !-- emissivity of the wall |
---|
6949 | surf_usm_h%emissivity(:,m) = surface_params(iemiss,ip) |
---|
6950 | ! |
---|
6951 | !-- heat conductivity λS between air and wall ( W mâ2 Kâ1 ) |
---|
6952 | surf_usm_h%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
6953 | surf_usm_h%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
6954 | surf_usm_h%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
6955 | ! |
---|
6956 | !-- roughness length for momentum, heat and humidity |
---|
6957 | surf_usm_h%z0(m) = surface_params(irough,ip) |
---|
6958 | surf_usm_h%z0h(m) = surface_params(iroughh,ip) |
---|
6959 | surf_usm_h%z0q(m) = surface_params(iroughh,ip) |
---|
6960 | ! |
---|
6961 | !-- Surface skin layer heat capacity (J mâ2 Kâ1 ) |
---|
6962 | surf_usm_h%c_surface(m) = surface_params(icsurf,ip) |
---|
6963 | surf_usm_h%c_surface_window(m) = surface_params(icsurf,ip) |
---|
6964 | surf_usm_h%c_surface_green(m) = surface_params(icsurf,ip) |
---|
6965 | ! |
---|
6966 | !-- wall material parameters: |
---|
6967 | !-- thickness of the wall (m) |
---|
6968 | !-- missing values are replaced by default value for category |
---|
6969 | IF ( surf_usm_h%thickness_wall(m) <= 0.001_wp ) THEN |
---|
6970 | surf_usm_h%thickness_wall(m) = surface_params(ithick,ip) |
---|
6971 | ENDIF |
---|
6972 | IF ( surf_usm_h%thickness_window(m) <= 0.001_wp ) THEN |
---|
6973 | surf_usm_h%thickness_window(m) = surface_params(ithick,ip) |
---|
6974 | ENDIF |
---|
6975 | IF ( surf_usm_h%thickness_green(m) <= 0.001_wp ) THEN |
---|
6976 | surf_usm_h%thickness_green(m) = surface_params(ithick,ip) |
---|
6977 | ENDIF |
---|
6978 | ! |
---|
6979 | !-- volumetric heat capacity rho*C of the wall ( J mâ3 Kâ1 ) |
---|
6980 | surf_usm_h%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
6981 | surf_usm_h%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
6982 | surf_usm_h%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
6983 | ! |
---|
6984 | !-- thermal conductivity λH of the wall (W mâ1 Kâ1 ) |
---|
6985 | surf_usm_h%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
6986 | surf_usm_h%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
6987 | surf_usm_h%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
6988 | |
---|
6989 | ENDDO |
---|
6990 | ! |
---|
6991 | !-- For vertical surface elements ( 0 -- northward-facing, 1 -- southward-facing, |
---|
6992 | !-- 2 -- eastward-facing, 3 -- westward-facing ) |
---|
6993 | DO l = 0, 3 |
---|
6994 | DO m = 1, surf_usm_v(l)%ns |
---|
6995 | i = surf_usm_v(l)%i(m) |
---|
6996 | j = surf_usm_v(l)%j(m) |
---|
6997 | kw = surf_usm_v(l)%k(m) |
---|
6998 | |
---|
6999 | IF ( l == 3 ) THEN ! westward facing |
---|
7000 | iw = i |
---|
7001 | jw = j |
---|
7002 | ii = 6 |
---|
7003 | ij = 3 |
---|
7004 | ELSEIF ( l == 2 ) THEN |
---|
7005 | iw = i-1 |
---|
7006 | jw = j |
---|
7007 | ii = 6 |
---|
7008 | ij = 3 |
---|
7009 | ELSEIF ( l == 1 ) THEN |
---|
7010 | iw = i |
---|
7011 | jw = j |
---|
7012 | ii = 12 |
---|
7013 | ij = 9 |
---|
7014 | ELSEIF ( l == 0 ) THEN |
---|
7015 | iw = i |
---|
7016 | jw = j-1 |
---|
7017 | ii = 12 |
---|
7018 | ij = 9 |
---|
7019 | ENDIF |
---|
7020 | |
---|
7021 | IF ( iw < 0 .OR. jw < 0 ) THEN |
---|
7022 | !-- wall on west or south border of the domain - assign default category |
---|
7023 | IF ( kw <= roof_height_limit ) THEN |
---|
7024 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
7025 | ELSE |
---|
7026 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
7027 | END IF |
---|
7028 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7029 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7030 | ELSE IF ( kw <= usm_par(ii,jw,iw) ) THEN |
---|
7031 | !-- pedestrian zone |
---|
7032 | IF ( usm_par(ii+1,jw,iw) == 0 ) THEN |
---|
7033 | surf_usm_v(l)%surface_types(m) = pedestrian_category !< default category for wall surface in pedestrian zone |
---|
7034 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7035 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7036 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7037 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7038 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7039 | ELSE |
---|
7040 | surf_usm_v(l)%surface_types(m) = usm_par(ii+1,jw,iw) |
---|
7041 | surf_usm_v(l)%albedo(:,m) = usm_val(ij,jw,iw) |
---|
7042 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+1,jw,iw) |
---|
7043 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+1,jw,iw) |
---|
7044 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+1,jw,iw) |
---|
7045 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7046 | ENDIF |
---|
7047 | ELSE IF ( kw <= usm_par(ii+2,jw,iw) ) THEN |
---|
7048 | !-- wall zone |
---|
7049 | IF ( usm_par(ii+3,jw,iw) == 0 ) THEN |
---|
7050 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface |
---|
7051 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7052 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7053 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7054 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7055 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7056 | ELSE |
---|
7057 | surf_usm_v(l)%surface_types(m) = usm_par(ii+3,jw,iw) |
---|
7058 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+2,jw,iw) |
---|
7059 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+3,jw,iw) |
---|
7060 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+3,jw,iw) |
---|
7061 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+3,jw,iw) |
---|
7062 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7063 | ENDIF |
---|
7064 | ELSE IF ( kw <= usm_par(ii+4,jw,iw) ) THEN |
---|
7065 | !-- roof zone |
---|
7066 | IF ( usm_par(ii+5,jw,iw) == 0 ) THEN |
---|
7067 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for roof surface |
---|
7068 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7069 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7070 | surf_usm_v(l)%thickness_window(m) = -1.0_wp |
---|
7071 | surf_usm_v(l)%thickness_green(m) = -1.0_wp |
---|
7072 | surf_usm_v(l)%transmissivity(m) = -1.0_wp |
---|
7073 | ELSE |
---|
7074 | surf_usm_v(l)%surface_types(m) = usm_par(ii+5,jw,iw) |
---|
7075 | surf_usm_v(l)%albedo(:,m) = usm_val(ij+4,jw,iw) |
---|
7076 | surf_usm_v(l)%thickness_wall(m) = usm_val(ij+5,jw,iw) |
---|
7077 | surf_usm_v(l)%thickness_window(m) = usm_val(ij+5,jw,iw) |
---|
7078 | surf_usm_v(l)%thickness_green(m) = usm_val(ij+5,jw,iw) |
---|
7079 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7080 | ENDIF |
---|
7081 | ELSE |
---|
7082 | ! |
---|
7083 | !-- supply the default category |
---|
7084 | IF ( kw <= roof_height_limit ) THEN |
---|
7085 | surf_usm_v(l)%surface_types(m) = wall_category !< default category for wall surface in wall zone |
---|
7086 | ELSE |
---|
7087 | surf_usm_v(l)%surface_types(m) = roof_category !< default category for wall surface in roof zone |
---|
7088 | END IF |
---|
7089 | surf_usm_v(l)%albedo(:,m) = -1.0_wp |
---|
7090 | surf_usm_v(l)%thickness_wall(m) = -1.0_wp |
---|
7091 | ENDIF |
---|
7092 | ! |
---|
7093 | !-- Find the type position |
---|
7094 | it = surf_usm_v(l)%surface_types(m) |
---|
7095 | ip = -99999 |
---|
7096 | DO k = 1, n_surface_types |
---|
7097 | IF ( surface_type_codes(k) == it ) THEN |
---|
7098 | ip = k |
---|
7099 | EXIT |
---|
7100 | ENDIF |
---|
7101 | ENDDO |
---|
7102 | IF ( ip == -99999 ) THEN |
---|
7103 | !-- wall category not found |
---|
7104 | WRITE (message_string, "(A,I7,A,3I5)") 'wall category ', it, & |
---|
7105 | ' not found for i,j,k=', iw,jw,kw |
---|
7106 | WRITE(9,*) message_string |
---|
7107 | ENDIF |
---|
7108 | ! |
---|
7109 | !-- Albedo |
---|
7110 | IF ( surf_usm_v(l)%albedo(ind_veg_wall,m) < 0.0_wp ) THEN |
---|
7111 | surf_usm_v(l)%albedo(:,m) = surface_params(ialbedo,ip) |
---|
7112 | ENDIF |
---|
7113 | !-- Albedo type is 0 (custom), others are replaced later |
---|
7114 | surf_usm_v(l)%albedo_type(:,m) = 0 |
---|
7115 | !-- Transmissivity of the windows |
---|
7116 | IF ( surf_usm_v(l)%transmissivity(m) < 0.0_wp ) THEN |
---|
7117 | surf_usm_v(l)%transmissivity(m) = 0.0_wp |
---|
7118 | ENDIF |
---|
7119 | ! |
---|
7120 | !-- emissivity of the wall |
---|
7121 | surf_usm_v(l)%emissivity(:,m) = surface_params(iemiss,ip) |
---|
7122 | ! |
---|
7123 | !-- heat conductivity lambda S between air and wall ( W m-2 K-1 ) |
---|
7124 | surf_usm_v(l)%lambda_surf(m) = surface_params(ilambdas,ip) |
---|
7125 | surf_usm_v(l)%lambda_surf_window(m) = surface_params(ilambdas,ip) |
---|
7126 | surf_usm_v(l)%lambda_surf_green(m) = surface_params(ilambdas,ip) |
---|
7127 | ! |
---|
7128 | !-- roughness length |
---|
7129 | surf_usm_v(l)%z0(m) = surface_params(irough,ip) |
---|
7130 | surf_usm_v(l)%z0h(m) = surface_params(iroughh,ip) |
---|
7131 | surf_usm_v(l)%z0q(m) = surface_params(iroughh,ip) |
---|
7132 | ! |
---|
7133 | !-- Surface skin layer heat capacity (J m-2 K-1 ) |
---|
7134 | surf_usm_v(l)%c_surface(m) = surface_params(icsurf,ip) |
---|
7135 | surf_usm_v(l)%c_surface_window(m) = surface_params(icsurf,ip) |
---|
7136 | surf_usm_v(l)%c_surface_green(m) = surface_params(icsurf,ip) |
---|
7137 | ! |
---|
7138 | !-- wall material parameters: |
---|
7139 | !-- thickness of the wall (m) |
---|
7140 | !-- missing values are replaced by default value for category |
---|
7141 | IF ( surf_usm_v(l)%thickness_wall(m) <= 0.001_wp ) THEN |
---|
7142 | surf_usm_v(l)%thickness_wall(m) = surface_params(ithick,ip) |
---|
7143 | ENDIF |
---|
7144 | IF ( surf_usm_v(l)%thickness_window(m) <= 0.001_wp ) THEN |
---|
7145 | surf_usm_v(l)%thickness_window(m) = surface_params(ithick,ip) |
---|
7146 | ENDIF |
---|
7147 | IF ( surf_usm_v(l)%thickness_green(m) <= 0.001_wp ) THEN |
---|
7148 | surf_usm_v(l)%thickness_green(m) = surface_params(ithick,ip) |
---|
7149 | ENDIF |
---|
7150 | ! |
---|
7151 | !-- volumetric heat capacity rho*C of the wall ( J m-3 K-1 ) |
---|
7152 | surf_usm_v(l)%rho_c_wall(:,m) = surface_params(irhoC,ip) |
---|
7153 | surf_usm_v(l)%rho_c_window(:,m) = surface_params(irhoC,ip) |
---|
7154 | surf_usm_v(l)%rho_c_green(:,m) = surface_params(irhoC,ip) |
---|
7155 | ! |
---|
7156 | !-- thermal conductivity lambda H of the wall (W m-1 K-1 ) |
---|
7157 | surf_usm_v(l)%lambda_h(:,m) = surface_params(ilambdah,ip) |
---|
7158 | surf_usm_v(l)%lambda_h_window(:,m) = surface_params(ilambdah,ip) |
---|
7159 | surf_usm_v(l)%lambda_h_green(:,m) = surface_params(ilambdah,ip) |
---|
7160 | |
---|
7161 | ENDDO |
---|
7162 | ENDDO |
---|
7163 | ! |
---|
7164 | !-- Initialize wall layer thicknesses. Please note, this will be removed |
---|
7165 | !-- after migration to Palm input data standard. |
---|
7166 | DO k = nzb_wall, nzt_wall |
---|
7167 | zwn(k) = zwn_default(k) |
---|
7168 | zwn_green(k) = zwn_default_green(k) |
---|
7169 | zwn_window(k) = zwn_default_window(k) |
---|
7170 | ENDDO |
---|
7171 | ! |
---|
7172 | !-- apply for all particular surface grids. First for horizontal surfaces |
---|
7173 | DO m = 1, surf_usm_h%ns |
---|
7174 | surf_usm_h%zw(:,m) = zwn(:) * surf_usm_h%thickness_wall(m) |
---|
7175 | surf_usm_h%zw_green(:,m) = zwn_green(:) * surf_usm_h%thickness_green(m) |
---|
7176 | surf_usm_h%zw_window(:,m) = zwn_window(:) * surf_usm_h%thickness_window(m) |
---|
7177 | ENDDO |
---|
7178 | DO l = 0, 3 |
---|
7179 | DO m = 1, surf_usm_v(l)%ns |
---|
7180 | surf_usm_v(l)%zw(:,m) = zwn(:) * surf_usm_v(l)%thickness_wall(m) |
---|
7181 | surf_usm_v(l)%zw_green(:,m) = zwn_green(:) * surf_usm_v(l)%thickness_green(m) |
---|
7182 | surf_usm_v(l)%zw_window(:,m) = zwn_window(:) * surf_usm_v(l)%thickness_window(m) |
---|
7183 | ENDDO |
---|
7184 | ENDDO |
---|
7185 | |
---|
7186 | CALL location_message( ' types and parameters of urban surfaces read', .TRUE. ) |
---|
7187 | |
---|
7188 | END SUBROUTINE usm_read_urban_surface_types |
---|
7189 | |
---|
7190 | |
---|
7191 | !------------------------------------------------------------------------------! |
---|
7192 | ! Description: |
---|
7193 | ! ------------ |
---|
7194 | ! |
---|
7195 | !> This function advances through the list of local surfaces to find given |
---|
7196 | !> x, y, d, z coordinates |
---|
7197 | !------------------------------------------------------------------------------! |
---|
7198 | PURE FUNCTION advance_surface(isurfl_start, isurfl_stop, x, y, z, d) & |
---|
7199 | result(isurfl) |
---|
7200 | |
---|
7201 | INTEGER(iwp), INTENT(in) :: isurfl_start, isurfl_stop |
---|
7202 | INTEGER(iwp), INTENT(in) :: x, y, z, d |
---|
7203 | INTEGER(iwp) :: isx, isy, isz, isd |
---|
7204 | INTEGER(iwp) :: isurfl |
---|
7205 | |
---|
7206 | DO isurfl = isurfl_start, isurfl_stop |
---|
7207 | isx = surfl(ix, isurfl) |
---|
7208 | isy = surfl(iy, isurfl) |
---|
7209 | isz = surfl(iz, isurfl) |
---|
7210 | isd = surfl(id, isurfl) |
---|
7211 | IF ( isx==x .and. isy==y .and. isz==z .and. isd==d ) RETURN |
---|
7212 | ENDDO |
---|
7213 | |
---|
7214 | !-- coordinate not found |
---|
7215 | isurfl = -1 |
---|
7216 | |
---|
7217 | END FUNCTION |
---|
7218 | |
---|
7219 | |
---|
7220 | !------------------------------------------------------------------------------! |
---|
7221 | ! Description: |
---|
7222 | ! ------------ |
---|
7223 | ! |
---|
7224 | !> This subroutine reads temperatures of respective material layers in walls, |
---|
7225 | !> roofs and ground from input files. Data in the input file must be in |
---|
7226 | !> standard order, i.e. horizontal surfaces first ordered by x, y and then |
---|
7227 | !> vertical surfaces ordered by x, y, direction, z |
---|
7228 | !------------------------------------------------------------------------------! |
---|
7229 | SUBROUTINE usm_read_wall_temperature |
---|
7230 | |
---|
7231 | INTEGER(iwp) :: i, j, k, d, ii, iline |
---|
7232 | INTEGER(iwp) :: isurfl |
---|
7233 | REAL(wp) :: rtsurf |
---|
7234 | REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: rtwall |
---|
7235 | |
---|
7236 | |
---|
7237 | |
---|
7238 | |
---|
7239 | DO ii = 0, io_blocks-1 |
---|
7240 | IF ( ii == io_group ) THEN |
---|
7241 | |
---|
7242 | !-- open wall temperature file |
---|
7243 | OPEN( 152, file='WALL_TEMPERATURE'//coupling_char, action='read', & |
---|
7244 | status='old', form='formatted', err=15 ) |
---|
7245 | |
---|
7246 | isurfl = 0 |
---|
7247 | iline = 1 |
---|
7248 | DO |
---|
7249 | rtwall = -9999.0_wp !< for incomplete lines |
---|
7250 | READ( 152, *, err=13, end=14 ) i, j, k, d, rtsurf, rtwall |
---|
7251 | |
---|
7252 | IF ( nxl <= i .and. i <= nxr .and. & |
---|
7253 | nys <= j .and. j <= nyn) THEN !< local processor |
---|
7254 | !-- identify surface id |
---|
7255 | isurfl = advance_surface(isurfl+1, nsurfl, i, j, k, d) |
---|
7256 | IF ( isurfl == -1 ) THEN |
---|
7257 | WRITE(message_string, '(a,4i5,a,i5,a)') 'Coordinates (xyzd) ', i, j, k, d, & |
---|
7258 | ' on line ', iline, & |
---|
7259 | ' in file WALL_TEMPERATURE are either not present or out of standard order of surfaces.' |
---|
7260 | CALL message( 'usm_read_wall_temperature', 'PA0521', 1, 2, 0, 6, 0 ) |
---|
7261 | ENDIF |
---|
7262 | |
---|
7263 | !-- assign temperatures |
---|
7264 | IF ( d == 0 ) THEN |
---|
7265 | t_surf_h(isurfl) = rtsurf |
---|
7266 | t_wall_h(:,isurfl) = rtwall(:) |
---|
7267 | ELSE |
---|
7268 | t_surf_v(d-1)%t(isurfl) = rtsurf |
---|
7269 | t_wall_v(d-1)%t(:,isurfl) = rtwall(:) |
---|
7270 | ENDIF |
---|
7271 | ENDIF |
---|
7272 | |
---|
7273 | iline = iline + 1 |
---|
7274 | CYCLE |
---|
7275 | 13 WRITE(message_string, '(a,i5,a)') 'Error reading line ', iline, & |
---|
7276 | ' in file WALL_TEMPERATURE.' |
---|
7277 | CALL message( 'usm_read_wall_temperature', 'PA0522', 1, 2, 0, 6, 0 ) |
---|
7278 | ENDDO |
---|
7279 | 14 CLOSE(152) |
---|
7280 | CYCLE |
---|
7281 | 15 message_string = 'file WALL_TEMPERATURE'//TRIM(coupling_char)//' does not exist' |
---|
7282 | CALL message( 'usm_read_wall_temperature', 'PA0523', 1, 2, 0, 6, 0 ) |
---|
7283 | ENDIF |
---|
7284 | #if defined( __parallel ) |
---|
7285 | CALL MPI_BARRIER( comm2d, ierr ) |
---|
7286 | #endif |
---|
7287 | ENDDO |
---|
7288 | |
---|
7289 | CALL location_message( ' wall layer temperatures read', .TRUE. ) |
---|
7290 | |
---|
7291 | END SUBROUTINE usm_read_wall_temperature |
---|
7292 | |
---|
7293 | |
---|
7294 | |
---|
7295 | !------------------------------------------------------------------------------! |
---|
7296 | ! Description: |
---|
7297 | ! ------------ |
---|
7298 | !> Solver for the energy balance at the ground/roof/wall surface. |
---|
7299 | !> It follows basic ideas and structure of lsm_energy_balance |
---|
7300 | !> with many simplifications and adjustments. |
---|
7301 | !> TODO better description |
---|
7302 | !------------------------------------------------------------------------------! |
---|
7303 | SUBROUTINE usm_surface_energy_balance |
---|
7304 | |
---|
7305 | IMPLICIT NONE |
---|
7306 | |
---|
7307 | INTEGER(iwp) :: i, j, k, l, d, m !< running indices |
---|
7308 | |
---|
7309 | REAL(wp) :: stend !< surface tendency |
---|
7310 | REAL(wp) :: stend_window !< surface tendency |
---|
7311 | REAL(wp) :: stend_green !< surface tendency |
---|
7312 | REAL(wp) :: coef_1 !< first coeficient for prognostic equation |
---|
7313 | REAL(wp) :: coef_window_1 !< first coeficient for prognostic window equation |
---|
7314 | REAL(wp) :: coef_green_1 !< first coeficient for prognostic green wall equation |
---|
7315 | REAL(wp) :: coef_2 !< second coeficient for prognostic equation |
---|
7316 | REAL(wp) :: coef_window_2 !< second coeficient for prognostic window equation |
---|
7317 | REAL(wp) :: coef_green_2 !< second coeficient for prognostic green wall equation |
---|
7318 | REAL(wp) :: rho_cp !< rho_wall_surface * cp |
---|
7319 | REAL(wp) :: f_shf !< factor for shf_eb |
---|
7320 | REAL(wp) :: f_shf_window !< factor for shf_eb window |
---|
7321 | REAL(wp) :: f_shf_green !< factor for shf_eb green wall |
---|
7322 | REAL(wp) :: lambda_surface !< current value of lambda_surface (heat conductivity between air and wall) |
---|
7323 | REAL(wp) :: lambda_surface_window !< current value of lambda_surface (heat conductivity between air and window) |
---|
7324 | REAL(wp) :: lambda_surface_green !< current value of lambda_surface (heat conductivity between air and greeb wall) |
---|
7325 | REAL(wp), DIMENSION(nzb:nzt) :: exn !< value of the Exner function in layers |
---|
7326 | |
---|
7327 | REAL(wp) :: dtime !< simulated time of day (in UTC) |
---|
7328 | INTEGER(iwp) :: dhour !< simulated hour of day (in UTC) |
---|
7329 | REAL(wp) :: acoef !< actual coefficient of diurnal profile of anthropogenic heat |
---|
7330 | |
---|
7331 | |
---|
7332 | #if ! defined( __nopointer ) |
---|
7333 | exn(nzb:nzt) = (hyp(nzb:nzt) / 100000.0_wp )**0.286_wp !< Exner function |
---|
7334 | #endif |
---|
7335 | ! |
---|
7336 | !-- First, treat horizontal surface elements |
---|
7337 | DO m = 1, surf_usm_h%ns |
---|
7338 | ! |
---|
7339 | !-- Get indices of respective grid point |
---|
7340 | i = surf_usm_h%i(m) |
---|
7341 | j = surf_usm_h%j(m) |
---|
7342 | k = surf_usm_h%k(m) |
---|
7343 | ! |
---|
7344 | !-- TODO - how to calculate lambda_surface for horizontal surfaces |
---|
7345 | !-- (lambda_surface is set according to stratification in land surface model) |
---|
7346 | !-- MS: ??? |
---|
7347 | IF ( surf_usm_h%ol(m) >= 0.0_wp ) THEN |
---|
7348 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
7349 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
7350 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
7351 | ELSE |
---|
7352 | lambda_surface = surf_usm_h%lambda_surf(m) |
---|
7353 | lambda_surface_window = surf_usm_h%lambda_surf_window(m) |
---|
7354 | lambda_surface_green = surf_usm_h%lambda_surf_green(m) |
---|
7355 | ENDIF |
---|
7356 | #if ! defined( __nopointer ) |
---|
7357 | ! |
---|
7358 | !-- calculate rho * cp coefficient at surface layer |
---|
7359 | rho_cp = cp * hyp(k) / ( r_d * surf_usm_h%pt1(m) * exn(k) ) |
---|
7360 | #endif |
---|
7361 | ! |
---|
7362 | !-- Calculate aerodyamic resistance. |
---|
7363 | !-- Calculation for horizontal surfaces follows LSM formulation |
---|
7364 | !-- pt, us, ts are not available for the prognostic time step, |
---|
7365 | !-- data from the last time step is used here. |
---|
7366 | |
---|
7367 | !-- Workaround: use single r_a as stability is only treated for the |
---|
7368 | !-- average temperature |
---|
7369 | surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /& |
---|
7370 | ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7371 | surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m) |
---|
7372 | surf_usm_h%r_a_green(m) = surf_usm_h%r_a(m) |
---|
7373 | |
---|
7374 | ! r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exn(k) ) / & |
---|
7375 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7376 | ! r_a_window = ( surf_usm_h%pt1(m) - t_surf_window_h(m) / exn(k) ) / & |
---|
7377 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7378 | ! r_a_green = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exn(k) ) / & |
---|
7379 | ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) |
---|
7380 | |
---|
7381 | !-- Make sure that the resistance does not drop to zero |
---|
7382 | IF ( surf_usm_h%r_a(m) < 1.0_wp ) & |
---|
7383 | surf_usm_h%r_a(m) = 1.0_wp |
---|
7384 | IF ( surf_usm_h%r_a_green(m) < 1.0_wp ) & |
---|
7385 | surf_usm_h%r_a_green(m) = 1.0_wp |
---|
7386 | IF ( surf_usm_h%r_a_window(m) < 1.0_wp ) & |
---|
7387 | surf_usm_h%r_a_window(m) = 1.0_wp |
---|
7388 | |
---|
7389 | ! |
---|
7390 | !-- Make sure that the resistacne does not exceed a maxmium value in case |
---|
7391 | !-- of zero velocities |
---|
7392 | IF ( surf_usm_h%r_a(m) > 300.0_wp ) & |
---|
7393 | surf_usm_h%r_a(m) = 300.0_wp |
---|
7394 | IF ( surf_usm_h%r_a_green(m) > 300.0_wp ) & |
---|
7395 | surf_usm_h%r_a_green(m) = 300.0_wp |
---|
7396 | IF ( surf_usm_h%r_a_window(m) > 300.0_wp ) & |
---|
7397 | surf_usm_h%r_a_window(m) = 300.0_wp |
---|
7398 | |
---|
7399 | |
---|
7400 | !-- factor for shf_eb |
---|
7401 | f_shf = rho_cp / surf_usm_h%r_a(m) |
---|
7402 | f_shf_window = rho_cp / surf_usm_h%r_a_window(m) |
---|
7403 | f_shf_green = rho_cp / surf_usm_h%r_a_green(m) |
---|
7404 | |
---|
7405 | !-- add LW up so that it can be removed in prognostic equation |
---|
7406 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_sw_in(m) - & |
---|
7407 | surf_usm_h%rad_sw_out(m) + & |
---|
7408 | surf_usm_h%rad_lw_in(m) - & |
---|
7409 | surf_usm_h%rad_lw_out(m) |
---|
7410 | |
---|
7411 | !-- numerator of the prognostic equation |
---|
7412 | !-- Todo: Adjust to tile approach. So far, emissivity for wall (element 0) |
---|
7413 | !-- is used |
---|
7414 | coef_1 = surf_usm_h%rad_net_l(m) + & |
---|
7415 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
7416 | sigma_sb * t_surf_h(m) ** 4 + & |
---|
7417 | f_shf * surf_usm_h%pt1(m) + & |
---|
7418 | lambda_surface * t_wall_h(nzb_wall,m) |
---|
7419 | coef_window_1 = surf_usm_h%rad_net_l(m) + & |
---|
7420 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_wat_win,m) & |
---|
7421 | * sigma_sb * t_surf_window_h(m) ** 4 + & |
---|
7422 | f_shf_window * surf_usm_h%pt1(m) + & |
---|
7423 | lambda_surface_window * t_window_h(nzb_wall,m) |
---|
7424 | coef_green_1 = surf_usm_h%rad_net_l(m) + & |
---|
7425 | ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) *& |
---|
7426 | sigma_sb * t_surf_green_h(m) ** 4 + & |
---|
7427 | f_shf_green * surf_usm_h%pt1(m) + & |
---|
7428 | lambda_surface_green * t_wall_h(nzb_wall,m) |
---|
7429 | |
---|
7430 | !-- denominator of the prognostic equation |
---|
7431 | coef_2 = 4.0_wp * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
7432 | sigma_sb * t_surf_h(m) ** 3 & |
---|
7433 | + lambda_surface + f_shf / exn(k) |
---|
7434 | coef_window_2 = 4.0_wp * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
7435 | sigma_sb * t_surf_window_h(m) ** 3 & |
---|
7436 | + lambda_surface_window + f_shf_window / exn(k) |
---|
7437 | coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * & |
---|
7438 | sigma_sb * t_surf_green_h(m) ** 3 & |
---|
7439 | + lambda_surface_green + f_shf_green / exn(k) |
---|
7440 | |
---|
7441 | !-- implicit solution when the surface layer has no heat capacity, |
---|
7442 | !-- otherwise use RK3 scheme. |
---|
7443 | t_surf_h_p(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
7444 | surf_usm_h%c_surface(m) * t_surf_h(m) ) / & |
---|
7445 | ( surf_usm_h%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
7446 | t_surf_window_h_p(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
7447 | surf_usm_h%c_surface_window(m) * t_surf_window_h(m) ) / & |
---|
7448 | ( surf_usm_h%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
7449 | t_surf_green_h_p(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
7450 | surf_usm_h%c_surface_green(m) * t_surf_green_h(m) ) / & |
---|
7451 | ( surf_usm_h%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
7452 | |
---|
7453 | !-- add RK3 term |
---|
7454 | t_surf_h_p(m) = t_surf_h_p(m) + dt_3d * tsc(3) * & |
---|
7455 | surf_usm_h%tt_surface_m(m) |
---|
7456 | t_surf_window_h_p(m) = t_surf_window_h_p(m) + dt_3d * tsc(3) * & |
---|
7457 | surf_usm_h%tt_surface_window_m(m) |
---|
7458 | t_surf_green_h_p(m) = t_surf_green_h_p(m) + dt_3d * tsc(3) * & |
---|
7459 | surf_usm_h%tt_surface_green_m(m) |
---|
7460 | ! |
---|
7461 | !-- Store surface temperature on pt_surface. Further, in case humidity is used |
---|
7462 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
7463 | !-- assumed to be the surface temperature. |
---|
7464 | surf_usm_h%pt_surface(m) = ( surf_usm_h%frac(ind_veg_wall,m) * t_surf_h_p(m) & |
---|
7465 | + surf_usm_h%frac(ind_wat_win,m) * t_surf_window_h_p(m) & |
---|
7466 | + surf_usm_h%frac(ind_pav_green,m) * t_surf_green_h_p(m) ) & |
---|
7467 | / exn(k) |
---|
7468 | |
---|
7469 | IF ( humidity ) surf_usm_h%vpt_surface(m) = & |
---|
7470 | surf_usm_h%pt_surface(m) |
---|
7471 | |
---|
7472 | !-- calculate true tendency |
---|
7473 | stend = ( t_surf_h_p(m) - t_surf_h(m) - dt_3d * tsc(3) * & |
---|
7474 | surf_usm_h%tt_surface_m(m)) / ( dt_3d * tsc(2) ) |
---|
7475 | stend_window = ( t_surf_window_h_p(m) - t_surf_window_h(m) - dt_3d * tsc(3) * & |
---|
7476 | surf_usm_h%tt_surface_window_m(m)) / ( dt_3d * tsc(2) ) |
---|
7477 | stend_green = ( t_surf_green_h_p(m) - t_surf_green_h(m) - dt_3d * tsc(3) * & |
---|
7478 | surf_usm_h%tt_surface_green_m(m)) / ( dt_3d * tsc(2) ) |
---|
7479 | |
---|
7480 | !-- calculate t_surf tendencies for the next Runge-Kutta step |
---|
7481 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
7482 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
7483 | surf_usm_h%tt_surface_m(m) = stend |
---|
7484 | surf_usm_h%tt_surface_window_m(m) = stend_window |
---|
7485 | surf_usm_h%tt_surface_green_m(m) = stend_green |
---|
7486 | ELSEIF ( intermediate_timestep_count < & |
---|
7487 | intermediate_timestep_count_max ) THEN |
---|
7488 | surf_usm_h%tt_surface_m(m) = -9.5625_wp * stend + & |
---|
7489 | 5.3125_wp * surf_usm_h%tt_surface_m(m) |
---|
7490 | surf_usm_h%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
7491 | 5.3125_wp * surf_usm_h%tt_surface_window_m(m) |
---|
7492 | surf_usm_h%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
7493 | 5.3125_wp * surf_usm_h%tt_surface_green_m(m) |
---|
7494 | ENDIF |
---|
7495 | ENDIF |
---|
7496 | |
---|
7497 | !-- in case of fast changes in the skin temperature, it is required to |
---|
7498 | !-- update the radiative fluxes in order to keep the solution stable |
---|
7499 | IF ( ( ABS( t_surf_h_p(m) - t_surf_h(m) ) > 1.0_wp ) .OR. & |
---|
7500 | ( ABS( t_surf_green_h_p(m) - t_surf_green_h(m) ) > 1.0_wp ) .OR. & |
---|
7501 | ( ABS( t_surf_window_h_p(m) - t_surf_window_h(m) ) > 1.0_wp ) ) THEN |
---|
7502 | force_radiation_call_l = .TRUE. |
---|
7503 | ENDIF |
---|
7504 | ! |
---|
7505 | !-- calculate fluxes |
---|
7506 | !-- rad_net_l is never used! |
---|
7507 | surf_usm_h%rad_net_l(m) = surf_usm_h%rad_net_l(m) + & |
---|
7508 | surf_usm_h%frac(ind_veg_wall,m) * & |
---|
7509 | sigma_sb * surf_usm_h%emissivity(ind_veg_wall,m) * & |
---|
7510 | ( t_surf_h_p(m)**4 - t_surf_h(m)**4 ) & |
---|
7511 | + surf_usm_h%frac(ind_wat_win,m) * & |
---|
7512 | sigma_sb * surf_usm_h%emissivity(ind_wat_win,m) * & |
---|
7513 | ( t_surf_window_h_p(m)**4 - t_surf_window_h(m)**4 ) & |
---|
7514 | + surf_usm_h%frac(ind_pav_green,m) * & |
---|
7515 | sigma_sb * surf_usm_h%emissivity(ind_pav_green,m) * & |
---|
7516 | ( t_surf_green_h_p(m)**4 - t_surf_green_h(m)**4 ) |
---|
7517 | |
---|
7518 | surf_usm_h%wghf_eb(m) = lambda_surface * & |
---|
7519 | ( t_surf_h_p(m) - t_wall_h(nzb_wall,m) ) |
---|
7520 | surf_usm_h%wghf_eb_green(m) = lambda_surface_green * & |
---|
7521 | ( t_surf_green_h_p(m) - t_green_h(nzb_wall,m) ) |
---|
7522 | surf_usm_h%wghf_eb_window(m) = lambda_surface_window * & |
---|
7523 | ( t_surf_window_h_p(m) - t_window_h(nzb_wall,m) ) |
---|
7524 | |
---|
7525 | ! |
---|
7526 | !-- ground/wall/roof surface heat flux |
---|
7527 | surf_usm_h%wshf_eb(m) = - f_shf * ( surf_usm_h%pt1(m) - t_surf_h_p(m) / exn(k) ) * & |
---|
7528 | surf_usm_h%frac(ind_veg_wall,m) & |
---|
7529 | - f_shf_window * ( surf_usm_h%pt1(m) - t_surf_window_h_p(m) / exn(k) ) * & |
---|
7530 | surf_usm_h%frac(ind_wat_win,m) & |
---|
7531 | - f_shf_green * ( surf_usm_h%pt1(m) - t_surf_green_h_p(m) / exn(k) ) * & |
---|
7532 | surf_usm_h%frac(ind_pav_green,m) |
---|
7533 | ! |
---|
7534 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
7535 | !-- diffusion_s, surface_layer_fluxes,... |
---|
7536 | surf_usm_h%shf(m) = surf_usm_h%wshf_eb(m) / cp |
---|
7537 | |
---|
7538 | ENDDO |
---|
7539 | ! |
---|
7540 | !-- Now, treat vertical surface elements |
---|
7541 | DO l = 0, 3 |
---|
7542 | DO m = 1, surf_usm_v(l)%ns |
---|
7543 | ! |
---|
7544 | !-- Get indices of respective grid point |
---|
7545 | i = surf_usm_v(l)%i(m) |
---|
7546 | j = surf_usm_v(l)%j(m) |
---|
7547 | k = surf_usm_v(l)%k(m) |
---|
7548 | |
---|
7549 | ! |
---|
7550 | !-- TODO - how to calculate lambda_surface for horizontal (??? do you mean verical ???) surfaces |
---|
7551 | !-- (lambda_surface is set according to stratification in land surface model). |
---|
7552 | !-- Please note, for vertical surfaces no ol is defined, since |
---|
7553 | !-- stratification is not considered in this case. |
---|
7554 | lambda_surface = surf_usm_v(l)%lambda_surf(m) |
---|
7555 | lambda_surface_window = surf_usm_v(l)%lambda_surf_window(m) |
---|
7556 | lambda_surface_green = surf_usm_v(l)%lambda_surf_green(m) |
---|
7557 | |
---|
7558 | #if ! defined( __nopointer ) |
---|
7559 | ! |
---|
7560 | !-- calculate rho * cp coefficient at surface layer |
---|
7561 | rho_cp = cp * hyp(k) / ( r_d * surf_usm_v(l)%pt1(m) * exn(k) ) |
---|
7562 | #endif |
---|
7563 | |
---|
7564 | !-- Calculation of r_a for vertical surfaces |
---|
7565 | !-- |
---|
7566 | !-- heat transfer coefficient for forced convection along vertical walls |
---|
7567 | !-- follows formulation in TUF3d model (Krayenhoff & Voogt, 2006) |
---|
7568 | !-- |
---|
7569 | !-- H = httc (Tsfc - Tair) |
---|
7570 | !-- httc = rw * (11.8 + 4.2 * Ueff) - 4.0 |
---|
7571 | !-- |
---|
7572 | !-- rw: wall patch roughness relative to 1.0 for concrete |
---|
7573 | !-- Ueff: effective wind speed |
---|
7574 | !-- - 4.0 is a reduction of Rowley et al (1930) formulation based on |
---|
7575 | !-- Cole and Sturrock (1977) |
---|
7576 | !-- |
---|
7577 | !-- Ucan: Canyon wind speed |
---|
7578 | !-- wstar: convective velocity |
---|
7579 | !-- Qs: surface heat flux |
---|
7580 | !-- zH: height of the convective layer |
---|
7581 | !-- wstar = (g/Tcan*Qs*zH)**(1./3.) |
---|
7582 | |
---|
7583 | !-- Effective velocity components must always |
---|
7584 | !-- be defined at scalar grid point. The wall normal component is |
---|
7585 | !-- obtained by simple linear interpolation. ( An alternative would |
---|
7586 | !-- be an logarithmic interpolation. ) |
---|
7587 | !-- A roughness lenght of 0.001 is assumed for concrete (the inverse, |
---|
7588 | !-- 1000 is used in the nominator for scaling) |
---|
7589 | surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) * 1000.0_wp & |
---|
7590 | * ( 11.8_wp + 4.2_wp * & |
---|
7591 | SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & |
---|
7592 | ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & |
---|
7593 | ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2, & |
---|
7594 | 0.01_wp ) ) & |
---|
7595 | ) - 4.0_wp ) |
---|
7596 | ! |
---|
7597 | !-- Limit aerodynamic resistance |
---|
7598 | IF ( surf_usm_v(l)%r_a(m) < 1.0_wp ) surf_usm_v(l)%r_a(m) = 1.0_wp |
---|
7599 | |
---|
7600 | |
---|
7601 | f_shf = rho_cp / surf_usm_v(l)%r_a(m) |
---|
7602 | f_shf_window = rho_cp / surf_usm_v(l)%r_a(m) |
---|
7603 | f_shf_green = rho_cp / surf_usm_v(l)%r_a(m) |
---|
7604 | |
---|
7605 | |
---|
7606 | |
---|
7607 | !-- add LW up so that it can be removed in prognostic equation |
---|
7608 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%rad_sw_in(m) - & |
---|
7609 | surf_usm_v(l)%rad_sw_out(m) + & |
---|
7610 | surf_usm_v(l)%rad_lw_in(m) - & |
---|
7611 | surf_usm_v(l)%rad_lw_out(m) |
---|
7612 | |
---|
7613 | !-- numerator of the prognostic equation |
---|
7614 | coef_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
7615 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_veg_wall,m) * & |
---|
7616 | sigma_sb * t_surf_v(l)%t(m) ** 4 + & |
---|
7617 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
7618 | lambda_surface * t_wall_v(l)%t(nzb_wall,m) |
---|
7619 | coef_window_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
7620 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_wat_win,m) * & |
---|
7621 | sigma_sb * t_surf_window_v(l)%t(m) ** 4 + & |
---|
7622 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
7623 | lambda_surface_window * t_window_v(l)%t(nzb_wall,m) |
---|
7624 | |
---|
7625 | coef_green_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to -lwout included in calculation of radnet_l |
---|
7626 | ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) *& |
---|
7627 | sigma_sb * t_surf_green_v(l)%t(m) ** 4 + & |
---|
7628 | f_shf * surf_usm_v(l)%pt1(m) + & |
---|
7629 | lambda_surface_green * t_wall_v(l)%t(nzb_wall,m) |
---|
7630 | |
---|
7631 | !-- denominator of the prognostic equation |
---|
7632 | coef_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_veg_wall,m) * & |
---|
7633 | sigma_sb * t_surf_v(l)%t(m) ** 3 & |
---|
7634 | + lambda_surface + f_shf / exn(k) |
---|
7635 | coef_window_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_wat_win,m) *& |
---|
7636 | sigma_sb * t_surf_window_v(l)%t(m) ** 3 & |
---|
7637 | + lambda_surface_window + f_shf / exn(k) |
---|
7638 | coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) *& |
---|
7639 | sigma_sb * t_surf_green_v(l)%t(m) ** 3 & |
---|
7640 | + lambda_surface_green + f_shf / exn(k) |
---|
7641 | |
---|
7642 | !-- implicit solution when the surface layer has no heat capacity, |
---|
7643 | !-- otherwise use RK3 scheme. |
---|
7644 | t_surf_v_p(l)%t(m) = ( coef_1 * dt_3d * tsc(2) + & |
---|
7645 | surf_usm_v(l)%c_surface(m) * t_surf_v(l)%t(m) ) / & |
---|
7646 | ( surf_usm_v(l)%c_surface(m) + coef_2 * dt_3d * tsc(2) ) |
---|
7647 | t_surf_window_v_p(l)%t(m) = ( coef_window_1 * dt_3d * tsc(2) + & |
---|
7648 | surf_usm_v(l)%c_surface_window(m) * t_surf_window_v(l)%t(m) ) / & |
---|
7649 | ( surf_usm_v(l)%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) |
---|
7650 | |
---|
7651 | t_surf_green_v_p(l)%t(m) = ( coef_green_1 * dt_3d * tsc(2) + & |
---|
7652 | surf_usm_v(l)%c_surface_green(m) * t_surf_green_v(l)%t(m) ) / & |
---|
7653 | ( surf_usm_v(l)%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) |
---|
7654 | |
---|
7655 | |
---|
7656 | |
---|
7657 | !-- add RK3 term |
---|
7658 | t_surf_v_p(l)%t(m) = t_surf_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
7659 | surf_usm_v(l)%tt_surface_m(m) |
---|
7660 | t_surf_window_v_p(l)%t(m) = t_surf_window_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
7661 | surf_usm_v(l)%tt_surface_window_m(m) |
---|
7662 | t_surf_green_v_p(l)%t(m) = t_surf_green_v_p(l)%t(m) + dt_3d * tsc(3) * & |
---|
7663 | surf_usm_v(l)%tt_surface_green_m(m) |
---|
7664 | ! |
---|
7665 | !-- Store surface temperature. Further, in case humidity is used |
---|
7666 | !-- store also vpt_surface, which is, due to the lack of moisture on roofs simply |
---|
7667 | !-- assumed to be the surface temperature. |
---|
7668 | surf_usm_v(l)%pt_surface(m) = ( surf_usm_v(l)%frac(ind_veg_wall,m) * t_surf_v_p(l)%t(m) & |
---|
7669 | + surf_usm_v(l)%frac(ind_wat_win,m) * t_surf_window_v_p(l)%t(m) & |
---|
7670 | + surf_usm_v(l)%frac(ind_pav_green,m) * t_surf_green_v_p(l)%t(m) ) & |
---|
7671 | / exn(k) |
---|
7672 | |
---|
7673 | IF ( humidity ) surf_usm_v(l)%vpt_surface(m) = & |
---|
7674 | surf_usm_v(l)%pt_surface(m) |
---|
7675 | |
---|
7676 | !-- calculate true tendency |
---|
7677 | stend = ( t_surf_v_p(l)%t(m) - t_surf_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
7678 | surf_usm_v(l)%tt_surface_m(m) ) / ( dt_3d * tsc(2) ) |
---|
7679 | stend_window = ( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
7680 | surf_usm_v(l)%tt_surface_window_m(m) ) / ( dt_3d * tsc(2) ) |
---|
7681 | stend_green = ( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) - dt_3d * tsc(3) *& |
---|
7682 | surf_usm_v(l)%tt_surface_green_m(m) ) / ( dt_3d * tsc(2) ) |
---|
7683 | |
---|
7684 | !-- calculate t_surf tendencies for the next Runge-Kutta step |
---|
7685 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
7686 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
7687 | surf_usm_v(l)%tt_surface_m(m) = stend |
---|
7688 | surf_usm_v(l)%tt_surface_window_m(m) = stend_window |
---|
7689 | surf_usm_v(l)%tt_surface_green_m(m) = stend_green |
---|
7690 | ELSEIF ( intermediate_timestep_count < & |
---|
7691 | intermediate_timestep_count_max ) THEN |
---|
7692 | surf_usm_v(l)%tt_surface_m(m) = -9.5625_wp * stend + & |
---|
7693 | 5.3125_wp * surf_usm_v(l)%tt_surface_m(m) |
---|
7694 | surf_usm_v(l)%tt_surface_green_m(m) = -9.5625_wp * stend_green + & |
---|
7695 | 5.3125_wp * surf_usm_v(l)%tt_surface_green_m(m) |
---|
7696 | surf_usm_v(l)%tt_surface_window_m(m) = -9.5625_wp * stend_window + & |
---|
7697 | 5.3125_wp * surf_usm_v(l)%tt_surface_window_m(m) |
---|
7698 | ENDIF |
---|
7699 | ENDIF |
---|
7700 | |
---|
7701 | !-- in case of fast changes in the skin temperature, it is required to |
---|
7702 | !-- update the radiative fluxes in order to keep the solution stable |
---|
7703 | |
---|
7704 | IF ( ( ABS( t_surf_v_p(l)%t(m) - t_surf_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
7705 | ( ABS( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) ) > 1.0_wp ) .OR. & |
---|
7706 | ( ABS( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) ) > 1.0_wp ) ) THEN |
---|
7707 | force_radiation_call_l = .TRUE. |
---|
7708 | ENDIF |
---|
7709 | |
---|
7710 | !-- calculate fluxes |
---|
7711 | !-- prognostic rad_net_l is used just for output! |
---|
7712 | surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%frac(ind_veg_wall,m) * & |
---|
7713 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
7714 | 3.0_wp * sigma_sb * & |
---|
7715 | t_surf_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
7716 | t_surf_v(l)%t(m)**3 * t_surf_v_p(l)%t(m) ) & |
---|
7717 | + surf_usm_v(l)%frac(ind_wat_win,m) * & |
---|
7718 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
7719 | 3.0_wp * sigma_sb * & |
---|
7720 | t_surf_window_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
7721 | t_surf_window_v(l)%t(m)**3 * t_surf_window_v_p(l)%t(m) ) & |
---|
7722 | + surf_usm_v(l)%frac(ind_pav_green,m) * & |
---|
7723 | ( surf_usm_v(l)%rad_net_l(m) + & |
---|
7724 | 3.0_wp * sigma_sb * & |
---|
7725 | t_surf_green_v(l)%t(m)**4 - 4.0_wp * sigma_sb * & |
---|
7726 | t_surf_green_v(l)%t(m)**3 * t_surf_green_v_p(l)%t(m) ) |
---|
7727 | |
---|
7728 | surf_usm_v(l)%wghf_eb_window(m) = lambda_surface_window * & |
---|
7729 | ( t_surf_window_v_p(l)%t(m) - t_window_v(l)%t(nzb_wall,m) ) |
---|
7730 | surf_usm_v(l)%wghf_eb(m) = lambda_surface * & |
---|
7731 | ( t_surf_v_p(l)%t(m) - t_wall_v(l)%t(nzb_wall,m) ) |
---|
7732 | surf_usm_v(l)%wghf_eb_green(m) = lambda_surface_green * & |
---|
7733 | ( t_surf_green_v_p(l)%t(m) - t_green_v(l)%t(nzb_wall,m) ) |
---|
7734 | |
---|
7735 | !-- ground/wall/roof surface heat flux |
---|
7736 | surf_usm_v(l)%wshf_eb(m) = & |
---|
7737 | - f_shf * ( surf_usm_v(l)%pt1(m) - & |
---|
7738 | t_surf_v_p(l)%t(m) / exn(k) ) * surf_usm_v(l)%frac(ind_veg_wall,m) & |
---|
7739 | - f_shf_window * ( surf_usm_v(l)%pt1(m) - & |
---|
7740 | t_surf_window_v_p(l)%t(m) / exn(k) ) * surf_usm_v(l)%frac(ind_wat_win,m)& |
---|
7741 | - f_shf_green * ( surf_usm_v(l)%pt1(m) - & |
---|
7742 | t_surf_green_v_p(l)%t(m) / exn(k) ) * surf_usm_v(l)%frac(ind_pav_green,m) |
---|
7743 | |
---|
7744 | ! |
---|
7745 | !-- store kinematic surface heat fluxes for utilization in other processes |
---|
7746 | !-- diffusion_s, surface_layer_fluxes,... |
---|
7747 | surf_usm_v(l)%shf(m) = surf_usm_v(l)%wshf_eb(m) / cp |
---|
7748 | |
---|
7749 | ENDDO |
---|
7750 | |
---|
7751 | ENDDO |
---|
7752 | ! |
---|
7753 | !-- Add-up anthropogenic heat, for now only at upward-facing surfaces |
---|
7754 | IF ( usm_anthropogenic_heat .AND. & |
---|
7755 | intermediate_timestep_count == intermediate_timestep_count_max ) THEN |
---|
7756 | !-- application of the additional anthropogenic heat sources |
---|
7757 | !-- we considere the traffic for now so all heat is absorbed |
---|
7758 | !-- to the first layer, generalization would be worth. |
---|
7759 | |
---|
7760 | !-- calculation of actual profile coefficient |
---|
7761 | !-- ??? check time_since_reference_point ??? |
---|
7762 | dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp) |
---|
7763 | dhour = INT(dtime/3600.0_wp) |
---|
7764 | DO m = 1, naheatlayers |
---|
7765 | !-- Get indices of respective grid point |
---|
7766 | i = surf_usm_h%i(m) |
---|
7767 | j = surf_usm_h%j(m) |
---|
7768 | k = surf_usm_h%k(m) |
---|
7769 | IF ( k > get_topography_top_index_ji( j, i, 's' ) .AND. & |
---|
7770 | k <= naheatlayers ) THEN |
---|
7771 | !-- increase of pt in box i,j,k in time dt_3d |
---|
7772 | !-- given to anthropogenic heat aheat*acoef (W*m-2) |
---|
7773 | !-- linear interpolation of coeficient |
---|
7774 | acoef = (REAL(dhour+1,wp)-dtime/3600.0_wp)*aheatprof(k,dhour) + & |
---|
7775 | (dtime/3600.0_wp-REAL(dhour,wp))*aheatprof(k,dhour+1) |
---|
7776 | IF ( aheat(k,j,i) > 0.0_wp ) THEN |
---|
7777 | pt(k,j,i) = pt(k,j,i) + aheat(k,j,i)*acoef*dt_3d/(exn(k)*rho_cp*dzu(k)) |
---|
7778 | ENDIF |
---|
7779 | ENDIF |
---|
7780 | ENDDO |
---|
7781 | |
---|
7782 | ENDIF |
---|
7783 | |
---|
7784 | !-- pt and shf are defined on nxlg:nxrg,nysg:nyng |
---|
7785 | !-- get the borders from neighbours |
---|
7786 | #if ! defined( __nopointer ) |
---|
7787 | CALL exchange_horiz( pt, nbgp ) |
---|
7788 | #endif |
---|
7789 | |
---|
7790 | !-- calculation of force_radiation_call: |
---|
7791 | !-- Make logical OR for all processes. |
---|
7792 | !-- Force radiation call if at least one processor forces it. |
---|
7793 | IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )& |
---|
7794 | THEN |
---|
7795 | #if defined( __parallel ) |
---|
7796 | IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) |
---|
7797 | CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call, & |
---|
7798 | 1, MPI_LOGICAL, MPI_LOR, comm2d, ierr ) |
---|
7799 | #else |
---|
7800 | force_radiation_call = force_radiation_call_l |
---|
7801 | #endif |
---|
7802 | force_radiation_call_l = .FALSE. |
---|
7803 | ENDIF |
---|
7804 | |
---|
7805 | END SUBROUTINE usm_surface_energy_balance |
---|
7806 | |
---|
7807 | |
---|
7808 | !------------------------------------------------------------------------------! |
---|
7809 | ! Description: |
---|
7810 | ! ------------ |
---|
7811 | !> Swapping of timelevels for t_surf and t_wall |
---|
7812 | !> called out from subroutine swap_timelevel |
---|
7813 | !------------------------------------------------------------------------------! |
---|
7814 | SUBROUTINE usm_swap_timelevel ( mod_count ) |
---|
7815 | |
---|
7816 | IMPLICIT NONE |
---|
7817 | |
---|
7818 | INTEGER(iwp), INTENT(IN) :: mod_count |
---|
7819 | INTEGER(iwp) :: i |
---|
7820 | |
---|
7821 | #if defined( __nopointer ) |
---|
7822 | t_surf_h = t_surf_h_p |
---|
7823 | t_wall_h = t_wall_h_p |
---|
7824 | t_surf_v = t_surf_v_p |
---|
7825 | t_wall_v = t_wall_v_p |
---|
7826 | t_surf_window_h = t_surf_window_h_p |
---|
7827 | t_window_h = t_window_h_p |
---|
7828 | t_surf_window_v = t_surf_window_v_p |
---|
7829 | t_window_v = t_window_v_p |
---|
7830 | t_surf_green_h = t_surf_green_h_p |
---|
7831 | t_surf_green_v = t_surf_green_v_p |
---|
7832 | t_green_h = t_green_h_p |
---|
7833 | t_green_v = t_green_v_p |
---|
7834 | #else |
---|
7835 | SELECT CASE ( mod_count ) |
---|
7836 | CASE ( 0 ) |
---|
7837 | ! |
---|
7838 | !-- Horizontal surfaces |
---|
7839 | t_surf_h => t_surf_h_1; t_surf_h_p => t_surf_h_2 |
---|
7840 | t_wall_h => t_wall_h_1; t_wall_h_p => t_wall_h_2 |
---|
7841 | t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 |
---|
7842 | t_window_h => t_window_h_1; t_window_h_p => t_window_h_2 |
---|
7843 | t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 |
---|
7844 | t_green_h => t_green_h_1; t_green_h_p => t_green_h_2 |
---|
7845 | ! |
---|
7846 | !-- Vertical surfaces |
---|
7847 | t_surf_v => t_surf_v_1; t_surf_v_p => t_surf_v_2 |
---|
7848 | t_wall_v => t_wall_v_1; t_wall_v_p => t_wall_v_2 |
---|
7849 | t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 |
---|
7850 | t_window_v => t_window_v_1; t_window_v_p => t_window_v_2 |
---|
7851 | t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 |
---|
7852 | t_green_v => t_green_v_1; t_green_v_p => t_green_v_2 |
---|
7853 | CASE ( 1 ) |
---|
7854 | ! |
---|
7855 | !-- Horizontal surfaces |
---|
7856 | t_surf_h => t_surf_h_2; t_surf_h_p => t_surf_h_1 |
---|
7857 | t_wall_h => t_wall_h_2; t_wall_h_p => t_wall_h_1 |
---|
7858 | t_surf_window_h => t_surf_window_h_2; t_surf_window_h_p => t_surf_window_h_1 |
---|
7859 | t_window_h => t_window_h_2; t_window_h_p => t_window_h_1 |
---|
7860 | t_surf_green_h => t_surf_green_h_2; t_surf_green_h_p => t_surf_green_h_1 |
---|
7861 | t_green_h => t_green_h_2; t_green_h_p => t_green_h_1 |
---|
7862 | ! |
---|
7863 | !-- Vertical surfaces |
---|
7864 | t_surf_v => t_surf_v_2; t_surf_v_p => t_surf_v_1 |
---|
7865 | t_wall_v => t_wall_v_2; t_wall_v_p => t_wall_v_1 |
---|
7866 | t_surf_window_v => t_surf_window_v_2; t_surf_window_v_p => t_surf_window_v_1 |
---|
7867 | t_window_v => t_window_v_2; t_window_v_p => t_window_v_1 |
---|
7868 | t_surf_green_v => t_surf_green_v_2; t_surf_green_v_p => t_surf_green_v_1 |
---|
7869 | t_green_v => t_green_v_2; t_green_v_p => t_green_v_1 |
---|
7870 | END SELECT |
---|
7871 | #endif |
---|
7872 | |
---|
7873 | END SUBROUTINE usm_swap_timelevel |
---|
7874 | |
---|
7875 | !------------------------------------------------------------------------------! |
---|
7876 | ! Description: |
---|
7877 | ! ------------ |
---|
7878 | !> Subroutine writes t_surf and t_wall data into restart files |
---|
7879 | !------------------------------------------------------------------------------! |
---|
7880 | SUBROUTINE usm_wrd_local |
---|
7881 | |
---|
7882 | |
---|
7883 | IMPLICIT NONE |
---|
7884 | |
---|
7885 | CHARACTER(LEN=1) :: dum !< dummy string to create output-variable name |
---|
7886 | INTEGER(iwp) :: l !< index surface type orientation |
---|
7887 | |
---|
7888 | CALL wrd_write_string( 'ns_h_on_file_usm' ) |
---|
7889 | WRITE ( 14 ) surf_usm_h%ns |
---|
7890 | |
---|
7891 | CALL wrd_write_string( 'ns_v_on_file_usm' ) |
---|
7892 | WRITE ( 14 ) surf_usm_v(0:3)%ns |
---|
7893 | |
---|
7894 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
7895 | WRITE ( 14 ) surf_usm_h%start_index |
---|
7896 | |
---|
7897 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
7898 | WRITE ( 14 ) surf_usm_h%end_index |
---|
7899 | |
---|
7900 | CALL wrd_write_string( 't_surf_h' ) |
---|
7901 | WRITE ( 14 ) t_surf_h |
---|
7902 | |
---|
7903 | CALL wrd_write_string( 't_surf_window_h' ) |
---|
7904 | WRITE ( 14 ) t_surf_window_h |
---|
7905 | |
---|
7906 | CALL wrd_write_string( 't_surf_green_h' ) |
---|
7907 | WRITE ( 14 ) t_surf_green_h |
---|
7908 | |
---|
7909 | DO l = 0, 3 |
---|
7910 | |
---|
7911 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
7912 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
7913 | |
---|
7914 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
7915 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
7916 | |
---|
7917 | WRITE( dum, '(I1)') l |
---|
7918 | |
---|
7919 | CALL wrd_write_string( 't_surf_v(' // dum // ')' ) |
---|
7920 | WRITE ( 14 ) t_surf_v(l)%t |
---|
7921 | |
---|
7922 | CALL wrd_write_string( 't_surf_window_v(' // dum // ')' ) |
---|
7923 | WRITE ( 14 ) t_surf_window_v(l)%t |
---|
7924 | |
---|
7925 | CALL wrd_write_string( 't_surf_green_v(' // dum // ')' ) |
---|
7926 | WRITE ( 14 ) t_surf_green_v(l)%t |
---|
7927 | |
---|
7928 | ENDDO |
---|
7929 | |
---|
7930 | CALL wrd_write_string( 'usm_start_index_h' ) |
---|
7931 | WRITE ( 14 ) surf_usm_h%start_index |
---|
7932 | |
---|
7933 | CALL wrd_write_string( 'usm_end_index_h' ) |
---|
7934 | WRITE ( 14 ) surf_usm_h%end_index |
---|
7935 | |
---|
7936 | CALL wrd_write_string( 't_wall_h' ) |
---|
7937 | WRITE ( 14 ) t_wall_h |
---|
7938 | |
---|
7939 | CALL wrd_write_string( 't_window_h' ) |
---|
7940 | WRITE ( 14 ) t_window_h |
---|
7941 | |
---|
7942 | CALL wrd_write_string( 't_green_h' ) |
---|
7943 | WRITE ( 14 ) t_green_h |
---|
7944 | |
---|
7945 | DO l = 0, 3 |
---|
7946 | |
---|
7947 | CALL wrd_write_string( 'usm_start_index_v' ) |
---|
7948 | WRITE ( 14 ) surf_usm_v(l)%start_index |
---|
7949 | |
---|
7950 | CALL wrd_write_string( 'usm_end_index_v' ) |
---|
7951 | WRITE ( 14 ) surf_usm_v(l)%end_index |
---|
7952 | |
---|
7953 | WRITE( dum, '(I1)') l |
---|
7954 | |
---|
7955 | CALL wrd_write_string( 't_wall_v(' // dum // ')' ) |
---|
7956 | WRITE ( 14 ) t_wall_v(l)%t |
---|
7957 | |
---|
7958 | CALL wrd_write_string( 't_window_v(' // dum // ')' ) |
---|
7959 | WRITE ( 14 ) t_window_v(l)%t |
---|
7960 | |
---|
7961 | CALL wrd_write_string( 't_green_v(' // dum // ')' ) |
---|
7962 | WRITE ( 14 ) t_green_v(l)%t |
---|
7963 | |
---|
7964 | ENDDO |
---|
7965 | |
---|
7966 | |
---|
7967 | END SUBROUTINE usm_wrd_local |
---|
7968 | |
---|
7969 | ! |
---|
7970 | !-- Integrated stability function for heat and moisture |
---|
7971 | FUNCTION psi_h( zeta ) |
---|
7972 | |
---|
7973 | USE kinds |
---|
7974 | |
---|
7975 | IMPLICIT NONE |
---|
7976 | |
---|
7977 | REAL(wp) :: psi_h !< Integrated similarity function result |
---|
7978 | REAL(wp) :: zeta !< Stability parameter z/L |
---|
7979 | REAL(wp) :: x !< dummy variable |
---|
7980 | |
---|
7981 | REAL(wp), PARAMETER :: a = 1.0_wp !< constant |
---|
7982 | REAL(wp), PARAMETER :: b = 0.66666666666_wp !< constant |
---|
7983 | REAL(wp), PARAMETER :: c = 5.0_wp !< constant |
---|
7984 | REAL(wp), PARAMETER :: d = 0.35_wp !< constant |
---|
7985 | REAL(wp), PARAMETER :: c_d_d = c / d !< constant |
---|
7986 | REAL(wp), PARAMETER :: bc_d_d = b * c / d !< constant |
---|
7987 | |
---|
7988 | |
---|
7989 | IF ( zeta < 0.0_wp ) THEN |
---|
7990 | x = SQRT( 1.0_wp - 16.0_wp * zeta ) |
---|
7991 | psi_h = 2.0_wp * LOG( (1.0_wp + x ) / 2.0_wp ) |
---|
7992 | ELSE |
---|
7993 | psi_h = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - (1.0_wp & |
---|
7994 | + 0.66666666666_wp * a * zeta )**1.5_wp - bc_d_d & |
---|
7995 | + 1.0_wp |
---|
7996 | ! |
---|
7997 | !-- Old version for stable conditions (only valid for z/L < 0.5) |
---|
7998 | !-- psi_h = - 5.0_wp * zeta |
---|
7999 | ENDIF |
---|
8000 | |
---|
8001 | END FUNCTION psi_h |
---|
8002 | |
---|
8003 | END MODULE urban_surface_mod |
---|