Graphical Tools for creating Next Gen Water model input data.
Project description
This repository contains tools for preparing data to run a next gen simulation using NGIAB. The tools allow you to select a catchment of interest on an interactive map, choose a date range, and prepare the data with just a few clicks!
What does this tool do?
This tool prepares data to run a next gen simulation by creating a run package that can be used with NGIAB. It picks default data sources, including the v20.1 hydrofabric and nwm retrospective v3 forcing data.
Requirements
- This tool is officially supported on macOS or Ubuntu. To use it on Windows, please install WSL.
- GDAL needs to be installed.
- The 'ogr2ogr' command needs to work in your terminal.
sudo apt install gdal-bin
will install gdal and ogr2ogr on ubuntu / wsl
Installation and running
#optional but encouraged: create a virtual environment
python3 -m venv env
source env/bin/activate
# installing and running the tool
pip install ngiab_data_preprocess
python -m map_app
The first time you run this command, it will download the hydrofabric and model parameter files from Lynker Spatial. If you already have them, place conus.gpkg
and model_attributes.parquet
into modules/data_sources/
.
Development Installation
Installation steps
To install and run the tool, follow these steps:1. Clone the repository:
```bash
git clone https://github.com/CIROH-UA/NGIAB_data_preprocess
cd NGIAB_data_preprocess
```
2. Create a virtual environment and activate it:
```bash
python3 -m venv env
source env/bin/activate
```
3. Install the tool:
```bash
pip install -e .
```
4. Run the map app:
```bash
python -m map_app
```
Usage
Running the command python -m map_app
will open the app in a new browser tab. Alternatively, you can manually open it by going to http://localhost:5000 with the app running.
To use the tool:
- Select the catchment you're interested in on the map.
- Pick the time period you want to simulate.
- Click the following buttons in order:
- Create subset gpkg
- Create Forcing from Zarrs
- Create Realization
Once all the steps are finished, you can run NGIAB on the folder shown underneath the subset button.
Note: When using the tool, the output will be stored in the ./output/<your-first-catchment>/
folder. There is no overwrite protection on the folders.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ngiab_data_preprocess-1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b2019fe60e7be39ac971871d380734caeab256fb4e99db30e076fd5ffe541d8 |
|
MD5 | d0846a5d80e9defa756fb10696f5a352 |
|
BLAKE2b-256 | 7ca282d0b10b1118d96faadf9c0b95e0533eddba2d97dbcc1f0610e070cc38a7 |
Hashes for ngiab_data_preprocess-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed1b74dc32e79d19aa18050adbc54cc4b1c28d91932fe0bcaf655db33f4f2a7a |
|
MD5 | 06452f0545864d099b3e1b0b1e29f136 |
|
BLAKE2b-256 | 8fc3a6aa4d895289e08fdaa84308b801e430fe9040361ceb8721901a585d2c84 |