@@ -6,22 +6,6 @@ using Graphs, MetaGraphs, Distributed, DataFrames
66
77const MODPATH = @__DIR__
88
9- if Sys. iswindows()
10- libext = " .dll"
11- elseif Sys. islinux()
12- libext = " .so"
13- elseif Sys. isapple()
14- libext = " .dynlib"
15- else
16- throw(DomainError(" Unsupported platform" ))
17- end
18-
19- # Can't use string, DLL location has to be a const
20- # (which makes sense but still, many hours wasted!)
21- # https://github.com/JuliaLang/julia/issues/29602
22- const IHACRES = joinpath(MODPATH, " ../deps" , " usr" , " lib" , " ihacres$(libext) " )
23-
24-
259include(" Network.jl" )
2610include(" Nodes/Node.jl" )
2711include(" Climate.jl" )
@@ -37,9 +21,9 @@ include("Nodes/Ensembles/EnsembleNode.jl")
3721
3822
3923function timestep_value(ts:: Int , gauge_id:: String , col_partial:: String , dataset:: DataFrame ):: Float64
40- target_col = filter(x -> occursin(gauge_id, x)
41- & occursin(col_partial, x),
42- names(dataset)
24+ target_col = filter(
25+ x -> occursin(gauge_id, x) & occursin(col_partial, x),
26+ names(dataset)
4327 )
4428
4529 amount = 0.0
@@ -107,7 +91,7 @@ julia> climate, streamflow = align_time_frame(climate, streamflow)
10791"""
10892function align_time_frame(timeseries:: T... ) where {T<: DataFrame }
10993 min_date, max_date = find_common_timeframe(timeseries... )
110- modded = [t[min_date .<= t. Date .<= max_date, :] for t in timeseries]
94+ modded = [t[min_date.<= t. Date.<= max_date, :] for t in timeseries]
11195
11296 for t in modded
11397 ts_diff = diff(t. Date)
@@ -137,7 +121,7 @@ function run_basin!(
137121 _, outlets = find_inlets_and_outlets(sn)
138122 @inbounds for outlet_id in outlets
139123 run_node!(sn, outlet_id, climate;
140- inflow= inflow, extraction= extraction, exchange= exchange)
124+ inflow= inflow, extraction= extraction, exchange= exchange)
141125 end
142126end
143127
@@ -296,7 +280,7 @@ include("plotting.jl")
296280export NetworkNode, GenericNode, GenericDirectNode
297281export IHACRES, IHACRESNode, IHACRESBilinearNode, ExpuhNode, DamNode, Climate
298282export create_node, GR4JNode, HyModNode, SimpleHyModNode, SYMHYDNode
299- export EnsembleNode, WeightedEnsembleNode
283+ export EnsembleNode, WeightedEnsembleNode, GREnsembleNode
300284
301285# Network
302286export find_inlets_and_outlets, inlets, outlets
0 commit comments