Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdeck committed Jun 17, 2024
1 parent 9acbb16 commit a826743
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/integrated/soil_canopy_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function lsm_radiant_energy_fluxes!(
# net canopy
@. SW_net_canopy =
energy_per_photon_NIR * N_a * p.canopy.radiative_transfer.nir.abs +
energy_per_photon_PAR * N_a * p.canopy.radiative_transfer.abs.abs
energy_per_photon_PAR * N_a * p.canopy.radiative_transfer.par.abs


# net soil = (1-α)*trans for par and nir
Expand Down
7 changes: 5 additions & 2 deletions src/standalone/Vegetation/photosynthesis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ function photosynthesis_at_a_point_Farquhar(
APAR,
c_co2,
medlyn_factor,
R,
parameters,
)
(;
Expand All @@ -111,7 +112,7 @@ function photosynthesis_at_a_point_Farquhar(
Ko25,
ΔHkc,
ΔHko,
) = model.parameters
) = parameters
Jmax = max_electron_transport(Vcmax25, ΔHJmax, T, To, R)
J = electron_transport(APAR, Jmax, θj, ϕ)
Vcmax = compute_Vcmax(Vcmax25, T, To, R, ΔHVcmax)
Expand Down Expand Up @@ -165,10 +166,12 @@ function update_photosynthesis!(
APAR,
c_co2,
medlyn_factor,
R,
model.parameters,
)
Vcmax25field .= Vcmax25
end
Base.broadcastable(m::AbstractPhotosynthesisMechanism) = tuple(m) # this is so that @. does not broadcast on Ref(canopy.autotrophic_respiration)
Base.broadcastable(m::AbstractPhotosynthesisMechanism) = tuple(m)
Base.broadcastable(m::FarquharParameters) = tuple(m)

include("./optimality_farquhar.jl")

0 comments on commit a826743

Please sign in to comment.