Skip to content

Commit 470ce2b

Browse files
AlexisRenchonychnlikmdeckjuliasloan25
committed
Add AbstractMoistureStressModel with 3 options
This commits adds a portion of Yuchen Li PR #1330, a new Canopy component type: AbstractMoistureStressModel, with 3 methods: the existing one (Tuzet) which was previously in PlantHydraulics, a Piecewise method using dry to wet soil moisture, and no moisture stress. Co-authored-by: ychnli <[email protected]> Co-authored-by: kmdeck <[email protected]> Co-authored-by: AlexisRenchon <[email protected]> Co-authored-by: juliasloan25 <[email protected]>
1 parent f33a7fa commit 470ce2b

36 files changed

+670
-286
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ClimaLand.jl Release Notes
33

44
main
55
-------
6-
6+
- Add moisture stress component to the canopy model PR[#1387](https://github.com/CliMA/ClimaLand.jl/pull/1387)
77
- Remove `PrognosticSoilConditions` in favor of using `PrognosticGroundConditions` more generally PR[#1411](https://github.com/CliMA/ClimaLand.jl/pull/1411)
88

99
v0.20.0

docs/src/APIs/canopy/Photosynthesis.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ ClimaLand.Canopy.light_assimilation
3131
ClimaLand.Canopy.max_electron_transport_farquhar
3232
ClimaLand.Canopy.electron_transport_farquhar
3333
ClimaLand.Canopy.net_photosynthesis
34-
ClimaLand.Canopy.moisture_stress
3534
ClimaLand.Canopy.dark_respiration_farquhar
3635
ClimaLand.Canopy.MM_Kc
3736
ClimaLand.Canopy.MM_Ko
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Soil moisture stress
2+
3+
```@meta
4+
CurrentModule = ClimaLand.Canopy
5+
```
6+
7+
## Models and Parameters
8+
9+
```@docs
10+
ClimaLand.Canopy.TuzetMoistureStressParameters
11+
ClimaLand.Canopy.TuzetMoistureStressModel
12+
ClimaLand.Canopy.TuzetMoistureStressModel{FT}()
13+
ClimaLand.Canopy.TuzetMoistureStressModel{FT}(toml_dict::CP.ParamDict)
14+
ClimaLand.Canopy.PiecewiseMoistureStressParameters
15+
ClimaLand.Canopy.PiecewiseMoistureStressModel
16+
ClimaLand.Canopy.PiecewiseMoistureStressModel{FT}()
17+
Climaland.Canopy.PiecewiseMoistureStressModel{FT}(toml_dict::CP.ParamDict)
18+
ClimaLand.Canopy.NoMoistureStressModel
19+
```
20+
21+
## Methods
22+
23+
```@docs
24+
ClimaLand.Canopy.update_soil_moisture_stress!
25+
ClimaLand.Canopy.update_piecewise_soil_moisture_stress!
26+
```

docs/src/tutorials/calibration/obs_site_level_calibration.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function G(Vcmax25, g1)
238238
simulation.start_date,
239239
simulation.start_date + Day(20),
240240
stop_date,
241-
)
241+
),
242242
)
243243
return observation
244244
end;

docs/src/tutorials/calibration/perfect_model_site_level_calibration.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function G(Vcmax25)
206206
lhf,
207207
simulation.start_date,
208208
simulation.start_date + Day(20),
209-
)
209+
),
210210
)
211211
return observation
212212
end

experiments/integrated/fluxnet/ozark_pmodel.jl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,16 @@ conductance = PModelConductance{FT}()
179179
# Set up photosynthesis
180180
photosynthesis = PModel{FT}()
181181

