Skip to content

Commit

Permalink
fix loop index bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Espeer5 committed Jun 2, 2024
1 parent 899fe42 commit c9ab29b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/standalone/Vegetation/Canopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,9 @@ function ClimaLand.make_update_aux(
# field.:($index) .= value # works
# @ field.:($$index) = value # works
labels = hydraulics.h_stem > 0 ? [:stem, :leaf] : [:leaf]
@inbounds for i in eachindex(labels)
ip1 = i + 1
if hydraulics.h_stem > 0
i = 1
ip1 = 2
@. ψ.:($$ip1) = PlantHydraulics.water_retention_curve(
retention_model,
PlantHydraulics.effective_saturation(ν, ϑ_l.:($$ip1)),
Expand Down

0 comments on commit c9ab29b

Please sign in to comment.