# 添加水库测深（区域）

## 背景 <a href="#background" id="background"></a>

水库或 Storage node 覆盖的面积取决于水库的填充程度。

这个 **区域评级曲线** <mark style="color:purple;">决定给出</mark> 水库面积视其水平或存储量而定。在 WaterStrategy 和 Pywr 中，水库在每个时间步长的时间步存储量都是已知的。我们可以将这种存储器与面积等级固化一起使用来计算库区面积，从而计算每个时间步的蒸发量。

以下是区域评分表示例：

| 体积 (Mm3) | 面积 (Km2) |
| -------- | -------- |
| 0        | 1        |
| 7        | 2        |
| 10       | 4        |
| 15       | 6        |
| 25       | 14       |

绘制时它看起来像这样：

<figure><img src="/files/ZGDMCqByfwwBCdduYsZk" alt=""><figcaption><p>区域评级曲线</p></figcaption></figure>

[Pywr 参数 ](https://water-strategy.gitbook.io/water-strategy/modelling-fundamentals/parameters)是在每个时间步返回模型值的函数。这些值可以是基于时间（例如当天或月）的常数，也可以是基于时间步长储量计算的常数，也可以是许多其他计算。在这种情况下，我们对返回水库面积或 storage node 作为其时间步存储函数的参数感兴趣。为此，我们使用 [插值音量参数](https://water-strategy.gitbook.io/water-strategy/modelling-fundamentals/parameters/interpolated-volume)。

插值音量参数使用 **排列** （表）的 **水库容量** 和相应的值。在这种情况下，关联值是对应的 **库区** 为了给定的 **音量**。在表中的给定点之间，参数进行插值。

***请注意：** 参数可以直接在节点上定义，也可以在接口的参数选项卡中定义。在界面的 “参数” 选项卡中定义的参数可以在多个节点上使用，也可以嵌套在不同的参数中。*

*本教程包括两种类型的定义。区域将在节点上定义，而关卡参数（下一步）将在参数选项卡中定义。*

## 教程 <a href="#tutorial" id="tutorial"></a>

1。克隆 **'有治疗损失的需求'** 场景并调用新场景 **'添加水库 P 和 E。** P 代表降水，E 代表蒸发。 2。点击 **水库** 然后编辑 **区域** 属性。

<figure><img src="/files/uRMAgAGujeCKDJvq8BHL" alt="" width="375"><figcaption><p>编辑 “区域” 属性</p></figcaption></figure>

3.插值体积参数目前在 WaterStrategy 中没有 JSON 编辑器。为了在这个属性上定义这个参数，我们需要使用泛型 **PYWR\_参数**。这允许我们为任何 Pywr 参数输入 JSON。

<figure><img src="/files/blu2vb38yzDds1cL5Rq1" alt="" width="375"><figcaption><p>选择 PYWR_PARAMETER</p></figcaption></figure>

按 **行**

<figure><img src="/files/yMiUFpHIn0sN1MPTfhoX" alt="" width="315"><figcaption><p>允许更改</p></figcaption></figure>

\
4\。将下面的 JSON 代码复制并粘贴到文本中 **JSON 选项卡**

<figure><img src="/files/aa8XFdY48LPJC8xRs29n" alt=""><figcaption><p>粘贴 JSON 代码并保存</p></figcaption></figure>

```
{
	“类型”：“插值音量参数”，
	“节点”：“示例水库”，
	“音量”：[
		0，
		7,
		10，
		15，
		25
	]，
	“价值观”：[
		1,
		2，
		4，
		6,
		14
	]，
	“interp_kwargs”：{
		“种类”：“线性”
	}，
	“评论”：“体积：Mm3，值：Km2”
}
```

5。您可以选择将参数值记录为时间序列，方法是选择 **时间序列** 在 **产出** 选项卡。然后，保存它。

<figure><img src="/files/NjzLrIExm0prIOhUYArw" alt=""><figcaption><p>选择记录参数并保存</p></figcaption></figure>

6。运行模型并查看 **模拟\_区域** 输出

<figure><img src="/files/ii6ADhtNgyxXTWNlSn24" alt=""><figcaption><p>Simulated_Area 输出</p></figcaption></figure>

这显示了随时间推移的水库面积。

<figure><img src="/files/ivp9kuu21cccDVSWL1OG" alt=""><figcaption><p>水库面积</p></figcaption></figure>

较小的区域对应于较低的水库存储量。


---

# Agent Instructions: 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:

```
GET https://water-strategy.gitbook.io/waterstrategy/zhong-guo-ren/jiao-cheng/creating-a-reservoir-system/adding-reservoir-details/adding-reservoir-bathymetry-area.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
