You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/primer.md
+48-42Lines changed: 48 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,24 @@
1
1
# Primer
2
2
3
-
Streamfall is a stream network modelling framework with integrated systems analysis and modelling in mind. The aim is to simplify the construction of basin-scale hydrology models, itself a constituent of a larger system of systems. The overarching concepts are explained here.
3
+
Streamfall is a stream network modelling framework with integrated systems analysis and
4
+
modelling in mind. The aim is to simplify the construction of basin-scale hydrology models,
5
+
itself a constituent of a larger system of systems. The overarching concepts are explained
6
+
here.
7
+
8
+
The motivation for Streamfall is to enable flexible modelling of a hydrological system.\
9
+
This includes:
10
+
11
+
- Representation of catchments with heterogenous combinations of rainfall-runoff models \
12
+
(each sub-catchment may be represented by a different hydrological model)
13
+
- Support interaction with other models which may represent groundwater interactions or \
14
+
anthropogenic activity (e.g., water extractions)
15
+
- High performance relative to available implementations in R and Python
4
16
5
17
Primary components of the Streamfall framework include:
6
18
7
-
1. The graph network defining the stream and the model associated with each node in the network
8
-
2. Data for the basin, including climate data and hydrologic interactions driven by other systems
19
+
1. The graph representing a network of gauges and the associated model
20
+
2. Data for the basin, including climate data and hydrologic interactions \
21
+
driven by other systems
9
22
3. The functions which run the network as a whole and individual nodes
10
23
11
24
## Defining a network
@@ -22,12 +35,15 @@ The spec takes the following form:
22
35
# The node type which defines which model is used for this node
23
36
# In this case, it is the IHACRES with the bilinear formulation of the CMD module
24
37
node_type: IHACRESBilinearNode
38
+
area: 130.0# subcatchment area in km^2 (from BoM)
25
39
26
40
# This spec defines a single node system
27
41
# so it has no nodes upstream (inlets) or downstream (outlets)
28
42
inlets:
29
43
outlets:
30
-
area: 130.0# subcatchment area in km^2 (from BoM)
44
+
45
+
# Initial CMD state, CMD > 0 means there is a deficit
46
+
initial_storage: 0.0
31
47
32
48
# Model parameters (in this case, for IHACRES)
33
49
parameters:
@@ -39,17 +55,13 @@ The spec takes the following form:
39
55
b: 0.1# slowflow scaling factor
40
56
storage_coef: 2.9# groundwater interaction factor
41
57
alpha: 0.95# effective rainfall scaling factor
42
-
initial_storage: 0.0# initial CMD value, CMD > 0 means there is a deficit
43
58
```
44
59
45
-
The spec is then loaded in Julia and passed into `create_network()`
60
+
The spec is then loaded with `load_network()`
46
61
47
62
```julia
48
-
# Load file
49
-
network = YAML.load_file("network.yml")
50
-
51
-
# Create network from spec, with a human-readable name.
52
-
sn = create_network("Gingera Catchment", network)
63
+
# Load network from a spec file, with a human-readable name.
64
+
sn = load_network("Gingera Catchment", "network.yml")
53
65
```
54
66
55
67
Printing the network displays a summary of the nodes:
0 commit comments