forcingkit 0.12.1__tar.gz → 0.13.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 (143) hide show
  1. forcingkit-0.13.0/.github/workflows/publish-client.yml +59 -0
  2. {forcingkit-0.12.1 → forcingkit-0.13.0}/PKG-INFO +1 -1
  3. forcingkit-0.13.0/client/LICENSE +201 -0
  4. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/pyproject.toml +1 -1
  5. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/conf.py +1 -1
  6. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/fetchers.rst +2 -1
  7. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/necofs.rst +49 -6
  8. {forcingkit-0.12.1 → forcingkit-0.13.0}/pyproject.toml +1 -1
  9. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/forcingkit_serve/main.py +9 -1
  10. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/necofs.py +266 -59
  11. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_jobs.py +30 -0
  12. forcingkit-0.13.0/tests/unit/test_necofs_hindcast.py +206 -0
  13. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_necofs_volume.py +165 -0
  14. {forcingkit-0.12.1 → forcingkit-0.13.0}/uv.lock +1 -1
  15. {forcingkit-0.12.1 → forcingkit-0.13.0}/.agents/forcingkit.md +0 -0
  16. {forcingkit-0.12.1 → forcingkit-0.13.0}/.claude/CLAUDE.md +0 -0
  17. {forcingkit-0.12.1 → forcingkit-0.13.0}/.env.template +0 -0
  18. {forcingkit-0.12.1 → forcingkit-0.13.0}/.github/copilot-instructions.md +0 -0
  19. {forcingkit-0.12.1 → forcingkit-0.13.0}/.github/workflows/docs.yml +0 -0
  20. {forcingkit-0.12.1 → forcingkit-0.13.0}/.github/workflows/publish.yml +0 -0
  21. {forcingkit-0.12.1 → forcingkit-0.13.0}/.github/workflows/tests.yml +0 -0
  22. {forcingkit-0.12.1 → forcingkit-0.13.0}/.gitignore +0 -0
  23. {forcingkit-0.12.1 → forcingkit-0.13.0}/.markdownlint.yaml +0 -0
  24. {forcingkit-0.12.1 → forcingkit-0.13.0}/.pre-commit-config.yaml +0 -0
  25. {forcingkit-0.12.1 → forcingkit-0.13.0}/.python-version +0 -0
  26. {forcingkit-0.12.1 → forcingkit-0.13.0}/AGENTS.md +0 -0
  27. {forcingkit-0.12.1 → forcingkit-0.13.0}/CONTRIBUTING.md +0 -0
  28. {forcingkit-0.12.1 → forcingkit-0.13.0}/Dockerfile +0 -0
  29. {forcingkit-0.12.1 → forcingkit-0.13.0}/LICENSE +0 -0
  30. {forcingkit-0.12.1 → forcingkit-0.13.0}/README.md +0 -0
  31. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/README.md +0 -0
  32. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/src/forcingkit_client/__init__.py +0 -0
  33. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/src/forcingkit_client/client.py +0 -0
  34. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/src/forcingkit_client/schema.py +0 -0
  35. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/src/forcingkit_client/store.py +0 -0
  36. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/src/forcingkit_client/trajectory.py +0 -0
  37. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/tests/conftest.py +0 -0
  38. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/tests/test_client.py +0 -0
  39. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/tests/test_schema.py +0 -0
  40. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/tests/test_trajectory.py +0 -0
  41. {forcingkit-0.12.1 → forcingkit-0.13.0}/client/uv.lock +0 -0
  42. {forcingkit-0.12.1 → forcingkit-0.13.0}/docker-compose.yml +0 -0
  43. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/Makefile +0 -0
  44. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/make.bat +0 -0
  45. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/requirements-docs.txt +0 -0
  46. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/_extra/CNAME +0 -0
  47. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/_static/custom.css +0 -0
  48. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/_static/forcingkit-noreaster-wind.gif +0 -0
  49. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/atmospheric_forcing.rst +0 -0
  50. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/client.rst +0 -0
  51. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/hycom.rst +0 -0
  52. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/index.rst +0 -0
  53. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/layered_mesh.rst +0 -0
  54. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/mesh_frames.rst +0 -0
  55. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/nyofs.rst +0 -0
  56. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/rivers.rst +0 -0
  57. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/roadmap.rst +0 -0
  58. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/sources.rst +0 -0
  59. {forcingkit-0.12.1 → forcingkit-0.13.0}/docs/source/waves.rst +0 -0
  60. {forcingkit-0.12.1 → forcingkit-0.13.0}/main.py +0 -0
  61. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/__init__.py +0 -0
  62. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/forcingkit_serve/__init__.py +0 -0
  63. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/forcingkit_serve/jobs.py +0 -0
  64. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/forcingkit_serve/routers/bathymetry.py +0 -0
  65. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/forcingkit_serve/routers/plotly_api.py +0 -0
  66. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/forcingkit_serve/routers/removed.py +0 -0
  67. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/forcingkit_serve/routers/stores.py +0 -0
  68. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/forcingkit_serve/routers/viewer.py +0 -0
  69. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/forcingkit_serve/stac.py +0 -0
  70. {forcingkit-0.12.1 → forcingkit-0.13.0}/service/run_server.py +0 -0
  71. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/__init__.py +0 -0
  72. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/data/rivers/northeast_us.json +0 -0
  73. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/dispatcher.py +0 -0
  74. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/coastwatch.py +0 -0
  75. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/dbofs.py +0 -0
  76. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/erddap.py +0 -0
  77. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/hrrr.py +0 -0
  78. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/hrrr_atmosphere.py +0 -0
  79. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/hrrr_levels.py +0 -0
  80. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/hrrr_points.py +0 -0
  81. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/hycom.py +0 -0
  82. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/hydrography.py +0 -0
  83. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/ndbc.py +0 -0
  84. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/noaa.py +0 -0
  85. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/nwps.py +0 -0
  86. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/nyofs.py +0 -0
  87. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/usgs.py +0 -0
  88. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/fetchers/usgs_rivers.py +0 -0
  89. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/layered_mesh.py +0 -0
  90. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/mesh_frames.py +0 -0
  91. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/ramps/currents_lis.csv +0 -0
  92. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/ramps/currents_lis_dark.csv +0 -0
  93. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/ramps/currents_lis_deep.csv +0 -0
  94. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/ramps/currents_lis_haline.csv +0 -0
  95. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/render.py +0 -0
  96. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/settings.py +0 -0
  97. {forcingkit-0.12.1 → forcingkit-0.13.0}/src/forcingkit/zarr_stream.py +0 -0
  98. {forcingkit-0.12.1 → forcingkit-0.13.0}/static/app.js +0 -0
  99. {forcingkit-0.12.1 → forcingkit-0.13.0}/static/favicon.ico +0 -0
  100. {forcingkit-0.12.1 → forcingkit-0.13.0}/static/favicon.svg +0 -0
  101. {forcingkit-0.12.1 → forcingkit-0.13.0}/static/index.html +0 -0
  102. {forcingkit-0.12.1 → forcingkit-0.13.0}/static/logo.svg +0 -0
  103. {forcingkit-0.12.1 → forcingkit-0.13.0}/static/preview3d.js +0 -0
  104. {forcingkit-0.12.1 → forcingkit-0.13.0}/static/styles.css +0 -0
  105. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/__init__.py +0 -0
  106. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/integration/test_auth.py +0 -0
  107. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/integration/test_erddap_fetch.py +0 -0
  108. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/integration/test_mesh_frames_necofs.py +0 -0
  109. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/integration/test_necofs_volume_live.py +0 -0
  110. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/integration/test_nwps_nomads.py +0 -0
  111. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/integration/test_nyofs_obc_fetch.py +0 -0
  112. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/integration/test_obc_offshore_nj.py +0 -0
  113. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/integration/test_ofs_archive_paths.py +0 -0
  114. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/integration/test_s3_roms_fetchers.py +0 -0
  115. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/scripts/inspect_dem.py +0 -0
  116. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/scripts/inspect_grib.py +0 -0
  117. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/scripts/inspect_zarr.py +0 -0
  118. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_coastwatch.py +0 -0
  119. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_dbofs.py +0 -0
  120. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_dispatcher.py +0 -0
  121. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_erddap.py +0 -0
  122. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_hrrr_atm.py +0 -0
  123. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_hrrr_idx.py +0 -0
  124. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_hrrr_levels.py +0 -0
  125. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_hrrr_points.py +0 -0
  126. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_hycom.py +0 -0
  127. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_layered_mesh.py +0 -0
  128. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_main.py +0 -0
  129. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_mesh_frames.py +0 -0
  130. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_ndbc.py +0 -0
  131. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_necofs_mesh_cache.py +0 -0
  132. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_necofs_parent.py +0 -0
  133. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_noaa_currents.py +0 -0
  134. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_noaa_datum.py +0 -0
  135. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_nwps.py +0 -0
  136. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_nyofs.py +0 -0
  137. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_obc_donor_report.py +0 -0
  138. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_obc_pipeline.py +0 -0
  139. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_removed_routes.py +0 -0
  140. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_settings.py +0 -0
  141. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_usgs.py +0 -0
  142. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_usgs_rivers.py +0 -0
  143. {forcingkit-0.12.1 → forcingkit-0.13.0}/tests/unit/test_zarr_stream.py +0 -0
