ngiab-data-preprocess 4.9.2__tar.gz → 5.0.0b1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. ngiab_data_preprocess-5.0.0b1/.dockerignore +6 -0
  2. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/.github/workflows/build_only.yml +1 -2
  3. ngiab_data_preprocess-5.0.0b1/.github/workflows/ci.yml +86 -0
  4. ngiab_data_preprocess-5.0.0b1/CONTRIBUTING.md +39 -0
  5. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/PKG-INFO +79 -46
  6. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/README.md +77 -44
  7. ngiab_data_preprocess-5.0.0b1/aws_tools/aws.dockerfile +28 -0
  8. ngiab_data_preprocess-4.9.2/modules/data_processing/create_realization.py → ngiab_data_preprocess-5.0.0b1/modules/data_processing/create_configs.py +266 -324
  9. ngiab_data_preprocess-5.0.0b1/modules/data_processing/create_realization.py +566 -0
  10. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_processing/dask_utils.py +34 -3
  11. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_processing/dataset_utils.py +20 -12
  12. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_processing/datasets.py +10 -6
  13. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_processing/file_paths.py +45 -18
  14. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_processing/forcings.py +28 -25
  15. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_processing/gpkg_utils.py +66 -57
  16. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_processing/graph_utils.py +68 -37
  17. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_processing/s3fs_utils.py +5 -3
  18. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_processing/subset.py +17 -10
  19. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/catchment/casam.txt +18 -0
  20. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/cfe.ini +10 -10
  21. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/lstm.yml +5 -5
  22. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/noah-owp-modular-init.namelist.input +11 -11
  23. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/snow17-params.txt +1 -1
  24. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/casam.json +15 -0
  25. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/cfe.json +16 -0
  26. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/dhbv2.json +14 -0
  27. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/dhbv2_daily.json +14 -0
  28. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/lstm.json +12 -0
  29. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/lstm_rust.json +13 -0
  30. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/multi-template.json +30 -0
  31. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/nom.json +15 -0
  32. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/sac-sma.json +14 -0
  33. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/sloth.json +19 -0
  34. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/snow17.json +15 -0
  35. ngiab_data_preprocess-5.0.0b1/modules/data_sources/config/modular_realization/summa.json +14 -0
  36. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/source_validation.py +35 -96
  37. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/__main__.py +3 -2
  38. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/views.py +33 -12
  39. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_cli/__main__.py +92 -95
  40. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_cli/arguments.py +56 -46
  41. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_cli/forcing_cli.py +13 -4
  42. ngiab_data_preprocess-5.0.0b1/modules/ngiab_data_cli/subset_cli.py +62 -0
  43. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_preprocess.egg-info/PKG-INFO +79 -46
  44. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_preprocess.egg-info/SOURCES.txt +42 -9
  45. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_preprocess.egg-info/entry_points.txt +1 -0
  46. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_preprocess.egg-info/requires.txt +1 -1
  47. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/pyproject.toml +6 -2
  48. ngiab_data_preprocess-5.0.0b1/stack.drawio.svg +4 -0
  49. ngiab_data_preprocess-5.0.0b1/tests/golden/config/cat-1555522-summa.json +14 -0
  50. ngiab_data_preprocess-5.0.0b1/tests/golden/config/cat-1555522.json +13 -0
  51. ngiab_data_preprocess-5.0.0b1/tests/golden/config/gage-10109001-summa.json +101 -0
  52. ngiab_data_preprocess-5.0.0b1/tests/golden/config/gage-10109001.json +883 -0
  53. ngiab_data_preprocess-5.0.0b1/tests/golden/geopackage/cat-1555522_subset.gpkg +0 -0
  54. ngiab_data_preprocess-5.0.0b1/tests/golden/geopackage/gage-10109001_subset.gpkg +0 -0
  55. {ngiab_data_preprocess-4.9.2/modules/data_sources/config → ngiab_data_preprocess-5.0.0b1/tests/golden}/realization/cfe-nom.json +2 -2
  56. {ngiab_data_preprocess-4.9.2/modules/data_sources/config → ngiab_data_preprocess-5.0.0b1/tests/golden}/realization/dhbv2-daily.json +21 -20
  57. {ngiab_data_preprocess-4.9.2/modules/data_sources/config → ngiab_data_preprocess-5.0.0b1/tests/golden}/realization/dhbv2.json +11 -8
  58. {ngiab_data_preprocess-4.9.2/modules/data_sources/config → ngiab_data_preprocess-5.0.0b1/tests/golden}/realization/lstm-py.json +8 -7
  59. {ngiab_data_preprocess-4.9.2/modules/data_sources/config → ngiab_data_preprocess-5.0.0b1/tests/golden}/realization/lstm-rs.json +8 -7
  60. ngiab_data_preprocess-5.0.0b1/tests/golden/realization/sacsma-nom.json +74 -0
  61. ngiab_data_preprocess-5.0.0b1/tests/golden/realization/snow17-nom-cfe.json +114 -0
  62. {ngiab_data_preprocess-4.9.2/modules/data_sources/config → ngiab_data_preprocess-5.0.0b1/tests/golden}/realization/summa.json +6 -5
  63. ngiab_data_preprocess-5.0.0b1/tests/golden_utils.py +227 -0
  64. ngiab_data_preprocess-5.0.0b1/tests/regen_goldens.py +168 -0
  65. ngiab_data_preprocess-5.0.0b1/tests/test_cli_args.py +184 -0
  66. ngiab_data_preprocess-5.0.0b1/tests/test_forcings_regression.py +308 -0
  67. ngiab_data_preprocess-5.0.0b1/tests/test_modular_config.py +216 -0
  68. ngiab_data_preprocess-5.0.0b1/tests/test_modular_realization.py +429 -0
  69. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/tests/test_ngiab_data_cli_regression.py +2 -0
  70. ngiab_data_preprocess-5.0.0b1/tests/test_summa_config_generation.py +584 -0
  71. ngiab_data_preprocess-4.9.2/modules/data_sources/config/realization/sacsma-nom.json +0 -74
  72. ngiab_data_preprocess-4.9.2/modules/data_sources/config/realization/snow17-nom-cfe.json +0 -114
  73. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/.github/pull_request_template.md +0 -0
  74. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/.github/workflows/publish.yml +0 -0
  75. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/.gitignore +0 -0
  76. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/CITATION.cff +0 -0
  77. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/LICENSE +0 -0
  78. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/ciroh-bgsafe.png +0 -0
  79. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/README.md +0 -0
  80. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/TBL_GENPARM.TBL +0 -0
  81. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/TBL_MPTABLE.TBL +0 -0
  82. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/TBL_SOILPARM.TBL +0 -0
  83. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/TBL_VEGPARM.TBL +0 -0
  84. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/basinParamInfo.txt +0 -0
  85. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/fileManager.txt +0 -0
  86. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/forcingFileList.txt +0 -0
  87. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/localParamInfo.txt +0 -0
  88. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/modelDecisions.txt +0 -0
  89. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/SUMMA/outputControl.txt +0 -0
  90. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/dhbv2-daily.yaml +0 -0
  91. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/dhbv2.yaml +0 -0
  92. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/sac-init.namelist.input +0 -0
  93. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/sac-params.txt +0 -0
  94. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/snow17-init.namelist.input +0 -0
  95. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/config/catchment/summa.input +0 -0
  96. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/ngen-routing-template.yaml +0 -0
  97. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/template.sql +0 -0
  98. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/data_sources/triggers.sql +0 -0
  99. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/__init__.py +0 -0
  100. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/static/css/console.css +0 -0
  101. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/static/css/main.css +0 -0
  102. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/static/css/toggle.css +0 -0
  103. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/static/js/console.js +0 -0
  104. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/static/js/data_processing.js +0 -0
  105. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/static/js/main.js +0 -0
  106. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/static/resources/loading.gif +0 -0
  107. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/static/resources/screenshot.jpg +0 -0
  108. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/map_app/templates/index.html +0 -0
  109. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_cli/custom_logging.py +0 -0
  110. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_preprocess.egg-info/dependency_links.txt +0 -0
  111. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/modules/ngiab_data_preprocess.egg-info/top_level.txt +0 -0
  112. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/setup.cfg +0 -0
  113. {ngiab_data_preprocess-4.9.2 → ngiab_data_preprocess-5.0.0b1}/tests/test_nan_impute.py +0 -0
