Skip to content

Commit 602babf

Browse files
committed
soil moisture stress
1 parent 7f41020 commit 602babf

37 files changed

+2431
-253
lines changed

Artifacts.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,4 @@ git-tree-sha1 = "c35ba0e899040cb8153226ab751f69100f475d39"
184184

185185
[[mizoguchi_soil_freezing_data.download]]
186186
sha256 = "0027cc080ba45ba33dc790b176ec2854353ce7dce4eae4bef72963b0dd944e0b"
187-
url = "https://caltech.box.com/shared/static/tn1bnqjmegyetw5kzd2ixq5pbnb05s3u.gz"
187+
url = "https://caltech.box.com/shared/static/tn1bnqjmegyetw5kzd2ixq5pbnb05s3u.gz"

docs/src/standalone/pages/vegetation/photosynthesis/pmodel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The P-model differs from other canopy component models in two main ways:
66

77
```julia
88
# make the callback
9-
pmodel_cb = ClimaLand.make_PModel_callback(FT, start_date, t0, dt, canopy)
9+
pmodel_cb = ClimaLand.make_PModel_callback(FT, start_date, dt, canopy)
1010

1111
# add this callback to the CallbackSet with driver, diag
1212
cb = SciMLBase.CallbackSet(driver_cb, diag_cb, pmodel_cb);

docs/src/tutorials/standalone/Canopy/canopy_tutorial.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ domain = Point(; z_sfc = FT(0.0), longlat = (long, lat));
123123

124124
# For this canopy, we are running in standalone mode, which means we need to
125125
# use a prescribed soil driver, defined as follows:
126-
ψ_soil = FT(0.0)
126+
127+
θ_soil = FT(0.0)
127128
T_soil = FT(298.0)
128129
ground = PrescribedGroundConditions{FT}(;
129130
α_PAR = FT(0.2),
130131
α_NIR = FT(0.4),
131132
T = TimeVaryingInput(t -> T_soil),
132-
ψ = TimeVaryingInput(t -> ψ_soil),
133+
θ = TimeVaryingInput(t -> θ_soil),
133134
ϵ = FT(0.99),
134135
);
135136
forcing = (; atmos, radiation, ground);

experiments/integrated/fluxnet/ozark_pmodel.jl

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ dt = Float64(450) # 7.5 minutes
109109
atmos_h,
110110
start_date,
111111
earth_param_set,
112-
FT,
112+
FT;
113+
construct_prescribed_soil = false
113114
)
114115

115116

@@ -176,6 +177,17 @@ conductance = PModelConductance{FT}()
176177
# Set up photosynthesis
177178
photosynthesis = PModel{FT}()
178179

180+
# Set up soil moisture stress
181+
soil_moisture_stress_params = PiecewiseMoistureStressParameters(
182+
FT;
183+
θ_c = FT(0.60),
184+
θ_w = FT(0.10),
185+
c = FT(1.0),
186+
β0 = FT(1.0),
187+
)
188+
soil_moisture_stress =
189+
PiecewiseMoistureStressModel{FT}(soil_moisture_stress_params)
190+
179191
# Set up plant hydraulics
180192
# Read in LAI from MODIS data
181193
surface_space = land_domain.space.surface;
@@ -217,6 +229,7 @@ canopy = Canopy.CanopyModel{FT}(
217229
radiative_transfer,
218230
photosynthesis,
219231
conductance,
232+
soil_moisture_stress,
220233
hydraulics,
221234
energy,
222235
)
@@ -251,19 +264,18 @@ diags = ClimaLand.default_diagnostics(
251264

252265
## How often we want to update the drivers.
253266
data_dt = Second(FluxnetSimulations.get_data_dt(site_ID))
254-
updateat = Array(start_date:data_dt:stop_date)
255-
pmodel_cb = ClimaLand.make_PModel_callback(FT, start_date, dt, land.canopy)
267+
updateat = Array(start_date:data_dt:end_date)
268+
256269
simulation = LandSimulation(
257270
start_date,
258-
stop_date,
271+
end_date,
259272
dt,
260273
land;
261-
user_callbacks = (pmodel_cb,),
262274
set_ic!,
263275
updateat,
264276
diagnostics = diags,
265-
);
266-
@time solve!(simulation)
277+
)
278+
@time sol = solve!(simulation)
267279

268280
comparison_data = FluxnetSimulations.get_comparison_data(site_ID, time_offset)
269281
savedir = joinpath(

0 commit comments

Comments
 (0)