Skip to content

Commit 0b666de

Browse files
Complete rename to IHACRESBilinearNode
1 parent a6665a8 commit 0b666de

File tree

5 files changed

+15
-28
lines changed

5 files changed

+15
-28
lines changed

docs/src/primer.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The spec takes the following form:
3030
area: 130.0 # subcatchment area in km^2 (from BoM)
3131

3232
# Model parameters (in this case, for IHACRES)
33-
parameters:
33+
parameters:
3434
d: 200.0 # millimeters
3535
d2: 2.0 # multiplier applied to `d`
3636
e: 1.0 # ET scaling factor, dimensionless
@@ -40,19 +40,6 @@ The spec takes the following form:
4040
storage_coef: 2.9 # groundwater interaction factor
4141
alpha: 0.95 # effective rainfall scaling factor
4242
initial_storage: 0.0 # initial CMD value, CMD > 0 means there is a deficit
43-
44-
# additional node-specific parameters
45-
# (unused in this example so can be ignored)
46-
level_params:
47-
- -3.3502 # p1
48-
- 0.68340 # p2
49-
- 4.50 # p3
50-
- 5.0 # p4
51-
- 0.35 # p5
52-
- 1.41 # p6
53-
- -1.45 # p7
54-
- 6.75 # p8
55-
- 167.845 # CTF
5643
```
5744
5845
The spec is then loaded in Julia and passed into `create_network()`
@@ -100,11 +87,11 @@ Individual nodes can also be created programmatically:
10087

10188
```julia
10289
# Programmatically create a node (from a spec)
103-
new_node = BilinearNode("410730", network["410730"])
90+
new_node = IHACRESBilinearNode("410730", network["410730"])
10491
10592
# Creating the same node manually by specifying model parameters
10693
# Argument order: node_name, area, d, d2, e, f, a, b, storage_coef, alpha, initial cmd, initial quickflow, initial slowflow, initial gw_store
107-
new_node = BilinearNode("410730", 130.0, 95.578, 1.743, 1.047, 1.315, 99.134, 0.259, 2.9, 0.785, 100.0, 0.0, 0.0, 0.0)
94+
new_node = IHACRESBilinearNode("410730", 130.0, 95.578, 1.743, 1.047, 1.315, 99.134, 0.259, 2.9, 0.785, 100.0, 0.0, 0.0, 0.0)
10895
```
10996

11097
Of course, model parameters may not be known in advance.

src/Streamfall.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ include("plotting.jl")
237237

238238
# Nodes
239239
export NetworkNode, GenericNode, GenericDirectNode
240-
export IHACRES, IHACRESNode, BilinearNode, ExpuhNode, DamNode, Climate
240+
export IHACRES, IHACRESNode, IHACRESBilinearNode, ExpuhNode, DamNode, Climate
241241
export create_node, GR4JNode, HyModNode, SimpleHyModNode, SYMHYDNode
242242
export EnsembleNode, BaseEnsemble
243243
export run_step!, run_timestep!

test/data/campaspe/campaspe_network.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Not related to AWRA - previous created file.
22

33
406214:
4-
node_type: BilinearNode
4+
node_type: IHACRESBilinearNode
55
inlets:
66
outlets: 406201
77
area: 268.77 # subcatchment area in km^2
@@ -28,7 +28,7 @@
2828

2929

3030
406219:
31-
node_type: BilinearNode
31+
node_type: IHACRESBilinearNode
3232
inlets:
3333
outlets: 406000
3434
area: 1985.73
@@ -91,7 +91,7 @@
9191
initial_storage: 304398.6
9292

9393
406201:
94-
node_type: BilinearNode
94+
node_type: IHACRESBilinearNode
9595
inlets:
9696
- 406214
9797
- 406000
@@ -119,7 +119,7 @@
119119
- 133.718
120120

121121
406224:
122-
node_type: BilinearNode
122+
node_type: IHACRESBilinearNode
123123
inlets:
124124
outlets: 406218
125125
area: 220.71
@@ -145,7 +145,7 @@
145145
- 130.984
146146

147147
406218:
148-
node_type: BilinearNode
148+
node_type: IHACRESBilinearNode
149149
inlets:
150150
- 406201
151151
- 406224
@@ -173,7 +173,7 @@
173173
- 120.380
174174

175175
406202:
176-
node_type: BilinearNode
176+
node_type: IHACRESBilinearNode
177177
inlets: 406218
178178
outlets: 406265
179179
area: 62.78
@@ -199,7 +199,7 @@
199199
- 104.981
200200

201201
406265:
202-
node_type: BilinearNode
202+
node_type: IHACRESBilinearNode
203203
inlets: 406202
204204
outlets:
205205
area: 162.84

test/data/campaspe/two_node_network.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
406219:
2-
node_type: BilinearNode
2+
node_type: IHACRESBilinearNode
33
inlets:
44
outlets: 406000
55
area: 1985.73

test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ end
2626

2727

2828
@testset "Ensure no NaN outputs" begin
29-
test_node = BilinearNode(
29+
test_node = IHACRESBilinearNode(
3030
"Test", # name/id
3131
1985.73, # area
3232
200.0, # d
@@ -69,7 +69,7 @@ end
6969
target_node = get_prop(sn, 1, :node)
7070

7171
@test target_node.area == 1985.73
72-
@test target_node.level_params[1] == -3.3502
72+
# @test target_node.level_params[1] == -3.3502
7373
end
7474

7575

@@ -84,7 +84,7 @@ end
8484
d::Cdouble,
8585
d2::Cdouble,
8686
alpha::Cdouble)::Cvoid
87-
87+
8888
(mf, e_rainfall, recharge) = interim_results
8989

9090
@test !isnan(mf)

0 commit comments

Comments
 (0)