Snow17
A snow accumulation and melt model that has been used by the National Weather Service since the late 1970s for operational streamflow forecasting.
https://github.com/noaa-owp/snow17
Category: Cryosphere
Sub Category: Snow and Permafrost
Keywords from Contributors
hydrology bmi csdms
Last synced: about 18 hours ago
JSON representation
Repository metadata
- Host: GitHub
- URL: https://github.com/noaa-owp/snow17
- Owner: NOAA-OWP
- License: apache-2.0
- Created: 2022-02-14T15:57:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2026-04-22T19:58:34.000Z (29 days ago)
- Last Synced: 2026-05-04T01:03:11.264Z (18 days ago)
- Language: Fortran
- Size: 40.4 MB
- Stars: 8
- Watchers: 8
- Forks: 19
- Open Issues: 18
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
README.md
OWP Snow17 Model Version for NextGen
Description:
Snow17 is a snow accumulation and melt model that has been used by the National Weather Service since the late 1970s for operational streamflow
forecasting. It is a temperature-index model that was first described in Anderson (1973) before being incorporated into the NWS River Forecasting System (NWSRFS) and more recently the NWS Community Hydrologic Prediction System (CHPS). The version of the Snow17 model maintained in this directory is formulated from original NWS FORTRAN code to be compatible with
the Next Generation Water Resources Modeling Framework (NextGen).
- Technology stack: The model code is written in Fortran with a driver that incorporates Basic Model Interface (BMI) commands to enable Snow17 to be run in standalone mode or as a module within the NextGen framework (or other BMI-based systems). It has been compiled using GNU, PGI, and Intel compilers.
- Status: Beta (runs but has not been extensively tested; validates against the orginal repository version listed below, which has been extensively used)
- Links: This code was adapted from source code included in https://github.com/NCAR/NWS_hydro_models -- a version used in federally funded streamflow forecasting research at NCAR. The original source code for that effort was obtained from the NWS Office of Hydrology around 2013. The code has since been copied and adapted into other research repositories.
Dependencies
- Fortran compiler
- NextGen ISO C Fortran BMI library (optional)
Running in Standalone
The following describes how to install the run snow17 as a standalone model.
Clone repository if necessary and change to the repo root directory:
git clone https://github.com/NOAA-OWP/snow17.git
cd snow17
Generate a CMake build system and directory (in the example below and those that follow, the directory is assumed to be cmake_build within the repo root):
# You can also include the '-DCMAKE_BUILD_TYPE=Debug' option if you want to build for debugging
cmake -B cmake_build -S .
Note that you may need or want to specify the Fortran compiler, done by supplying a value for the FC variable when you generate the build directory. There are many reasons for that: maybe you have multiple compilers installed, or maybe your compiler isn't installed to the standard system path or using a standard name CMake will recognize.
Regardless, if necessary just append FC=<path_to_compiler> to the rest of the command:
# Here we are manually telling CMake to use '/opt/local/bin/gfortran-mp-14' as the Fortran compiler, rather than
# whatever compiler it would find on its own.
FC=/opt/local/bin/gfortran-mp-14 cmake -B cmake_build -S .
With the build directory generated, build the stand-alone executable:
cmake --build cmake_build --target snow17
You should now see the cmake_build/snow17 stand-alone executable.
There is a test case in the snow17/test_cases/ directory. To run it, first cd to the directory (cd ../test_cases/) and unpack the example: tar -xzvf ex1.tgz.
cd ex1/run/ to get to the run directory and then execute the shell script (./runSnow17.csh) or type ../../../cmake_build/snow17 namelist.bmi.HHWM8 into your command line
Check the example in the output folder (cd ../output/)
Running in Ngen
The following are instructions for building the Sac-SMA BMI module shared library. In particular, this is necessary to run the Sac-SMA model in the Next Generation Water Resources Modeling Framework.
As described above for stand-alone builds, clone the repo if necessary and change into the repo root directory.
git clone https://github.com/NOAA-OWP/snow17.git
cd snow17
Within the repo root, once again generate a CMake build directory. However, this time, we (probably) need to specify the location of the NextGen ISO C Fortran BMI library. This is an intermediate library needed for any Fortran BMI module to ensure NextGen compatibility. This is done with the ISO_C_FORTRAN_BMI_PATH option
[!WARNING]
If you created stand-alone-only build directory already, remove it first. Don't worry: the NextGen-supporting build directory will also support stand-alone builds.
# The same advice discussed in the stand-alone section about optionally adding 'FC=<path_to_compiler>' and/or
# '-DCMAKE_BUILD_TYPE=Debug' applies here
cmake -B cmake_build -DISO_C_FORTRAN_BMI_PATH=/Users/rbartel/Developer/noaa/ngen/extern/iso_c_fortran_bmi -S .
[!TIP]
The directory to use for ISO_C_FORTRAN_BMI_PATH will generally be<path_to_your_ngen_repo>/extern/iso_c_fortran_bmi. It is assumed that you have already cloned the NextGen repo locally.
With this done when the build directory is created, we will also have access to another build target: snow17_bmi. This is how we build the NextGen BMI module shared library:
cmake --build cmake_build --target snow17_bmi
[!NOTE]
You can still build the stand-alone executable as described above when you generate a build directory for NextGen builds. You can also omit specify a target when building, in which case, CMake will build all valid build targets.
cmake --build cmake_build --target snow17 # This will build the stand-alone executable, even when generating for NextGen builds
cmake --build cmake_build # This will build the stand-alone executable and the NextGen BMI module shared library
Once you build the shared library, you should see the shared library in build directory, named cmake_build/libsnow17bmi.<version>.so on Linux systems (on Mac, you will see .dylib rather than .so). There will also be cmake_build/libsnow17bmi.so symlink pointing to the shared library file.
Getting help
If there are concerns or bug fixes, etc., please file an issue in this repository's Issue Tracker.
Getting involved
We encourage community involvement in code development. For more info, please check out our CONTRIBUTING document.
Open source licensing info
Credits and references
If you wish to use or adapt the code in this repository, please make sure that your new repository credits this one as the original source of the code.
References
- Anderson, E. A., 1973: National Weather Service River Forecast System-Snow Accumulation and Ablation Model. NOAA Tech. Memo. NWS Hydro-17, U.S. National Weather Service. [Avail- able from Office of Hydrologic Development, NOAA/NWS, 1325 East–West Highway, Silver Spring, MD 20910.]
Owner metadata
- Name: NOAA-OWP
- Login: NOAA-OWP
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/60660814?v=4
- Repositories: 28
- Last ynced at: 2023-03-04T04:01:13.237Z
- Profile URL: https://github.com/NOAA-OWP
GitHub Events
Total
- Pull request event: 5
- Fork event: 6
- Issues event: 3
- Watch event: 2
- Issue comment event: 3
- Push event: 4
- Pull request review event: 2
- Create event: 2
Last Year
- Pull request event: 2
- Fork event: 2
- Issues event: 3
- Watch event: 1
- Issue comment event: 3
- Push event: 3
- Pull request review event: 1
- Create event: 2
Committers metadata
Last synced: 4 days ago
Total Commits: 103
Total Committers: 25
Avg Commits per committer: 4.12
Development Distribution Score (DDS): 0.825
Commits in past year: 45
Committers in past year: 11
Avg Commits per committer in past year: 4.091
Development Distribution Score (DDS) in past year: 0.711
| Name | Commits | |
|---|---|---|
| Andy Wood | a****d@c****u | 18 |
| Mohammed Karim | m****m@r****m | 13 |
| Carolyn.Maynard | c****d@r****m | 11 |
| Andy Wood | a****d@c****u | 6 |
| siva.selvanathan | s****E@D****m | 6 |
| Austin Raney | a****y@p****m | 5 |
| Andrew Wood | a****d@h****u | 4 |
| Steve Drake | s****e@y****m | 4 |
| zhengtaocui | z****i@g****m | 3 |
| K. Jennings | 3****y | 3 |
| Jerome Berryhill | J****l@N****v | 3 |
| Elizabeth Clark | e****2@u****u | 3 |
| Jessica Garrett | j****t@L****t | 3 |
| Yuqiong Liu | y****u@U****m | 3 |
| Andy Wood | a****d@c****u | 2 |
| Andy Wood | a****d@c****u | 2 |
| Keith Jennings | k****s@k****n | 2 |
| Robert Bartel | r****l@f****l | 2 |
| JessicaGarrett-NOAA | 3****k | 2 |
| Brian-Cosgrove | 1****e | 2 |
| Andy Wood | a****e@g****m | 2 |
| peter.a.kronenberg | p****g@r****m | 1 |
| seyounger | s****r@g****m | 1 |
| FernandoSalas-NOAA | f****s@n****v | 1 |
| Chris Tubbs | c****s@n****v | 1 |
Committer domains:
- noaa.gov: 3
- rtx.com: 3
- keiths-mbp.lan: 1
- cheyenne3.cheyenne.ucar.edu: 1
- cheyenne2.cheyenne.ucar.edu: 1
- u-28hbmjq9pk1ns.nextgenwaterprediction.com: 1
- lynkers-mbp.hsd1.co.comcast.net: 1
- uw.edu: 1
- gmx.com: 1
- hydro-c1.rap.ucar.edu: 1
- dewberry.com: 1
- cheyenne5.cheyenne.ucar.edu: 1
- cheyenne1.cheyenne.ucar.edu: 1
Issue and Pull Request metadata
Last synced: 27 days ago
Total issues: 23
Total pull requests: 34
Average time to close issues: 4 months
Average time to close pull requests: 9 days
Total issue authors: 8
Total pull request authors: 8
Average comments per issue: 1.48
Average comments per pull request: 0.44
Merged pull request: 26
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: about 1 hour
Past year issue authors: 1
Past year pull request authors: 2
Past year average comments per issue: 2.0
Past year average comments per pull request: 0.33
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- drakest123 (9)
- andywood (5)
- SnowHydrology (3)
- madMatchstick (2)
- aaraney (1)
- joshsturtevant (1)
- consigcody94 (1)
- pdmich (1)
Top Pull Request Authors
- andywood (20)
- drakest123 (3)
- Brian-Cosgrove (2)
- aaraney (2)
- madMatchstick (2)
- SnowHydrology (2)
- cmaynard-ngwpc (2)
- zhengtaocui (1)
Top Issue Labels
Top Pull Request Labels
Score: 6.476972362889683