@@ -0,0 +1,6 @@
1
+ .venv
2
+ .github
3
+ *.png
4
+ *.svg
5
+ *.md
6
+ *.cff
@@ -1,4 +1,4 @@
1
- name: Upload Python Package to PyPI when a Release is Created
1
+ name: Build Only
2
2
 
3
3
  on:
4
4
  pull_request:
@@ -24,4 +24,3 @@ jobs:
24
24
  - name: Build package
25
25
  run: |
26
26
  python -m build
27
-
@@ -0,0 +1,86 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+
7
+ concurrency:
8
+ group: ci-${{ github.ref }}
9
+ cancel-in-progress: true
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ lint:
16
+ name: Ruff (changed files only)
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0 # need history to diff this PR against its base branch
22
+
23
+ - uses: astral-sh/setup-uv@v6
24
+
25
+ - name: Lint & format-check the Python files this PR changed
26
+ run: |
27
+ base='${{ github.event.pull_request.base.sha }}'
28
+ head='${{ github.event.pull_request.head.sha }}'
29
+ mapfile -t files < <(git diff --name-only --diff-filter=ACMR "$base"..."$head" -- '*.py')
30
+ if [ ${#files[@]} -eq 0 ]; then
31
+ echo "No Python files changed -- nothing to lint."
32
+ exit 0
33
+ fi
34
+ printf 'Linting %s changed file(s):\n' "${#files[@]}"
35
+ printf ' %s\n' "${files[@]}"
36
+ # Keep this ruff version in sync with your pre-commit hook.
37
+ uvx ruff@0.11.9 check -- "${files[@]}"
38
+ uvx ruff@0.11.9 format --check -- "${files[@]}"
39
+
40
+ test:
41
+ name: pytest (unit · hermetic)
42
+ runs-on: ubuntu-latest
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ python-version: ["3.10", "3.11"]
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+ with:
50
+ fetch-depth: 0 # setuptools-scm derives the version from git history/tags
51
+
52
+ - uses: astral-sh/setup-uv@v6
53
+ with:
54
+ python-version: ${{ matrix.python-version }}
55
+ enable-cache: true
56
+
57
+ - name: Install project + dev group
58
+ run: uv sync
59
+
60
+ - name: Run unit tests (hermetic; excludes integration)
61
+ run: uv run pytest -m "not integration"
62
+
63
+ integration:
64
+ name: pytest (integration · live S3)
65
+ runs-on: ubuntu-latest
66
+ continue-on-error: true
67
+ timeout-minutes: 15 # bound it in case S3 stalls (the test caps itself at 600s)
68
+ strategy:
69
+ fail-fast: false
70
+ matrix:
71
+ python-version: ["3.10", "3.11"]
72
+ steps:
73
+ - uses: actions/checkout@v4
74
+ with:
75
+ fetch-depth: 0
76
+
77
+ - uses: astral-sh/setup-uv@v6
78
+ with:
79
+ python-version: ${{ matrix.python-version }}
80
+ enable-cache: true
81
+
82
+ - name: Install project + dev group
83
+ run: uv sync
84
+
85
+ - name: Run end-to-end integration tests (hit live AORC/NWM data)
86
+ run: uv run pytest -m integration --ignore tests/test_ngiab_data_cli_regression.py
@@ -0,0 +1,39 @@
1
+ # How to contribute
2
+
3
+ Anyone may contribute. You do not need to be affiliated with CIROH or any partner institution. The expectations below exist to keep the projects reproducible and reviewable, not to gatekeep.
4
+
5
+ ## Ways to contribute
6
+
7
+ File an issue (bugs, feature ideas, questions), open a pull request (code, configuration, tests, documentation), participate in GitHub Discussions, or improve the training and product docs.
8
+
9
+ ## Standard pull request workflow
10
+
11
+ - Open or comment on an issue describing the change, so effort is not duplicated.
12
+ - Fork the repository (or branch, if you have write access). Name branches descriptively.
13
+ - Make focused changes; keep pull requests as small as practical. Signed commits are recommended.
14
+ - Add or update tests where applicable, and update documentation and any changelog the repository maintains.
15
+ - State whether the change affects model behavior, input-data assumptions, configuration, calibration, reproducibility, performance, or output interpretation, so the right reviewer is engaged.
16
+ - Open a pull request against the default branch, complete the PR template if present, and reference the related issue.
17
+ - Pass automated checks (CI, linting, tests). A maintainer reviews; address feedback.
18
+
19
+ ## Contribution standards
20
+
21
+ Contributions are expected to be your own work (or properly attributed and compatibly licensed), to build and pass tests, to follow each repository's coding conventions, to include reasonable documentation, and to respect the Code of Conduct. Maintainers may request changes or, with explanation, decline contributions that fall outside project scope or that introduce incompatible licenses or unverifiable model artifacts.
22
+
23
+ ## Recognition
24
+
25
+ Contributions are recognized through Git history, release notes, and citation metadata. The project values non-code contributions — documentation, evaluation, issue triage, mentoring — as first-class.
26
+
27
+ ## Maintaining contributed models and components
28
+
29
+ Contributing a model, model configuration, or other substantial, separately identifiable component to NGIAB carries an ongoing responsibility: the contributor — or the institution or owner on whose behalf it was contributed — is expected to maintain it after integration. Maintenance means keeping the contribution working as the ecosystem evolves: updating it for changes in the NextGen framework, the hydrofabric, forcing formats, and the surrounding NGIAB/NRDS tooling; fixing defects attributable to the contribution; and responding to issues filed against it within a reasonable time. This responsibility attaches to substantial contributions (a BMI model, a standing NRDS configuration), not to one-off fixes to code that others maintain.
30
+
31
+ Because everything here is open source, maintenance can move: an owner who can no longer maintain a contribution may hand it off to another willing maintainer, the community may adopt it, or — if no one steps forward — it may be deprecated. The project does not guarantee to maintain contributed models on an owner's behalf.
32
+
33
+ **Unmaintained contributions.** If a contributed model or configuration breaks (for instance, after a framework or hydrofabric update) and the responsible owner is unresponsive for 30 days after a good-faith attempt to reach them, the maintainers may deprecate it or remove it from NGIAB, with notice and preservation of the public record.
34
+
35
+ ## Software stack
36
+
37
+ Most contributions will improve our subsetting/forcing/realization modules or our user interfaces. For our full software stack, see below.
38
+
39
+ ![software stack](./stack.drawio.svg)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngiab_data_preprocess
3
- Version: 4.9.2
3
+ Version: 5.0.0b1
4
4
  Summary: Graphical Tools for creating Next Gen Water model input data.
5
5
  Author-email: Josh Cunningham <jcunningham8@ua.edu>
6
6
  Project-URL: Homepage, https://github.com/CIROH-UA/NGIAB_data_preprocess
@@ -33,7 +33,7 @@ Requires-Dist: bokeh==3.8.2
33
33
  Requires-Dist: boto3
34
34
  Requires-Dist: numcodecs<0.16.0
35
35
  Requires-Dist: scipy>=1.15.3
36
- Requires-Dist: pyarrow
36
+ Requires-Dist: duckdb>=1.5.2
37
37
  Provides-Extra: eval
38
38
  Requires-Dist: ngiab_eval; extra == "eval"
39
39
  Provides-Extra: plot
@@ -52,33 +52,38 @@ This repository contains tools for preparing data to run a [NextGen](https://git
52
52
 
53
53
  ## Table of Contents
54
54
 
55
- 1. [What does this tool do?](#what-does-this-tool-do)
56
- 2. [Limitations](#limitations)
57
- - [Custom realizations](#custom-realizations)
58
- - [Calibration](#calibration)
59
- - [Evaluation](#evaluation)
60
- - [Visualisation](#visualisation)
61
- 3. [Requirements](#requirements)
62
- 4. [Installation and running](#installation-and-running)
63
- - [Running without install](#running-without-install)
64
- - [For uv installation](#for-uv-installation)
65
- - [For legacy pip installation](#for-legacy-pip-installation)
66
- - [Development installation](#development-installation)
67
- 5. [Map interface documentation](#map-interface-documentation)
68
- - [Running the map interface app](#running-the-map-interface-app)
69
- - [Using the map interace](#using-the-map-interface)
70
- 6. [CLI documentation](#cli-documentation)
71
- - [Running the CLI](#running-the-cli)
72
- - [Arguments](#arguments)
73
- - [Usage notes](#usage-notes)
74
- - [Examples](#examples)
75
- 7. [Realization information](#realization-information)
76
- - [NOAH + CFE](#noah--cfe-default)
77
- - [LSTM (Python)](#lstm-python)
78
- - [LSTM (Rust)](#lstm-rust)
79
- - [dHBV2.0 (hourly)](#dhbv20-hourly-mts)
80
- - [dHBV2.0 (daily)](#dhbv20-daily)
81
- - [SUMMA](#summa)
55
+ - [NGIAB Data Preprocess](#ngiab-data-preprocess)
56
+ - [Table of Contents](#table-of-contents)
57
+ - [What does this tool do?](#what-does-this-tool-do)
58
+ - [Limitations](#limitations)
59
+ - [Calibration](#calibration)
60
+ - [Evaluation](#evaluation)
61
+ - [Visualisation](#visualisation)
62
+ - [Requirements](#requirements)
63
+ - [Installation and running](#installation-and-running)
64
+ - [Running without install](#running-without-install)
65
+ - [For uv installation](#for-uv-installation)
66
+ - [For legacy pip installation](#for-legacy-pip-installation)
67
+ - [Development installation](#development-installation)
68
+ - [Map interface documentation](#map-interface-documentation)
69
+ - [Running the map interface app](#running-the-map-interface-app)
70
+ - [Using the map interface](#using-the-map-interface)
71
+ - [CLI documentation](#cli-documentation)
72
+ - [Running the CLI](#running-the-cli)
73
+ - [Arguments](#arguments)
74
+ - [Usage notes](#usage-notes)
75
+ - [Examples](#examples)
76
+ - [Realization information](#realization-information)
77
+ - [Defaults](#defaults)
78
+ - [NOAH + CFE (Default)](#noah--cfe-default)
79
+ - [LSTM (Python)](#lstm-python)
80
+ - [LSTM (Rust)](#lstm-rust)
81
+ - [dHBV2.0 (Hourly MTS)](#dhbv20-hourly-mts)
82
+ - [dHBV2.0 (Daily)](#dhbv20-daily)
83
+ - [SUMMA](#summa)
84
+ - [SNOW17](#snow17)
85
+ - [SAC-SMA](#sac-sma)
86
+ - [Custom](#custom)
82
87
 
83
88
  ## What does this tool do?
84
89
 
@@ -97,9 +102,6 @@ The raw forcing data is [nwm retrospective v3 forcing](https://noaa-nwm-retrospe
97
102
  ## Limitations
98
103
  This tool cannot do the following:
99
104
 
100
- ### Custom realizations
101
- This tool currently only outputs a single, default realization, which is described in "[Realization information](#realization-information)". Support for additional model configurations is planned, but not currently available.
102
-
103
105
  ### Calibration
104
106
  If available, this repository will download [calibrated parameters](https://communityhydrofabric.s3.us-east-1.amazonaws.com/index.html#hydrofabrics/community/gage_parameters/) from the [Community Hydrofabric](https://github.com/CIROH-UA/community_hf_patcher) AWS S3 bucket.
105
107
  However, many gages and catchments will not have such parameters available. In these cases, Data Preprocess will output realizations with default values.
@@ -248,11 +250,8 @@ Installed with uv: `uv run cli`
248
250
  - `--subset_type`: Specify the subset type. `nexus`: get everything flowing into the downstream nexus of the selected catchment. `catchment`: get everything flowing into the selected catchment.
249
251
  - `-f`, `--forcings`: Generate forcings for the given feature.
250
252
  - `-r`, `--realization`: Create a realization for the given feature.
251
- - `--lstm`: Configures the data for the [python lstm](https://github.com/ciroh-ua/lstm/).
252
- - `--lstm_rust`: Configures the data for the [rust lstm](https://github.com/ciroh-ua/rust-lstm-1025/).
253
- - `--dhbv2`: Configures the data for the hourly [dHBV2](https://github.com/mhpi/dhbv2).
254
- - `--dhbv2_daily`: Configures the data for the daily [dHBV2](https://github.com/mhpi/dhbv2).
255
- - `--summa`: Configures the data for the SUMMA model.
253
+ - `--models`: Configures the data for a user-specified model coupling, e.g., `--models sloth nom cfe`. See [Custom](#custom) for the full list of supported models and examples.
254
+ - `--routing`: Enables t-route for a `--models` run. This flag only changes preprocessor behavior if used with `--models`.
256
255
  - `--start_date START_DATE`, `--start START_DATE`: Start date for forcings/realization (format YYYY-MM-DD).
257
256
  - `--end_date END_DATE`, `--end END_DATE`: End date for forcings/realization (format YYYY-MM-DD).
258
257
  - `-o OUTPUT_NAME`, `--output_name OUTPUT_NAME`: Name of the output folder.
@@ -313,32 +312,66 @@ Installed with uv: `uv run cli`
313
312
 
314
313
  8. Prepare everything for an NGIAB LSTM run at a given gage:
315
314
  ```bash
316
- uvx ngiab-prep -i gage-10154200 -sfr --start 2022-01-01 --end 2022-02-28 --lstm
317
- # you can replace --lstm with any other model, like --lstm_rust, --dhbv2, --dhbv2_daily, --summa
315
+ uvx ngiab-prep -i gage-10154200 -sfr --start 2022-01-01 --end 2022-02-28 --models lstm --routing
316
+ # you can replace lstm with any other model in MODEL_REGISTRY, e.g. lstm_rust, dhbv2, dhbv2_daily, summa
317
+ ```
318
+
319
+ 9. Prepare everything for a custom NGIAB SLoTH + SNOW17 + CASAM + t-route run at a given gage:
320
+
321
+ ```bash
322
+ uvx ngiab-prep -i gage-10154200 -sfr --start 2022-01-01 --end 2022-02-28 --models sloth snow17 casam --routing
318
323
  ```
319
324
 
320
325
  # Realization information
321
326
 
322
- This tool currently offers three realizations.
327
+ This tool currently offers eight default realizations, as well as the ability to create custom realizations with user-passed arguments.
328
+
329
+ ## Defaults
323
330
 
324
- ## NOAH + CFE (Default)
331
+ ### NOAH + CFE (Default)
325
332
 
326
333
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/cfe-nom.json) is intended to be roughly comparable to earlier versions of the National Water Model.
327
334
  - [NOAH-OWP-Modular](https://github.com/NOAA-OWP/NOAH-OWP-Modular): A refactoring of Noah-MP, a land-surface model. Used to model groundwater properties.
328
335
  - [Conceptual Functional Equivalent (CFE)](https://github.com/NOAA-OWP/CFE): A simplified conceptual approximation of versions 1.2, 2.0, and 2.1 of the National Water Model. Used to model precipitation and evaporation.
329
336
  - [SLoTH](https://github.com/NOAA-OWP/SLoTH): A module used to feed through unchanged values. In this default configuration, it simply forces certain soil moisture and ice fraction properties to zero.
330
337
 
331
- ## LSTM (Python)
338
+ ### LSTM (Python)
332
339
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/lstm-py.json) will run the [python lstm](https://github.com/ciroh-ua/lstm/). It's designed to work with ngiab using [these example weights](https://github.com/CIROH-UA/lstm/tree/example_weights/trained_neuralhydrology_models) generously contributed by [jmframe/lstm](https://github.com/jmframe/lstm)
333
340
 
334
- ## LSTM (Rust)
341
+ ### LSTM (Rust)
335
342
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/lstm-rs.json) will run the [rust port](https://github.com/CIROH-UA/rust-lstm-1025/tree/main) of the python lstm above. It's an experimental drop in replacement that should produce identical results with a ~2-5x speedup depending on your setup.
336
343
 
337
- ## dHBV2.0 (Hourly MTS)
344
+ ### dHBV2.0 (Hourly MTS)
338
345
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/dhbv2.json) will run the [multi-timescale dHBV2.0 model](https://github.com/mhpi/dhbv2/tree/39379fd435747a3f765d1a2201d613f9f0087448). Weights and model attributes developed by Penn State's MHPI group.
339
346
 
340
- ## dHBV2.0 (Daily)
347
+ ### dHBV2.0 (Daily)
341
348
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/dhbv2-daily.json) will run the [daily dHBV2.0 model](https://github.com/mhpi/dhbv2/tree/39379fd435747a3f765d1a2201d613f9f0087448). Weights and model attributes developed by Penn State's MHPI group.
342
349
 
343
- ## SUMMA
350
+ ### SUMMA
344
351
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/summa.json) will run the [SUMMA](https://github.com/CIROH-UA/ngen/tree/ngiab/extern/summa) model (version linked is what's currently in nextgen in a box).
352
+
353
+ ### SNOW17
354
+
355
+ [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/snow17-nom-cfe.json) will run the [SNOW17](https://github.com/CIROH-UA/ngen/tree/ngiab/extern/snow17) model in conjunction with SLoTH, Noah-OWP-Modular, CFE, and t-route.
356
+
357
+ ### SAC-SMA
358
+
359
+ [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/sacsma-nom.json) will run the [SAC-SMA](https://github.com/CIROH-UA/ngen/tree/ngiab/extern/sac-sma) model in conjunction with Noah-OWP-Modular and t-route.
360
+
361
+ ## Custom
362
+
363
+ Users can now mix and match models to create custom realizations. Models supported by this capability are `sloth`, `nom`, `cfe`, `lstm`, `lstm_rust`, `dhbv2`, `dhbv2_daily`, `snow17`, `sac-sma`, `casam`, and `summa`. Note that `summa` derives its HRU ordering from the already-generated forcings file, so forcings must be created (`-f`) before running `--models summa`. This feature includes automated validation (i.e., a warning will appear if the preprocessor thinks a user has submitted an invalid list of models to couple).
364
+
365
+ To use this functionality, add the `--models` flag with the list of models you would like to couple together in the order that they should be run. To activate routing through t-route, append the `--routing` flag. Some examples include:
366
+
367
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models sloth nom cfe --routing --run` (Run SLoTH, Noah-OWP-Modular, CFE, and t-route)
368
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models sloth nom casam --routing --run` (Run SLotH, Noah-OWP-Modular, CASAM, and t-route)
369
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models dhbv2 --routing --run` (Run dHBV2 and t-route)
370
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models lstm --routing --run` (Run LSTM and t-route)
371
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models lstm_rust --routing --run` (Run Rust LSTM and t-route)
372
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models nom --run` (Run Noah-OWP-Modular standalone)
373
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models nom snow17 sac-sma --routing --run` (Run Noah-OWP-Modular, SNOW17, SAC-SMA, and t-route)
374
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models sloth snow17 casam --routing --run` (Run SLoTH, SNOW17, CASAM, and t-route)
375
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models snow17 --run` (Run SNOW17 standalone)
376
+
377
+ Please note: the `--models` flag cannot be used in conjunction with any of the default options listed above. In addition, the presence or absence of the `--routing` flag will not change any of the default realizations' inclusion of t-route (i.e., `--routing` only has an effect when used with `--models`).
@@ -10,33 +10,38 @@ This repository contains tools for preparing data to run a [NextGen](https://git
10
10
 
11
11
  ## Table of Contents
12
12
 
13
- 1. [What does this tool do?](#what-does-this-tool-do)
14
- 2. [Limitations](#limitations)
15
- - [Custom realizations](#custom-realizations)
16
- - [Calibration](#calibration)
17
- - [Evaluation](#evaluation)
18
- - [Visualisation](#visualisation)
19
- 3. [Requirements](#requirements)
20
- 4. [Installation and running](#installation-and-running)
21
- - [Running without install](#running-without-install)
22
- - [For uv installation](#for-uv-installation)
23
- - [For legacy pip installation](#for-legacy-pip-installation)
24
- - [Development installation](#development-installation)
25
- 5. [Map interface documentation](#map-interface-documentation)
26
- - [Running the map interface app](#running-the-map-interface-app)
27
- - [Using the map interace](#using-the-map-interface)
28
- 6. [CLI documentation](#cli-documentation)
29
- - [Running the CLI](#running-the-cli)
30
- - [Arguments](#arguments)
31
- - [Usage notes](#usage-notes)
32
- - [Examples](#examples)
33
- 7. [Realization information](#realization-information)
34
- - [NOAH + CFE](#noah--cfe-default)
35
- - [LSTM (Python)](#lstm-python)
36
- - [LSTM (Rust)](#lstm-rust)
37
- - [dHBV2.0 (hourly)](#dhbv20-hourly-mts)
38
- - [dHBV2.0 (daily)](#dhbv20-daily)
39
- - [SUMMA](#summa)
13
+ - [NGIAB Data Preprocess](#ngiab-data-preprocess)
14
+ - [Table of Contents](#table-of-contents)
15
+ - [What does this tool do?](#what-does-this-tool-do)
16
+ - [Limitations](#limitations)
17
+ - [Calibration](#calibration)
18
+ - [Evaluation](#evaluation)
19
+ - [Visualisation](#visualisation)
20
+ - [Requirements](#requirements)
21
+ - [Installation and running](#installation-and-running)
22
+ - [Running without install](#running-without-install)
23
+ - [For uv installation](#for-uv-installation)
24
+ - [For legacy pip installation](#for-legacy-pip-installation)
25
+ - [Development installation](#development-installation)
26
+ - [Map interface documentation](#map-interface-documentation)
27
+ - [Running the map interface app](#running-the-map-interface-app)
28
+ - [Using the map interface](#using-the-map-interface)
29
+ - [CLI documentation](#cli-documentation)
30
+ - [Running the CLI](#running-the-cli)
31
+ - [Arguments](#arguments)
32
+ - [Usage notes](#usage-notes)
33
+ - [Examples](#examples)
34
+ - [Realization information](#realization-information)
35
+ - [Defaults](#defaults)
36
+ - [NOAH + CFE (Default)](#noah--cfe-default)
37
+ - [LSTM (Python)](#lstm-python)
38
+ - [LSTM (Rust)](#lstm-rust)
39
+ - [dHBV2.0 (Hourly MTS)](#dhbv20-hourly-mts)
40
+ - [dHBV2.0 (Daily)](#dhbv20-daily)
41
+ - [SUMMA](#summa)
42
+ - [SNOW17](#snow17)
43
+ - [SAC-SMA](#sac-sma)
44
+ - [Custom](#custom)
40
45
 
41
46
  ## What does this tool do?
42
47
 
@@ -55,9 +60,6 @@ The raw forcing data is [nwm retrospective v3 forcing](https://noaa-nwm-retrospe
55
60
  ## Limitations
56
61
  This tool cannot do the following:
57
62
 
58
- ### Custom realizations
59
- This tool currently only outputs a single, default realization, which is described in "[Realization information](#realization-information)". Support for additional model configurations is planned, but not currently available.
60
-
61
63
  ### Calibration
62
64
  If available, this repository will download [calibrated parameters](https://communityhydrofabric.s3.us-east-1.amazonaws.com/index.html#hydrofabrics/community/gage_parameters/) from the [Community Hydrofabric](https://github.com/CIROH-UA/community_hf_patcher) AWS S3 bucket.
63
65
  However, many gages and catchments will not have such parameters available. In these cases, Data Preprocess will output realizations with default values.
@@ -206,11 +208,8 @@ Installed with uv: `uv run cli`
206
208
  - `--subset_type`: Specify the subset type. `nexus`: get everything flowing into the downstream nexus of the selected catchment. `catchment`: get everything flowing into the selected catchment.
207
209
  - `-f`, `--forcings`: Generate forcings for the given feature.
208
210
  - `-r`, `--realization`: Create a realization for the given feature.
209
- - `--lstm`: Configures the data for the [python lstm](https://github.com/ciroh-ua/lstm/).
210
- - `--lstm_rust`: Configures the data for the [rust lstm](https://github.com/ciroh-ua/rust-lstm-1025/).
211
- - `--dhbv2`: Configures the data for the hourly [dHBV2](https://github.com/mhpi/dhbv2).
212
- - `--dhbv2_daily`: Configures the data for the daily [dHBV2](https://github.com/mhpi/dhbv2).
213
- - `--summa`: Configures the data for the SUMMA model.
211
+ - `--models`: Configures the data for a user-specified model coupling, e.g., `--models sloth nom cfe`. See [Custom](#custom) for the full list of supported models and examples.
212
+ - `--routing`: Enables t-route for a `--models` run. This flag only changes preprocessor behavior if used with `--models`.
214
213
  - `--start_date START_DATE`, `--start START_DATE`: Start date for forcings/realization (format YYYY-MM-DD).
215
214
  - `--end_date END_DATE`, `--end END_DATE`: End date for forcings/realization (format YYYY-MM-DD).
216
215
  - `-o OUTPUT_NAME`, `--output_name OUTPUT_NAME`: Name of the output folder.
@@ -271,32 +270,66 @@ Installed with uv: `uv run cli`
271
270
 
272
271
  8. Prepare everything for an NGIAB LSTM run at a given gage:
273
272
  ```bash
274
- uvx ngiab-prep -i gage-10154200 -sfr --start 2022-01-01 --end 2022-02-28 --lstm
275
- # you can replace --lstm with any other model, like --lstm_rust, --dhbv2, --dhbv2_daily, --summa
273
+ uvx ngiab-prep -i gage-10154200 -sfr --start 2022-01-01 --end 2022-02-28 --models lstm --routing
274
+ # you can replace lstm with any other model in MODEL_REGISTRY, e.g. lstm_rust, dhbv2, dhbv2_daily, summa
275
+ ```
276
+
277
+ 9. Prepare everything for a custom NGIAB SLoTH + SNOW17 + CASAM + t-route run at a given gage:
278
+
279
+ ```bash
280
+ uvx ngiab-prep -i gage-10154200 -sfr --start 2022-01-01 --end 2022-02-28 --models sloth snow17 casam --routing
276
281
  ```
277
282
 
278
283
  # Realization information
279
284
 
280
- This tool currently offers three realizations.
285
+ This tool currently offers eight default realizations, as well as the ability to create custom realizations with user-passed arguments.
286
+
287
+ ## Defaults
281
288
 
282
- ## NOAH + CFE (Default)
289
+ ### NOAH + CFE (Default)
283
290
 
284
291
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/cfe-nom.json) is intended to be roughly comparable to earlier versions of the National Water Model.
285
292
  - [NOAH-OWP-Modular](https://github.com/NOAA-OWP/NOAH-OWP-Modular): A refactoring of Noah-MP, a land-surface model. Used to model groundwater properties.
286
293
  - [Conceptual Functional Equivalent (CFE)](https://github.com/NOAA-OWP/CFE): A simplified conceptual approximation of versions 1.2, 2.0, and 2.1 of the National Water Model. Used to model precipitation and evaporation.
287
294
  - [SLoTH](https://github.com/NOAA-OWP/SLoTH): A module used to feed through unchanged values. In this default configuration, it simply forces certain soil moisture and ice fraction properties to zero.
288
295
 
289
- ## LSTM (Python)
296
+ ### LSTM (Python)
290
297
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/lstm-py.json) will run the [python lstm](https://github.com/ciroh-ua/lstm/). It's designed to work with ngiab using [these example weights](https://github.com/CIROH-UA/lstm/tree/example_weights/trained_neuralhydrology_models) generously contributed by [jmframe/lstm](https://github.com/jmframe/lstm)
291
298
 
292
- ## LSTM (Rust)
299
+ ### LSTM (Rust)
293
300
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/lstm-rs.json) will run the [rust port](https://github.com/CIROH-UA/rust-lstm-1025/tree/main) of the python lstm above. It's an experimental drop in replacement that should produce identical results with a ~2-5x speedup depending on your setup.
294
301
 
295
- ## dHBV2.0 (Hourly MTS)
302
+ ### dHBV2.0 (Hourly MTS)
296
303
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/dhbv2.json) will run the [multi-timescale dHBV2.0 model](https://github.com/mhpi/dhbv2/tree/39379fd435747a3f765d1a2201d613f9f0087448). Weights and model attributes developed by Penn State's MHPI group.
297
304
 
298
- ## dHBV2.0 (Daily)
305
+ ### dHBV2.0 (Daily)
299
306
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/dhbv2-daily.json) will run the [daily dHBV2.0 model](https://github.com/mhpi/dhbv2/tree/39379fd435747a3f765d1a2201d613f9f0087448). Weights and model attributes developed by Penn State's MHPI group.
300
307
 
301
- ## SUMMA
308
+ ### SUMMA
302
309
  [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/summa.json) will run the [SUMMA](https://github.com/CIROH-UA/ngen/tree/ngiab/extern/summa) model (version linked is what's currently in nextgen in a box).
310
+
311
+ ### SNOW17
312
+
313
+ [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/snow17-nom-cfe.json) will run the [SNOW17](https://github.com/CIROH-UA/ngen/tree/ngiab/extern/snow17) model in conjunction with SLoTH, Noah-OWP-Modular, CFE, and t-route.
314
+
315
+ ### SAC-SMA
316
+
317
+ [This realization](https://github.com/CIROH-UA/NGIAB_data_preprocess/blob/main/modules/data_sources/config/realization/sacsma-nom.json) will run the [SAC-SMA](https://github.com/CIROH-UA/ngen/tree/ngiab/extern/sac-sma) model in conjunction with Noah-OWP-Modular and t-route.
318
+
319
+ ## Custom
320
+
321
+ Users can now mix and match models to create custom realizations. Models supported by this capability are `sloth`, `nom`, `cfe`, `lstm`, `lstm_rust`, `dhbv2`, `dhbv2_daily`, `snow17`, `sac-sma`, `casam`, and `summa`. Note that `summa` derives its HRU ordering from the already-generated forcings file, so forcings must be created (`-f`) before running `--models summa`. This feature includes automated validation (i.e., a warning will appear if the preprocessor thinks a user has submitted an invalid list of models to couple).
322
+
323
+ To use this functionality, add the `--models` flag with the list of models you would like to couple together in the order that they should be run. To activate routing through t-route, append the `--routing` flag. Some examples include:
324
+
325
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models sloth nom cfe --routing --run` (Run SLoTH, Noah-OWP-Modular, CFE, and t-route)
326
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models sloth nom casam --routing --run` (Run SLotH, Noah-OWP-Modular, CASAM, and t-route)
327
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models dhbv2 --routing --run` (Run dHBV2 and t-route)
328
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models lstm --routing --run` (Run LSTM and t-route)
329
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models lstm_rust --routing --run` (Run Rust LSTM and t-route)
330
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models nom --run` (Run Noah-OWP-Modular standalone)
331
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models nom snow17 sac-sma --routing --run` (Run Noah-OWP-Modular, SNOW17, SAC-SMA, and t-route)
332
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models sloth snow17 casam --routing --run` (Run SLoTH, SNOW17, CASAM, and t-route)
333
+ - `uv run cli -i cat-1555522 -sfr --start 2020-01-01 --end 2020-01-02 --source aorc --models snow17 --run` (Run SNOW17 standalone)
334
+
335
+ Please note: the `--models` flag cannot be used in conjunction with any of the default options listed above. In addition, the presence or absence of the `--routing` flag will not change any of the default realizations' inclusion of t-route (i.e., `--routing` only has an effect when used with `--models`).
@@ -0,0 +1,28 @@
1
+ FROM amazonlinux:2023 AS base
2
+ COPY --from=ghcr.io/astral-sh/uv:0.12.3 /uv /uvx /bin/
3
+ ENV UV_COMPILE_BYTECODE=1
4
+
5
+ RUN dnf -y install python3.11 python3.11-devel cmake gcc gcc-c++ make geos geos-devel
6
+ RUN ln -sf /usr/bin/python3.11 /usr/bin/python3 \
7
+ && ln -sf /usr/bin/python3.11 /usr/bin/python
8
+
9
+ FROM base AS build
10
+
11
+ RUN mkdir /app
12
+ WORKDIR /app/
13
+ RUN uv venv -p 3.11
14
+ ENV PATH="/app/.venv/bin:$PATH"
15
+ # appease exact-extract with the special scikit-build-core version
16
+ COPY . .
17
+ RUN uv build \
18
+ && echo "scikit-build-core<0.10" > /tmp/build-constraints.txt \
19
+ && uv pip install dist/ngiab_data_preprocess-*.whl --build-constraint /tmp/build-constraints.txt
20
+
21
+ FROM amazonlinux:2023 AS runtime
22
+
23
+ RUN dnf -y install python3.11 \
24
+ && dnf clean all \
25
+ && rm -rf /var/cache/dnf
26
+
27
+ COPY --from=build /app/.venv /app/.venv
28
+ ENV PATH="/app/.venv/bin:$PATH"