Skip to content

Commit f18fe4f

Browse files
committed
pws 2 review fixes
1 parent 5056023 commit f18fe4f

12 files changed

+137
-362
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pywatershed/badges/version.svg)](https://anaconda.org/conda-forge/pywatershed)
1414
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pywatershed/badges/platforms.svg)](https://anaconda.org/conda-forge/pywatershed)
1515

16+
[![DOI:10.5066/P9AVWA7Z](https://img.shields.io/badge/DOI-10.5066/P9AVWA7Z-b4a9fe.svg)](https://doi.org/10.5066/P9AVWA7Z)
17+
1618
[![WholeTale](https://raw.githubusercontent.com/whole-tale/wt-design-docs/master/badges/wholetale-explore.svg)](https://dashboard.wholetale.org/run/64ae29e8a887f48b9f173678?tab=metadata)
1719

1820

@@ -24,6 +26,7 @@
2426
- [Installation](#installation)
2527
- [Getting started / Example notebooks](#getting-started--example-notebooks)
2628
- [Community engagement](#community-engagement)
29+
- [How to Cite](#how-to-cite)
2730
- [Disclaimer](#disclaimer)
2831

2932
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -149,6 +152,8 @@ guidelines.
149152

150153
Thank you for your interest.
151154

155+
## How to Cite
156+
McCreight, J., Langevin, C. D., & Hughes, J. D. (2023). pywatershed (Version 1.0.0) [Computer software]. [https://doi.org/10.5066/P9AVWA7Z](https://doi.org/10.5066/P9AVWA7Z)
152157

153158
## Disclaimer
154159

code.json

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[
2+
{
3+
"status": "Preliminary",
4+
"languages": [
5+
"Python",
6+
"Fortran"
7+
],
8+
"repositoryURL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed",
9+
"disclaimerURL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed/-/blob/main/DISCLAIMER.md",
10+
"tags": [
11+
"pywatershed",
12+
"hydrologic model"
13+
],
14+
"vcs": "git",
15+
"name": "pywatershed",
16+
"downloadURL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed/-/archive/1.0.0/pywatershed-1.0.0.zip",
17+
"contact": {
18+
"name": "James L. McCreight",
19+
"email": "jmccreight@usgs.gov"
20+
},
21+
"laborHours": -1,
22+
"version": "1.0.0",
23+
"date": {
24+
"metadataLastUpdated": "2023-12-22"
25+
},
26+
"organization": "U.S. Geological Survey",
27+
"permissions": {
28+
"licenses": [
29+
{
30+
"URL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed/-/blob/main/LICENSE",
31+
"name": "Public Domain, CC0-1.0"
32+
}
33+
],
34+
"usageType": "openSource"
35+
},
36+
"homepageURL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed",
37+
"description": "A hydrologic model in Python."
38+
}
39+
]

evaluation/performance/prms_5.2.1_performance.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
"outputs": [],
185185
"source": [
186186
"results2 = {}\n",
187-
"files = pl.Path('/Users/jamesmcc/usgs/data/pynhm/performance_runs/results/').glob('*.pkl')\n",
187+
"files = pl.Path('../../../data/pynhm/performance_runs/results/').glob('*.pkl')\n",
188188
"for ff in files: \n",
189189
" print(ff)\n",
190190
" with open(ff, \"rb\") as input_file:\n",

examples/01_multi-process_models.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"source": [
1313
"# Multi-process models in pywatershed\n",
1414
"\n",
15-
"In notebook `00_processes.ipynb`, we looked at how and individual Process representations work and are designed. In this notebook we learn how to put multiple Processes together into composite models using the `Model` class. \n",
15+
"In notebook `00_processes.ipynb`, we looked at how individual Process representations work and are designed. In this notebook we learn how to put multiple Processes together into composite models using the `Model` class. \n",
1616
"\n",
1717
"The starting point for the development of `pywatershed` was the National Hydrologic Model (NHM, Regan et al., 2018) configuration of the Precipitation-Runoff Modeling System (PRMS, Regan et al., 2015). In this notebook, we'll first construct a full NHM configuration. The spatial domain we'll use will again be the Delaware River Basin. Once we construct the full NHM, we'll look at how we can also construct sub-models of the NHM.\n",
1818
"\n",
@@ -58,7 +58,7 @@
5858
"source": [
5959
"## Domain Plot to get to know the area\n",
6060
"\n",
61-
"Before diving in to pywatershed models, let's use one of its built-in tools to get familiar with the application domain. We'll combine the GIS files for the HRUs and the Segments in this domain with their parameters to learn more about how the model represents quantities in pyhiscal space. Please zoom in and out and select different layers. We aim to add more functionality to this plot over time, stay tuned."
61+
"Before diving in to pywatershed models, let's use one of its built-in tools to get familiar with the application domain. We'll combine the GIS files for the HRUs and the Segments in this domain with their parameters to learn more about how the model represents quantities in physical space. Please zoom in and out and select different layers. We aim to add more functionality to this plot over time, stay tuned."
6262
]
6363
},
6464
{
@@ -1188,7 +1188,7 @@
11881188
"id": "c787a163-c4dd-4826-b0f2-73e1b006c081",
11891189
"metadata": {},
11901190
"source": [
1191-
"We'll, that saved us some time. The run is similar to before, just using fewer processes. \n",
1191+
"Well, that saved us some time. The run is similar to before, just using fewer processes. \n",
11921192
"\n",
11931193
"The final time is still in memory. We can take a look at, say, recharge. Before plotting, let's take a look at the data and the metadata for recharge a bit closer."
11941194
]

examples/02_prms_legacy_models.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"\n",
1515
"Because pywatershed has its roots in the Precipitation-Runoff Modeling System (PRMS, Regan et al., 2015), pywatershed supports PRMS-model instantation from legacy PRMS input files. The traditional PRMS input files are the control file, the parameter file, and the climate-by-hru (CBH) files (typically daily precipitation and maximum and minimum temperatures). While the CBH files need to be pre-processed to NetCDF format, native PRMS control and parameter files are supported. \n",
1616
"\n",
17-
"Below we'll show how to preprocess the CBH files to NetCDF and how to instantiate a pywatershed `Model` using PRMS-native files. In this notebook we'll reproduce the basic results from the previous notebook (`01_multi-process_models.ipynb`) for the NHM full model and its submodel. As in the previous notebooks, run PRMS processes models on the Delaware River Basin (DRB) subdomain of the NHM for a 2 year period using `pywatershed`.\n",
17+
"Below we'll show how to preprocess the CBH files to NetCDF and how to instantiate a pywatershed `Model` using PRMS-native files. In this notebook we'll reproduce the basic results from the previous notebook (`01_multi-process_models.ipynb`) for the NHM full model and its submodel. As in the previous notebooks, this example will run PRMS processes models on the Delaware River Basin (DRB) subdomain of the NHM for a 2 year period using `pywatershed`.\n",
1818
"\n",
1919
"## Prerequisites"
2020
]

examples/04_preprocess_atm.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"metadata": {},
120120
"source": [
121121
"## Write solar geometry files\n",
122-
"Below we'll demonstrated using an active instance of `PRMSSolarGeom` and also using its static output to drive `PRMSAtmosphere`. Here we create the static output that we need for `PRMSSolarGeom` in the second case."
122+
"Below we'll demonstrate using an active instance of `PRMSSolarGeom` and also using its static output to drive `PRMSAtmosphere`. Here we create the static output that we need for `PRMSSolarGeom` in the second case."
123123
]
124124
},
125125
{

examples/model_custom_output_aug_15_2023.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
model_output_netcdf = True
1313

14-
work_dir = pl.Path("/Users/jmccreight/usgs/pywatershed2/test_data/drb_2yr")
14+
work_dir = pl.Path("../../pywatershed2/test_data/drb_2yr")
1515

1616
out_dir = pl.Path("./custom_output")
1717
shutil.rmtree(out_dir) # CAREFUL HERE

examples/model_graph.ipynb

-240
This file was deleted.

0 commit comments

Comments
 (0)