Skip to content

Commit 4d80f84

Browse files
authored
Merge pull request #28 soil surface evaporation
soil surface evaporation
2 parents f27d90d + 30284eb commit 4d80f84

File tree

7 files changed

+109
-29
lines changed

7 files changed

+109
-29
lines changed

src/physiology/gasexchange/gasexchange.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ include("../../atmosphere/atmosphere.jl")
1010
@system GasExchange(Atmosphere, BoundaryLayer, Calendar, Stomata, IntercellularSpace, Irradiance, EnergyBalance, C3) begin
1111
PPFD: photosynthetic_photon_flux_density ~ track(u"μmol/m^2/s" #= Quanta =#, override)
1212
LAI: leaf_area_index ~ track(override)
13-
drought_factor ~ track(override)
13+
water_stress ~ track(override)
14+
s: senescence_reduction_factor ~ track(override)
1415

1516
A_net_total(A_net, LAI): net_photosynthesis_total => A_net * LAI ~ track(u"μmol/m^2/s" #= CO2 =#)
1617
A_gross_total(A_gross, LAI): gross_photosynthesis_total => A_gross * LAI ~ track(u"μmol/m^2/s" #= CO2 =#)
1718
E_total(E, LAI): transpiration_total => E * LAI ~ track(u"mmol/m^2/s" #= H2O =#)
18-
end
19+
R_sw_total(R_sw, LAI): shortwave_radiation_absorbed_total => R_sw * LAI ~ track(u"W/m^2")
20+
end

src/physiology/gasexchange/stomata.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
end
1515

1616
@system Stomata(StomataBase) begin
17-
drought_factor ~ hold()
17+
water_stress ~ hold()
18+
s: senescence_reduction_factor ~ hold()
1819
g0 => 0.01 ~ preserve(u"mol/m^2/s/bar" #= H2O =#, parameter)
1920
g1 => 9.670307198008624 ~ preserve(parameter)
2021

@@ -28,10 +29,9 @@ end
2829
g0 + (g1 * (1-s) * m * (A_net * hs / Cs))
2930
end ~ track(u"mol/m^2/s/bar" #= H2O =#, min=g0)
3031

31-
m(drought_factor): transpiration_reduction_factor => begin
32+
m(water_stress): transpiration_reduction_factor => begin
3233
#TODO: implement soil water module
33-
drought_factor
34+
water_stress
3435
end ~ track
3536

36-
s: senescence_reduction_factor ~ track(override)
3737
end

src/physiology/nitrogen.jl

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,10 @@
7373
f
7474
end ~ track(max=1)
7575

76-
# Relative drought factor from CROPGRO. Used for N_uptake_conversion_factor.
77-
"Relative drought factor"
78-
drought_factor(SW, minSW, field_capacity, soil_saturation, WP) => begin
79-
if SW > field_capacity
80-
1.0 - (SW - field_capacity) / (soil_saturation - field_capacity)
81-
else
82-
1 * ((SW - WP) / (field_capacity - WP))
83-
end
84-
end ~ track(min=0.1, max=1)
85-
8676
# Nitrogen uptake conversion factor.
8777
# How much kg/ha of nitrogen for mg/cm of nitrogen (root)?
88-
N_uptake_conversion_factor(RLD, drought_factor, soil_depth) => begin
89-
RLD * sqrt(drought_factor) * soil_depth
78+
N_uptake_conversion_factor(RLD, water_stress, soil_depth) => begin
79+
RLD * sqrt(water_stress) * soil_depth
9080
end ~ track(u"kg*cm/mg/ha")
9181

9282
"Amount of NO3 that stays in soil"
@@ -320,4 +310,4 @@
320310
# LFSENWT(SENRTE, NMINELF) => SENRTE * NMINELF / 0.16 ~ track(u"g/m^2/hr")
321311

322312
# STSENWT(LFSENWT, petiole_to_leaf) => LFSENWT * petiole_to_leaf ~ track(u"g/m^2/hr")
323-
end
313+
end

src/physiology/photosynthesis.jl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ Photosynthesis
1111

1212
# "Gas exchange model for sunlit leaves"
1313

14-
# sunlit_gasexchange(context, PPFD=Q_sun, LAI=LAI_sunlit, w=leaf_width, drought_factor =drought_factor) ~ ::GasExchange
14+
# sunlit_gasexchange(context, PPFD=Q_sun, LAI=LAI_sunlit, w=leaf_width, water_stress =water_stress) ~ ::GasExchange
1515

1616
# "Gas exchange model for shaded leaves"
17-
# shaded_gasexchange(context, PPFD=Q_sh, LAI=LAI_shaded, w=leaf_width, drought_factor =drought_factor) ~ ::GasExchange
17+
# shaded_gasexchange(context, PPFD=Q_sh, LAI=LAI_shaded, w=leaf_width, water_stress =water_stress) ~ ::GasExchange
1818

1919
"Gas exchange model for sunlit leaves"
20-
sunlit_gasexchange(context, PPFD=Q_sun, LAI=LAI_sunlit, w=leaf_width, s=s, drought_factor=drought_factor) ~ ::GasExchange
20+
sunlit_gasexchange(context, PPFD=Q_sun, LAI=LAI_sunlit, w=leaf_width, s=s, water_stress=water_stress) ~ ::GasExchange
2121

2222
"Gas exchange model for shaded leaves"
23-
shaded_gasexchange(context, PPFD=Q_sh, LAI=LAI_shaded, w=leaf_width, s=s, drought_factor=drought_factor) ~ ::GasExchange
23+
shaded_gasexchange(context, PPFD=Q_sh, LAI=LAI_shaded, w=leaf_width, s=s, water_stress=water_stress) ~ ::GasExchange
2424

2525

2626
#=================
@@ -41,6 +41,11 @@ Photosynthesis
4141
a + b
4242
end ~ track(u"mmol/m^2/s" #= H2O =#)
4343

44+
"Net solar radiation absorbed (sunlit + shaded)"
45+
R_sw(a=sunlit_gasexchange.R_sw_total, b=shaded_gasexchange.R_sw_total): radiation_absorbed_J_per_s => begin
46+
a + b
47+
end ~ track(u"W/m^2")
48+
4449
CO2_weight => 44.0098 ~ preserve(u"g/mol")
4550
C_weight => 12.0107 ~ preserve(u"g/mol")
4651
CH2O_weight => 30.031 ~ preserve(u"g/mol")

src/rhizosphere/rhizosphere.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
include("soil.jl")
22
include("waterbalance.jl")
3+
include("soilenergy.jl")
34

45
"""
56
Rhizosphere encompasses all rhizosphere-related systems as mixins.
67
"""
7-
@system Rhizosphere(Soil, WaterBalance)
8+
@system Rhizosphere(Soil, SoilEnergy, WaterBalance)

src/rhizosphere/soilenergy.jl

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
"""
2+
`SoilEnergy` keeps track of soil energy balance.
3+
potential soil surface evaporation is determined from a modified Priestly-Taylor model
4+
(Yan & Shugart, 2010) - doi:10.1029/2009JD013598
5+
"""
6+
7+
@system SoilEnergy begin
8+
9+
#=========
10+
Parameters
11+
=========#
12+
13+
λ: latent_heat_of_vaporization_at_25 => 44 ~ preserve(u"kJ/mol", parameter) # should be a function of temp?
14+
Cp: specific_heat_of_air => 29.3 ~ preserve(u"J/mol/K", parameter)
15+
16+
pt: priestly_taylor_parameter => 1.35 ~ preserve(parameter) # (Yan and Shugart, 2010)
17+
18+
ghr: ground_heat_ratio => 0 ~ preserve(parameter) # ASSUMPTION: ground heat flux is negligible
19+
20+
H2O_weight => 18.01528 ~ preserve(u"g/mol")
21+
H2O_density => 997 ~ preserve(u"kg/m^3")
22+
23+
#=================
24+
=================#
25+
26+
R_soil(solrad, R_sw): radiation_input_to_soil_surface => begin
27+
solrad - R_sw
28+
end ~ track(u"W/m^2")
29+
30+
G(R_soil,ghr): ground_heat_flux => begin
31+
ghr * R_soil
32+
end ~ track(u"W/m^2")
33+
34+
psychrometric_constant(Cp,P_air,λ) => begin
35+
Cp * P_air / λ
36+
end ~ track(u"kPa/K")
37+
38+
λE_soil(pt,RH,R_soil,G,d=VPD_Δ,g=psychrometric_constant): soil_latent_heat_flux => begin
39+
pt * RH * d / (d + g) * (R_soil - G)
40+
end ~ track(u"W/m^2")
41+
42+
E0_soil(λE_soil,λ): potential_soil_evaporation_mmol_per_m2_s => begin
43+
λE_soil / λ
44+
end ~ track(u"mmol/m^2/s")
45+
46+
# Conversion to mm/hr to match water balance.
47+
"potential surface evaporation in mm/hr"
48+
potential_surface_evaporation(E0_soil, w=H2O_weight, d=H2O_density) => begin
49+
E0_soil * w / d
50+
end ~ track(u"mm/hr")
51+
52+
end

src/rhizosphere/waterbalance.jl

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,34 @@ Transpiration
7171

7272
"Intercepted rain"
7373
rainInterception(interception, rain) => interception * rain ~ track(u"mm/hr")
74+
75+
"Exess rain and irrigation after transpiration"
76+
excessInput(rain, rainInterception, irrigation, transpiration) => begin
77+
rain - rainInterception + irrigation - transpiration
78+
end ~ track(u"mm/hr", min=0)
79+
80+
"Soil surface evaporation modifier"
81+
beta(SW, WP, field_capacity) => begin
82+
(SW - WP) / (field_capacity - WP)
83+
end ~ track
84+
85+
"Soil surface evaporation"
86+
surface_evaporation(potential_surface_evaporation, beta, excessInput) => begin
87+
if excessInput > potential_surface_evaporation
88+
potential_surface_evaporation
89+
else
90+
excessInput + beta * (potential_surface_evaporation - excessInput)
91+
end
92+
end ~ track(u"mm/hr", max=potential_surface_evaporation)
7493

75-
"Canopy evapotranspiration" # Looks like missing soil surface evaporation
76-
evapotranspiration(transpiration, rainInterception) => begin
77-
transpiration + rainInterception
94+
"Canopy evapotranspiration"
95+
evapotranspiration(transpiration, rainInterception, surface_evaporation) => begin
96+
transpiration + rainInterception + surface_evaporation
7897
end ~ track(u"mm/hr", max=SWhour)
7998

8099
"Potential canopy evapotranspiration"
81-
potential_evapotranspiration(transpiration, rainInterception) => begin
82-
transpiration + rainInterception
100+
potential_evapotranspiration(transpiration, rainInterception, surface_evaporation) => begin
101+
transpiration + rainInterception + surface_evaporation
83102
end ~ track(u"mm/hr")
84103

85104
"Hourly excess soil water"
@@ -166,4 +185,15 @@ Transpiration
166185
irrigation_rate
167186
end
168187
end ~ track(u"mm/hr")
188+
189+
# Relative drought factor from CROPGRO. Used for N_uptake_conversion_factor.
190+
# Captures water stress due to both drought and water logging through reduction in stomatal conductance
191+
"Relative water stress factor"
192+
water_stress(SW, minSW, field_capacity, soil_saturation, WP) => begin
193+
if SW > field_capacity
194+
1.0 - (SW - field_capacity) / (soil_saturation - field_capacity)
195+
else
196+
1 * ((SW - WP) / (field_capacity - WP))
197+
end
198+
end ~ track(min=0.1, max=1)
169199
end

0 commit comments

Comments
 (0)