From 8f1fb89cd39e5749329a258e5ecc2b198d6f48ff Mon Sep 17 00:00:00 2001 From: kmdeck Date: Mon, 5 Aug 2024 14:45:48 -0700 Subject: [PATCH] not sure about bug on GPU with SIF --- src/standalone/Vegetation/optimality_farquhar.jl | 1 + src/standalone/Vegetation/solar_induced_fluorescence.jl | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/standalone/Vegetation/optimality_farquhar.jl b/src/standalone/Vegetation/optimality_farquhar.jl index a2212269b7..1422b20271 100644 --- a/src/standalone/Vegetation/optimality_farquhar.jl +++ b/src/standalone/Vegetation/optimality_farquhar.jl @@ -153,3 +153,4 @@ function update_photosynthesis!( @. Rd = dark_respiration(Vcmax25, β, f, ΔHRd, T, To, R) @. An = net_photosynthesis(Ac, Aj, Rd, β) end +Base.broadcastable(m::OptimalityFarquharParameters) = tuple(m) diff --git a/src/standalone/Vegetation/solar_induced_fluorescence.jl b/src/standalone/Vegetation/solar_induced_fluorescence.jl index f2ca8e6df7..968e18a5fa 100644 --- a/src/standalone/Vegetation/solar_induced_fluorescence.jl +++ b/src/standalone/Vegetation/solar_induced_fluorescence.jl @@ -95,8 +95,11 @@ function compute_SIF_at_a_point( Vcmax25::FT, R::FT, T_freeze::FT, - photosynthesis_parameters, - sif_parameters, + photosynthesis_parameters::Union{ + FarquharParameters, + OptimalityFarquharParameters, + }, + sif_parameters::SIFParameters, ) where {FT} (; ΔHJmax, To, θj, ϕ) = photosynthesis_parameters Jmax = max_electron_transport(Vcmax25, ΔHJmax, Tc, To, R)