# USGS Streamflow and USBR reservoir inflow data usage

**URL:** <https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390>\
**Category:** Water Supply Forecast Rodeo\
**Created:** [November 29, 2023, 5:56pm UTC](https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390 "2023-11-29T17:56:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RomanChernenko](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@RomanChernenko](https://community.drivendata.org/u/RomanChernenko)\
**Post date:** [November 29, 2023, 5:56pm UTC](https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390/1 "2023-11-29T17:56:44Z")

</div>

Both allowed data sources streamflow and reservoir inflow has a remark that solutions should not be attempting to model the adjustments for calculating naturalized flow, as these are impacted by water management operations that may in general be influenced by forecasts.  
Can we use these data sources as additional inputs together with other data sources to the forecast model? Or we can’t use it as the model’s input at all?

---

<div class="post-metadata">

**Author:** ![motoki](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@motoki](https://community.drivendata.org/u/motoki)\
**Post date:** [November 30, 2023, 4:51pm UTC](https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390/2 "2023-11-30T16:51:46Z")

</div>

I also would like to know how to download the USBR inflow. If we have to write it by ourselves, how to include that piece into the submission code.

---

<div class="post-metadata">

**Author:** ![jayqi](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.drivendata.org/jayqi/32/924_2.png) [@jayqi](https://community.drivendata.org/u/jayqi)\
**Post date:** [November 30, 2023, 9:52pm UTC](https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390/3 "2023-11-30T21:52:33Z")

</div>

Hi @RomanChernenko, @motoki,

Both of these data sources are available to use as features in your modeling. To give some possible ideas of how one may incorporate them:

- The observed streamflow at some particular location in a forecast site’s drainage basin might be correlated with inputs into that basin surface water. For example, maybe there is a streamgage upstream of any human impairments.
- The observed streamflow at some particular location might be a proxy for a forecast site’s naturalized flow, in a case where the monthly naturalized flow isn’t available.

The remark about modeling the adjustments for calculating naturalized flow is to help direct your modeling efforts productively in alignment with the goals of the challenge. The way that naturalized flow (the target variable) is determined is that the observed streamflow at the forecast site is adjusted (added to or subtracted from) with upstream observed measurements associated with human impairments (e.g., diversions or discharges). One possible way to approach modeling naturalized flow is to forecast the observed streamflow at the forecast site and also to forecast the upstream adjustments and then calculate a derived naturalized flow forecast from all of those. This is discouraged because it involves modeling operational actions (the adjustments) that would be influenced by forecasts in practice. Instead, the goal is to model the natural inputs of water into the drainage basin system.

Let me know if you have further questions.

---

<div class="post-metadata">

**Author:** ![motoki](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@motoki](https://community.drivendata.org/u/motoki)\
**Post date:** [December 1, 2023, 5:33pm UTC](https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390/4 "2023-12-01T17:33:41Z")

</div>

Many thanks for your reply.

I haven’t understood. USBR inflow is the same as USBR flow?

In the configuration file, I only see

- name: usgs\_streamflow

There is no usbr\_streamflow.

---

<div class="post-metadata">

**Author:** ![jayqi](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.drivendata.org/jayqi/32/924_2.png) [@jayqi](https://community.drivendata.org/u/jayqi)\
**Post date:** [December 1, 2023, 5:39pm UTC](https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390/5 "2023-12-01T17:39:42Z")

</div>

Hi @motoki,

We currently are not rehosting any USBR data that will be mounted to the code execution runtime. Instead, the USBR reservoir inflow data source is approved for direct API access. You may query the USBR RISE API during the code execution run. This is all documented [here](https://www.drivendata.org/competitions/254/reclamation-water-supply-forecast-dev/page/801/#usbr-reservoir-inflow).

---

<div class="post-metadata">

**Author:** ![motoki](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@motoki](https://community.drivendata.org/u/motoki)\
**Post date:** [December 2, 2023, 8:57pm UTC](https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390/6 "2023-12-02T20:57:07Z")

</div>

Thanks for your replies.

Could we assume that all the libraries in the file [data\_download/requirements.txt](https://github.com/drivendataorg/water-supply-forecast-rodeo-runtime/blob/main/data_download/requirements.txt) are available in the runtime env?

---

<div class="post-metadata">

**Author:** ![jayqi](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.drivendata.org/jayqi/32/924_2.png) [@jayqi](https://community.drivendata.org/u/jayqi)\
**Post date:** [December 4, 2023, 2:32pm UTC](https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390/7 "2023-12-04T14:32:42Z")

</div>

Hi @motoki,

Please do not make any assumptions about what packages are available in the runtime environment. You can see all exact packages and versions that are installed in the [`runtime/conda-lock-gpu.yml`](https://github.com/drivendataorg/water-supply-forecast-rodeo-runtime/blob/main/runtime/conda-lock-gpu.yml) lock file. You can also pull the runtime Docker image, which you can use to test your submission locally, or open up a shell to inspect the environment yourself. Instructions for this are in the README.

To address your question specifically, `data_download/requirements.txt` is **not** an input to specifying the runtime environment, so you should **not** assume that libraries in that file will be available.

---

<div class="post-metadata">

**Author:** ![david.lam.hn](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@david.lam.hn](https://community.drivendata.org/u/david.lam.hn)\
**Post date:** [December 5, 2023, 3:10pm UTC](https://community.drivendata.org/t/usgs-streamflow-and-usbr-reservoir-inflow-data-usage/9390/8 "2023-12-05T15:10:31Z")

</div>

Hello,

We have updated the code in the git repos. Could you verify and merge the 2 PRs ? Oh you could simply adapt the files and ignore my PRs.
