Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRenchon committed Aug 7, 2024
1 parent 9cdca4d commit 07245f9
Showing 1 changed file with 41 additions and 17 deletions.
58 changes: 41 additions & 17 deletions src/standalone/Vegetation/solar_induced_fluorescence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,49 @@ The required parameters for the SIF parameterisation
Lee et al, 2015. Global Change Biology 21, 3469-3477, doi:10.1111/gcb.12948.
$(DocStringExtensions.FIELDS)
"""
@kwdef struct SIFParameters{FT <: AbstractFloat}
Base.@kwdef struct SIFParameters{FT <: AbstractFloat}
"The rate coefficient for florescence, unitless"
kf::FT = FT(0.05)
kf::FT
"Parameter used to compute the rate coefficient for heat loss in dark-adapted conditions, Tol et al. 2014, unitless"
kd_p1::FT = FT(0.03)
kd_p1::FT
"Parameter used to compute the rate coefficient for heat loss in dark-adapted conditions, Tol et al. 2014, unitless"
kd_p2::FT = FT(0.0273)
kd_p2::FT
"Parameter used to compute the rate coefficient for heat loss in dark-adapted conditions, Tol et al. 2014, unitless"
min_kd::FT = FT(0.087)
min_kd::FT
"Parameter used to compute the rate coefficient for heat loss in light-adapted conditions, Lee et al 2013 (unitless)"
kn_p1::FT = FT(6.2473)
kn_p1::FT
"Parameter used to compute the rate coefficient for heat loss in light-adapted conditions, Lee et al 2013 (unitless)"
kn_p2::FT = FT(0.5944)
kn_p2::FT
"Rate coefficient for photochemical quenching"
kp::FT = FT(4.0)
kp::FT
"Slope of line relating leaf-level fluorescence to spectrometer-observed fluorescence as a function of Vcmax 25. Lee et al 2015."
kappa_p1::FT = FT(0.045)
kappa_p1::FT
"Intercept of line relating leaf-level fluorescence to spectrometer-observed fluorescence as a function of Vcmax 25. Lee et al 2015."
kappa_p2::FT = FT(7.85)
kappa_p2::FT
end

function SIFParameters{FT}(;
kf = FT(0.05),
kd_p1 = FT(0.03),
kd_p2 = FT(0.0273),
min_kd = FT(0.087),
kn_p1 = FT(6.2473),
kn_p2 = FT(0.5944),
kp = FT(4.0),
kappa_p1 = FT(0.045),
kappa_p2 = FT(7.85),
) where {FT}
return SIFParameters{FT}(
kf,
kd_p1,
kd_p2,
min_kd,
kn_p1,
kn_p2,
kp,
kappa_p1,
kappa_p2,
)
end

Base.eltype(::SIFParameters{FT}) where {FT} = FT
Expand All @@ -51,14 +75,14 @@ ClimaLand.auxiliary_domain_names(::Lee2015SIFModel) = (:surface,)
# call function below inside photosynthesis.jl p

function compute_SIF_at_a_point(
APAR,
Tc,
Vcmax25,
R,
T_freeze,
APAR::FT,
Tc::FT,
Vcmax25::FT,
R::FT,
T_freeze::FT,
photosynthesis_parameters,
sif_parameters,
)
) where {FT}
(; ΔHJmax, To, θj, ϕ) = photosynthesis_parameters
Jmax = max_electron_transport(Vcmax25, ΔHJmax, Tc, To, R)
J = electron_transport(APAR, Jmax, θj, ϕ)
Expand All @@ -70,7 +94,7 @@ function compute_SIF_at_a_point(
ϕp0 = kp / (kf + kp + kn)
ϕp = J / Jmax * ϕp0
ϕf = kf / (kf + kd + kn) * (1 - ϕp)
κ = kappa_p1 * Vcmax25 * FT(1000000.0) + kappa_p2 # formula expects Vcmax25 in μmol/m^2/s
κ = kappa_p1 * Vcmax25 * FT(1e6) + kappa_p2 # formula expects Vcmax25 in μmol/m^2/s
F = APAR * ϕf
SIF_755 = F / κ

Expand Down

0 comments on commit 07245f9

Please sign in to comment.