dhbv2 0.5.0__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 (123) hide show
  1. dhbv2-0.5.0/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
  2. dhbv2-0.5.0/.github/ISSUE_TEMPLATE/documentation.md +29 -0
  3. dhbv2-0.5.0/.github/ISSUE_TEMPLATE/feature-request.md +32 -0
  4. dhbv2-0.5.0/.github/PULL_REQUEST_TEMPLATE.md +31 -0
  5. dhbv2-0.5.0/.github/workflows/build-wheels.yaml +56 -0
  6. dhbv2-0.5.0/.github/workflows/lint.yaml +34 -0
  7. dhbv2-0.5.0/.github/workflows/test-wheels.yaml +51 -0
  8. dhbv2-0.5.0/.gitignore +189 -0
  9. dhbv2-0.5.0/.pre-commit-config.yaml +27 -0
  10. dhbv2-0.5.0/LICENSE +31 -0
  11. dhbv2-0.5.0/PKG-INFO +236 -0
  12. dhbv2-0.5.0/README.md +168 -0
  13. dhbv2-0.5.0/docs/1-module_setup.md +169 -0
  14. dhbv2-0.5.0/docs/2-example_data.md +90 -0
  15. dhbv2-0.5.0/docs/3-run_standalone.md +40 -0
  16. dhbv2-0.5.0/docs/4-run_ngen.md +315 -0
  17. dhbv2-0.5.0/docs/5-run_ngiab.md +37 -0
  18. dhbv2-0.5.0/docs/6-routing.md +138 -0
  19. dhbv2-0.5.0/docs/7-validation.md +33 -0
  20. dhbv2-0.5.0/docs/CHANGELOG.md +27 -0
  21. dhbv2-0.5.0/docs/CONTRIBUTING.md +40 -0
  22. dhbv2-0.5.0/ngen_resources/README.md +22 -0
  23. dhbv2-0.5.0/ngen_resources/data/dhbv_2/config/bmi_cat-2453.yaml +52 -0
  24. dhbv2-0.5.0/ngen_resources/data/dhbv_2/config/bmi_cat-2454.yaml +52 -0
  25. dhbv2-0.5.0/ngen_resources/data/dhbv_2/config/bmi_cat-2455.yaml +52 -0
  26. dhbv2-0.5.0/ngen_resources/data/dhbv_2/config/routing_config.yaml +98 -0
  27. dhbv2-0.5.0/ngen_resources/data/dhbv_2/realizations/realization_cat-2453.json +40 -0
  28. dhbv2-0.5.0/ngen_resources/data/dhbv_2/realizations/realization_multi_cat.json +123 -0
  29. dhbv2-0.5.0/ngen_resources/data/dhbv_2/realizations/realization_nc_cat-2453.json +39 -0
  30. dhbv2-0.5.0/ngen_resources/data/dhbv_2/realizations/realization_troute_cat-2453.json +43 -0
  31. dhbv2-0.5.0/ngen_resources/data/dhbv_2_mts/config/bmi_cat-2453.yaml +42 -0
  32. dhbv2-0.5.0/ngen_resources/data/dhbv_2_mts/config/bmi_cat-2454.yaml +42 -0
  33. dhbv2-0.5.0/ngen_resources/data/dhbv_2_mts/config/bmi_cat-2455.yaml +42 -0
  34. dhbv2-0.5.0/ngen_resources/data/dhbv_2_mts/config/routing_config.yaml +98 -0
  35. dhbv2-0.5.0/ngen_resources/data/dhbv_2_mts/realizations/realization_cat-2453.json +40 -0
  36. dhbv2-0.5.0/ngen_resources/data/dhbv_2_mts/realizations/realization_multi_cat.json +123 -0
  37. dhbv2-0.5.0/ngen_resources/data/dhbv_2_mts/realizations/realization_nc_cat-2453.json +39 -0
  38. dhbv2-0.5.0/ngen_resources/data/dhbv_2_mts/realizations/realization_troute_cat-2453.json +43 -0
  39. dhbv2-0.5.0/ngen_resources/data/forcing/camels_subset_2008-01-09 00_00_00_2010-12-30 23_00_00.nc +0 -0
  40. dhbv2-0.5.0/ngen_resources/data/forcing/depr/camels_subset_2008-01-09 00_00_00_2015-12-30 23_00_00.nc +0 -0
  41. dhbv2-0.5.0/ngen_resources/data/forcing/depr/cat-2453_2008-01-09 00_00_00_2015-12-30 23_00_00.csv +69913 -0
  42. dhbv2-0.5.0/ngen_resources/data/forcing/depr/cat-2454_2008-01-09 00_00_00_2015-12-30 23_00_00.csv +69913 -0
  43. dhbv2-0.5.0/ngen_resources/data/forcing/depr/cat-2455_2008-01-09 00_00_00_2015-12-30 23_00_00.csv +69913 -0
  44. dhbv2-0.5.0/ngen_resources/data/geo/camels_attrs.csv +10 -0
  45. dhbv2-0.5.0/ngen_resources/data/geo/camels_subset_hf2.gpkg +0 -0
  46. dhbv2-0.5.0/ngen_resources/docker/ngen_dhbv2.dockerfile +306 -0
  47. dhbv2-0.5.0/pyproject.toml +155 -0
  48. dhbv2-0.5.0/routing/data/attribute_statistics_hydrofabric_v2.2.json +7 -0
  49. dhbv2-0.5.0/routing/data/catchments.csv +4 -0
  50. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_0/c/0 +0 -0
  51. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_0/c/1 +0 -0
  52. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_0/c/2 +0 -0
  53. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_0/c/3 +0 -0
  54. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_0/c/4 +0 -0
  55. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_0/c/5 +0 -0
  56. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_0/c/6 +0 -0
  57. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_0/c/7 +0 -0
  58. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_0/zarr.json +40 -0
  59. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_1/c/0 +0 -0
  60. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_1/c/1 +0 -0
  61. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_1/c/2 +0 -0
  62. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_1/c/3 +0 -0
  63. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_1/c/4 +0 -0
  64. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_1/c/5 +0 -0
  65. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_1/c/6 +0 -0
  66. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_1/c/7 +0 -0
  67. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/indices_1/zarr.json +40 -0
  68. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/order/c/0 +0 -0
  69. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/order/c/1 +0 -0
  70. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/order/c/2 +0 -0
  71. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/order/c/3 +0 -0
  72. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/order/c/4 +0 -0
  73. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/order/c/5 +0 -0
  74. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/order/c/6 +0 -0
  75. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/order/c/7 +0 -0
  76. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/order/zarr.json +40 -0
  77. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/values/c/0 +0 -0
  78. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/values/c/1 +0 -0
  79. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/values/c/2 +0 -0
  80. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/values/c/3 +0 -0
  81. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/values/zarr.json +37 -0
  82. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_conus_adjacency.zarr/zarr.json +16 -0
  83. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/wb-2455/indices_0/c/0 +0 -0
  84. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/wb-2455/indices_0/zarr.json +40 -0
  85. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/wb-2455/indices_1/c/0 +0 -0
  86. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/wb-2455/indices_1/zarr.json +40 -0
  87. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/wb-2455/order/c/0 +0 -0
  88. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/wb-2455/order/zarr.json +40 -0
  89. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/wb-2455/values/c/0 +0 -0
  90. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/wb-2455/values/zarr.json +37 -0
  91. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/wb-2455/zarr.json +18 -0
  92. dhbv2-0.5.0/routing/data/hydrofabric_v2.2_gages_conus_adjacency.zarr/zarr.json +5 -0
  93. dhbv2-0.5.0/routing/data/runoff/chunks/1V5MFK9DPVEWS681HKJG +0 -0
  94. dhbv2-0.5.0/routing/data/runoff/chunks/JPEGBHCMJEWJKG3KZGP0 +0 -0
  95. dhbv2-0.5.0/routing/data/runoff/chunks/VWFMSD9HGND1PA6A27TG +0 -0
  96. dhbv2-0.5.0/routing/data/runoff/chunks/ZBZN0P4NFCMQ9CWXK7H0 +0 -0
  97. dhbv2-0.5.0/routing/data/runoff/manifests/8HQ7RZY08PQGKNCM85ZG +0 -0
  98. dhbv2-0.5.0/routing/data/runoff/manifests/J61R3FK2CBJNRSG8RG70 +0 -0
  99. dhbv2-0.5.0/routing/data/runoff/manifests/X7NPMMX26KGR28V5ZCFG +0 -0
  100. dhbv2-0.5.0/routing/data/runoff/refs/branch.main/ref.json +1 -0
  101. dhbv2-0.5.0/routing/data/runoff/snapshots/070V0FGE7C10H88G3A8G +0 -0
  102. dhbv2-0.5.0/routing/data/runoff/snapshots/1CECHNKREP0F1RSTCMT0 +0 -0
  103. dhbv2-0.5.0/routing/data/runoff/transactions/070V0FGE7C10H88G3A8G +0 -0
  104. dhbv2-0.5.0/routing/make_catchment_csv.py +61 -0
  105. dhbv2-0.5.0/routing/prepare_runoff.py +113 -0
  106. dhbv2-0.5.0/scripts/compare_daily_mts.py +225 -0
  107. dhbv2-0.5.0/scripts/daily_forward_example.py +149 -0
  108. dhbv2-0.5.0/scripts/mts_forward_example.py +140 -0
  109. dhbv2-0.5.0/scripts/plot_runoff.py +155 -0
  110. dhbv2-0.5.0/scripts/utils/add_attrs_to_bmi.py +44 -0
  111. dhbv2-0.5.0/scripts/utils/add_pet.py +48 -0
  112. dhbv2-0.5.0/scripts/utils/make_gpkg.py +83 -0
  113. dhbv2-0.5.0/scripts/utils/prepare_ngen_data.py +186 -0
  114. dhbv2-0.5.0/src/dhbv2/__init__.py +13 -0
  115. dhbv2-0.5.0/src/dhbv2/_version.py +34 -0
  116. dhbv2-0.5.0/src/dhbv2/bmi.py +1167 -0
  117. dhbv2-0.5.0/src/dhbv2/log.py +58 -0
  118. dhbv2-0.5.0/src/dhbv2/mts_bmi.py +1203 -0
  119. dhbv2-0.5.0/src/dhbv2/pet.py +208 -0
  120. dhbv2-0.5.0/src/dhbv2/utils.py +79 -0
  121. dhbv2-0.5.0/tests/dhbv2_mts_cat-2453_runoff_benchmark.npy +0 -0
  122. dhbv2-0.5.0/tests/test_bmi.py +224 -0
  123. dhbv2-0.5.0/tests/test_mts_bmi.py +56 -0
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: 🐛 Bug Report
3
+ about: Identify a bug or concern
4
+ labels: bug_report
5
+ assignees: leoglonz
6
+ ---
7
+
8
+ <!--
9
+ Before creating a new bug report, please confirm one does not already exist for your issue.
10
+ -->
11
+
12
+ ## Problem
13
+
14
+ ### Actual Behavior
15
+
16
+ <!-- Provide a clear and concise description of the problem or bug that you encountered.
17
+
18
+ Is this a known issue?
19
+ -->
20
+
21
+ ### Expected Behavior
22
+
23
+ <!-- What was the expected behavior in this scenario? This will help us identify the source of the issue.
24
+ -->
25
+
26
+ ## Steps to Reproduce
27
+
28
+ <!-- Detail steps to recreate the issue as best you can. If we can replicate it on our end we can more readily address the core issue.
29
+
30
+ 1.
31
+ 2.
32
+ ...
33
+ -->
34
+
35
+ ## Proposed Solution (Optional)
36
+
37
+ <!-- We are certainly open to suggestions if you have ideas about root causes for the issue or bug, particularly if it is nuanced or more complex.
38
+ -->
39
+
40
+ ## Additional Context
41
+
42
+ <!-- Add any other context or screenshots related to the issue here.
43
+ -->
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: 📖 Documentation Issue/Suggestion
3
+ about: Report problems with the docs or suggest improvements
4
+ labels: documentation
5
+ assignees: leoglonz
6
+ ---
7
+
8
+ <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.-->
9
+ <!--You can feel free to delete the sections that do not apply.-->
10
+
11
+ ### Problem
12
+
13
+ <!--
14
+ If you are referencing an existing piece of documentation or example please provide a link.
15
+
16
+ * I found [...] to be unclear because [...]
17
+ * [...] made me think that [...] when really it should be [...]
18
+ * There is no example showing how to do [...]
19
+ -->
20
+
21
+ ### Suggested Improvement
22
+
23
+ <!--
24
+ If you have an idea to improve the documentation please suggest it here
25
+
26
+ * This line should be be changed to say [...]
27
+ * Include a paragraph explaining [...]
28
+ * Add a figure showing [...]
29
+ -->
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: 🛠️ Enhancement/Feature Request
3
+ about: Suggest an improvement or new feature
4
+ labels: feature_request
5
+ assignees: leoglonz
6
+ ---
7
+
8
+ <!--
9
+ Before creating a new feature request please search the issues for relevant feature requests.
10
+ -->
11
+
12
+ ## Problem
13
+
14
+ <!-- Provide a clear and concise description of what problem this feature will solve. For example:
15
+
16
+ * I'm always frustrated when [...] because [...]
17
+ * I would like it if [...] happened when I [...] because [...]
18
+ -->
19
+
20
+ ## Proposed Solution
21
+
22
+ <!-- Provide a clear and concise description of a way to accomplish what you want. For example:
23
+
24
+ * Add an option so that when [...] [...] will happen
25
+ -->
26
+
27
+ ## Additional context
28
+
29
+ <!-- Add any other context or screenshots about the feature request here. You can also include links to examples of other programs that have something similar to your request. For example:
30
+
31
+ * Another project [...] solved this by [...]
32
+ -->
@@ -0,0 +1,31 @@
1
+ ## Issue Addressed
2
+
3
+ <!-- Give a brief ~1 sentence overview of the main addition proposed by this pull request.
4
+ -->
5
+
6
+ ## Description
7
+
8
+ <!-- Describe how you addressed the bug/feature request, what choices you made and why. Changes can be listed as bullet point;
9
+
10
+ - ...
11
+ - ...
12
+
13
+ -->
14
+
15
+ ## Type of Change
16
+
17
+ - [ ] Bug fix (non-breaking change which fixes an issue)
18
+ - [ ] New feature (non-breaking change which adds functionality)
19
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
20
+ - [ ] Code cleanup/refactor
21
+ - [ ] Documentation update
22
+
23
+ Other (please specify):
24
+
25
+ ## Checklist
26
+
27
+ - [ ] Branch is up to date with master
28
+ - [ ] Updated tests or added new tests
29
+ - [ ] Tests & pre-commit hooks pass
30
+ - [ ] Updated documentation (if applicable)
31
+ - [ ] Code follows established style and conventions
@@ -0,0 +1,56 @@
1
+ name: Build and Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch: # Allow manual triggering
7
+
8
+ jobs:
9
+ build:
10
+ name: Build wheel and sdist
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v6.0.2
14
+ with:
15
+ fetch-depth: 0 # Full history for version tags (hatch-vcs needs this)
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v6.2.0
19
+ with:
20
+ python-version: '3.12'
21
+
22
+ - name: Install build
23
+ run: pip install build
24
+
25
+ - name: Build wheel and sdist
26
+ run: python -m build
27
+
28
+ - name: Verify wheel
29
+ run: |
30
+ pip install --find-links dist dhbv2
31
+ python -c "import dhbv2; print(dhbv2.__version__)"
32
+
33
+ - uses: actions/upload-artifact@v6.0.0
34
+ with:
35
+ name: dist
36
+ path: dist/
37
+ if-no-files-found: error
38
+
39
+ publish:
40
+ name: Publish to PyPI
41
+ needs: [build]
42
+ runs-on: ubuntu-latest
43
+ permissions:
44
+ id-token: write # Required for trusted publishing
45
+
46
+ steps:
47
+ - uses: actions/download-artifact@v7.0.0
48
+ with:
49
+ name: dist
50
+ path: dist
51
+
52
+ - name: Display artifacts
53
+ run: ls -lh dist/
54
+
55
+ - name: Publish to PyPI
56
+ uses: pypa/gh-action-pypi-publish@v1.13.0
@@ -0,0 +1,34 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ matrix:
14
+ os: [ubuntu-latest]
15
+ python-version: ['3.9', '3.12', '3.13']
16
+
17
+ steps:
18
+ - name: Checkout code
19
+ uses: actions/checkout@v6.0.2
20
+
21
+ - name: Install uv + Python
22
+ uses: astral-sh/setup-uv@v7.2.1
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ enable-cache: true
26
+
27
+ - name: Install dependencies
28
+ run: uv sync --extra dev
29
+
30
+ - name: Run Ruff check
31
+ run: uv run ruff check . --config pyproject.toml --output-format=github
32
+
33
+ - name: Run Ruff format check
34
+ run: uv run ruff format . --config pyproject.toml --check
@@ -0,0 +1,51 @@
1
+ name: Test Build
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ paths:
7
+ - 'pyproject.toml'
8
+ - '.github/workflows/build-wheels.yaml'
9
+ - '.github/workflows/test-wheels.yaml'
10
+ pull_request:
11
+ branches: [master]
12
+ paths:
13
+ - 'pyproject.toml'
14
+ - '.github/workflows/build-wheels.yaml'
15
+ - '.github/workflows/test-wheels.yaml'
16
+ workflow_dispatch:
17
+
18
+ jobs:
19
+ test_build:
20
+ name: Test build on ${{ matrix.os }}
21
+ runs-on: ${{ matrix.os }}
22
+ strategy:
23
+ matrix:
24
+ os: [ubuntu-latest, windows-latest, macos-latest]
25
+
26
+ steps:
27
+ - uses: actions/checkout@v6.0.2
28
+ with:
29
+ fetch-depth: 0
30
+
31
+ - name: Set up Python
32
+ uses: actions/setup-python@v6.2.0
33
+ with:
34
+ python-version: '3.12'
35
+
36
+ - name: Install build
37
+ run: pip install build
38
+
39
+ - name: Build wheel and sdist
40
+ run: python -m build
41
+
42
+ - name: Install and verify
43
+ run: |
44
+ pip install --find-links dist dhbv2
45
+ python -c "import dhbv2; print(dhbv2.__version__)"
46
+
47
+ - uses: actions/upload-artifact@v6.0.0
48
+ with:
49
+ name: test-dist-${{ matrix.os }}
50
+ path: dist/
51
+ retention-days: 7
dhbv2-0.5.0/.gitignore ADDED
@@ -0,0 +1,189 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # PyPI configuration file
171
+ .pypirc
172
+
173
+ # Ignore model save files (too large)
174
+ *.pt
175
+
176
+ # Scratch / development / old / and other temporary files
177
+ *scratch*
178
+ *_dev*
179
+ *_old*
180
+ temp/
181
+ tmp/
182
+ *.tmp
183
+ _version.py
184
+
185
+ awi_forcings*
186
+ dhbv_forcings*
187
+ model/
188
+ model/README.md
189
+ output/
@@ -0,0 +1,27 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ exclude: "mkdocs.*\\.yml$"
9
+ - id: debug-statements
10
+ - id: check-toml
11
+
12
+ - repo: https://github.com/astral-sh/ruff-pre-commit
13
+ rev: v0.14.14
14
+ hooks:
15
+ - id: ruff-check
16
+ types_or: [python, pyi, jupyter]
17
+ args: [--fix, --config, pyproject.toml]
18
+ - id: ruff-format
19
+ types_or: [python, pyi, jupyter]
20
+ args: [--config, pyproject.toml]
21
+
22
+ - repo: https://github.com/kynan/nbstripout
23
+ rev: 0.8.2
24
+ hooks:
25
+ - id: nbstripout
26
+ types: [jupyter]
27
+ language_version: python3
dhbv2-0.5.0/LICENSE ADDED
@@ -0,0 +1,31 @@
1
+ Non-Commercial Software License Agreement
2
+
3
+ By downloading the dhbv2 software (the “Software”) you agree to
4
+ the following terms of use:
5
+ Copyright (c) 2025, The Pennsylvania State University (“PSU”). All rights reserved.
6
+
7
+ 1. PSU hereby grants to you a perpetual, nonexclusive and worldwide right, privilege and
8
+ license to use, reproduce, modify, display, and create derivative works of Software for all
9
+ non-commercial purposes only. You may not use Software for commercial purposes without
10
+ prior written consent from PSU. Queries regarding commercial licensing should be directed
11
+ to The Office of Technology Management at 814.865.6277 or otminfo@psu.edu.
12
+ 2. Neither the name of the copyright holder nor the names of its contributors may be used
13
+ to endorse or promote products derived from this software without specific prior written
14
+ permission.
15
+ 3. This software is provided for non-commercial use only.
16
+ 4. Redistribution and use in source and binary forms, with or without modification, are
17
+ permitted provided that redistributions must reproduce the above copyright notice, license,
18
+ list of conditions and the following disclaimer in the documentation and/or other materials
19
+ provided with the distribution.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS";
22
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
+ POSSIBILITY OF SUCH DAMAGE.