A small example package
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
To install and run the tool, follow these steps:
-
Clone the repository:
git clone https://github.com/CIROH-UA/NGIAB_data_preprocess cd NGIAB_data_preprocess
-
Create a virtual environment and activate it:
python3 -m venv env source env/bin/activate
-
Install the tool:
pip install -e .
-
Run the map app:
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/
.
If step 4 does not work, run the following:
touch .dev
python -m map_app
This .dev file in the root folder disables the automatic browser opening so you will need to manually open http://localhost:5000 after running the python -m map_app
command.
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-0.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6587d71c27fbaf0cab7ab9e2c316b685eb32b3086068bdf744029fd75686a88c |
|
MD5 | 3a599a07c0c1a8622ce06507f63d0e53 |
|
BLAKE2b-256 | 892e270ea223867dfecaf558d023585218b1486de2bfea335c81fc5a493373d2 |
Hashes for ngiab_data_preprocess-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb4037ae51d4a6f8caa0503f16d540df5b547e43351726914b06adbdaf0fb66f |
|
MD5 | 447d8922c3f538de1f79c3b21589a654 |
|
BLAKE2b-256 | 5c066a9a6c6050beb5ead62a3145b2a1af082a7d6dc08cefb9976fe4ed2e6923 |