Skip to content

Commit 983ca7a

Browse files
authored
Merge pull request #25 from junhyukjeon/master
All branches merged and conflicts resolved?
2 parents 76812c6 + 800e024 commit 983ca7a

File tree

3 files changed

+21
-35
lines changed

3 files changed

+21
-35
lines changed

src/physiology/nitrogen.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
# Relative drought factor from CROPGRO. Used for N_uptake_conversion_factor.
7777
"Relative drought factor"
78-
drought_factor(SW, minSW, field_capacity, soil_saturation,WP) => begin
78+
drought_factor(SW, minSW, field_capacity, soil_saturation, WP) => begin
7979
if SW > field_capacity
8080
1.0 - (SW - field_capacity) / (soil_saturation - field_capacity)
8181
else

src/physiology/photosynthesis.jl

Lines changed: 4 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, drought_factor =drought_factor) ~ ::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, drought_factor =drought_factor) ~ ::GasExchange
1818

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

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

2525

2626
#=================

src/rhizosphere/waterbalance.jl

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Transpiration
1111
"Initial soil water"
1212
iSW => 200 ~ preserve(parameter, u"mm")
1313

14-
1514
"Maximum soil water/saturation"
1615
soil_saturation => 500 ~ preserve(parameter, u"mm")
1716

@@ -24,8 +23,8 @@ Transpiration
2423
#soil_table[soil_class].wilting_point
2524
end ~ preserve(parameter, u"mm")
2625

27-
"Irrigation"
28-
irrigation => 0 ~ preserve(parameter, u"mm/hr")
26+
# "Irrigation"
27+
# irrigation => 0 ~ preserve(parameter, u"mm/hr")
2928

3029
# "Maximum available soil water"
3130
# maxASW => 200 ~ preserve(parameter, u"mm") # (Field capacity - Wilting point) * depth
@@ -34,10 +33,6 @@ Transpiration
3433
# "Minimum available soil water"
3534
# minASW => 0 ~ preserve(parameter, u"mm") # need to be updated based on VWC by soil types
3635

37-
#"Irrigation"
38-
#irrigation => 0 ~ preserve(parameter, u"mm/hr")
39-
40-
4136
"Fraction of excess water pooled"
4237
pool_fraction => 0 ~ preserve(parameter)
4338

@@ -61,11 +56,8 @@ Transpiration
6156
# ((Int(soil_class) > 0) ? (11 - 2 * Int(c)) : (SWpower0))
6257
# end ~ preserve
6358

64-
###
65-
field_capacity(soil_saturation) => 327 ~ preserve(u"mm")
66-
67-
# fc => 0.5 ~ preserve(parameter)
68-
# field_capacity(fc, maxASW, minASW) => fc * (maxASW + minASW) ~ preserve(u"mm")
59+
fc => 0.5 ~ preserve(parameter)
60+
field_capacity(fc, soil_saturation, minSW) => fc * (soil_saturation + minSW) ~ preserve(u"mm")
6961

7062

7163
"Proportion of rain intercepted"
@@ -105,19 +97,15 @@ Transpiration
10597
end ~ track(u"mm/hr")
10698

10799
###
108-
# dSW(dPool, evapotranspiration#=, irrigation=#, rain) => begin
109-
# -dPool - evapotranspiration#= + irrigation=# + rain
110-
111-
"Hourly change in avilable soil water"
112-
dASW(dPool, evapotranspiration, irrigation, rain) => begin
100+
dSW(dPool, evapotranspiration, irrigation, rain) => begin
113101
-dPool - evapotranspiration + irrigation + rain
114102
end ~ track(u"mm/hr")
115103

116104
flag_transpiration(transpiration) => transpiration > 0u"mm/hr" ~ flag
117105

118106
"Production modifier for GPP"
119107
transpScaleFactor(evapotranspiration, transpiration, rainInterception) => begin
120-
evapotranspiration / (transpiration + rainInterception)
108+
evapotranspiration / (transpiration + rainInterception) # actual / potential
121109
end ~ track(when=flag_transpiration, init=1)
122110

123111
SW(dSW) ~ accumulate(u"mm", init=iSW, min=minSW, max=soil_saturation)
@@ -131,33 +119,33 @@ Transpiration
131119

132120
"Irrigation based on profiling VWC for Slit Loam"
133121
soil_depth => 2000 ~ preserve(parameter, u"mm") #Poplar rooting depth; soil depth for water balance
134-
SLs => 0.486 ~ preserve(parameter) # Slit Loam - Saturated volumetric water content
135-
SLr => 0.05 ~ preserve(parameter) # Slit Loam - Residual volumetric water content
122+
SLs => 0.486 ~ preserve(parameter) # Silt Loam - Saturated volumetric water content
123+
SLr => 0.05 ~ preserve(parameter) # Silt Loam - Residual volumetric water content
136124

137-
VWC(ASW, soil_depth) => begin
138-
ASW / soil_depth
125+
VWC(SW, soil_depth) => begin
126+
SW / soil_depth
139127
end ~ track(max = SLs)
140128

141129
"Calculate related water content"
142130
RWC(SLs, SLr, VWC) => begin
143131
(VWC - SLr) / (SLs - SLr)
144132
end ~ track
145133

146-
"Field capacity as VWC"
147-
FC => 0.330 ~ preserve(parameter) # Field capacity for Slit Loam
134+
# "Field capacity as VWC"
135+
# FC => 0.330 ~ preserve(parameter) # Field capacity for Slit Loam
148136
#FC(field_capacity, soil_depth) => begin
149137
# (field_capacity / soil_depth)
150138
#end~ track
151139

152-
"wilting point as VWC"
153-
WP => 0.133 ~ preserve(parameter) # Wilting point for Slit Loam
140+
# "wilting point as VWC"
141+
# WP => 0.133 ~ preserve(parameter) # Wilting point for Slit Loam
154142
#WP(wilting_point, soil_depth) => begin
155143
# (field_capacity / soil_depth)
156144
#end~ track
157145

158146
"Irrigation control parameters"
159-
irrigation_start => 0.133 ~ preserve(parameter) # Irrigation start point VWC- wilting point
160-
irrigation_end => 0.330 ~ preserve(parameter) # Irrigation end point VWC - field capacity
147+
irrigation_start(WP, soil_depth) => WP / soil_depth ~ preserve(parameter) # Irrigation start point VWC- wilting point
148+
irrigation_end(field_capacity, soil_depth) => field_capacity / soil_depth ~ preserve(parameter) # Irrigation end point VWC - field capacity
161149
irrigation_rate => 0.5 ~ preserve(parameter, u"mm/hr") # Irrigation rate mm/hr
162150

163151
"Update irrigation status based on VWC"
@@ -170,6 +158,4 @@ Transpiration
170158
irrigation_rate
171159
end
172160
end ~ track(u"mm/hr")
173-
174-
175161
end

0 commit comments

Comments
 (0)