Skip to content

Commit

Permalink
remove compartment_surfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Espeer5 committed Jun 2, 2024
1 parent 328e3b3 commit edd5408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/standalone/Vegetation/Canopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ function ClimaLand.make_update_aux(
areaip1 = getproperty(area_index, labels[ip1])

midpoint = hydraulics.h_stem / 2
midpointip1 = hydraulics.h_stem + (model.h_leaf / 2)
midpointip1 = hydraulics.h_stem + (hydraulics.h_leaf / 2)

# Compute the flux*area between the current compartment `i`
# and the compartment above.
Expand Down Expand Up @@ -568,7 +568,7 @@ function ClimaLand.make_update_aux(
@. GPP = compute_GPP(An, K, LAI, Ω)
@. gs = medlyn_conductance(g0, Drel, medlyn_factor, An, c_co2_air)
# update autotrophic respiration
h_canopy = hydraulics.compartment_surfaces[end]
h_canopy = hydraulics.h_stem + hydraulics.h_leaf
@. Ra = compute_autrophic_respiration(
canopy.autotrophic_respiration,
Vcmax25,
Expand Down
4 changes: 2 additions & 2 deletions src/standalone/Vegetation/canopy_boundary_fluxes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ model.
See Cowan 1968; Brutsaert 1982, pp. 113–116; Campbell and Norman 1998, p. 71; Shuttleworth 2012, p. 343; Monteith and Unsworth 2013, p. 304.
"""
function ClimaLand.displacement_height(model::CanopyModel{FT}, Y, p) where {FT}
return FT(0.67) * model.hydraulics.compartment_surfaces[end]
return FT(0.67) * (model.hydraulics.h_stem + model.hydraulics.h_leaf)
end

"""
Expand Down Expand Up @@ -69,7 +69,7 @@ A helper function which returns the surface height for the canopy
model, which is stored in the parameter struct.
"""
function ClimaLand.surface_height(model::CanopyModel, _...)
return model.hydraulics.compartment_surfaces[1]
return 0.0
end

"""
Expand Down

0 comments on commit edd5408

Please sign in to comment.