Skip to content

Commit aaca30e

Browse files
Update node running example
1 parent 85c0e16 commit aaca30e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

examples/run_nodes.jl

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,24 @@ here = @__DIR__
77
data_path = joinpath(here, "../test/data/campaspe/")
88

99
# Load and generate stream network
10-
network = YAML.load_file(joinpath(data_path, "campaspe_network.yml"))
11-
sn = create_network("Example Network", network)
10+
sn = load_network("Example Network", joinpath(data_path, "campaspe_network.yml"))
1211

1312
# Load climate data
1413
date_format = "YYYY-mm-dd"
1514
climate_data = CSV.File(joinpath(data_path, "climate/climate_historic.csv"),
1615
comment="#",
1716
dateformat=date_format) |> DataFrame
1817

19-
dam_level_fn = joinpath(data_path, "dam/historic_levels_for_fit.csv")
20-
dam_releases_fn = joinpath(data_path, "dam/historic_releases.csv")
18+
dam_level_fn = joinpath(data_path, "gauges/406000_historic_levels_for_fit.csv")
19+
dam_releases_fn = joinpath(data_path, "gauges/406000_historic_outflow.csv")
2120
hist_dam_levels = CSV.File(dam_level_fn, dateformat=date_format) |> DataFrame
2221
hist_dam_releases = CSV.File(dam_releases_fn, dateformat=date_format) |> DataFrame
2322

24-
# Combine recorded extractions and releases together
25-
# hist_dam_releases[:, "406000_releases_[ML]"] .+ hist_dam_releases[:, "406000_extractions_[ML]"]
26-
hist_dam_releases[:, "406000_extractions_[ML]"] = hist_dam_releases[:, "406000_releases_[ML]"]
23+
rename!(hist_dam_releases, ["406000_outflow_[ML]" => "406000_releases_[ML]"])
2724

2825
# Subset to same range
29-
climate_data, hist_dam_levels, hist_dam_releases = Streamfall.align_time_frame(climate_data,
30-
hist_dam_levels,
26+
climate_data, hist_dam_levels, hist_dam_releases = Streamfall.align_time_frame(climate_data,
27+
hist_dam_levels,
3128
hist_dam_releases)
3229

3330
climate = Climate(climate_data, "_rain", "_evap")

0 commit comments

Comments
 (0)