diff --git a/src/standalone/Vegetation/photosynthesis.jl b/src/standalone/Vegetation/photosynthesis.jl index a1b805d18c..231cb10a53 100644 --- a/src/standalone/Vegetation/photosynthesis.jl +++ b/src/standalone/Vegetation/photosynthesis.jl @@ -3,12 +3,12 @@ export FarquharParameters, FarquharModel, C3, C4 abstract type AbstractPhotosynthesisModel{FT} <: AbstractCanopyComponent{FT} end """ - SIFModel{FT<:AbstractFloat} + SIFParameters{FT<:AbstractFloat} -The required parameters for the SIF model [give citation]. +The required parameters for the SIF parameterisation [give citation]. $(DocStringExtensions.FIELDS) """ -@kwdef struct SIFModel{ +@kwdef struct SIFParameters{ FT <: AbstractFloat, } "" @@ -48,7 +48,7 @@ struct C4 <: AbstractPhotosynthesisMechanism end abstract type AbstractPhotosynthesisModel{FT} <: AbstractCanopyComponent{FT} end """ - FarquharParameters{FT<:AbstractFloat, MECH <: AbstractPhotosynthesisMechanism} + FarquharParameters{FT<:AbstractFloat, MECH <: AbstractPhotosynthesisMechanism, SP <: SIFParameters} The required parameters for the Farquhar photosynthesis model. $(DocStringExtensions.FIELDS) @@ -56,7 +56,7 @@ $(DocStringExtensions.FIELDS) Base.@kwdef struct FarquharParameters{ FT <: AbstractFloat, MECH <: AbstractPhotosynthesisMechanism, - SM <: AbstractSIFModel, + SP <: SIFParameters, } "Vcmax at 25 °C (mol CO2/m^2/s)" Vcmax25::FT @@ -95,7 +95,7 @@ Base.@kwdef struct FarquharParameters{ "Photosynthesis mechanism: C3 or C4" mechanism::MECH "" - sif_model::SM + sif_parameters::SP end Base.eltype(::FarquharParameters{FT}) where {FT} = FT @@ -106,9 +106,9 @@ struct FarquharModel{FT, FP <: FarquharParameters{FT}} <: end function FarquharModel{FT}( - parameters::FarquharParameters{FT}; sif_model = SIFModel{FT}() + parameters::FarquharParameters{FT}; sif_parameters = SIFParameters{FT}() ) where {FT <: AbstractFloat} - return FarquharModel{eltype(parameters), typeof(parameters), typeof(sif_model)}(parameters, sif_model) + return FarquharModel{eltype(parameters), typeof(parameters), typeof(sif_parameters)}(parameters, sif_parameters) end ClimaLand.name(model::AbstractPhotosynthesisModel) = :photosynthesis @@ -203,11 +203,11 @@ function update_photosynthesis!( model.parameters, ) Vcmax25field .= Vcmax25 - @. SIF = compute_SIF_at_a_point(APAR, T, Vcmax25, R, model.parameters, model.sifmodel) + @. SIF = compute_SIF_at_a_point(APAR, T, Vcmax25, R, model.parameters, model.sif_parameters) end Base.broadcastable(m::AbstractPhotosynthesisMechanism) = tuple(m) Base.broadcastable(m::FarquharParameters) = tuple(m) -Base.broadcastable(m::SIFModel) = tuple(m) +Base.broadcastable(m::SIFParameters) = tuple(m) include("./optimality_farquhar.jl")