Skip to content

Commit

Permalink
more stubs for hillslope-channel models
Browse files Browse the repository at this point in the history
  • Loading branch information
odunbar committed Nov 1, 2024
1 parent c00fb82 commit 4476743
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/MizurouteV1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ function MizurouteHillslope{FT}() where {FT <: AbstractFloat}
return MizurouteHillslope(shape,timescale)
end

function update_state_from_hillslope!(river_state, hillslope_model, environment)
end

struct MizurouteChannelV1{FT <: AbstractFloat} <: AbstractChannelModel
"Wave velocity, C [m/day]"
Expand All @@ -26,3 +28,9 @@ function MizurouteChannel{FT}() where {FT <: AbstractFloat}
return MizurouteHillslope(wave_velocity, diffusivity)
end


function update_state_from_channel!(river_state, hillslope_model, environment)
end



17 changes: 16 additions & 1 deletion src/RiverModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,26 @@ abstract type AbstractRiverModel end
abstract type AbstractHillslopeModel end
abstract type AbstractChannelModel end

struct HillslopeChannelRiverModel{HS <: AbstractHillslopeModel, CH <: AbstractChannelModel} <: RiverModel
struct HillslopeChannelModel{HS <: AbstractHillslopeModel, CH <: AbstractChannelModel} <: RiverModel
hillslope_model::HS
channel_model::CH
end


function calculate_streamflow!(
river_state::RS,
river_model::HCM,
environment::E,
) where {
RS <:RiverState,
HCM <: HillslopeChannelModel,
E <: Environment,
}

update_state_from_hillslope!(river_state, river_model.hillslope_model, environment)
update_state_from_channel!(river_state, river_model.channel_model, environment)
return calculate_streamflow(river_state)
end
# Specific hillslope-channel models loaded here:
include("MizurouteV1.jl")

Expand Down

0 comments on commit 4476743

Please sign in to comment.