Adding reservoir bathymetry (Area)

Background

The Area that a Reservoir or Storage node covers depends on how full the reservoir is.

The Area Rating Curve determines gives the Area of a reservoir as a function of its Level or Storage. In WaterStrategy and Pywr, the time step storage of a reservoir is known at each time step. We can use this storage with an Area rating cure to calculate the reservoir area and therefore its evaporation at each time-step.

Below is an example Area rating table:

When plotted it looks like this:

Pywr Parameters are functions that return a value in the model at each time-step. These values can be a constant, based on time (e.g. on the day or month), a calculation based on the time step reservoir storage and many other calculations. In this case, we are interested in a parameter that returns the Area of a reservoir or storage node as a function of its time-step storage. To do this we use an Interpolated Volume Parameter.

The interpolated volume parameter uses an array (table) of Reservoir Volumes and corresponding values. In this case the associated values are the corresponding Reservoir Area for a given Volume. In between the given points in the table, the parameter interpolates.

Please note: Parameters can be defined directly on a node or they can be defined in the Parameters tab in the interface. Parameters that are defined in the Parameters tab in the interface can be used on multiple nodes and nested within different parameters.

This tutorial includes both types of definitions. The area will be defined on the node, while the level parameter (next step) will be defined in the Parameters tab.

Tutorial

  1. Clone the 'Demand with treatment losses' scenario and call the new one 'Adding reservoir P and E'. The P stands for Precipitation and E stands for Evaporation.

  2. Click on the Reservoir and edit the Area attribute.

  1. The Interpolated Volume Parameter does not currently have a JSON editor in WaterStrategy. In order to define this parameter on this attribute, we need to use the generic PYWR_PARAMETER. This allows us to put in the JSON for any Pywr parameter.

Press OK

4. Copy and Paste the JSON code below into the text in the JSON tab

{
	"type": "InterpolatedVolumeParameter",
	"node": "Example reservoir",
	"volumes": [
		0,
		7,
		10,
		15,
		25
	],
	"values": [
		1,
		2,
		4,
		6,
		14
	],
	"interp_kwargs": {
		"kind": "linear"
	},
	"comment": "volumes: Mm3, values:  Km2"
}
  1. You can select to record the parameter value as a time series by selecting Timeseries in the Outputs tab. Then, save it.

  1. Run the model and view the Simulated_Area output

This shows the Area of the reservoir over time.

Smaller areas correspond with lower reservoir storage volumes.

Last updated