Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidy for release #313

Merged
merged 5 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: mamba-org/[email protected]
with:
micromamba-version: '1.5.10-0'
environment-file: environment.yml
environment-file: environment_w_jupyter.yml
cache-environment: true
cache-downloads: true

Expand Down
4 changes: 2 additions & 2 deletions doc/api/flow_graph.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ FlowGraph base classes and subclasses. See :class:`FlowGraph` for an overview of
FlowGraph
FlowNode
FlowNodeMaker
PassThroughNode
PassThroughFlowNode
PassThroughNodeMaker
ObsInNode
ObsInFlowNode
ObsInNodeMaker
StarfitFlowNode
StarfitFlowNodeMaker
Expand Down
5 changes: 4 additions & 1 deletion doc/api/hydrology.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. currentmodule:: pywatershed


----------
Hydrology
----------
Expand All @@ -13,7 +13,10 @@ Hydrologic model components.
PRMSCanopy
PRMSSnow
PRMSRunoff
PRMSRunoffNoDprst
PRMSSoilzone
PRMSSoilzoneNoDprst
PRMSGroundwater
PRMSGroundwaterNoDprst
PRMSChannel
Starfit
14 changes: 8 additions & 6 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,26 @@ and the `extended release notes <https://ec-usgs.github.io/pywatershed/2023/12/1
for version 1.0.0.

===================================
Current version: 2.0.0 (unreleased)
Version: 2.0.0 (2024-11-14)
===================================
With pywatershed version 2.0.0, we introduce the :class:`FlowGraph` capabilities that allow
users to combine different kinds flow solutions in arbitrary order on a "flow graph".

Version 2.0.0 also introduces several important PRMS capabilities beyond those included in
Version 2.0.0 introduces several important PRMS capabilities beyond those included in
the `National Hydrolgical Model <https://pubs.usgs.gov/publication/tm6B9>`__ (NHM, Regan et al.,
2018).
2018): Dunnian flow in Soilzone is 2-way coupled to PRMSRunoff, preferential flows is implemented
in PRMSSoilzone, and depression storage can be optionally selected (across PRMSRunoff, PRMSSoilzone,
and PRMSGroundwater).

Version 2.0.0 also includes capabilties to translate :class:`PRMSChannel` simulations
into 1-D diffusive wave simulations in MODFLOW 6's development branch.
into 1-D diffusive wave simulations in MODFLOW 6's development branch using :class:`MmrToMf6Dfw`.

For more information on version 2.0.0 see the
`release notes <https://github.com/EC-USGS/pywatershed/releases/tag/2.0.0>`_
and the `extended release notes <https://ec-usgs.github.io/pywatershed/2024/12/18/v2-0-0-overview>`_.
and the `extended release notes <https://ec-usgs.github.io/pywatershed/2024/11/14/v2-0-0-overview>`_.

============================================
Upcoming development in 2024
Upcoming development
============================================
The broad goal is to reproduce GSFLOW coupling using the MODFLOW 6 API. This will include
gridded configurations and cascading flows.
Expand Down
17 changes: 6 additions & 11 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ What's New
np.random.seed(123456)


.. _whats-new.1.2.0:
.. _whats-new.2.0.0:

v2.0.0 (Unreleased)
v2.0.0 (14 November 2024)
---------------------

