> For the complete documentation index, see [llms.txt](https://water-strategy.gitbook.io/waterstrategy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://water-strategy.gitbook.io/waterstrategy/tutorials/creating-a-reservoir-system/adding-reservoir-details/adding-reservoir-bathymetry-level.md).

# Adding reservoir bathymetry (Level)

The water **Level** of a reservoir can be calculatedi n the same way as for a reservoir. A reservoir's water level is required to be able to calculate hydropower. While the Botswana National Model doesn't include hydropower, for completeness it is included in this tutorial.

*Please note: Unlike the Area parameter that was defined on the Resevoir node. We will define the Level parameter in the Parameters tab of the Interface. This is to demonstrate the Parameters tab, the Level could be defined also on the node.*

Below is an example area Level vs Volume rating table for:

| Volume (Mm3) | Level (m) |
| ------------ | --------- |
| 0            | 1         |
| 7            | 8         |
| 10           | 16        |
| 15           | 18        |
| 25           | 20        |

When plotted it looks like this:

<figure><img src="/files/Mj8l3zW1azghDvt9No6m" alt=""><figcaption><p>Relationship between the water level and the reservoir volume</p></figcaption></figure>

1. Click on the **Parameters** tab on the interface.

<figure><img src="/files/BsyPpui1ASfZzllaDXKS" alt=""><figcaption><p>Click on the Parameters tab</p></figcaption></figure>

2. Click on the **+** to add a new parameter. Select **PYWR\_PARAMETER**

<figure><img src="/files/2iTos91gv9S87gCEy0UB" alt=""><figcaption><p>Select PYWR_PARAMETER</p></figcaption></figure>

3. In the text field that appears write **'Dam level'**

<figure><img src="/files/pCcvWLLKdPfdlLpZ2UVa" alt="" width="375"><figcaption><p>Name the parameter</p></figcaption></figure>

4. Copy and **Paste** the Json below into the editor and click **Save**.

```
{
	"type": "InterpolatedVolumeParameter",
	"node": "Example reservoir",
	"volumes": [
		0,
		7,
		10,
		15,
		25
	],
	"values": [
		1,
		8,
		16,
		18,
		20
	],
	"interp_kwargs": {
		"kind": "linear"
	},
	"comment": "volumes: Mm3, values: m"
}
```

<figure><img src="/files/VojyN2umgU3XhsaEhwxP" alt=""><figcaption><p>Paste the code and save</p></figcaption></figure>

5. Click on **Timeseries** in the **Outputs** tab to enable the saving of the Level timeseries.

<figure><img src="/files/tehB4koQzecoPALZ77nP" alt=""><figcaption><p>Enable the saving of the Level timeseries</p></figcaption></figure>

6. Click on **Map** to return to the map view

<figure><img src="/files/vmtv5aHxWt4Z1dRDWbP6" alt=""><figcaption><p>Return to the map view</p></figcaption></figure>

\
7\. The Dam level parameter needs to be referenced on the Level attribute on the reservoir, to do this, click on the Reservoir an write the name of the parameter in the Level attribute (**Dam level).** Please note that the name is case sensitive.

<figure><img src="/files/bXyEGKjA3AmAp4esTnGS" alt=""><figcaption><p>Enter the parameter's name</p></figcaption></figure>

8. Run the model.
9. You will see that because the **Dam level** parameter is not defined on the node, the **simulated\_level** is not output on the reservoir node. Instead to view the output, click on the **Network Attributes** button.

<figure><img src="/files/iRp9N0QZSU2fd9swjsz0" alt="" width="288"><figcaption><p>Click on the Network Attributes button</p></figcaption></figure>

10. Click on the **simulated\_Dam level.** Note that the Reservoir node name is in the name of the output of the Parameter.

<figure><img src="/files/kJEzWMgCQdU3V9s1LyCT" alt="" width="348"><figcaption><p>View the Dam level</p></figcaption></figure>

**The Level time series can be seen below.**

<figure><img src="/files/iuA3FZckG7DFxTjWGNSL" alt=""><figcaption><p>Level time series</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://water-strategy.gitbook.io/waterstrategy/tutorials/creating-a-reservoir-system/adding-reservoir-details/adding-reservoir-bathymetry-level.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
