Python Notebook for Retrieving Retrospective National Water Model Forecasts
收藏www.hydroshare.org2024-10-10 更新2025-03-25 收录
下载链接:
https://www.hydroshare.org/resource/5caaa9919c2e490eb735aebc5e741c35
下载链接
链接失效反馈官方服务:
资源简介:
This python notebook demonstrates a simple method for retrieving time series data from the Amazon Web Services (AWS) archive of the U.S. National Water Model retrospective streamflow forecasts for one or more reach id's (also known as COMIDs) for a specified date range. Note that this notebook uses the 42-year (February 1979 through December 2020) retrospective simulation using version 2.1 of the National Water Model. The AWS archive and description of the data can be found here: https://registry.opendata.aws/nwm-archive/. This notebook uses the xarray library to connect to the data store as an anonymous user. The connection results in a zarr store from which data can be extracted using the method shown in the script. This method is not optimized for parallel computing so it will be slow if you specify a lot of reach ids. The results are written to a local CSV file that can be opened in Excel or another spreadsheet. There are many optimizations that can be done to improve data access, but this notebook is intentionally simple for the novice user who is trying to work with National Water Model retrospective data stored in AWS.
本 Python 笔记本演示了一种从亚马逊网络服务(Amazon Web Services,简称 AWS)的美国国家水文模型(National Water Model)回溯期径流预报数据档案中检索时间序列数据的方法,适用于一个或多个指定的范围标识符(亦称为 COMIDs),针对特定日期范围。请注意,该笔记本采用了 42 年(1979 年 2 月至 2020 年 12 月)的回溯期模拟,使用国家水文模型版本 2.1。AWS 数据档案及其描述可在此处查阅:https://registry.opendata.aws/nwm-archive/。该笔记本利用 xarray 库以匿名用户身份连接至数据存储,连接结果生成一个 zarr 存储库,从中可提取数据,具体方法如脚本所示。此方法未针对并行计算进行优化,因此在指定大量范围标识符时将较为缓慢。结果将被写入本地 CSV 文件,可在 Excel 或其他电子表格软件中打开。为了提高数据访问效率,可以进行多种优化,但本笔记本旨在为尝试处理存储在 AWS 中的国家水文模型回溯数据的初学者提供一种简洁的解决方案。
提供机构:
www.hydroshare.org



