Skip to content

Commit

Permalink
pws 2 review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccreight committed Oct 18, 2024
1 parent 5056023 commit f18fe4f
Show file tree
Hide file tree
Showing 12 changed files with 137 additions and 362 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pywatershed/badges/version.svg)](https://anaconda.org/conda-forge/pywatershed)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pywatershed/badges/platforms.svg)](https://anaconda.org/conda-forge/pywatershed)

[![DOI:10.5066/P9AVWA7Z](https://img.shields.io/badge/DOI-10.5066/P9AVWA7Z-b4a9fe.svg)](https://doi.org/10.5066/P9AVWA7Z)

[![WholeTale](https://raw.githubusercontent.com/whole-tale/wt-design-docs/master/badges/wholetale-explore.svg)](https://dashboard.wholetale.org/run/64ae29e8a887f48b9f173678?tab=metadata)


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

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

Thank you for your interest.

## How to Cite
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)

## Disclaimer

Expand Down
39 changes: 39 additions & 0 deletions code.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[
{
"status": "Preliminary",
"languages": [
"Python",
"Fortran"
],
"repositoryURL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed",
"disclaimerURL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed/-/blob/main/DISCLAIMER.md",
"tags": [
"pywatershed",
"hydrologic model"
],
"vcs": "git",
"name": "pywatershed",
"downloadURL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed/-/archive/1.0.0/pywatershed-1.0.0.zip",
"contact": {
"name": "James L. McCreight",
"email": "[email protected]"
},
"laborHours": -1,
"version": "1.0.0",
"date": {
"metadataLastUpdated": "2023-12-22"
},
"organization": "U.S. Geological Survey",
"permissions": {
"licenses": [
{
"URL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed/-/blob/main/LICENSE",
"name": "Public Domain, CC0-1.0"
}
],
"usageType": "openSource"
},
"homepageURL": "https://code.usgs.gov/wma-enterprisecapacity/pywatershed",
"description": "A hydrologic model in Python."
}
]
2 changes: 1 addition & 1 deletion evaluation/performance/prms_5.2.1_performance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
"outputs": [],
"source": [
"results2 = {}\n",
"files = pl.Path('/Users/jamesmcc/usgs/data/pynhm/performance_runs/results/').glob('*.pkl')\n",
"files = pl.Path('../../../data/pynhm/performance_runs/results/').glob('*.pkl')\n",
"for ff in files: \n",
" print(ff)\n",
" with open(ff, \"rb\") as input_file:\n",
Expand Down
6 changes: 3 additions & 3 deletions examples/01_multi-process_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"source": [
"# Multi-process models in pywatershed\n",
"\n",
"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",
"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",
"\n",
"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",
"\n",
Expand Down Expand Up @@ -58,7 +58,7 @@
"source": [
"## Domain Plot to get to know the area\n",
"\n",
"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."
"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."
]
},
{
Expand Down Expand Up @@ -1188,7 +1188,7 @@
"id": "c787a163-c4dd-4826-b0f2-73e1b006c081",
"metadata": {},
"source": [
"We'll, that saved us some time. The run is similar to before, just using fewer processes. \n",
"Well, that saved us some time. The run is similar to before, just using fewer processes. \n",
"\n",
"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."
]
Expand Down
2 changes: 1 addition & 1 deletion examples/02_prms_legacy_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"\n",
"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",
"\n",
"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",
"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",
"\n",
"## Prerequisites"
]
Expand Down
2 changes: 1 addition & 1 deletion examples/04_preprocess_atm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"metadata": {},
"source": [
"## Write solar geometry files\n",
"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."
"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."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/model_custom_output_aug_15_2023.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

model_output_netcdf = True

work_dir = pl.Path("/Users/jmccreight/usgs/pywatershed2/test_data/drb_2yr")
work_dir = pl.Path("../../pywatershed2/test_data/drb_2yr")

out_dir = pl.Path("./custom_output")
shutil.rmtree(out_dir) # CAREFUL HERE
Expand Down
240 changes: 0 additions & 240 deletions examples/model_graph.ipynb

This file was deleted.

Loading

0 comments on commit f18fe4f

Please sign in to comment.