Skip to content

Commit 1360fdc

Browse files
Updates to comments/docstrings/documentation
1 parent 37d747e commit 1360fdc

File tree

5 files changed

+38
-8
lines changed

5 files changed

+38
-8
lines changed

docs/src/EnsembleNode.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# GR4J
2+
3+
```@autodocs
4+
Modules = [Streamfall]
5+
Order = [:function, :type]
6+
Pages = ["EnsembleNode.jl"]
7+
```

docs/src/SYMHYD.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SYMHYD
2+
3+
```@autodocs
4+
Modules = [Streamfall]
5+
Order = [:function, :type]
6+
Pages = ["SYMHYDNode.jl"]
7+
```

src/IHACRESNode.jl

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Base.@kwdef mutable struct BilinearNode{P, A<:Real} <: IHACRESNode
3535
Param(150.0, bounds=(50.0, 200.0)) # ctf
3636
]
3737

38-
storage::Array{A} = [100.0]
38+
storage::Array{A} = [100.0] # CMD
3939
quick_store::Array{A} = [0.0]
4040
slow_store::Array{A} = [0.0]
4141
outflow::Array{A} = []
@@ -541,6 +541,14 @@ function update_params!(node::BilinearNode, d::Float64, d2::Float64, e::Float64,
541541
node.b = Param(b, bounds=node.b.bounds::Tuple)
542542
node.storage_coef = Param(s_coef, bounds=node.storage_coef.bounds::Tuple)
543543
node.alpha = Param(alpha, bounds=node.alpha.bounds::Tuple)
544+
# node.d = d
545+
# node.d2 = d2
546+
# node.e = e
547+
# node.f = f
548+
# node.a = a
549+
# node.b = b
550+
# node.storage_coef = s_coef
551+
# node.alpha = alpha
544552

545553
return nothing
546554
end
@@ -565,6 +573,14 @@ function update_params!(node::BilinearNode, d::Float64, d2::Float64, e::Float64,
565573
node.b = Param(b, bounds=node.b.bounds::Tuple)
566574
node.storage_coef = Param(s_coef, bounds=node.storage_coef.bounds::Tuple)
567575
node.alpha = Param(alpha, bounds=node.alpha.bounds::Tuple)
576+
# node.d = d
577+
# node.d2 = d2
578+
# node.e = e
579+
# node.f = f
580+
# node.a = a
581+
# node.b = b
582+
# node.storage_coef = s_coef
583+
# node.alpha = alpha
568584

569585
n_lparams = node.level_params
570586
node.level_params = [

src/Node.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Base.@kwdef mutable struct GenericNode <: NetworkNode
1717
end
1818

1919

20-
"""Create an arbitrary node."""
20+
"""Create node of a given type."""
2121
function create_node(node::Type{<:NetworkNode}, name::String, area::Float64)
2222
return node{Param, Float64}(; name=name, area=area)
2323
end

src/plotting.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ end
110110

111111

112112
"""
113-
temporal_cross_section(dates, obs; ylabel=nothing, period::Function=month)
113+
temporal_cross_section(dates, obs; ylabel=nothing, period::Function=monthday)
114114
115115
Provides indication of temporal variation and uncertainty across time, grouped by `period`.
116116
@@ -125,7 +125,7 @@ Filters out leap days.
125125
- `period::Function` : Method from `Dates` package to group (defaults to `monthday`)
126126
"""
127127
function temporal_cross_section(dates, obs;
128-
title="", ylabel="Median Error", label=nothing,
128+
title="", ylabel="ME", label=nothing,
129129
period::Function=monthday,
130130
kwargs...) # show_extremes::Bool=false,
131131
if isnothing(label)
@@ -153,6 +153,8 @@ function temporal_cross_section(dates, obs;
153153
else
154154
target = xsect_res.cross_section
155155
end
156+
else
157+
target = xsect_res.cross_section
156158
end
157159

158160
x_section = target.median
@@ -171,10 +173,8 @@ function temporal_cross_section(dates, obs;
171173
delete!(kwargs, :yaxis)
172174
end
173175

174-
xsect_df = xsect_res.cross_section
175-
176176
# Display indicator values using original data instead of log-transformed data
177-
med = xsect_df.median
177+
med = xsect_res.cross_section.median
178178
m_ind = round(mean(med), digits=2)
179179
sd_ind = round(std(med), digits=2)
180180

@@ -186,7 +186,7 @@ function temporal_cross_section(dates, obs;
186186
fig = plot(xlabels, lower_95, fillrange=upper_95, color="lightblue", alpha=0.3, label="CI₉₅ μ: $(wr95_m_ind), σ: $(wr95_sd_ind)", linealpha=0)
187187
plot!(fig, xlabels, lower_75, fillrange=upper_75, color="lightblue", alpha=0.5, label="CI₇₅ μ: $(wr75_m_ind), σ: $(wr75_sd_ind)", linealpha=0)
188188
plot!(fig, xlabels, x_section,
189-
label="$(label) μ: $(m_ind), σ: $(sd_ind)",
189+
label="Median of $(label) μ: $(m_ind), σ: $(sd_ind)",
190190
color="black",
191191
xlabel=nameof(period),
192192
ylabel=ylabel,

0 commit comments

Comments
 (0)