@@ -0,0 +1,59 @@
1
+ name: Publish forcingkit-client to PyPI
2
+
3
+ # Pushing a tag client-vX.Y.Z builds the client/ sdist and wheel and publishes them to PyPI through trusted
4
+ # publishing (OIDC): no API token is stored anywhere. PyPI must list this repository, this workflow file and the
5
+ # `pypi` environment as a trusted publisher for forcingkit-client. The service itself publishes on v* tags
6
+ # (publish.yml).
7
+ on:
8
+ push:
9
+ tags: ["client-v*"]
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: astral-sh/setup-uv@v6
18
+
19
+ - name: Check the tag matches both version strings
20
+ run: |
21
+ version=$(python3 -c 'import tomllib; print(tomllib.load(open("client/pyproject.toml", "rb"))["project"]["version"])')
22
+ init=$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' client/src/forcingkit_client/__init__.py)
23
+ if [ "client-v$version" != "$GITHUB_REF_NAME" ] || [ "$init" != "$version" ]; then
24
+ echo "Tag $GITHUB_REF_NAME, client/pyproject.toml $version and __version__ $init must agree" >&2
25
+ exit 1
26
+ fi
27
+
28
+ # Its own environment, so a client import of anything from the service stack fails here.
29
+ - name: Test
30
+ run: uv run --project client python -m pytest client/tests
31
+
32
+ - name: Build
33
+ working-directory: client
34
+ run: uv build
35
+
36
+ - name: Check the distributions
37
+ working-directory: client
38
+ run: uvx twine check --strict dist/*
39
+
40
+ - uses: actions/upload-artifact@v4
41
+ with:
42
+ name: dist
43
+ path: client/dist/
44
+
45
+ publish:
46
+ needs: build
47
+ runs-on: ubuntu-latest
48
+ environment:
49
+ name: pypi
50
+ url: https://pypi.org/p/forcingkit-client
51
+ permissions:
52
+ id-token: write
53
+ steps:
54
+ - uses: actions/download-artifact@v4
55
+ with:
56
+ name: dist
57
+ path: dist/
58
+
59
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: forcingkit
3
- Version: 0.12.1
3
+ Version: 0.13.0
4
4
  Summary: Spatiotemporal forcing for computational Earth-system models: selects, regrids and serves model-ready time series with provenance.
5
5
  Project-URL: Documentation, https://forcingkit.docs.lhzn.io
6
6
  Project-URL: Issues, https://github.com/lhzn-io/forcingkit/issues
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 lhzn.io
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -10,7 +10,7 @@ readme = "README.md"
10
10
  requires-python = ">=3.11"
11
11
  license = "Apache-2.0"
12
12
  authors = [
13
- { name = "Daniel Fry", email = "dfry@lhzn.io" },
13
+ { name = "Long Horizon Observatory", email = "dfry@lhzn.io" },
14
14
  ]
15
15
  classifiers = [
16
16
  "Development Status :: 3 - Alpha",
@@ -9,7 +9,7 @@ sys.path.insert(0, os.path.abspath("../../src"))
9
9
  project = "forcingkit"
10
10
  copyright = "2026, Long Horizon Observatory"
11
11
  author = "Daniel Fry"
12
- release = "0.12.1"
12
+ release = "0.13.0"
13
13
 
14
14
  extensions = [
15
15
  "sphinx.ext.autodoc",
@@ -67,7 +67,8 @@ Parent ocean (``/api/v1/obc``)
67
67
  - `Northeast Coastal Ocean Forecast System <https://fvcom.smast.umassd.edu/?p=20>`__, `FVCOM
68
68
  <https://fvcom.smast.umassd.edu/>`__ GOM7 (`UMass Dartmouth SMAST
69
69
  <https://www.umassd.edu/smast/>`__ and `WHOI <https://www.whoi.edu/>`__), unstructured mesh
70
- with 45 sigma layers. Daily history files from 2025-01-01, then the rolling forecast.
70
+ with 45 sigma layers. Monthly hindcast from 1978 (GOM3 mesh to 2016), daily history files from
71
+ 2025-01-01, then the rolling forecast.
71
72
  The only donor that streams the ``z-v3`` parent store. See :doc:`necofs`.
72
73
  * - **NYOFS**
73
74
  - `NOAA New York/New Jersey Operational Forecast System
@@ -2,7 +2,8 @@ NECOFS: Northeast Coastal Ocean Forecast System (FVCOM)
2
2
  =======================================================
3
3
 
4
4
  As of 2026-10-06. Mesh and archive facts on this page were read from the SMAST THREDDS server on
5
- that date (the 2026-10-01 history file and the archive catalogue).
5
+ that date (the 2026-10-01 history file and the archive catalogue); the monthly hindcast entries
6
+ were read on 2026-10-31.
6
7
 
7
8
  NECOFS is the recommended parent ocean from New York Harbor northward, and the only forcingkit
8
9
  donor that delivers the ``z-v3`` parent store: u, v, temperature, salinity and sea surface height
@@ -92,6 +93,14 @@ All access is OPeNDAP from ``http://www.smast.umassd.edu:8080/thredds/dodsC/mode
92
93
  - 24 hourly records. The file stamped day *D* holds D-1 01:00 to D 00:00 (UTC), so the record
93
94
  at midnight is in the file of the same date and every other hour of *D* is in the file of
94
95
  *D* + 1.
96
+ * - Monthly hindcast, GOM7 mesh
97
+ - ``Archive/Seaplan_33_Hindcast_v1/necofs_{yyyy}/NECOFS_{yyyy}{mm}.nc``
98
+ - 2017 to 2024 (as of 2026-10-31). Hourly, from 00:00 on the 1st to 00:00 on the 1st of the
99
+ next month (745 records for a 31-day month); same mesh and variables as the daily history.
100
+ * - Monthly hindcast, GOM3 mesh
101
+ - ``Archive/Seaplan_33_Hindcast_v1/gom3_{yyyy}{mm}.nc``
102
+ - 1978 to 2016, on the coarser GOM3 mesh (48,451 nodes against GOM7's 207,081), with the same
103
+ variable names and times in days rather than seconds.
95
104
  * - Rolling forecast
96
105
  - ``Forecasts/NECOFS_GOM7_FORECAST.nc``
97
106
  - The current run; 193 time records on 2026-10-06.
@@ -105,8 +114,11 @@ missing**, so a run that needs one of them cannot be built from NECOFS:
105
114
  - 2026: 01-03, 02-16, 02-25, 03-08, 03-24, 05-16 to 05-17, 05-28, 06-06 to 06-09, 06-17,
106
115
  07-02 to 07-03, 07-13 to 07-15, 08-25.
107
116
 
108
- Older history is not on the public server. Because each file also holds the first hour of its own
109
- date, a missing file *D* removes hours 01:00 to 23:00 of *D* - 1 and the 00:00 record of *D*.
117
+ Dates before 2025 come from the monthly hindcast (``Seaplan_33_Hindcast_v1``); there is no hindcast
118
+ for 2025 yet, so the gaps above still cannot be filled. Because each history file also holds the
119
+ first hour of its own date, a missing file *D* removes hours 01:00 to 23:00 of *D* - 1 and the
120
+ 00:00 record of *D*. The ``necofs_2022`` folder also holds an empty stray, ``NECOFS_2022010.nc``,
121
+ beside the real ``NECOFS_202210.nc``; forcingkit never asks for it.
110
122
 
111
123
  How forcingkit reads it
112
124
  -----------------------
@@ -115,8 +127,11 @@ How forcingkit reads it
115
127
  vertical_spacing_m=2.0)`` is a generator; the dispatcher writes what it yields straight to disk.
116
128
 
117
129
  1. **File choice.** For each hour the fetcher picks the history file that holds it and probes
118
- it (an HTTP request for its ``.dds``, 5 s timeout). If the probe fails, it opens the rolling
119
- forecast instead, which serves recent hours and fails for older ones.
130
+ it (an HTTP request for its ``.dds``, 5 s timeout). If that probe fails, it probes the monthly
131
+ hindcast file for the month (30 s timeout; files seen to exist are remembered), and failing
132
+ that opens the rolling forecast, which serves recent hours and fails for older ones. The store
133
+ records the first file read as ``necofs_product`` and ``necofs_url``. A window that crosses the
134
+ GOM3 to GOM7 mesh change (the end of 2016) is refused; request it in two parts.
120
135
  2. **Target grid.** A regular 0.002 degree longitude/latitude grid (about 170 m east-west and
121
136
  220 m north-south at 41 N) covering the request box plus ``pad_cells`` cells on every side, so
122
137
  the parent brackets the child.
@@ -305,6 +320,33 @@ dap_url=None)`` does the same for one file.
305
320
  - (element); (node)
306
321
  - Indices in the full mesh.
307
322
 
323
+ Reading less
324
+ ~~~~~~~~~~~~
325
+
326
+ By default every layer of every field comes back. Three optional arguments, to ``read_volume``
327
+ and ``volume`` alike, read only part of it, which matters for wide areas: all 45 layers of the six
328
+ fields over Long Island Sound (16,010 elements) are about 300 MB a day.
329
+
330
+ ``variables``
331
+ The time-varying fields to read, among ``VOLUME_FIELDS`` (``u``, ``v``, ``ww``, ``temp``,
332
+ ``salinity``, ``zeta``). The static fields and coordinates always come.
333
+ ``layers``
334
+ Zero-based sigma layer indices, surface first; negative ones count from the bottom, so
335
+ ``[0, -1]`` is the surface and the bottom layer. The layered fields and ``siglay`` hold those
336
+ layers only, sorted, with their model indices in a ``layer`` coordinate; ``siglev`` keeps every interface,
337
+ so layer ``k``'s interfaces are ``siglev[k]`` and ``siglev[k + 1]``. Adjacent layers are read
338
+ in one hyperslab.
339
+ ``elements``
340
+ Zero-based element indices in the full mesh (as ``element_id`` returns them), read in place of
341
+ the elements of ``bbox``, which may then be ``None``: for a line through the mesh or another
342
+ scattered set, where a box around it would read far more.
343
+
344
+ .. code-block:: python
345
+
346
+ # The surface and the bottom of the whole Sound, with the surface elevation: about 7 MB a day.
347
+ sound = volume([-73.9, 40.45, -71.8, 41.45], "2026-11-01T00Z", "2026-11-02T00Z",
348
+ variables=["u", "v", "zeta"], layers=[0, -1])
349
+
308
350
  The archive does not carry FVCOM's edge-neighbour table, so ``neighbours`` and ``on_boundary`` are
309
351
  rebuilt from ``nv`` over the **whole** mesh (``forcingkit.mesh_frames.element_neighbours``): on
310
352
  the subset alone, every element along the subset's edge would look like a coastal element.
@@ -312,7 +354,8 @@ the subset alone, every element along the subset's edge would look like a coasta
312
354
  Every requested hour must be found, and every archive file must select the same elements;
313
355
  otherwise ``volume`` raises. Results are cached as Zarr under
314
356
  ``$FORCINGKIT_CACHE_DIR/necofs/volume/``, keyed by the schema (``volume-v1``), the box and the
315
- window. Hyperslabs are fetched with ``FORCINGKIT_MAX_WORKERS`` threads. Even so, the 48 hours
357
+ window, and by the selection when there is one: a whole volume keeps the key it had before
358
+ selections existed, and a selection never shares a key with a whole volume. Hyperslabs are fetched with ``FORCINGKIT_MAX_WORKERS`` threads. Even so, the 48 hours
316
359
  above (2,831 elements, 1,829 nodes, 45 layers, about 110 MB) took about five minutes from SMAST
317
360
  on 2026-10-22, almost all of it server round trips, and 0.1 s from the cache.
318
361
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "forcingkit"
7
- version = "0.12.1"
7
+ version = "0.13.0"
8
8
  description = "Spatiotemporal forcing for computational Earth-system models: selects, regrids and serves model-ready time series with provenance."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,5 +1,6 @@
1
1
  import logging
2
2
  import os
3
+ import re
3
4
  import sys
4
5
  import time
5
6
  import shutil
@@ -890,10 +891,17 @@ def generate_atmosphere_levels(request: AtmosphereLevelsRequest) -> Dict[str, An
890
891
  return {"status": "success", "zarr_id": zarr_id, "zarr_path": final_path}
891
892
 
892
893
 
894
+ ATMOSPHERE_DOWNLOAD_ID = re.compile(r"^((atm|lev)_)?[0-9a-f]{12}$")
895
+
896
+
893
897
  @app.get("/api/v1/atmosphere/download/{zarr_id}")
894
898
  def download_atmosphere(zarr_id: str):
899
+ """The surface (`atm_`) or lower-atmosphere (`lev_`) store as a zip; a bare hash means
900
+ `atm_`."""
901
+ if not ATMOSPHERE_DOWNLOAD_ID.match(zarr_id):
902
+ raise HTTPException(status_code=400, detail="invalid atmosphere store id")
895
903
  cache_dir = _atmosphere_cache_dir()
896
- search_id = zarr_id if zarr_id.startswith("atm_") else f"atm_{zarr_id}"
904
+ search_id = zarr_id if "_" in zarr_id else f"atm_{zarr_id}"
897
905
  zarr_path = os.path.join(cache_dir, f"{search_id}.zarr")
898
906
  if not os.path.isdir(zarr_path):
899
907
  raise HTTPException(status_code=404, detail="Atmosphere Zarr store not found.")