torch-flowgraph 0.1.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 (60) hide show
  1. torch_flowgraph-0.1.0/.github/workflows/cd-pypi.yml +17 -0
  2. torch_flowgraph-0.1.0/.github/workflows/ci.yml +61 -0
  3. torch_flowgraph-0.1.0/.github/workflows/label-public-pr.yml +11 -0
  4. torch_flowgraph-0.1.0/.github/workflows/python-pull-request.yml +18 -0
  5. torch_flowgraph-0.1.0/.gitignore +203 -0
  6. torch_flowgraph-0.1.0/.pre-commit-config.yaml +46 -0
  7. torch_flowgraph-0.1.0/CONTRIBUTING.md +92 -0
  8. torch_flowgraph-0.1.0/CONTRIBUTORS +5 -0
  9. torch_flowgraph-0.1.0/LICENSE +79 -0
  10. torch_flowgraph-0.1.0/LICENSES/Apache-2.0.txt +73 -0
  11. torch_flowgraph-0.1.0/NOTICE +8 -0
  12. torch_flowgraph-0.1.0/PKG-INFO +105 -0
  13. torch_flowgraph-0.1.0/README.md +323 -0
  14. torch_flowgraph-0.1.0/REUSE.toml +16 -0
  15. torch_flowgraph-0.1.0/SECURITY.md +49 -0
  16. torch_flowgraph-0.1.0/demo.py +89 -0
  17. torch_flowgraph-0.1.0/images/flat_depth1.png +0 -0
  18. torch_flowgraph-0.1.0/images/flat_full.png +0 -0
  19. torch_flowgraph-0.1.0/images/flat_modules.png +0 -0
  20. torch_flowgraph-0.1.0/images/links_flat.svg +385 -0
  21. torch_flowgraph-0.1.0/images/links_full.svg +440 -0
  22. torch_flowgraph-0.1.0/images/mod_depth1.png +0 -0
  23. torch_flowgraph-0.1.0/images/mod_full.png +0 -0
  24. torch_flowgraph-0.1.0/images/mod_modules.png +0 -0
  25. torch_flowgraph-0.1.0/pyproject.toml +65 -0
  26. torch_flowgraph-0.1.0/setup.cfg +4 -0
  27. torch_flowgraph-0.1.0/src/torch_flowgraph/__init__.py +50 -0
  28. torch_flowgraph-0.1.0/src/torch_flowgraph/__main__.py +8 -0
  29. torch_flowgraph-0.1.0/src/torch_flowgraph/_post_import.py +78 -0
  30. torch_flowgraph-0.1.0/src/torch_flowgraph/_version.py +24 -0
  31. torch_flowgraph-0.1.0/src/torch_flowgraph/attributes.py +262 -0
  32. torch_flowgraph-0.1.0/src/torch_flowgraph/cli.py +44 -0
  33. torch_flowgraph-0.1.0/src/torch_flowgraph/clustering.py +282 -0
  34. torch_flowgraph-0.1.0/src/torch_flowgraph/clusters.py +209 -0
  35. torch_flowgraph-0.1.0/src/torch_flowgraph/dot.py +83 -0
  36. torch_flowgraph-0.1.0/src/torch_flowgraph/graph.py +1090 -0
  37. torch_flowgraph-0.1.0/src/torch_flowgraph/model/__init__.py +18 -0
  38. torch_flowgraph-0.1.0/src/torch_flowgraph/model/graph.py +119 -0
  39. torch_flowgraph-0.1.0/src/torch_flowgraph/model/pytorch.py +1058 -0
  40. torch_flowgraph-0.1.0/src/torch_flowgraph/nodes.py +664 -0
  41. torch_flowgraph-0.1.0/src/torch_flowgraph/parsing.py +1474 -0
  42. torch_flowgraph-0.1.0/src/torch_flowgraph/patches.py +539 -0
  43. torch_flowgraph-0.1.0/src/torch_flowgraph/plotting.py +368 -0
  44. torch_flowgraph-0.1.0/src/torch_flowgraph/validation.py +135 -0
  45. torch_flowgraph-0.1.0/src/torch_flowgraph.egg-info/PKG-INFO +105 -0
  46. torch_flowgraph-0.1.0/src/torch_flowgraph.egg-info/SOURCES.txt +58 -0
  47. torch_flowgraph-0.1.0/src/torch_flowgraph.egg-info/dependency_links.txt +1 -0
  48. torch_flowgraph-0.1.0/src/torch_flowgraph.egg-info/entry_points.txt +2 -0
  49. torch_flowgraph-0.1.0/src/torch_flowgraph.egg-info/requires.txt +6 -0
  50. torch_flowgraph-0.1.0/src/torch_flowgraph.egg-info/scm_file_list.json +53 -0
  51. torch_flowgraph-0.1.0/src/torch_flowgraph.egg-info/scm_version.json +8 -0
  52. torch_flowgraph-0.1.0/src/torch_flowgraph.egg-info/top_level.txt +1 -0
  53. torch_flowgraph-0.1.0/tests/__init__.py +2 -0
  54. torch_flowgraph-0.1.0/tests/test_core.py +462 -0
  55. torch_flowgraph-0.1.0/tests/test_dict_tensors.py +165 -0
  56. torch_flowgraph-0.1.0/tests/test_inplace_cycles.py +206 -0
  57. torch_flowgraph-0.1.0/tests/test_orphan_bridge.py +176 -0
  58. torch_flowgraph-0.1.0/tests/test_retry_hook_leak.py +98 -0
  59. torch_flowgraph-0.1.0/tests/tinynet.json +749 -0
  60. torch_flowgraph-0.1.0/viewer.py +137 -0
