diff --git a/src/erosion/overland_flow_erosion.jl b/src/erosion/overland_flow_erosion.jl index b12805308..494dc2ff2 100644 --- a/src/erosion/overland_flow_erosion.jl +++ b/src/erosion/overland_flow_erosion.jl @@ -3,7 +3,7 @@ abstract type AbstractOverlandFlowErosionModel{T} end struct NoOverlandFlowErosionModel{T} <: AbstractOverlandFlowErosionModel{T} end ## Overland flow structs and functions -@get_units @with_kw struct OverlandFlowErosionVariables{T} +@get_units @grid_loc @with_kw struct OverlandFlowErosionVariables{T} # Total soil erosion from overland flow amount::Vector{T} | "t dt-1" end @@ -12,7 +12,7 @@ function OverlandFlowErosionVariables(n; amount::Vector{T} = fill(mv, n)) where return OverlandFlowErosionVariables{T}(; amount = amount) end -@get_units @with_kw struct OverlandFlowErosionBC{T} +@get_units @grid_loc @with_kw struct OverlandFlowErosionBC{T} # Overland flow [m3 s-1] q::Vector{T} end @@ -22,7 +22,7 @@ function OverlandFlowErosionBC(n; q::Vector{T} = fill(mv, n)) where {T} end # ANSWERS specific structs and functions for rainfall erosion -@get_units @with_kw struct OverlandFlowErosionAnswersParameters{T} +@get_units @grid_loc @with_kw struct OverlandFlowErosionAnswersParameters{T} # Soil erodibility factor usle_k::Vector{T} | "-" # Crop management factor diff --git a/src/erosion/rainfall_erosion.jl b/src/erosion/rainfall_erosion.jl index 32c0de725..5e70a5aaa 100644 --- a/src/erosion/rainfall_erosion.jl +++ b/src/erosion/rainfall_erosion.jl @@ -3,7 +3,7 @@ abstract type AbstractRainfallErosionModel{T} end struct NoRainfallErosionModel{T} <: AbstractRainfallErosionModel{T} end ## General rainfall erosion functions and structs -@get_units @with_kw struct RainfallErosionModelVariables{T} +@get_units @grid_loc @with_kw struct RainfallErosionModelVariables{T} # Total soil erosion from rainfall (splash) amount::Vector{T} | "t dt-1" end @@ -13,7 +13,7 @@ function RainfallErosionModelVariables(n; amount::Vector{T} = fill(mv, n)) where end ## EUROSEM specific structs and functions for rainfall erosion -@get_units @with_kw struct RainfallErosionEurosemBC{T} +@get_units @grid_loc @with_kw struct RainfallErosionEurosemBC{T} # precipitation precipitation::Vector{T} | "mm dt-1" # Interception @@ -35,7 +35,7 @@ function RainfallErosionEurosemBC( ) end -@get_units @with_kw struct RainfallErosionEurosemParameters{T} +@get_units @grid_loc @with_kw struct RainfallErosionEurosemParameters{T} # Soil detachability factor soil_detachability::Vector{T} | "g J-1" # Exponent EUROSEM @@ -156,7 +156,7 @@ function update!(model::RainfallErosionEurosemModel, geometry::LandGeometry, ts) end ### ANSWERS specific structs and functions for rainfall erosion -@get_units @with_kw struct RainfallErosionAnswersBC{T} +@get_units @grid_loc @with_kw struct RainfallErosionAnswersBC{T} # precipitation precipitation::Vector{T} | "mm dt-1" end @@ -165,7 +165,7 @@ function RainfallErosionAnswersBC(n; precipitation::Vector{T} = fill(mv, n)) whe return RainfallErosionAnswersBC{T}(; precipitation = precipitation) end -@get_units @with_kw struct RainfallErosionAnswersParameters{T} +@get_units @grid_loc @with_kw struct RainfallErosionAnswersParameters{T} # Soil erodibility factor usle_k::Vector{T} | "-" # Crop management factor diff --git a/src/erosion/river_erosion.jl b/src/erosion/river_erosion.jl index 2e2bfc586..b6f99ffcf 100644 --- a/src/erosion/river_erosion.jl +++ b/src/erosion/river_erosion.jl @@ -1,7 +1,7 @@ abstract type AbstractRiverErosionModel{T} end ## Potential direct river erosion structs and functions -@get_units @with_kw struct RiverErosionModelVariables{T} +@get_units @grid_loc @with_kw struct RiverErosionModelVariables{T} # Potential river bed erosion bed::Vector{T} | "t dt-1" # Potential river bank erosion @@ -16,7 +16,7 @@ function RiverErosionModelVariables( return RiverErosionModelVariables{T}(; bed = bed, bank = bank) end -@get_units @with_kw struct RiverErosionBC{T} +@get_units @grid_loc @with_kw struct RiverErosionBC{T} # Waterlevel waterlevel::Vector{T} | "t dt-1" end @@ -26,7 +26,7 @@ function RiverErosionBC(n; waterlevel::Vector{T} = fill(mv, n)) where {T} end # Parameters for the Julian Torres river erosion model -@get_units @with_kw struct RiverErosionParameters{T} +@get_units @grid_loc @with_kw struct RiverErosionParameters{T} # Mean diameter in the river bed/bank d50::Vector{T} | "mm" end diff --git a/src/erosion/soil_erosion.jl b/src/erosion/soil_erosion.jl index 66814d41c..7692c1f4d 100644 --- a/src/erosion/soil_erosion.jl +++ b/src/erosion/soil_erosion.jl @@ -1,7 +1,7 @@ abstract type AbstractSoilErosionModel{T} end ## Total soil erosion and differentiation structs and functions -@get_units @with_kw struct SoilErosionModelVariables{T} +@get_units @grid_loc @with_kw struct SoilErosionModelVariables{T} # Total soil erosion amount::Vector{T} | "t dt-1" # Total clay erosion @@ -35,7 +35,7 @@ function SoilErosionModelVariables( ) end -@get_units @with_kw struct SoilErosionBC{T} +@get_units @grid_loc @with_kw struct SoilErosionBC{T} # Rainfall erosion rainfall_erosion::Vector{T} | "t dt-1" # Overland flow erosion @@ -54,7 +54,7 @@ function SoilErosionBC( end # Parameters for particle differentiation -@get_units @with_kw struct SoilErosionParameters{T} +@get_units @grid_loc @with_kw struct SoilErosionParameters{T} # Soil content clay clay_fraction::Vector{T} | "-" # Soil content silt