> 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/modeling-basics/parameters/interpolation-parameters/interpolated-volume.md).

# Interpolated Volume

{% embed url="<https://www.youtube.com/watch?v=0X0-BHUScC4#t=4m40s>" %}
Video using the Interpolated Volume Parameter
{% endembed %}

## General Description

Generic interpolation parameter that returns a value based on a Reservoir or Storage nodes current (time step) volume. The

&#x20;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**.&#x20;

Interpolation is used to calculate values betwen points given in the interpolation array. [ API Reference](https://pywr.github.io/pywr-docs/master/api/generated/pywr.parameters.InterpolatedVolumeParameter.html#pywr.parameters.InterpolatedVolumeParameter)

## Attributes

<table><thead><tr><th width="167">Name</th><th width="392">Description</th><th>Required</th></tr></thead><tbody><tr><td>type</td><td>interpolatedvolume</td><td>Yes</td></tr><tr><td>node</td><td>Storage node to provide input volume values to interpolation calculation</td><td>Yes</td></tr><tr><td>volumes</td><td>x coordinates of the data points for interpolation</td><td>Yes</td></tr><tr><td>values</td><td>y coordinates of the data points for interpolation</td><td>Yes</td></tr><tr><td>interp_kwargs</td><td>Dictionary of keyword arguments to pass to <em>scipy.interpolate.interp1d</em> class and used for interpolation</td><td>Optional</td></tr></tbody></table>

## Example

The following Json shows an example Area vs Volume rating cure for a reservoir. This could be used to define the Area attribute of a Storage or Reservoir node.

```json
{
  "type": "InterpolatedVolumeParameter",
  "node": "Reservoir or Storage node name",
	"volumes": [
		0,
		7,
		10,
		15,
		25
	],
	"values": [
		1,
		2,
		4,
		6,
		14
	],

	"interp_kwargs": {
		"kind": "linear"
	},
  "comment": "volumes: Mm3, values:  Km2"
}
```

The Json represents the table below:

<table><thead><tr><th width="166">Volume (Mm3)</th><th width="182">Area (Km2)</th></tr></thead><tbody><tr><td>0</td><td>1</td></tr><tr><td>7</td><td>2</td></tr><tr><td>10</td><td>4</td></tr><tr><td>15</td><td>6</td></tr><tr><td>25</td><td>14</td></tr></tbody></table>

When plotted it looks like this:

Below is an example Area rating table

<table><thead><tr><th width="166">Volume (Mm3)</th><th width="182">Area (Km2)</th></tr></thead><tbody><tr><td>0</td><td>1</td></tr><tr><td>7</td><td>2</td></tr><tr><td>10</td><td>4</td></tr><tr><td>15</td><td>6</td></tr><tr><td>25</td><td>14</td></tr></tbody></table>

When plotted it looks like this

<figure><img src="https://2363830371-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODCd8VK2OOl9jOdp5KFf%2Fuploads%2F86TOcpImcWZNnQImJnCp%2Fimage.png?alt=media&amp;token=80e55176-cc34-4ae0-86b7-a9c3b8c3ad34" alt=""><figcaption></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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://water-strategy.gitbook.io/waterstrategy/modeling-basics/parameters/interpolation-parameters/interpolated-volume.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
