diff --git a/src/ClimaLSM.jl b/src/ClimaLSM.jl index 3647978490..d7c9725e66 100644 --- a/src/ClimaLSM.jl +++ b/src/ClimaLSM.jl @@ -15,7 +15,7 @@ import .Parameters as LSMP include("shared_utilities/Regridder.jl") include("shared_utilities/Domains.jl") using .Domains -include("shared_utilities/ntuple_utils.jl") +include("shared_utilities/indexing_utils.jl") include("shared_utilities/models.jl") include("shared_utilities/drivers.jl") include("shared_utilities/utils.jl") diff --git a/src/standalone/Vegetation/Canopy.jl b/src/standalone/Vegetation/Canopy.jl index a86584f72b..102b304644 100644 --- a/src/standalone/Vegetation/Canopy.jl +++ b/src/standalone/Vegetation/Canopy.jl @@ -27,7 +27,7 @@ import ClimaLSM: using ClimaLSM.Domains: Point, Plane, SphericalSurface export SharedCanopyParameters, - CanopyModel, set_canopy_parameter_field!, update_canopy_parameter_field! + CanopyModel, set_canopy_prescribed_field!, update_canopy_prescribed_field! include("./component_models.jl") include("./PlantHydraulics.jl") using .PlantHydraulics @@ -309,7 +309,7 @@ function ClimaLSM.make_set_initial_aux_state(model::CanopyModel) update_aux! = make_update_aux(model) # eventually extend to other components when needed function set_initial_aux_state!(p, Y0, t0) - set_canopy_parameter_field!(model.hydraulics, p, t0) + set_canopy_prescribed_field!(model.hydraulics, p, t0) update_aux!(p, Y0, t0) end return set_initial_aux_state! @@ -347,7 +347,7 @@ function ClimaLSM.make_update_aux( ) where {FT} function update_aux!(p, Y, t) #Extend to other fields when necessary - update_canopy_parameter_field!(canopy.hydraulics, p, t) + update_canopy_prescribed_field!(canopy.hydraulics, p, t) # other auxiliary variables being updated APAR = p.canopy.radiative_transfer.apar @@ -403,7 +403,7 @@ function ClimaLSM.make_update_aux( hydraulics = canopy.hydraulics n_stem = hydraulics.n_stem n_leaf = hydraulics.n_leaf - #PlantHydraulics.lai_consistency_check.(n_stem, n_leaf, area_index) + PlantHydraulics.lai_consistency_check.(n_stem, n_leaf, area_index) (; retention_model, conductivity_model, S_s, ν) = hydraulics.parameters @inbounds @. ψ[1] = PlantHydraulics.water_retention_curve( retention_model, diff --git a/src/standalone/Vegetation/PlantHydraulics.jl b/src/standalone/Vegetation/PlantHydraulics.jl index e1321223c4..35190f3a8d 100644 --- a/src/standalone/Vegetation/PlantHydraulics.jl +++ b/src/standalone/Vegetation/PlantHydraulics.jl @@ -2,8 +2,8 @@ module PlantHydraulics using ClimaLSM using ..ClimaLSM.Canopy: AbstractCanopyComponent, - update_canopy_parameter_field!, - set_canopy_parameter_field! + update_canopy_prescribed_field!, + set_canopy_prescribed_field! using ClimaCore using DocStringExtensions @@ -297,13 +297,13 @@ ClimaLSM.auxiliary_types(model::PlantHydraulicsModel{FT}) where {FT} = ( """ - set_canopy_parameter_field!(component::PlantHydraulics{FT}, - p, - t0, - ) where {FT} + set_canopy_prescribed_field!(component::PlantHydraulics{FT}, + p, + t0, + ) where {FT} """ -function ClimaLSM.Canopy.set_canopy_parameter_field!( +function ClimaLSM.Canopy.set_canopy_prescribed_field!( component::PlantHydraulicsModel{FT}, p, t0, @@ -316,13 +316,13 @@ end """ - update_canopy_parameter_field!(component::PlantHydraulics{FT}, - p, - t, - ) where {FT} + update_canopy_prescribed_field!(component::PlantHydraulics{FT}, + p, + t, + ) where {FT} """ -function ClimaLSM.Canopy.update_canopy_parameter_field!( +function ClimaLSM.Canopy.update_canopy_prescribed_field!( component::PlantHydraulicsModel{FT}, p, t, diff --git a/src/standalone/Vegetation/component_models.jl b/src/standalone/Vegetation/component_models.jl index 47495d0d5d..cf32556f62 100644 --- a/src/standalone/Vegetation/component_models.jl +++ b/src/standalone/Vegetation/component_models.jl @@ -114,36 +114,36 @@ end """ - set_canopy_parameter_field!(component::AbstractCanopyComponent, - p, - t0, - ) end + set_canopy_prescribed_field!(component::AbstractCanopyComponent, + p, + t0, + ) end -Sets the spatially and temporally varying parameter fields of the `component` +Sets the spatially and temporally varying prescribed fields of the `component` with their initial values. These fields are stored in the aux-state and should not depend on the prognostic state `Y` or other diagnostic variables stored in `p`, as there is no guarantee on the order of operations in terms of when diagnostic auxiliary -variables are updated vs. parameter field auxiliary variables. +variables are updated vs. prescribed field auxiliary variables. """ -function set_canopy_parameter_field!(component::AbstractCanopyComponent, p, t0) end +function set_canopy_prescribed_field!(component::AbstractCanopyComponent, p, t0) end """ - update_canopy_parameter_field!(component::AbstractCanopyComponent, - p, - t, - ) end - -Updates the spatially and temporally varying parameter fields of the `component` + update_canopy_prescribed_field!(component::AbstractCanopyComponent, + p, + t, + ) end + +Updates the spatially and temporally varying prescribed fields of the `component` with their values at time `t`. These fields are stored in the aux-state and should not depend on the prognostic state `Y` or other diagnostic variables stored in `p`, as there is no guarantee on the order of operations in terms of when diagnostic auxiliary -variables are updated vs. parameter field auxiliary variables. +variables are updated vs. prescribed field auxiliary variables. """ -function update_canopy_parameter_field!( +function update_canopy_prescribed_field!( component::AbstractCanopyComponent, p, t,