@@ -0,0 +1,17 @@
1
+ # SPDX-FileCopyrightText: 2026 European Centre for Medium-Range Weather Forecasts (ECMWF)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ name: cd
5
+
6
+ on:
7
+ push:
8
+ tags:
9
+ - '**'
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ pypi:
16
+ uses: ecmwf/reusable-workflows/.github/workflows/cd-pypi.yml@v2
17
+ secrets: inherit
@@ -0,0 +1,61 @@
1
+ # SPDX-FileCopyrightText: 2026 European Centre for Medium-Range Weather Forecasts (ECMWF)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ name: ci
5
+
6
+ on:
7
+ # Trigger the workflow on push to main, except tag creation
8
+ push:
9
+ branches:
10
+ - "main"
11
+ tags-ignore:
12
+ - "**"
13
+ paths-ignore:
14
+ - "README.md"
15
+
16
+ # Trigger the workflow on pull request
17
+ pull_request:
18
+ paths-ignore:
19
+ - "README.md"
20
+
21
+ # Trigger the workflow manually
22
+ workflow_dispatch:
23
+
24
+ # Trigger after public PR approved for CI
25
+ pull_request_target:
26
+ types: [labeled]
27
+ paths-ignore:
28
+ - "README.md"
29
+
30
+ # Fork code approved via the label runs with a read-only token and no secrets
31
+ permissions:
32
+ contents: read
33
+
34
+ env:
35
+ UV_SYSTEM_PYTHON: 1
36
+
37
+ jobs:
38
+ # Run the test suite on GitHub-hosted runners
39
+ tests:
40
+ name: tests (python ${{ matrix.python-version }})
41
+ if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
42
+ strategy:
43
+ fail-fast: false
44
+ matrix:
45
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
49
+ with:
50
+ # pull_request_target checks out the base branch by default; test the PR head instead
51
+ ref: ${{ github.event.pull_request.head.sha || github.sha }}
52
+ fetch-depth: 0 # setuptools-scm needs the history to compute the version
53
+ persist-credentials: false
54
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
55
+ with:
56
+ python-version: ${{ matrix.python-version }}
57
+ - uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
58
+ - name: Install
59
+ run: uv pip install ".[tests]"
60
+ - name: Test
61
+ run: pytest -v
@@ -0,0 +1,11 @@
1
+ # SPDX-FileCopyrightText: 2026 European Centre for Medium-Range Weather Forecasts (ECMWF)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ # Manage labels of pull requests that originate from forks
5
+ name: label-public-pr
6
+ on:
7
+ pull_request_target:
8
+ types: [opened, synchronize]
9
+ jobs:
10
+ label:
11
+ uses: ecmwf/reusable-workflows/.github/workflows/label-pr.yml@v2
@@ -0,0 +1,18 @@
1
+ # SPDX-FileCopyrightText: 2026 European Centre for Medium-Range Weather Forecasts (ECMWF)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ name: Code Quality checks for PRs
5
+
6
+ on:
7
+ push:
8
+ pull_request:
9
+ types: [opened, synchronize, reopened]
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ quality:
16
+ uses: ecmwf/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2
17
+ with:
18
+ skip-hooks: "no-commit-to-branch"
@@ -0,0 +1,203 @@
1
+ # SPDX-FileCopyrightText: 2026 European Centre for Medium-Range Weather Forecasts (ECMWF)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py,cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # poetry
101
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105
+ #poetry.lock
106
+
107
+ # pdm
108
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109
+ #pdm.lock
110
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111
+ # in version control.
112
+ # https://pdm.fming.dev/#use-with-ide
113
+ .pdm.toml
114
+
115
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116
+ __pypackages__/
117
+
118
+ # Celery stuff
119
+ celerybeat-schedule
120
+ celerybeat.pid
121
+
122
+ # SageMath parsed files
123
+ *.sage.py
124
+
125
+ # Environments
126
+ .env
127
+ .venv
128
+ env/
129
+ venv/
130
+ ENV/
131
+ env.bak/
132
+ venv.bak/
133
+
134
+ # Spyder project settings
135
+ .spyderproject
136
+ .spyproject
137
+
138
+ # Rope project settings
139
+ .ropeproject
140
+
141
+ # mkdocs documentation
142
+ /site
143
+
144
+ # mypy
145
+ .mypy_cache/
146
+ .dmypy.json
147
+ dmypy.json
148
+
149
+ # Pyre type checker
150
+ .pyre/
151
+
152
+ # pytype static type analyzer
153
+ .pytype/
154
+
155
+ # Cython debug symbols
156
+ cython_debug/
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ #.idea/
164
+
165
+ *.grib
166
+ *.onnx
167
+ *.ckpt
168
+ *.swp
169
+ *.npy
170
+ *.download
171
+ ?
172
+ ?.*
173
+ foo
174
+ bar
175
+ *.grib
176
+ *.nc
177
+ *.npz
178
+ *.json
179
+ !tests/tinynet.json
180
+ *.zarr/
181
+ ~$images.pptx
182
+ test.py
183
+ cutout.png
184
+ *.out
185
+
186
+ _build/
187
+ ?
188
+ ?.*
189
+ ~*
190
+ *.sync
191
+ _version.py
192
+ *.ckpt
193
+ *.tmp
194
+ *.pdf
195
+ *.dot
196
+ *.svg
197
+ !images/*.svg
198
+ tempCodeRunnerFile.python
199
+ .vscode/
200
+ *.md
201
+ !README.md
202
+ !CONTRIBUTING.md
203
+ !SECURITY.md
@@ -0,0 +1,46 @@
1
+ # SPDX-FileCopyrightText: 2026 European Centre for Medium-Range Weather Forecasts (ECMWF)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ repos:
5
+
6
+ - repo: https://github.com/pre-commit/pre-commit-hooks
7
+ rev: v6.0.0
8
+ hooks:
9
+ - id: check-yaml # Check YAML files for syntax errors only
10
+ args: [--unsafe, --allow-multiple-documents]
11
+ - id: debug-statements # Check for debugger imports and py37+ breakpoint()
12
+ - id: end-of-file-fixer # Ensure files end in a newline
13
+ - id: trailing-whitespace # Trailing whitespace checker
14
+ # - id: no-commit-to-branch # Prevent committing to main / master
15
+ - id: check-added-large-files # Check for large files added to git
16
+ - id: check-merge-conflict # Check for files that contain merge conflict
17
+
18
+ - repo: https://github.com/psf/black-pre-commit-mirror
19
+ rev: 26.10.1
20
+ hooks:
21
+ - id: black
22
+ args: [--line-length=120]
23
+
24
+ - repo: https://github.com/pycqa/isort
25
+ rev: 9.0.2
26
+ hooks:
27
+ - id: isort
28
+ args:
29
+ - -l 120
30
+ - --force-single-line-imports
31
+ - --profile black
32
+
33
+
34
+ - repo: https://github.com/astral-sh/ruff-pre-commit
35
+ rev: v0.15.20
36
+ hooks:
37
+ - id: ruff-check
38
+ args:
39
+ - --line-length=120
40
+ - --fix
41
+ - --exit-non-zero-on-fix
42
+
43
+ - repo: https://github.com/fsfe/reuse-tool
44
+ rev: v6.2.0
45
+ hooks:
46
+ - id: reuse
@@ -0,0 +1,92 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 European Centre for Medium-Range Weather Forecasts (ECMWF)
3
+ SPDX-License-Identifier: Apache-2.0
4
+ -->
5
+
6
+ # Contributing to torch-flowgraph
7
+
8
+ Thank you for your interest in torch-flowgraph! Contributions follow ECMWF's
9
+ [External Contributions](https://github.com/ecmwf/codex/blob/main/Guidelines/External-Contributions.md)
10
+ guidelines; this document summarises them for this repository. Support is
11
+ provided on a best-efforts basis.
12
+
13
+ ## Raise an issue
14
+
15
+ If you find a bug or want to suggest a feature, please
16
+ [open an issue](https://github.com/ecmwf/torch-flowgraph/issues) and include:
17
+
18
+ * a clear description of the problem or the proposed feature;
19
+ * the steps needed to reproduce the problem, ideally with a minimal model;
20
+ * the expected and actual behaviour, including the full error message;
21
+ * the versions of torch-flowgraph, PyTorch, Python and your operating system.
22
+
23
+ For anything beyond a small fix, please discuss it in an issue before starting work.
24
+
25
+ Security vulnerabilities must **not** be reported in public issues. Follow the
26
+ private reporting process in [SECURITY.md](SECURITY.md) instead.
27
+
28
+ ## Developing in torch-flowgraph
29
+
30
+ 1. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the
31
+ repository on GitHub to your personal or organisation account.
32
+ 2. Clone your fork and set up a development environment:
33
+
34
+ ```bash
35
+ git clone https://github.com/<your-account>/torch-flowgraph.git
36
+ cd torch-flowgraph
37
+ pip install -e ".[tests]"
38
+ pre-commit install
39
+ ```
40
+
41
+ Rendering images additionally requires the Graphviz `dot` executable on your `PATH`.
42
+ 3. Create a branch for your change. Add tests that demonstrate the new behaviour
43
+ or prevent the regression you are fixing, and check that the test suite and
44
+ code-quality checks pass:
45
+
46
+ ```bash
47
+ pytest
48
+ pre-commit run --all-files
49
+ ```
50
+
51
+ 4. Commit your changes and push the branch to your fork.
52
+ 5. Open a pull request against the `main` branch of
53
+ [ecmwf/torch-flowgraph](https://github.com/ecmwf/torch-flowgraph), fill in
54
+ the pull request template, and reference any related issues.
55
+ 6. Keep your pull request in sync with `main` and resolve any merge conflicts.
56
+
57
+ ## Code review process
58
+
59
+ Code-quality checks and tests run through GitHub Actions on every pull request.
60
+ For security reasons, maintainers must review code changes from forks before
61
+ enabling the automated tests:
62
+
63
+ * pull requests from forks are labelled `contributor` automatically;
64
+ * after an initial review, a maintainer adds the `approved-for-ci` label, which
65
+ runs the tests on your pull request;
66
+ * pushing new commits removes the `approved-for-ci` label, so the new changes
67
+ are reviewed and the label added again before the tests run on them.
68
+
69
+ A pull request must pass all required checks and be approved by a maintainer
70
+ before it is merged.
71
+
72
+ If you used AI tools to generate part of your contribution, please say so in the
73
+ pull request description. You remain responsible for understanding and testing
74
+ the code you submit.
75
+
76
+ ## Licensing
77
+
78
+ torch-flowgraph is licensed under the [Apache License 2.0](LICENSE), and all
79
+ contributions must comply with ECMWF's
80
+ [Copyright and Licensing](https://github.com/ecmwf/codex/blob/main/Legal/Copyright-And-Licensing.md)
81
+ policy. New source files must start with the SPDX header used by the existing
82
+ files (checked by `reuse lint` in pre-commit and CI):
83
+
84
+ ```python
85
+ # SPDX-FileCopyrightText: 2026 European Centre for Medium-Range Weather Forecasts (ECMWF)
86
+ # SPDX-License-Identifier: Apache-2.0
87
+ ```
88
+
89
+ By opening a pull request you agree to the terms of the ECMWF
90
+ [Contributor Licence Agreement](https://github.com/ecmwf/codex/blob/main/Legal/Contributor-License-Agreement.md).
91
+ External contributors are welcome to add themselves to [CONTRIBUTORS](CONTRIBUTORS)
92
+ in their pull request.
@@ -0,0 +1,5 @@
1
+ This is the list of contributors to torch-flowgraph.
2
+
3
+ European Centre for Medium-Range Weather Forecasts (ECMWF)
4
+
5
+ Baudouin Raoult
@@ -0,0 +1,79 @@
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, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [yyyy] [name of copyright owner]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
74
+
75
+ -------------------------------------------------------------------------------
76
+
77
+ In applying this licence, ECMWF does not waive the privileges and immunities
78
+ granted to it by virtue of its status as an intergovernmental organisation
79
+ nor does it submit to any jurisdiction.
@@ -0,0 +1,73 @@
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, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [yyyy] [name of copyright owner]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
@@ -0,0 +1,8 @@
1
+ European Centre for Medium-Range Weather Forecasts (ECMWF)
2
+ Copyright 2026 European Centre for Medium-Range Weather Forecasts (ECMWF)
3
+
4
+ This product includes software developed at ECMWF (https://www.ecmwf.int).
5
+
6
+ In applying this licence, ECMWF does not waive the privileges and immunities
7
+ granted to it by virtue of its status as an intergovernmental organisation
8
+ nor does it submit to any jurisdiction.