Ripple1D Pipeline is a workflow that utilizes the Ripple1d to generate FIMs for difference scenarios.
Compatible with ripple1d v0.11.0. Use repository tags to get older versions.
For why the project is designed the way it is, see design_guide.md.
ripple1d_pipeline/- the pipeline packageentrypoints/- scripts that run the pipelinenotebooks/- notebooks that run the pipeline, step by steptools/- independent tools, not used by the pipelinepixi-scripts/- environment provisioning invoked by pixi
pixi manages Python, GDAL, and flows2fim. The rest must be installed separately:
- Windows environment with Desktop Experience (GUI, not headless Windows, not non logged in sessions)
- pixi
- HEC-RAS (v6.3.1)
- Ripple1d server (runs in its own environment)
- AWS credentials (access key id and secret access key) for pulling models from STAC
- Reference data (DEM, NWM flowlines, flow files) on disk
Run all steps from the Windows Command Prompt (cmd), not PowerShell.
powershell -ExecutionPolicy ByPass -c "irm -useb https://pixi.sh/install.ps1 | iex"Reopen the terminal afterwards so pixi is on your PATH.
git clone https://github.com/NGWPC/ripple1d-pipeline.git
cd ripple1d-pipelinepixi installThis installs Python, all Python dependencies, and the GDAL command-line tools into a project-local environment, and registers the ripple1d_pipeline package into it. There is no virtual environment to create or activate separately, pixi run <command> activates it automatically.
4. Configure (see Configuration below as well)
Copy example.env to .env and fill in the values for your machine.
mkdir C:\reference_data\flow_files
aws s3 sync s3://fimc-data/reference/nwm_return_period_flows C:\reference_data\flow_filesThe DEM and NWM flowline paths are also set in .env.
- Download the HEC-RAS v631 Setup executable
- Follow the install instructions, all default.
- Open HEC-RAS once to accept the Terms and Conditions.
The Ripple1d server runs in its own environment (it is not managed by this project's pixi environment) and must run on a Windows machine with HEC-RAS installed.
mkdir C:\venvs
cd /d C:\venvs
python -m venv ripple1d
cd ripple1d
Scripts\activate.bat
pip install git+https://github.com/NGWPC/ripple1d.git@v0.11.0
ripple1d start --thread_count <number less than total available CPUs>If the last command is successful, two new terminal windows will appear (Huey consumer and Flask api), which can be minimized.
Copy example.env to .env and fill in the values for your machine:
.env holds everything that varies per environment, as RP_* variables.
The source code has /ripple1d_pipeline/default_config.yaml file that has all defaults configs that alter behavior of pipeline.
To change a behavior value just for your machine copy config.example.yaml to config.yaml at the repo root and uncomment the keys you want to override. These settings are deep-merged over the defaults.
Everything runs through pixi run, which activates the environment before running any command. No activation step is needed separately.
A single collection:
pixi run python entrypoints/run_collection.py -c mip_02020008A list of collections (serially, plus pushing results to S3):
pixi run python entrypoints/run_batch.py -l "C:\collection_lists\test_collections.lst"Both accept --log-level (and --third-party-log-level); these can also be set via RP_LOG_LEVEL and RP_THIRD_PARTY_LOG_LEVEL in .env.
The notebooks in notebooks/ do the same work as run_collection.py, but provide more user control.
- Open the repo in VSCode and open
notebooks/setup.ipynb. - Select Kernel → the pixi environment (
.pixi\envs\dev\python.exe). Use thedevenvironment: it has everything the pipeline needs plus the dev tooling. - In the Parameters cell, set
collection_nameto the collection you want to process. - Run
setup.ipynbfirst, thenprocess.ipynb, thenqc.ipynb. - (Optional) Export the executed notebooks as HTML into the collection's working folder and send for quality review.
pixi run lint # ruff check .
pixi run format # ruff format .These run in the dev environment, which is the default environment plus ruff.
Following outputs are produced for each batch that is processed:
source_models: Folder containing source models data, which were conflated and used as source for creating submodels for NWM reaches
submodels: Folders for extracted HEC-RAS submodels for NWM reaches that are used to create FIMs
library: Folder containing FIM depth rasters per reach and per flow and downstream boundary condition
library_extent: Folder containing FIM extent rasters per reach and per flow and downstream boundary condition
qc: Folder containing data to evaluate quality of produced FIM library and scenarios
error_report.xlsx: Provide insight into the errors encountered during processing of each step
ripple.gpkg: Geopackage (SQLITE Database) containing records for reaches, models and scenarios
start_reaches.csv: Flows2FIM start file which can be used to create composite FIMs using Flows2FIM software