182+
# Set up soil moisture stress
183+
soil_moisture_stress_params = PiecewiseMoistureStressParameters(
184+
FT;
185+
θ_high = soil.parameters.ν,
186+
θ_low = soil.parameters.θ_r,
187+
c = FT(1.0),
188+
)
189+
soil_moisture_stress =
190+
PiecewiseMoistureStressModel{FT}(soil_moisture_stress_params)
191+
182192
# Set up plant hydraulics
183193
# Read in LAI from MODIS data
184194
surface_space = land_domain.space.surface;
@@ -222,6 +232,7 @@ canopy = Canopy.CanopyModel{FT}(
222232
radiative_transfer,
223233
photosynthesis,
224234
conductance,
235+
soil_moisture_stress,
225236
hydraulics,
226237
energy,
227238
)
@@ -265,7 +276,8 @@ simulation = LandSimulation(
265276
set_ic!,
266277
updateat,
267278
diagnostics = diags,
268-
);
279+
)
280+
269281
@time solve!(simulation)
270282

271283
comparison_data = FluxnetSimulations.get_comparison_data(site_ID, time_offset)

experiments/integrated/performance/conservation/ozark_conservation.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ for float_type in (Float32, Float64)
8686
[parent(sv.saveval[k].drivers.T)[1] for k in 1:length(sv.t)]
8787
@assert mean(
8888
abs.(
89-
cos.(radiation.θs.(sv.t, radiation.start_date)) .- cache_cosθs
89+
cos.(radiation.θs.(sv.t, radiation.start_date)) .- cache_cosθs,
9090
),
9191
) < eps(FT)
9292
T_mutable = Vector{FT}(undef, 1)
@@ -201,7 +201,7 @@ for float_type in (Float32, Float64)
201201
eps(FT) .+
202202
abs.(
203203
(soil_mass_change_actual - soil_mass_change_exp) ./
204-
soil_mass_change_exp
204+
soil_mass_change_exp,
205205
),
206206
label = "Soil Water Balance",
207207
)
@@ -211,7 +211,7 @@ for float_type in (Float32, Float64)
211211
eps(FT) .+
212212
abs.(
213213
(canopy_mass_change_actual - canopy_mass_change_exp) ./
214-
canopy_mass_change_exp
214+
canopy_mass_change_exp,
215215
),
216216
label = "Canopy Water Balance",
217217
)
@@ -272,7 +272,7 @@ for float_type in (Float32, Float64)
272272
eps(FT) .+
273273
abs.(
274274
(soil_energy_change_actual - soil_energy_change_exp) ./
275-
soil_energy_change_exp
275+
soil_energy_change_exp,
276276
),
277277
label = "Soil Energy Balance",
278278
)

ext/land_sim_vis/leaderboard/leaderboard.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function compute_monthly_leaderboard(
205205
months =
206206
Dates.month.(
207207
Dates.DateTime(sim_var.attributes["start_date"]) .+
208-
Dates.Second.(times)
208+
Dates.Second.(times),
209209
)
210210
months_split, sim_vec_split, rmse_vec_split, bias_vec_split =
211211
partition_by_val(12, months, sim_vec, rmse_vec, bias_vec)

ext/neural_snow/DataTools.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ function serreze_qc(input::DataFrame, id::Int, state::AbstractString)
761761
data[!, :tmax] = maxmin[!, :tmax]
762762
flags =
763763
ismissing.(
764-
data[1:(end - 1), [:SWE, :precip, :air_temp_avg, :tmin, :tmax]]
764+
data[1:(end - 1), [:SWE, :precip, :air_temp_avg, :tmin, :tmax]],
765765
)
766766
flags[!, :date] = data[1:(end - 1), :date]
767767

src/ClimaLand.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ import .Canopy:
410410
ground_albedo_PAR,
411411
ground_albedo_NIR,
412412
canopy_radiant_energy_fluxes!,
413-
root_energy_flux_per_ground_area!
413+
root_energy_flux_per_ground_area!,
414+
update_piecewise_soil_moisture_stress!
414415
### Concrete types of AbstractLandModels
415416
### and associated methods
416417
include("integrated/soil_energy_hydrology_biogeochemistry.jl")

0 commit comments

Comments
 (0)