New Features
Expand All @@ -23,7 +23,7 @@ New Features
combine different kinds flow solutions in arbitrary order on a "flow graph".
The accompanying base classes :class:`FlowNode` and :class:`FlowNodeMaker`
are introduced along with their subclasses for modeling
:class:`PassThroughNode`\ s, :class:`ObsInNode`\ s (flow replacement by
:class:`PassThroughFlowNode`\ s, :class:`ObsInFlowNode`\ s (flow replacement by
observations with sink and source tracking in mass balance),
:class:`PRMSChannelFlowNode`\ s, and :class:`StarfitFlowNode`\ s. A new
example notebook,
Expand All @@ -37,26 +37,21 @@ New Features
conditions. A new notebook runs the Delaware River Basin using MF6 DFW:
`examples/07_mmr_to_mf6_chf_dfw.ipynb <https://github.com/EC-USGS/pywatershed/blob/develop/examples/07_mmr_to_mf6_chf_dfw.ipynb>`__.
(:pull:`290`) By `James McCreight <https://github.com/jmccreight>`_.
- The depression storage option for PRMSRunoff is implemented and tested.
(:pull:`279`) By `James McCreight <https://github.com/jmccreight>`_.
- No depression storage subclasses are available for PRMSRunoff, PRMSSoilzone,
and PRMSGroundwater by adding "NoDprst" to the end of the names. Depression
storage is switched off in sagehen_5yr and in new nhm_no_dprst
configurations.
(:pull:`288`) By `James McCreight <https://github.com/jmccreight>`_.
- Dunnian flow is implemented (in PRMSSoilzone) and tested for sagehen_5yr
whereas it was effectively off in all NHM configurations and its effect
on the sroff variable (in PRMSRunoff) incorrect.
- Dunnian flow is implemented (in PRMSSoilzone) and tested for sagehen_5yr.
(:pull:`288`) By `James McCreight <https://github.com/jmccreight>`_.
- Preferential flow is implemented (in PRMSSoilzone) and tested for sagehen_5yr
whereas it was effectively off in all NHM configurations.
- Preferential flow is implemented (in PRMSSoilzone) and tested for sagehen_5yr.
(:pull:`288`) By `James McCreight <https://github.com/jmccreight>`_.
- Control instances have a diff method to compare with other instances.
(:pull:`288`) By `James McCreight <https://github.com/jmccreight>`_.
- Feature to standardize subsetting input data (parameters and forcings) in
space and time either from file (:func:`utils.netcdf_utils.subset_netcdf_file`) or
in memory (:func:`utils.netcdf_utils.subset_xr`).
(:pull:`304`) By `James McCreight <https://github.com/jmccreight>`_.
(:pull:`304`) By `James McCreight <https://github.com/jmccreight>`_.

Breaking Changes
~~~~~~~~~~~~~~~~
Expand Down
3 changes: 0 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ channels:
- pyviz
- bioconda
dependencies:
- bash_kernel
- cartopy
- dataretrieval
- contextily
Expand All @@ -18,8 +17,6 @@ dependencies:
- holoviews
- hvplot
- ipython
- ipywidgets
- nb_conda_kernels
- nbconvert
- netCDF4
- networkx
Expand Down
2 changes: 0 additions & 2 deletions environment_w_jupyter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ channels:
- pyviz
- bioconda
dependencies:
- bash_kernel
- cartopy
- dataretrieval
- contextily
Expand All @@ -21,7 +20,6 @@ dependencies:
- ipywidgets
- jupyter
- jupyterlab
- nb_conda_kernels
- nbconvert
- netCDF4
- networkx
Expand Down
2 changes: 1 addition & 1 deletion pywatershed/base/flow_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class FlowGraph(ConservativeProcess):
:func:`prms_channel_flow_graph_to_model_dict`
and :func:`prms_channel_flow_graph_postprocess`.

For developers looking to add new :class:`FlowNode`s, please read the
For developers looking to add new :class:`FlowNode`\s, please read the
:class:`FlowNode` base class code and also the code for
:class:`FlowNodeMaker`.

Expand Down
4 changes: 4 additions & 0 deletions pywatershed/hydrology/prms_soilzone.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class PRMSSoilzone(ConservativeProcess):
Techniques and Methods, 6, B7.
<https://pubs.usgs.gov/tm/6b7/pdf/tm6-b7.pdf>`__
Note that as of pywatershed version 2.0.0, pref_flow_infil_frac is a
required parameters which is optional in PRMS. Specifying zeros for all
HRUs gives the same behavior as not supplying the parameter to PRMS.
Args:
control: a Control object
discretization: a discretization of class Parameters
Expand Down
4 changes: 4 additions & 0 deletions pywatershed/hydrology/prms_soilzone_no_dprst.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class PRMSSoilzoneNoDprst(PRMSSoilzone):
Techniques and Methods, 6, B7.
<https://pubs.usgs.gov/tm/6b7/pdf/tm6-b7.pdf>`__

Note that as of pywatershed version 2.0.0, pref_flow_infil_frac is a
required parameters which is optional in PRMS. Specifying zeros for all
HRUs gives the same behavior as not supplying the parameter to PRMS.

Args:
control: a Control object
discretization: a discretization of class Parameters
Expand Down
Loading