generated from NOAA-OWP/owp-open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d1f7f6
commit 0a36f02
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Running Snow17 in NextGen with Sample Data | ||
|
||
See general [instructions](https://github.com/NOAA-OWP/ngen/wiki/NGen-Tutorial#running-cfe) for building models in the ngen framework. | ||
|
||
### Build | ||
``` | ||
git clone https://github.com/noaa-owp/ngen && cd ngen | ||
git submodule update --init --recursive | ||
``` | ||
|
||
- #### CFE | ||
``` | ||
git submodule update --remote extern/cfe/cfe | ||
cmake -B extern/cfe/cmake_build -S extern/cfe/cfe/ -DNGEN=ON | ||
make -C extern/cfe/cmake_build | ||
``` | ||
- #### fortran bmi | ||
``` | ||
cmake -B extern/iso_c_fortran_bmi/cmake_build -S extern/iso_c_fortran_bmi | ||
make -C extern/iso_c_fortran_bmi/cmake_build | ||
``` | ||
- #### Snow17 | ||
``` | ||
git clone https://github.com/NOAA-OWP/snow17.git ./extern | ||
cmake -B extern/snow17/cmake_build -S extern/snow17 | ||
cmake --build extern/snow17/cmake_build --target all | ||
``` | ||
- #### PET | ||
``` | ||
cmake -B extern/evapotranspiration/cmake_build -S extern/evapotranspiration/evapotranspiration/ | ||
make -C extern/evapotranspiration/cmake_build/ | ||
``` | ||
- #### Build [SLoTH](https://github.com/NOAA-OWP/SLoTH) using the following instructions. SLoTH bmi provides dummy values for bmi input variables that are not used in the realization. | ||
``` | ||
cd extern/sloth/ && git checkout latest | ||
git submodule update --init --recursive | ||
cd ../.. | ||
cmake -B extern/sloth/cmake_build -S extern/sloth/ | ||
make -C extern/sloth/cmake_build | ||
``` | ||
- #### NGEN | ||
``` | ||
cmake -B cmake_build -S . -DBMI_C_LIB_ACTIVE=ON -DBMI_FORTRAN_ACTIVE=ON | ||
make -j4 -C cmake_build | ||
``` | ||
### Run | ||
Pre-process step for configuration and data pathing | ||
``` | ||
tar -xzvf extern/snow17/test_cases/ex1.tgz extern/snow17/test_cases/ | ||
cp extern/snow17/configs/example_bmi_multi_realization_config_w_snow17.json data | ||
cp extern/snow17/configs/snow17-init-cat-27.namelist.input data/bmi/fortran/snow17-init-cat-27.namelist.input | ||
``` | ||
Integrated models (SLoTH+PET+Snow17+CFE) example | ||
``` | ||
./cmake_build/ngen data/catchment_data.geojson cat-27 data/nexus_data.geojson nex-26 data/example_bmi_multi_realization_config_w_snow17.json | ||
``` | ||