SUEWS API Site
Documentation of SUEWS source code
Functions/Subroutines
lumps_module Module Reference

Functions/Subroutines

subroutine lumps_cal_qhqe (veg_type, SnowUse, qn1, qf, qs, Temp_C, VegFraction, avcp, Press_hPa, lv_J_kg, tstep_real, DRAINRT, nsh_real, Precip, RainMaxRes, RAINCOVER, sfr_surf, LAI_id_prev, LAImax, LAImin, QH_LUMPS, QE_LUMPS, psyc_hPa, s_hPa, sIce_hpa, Veg_Fr_temp, VegPhenLumps)
 

Function/Subroutine Documentation

◆ lumps_cal_qhqe()

subroutine lumps_module::lumps_cal_qhqe ( integer, intent(in)  veg_type,
integer, intent(in)  SnowUse,
real(kind(1d0)), intent(in)  qn1,
real(kind(1d0)), intent(in)  qf,
real(kind(1d0)), intent(in)  qs,
real(kind(1d0)), intent(in)  Temp_C,
real(kind(1d0)), intent(in)  VegFraction,
real(kind(1d0)), intent(in)  avcp,
real(kind(1d0)), intent(in)  Press_hPa,
real(kind(1d0)), intent(in)  lv_J_kg,
real(kind(1d0)), intent(in)  tstep_real,
real(kind(1d0)), intent(in)  DRAINRT,
real(kind(1d0)), intent(in)  nsh_real,
real(kind(1d0)), intent(in)  Precip,
real(kind(1d0)), intent(in)  RainMaxRes,
real(kind(1d0)), intent(in)  RAINCOVER,
real(kind(1d0)), dimension(nsurf), intent(in)  sfr_surf,
real(kind(1d0)), dimension(nvegsurf), intent(in)  LAI_id_prev,
real(kind(1d0)), dimension(3), intent(in)  LAImax,
real(kind(1d0)), dimension(3), intent(in)  LAImin,
real(kind(1d0)), intent(out)  QH_LUMPS,
real(kind(1d0)), intent(out)  QE_LUMPS,
real(kind(1d0)), intent(out)  psyc_hPa,
real(kind(1d0)), intent(out)  s_hPa,
real(kind(1d0)), intent(out)  sIce_hpa,
real(kind(1d0)), intent(out)  Veg_Fr_temp,
real(kind(1d0)), intent(out)  VegPhenLumps 
)

Definition at line 5 of file suews_phys_lumps.f95.

