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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce5918f2e777427dfeaf61326148d4eb0603e0a93f13d94007666d5299240f57 |
|
MD5 | 9419bb5fcded5b713711a2fe12c0b17e |
|
BLAKE2b-256 | 4da14b4c8dc6ecfe578d4179d7e628eba009f17504c4e9d08f6f8f65453d5663 |
Hashes for ngiab_data_preprocess-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0e7c86f492991a875440db70e370851520d4471b6e7b09a7ddd73edd96aa551 |
|
MD5 | cb7b75eebafb7c1aee4a2cb50d5def0d |
|
BLAKE2b-256 | b601d9800ef7bb7adfe4d6400e2148a779f3412853d6fd24fd772375fa83ce77 |