Skip to content

Commit

Permalink
h_stem not in parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Espeer5 committed Jun 2, 2024
1 parent ecdd138 commit 899fe42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/integrated/soil_canopy_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@ function make_update_boundary_fluxes(
area_index = p.canopy.hydraulics.area_index

labels =
land.canopy.hydraulics.parameters.h_stem > 0 ? [:stem, :leaf] :
land.canopy.hydraulics.h_stem > 0 ? [:stem, :leaf] :
[:leaf]

above_ground_area_index = getproperty(area_index, labels[1])

h_stem = land.canopy.hydraulics.parameters.h_stem
h_leaf = land.canopy.hydraulics.parameters.h_leaf
h_stem = land.canopy.hydraulics.h_stem
h_leaf = land.canopy.hydraulics.h_leaf

midpoint = labels[1] == :stem ? h_stem / 2 : model.h_leaf / 2

Expand Down
2 changes: 1 addition & 1 deletion src/standalone/Vegetation/Canopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ function ClimaLand.make_update_aux(
# for broadcasted expressions using the macro @.
# field.:($index) .= value # works
# @ field.:($$index) = value # works
labels = hydraulics.parameters.h_stem > 0 ? [:stem, :leaf] : [:leaf]
labels = hydraulics.h_stem > 0 ? [:stem, :leaf] : [:leaf]
@inbounds for i in eachindex(labels)
ip1 = i + 1
@. ψ.:($$ip1) = PlantHydraulics.water_retention_curve(
Expand Down
4 changes: 2 additions & 2 deletions src/standalone/Vegetation/PlantHydraulics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ function make_compute_exp_tendency(
area_index = p.canopy.hydraulics.area_index
fa = p.canopy.hydraulics.fa
fa_roots = p.canopy.hydraulics.fa_roots
labels = model.parameters.h_stem > 0 ? [:stem, :leaf] : [:leaf]
labels = model.h_stem > 0 ? [:stem, :leaf] : [:leaf]

@inbounds for i in eachindex(labels)
im1 = i - 1
Expand Down Expand Up @@ -563,7 +563,7 @@ function root_water_flux_per_ground_area!(
n_root_layers = length(root_depths)
ψ_soil::FT = s.ψ(t)
fa .= FT(0.0)
labels = model.parameters.h_stem > 0 ? [:stem, :leaf] : [:leaf]
labels = model.h_stem > 0 ? [:stem, :leaf] : [:leaf]
@inbounds for i in 1:n_root_layers
above_ground_area_index = getproperty(area_index, labels[1])
compartment = labels[i]
Expand Down

0 comments on commit 899fe42

Please sign in to comment.