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, Qm, Temp_C, Veg_Fr, avcp, Press_hPa, lv_J_kg, tstep_real, DRAINRT, nsh_real, Precip, RainMaxRes, RAINCOVER, sfr, 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)  Qm,
real(kind(1d0)), intent(in)  Temp_C,
real(kind(1d0)), intent(in)  Veg_Fr,
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,
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 12 of file suews_phys_lumps.f95.

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

Referenced by suews_driver::suews_cal_main().

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  INTEGER, INTENT(in) :: veg_type !Defines how vegetation is calculated for LUMPS
34  INTEGER, INTENT(in) :: snowuse ! option of snow module
35 
36  REAL(KIND(1d0)), INTENT(in) :: qn1! net all-wave radiation
37  REAL(KIND(1d0)), INTENT(in) :: qf! anthropogenic heat flux
38  REAL(KIND(1d0)), INTENT(in) :: qs! storage heat flux
39  REAL(KIND(1d0)), INTENT(in) :: qm!Snow melt associated heat flux
40  REAL(KIND(1d0)), INTENT(in) :: temp_c!air temperature in degC
41  REAL(KIND(1d0)), INTENT(in) :: veg_fr!Vegetation fraction from land area
42  REAL(KIND(1d0)), INTENT(in) :: avcp!Specific heat capacity
43  REAL(KIND(1d0)), INTENT(in) :: press_hpa!Station air pressure in hPa
44  REAL(KIND(1d0)), INTENT(in) :: lv_j_kg!Latent heat of vaporization in [J kg-1]
45  REAL(KIND(1d0)), INTENT(in) :: tstep_real ! time step in REAL
46  REAL(KIND(1d0)), INTENT(in) :: drainrt!Drainage rate of the water bucket [mm hr-1]
47  REAL(KIND(1d0)), INTENT(in) :: nsh_real! real cast of Number of timesteps per hour
48  REAL(KIND(1d0)), INTENT(in) :: precip!Precipitation per timestep [mm]
49  REAL(KIND(1d0)), INTENT(in) :: rainmaxres!Maximum water bucket reservoir [mm]
50  REAL(KIND(1d0)), INTENT(in) :: raincover! LUMPS Limit when surface totally wet [mm]
51 
52  REAL(KIND(1d0)), DIMENSION(nsurf), INTENT(in) :: sfr! veg surface fractions [-]
53  REAL(KIND(1D0)), DIMENSION(NVEGSURF), INTENT(in) :: lai_id_prev! LAI(id-1,iv), LAI at the beginning of today
54  REAL(KIND(1d0)), DIMENSION(3), INTENT(in) :: laimax!Max LAI [m2 m-2]
55  REAL(KIND(1d0)), DIMENSION(3), INTENT(in) :: laimin !Min LAI [m2 m-2]
56 
57  REAL(KIND(1d0)), INTENT(out) ::qh_lumps
58  REAL(KIND(1d0)), INTENT(out) ::qe_lumps !turbulent fluxes: QH, QE
59  REAL(KIND(1d0)), INTENT(out) ::psyc_hpa !Psychometric constant in hPa
60  REAL(KIND(1d0)), INTENT(out) ::s_hpa!Vapour pressure versus temperature slope in hPa
61  REAL(KIND(1d0)), INTENT(out) ::sice_hpa!Vapour pressure versus temperature slope in hPa above ice/snow
62  REAL(KIND(1d0)), INTENT(out) ::veg_fr_temp !TEMPORARY VEGETATIVE SURFACE FRACTION ADJUSTED BY RAINFALL
63  REAL(KIND(1d0)), INTENT(out) ::vegphenlumps
64  ! REAL(KIND(1d0)),INTENT(inout) ::RainBucket !RAINFALL RESERVOIR [mm]
65  ! INTEGER::iv
66  REAL(KIND(1d0)), DIMENSION(3) :: sfrveg! veg surface fractions [-] !,start
67  REAL(KIND(1d0))::vegphen, vegmax, vegmin, & !Vegetation phenology for LUMPS
68  psyc_s, & !Psychometric constant
69  alpha_sl, alpha_in, & !Parameters used in LUMPS QH and QE calculations
70  beta, & !Beta parameter used in LUMPS QH and QE calculations [W m-2]
71  alpha_qhqe, rainres, rainbucket, tlv
72  REAL(KIND(1d0)), PARAMETER::nan = -999
73 
74  tlv = lv_j_kg/tstep_real !Latent heat of vapourisation per timestep
75  ! initialize VegPhenLumps to output
76  vegphenlumps = 0
77 
78  ! initialize rain-related variables
79  rainbucket = 0.
80 
81  ! surface fractions fro veg surfaces
82  sfrveg = sfr(ivconif + 2:ivgrass + 2)
83 
84  ! Calculate slope of the saturation vapour pressure vs air temp.
85  s_hpa = slope_svp(temp_c)
86  psyc_hpa = psyc_const(avcp, press_hpa, lv_j_kg)
87  psyc_s = psyc_hpa/s_hpa
88 
89  !Calculate also sublimation ones if snow calculations are made.
90  !Used also for LUMPS
91  IF (snowuse == 1) THEN
92  IF (temp_c <= 0) THEN
93  sice_hpa = slopeice_svp(temp_c)
94  ELSE
95  sice_hpa = slope_svp(temp_c)
96  ENDIF
97  psyc_s = psyc_hpa/sice_hpa !Psychometric constant divided by the slope
98  ENDIF
99 
100  ! replaced by sinusoidal vegetation formulation
101  !alpha=gis(idgis,itgis,1)*alpha_sl+alpha_in
102 
103  !THE FOLLOWING ADJUSTS THE ALPHA and BETA PARAMETERs FOR RAINFALL.
104  !ASSUMES THE SURFACE IS VEGETATION COVERED WITH RAIN > RAINCOVER mm/DAY
105  !OTHERWISE INCREASES VEGETATION LINEAR WITH AMOUNT OF RAIN.
106 
107  ! !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))
108  ! IF (E_mod>0.) RainBucket=RainBucket-E_mod/tlv !Adjusted for per model timestep instead of per hour HCW 04 Mar 2015
109  ! IF (Temp_C>0.) RainBucket=RainBucket - DRAINRT/nsh_real !DRAINRT is specified in mm h-1
110  ! IF (RainBucket<0.) RainBucket=0.
111  ! IF (Precip>0) RainBucket=MIN(RainMaxRes,RainBucket+Precip)
112  !
113  ! RAINRES = RainBucket
114  ! IF (RAINRES>RAINCOVER) RAINRES=RAINCOVER
115 
116  !--------Calculate vegetation phenology for LUMPS------------------------
117  ! VegPhen=0
118  ! VegMax=0
119  ! VegMin=0
120  vegphen = dot_product(sfrveg, lai_id_prev)
121  vegmax = dot_product(sfrveg, laimax)
122  vegmin = dot_product(sfrveg, laimin)
123 
124  ! DO iv=ivConif,ivGrass !Normalized LAI for vegetation
125  ! VegPhen = sfr(iv+2)*LAI(id-1,iv) + VegPhen
126  ! VegMax = sfr(iv+2)*LAImax(iv) + VegMax
127  ! VegMin = sfr(iv+2)*LAImax(iv) + VegMin
128  ! ENDDO
129 
130  IF (vegmax <= 0.01000) THEN !If max vegetation is very small, TempVeg = 0;
131  veg_fr_temp = 0
132  ELSE
133  vegphenlumps = (vegphen)/(vegmax)
134  veg_fr_temp = veg_fr*vegphenlumps !Now this is veg_fraction in general
135  ENDIF
136 
137  ! initialisation
138  alpha_sl = 0.6
139  alpha_in = 0.2
140 
141  IF (veg_fr_temp > 0.9000) THEN !If vegetation fraction is larger than 0.9
142  beta = (20 - 3)*veg_fr_temp + 3
143  alpha_qhqe = veg_fr_temp*0.8 + 0.2
144  ELSE
145  beta = 3
146  IF (veg_type == 1) THEN !Area vegetated, including bare soil and water
147  alpha_sl = 0.686
148  alpha_in = 0.189
149  ELSEIF (veg_type == 2) THEN !Area irrigated vegetation
150  alpha_sl = 0.610
151  alpha_in = 0.222
152  ENDIF
153  alpha_qhqe = veg_fr_temp*alpha_sl + alpha_in
154  ENDIF
155 
156  ! Calculate the actual heat fluxes
157  qh_lumps = ((1 - alpha_qhqe) + psyc_s)/(1 + psyc_s)*(qn1 + qf - qs - qm) - beta !Eq 3, Grimmond & Oke (2002)
158  !If LUMPS has had a problem, we still need a value
159  if (qh_lumps == nan) qh_lumps = qn1*0.2
160  qe_lumps = (alpha_qhqe/(1 + psyc_s)*(qn1 + qf - qs - qm)) + beta !Eq 4, Grimmond & Oke (2002)
161 
162  ! adjust RAINRES after E_mod calculation is done: ! moved here from above. TS, 13 Jan 2018
163  !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))
164  IF (qe_lumps > 0.) rainbucket = rainbucket - qe_lumps/tlv !Adjusted for per model timestep instead of per hour HCW 04 Mar 2015
165  IF (temp_c > 0.) rainbucket = rainbucket - drainrt/nsh_real !DRAINRT is specified in mm h-1
166  IF (rainbucket < 0.) rainbucket = 0.
167  IF (precip > 0) rainbucket = min(rainmaxres, rainbucket + precip)
168 
169  rainres = rainbucket
170  IF (rainres > raincover) rainres = raincover
171 
172  RETURN
173 
real(kind(1d0)) tlv
real(kind(1d0)) function slope_svp(temp_C)
real(kind(1d0)) lv_j_kg
real(kind(1d0)) qm
real(kind(1d0)) avcp
real(kind(1d0)) function slopeice_svp(temp_C)
real(kind(1d0)) psyc_hpa
real(kind(1d0)) tstep_real
real(kind(1d0)) function psyc_const(cp, Press_hPa, lv_J_kg)
real(kind(1d0)) sice_hpa
real(kind(1d0)) s_hpa
Here is the call graph for this function:
Here is the caller graph for this function: