SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
urban_exch_coef.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 urban_exch_coef(HZ0H, PZ0_O_Z0H, PTG, PQS, PEXNS, PEXNA, PTA, PQA, &
7  pzref, puref, pvmod, pz0, &
8  pri, pcd, pcdn, pac, pra, pch )
9 ! #######################################################################
10 !
11 !!**** *URBAN_DRAG*
12 !!
13 !! PURPOSE
14 !! -------
15 !
16 ! Computes the surface drag coefficients over roof, road or town
17 ! according several scientific formulations
18 !
19 !
20 !!** METHOD
21 !! ------
22 !
23 !
24 !
25 !
26 !! EXTERNAL
27 !! --------
28 !!
29 !!
30 !! IMPLICIT ARGUMENTS
31 !! ------------------
32 !!
33 !!
34 !! REFERENCE
35 !! ---------
36 !!
37 !!
38 !! AUTHOR
39 !! ------
40 !!
41 !! V. Masson * Meteo-France *
42 !!
43 !! MODIFICATIONS
44 !! -------------
45 !! Original 01/2009 from urban_drag.f90 (modified by S. Leroyer at CMC)
46 ! 01/2009 (S. Leroyer) option (HZ0H) for z0h applied on roof, road and town
47 !! B. Decharme 06/2009 limitation of Ri
48 !! B. Decharme 09/2009 limitation of Ri in surface_ri.F90
49 !
50 !-------------------------------------------------------------------------------
51 
52 USE modi_surface_ri
53 USE modi_surface_cd
54 USE modi_surface_aero_cond
55 USE modi_wind_threshold
56 !
57 USE modd_csts, ONLY : xkarman
58 !
59 !
60 USE yomhook ,ONLY : lhook, dr_hook
61 USE parkind1 ,ONLY : jprb
62 !
63 USE modi_flxsurf3bx
64 !
65 USE modi_init_surfconsphy
66 !
67 IMPLICIT NONE
68 !
69  CHARACTER(LEN=6) :: hz0h ! TEB option for z0h roof & road
70 REAL, INTENT(IN) :: pz0_o_z0h! z0/z0h ratio used in Mascart (1995)
71 REAL, DIMENSION(:), INTENT(IN) :: ptg ! surface temperature
72 REAL, DIMENSION(:), INTENT(IN) :: pqs ! surface specific humidity
73 REAL, DIMENSION(:), INTENT(IN) :: pexns ! surface exner function
74 REAL, DIMENSION(:), INTENT(IN) :: pta ! temperature at the lowest level
75 REAL, DIMENSION(:), INTENT(IN) :: pqa ! specific humidity
76  ! at the lowest level
77 REAL, DIMENSION(:), INTENT(IN) :: pexna ! exner function
78  ! at the lowest level
79 REAL, DIMENSION(:), INTENT(IN) :: pvmod ! module of the horizontal wind
80 !
81 REAL, DIMENSION(:), INTENT(IN) :: pz0 ! roughness length for momentum
82 REAL, DIMENSION(:), INTENT(IN) :: pzref ! reference height of the first
83  ! atmospheric level
84 REAL, DIMENSION(:), INTENT(IN) :: puref ! reference height of the wind
85 ! ! NOTE this is different from ZZREF
86 ! ! ONLY in stand-alone/forced mode,
87 ! ! NOT when coupled to a model (MesoNH)
88 REAL, DIMENSION(:), INTENT(OUT) :: pri ! Richardson number
89 !
90 REAL, DIMENSION(:), INTENT(OUT) :: pcd ! drag coefficient for momentum
91 REAL, DIMENSION(:), INTENT(OUT) :: pcdn ! neutral drag coefficient for momentum
92 REAL, DIMENSION(:), INTENT(OUT) :: pac ! aerodynamical conductance
93 REAL, DIMENSION(:), INTENT(OUT) :: pra ! aerodynamical resistance
94 REAL, DIMENSION(:), INTENT(OUT) :: pch ! drag coefficient for heat
95 !
96 !* local variables
97 !
98 REAL, DIMENSION(SIZE(PZ0)) :: zz0h ! roughness length for heat
99 !* BRUT82 & KAND07 cases
100 REAL,DIMENSION(SIZE(PTA)) :: cmu, ctu, rib,ftemp,fvap,ilmo ! temporary var for
101 REAL,DIMENSION(SIZE(PTA)) :: ue,fcor, hbl,lzz0,lzz0t,fm, fh ! flxsurf3
102 REAL,DIMENSION(SIZE(PTA)) :: z0h_roof,z0h_town,z0h_road ! local thermal roughness
103 REAL,DIMENSION(SIZE(PTA)) :: zustar, zta, ztg
104 REAL,DIMENSION(SIZE(PTA)) :: zvmod ! wind
105 INTEGER n
106 !
107 !* MASC95 case
108 REAL,DIMENSION(SIZE(PTA)) :: zdircoszw ! orography slope cosine
109 REAL(KIND=JPRB) :: zhook_handle
110 !-------------------------------------------------------------------------------
111 !
112 !* 1. Mascart 1995 exchange coefficients
113 ! ----------------------------------
114 !
115 IF (lhook) CALL dr_hook('URBAN_EXCH_COEF',0,zhook_handle)
116 IF (hz0h=='MASC95') THEN
117 !
118  zz0h = pz0 / pz0_o_z0h ! fixed ratio for MASC95
119  zdircoszw=1. ! no orography slope effect taken into account in TEB
120 !
121  CALL surface_ri(ptg, pqs, pexns, pexna, pta, pqa, &
122  pzref, puref, zdircoszw, pvmod, pri )
123 !
124  CALL surface_cd(pri, pzref, puref, pz0, zz0h, pcd, pcdn)
125 !
126  CALL surface_aero_cond(pri, pzref, puref, pvmod, pz0, zz0h, pac, pra, pch)
127 !
128 !
129 !* 2. Brutsaert 1982 or Kanda 2007 exchange coefficients
130 ! ---------------------------------------------------
131 !
132 ELSEIF(hz0h=='BRUT82' .OR. hz0h=='KAND07')THEN
133  ! initialisations
134  fcor(:)=1.0372462e-04
135 !RJ: can be removed
136  CALL init_surfconsphy
137  n=SIZE(pta)
138  !
139  ! Set a minimum threshold to the wind
140  zvmod(:) = wind_threshold(pvmod(:),puref(:))
141  !
142  ! First guess of u*
143  zustar(:) = 0.4 * zvmod(:) / log( puref/pz0(:) )
144  !
145  IF (hz0h=='KAND07') THEN ! Kanda 2007
146  zz0h(:)= pz0(:) * 7.4 * exp( - 1.29 *( pz0(:)*zustar(:)/1.461e-5)**0.25)
147  ELSEIF (hz0h=='BRUT82') THEN ! Brutsaert 1982
148  zz0h(:)= pz0(:) * 7.4 * exp( - 2.46 *( pz0(:)*zustar(:)/1.461e-5)**0.25)
149  ENDIF
150 
151  zta = pta/pexna
152  ztg = ptg/pexns
153  CALL flxsurf3bx( cmu, ctu, pri,ftemp,fvap,ilmo, &
154  ue, fcor, zta, pqa, &
155  puref, pzref, zvmod, ztg, pqs,&
156  hbl, pz0,zz0h, &
157  lzz0, lzz0t, fm, fh,n )
158 !
159  pcd(:) = (cmu(:)/ue(:))**2
160  pcdn(:) = (xkarman/log(puref(:)/pz0(:)))**2
161  pac(:) = (cmu(:)*ctu(:)/ue(:)**2) * zvmod(:)
162  pra(:) = 1. / pac(:)
163  pch(:) = 1. / (pra(:) * zvmod(:))
164 !
165 END IF
166 IF (lhook) CALL dr_hook('URBAN_EXCH_COEF',1,zhook_handle)
167 
168 END SUBROUTINE urban_exch_coef
real function, dimension(size(pwind)) wind_threshold(PWIND, PUREF)
subroutine surface_ri(PTG, PQS, PEXNS, PEXNA, PTA, PQA, PZREF, PUREF, PDIRCOSZW, PVMOD, PRI)
Definition: surface_ri.F90:6
subroutine init_surfconsphy
subroutine surface_aero_cond(PRI, PZREF, PUREF, PVMOD, PZ0, PZ0H, PAC, PRA, PCH)
subroutine surface_cd(PRI, PZREF, PUREF, PZ0EFF, PZ0H, PCD, PCDN)
Definition: surface_cd.F90:6
subroutine flxsurf3bx(CMU, CTU, RIB, FTEMP, FVAP, ILMO, UE, FCOR, TA, QA, ZU, ZT, VA, TG, QG, H, Z0, Z0T, LZZ0, LZZ0T, FM, FH, N)
Definition: flxsurf3bx.F90:23
subroutine urban_exch_coef(HZ0H, PZ0_O_Z0H, PTG, PQS, PEXNS, PEXNA, PTA, PQA, PZREF, PUREF, PVMOD, PZ0, PRI, PCD, PCDN, PAC, PRA, PCH)