NWSRFSpy
nwsrfs_py is a Python interface to NWSRFS hydrologic models using f2py wrappers around FORTRAN implementations.
It is designed to support NWRFC autocalibration workflows and provides classes for simulation and AdjustQ operations. Sample calibration data is archived on Zenodo.
Install (PyPI)
pip install nwsrfspy
Quick Start
from nwsrfs_py import simulation
# Load packaged example data
model_run = simulation.NwsrfsRun.load_example("NRKW1")
# Simulated streamflow series
sim_flow = model_run.sim
print(sim_flow.head())
Included Model Components
- SAC-SMA + SNOW-17 (
SacSnow) - UNIT-HG (
GammaUh) - LAG-K (
Lagk) - CHANLOSS (
Chanloss) - CONS_USE (
Consuse)
Documentation
Python docs: https://NOAA-NWRFC.github.io/nwsrfs-hydro-models/python/
Attribution
nwsrfs_py packages and wraps legacy NWSRFS FORTRAN components together with newer support modules.
Detailed source provenance, contributor attribution, and third-party license notices are documented in COPYRIGHTS.
Current package maintainers are Geoffrey Walters and Cameron Bracken.
Build From Source (Developers)
Source builds require a Fortran toolchain plus build tools.
Requirements:
- Python 3.10+
numpy,pandas,scipygfortranmeson,meson-python,ninja
Using pixi (recommended)
From repository root:
pixi run install-py
Using conda
conda create -n nwsrfs_env python=3.10
conda activate nwsrfs_env
conda install -c conda-forge fortran-compiler meson meson-python ninja
Install from source:
git clone https://github.com/NOAA-NWRFC/nwsrfs-hydro-models.git
cd nwsrfs-hydro-models/nwsrfs_py
pip install .
python -c "import nwsrfs_py; print('Success!')"
Editable install:
pip install -e . --no-build-isolation -v
For runnable scripts in the source tree, see examples/.
Citation
If you use this package, please cite:
Walters, G., Bracken, C., Gillies, B., et al. 2026. "A Comprehensive Calibration Framework for the Northwest River Forecast Center." JAWRA Journal of the American Water Resources Association 62(2): e70112. https://doi.org/10.1111/1752-1688.70112
Release files for nwsrfspy 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nwsrfspy-1.0.3.tar.gz | 33.1 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| nwsrfspy-1.0.3-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| nwsrfspy-1.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| nwsrfspy-1.0.3-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details |
| nwsrfspy-1.0.3-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| nwsrfspy-1.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| nwsrfspy-1.0.3-cp311-cp311-macosx_11_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 11.0+ ARM64 | Details |
| nwsrfspy-1.0.3-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
| nwsrfspy-1.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| nwsrfspy-1.0.3-cp310-cp310-macosx_11_0_arm64.whl | CPython 3.10 | CPython 3.10 | macOS 11.0+ ARM64 | Details |
Total release size: 341.6 MB
Release files / nwsrfspy-1.0.3.tar.gz
| Download URL | nwsrfspy-1.0.3.tar.gz |
|---|---|
| Size | 33.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59e8f2159d14814039119788b64fee4682153144091718c40ef39735bc657202
|
|
BLAKE2b-256 checksum How to use checksums |
362bd12cfefc372060e1cfd232e97e2237ad10ce7919878a0f6bbd9bb2328e86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / nwsrfspy-1.0.3-cp312-cp312-win_amd64.whl
| Download URL | nwsrfspy-1.0.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 34.8 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
cf0ce1474fb98cbd421969b42138dc04eb6afd6d5a567224ca8451d59921ffcf
|
|
BLAKE2b-256 checksum How to use checksums |
6c822523feae5ed903bc6387453783c8a8d0a7a4f524f56d24fd0d44bbee0964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / nwsrfspy-1.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | nwsrfspy-1.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 34.5 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ebfa6c0ad23fc37b1ebc97f2bd7f124b14ac84a02e5dcb7cd370191c23828e82
|
|
BLAKE2b-256 checksum How to use checksums |
0fdcd03ac273bf617e35be5de0e5bb188fd75ae8b5fa4d8f730cf4fa2c46b99e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / nwsrfspy-1.0.3-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | nwsrfspy-1.0.3-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 33.5 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9d2847a866f26cdc4f16851fcb7cdd3d4fc7268bddaf06700c1b6b32512f0a77
|
|
BLAKE2b-256 checksum How to use checksums |
9bcee25fbc8c3486bee23fa4e8f45e93943c82fd097af3f994b5668547271b17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / nwsrfspy-1.0.3-cp311-cp311-win_amd64.whl
| Download URL | nwsrfspy-1.0.3-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 34.8 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
703fe6130e87b9fc5460b900a49f8add46216031755f639f4a7dab2120b302c8
|
|
BLAKE2b-256 checksum How to use checksums |
4f43ed99aa4bc491d44cdc163ca6c24542a919401446ae45cb20e86554af5bd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / nwsrfspy-1.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | nwsrfspy-1.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 34.5 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f7fccb1c6287534a07111c0fab965e9619bf17a398fddfab0046172f91ab26b
|
|
BLAKE2b-256 checksum How to use checksums |
081ecf05fce0e9ccf2a0b82576a7d78f651ba0caddfdb6d6964a5a5f352bfcc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / nwsrfspy-1.0.3-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | nwsrfspy-1.0.3-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 33.5 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
82538029e56a8b5c7fb94017680a1749c68627710da003c3abebc418e9c3b240
|
|
BLAKE2b-256 checksum How to use checksums |
0b08c944372125566fc45df360af98b232dbc20711192292cdd7cbb3df413eb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / nwsrfspy-1.0.3-cp310-cp310-win_amd64.whl
| Download URL | nwsrfspy-1.0.3-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 34.8 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f175c47dc541d10c805938819a91d0fa28b04f81a938720996267d1eb8daa3ac
|
|
BLAKE2b-256 checksum How to use checksums |
53f206c231f54c82c440f25328b38cb178a1fc9d1636018d95a4b9636d6be5f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / nwsrfspy-1.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | nwsrfspy-1.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 34.5 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
eecdaa8928e76e453faad71b455cdae30b0088572ef126fa6fda2c316c1c7406
|
|
BLAKE2b-256 checksum How to use checksums |
58c1169527a9c09420951c6de1ccc895a7b34a101b005ddfc5bf128d5f34508d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / nwsrfspy-1.0.3-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | nwsrfspy-1.0.3-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 33.5 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
526396cc0b4360c01fd2f0a891ce39e0dd81d856b4e103b1f1aaccd70e155ee1
|
|
BLAKE2b-256 checksum How to use checksums |
aa283149a98fe6db38f295e6f0e26fd3b671cb25d4733ec4446ebc579a10aac8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|