Skip to content

Commit

Permalink
move params broadcastable into src
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Sep 27, 2024
1 parent f936f74 commit fd31f3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion ext/CreateParametersExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function LP.LandParameters(toml_dict::CP.AbstractTOMLDict)
insol_params,
)
end
Base.broadcastable(ps::LP.LandParameters) = tuple(ps)

"""
AutotrophicRespirationParameters(FT; kwargs...)
Expand Down
1 change: 1 addition & 0 deletions src/shared_utilities/Parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Base.@kwdef struct LandParameters{FT, TP, SFP, IP} <: ALP
end

Base.eltype(::LandParameters{FT}) where {FT} = FT
Base.broadcastable(ps::LandParameters) = tuple(ps)

# wrapper methods:
P_ref(ps::ALP) = ps.MSLP
Expand Down
6 changes: 3 additions & 3 deletions src/standalone/Vegetation/radiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct ConstantGFunction{FT} <: AbstractGFunction{FT}
end

# Make the ConstantGFunction broadcastable
Base.broadcastable(G::ConstantGFunction) = Ref(G)
Base.broadcastable(G::ConstantGFunction) = tuple(G)

"""
CLMGFunction
Expand All @@ -38,7 +38,7 @@ struct CLMGFunction{FT} <: AbstractGFunction{FT}
end

# Make the CLMGFunction broadcastable
Base.broadcastable(G::CLMGFunction) = Ref(G)
Base.broadcastable(G::CLMGFunction) = tuple(G)

"""
BeerLambertParameters{FT <: AbstractFloat}
Expand Down Expand Up @@ -106,7 +106,7 @@ Base.@kwdef struct TwoStreamParameters{
"Typical wavelength per NIR photon (m)"
λ_γ_NIR::FT
"Number of layers to partition the canopy into when integrating the
absorption over the canopy vertically. Unrelated to the number of layers in
absorption over the canopy vertically. Unrelated to the number of layers in
the vertical discretization of the canopy for the plant hydraulics model.
(Constant, and should eventually move to ClimaParams)"
n_layers::UInt64
Expand Down

0 comments on commit fd31f3b

Please sign in to comment.