SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
teb_morpho.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! ###########################################################################################################
6  SUBROUTINE teb_morpho(HPROGRAM, PBLD,PWALL_O_HOR, PGARDEN, PBLD_HEIGHT, PROAD, &
7  proad_o_grnd, pgarden_o_grnd, pwall_o_grnd, &
8  pcan_hw_ratio, psvf_road, psvf_garden, psvf_wall, &
9  pz0_town, pwall_o_bld, ph_traffic, ple_traffic )
10 ! ###########################################################################################################
11 !
12 !!**** *TEB_MORPHO*
13 !!
14 !! PURPOSE
15 !! -------
16 !!**** routine to verify and compute the canyon/building morphology in TEB
17 !!
18 !!** METHOD
19 !! ------
20 !! the routine controls the canyon/building morphology
21 !! - in the case of low building fraction (lower than 10^-4)
22 !! - in the case of high building fraction (higher than 0.9999)
23 !! - building height
24 !! - in the case of low road fraction
25 !! - in the case of low/hight wall surface ratio
26 !!
27 !! EXTERNAL
28 !! --------
29 !!
30 !! IMPLICIT ARGUMENTS
31 !! ------------------
32 !!
33 !! REFERENCE
34 !! ---------
35 !!
36 !! AUTHOR
37 !! ------
38 !! G. Pigeon *Meteo France*
39 !!
40 !! MODIFICATIONS
41 !! -------------
42 !! Original 10/2011
43 !! C. de Munck and A. lemonsu 05/2013 : - corrections in case of too high WALL_O_HOR (6.)
44 !! - final check of parameters range added
45 !----------------------------------------------------------------------------------------------
46 !
47 !* 0. DECLARATIONS
48 ! ------------
49 !
50 USE modi_get_luout
51 USE modi_abor1_sfx
52 !
53 IMPLICIT NONE
54 !
55 !* 0.1 Declarations of arguments
56 ! -------------------------
57 !
58  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling surf. schemes
59 REAL, DIMENSION(:), INTENT(INOUT) :: pbld ! Urban horizontal building density
60 REAL, DIMENSION(:), INTENT(INOUT) :: pwall_o_hor ! Wall to horizontal surface ratio
61 REAL, DIMENSION(:), INTENT(INOUT) :: pgarden ! Urban horizontal garden density
62 REAL, DIMENSION(:), INTENT(INOUT) :: pbld_height ! Average building height [m]
63 REAL, DIMENSION(:), INTENT(OUT) :: proad ! Urban horizontal road density
64 REAL, DIMENSION(:), INTENT(OUT) :: proad_o_grnd ! Road relative surface over ground (road + garden)
65 REAL, DIMENSION(:), INTENT(OUT) :: pgarden_o_grnd ! Garden relative surface over ground (road + garden)
66 REAL, DIMENSION(:), INTENT(OUT) :: pwall_o_grnd ! Wall relative surface over ground (road + garden)
67 REAL, DIMENSION(:), INTENT(OUT) :: pcan_hw_ratio ! Urban canyon Height-Width ratio
68 REAL, DIMENSION(:), INTENT(OUT) :: psvf_road ! road sky view factor
69 REAL, DIMENSION(:), INTENT(OUT) :: psvf_garden ! garden sky view factor
70 REAL, DIMENSION(:), INTENT(OUT) :: psvf_wall ! wall sky view factor
71 REAL, DIMENSION(:), INTENT(OUT) :: pz0_town ! Urban roughness length
72 REAL, DIMENSION(:), INTENT(OUT) :: pwall_o_bld ! Wall relative surface over ground (road + garden)
73 REAL, DIMENSION(:), INTENT(INOUT) :: ph_traffic ! sensible heat flux due to traffic
74 REAL, DIMENSION(:), INTENT(INOUT) :: ple_traffic ! latent heat flux due to traffic
75 !
76 !* 0.2 Declarations of local variables
77 !
78 INTEGER :: jj
79 INTEGER :: iluout
80 !
81 REAL, DIMENSION(SIZE(PBLD)) :: zwall_o_bld ! Initial wall to built surface ratio
82 REAL, DIMENSION(SIZE(PBLD)) :: zwall_o_hor ! Initial wall to horizontal surface ratio
83 !
84 REAL, DIMENSION(2) :: zrange_bld = (/ 0.0001 , 0.9999 /) ! Range allowed for PBLD variation
85 REAL, DIMENSION(2) :: zrange_road = (/ 0.0001 , 0.9999 /) ! Range allowed for PROAD variation
86 REAL, DIMENSION(2) :: zrange_bld_height = (/ 3. , 829.84 /) ! Range allowed for PBLD_HEIGHT variation
87 REAL, DIMENSION(2) :: zrange_wall_o_hor = (/ 0.00012 , 322. /) ! Range allowed for PWALL_O_HOR variation
88 !
89 !
90 !* 1. Get listing file for warnings
91 !
92  CALL get_luout(hprogram, iluout)
93 !
94 
95 zwall_o_bld(:) = 0.
96 zwall_o_hor(:) = 0.
97 
98 DO jj=1,SIZE(pbld)
99  !
100  !* 2. Control building height no lower than 3.m and no higher than 829.84m
101  ! reference: http://en.wikipedia.org/wiki/List_of_tallest_buildings_and_structures_in_the_world (2011)
102  ! and control Z0_TOWN
103  !
104  IF (pbld_height(jj) < zrange_bld_height(1) ) THEN
105  pbld_height(jj) = zrange_bld_height(1)
106  ENDIF
107  IF (pbld_height(jj) > zrange_bld_height(2)) &
108  CALL abor1_sfx('TEB_MORPHO: PBLD_HEIGHT higher than 829.84, highest building in the world, should be lower')
109  !
110  IF (pz0_town(jj) > pbld_height(jj)) THEN
111  CALL abor1_sfx('TEB_MORPHO: PZ0_TOWN higher than PBLD_HEIGHT, should be lower')
112  ENDIF
113  !
114  !* 3. Control no and almost no building in the cell
115  ! authorize building up to 10m and W_O_H 0.001
116  !
117  IF (pbld(jj) < zrange_bld(1) ) THEN
118  pbld(jj) = zrange_bld(1)
119  pgarden(jj) = min(pgarden(jj), 1.-2.*pbld(jj))
120  ENDIF
121  !
122  !* 4. Control only building in the cell: could occur for high resolution
123  ! theoretically W_O_H could be 0. -> impose that at least the wall surface is equal to the mesh perimeter x building
124  ! height for a mesh size of 100 x 100m; the waste heat is released at the roof level
125  !
126  IF (pbld(jj) > zrange_bld(2)) THEN
127  pbld(jj) = zrange_bld(2)
128  IF (pgarden(jj) > 0.) THEN
129  pgarden(jj) = 0.
130  ENDIF
131  ENDIF
132  !
133  !* 5. Control wall surface low respective to building density and building height: pb of the input
134  ! Evaluation of the minimum woh is done for mesh size of 1000. m
135  ! wall surface of the building evaluated considering 1 square building
136  !
137  IF (pwall_o_hor(jj) < 4. * sqrt(pbld(jj))*pbld_height(jj)/1000.) THEN
138  pwall_o_hor(jj) = 4. * sqrt(pbld(jj))*pbld_height(jj)/1000.
139  ENDIF
140  !
141  !* 6. Control facade surface vs building height, case of too high WALL_O_HOR
142  !
143  pwall_o_bld(jj) = pwall_o_hor(jj)/pbld(jj)
144  !
145  IF (pwall_o_bld(jj) > (0.4 * pbld_height(jj))) THEN ! <=> side_of_building < 10 m
146  !
147  zwall_o_hor(jj) = pwall_o_hor(jj)
148  zwall_o_bld(jj) = pwall_o_bld(jj)
149  !
150  pwall_o_hor(jj) = 0.4 * pbld(jj) * pbld_height(jj) ! correction WOHOR v2.1
151  pwall_o_bld(jj) = pwall_o_hor(jj) / pbld(jj) ! correction WOHOR v2.1
152 
153  ENDIF
154  !
155  !* 7. Verify road
156  !
157  proad(jj) = 1.-(pgarden(jj)+pbld(jj))
158  IF (proad(jj) <= zrange_road(1) ) THEN
159  proad(jj) = zrange_road(1)
160  pgarden(jj) = max(pgarden(jj) - zrange_road(1), 0.)
161  IF (ph_traffic(jj) > 0. .OR. ple_traffic(jj) > 0.) THEN
162  ph_traffic(jj) = 0.
163  ple_traffic(jj) = 0.
164  ENDIF
165  ENDIF
166  !
167  !* 8. Final check of parameters range
168  !
169  IF ( pbld(jj) < zrange_bld(1) .OR. pbld(jj) > zrange_bld(2) ) THEN
170  WRITE(iluout,*) 'WARNING : PBLD is still out of range after final corrections &
171  &for grid mesh',jj,' : ',pbld(jj)
172  ENDIF
173  !
174  IF ( pbld_height(jj) < zrange_bld_height(1) .OR. pbld_height(jj) > zrange_bld_height(2) ) THEN
175  WRITE(iluout,*) 'WARNING : PBLD_HEIGHT is still out of range after final corrections &
176  &for grid mesh',jj,' : ',pbld_height(jj)
177  ENDIF
178  !
179  IF ( pwall_o_hor(jj) < zrange_wall_o_hor(1) .OR. pwall_o_hor(jj) > zrange_wall_o_hor(2) ) THEN
180  WRITE(iluout,*) 'WARNING : PWALL_O_HOR is still out of range after final corrections &
181  &for grid mesh',jj,' : ',pwall_o_hor(jj)
182  ENDIF
183  !
184  IF ( pwall_o_bld(jj) - (0.4 * pbld_height(jj)) > 10e-16 ) THEN
185  WRITE(iluout,*) 'WARNING : PWALL_O_BLD is still too high after final corrections &
186  &for grid mesh',jj,' : ',pwall_o_bld(jj)
187  ENDIF
188  !
189 ENDDO
190 !
191 !
192 !* 9. Compute morphometric parameters
193 !
194 pcan_hw_ratio(:) = 0.5 * pwall_o_hor(:) / (1.-pbld(:))
195 !
196 !* relative surface fraction
197 !
198 proad_o_grnd(:) = proad(:) / (proad(:) + pgarden(:))
199 pgarden_o_grnd(:) = pgarden(:) / (proad(:) + pgarden(:))
200 pwall_o_grnd(:) = pwall_o_hor(:) / (proad(:) + pgarden(:))
201 !
202 !* Sky-view-factors:
203 !
204 psvf_road(:) = (sqrt(pcan_hw_ratio(:)**2+1.) - pcan_hw_ratio(:))
205 psvf_garden(:) = psvf_road(:)
206 psvf_wall(:) = 0.5*(pcan_hw_ratio(:)+1.-sqrt(pcan_hw_ratio(:)**2+1.))/pcan_hw_ratio(:)
207 !
208 END SUBROUTINE teb_morpho
subroutine teb_morpho(HPROGRAM, PBLD, PWALL_O_HOR, PGARDEN, PBLD_HEIGHT, PROAD, PROAD_O_GRND, PGARDEN_O_GRND, PWALL_O_GRND, PCAN_HW_RATIO, PSVF_ROAD, PSVF_GARDEN, PSVF_WALL, PZ0_TOWN, PWALL_O_BLD, PH_TRAFFIC, PLE_TRAFFIC)
Definition: teb_morpho.F90:6
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:6
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6