12 !Calculates QH and QE for LUMPS. See Loridan et al. (2011)
13 ! ref: Grimmond and Oke (2002) JAM and references within that
14 ! Offerle (2003) -- add water bucket
15 ! ref: Loridan et al. (2011) JAMC dynamic water & vegetation
16 ! Last modified:
17 ! LJ 27 Jan 2016 - Removal of tabs, cleaning the code
18 ! HCW 04 Mar 2015 - Modified to account for model timestep (rather than hourly resolution)
19 ! LJ Feb 2014 - The bug related to VegMax has been fixed (cannot divide by zero)
20 ! LJ/SG May 2012 - Changed phenology to be consistent with SUEWS LAI. No longer Loridan et al. (2011)
21 ! LJ June 2012 - Modified to work with snow (Qm added in the equations!)
22 ! SG Feb 2012 - added some comments
23 ! --------------------------------------------------------------
25
26 IMPLICIT NONE
27 INTEGER, PARAMETER :: ndays = 366
28 INTEGER, PARAMETER :: NSurf = 7
29 INTEGER, PARAMETER :: NVegSurf = 3
30 INTEGER, PARAMETER :: ivConif = 1
31 INTEGER, PARAMETER :: ivGrass = 3
32
33 ! TS 25 Aug 2022: remove Qm from input list as LUMPS is used for initial guess and Qm could be zero
34 REAL(KIND(1D0)), PARAMETER :: Qm = 0 !Snow melt associated heat flux
35
36 INTEGER, INTENT(in) :: veg_type !Defines how vegetation is calculated for LUMPS
37 INTEGER, INTENT(in) :: SnowUse ! option of snow module
38
39 REAL(KIND(1D0)), INTENT(in) :: qn1 ! net all-wave radiation
40 REAL(KIND(1D0)), INTENT(in) :: qf ! anthropogenic heat flux
41 REAL(KIND(1D0)), INTENT(in) :: qs ! storage heat flux
42 REAL(KIND(1D0)), INTENT(in) :: Temp_C !air temperature in degC
43 REAL(KIND(1D0)), INTENT(in) :: VegFraction !Vegetation fraction from land area
44 REAL(KIND(1D0)), INTENT(in) :: avcp !Specific heat capacity
45 REAL(KIND(1D0)), INTENT(in) :: Press_hPa !Station air pressure in hPa
46 REAL(KIND(1D0)), INTENT(in) :: lv_J_kg !Latent heat of vaporization in [J kg-1]
47 REAL(KIND(1D0)), INTENT(in) :: tstep_real ! time step in REAL
48 REAL(KIND(1D0)), INTENT(in) :: DRAINRT !Drainage rate of the water bucket [mm hr-1]
49 REAL(KIND(1D0)), INTENT(in) :: nsh_real ! real cast of Number of timesteps per hour
50 REAL(KIND(1D0)), INTENT(in) :: Precip !Precipitation per timestep [mm]
51 REAL(KIND(1D0)), INTENT(in) :: RainMaxRes !Maximum water bucket reservoir [mm]
52 REAL(KIND(1D0)), INTENT(in) :: RAINCOVER ! LUMPS Limit when surface totally wet [mm]
53
54 REAL(KIND(1D0)), DIMENSION(nsurf), INTENT(in) :: sfr_surf ! veg surface fractions [-]
55 REAL(KIND(1D0)), DIMENSION(NVEGSURF), INTENT(in) :: LAI_id_prev ! LAI(id-1,iv), LAI at the beginning of today
56 REAL(KIND(1D0)), DIMENSION(3), INTENT(in) :: LAImax !Max LAI [m2 m-2]
57 REAL(KIND(1D0)), DIMENSION(3), INTENT(in) :: LAImin !Min LAI [m2 m-2]
58
59 REAL(KIND(1D0)), INTENT(out) :: QH_LUMPS
60 REAL(KIND(1D0)), INTENT(out) :: QE_LUMPS !turbulent fluxes: QH, QE
61 REAL(KIND(1D0)), INTENT(out) :: psyc_hPa !Psychometric constant in hPa
62 REAL(KIND(1D0)), INTENT(out) :: s_hPa !Vapour pressure versus temperature slope in hPa
63 REAL(KIND(1D0)), INTENT(out) :: sIce_hpa !Vapour pressure versus temperature slope in hPa above ice/snow
64 REAL(KIND(1D0)), INTENT(out) :: Veg_Fr_temp !TEMPORARY VEGETATIVE SURFACE FRACTION ADJUSTED BY RAINFALL
65 REAL(KIND(1D0)), INTENT(out) :: VegPhenLumps
66 ! REAL(KIND(1d0)),INTENT(inout) ::RainBucket !RAINFALL RESERVOIR [mm]
67 ! INTEGER::iv
68
69 REAL(KIND(1D0)), DIMENSION(3) :: sfrVeg ! veg surface fractions [-] !,start
70 REAL(KIND(1D0)) :: VegPhen, VegMax, VegMin, & !Vegetation phenology for LUMPS
71 psyc_s, & !Psychometric constant
72 alpha_sl, alpha_in, & !Parameters used in LUMPS QH and QE calculations
73 beta, & !Beta parameter used in LUMPS QH and QE calculations [W m-2]
74 alpha_qhqe, rainres, rainbucket, tlv
75 REAL(KIND(1D0)), PARAMETER :: NAN = -999
76
77 tlv = lv_j_kg/tstep_real !Latent heat of vapourisation per timestep
78 ! initialize VegPhenLumps to output
79 vegphenlumps = 0
80
81 ! initialize rain-related variables
82 rainbucket = 0.
83
84 ! surface fractions fro veg surfaces
85 sfrveg = sfr_surf(ivconif + 2:ivgrass + 2)
86
87 ! Calculate slope of the saturation vapour pressure vs air temp.
88 s_hpa = slope_svp(temp_c)
89 psyc_hpa = psyc_const(avcp, press_hpa, lv_j_kg)
90 psyc_s = psyc_hpa/s_hpa
91
92 !Calculate also sublimation ones if snow calculations are made.
93 !Used also for LUMPS
94 IF (snowuse == 1) THEN
95 IF (temp_c <= 0) THEN
96 sice_hpa = slopeice_svp(temp_c)
97 ELSE
98 sice_hpa = slope_svp(temp_c)
99 END IF
100 psyc_s = psyc_hpa/sice_hpa !Psychometric constant divided by the slope
101 END IF
102
103 ! replaced by sinusoidal vegetation formulation
104 !alpha=gis(idgis,itgis,1)*alpha_sl+alpha_in
105
106 !THE FOLLOWING ADJUSTS THE ALPHA and BETA PARAMETERs FOR RAINFALL.
107 !ASSUMES THE SURFACE IS VEGETATION COVERED WITH RAIN > RAINCOVER mm/DAY
108 !OTHERWISE INCREASES VEGETATION LINEAR WITH AMOUNT OF RAIN.
109
110 ! !IF (E_mod>0.) RainBucket=RainBucket-E_mod*1.44E-3 !1.44E-3 MM/(W/M^2)/HR (i.e. 3600/(lv_J_kg))
111 ! IF (E_mod>0.) RainBucket=RainBucket-E_mod/tlv !Adjusted for per model timestep instead of per hour HCW 04 Mar 2015
112 ! IF (Temp_C>0.) RainBucket=RainBucket - DRAINRT/nsh_real !DRAINRT is specified in mm h-1
113 ! IF (RainBucket<0.) RainBucket=0.
114 ! IF (Precip>0) RainBucket=MIN(RainMaxRes,RainBucket+Precip)
115 !
116 ! RAINRES = RainBucket
117 ! IF (RAINRES>RAINCOVER) RAINRES=RAINCOVER
118
119 !--------Calculate vegetation phenology for LUMPS------------------------
120 ! VegPhen=0
121 ! VegMax=0
122 ! VegMin=0
123 vegphen = dot_product(sfrveg, lai_id_prev)
124 vegmax = dot_product(sfrveg, laimax)
125 vegmin = dot_product(sfrveg, laimin)
126
127 ! DO iv=ivConif,ivGrass !Normalized LAI for vegetation
128 ! VegPhen = sfr_surf(iv+2)*LAI(id-1,iv) + VegPhen
129 ! VegMax = sfr_surf(iv+2)*LAImax(iv) + VegMax
130 ! VegMin = sfr_surf(iv+2)*LAImax(iv) + VegMin
131 ! ENDDO
132
133 IF (vegmax <= 0.01000) THEN !If max vegetation is very small, TempVeg = 0;
134 veg_fr_temp = 0
135 ELSE
136 vegphenlumps = (vegphen)/(vegmax)
137 veg_fr_temp = vegfraction*vegphenlumps !Now this is veg_fraction in general
138 END IF
139
140 ! initialisation
141 alpha_sl = 0.6
142 alpha_in = 0.2
143
144 IF (veg_fr_temp > 0.9000) THEN !If vegetation fraction is larger than 0.9
145 beta = (20 - 3)*veg_fr_temp + 3
146 alpha_qhqe = veg_fr_temp*0.8 + 0.2
147 ELSE
148 beta = 3
149 IF (veg_type == 1) THEN !Area vegetated, including bare soil and water
150 alpha_sl = 0.686
151 alpha_in = 0.189
152 ELSEIF (veg_type == 2) THEN !Area irrigated vegetation
153 alpha_sl = 0.610
154 alpha_in = 0.222
155 END IF
156 alpha_qhqe = veg_fr_temp*alpha_sl + alpha_in
157 END IF
158
159 ! Calculate the actual heat fluxes
160 qh_lumps = ((1 - alpha_qhqe) + psyc_s)/(1 + psyc_s)*(qn1 + qf - qs - qm) - beta !Eq 3, Grimmond & Oke (2002)
161 !If LUMPS has had a problem, we still need a value
162 IF (qh_lumps == nan) qh_lumps = qn1*0.2
163 qe_lumps = (alpha_qhqe/(1 + psyc_s)*(qn1 + qf - qs - qm)) + beta !Eq 4, Grimmond & Oke (2002)
164
165 ! adjust RAINRES after E_mod calculation is done: ! moved here from above. TS, 13 Jan 2018
166 !IF (E_mod>0.) RainBucket=RainBucket-E_mod*1.44E-3 !1.44E-3 MM/(W/M^2)/HR (i.e. 3600/(lv_J_kg))
167 IF (qe_lumps > 0.) rainbucket = rainbucket - qe_lumps/tlv !Adjusted for per model timestep instead of per hour HCW 04 Mar 2015
168 IF (temp_c > 0.) rainbucket = rainbucket - drainrt/nsh_real !DRAINRT is specified in mm h-1
169 IF (rainbucket < 0.) rainbucket = 0.
170 IF (precip > 0) rainbucket = min(rainmaxres, rainbucket + precip)
171
172 rainres = rainbucket
173 IF (rainres > raincover) rainres = raincover
174
175 RETURN
176
real(kind(1d0)) function slope_svp(temp_C)
real(kind(1d0)) function slopeice_svp(temp_C)
real(kind(1d0)) function psyc_const(cp, Press_hPa, lv_J_kg)

References meteo::psyc_const(), meteo::slope_svp(), and meteo::slopeice_svp().

Referenced by suews_driver::suews_cal_main().

Here is the call graph for this function:
Here is the caller graph for this function: