diff --git a/README.md b/README.md index a6d370c..7114781 100644 --- a/README.md +++ b/README.md @@ -1,159 +1,150 @@ -# NextGen In A Box (NGIAB) +**NextGen In A Box (NGIAB)** -"NextGen In A Box" (NGIAB) is a containerized version of the NextGen National Water Resources Modeling Framework. +**Run the NextGen National Water Resources Modeling Framework locally with ease.** + +NGIAB provides a containerized and user-friendly solution for running the NextGen framework, allowing you to control inputs, configurations, and execution on your local machine. + +| | | +| --- | --- | +| ![alt text](https://ciroh.ua.edu/wp-content/uploads/2022/08/CIROHLogo_200x200.png) | Funding for this project was provided by the National Oceanic & Atmospheric Administration (NOAA), awarded to the Cooperative Institute for Research to Operations in Hydrology (CIROH) through the NOAA Cooperative Agreement with The University of Alabama (NA22NWS4320003). | [![ARM Build and push final image](https://github.com/CIROH-UA/NGIAB-CloudInfra/actions/workflows/docker_image_main_branch.yml/badge.svg)](https://github.com/CIROH-UA/NGIAB-CloudInfra/actions/workflows/docker_image_main_branch.yml) [![X86 Build and push final image](https://github.com/CIROH-UA/NGIAB-CloudInfra/actions/workflows/docker_image_main_x86.yml/badge.svg)](https://github.com/CIROH-UA/NGIAB-CloudInfra/actions/workflows/docker_image_main_x86.yml) +**Why NextGen In A Box?** -
- -
-The NextGen Water Resources Modeling Framework (NextGen) is a data-centric framework developed by the NOAA OWP team to enhance the forecasting of flooding and drought, improve water resource management, and protect lives, property, and the environment. - -The Cooperative Institute for Research to Operations in Hydrology (CIROH) along with Lynker has developed “NextGen In A Box” - ready-to-run, containerized and cloud-friendly version of NextGen framework, packaged with scripts to help prepare data and get you modeling more quickly. Leveraging open-source technical tools like Git, GitHub, CI/CD, Docker, NextGen In A Box fosters open research practices, enabling transparent and reproducible research outcomes within the NextGen framework. - -We are doing a case study : NWM run for Sipsey Fork, Black Warrior River -- We don’t want to run all of CONUS -- We want to run NextGen locally -- We want to have control over inputs / config. -- How can we do it? Answer: NextGen In A Box (NGIAB) - -This repository contains : -- **Dockerfile** for running NextGen Framework (docker/Dockerfile*) -- Documentation of how to run the model. (README.md) - -## Table of Contents -* [Prerequisites:](#prerequisites-) - + [Install docker](#install-docker-) - + [Install WSL on Windows](#Install-WSL-on-Windows-) - + [Download the input data in "ngen-data" folder from S3 bucket ](#download-the-input-data-in--ngen-data--folder-from-s3-bucket--) - - [Linux & Mac](#linux---mac) - * [Run NextGen-In-A-Box](#run-nextgen-in-a-box) - + [Clone CloudInfra repo](#clone-cloudinfra-repo) - + [How to run the model script?](#how-to-run-the-model-script-) - + [Output of the model script](#output-of-the-model-script) - - -## Prerequisites: - -### Install docker and validate docker is up: - - On *Windows*: - - [Install Docker Desktop on Windows](https://docs.docker.com/desktop/install/windows-install/#install-docker-desktop-on-windows) - - Once docker is installed, start Docker Destop. - - Open Powershell -> right click and `Run as an Administrator` - - Type `docker ps -a` to make sure docker is working. - - - On *Mac*: - - [Install docker on Mac](https://docs.docker.com/desktop/install/mac-install/) - - Once docker is installed, start Docker Desktop. - - Open terminal app - - Type `docker ps -a` to make sure docker is working. - - - On *Linux*: - - [Install docker on Linux](https://docs.docker.com/desktop/install/linux-install/) - - Follow similar steps as *Mac* for starting Docker and verifying the installation - -### Install WSL on Windows: - -1. Follow Microsofts latest [instructions](https://learn.microsoft.com/en-us/windows/wsl/install) to install wsl -2. Once this is complete, follow the instructions for linux inside your wsl terminal. - - -### Download the sample input data in "ngen-data" folder from S3 bucket : - -#### Linux ,Mac, WSL(Windows) - -```bash - mkdir -p NextGen/ngen-data - cd NextGen/ngen-data - wget --no-parent https://ciroh-ua-ngen-data.s3.us-east-2.amazonaws.com/AWI-004/AWI_09_004.tar.gz - tar -xf AWI_09_004.tar.gz - # to rename your folder - mv AWI_09_004 my_data -``` +- **Run NextGen Locally:** Experiment with the framework and customize configurations on your local machine. +- **Control Over Inputs:** Choose specific regions or basins for analysis and modify input data as needed. +- **Simplified Setup:** Utilize Docker containers for effortless deployment, avoiding complex software installations. +- **Open Research Practices:** Promote transparency and reproducibility through open-source tools like Git and GitHub. -### How to Generate Your Own Input Data? +**Case Study:** This repository demonstrates running NWM for Provo River Basin, UT -Follow steps in our [ngen-datastream Repo](https://github.com/CIROH-UA/ngen-datastream/tree/main) +**Repository Contents:** -### Case Study Map for the Sipsey Fork, Black Warrior River, AL +- Dockerfile for running the NextGen Framework +- Guide script (guide.sh) for easy execution +- README with instructions and documentation -![AGU_113060_03W_002](https://github.com/shahab122/NGIAB-CloudInfra/assets/28275758/cc7978da-081c-44ba-8877-0e235b5cca43) +**Getting Started** -## Run NextGen In A Box +**Prerequisites** -### Clone NGIAB-CloudInfra repository +**Windows:** +1. **Install WSL:** Head over to Microsoft's official documentation and follow their comprehensive guide on installing WSL: https://learn.microsoft.com/en-us/windows/wsl/install +2. **Install Docker Desktop:** Begin by downloading and installing Docker Desktop from the official website: https://docs.docker.com/desktop/install/windows-install/#install-docker-desktop-on-windows +3. **Start Docker Desktop:** After installation, launch the Docker Desktop application. +4. **Open WSL as Admin:** Right-click on the WSL icon and select "Run as Administrator". +5. **Verify Installation:** In the WSL window, type the command docker ps -a to check if Docker is running correctly. This command should display a list of Docker containers. -Navigate to NextGen directory and clone the repository using below commands: +**Mac:** +1. **Install Docker Desktop:** Download and install Docker Desktop for Mac from: https://docs.docker.com/desktop/install/mac-install/ +2. **Start Docker Desktop:** Launch the Docker Desktop application once the installation is complete. +3. **Open Terminal:** Open the Terminal application on your Mac. +4. **Verify Installation:** Similar to Windows, use the command docker ps -a in the Terminal to verify Docker is functioning as expected. -```bash - cd ../.. - git clone https://github.com/CIROH-UA/NGIAB-CloudInfra.git - git checkout main - cd NGIAB-CloudInfra -``` -Once you are in *NGIAB-CloudInfra* directory, you should see `guide.sh` in it. Now, we are ready to run the model using that script. +**Linux:** +1. **Install Docker:** The installation process for Linux varies depending on your distribution. Refer to the official documentation for detailed instructions: https://docs.docker.com/desktop/install/linux-install/ +2. **Start Docker and Verify:** Follow the same steps as described for Mac to start Docker and verify its installation using the docker ps -a command in the terminal. + +- **Input Data:** + - **Download Sample Data:** Use the provided commands to download sample data for the Sipsey Fork case study. + - **To generate your own data:** Refer to the [NGIAB-datapreprocessor](https://github.com/AlabamaWaterInstitute/NGIAB_data_preprocess) for instructions on generating custom input data. + - **To generate your own data and run using NGIAB:** Refer to the [ngen-datastream repository](https://github.com/CIROH-UA/ngen-datastream/tree/main) for instructions on generating custom input data. -### How to run the model script? +This section guides you through downloading and preparing the sample input data for the NextGen In A Box project. -#### WSL, Linux and Mac Steps: -Follow below steps to run `guide.sh` script +**Step 1: Create Project Directory** +- **Linux/Mac:** Open your terminal and go to your desired folder where you want to checkout repo and ngen-data folder and run the following commands: ```bash - ./guide.sh +mkdir -p NextGen/ngen-data ``` -- The script prompts the user to enter the file path for the input data directory where the forcing and config files are stored. -Run the following command and copy the path value: ```bash - # navigate to the data folder you created earlier - cd NextGen/ngen-data/my_data - pwd - # and copy the path - +cd NextGen/ngen-data ``` -where