Skip to main content

HEC-RAS model automation

Project description

ripple1d

CI Documentation Status Release PyPI version

Utilities for repurposing HEC-RAS models for use in the production of Flood Inundation Maps (FIMs) and rating curves for use in near-real time flood forecasting on the NOAA National Water Model network. Go to ReadTheDocs for more information on ripple1d.

Contents

  • api : Source code for the Flask API and Huey queueing system for managing parallel compute.
  • production (Deprecation Warning) : This directory contains scripts used by the development team for testing ripple1d outside of the API. The contents are not included in the PyPi package and may not be stable or up to date.
  • ripple1d: Source code for the ripple1d library.
  • tests: Unit tests.up

Requirements

OS Dependency: Ripple requires Python version >=3.10 and a Windows environment with Desktop Experience (GUI, not a headless Windows server) and HEC-RAS installed (currently version 6.3.1 is supported).

Installing Ripple

NOTE: Using a python virtual environment is not required but is highly recommended.

Using pip

  1. Activate virtual environment as shown below and install the ripple1d package using pip using PowerShell:

    pip install ripple1d
    

Building from source

  1. Activate virtual environment as shown below and build from source:

    git clone https://github.com/dewberry/ripple1d.git
    cd ripple1d
    
    # if needed install build tools
    pip install setuptools wheel build
    python -m build_wheel
    pip install dist/*.whl
    
    # Either have PowerShell get the file name or look in the dist/ directory for the latest .whl file
    # Example filename: `ripple1d-0.3.0-py3-none-any.whl`
     $wheel = Get-ChildItem -Path dist -Filter *.whl | Select-Object -First 1
     pip install $wheel.FullName
    

Testing the Installation

  1. Verify the installation by importing ripple1d in a Python shell:

    python
    >>> import ripple1d
    >>> print(ripple1d.__version__)
    
  2. Run the unit tests to ensure everything is working correctly:

    pytest tests/
    

See the REST API documentation for available endpoints and usage.

Setting up a virtual environment

  1. Install Python

  2. Create a virtual Python environment using Command Prompt or PowerShell:

    Option 1: Windows Command Prompt

    %LOCALAPPDATA%\Programs\Python\Python312\python.exe -m venv %homepath%\venvs\venv-py312
    

    Option 2: Windows PowerShell

    $pythonExe = "$env:LOCALAPPDATA\Programs\Python\Python312\python.exe"
    $venvPath = "$env:USERPROFILE\venvs\venv-py312"
    & $pythonExe -m venv $venvPath
    
  3. Activate (enter) the new virtual environment:

    Option 1: Windows Command Prompt

    %homepath%\venvs\venv-py312\Scripts\activate.bat
    

    Option 2: Windows PowerShell

    & "$env:USERPROFILE\venvs\venv-py312\Scripts\Activate.ps1"
    
  4. Confirm that the activation worked.

    1. You should see that a parenthetical (venv-py312) has been added to the left side of your current line in the terminal.
    2. Enter where python and confirm that the top result is sourcing Python from the new directory.

Credits and References

  1. Office of Water Prediction (OWP)
  2. Dewberry
  3. Raytheon
  4. Earth Resources Technology, Inc.
  5. ras2fim
  6. USACE HEC-RAS
  7. NOAA National Water Model (NWM)

Special Thanks to: David Bascom (FEMA), Paul Rooney (FEMA), Julia Signell and Dan Pilone of Element84, and the developers of STAC.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ripple1d-0.3.0.tar.gz (73.0 kB view details)

Uploaded Source

Built Distributions

ripple1d-0.3.0-py310-none-win_amd64.whl (82.8 kB view details)

Uploaded Python 3.10 Windows x86-64

ripple1d-0.3.0-py3-none-any.whl (82.8 kB view details)

Uploaded Python 3

File details

Details for the file ripple1d-0.3.0.tar.gz.

File metadata

  • Download URL: ripple1d-0.3.0.tar.gz
  • Upload date:
  • Size: 73.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for ripple1d-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f87d2722369460a6ff217839be17b101c19cffc6bf6a0657f7754124b9a0123b
MD5 fa95adf80c3a39133802663c39ef928f
BLAKE2b-256 72cf998907e01df489d2e5b6c0521464180b6901ae884ccc0db88dca24732020

See more details on using hashes here.

File details

Details for the file ripple1d-0.3.0-py310-none-win_amd64.whl.

File metadata

  • Download URL: ripple1d-0.3.0-py310-none-win_amd64.whl
  • Upload date:
  • Size: 82.8 kB
  • Tags: Python 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for ripple1d-0.3.0-py310-none-win_amd64.whl
Algorithm Hash digest
SHA256 f345d444f2fd490efe080aa4d47aa335beade3537e9f7d47919704be67ecd71e
MD5 45e4c12c97b459005f9dafa7e1de0b8d
BLAKE2b-256 b68bd5f35ddcefe14a2f093f61281def1b9f7f49deb4cb9a5f88da51041c4ba5

See more details on using hashes here.

File details

Details for the file ripple1d-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ripple1d-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 82.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for ripple1d-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d842d00f53374e86f232f261c524915d018273a383fa288e7dc51bd9a4f2f7d
MD5 bd05698806bcc900adc7bed425ec7f45
BLAKE2b-256 99431f103ff0c8b6e15454890c60220a155a361d8fb1dab0641de3a3b9afa8c3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page