ocstrack 0.1.4.post0__tar.gz → 0.2.2.dev0__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 (54) hide show
  1. ocstrack-0.2.2.dev0/.github/workflows/docs.yml +55 -0
  2. ocstrack-0.2.2.dev0/.github/workflows/lint.yml +44 -0
  3. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/.github/workflows/publish-to-pypi.yml +6 -3
  4. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/.github/workflows/run-tests.yml +4 -0
  5. ocstrack-0.2.2.dev0/.pylintrc +26 -0
  6. ocstrack-0.2.2.dev0/PKG-INFO +230 -0
  7. ocstrack-0.2.2.dev0/README.md +85 -0
  8. ocstrack-0.2.2.dev0/docs/collocation.md +28 -0
  9. ocstrack-0.2.2.dev0/docs/index.md +85 -0
  10. ocstrack-0.2.2.dev0/docs/model.md +22 -0
  11. ocstrack-0.2.2.dev0/docs/observation.md +58 -0
  12. ocstrack-0.2.2.dev0/docs/utils.md +7 -0
  13. ocstrack-0.2.2.dev0/mkdocs.yml +47 -0
  14. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Collocation/collocate.py +42 -19
  15. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Collocation/spatial.py +15 -5
  16. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Collocation/temporal.py +4 -2
  17. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Model/model.py +62 -18
  18. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Observation/get_argo.py +9 -9
  19. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Observation/get_sat.py +4 -5
  20. ocstrack-0.2.2.dev0/ocstrack/_version.py +24 -0
  21. ocstrack-0.2.2.dev0/ocstrack.egg-info/PKG-INFO +230 -0
  22. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack.egg-info/SOURCES.txt +12 -1
  23. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/pyproject.toml +2 -3
  24. ocstrack-0.2.2.dev0/tests/test_get_argo.py +91 -0
  25. ocstrack-0.2.2.dev0/tests/test_get_sat.py +70 -0
  26. ocstrack-0.2.2.dev0/tests/test_model.py +25 -0
  27. ocstrack-0.2.2.dev0/tests/test_spatial.py +47 -0
  28. ocstrack-0.1.4.post0/.pylintrc +0 -671
  29. ocstrack-0.1.4.post0/PKG-INFO +0 -87
  30. ocstrack-0.1.4.post0/README.md +0 -63
  31. ocstrack-0.1.4.post0/ocstrack/_version.py +0 -34
  32. ocstrack-0.1.4.post0/ocstrack.egg-info/PKG-INFO +0 -87
  33. ocstrack-0.1.4.post0/tests/test_get_sat.py +0 -3
  34. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/.gitignore +0 -0
  35. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/LICENSE.txt +0 -0
  36. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/examples/ADCIRCSWAN_SatAlt.py +0 -0
  37. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/examples/Plot_Collocated.ipynb +0 -0
  38. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/examples/SCHISMWWM_SatAlt.py +0 -0
  39. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/examples/SCHISM_ArgoFloat.py +0 -0
  40. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Collocation/__init__.py +0 -0
  41. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Collocation/output.py +0 -0
  42. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Model/__init__.py +0 -0
  43. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Observation/__init__.py +0 -0
  44. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Observation/argofloat.py +0 -0
  45. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Observation/satellite.py +0 -0
  46. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/Observation/urls.py +0 -0
  47. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/__init__.py +0 -0
  48. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack/utils.py +0 -0
  49. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack.egg-info/dependency_links.txt +0 -0
  50. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack.egg-info/requires.txt +0 -0
  51. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/ocstrack.egg-info/top_level.txt +0 -0
  52. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/requirements.txt +0 -0
  53. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/setup.cfg +0 -0
  54. {ocstrack-0.1.4.post0 → ocstrack-0.2.2.dev0}/setup.py +0 -0
@@ -0,0 +1,55 @@
1
+ # GitHub Actions workflow for building and deploying the MkDocs site
2
+
3
+ name: Deploy Documentation
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ build:
16
+ runs-on: ubuntu-latest
17
+ env:
18
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
19
+ steps:
20
+ - name: Check out code
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: '3.11'
27
+
28
+ - name: Install dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install -r requirements.txt
32
+ pip install mkdocs-material "mkdocstrings[python]"
33
+ pip install .
34
+
35
+ - name: Build MkDocs site
36
+ run: mkdocs build
37
+
38
+ - name: Upload artifact
39
+ uses: actions/upload-pages-artifact@v3
40
+ with:
41
+ path: ./site
42
+
43
+ deploy:
44
+ needs: build
45
+ runs-on: ubuntu-latest
46
+ permissions:
47
+ pages: write
48
+ id-token: write
49
+ environment:
50
+ name: github-pages
51
+ url: ${{ steps.deployment.outputs.page_url }}
52
+ steps:
53
+ - name: Deploy to GitHub Pages
54
+ id: deployment
55
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,44 @@
1
+ # GitHub Actions workflow for Continuous Integration (CI)
2
+
3
+ name: CI
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+ pull_request:
10
+ branches:
11
+ - main
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ env:
17
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
18
+ steps:
19
+ - name: Check out code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: '3.9'
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ pip install -r requirements.txt
31
+ pip install pylint pytest pytest-cov
32
+
33
+ - name: Run Pylint
34
+ run: |
35
+ python -m pylint ocstrack
36
+
37
+ - name: Run Pytest and Generate Coverage Report
38
+ run: |
39
+ python -m pytest --cov=ocstrack --cov-report=xml
40
+
41
+ - name: Upload Coverage to Codecov
42
+ uses: codecov/codecov-action@v3
43
+ with:
44
+ token: ${{ secrets.CODECOV_TOKEN }} # Optional for public repos
@@ -1,17 +1,20 @@
1
1
  # .github/workflows/publish-to-pypi.yml
2
2
  #
3
3
  # This workflow builds and publishes the package to PyPI
4
- # every time you create a new release on GitHub.
4
+ # every time you push a new tag that starts with 'v'.
5
5
  #
6
6
  name: Publish Python - PyPI
7
7
 
8
8
  on:
9
- release:
10
- types: [created] # This is the trigger
9
+ push:
10
+ tags:
11
+ - 'v*'
11
12
 
12
13
  jobs:
13
14
  deploy:
14
15
  runs-on: ubuntu-latest
16
+ env:
17
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
15
18
 
16
19
  steps:
17
20
  - uses: actions/checkout@v4
@@ -9,6 +9,8 @@ jobs:
9
9
  # --- JOB 1: RUN PYLINT --- #
10
10
  lint:
11
11
  runs-on: ubuntu-latest # No need to run on all OSs
12
+ env:
13
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
12
14
  steps:
13
15
  - name: Check out code
14
16
  uses: actions/checkout@v4
@@ -33,6 +35,8 @@ jobs:
33
35
  # --- JOB 2: RUN TESTS --- #
34
36
  test:
35
37
  runs-on: ${{ matrix.os }}
38
+ env:
39
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
36
40
  strategy:
37
41
  matrix:
38
42
  os: [ubuntu-latest, windows-latest, macos-latest]
@@ -0,0 +1,26 @@
1
+ # .pylintrc - Configuration for Pylint
2
+
3
+ [MAIN]
4
+ # A comma-separated list of plugin modules to load.
5
+ load-plugins=
6
+
7
+ [MESSAGES CONTROL]
8
+ # Disable specific messages by their symbolic name.
9
+ # docstring-first-line: Good practice, but can be noisy initially.
10
+ # missing-module-docstring: Disabling for now to focus on code logic.
11
+ # missing-class-docstring: Your classes have good docstrings.
12
+ # missing-function-docstring: Your functions have good docstrings.
13
+ # trailing-whitespace: This is better handled by a code formatter like black or ruff.
14
+ disable=
15
+ missing-module-docstring,
16
+ trailing-whitespace
17
+
18
+ [REPORTS]
19
+ # Set the failure threshold for the score.
20
+ # If the score is below this value, Pylint will exit with an error code.
21
+ # This is what CI systems use to fail a build.
22
+ fail-under=7.5
23
+
24
+ [FORMAT]
25
+ # Set the expected maximum line length.
26
+ max-line-length=100
@@ -0,0 +1,230 @@
1
+ Metadata-Version: 2.4
2
+ Name: ocstrack
3
+ Version: 0.2.2.dev0
4
+ Summary: Satellite data download, crop, and collocation with model outputs
5
+ Author-email: Felicio Cassalho <felicio.cassalho@noaa.gov>
6
+ License: Creative Commons Legal Code
7
+
8
+ CC0 1.0 Universal
9
+
10
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
11
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
12
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
13
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
14
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
15
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
16
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
17
+ HEREUNDER.
18
+
19
+ Statement of Purpose
20
+
21
+ The laws of most jurisdictions throughout the world automatically confer
22
+ exclusive Copyright and Related Rights (defined below) upon the creator
23
+ and subsequent owner(s) (each and all, an "owner") of an original work of
24
+ authorship and/or a database (each, a "Work").
25
+
26
+ Certain owners wish to permanently relinquish those rights to a Work for
27
+ the purpose of contributing to a commons of creative, cultural and
28
+ scientific works ("Commons") that the public can reliably and without fear
29
+ of later claims of infringement build upon, modify, incorporate in other
30
+ works, reuse and redistribute as freely as possible in any form whatsoever
31
+ and for any purposes, including without limitation commercial purposes.
32
+ These owners may contribute to the Commons to promote the ideal of a free
33
+ culture and the further production of creative, cultural and scientific
34
+ works, or to gain reputation or greater distribution for their Work in
35
+ part through the use and efforts of others.
36
+
37
+ For these and/or other purposes and motivations, and without any
38
+ expectation of additional consideration or compensation, the person
39
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
40
+ is an owner of Copyright and Related Rights in the Work, voluntarily
41
+ elects to apply CC0 to the Work and publicly distribute the Work under its
42
+ terms, with knowledge of his or her Copyright and Related Rights in the
43
+ Work and the meaning and intended legal effect of CC0 on those rights.
44
+
45
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
46
+ protected by copyright and related or neighboring rights ("Copyright and
47
+ Related Rights"). Copyright and Related Rights include, but are not
48
+ limited to, the following:
49
+
50
+ i. the right to reproduce, adapt, distribute, perform, display,
51
+ communicate, and translate a Work;
52
+ ii. moral rights retained by the original author(s) and/or performer(s);
53
+ iii. publicity and privacy rights pertaining to a person's image or
54
+ likeness depicted in a Work;
55
+ iv. rights protecting against unfair competition in regards to a Work,
56
+ subject to the limitations in paragraph 4(a), below;
57
+ v. rights protecting the extraction, dissemination, use and reuse of data
58
+ in a Work;
59
+ vi. database rights (such as those arising under Directive 96/9/EC of the
60
+ European Parliament and of the Council of 11 March 1996 on the legal
61
+ protection of databases, and under any national implementation
62
+ thereof, including any amended or successor version of such
63
+ directive); and
64
+ vii. other similar, equivalent or corresponding rights throughout the
65
+ world based on applicable law or treaty, and any national
66
+ implementations thereof.
67
+
68
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
69
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
70
+ irrevocably and unconditionally waives, abandons, and surrenders all of
71
+ Affirmer's Copyright and Related Rights and associated claims and causes
72
+ of action, whether now known or unknown (including existing as well as
73
+ future claims and causes of action), in the Work (i) in all territories
74
+ worldwide, (ii) for the maximum duration provided by applicable law or
75
+ treaty (including future time extensions), (iii) in any current or future
76
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
77
+ including without limitation commercial, advertising or promotional
78
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
79
+ member of the public at large and to the detriment of Affirmer's heirs and
80
+ successors, fully intending that such Waiver shall not be subject to
81
+ revocation, rescission, cancellation, termination, or any other legal or
82
+ equitable action to disrupt the quiet enjoyment of the Work by the public
83
+ as contemplated by Affirmer's express Statement of Purpose.
84
+
85
+ 3. Public License Fallback. Should any part of the Waiver for any reason
86
+ be judged legally invalid or ineffective under applicable law, then the
87
+ Waiver shall be preserved to the maximum extent permitted taking into
88
+ account Affirmer's express Statement of Purpose. In addition, to the
89
+ extent the Waiver is so judged Affirmer hereby grants to each affected
90
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
91
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
92
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
93
+ maximum duration provided by applicable law or treaty (including future
94
+ time extensions), (iii) in any current or future medium and for any number
95
+ of copies, and (iv) for any purpose whatsoever, including without
96
+ limitation commercial, advertising or promotional purposes (the
97
+ "License"). The License shall be deemed effective as of the date CC0 was
98
+ applied by Affirmer to the Work. Should any part of the License for any
99
+ reason be judged legally invalid or ineffective under applicable law, such
100
+ partial invalidity or ineffectiveness shall not invalidate the remainder
101
+ of the License, and in such case Affirmer hereby affirms that he or she
102
+ will not (i) exercise any of his or her remaining Copyright and Related
103
+ Rights in the Work or (ii) assert any associated claims and causes of
104
+ action with respect to the Work, in either case contrary to Affirmer's
105
+ express Statement of Purpose.
106
+
107
+ 4. Limitations and Disclaimers.
108
+
109
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
110
+ surrendered, licensed or otherwise affected by this document.
111
+ b. Affirmer offers the Work as-is and makes no representations or
112
+ warranties of any kind concerning the Work, express, implied,
113
+ statutory or otherwise, including without limitation warranties of
114
+ title, merchantability, fitness for a particular purpose, non
115
+ infringement, or the absence of latent or other defects, accuracy, or
116
+ the present or absence of errors, whether or not discoverable, all to
117
+ the greatest extent permissible under applicable law.
118
+ c. Affirmer disclaims responsibility for clearing rights of other persons
119
+ that may apply to the Work or any use thereof, including without
120
+ limitation any person's Copyright and Related Rights in the Work.
121
+ Further, Affirmer disclaims responsibility for obtaining any necessary
122
+ consents, permissions or other rights required for any use of the
123
+ Work.
124
+ d. Affirmer understands and acknowledges that Creative Commons is not a
125
+ party to this document and has no duty or obligation with respect to
126
+ this CC0 or use of the Work.
127
+
128
+ Project-URL: Homepage, https://github.com/noaa-ocs-modeling/OCSTrack
129
+ Project-URL: Repository, https://github.com/noaa-ocs-modeling/OCSTrack
130
+ Requires-Python: >=3.10
131
+ Description-Content-Type: text/markdown
132
+ License-File: LICENSE.txt
133
+ Requires-Dist: numpy
134
+ Requires-Dist: xarray
135
+ Requires-Dist: scipy
136
+ Requires-Dist: tqdm
137
+ Requires-Dist: requests
138
+ Requires-Dist: netcdf4
139
+ Requires-Dist: h5netcdf
140
+ Requires-Dist: dask
141
+ Provides-Extra: dev
142
+ Requires-Dist: pytest>=6.0; extra == "dev"
143
+ Requires-Dist: pylint; extra == "dev"
144
+ Dynamic: license-file
145
+
146
+ # OCSTrack: Ocean-Model-Data Collocation Tools
147
+
148
+ [![CI/CD](https://github.com/noaa-ocs-modeling/OCSTrack/actions/workflows/lint.yml/badge.svg)](https://github.com/noaa-ocs-modeling/OCSTrack/actions/workflows/lint.yml)
149
+ [![PyPI version](https://badge.fury.io/py/ocstrack.svg)](https://badge.fury.io/py/ocstrack)
150
+ [![codecov](https://codecov.io/gh/noaa-ocs-modeling/OCSTrack/graph/badge.svg?token=YOUR_CODECOV_TOKEN_IF_PRIVATE)](https://codecov.io/gh/noaa-ocs-modeling/OCSTrack)
151
+ [![Pylint Score](https://img.shields.io/badge/pylint-8.11-blue)](https://github.com/noaa-ocs-modeling/OCSTrack/actions/workflows/lint.yml)
152
+ [![License: CC0-1.0](https://img.shields.io/badge/License-CC0%201.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)
153
+
154
+ **OCSTrack** is an object-oriented Python package for the along-track collocation of satellite (2D) and Argo Float (3D) data with ocean circulation and wave model outputs. It simplifies the process of aligning diverse datasets, making it easier to compare and validate model simulations against observational data.
155
+
156
+ ---
157
+
158
+ ## Key Features
159
+
160
+ - **Automated Data Fetching**: Downloads satellite altimetry and Argo float data from public repositories.
161
+ - **Model Support**: Natively handles outputs from SCHISM, ADCIRC, and SWAN models.
162
+ - **Flexible Collocation**: Performs temporal and spatial collocation for both 2D surface tracks and 3D profiles.
163
+ - **Efficient & Scalable**: Uses `xarray` and `dask` for efficient, out-of-core computations on large datasets.
164
+ - **Customizable**: Object-oriented design makes it easy to extend support for new models or observational data types.
165
+
166
+ ## Installation
167
+
168
+ You can install OCSTrack directly from PyPI:
169
+
170
+ ```bash
171
+ pip install ocstrack
172
+ ```
173
+
174
+ To install the latest development version directly from this repository:
175
+
176
+ ```bash
177
+ pip install git+https://github.com/noaa-ocs-modeling/OCSTrack.git
178
+ ```
179
+
180
+ ## Quick Start
181
+
182
+ Here is a minimal example of how to collocate satellite altimetry data with a SCHISM model run.
183
+
184
+ ```python
185
+ from ocstrack import Collocate
186
+ from ocstrack.Model import SCHISM
187
+ from ocstrack.Observation import Satellite
188
+
189
+ # 1. Define time range and region of interest
190
+ start_date = '2021-05-01'
191
+ end_date = '2021-05-05'
192
+ bbox = [-76, 34, -72, 38] # [lon_min, lat_min, lon_max, lat_max]
193
+
194
+ # 2. Initialize the Model object
195
+ # This assumes a SCHISM run directory with standard outputs
196
+ schism_run_dir = '/path/to/your/schism/run/'
197
+ model = SCHISM(schism_run_dir, start_date=start_date, end_date=end_date)
198
+
199
+ # 3. Initialize the Observation object
200
+ sat_name = 'sentinel-3a' # Example satellite
201
+ observation = Satellite(sat_name, start_date=start_date, end_date=end_date, bbox=bbox)
202
+
203
+ # 4. Create a Collocation object and run the analysis
204
+ collocator = Collocate(model, observation)
205
+ collocated_dataset = collocator.run(output_path='collocated_data.nc')
206
+
207
+ print("Collocation complete!")
208
+ print(collocated_dataset)
209
+ ```
210
+
211
+ ## Documentation
212
+
213
+ For more detailed examples and the full API reference, please see our documentation website:
214
+
215
+ [**https://noaa-ocs-modeling.github.io/OCSTrack/**](https://noaa-ocs-modeling.github.io/OCSTrack/)
216
+
217
+ ## Contributing
218
+
219
+ We welcome contributions! If you have ideas for new features, find a bug, or would like to improve the documentation, please open an issue or submit a pull request.
220
+
221
+ ## License
222
+
223
+ This project is licensed under the terms of the CC0 1.0 Universal license. See the `LICENSE.txt` file for details.
224
+
225
+
226
+ ---
227
+
228
+ #### Disclaimer
229
+ This repository is a scientific product and is not official communication of the National Oceanic and Atmospheric Administration, or the United States Department of Commerce. All NOAA GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. Any claims against the Department of Commerce or Department of Commerce bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.
230
+
@@ -0,0 +1,85 @@
1
+ # OCSTrack: Ocean-Model-Data Collocation Tools
2
+
3
+ [![CI/CD](https://github.com/noaa-ocs-modeling/OCSTrack/actions/workflows/lint.yml/badge.svg)](https://github.com/noaa-ocs-modeling/OCSTrack/actions/workflows/lint.yml)
4
+ [![PyPI version](https://badge.fury.io/py/ocstrack.svg)](https://badge.fury.io/py/ocstrack)
5
+ [![codecov](https://codecov.io/gh/noaa-ocs-modeling/OCSTrack/graph/badge.svg?token=YOUR_CODECOV_TOKEN_IF_PRIVATE)](https://codecov.io/gh/noaa-ocs-modeling/OCSTrack)
6
+ [![Pylint Score](https://img.shields.io/badge/pylint-8.11-blue)](https://github.com/noaa-ocs-modeling/OCSTrack/actions/workflows/lint.yml)
7
+ [![License: CC0-1.0](https://img.shields.io/badge/License-CC0%201.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)
8
+
9
+ **OCSTrack** is an object-oriented Python package for the along-track collocation of satellite (2D) and Argo Float (3D) data with ocean circulation and wave model outputs. It simplifies the process of aligning diverse datasets, making it easier to compare and validate model simulations against observational data.
10
+
11
+ ---
12
+
13
+ ## Key Features
14
+
15
+ - **Automated Data Fetching**: Downloads satellite altimetry and Argo float data from public repositories.
16
+ - **Model Support**: Natively handles outputs from SCHISM, ADCIRC, and SWAN models.
17
+ - **Flexible Collocation**: Performs temporal and spatial collocation for both 2D surface tracks and 3D profiles.
18
+ - **Efficient & Scalable**: Uses `xarray` and `dask` for efficient, out-of-core computations on large datasets.
19
+ - **Customizable**: Object-oriented design makes it easy to extend support for new models or observational data types.
20
+
21
+ ## Installation
22
+
23
+ You can install OCSTrack directly from PyPI:
24
+
25
+ ```bash
26
+ pip install ocstrack
27
+ ```
28
+
29
+ To install the latest development version directly from this repository:
30
+
31
+ ```bash
32
+ pip install git+https://github.com/noaa-ocs-modeling/OCSTrack.git
33
+ ```
34
+
35
+ ## Quick Start
36
+
37
+ Here is a minimal example of how to collocate satellite altimetry data with a SCHISM model run.
38
+
39
+ ```python
40
+ from ocstrack import Collocate
41
+ from ocstrack.Model import SCHISM
42
+ from ocstrack.Observation import Satellite
43
+
44
+ # 1. Define time range and region of interest
45
+ start_date = '2021-05-01'
46
+ end_date = '2021-05-05'
47
+ bbox = [-76, 34, -72, 38] # [lon_min, lat_min, lon_max, lat_max]
48
+
49
+ # 2. Initialize the Model object
50
+ # This assumes a SCHISM run directory with standard outputs
51
+ schism_run_dir = '/path/to/your/schism/run/'
52
+ model = SCHISM(schism_run_dir, start_date=start_date, end_date=end_date)
53
+
54
+ # 3. Initialize the Observation object
55
+ sat_name = 'sentinel-3a' # Example satellite
56
+ observation = Satellite(sat_name, start_date=start_date, end_date=end_date, bbox=bbox)
57
+
58
+ # 4. Create a Collocation object and run the analysis
59
+ collocator = Collocate(model, observation)
60
+ collocated_dataset = collocator.run(output_path='collocated_data.nc')
61
+
62
+ print("Collocation complete!")
63
+ print(collocated_dataset)
64
+ ```
65
+
66
+ ## Documentation
67
+
68
+ For more detailed examples and the full API reference, please see our documentation website:
69
+
70
+ [**https://noaa-ocs-modeling.github.io/OCSTrack/**](https://noaa-ocs-modeling.github.io/OCSTrack/)
71
+
72
+ ## Contributing
73
+
74
+ We welcome contributions! If you have ideas for new features, find a bug, or would like to improve the documentation, please open an issue or submit a pull request.
75
+
76
+ ## License
77
+
78
+ This project is licensed under the terms of the CC0 1.0 Universal license. See the `LICENSE.txt` file for details.
79
+
80
+
81
+ ---
82
+
83
+ #### Disclaimer
84
+ This repository is a scientific product and is not official communication of the National Oceanic and Atmospheric Administration, or the United States Department of Commerce. All NOAA GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. Any claims against the Department of Commerce or Department of Commerce bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.
85
+
@@ -0,0 +1,28 @@
1
+ # Collocation
2
+
3
+ This section provides the core tools for collocating model and observational data.
4
+
5
+ ## Core Collocation
6
+
7
+ The main `Collocate` class is the primary entry point for running the collocation analysis.
8
+
9
+ !!! note
10
+ The `Collocate` class is designed to be used with a `Model` object and an `Observation` object as inputs.
11
+
12
+ ::: ocstrack.Collocation.collocate
13
+
14
+ ## Output & Spatial/Temporal Helpers
15
+
16
+ These modules provide helper functions for handling the output of the collocation, as well as for spatial and temporal operations.
17
+
18
+ ### Output
19
+
20
+ ::: ocstrack.Collocation.output
21
+
22
+ ### Spatial
23
+
24
+ ::: ocstrack.Collocation.spatial
25
+
26
+ ### Temporal
27
+
28
+ ::: ocstrack.Collocation.temporal
@@ -0,0 +1,85 @@
1
+ # OCSTrack: Ocean-Model-Data Collocation Tools
2
+
3
+ [![CI/CD](https://github.com/noaa-ocs-modeling/OCSTrack/actions/workflows/lint.yml/badge.svg)](https://github.com/noaa-ocs-modeling/OCSTrack/actions/workflows/lint.yml)
4
+ [![PyPI version](https://badge.fury.io/py/ocstrack.svg)](https://badge.fury.io/py/ocstrack)
5
+ [![codecov](https://codecov.io/gh/noaa-ocs-modeling/OCSTrack/graph/badge.svg?token=YOUR_CODECOV_TOKEN_IF_PRIVATE)](https://codecov.io/gh/noaa-ocs-modeling/OCSTrack)
6
+ [![Pylint Score](https://img.shields.io/badge/pylint-8.11-blue)](https://github.com/noaa-ocs-modeling/OCSTrack/actions/workflows/lint.yml)
7
+ [![License: CC0-1.0](https://img.shields.io/badge/License-CC0%201.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)
8
+
9
+ **OCSTrack** is an object-oriented Python package for the along-track collocation of satellite (2D) and Argo Float (3D) data with ocean circulation and wave model outputs. It simplifies the process of aligning diverse datasets, making it easier to compare and validate model simulations against observational data.
10
+
11
+ ---
12
+
13
+ ## Key Features
14
+
15
+ - **Automated Data Fetching**: Downloads satellite altimetry and Argo float data from public repositories.
16
+ - **Model Support**: Natively handles outputs from SCHISM, ADCIRC, and SWAN models.
17
+ - **Flexible Collocation**: Performs temporal and spatial collocation for both 2D surface tracks and 3D profiles.
18
+ - **Efficient & Scalable**: Uses `xarray` and `dask` for efficient, out-of-core computations on large datasets.
19
+ - **Customizable**: Object-oriented design makes it easy to extend support for new models or observational data types.
20
+
21
+ ## Installation
22
+
23
+ You can install OCSTrack directly from PyPI:
24
+
25
+ ```bash
26
+ pip install ocstrack
27
+ ```
28
+
29
+ To install the latest development version directly from this repository:
30
+
31
+ ```bash
32
+ pip install git+https://github.com/noaa-ocs-modeling/OCSTrack.git
33
+ ```
34
+
35
+ ## Quick Start
36
+
37
+ Here is a minimal example of how to collocate satellite altimetry data with a SCHISM model run.
38
+
39
+ ```python
40
+ from ocstrack import Collocate
41
+ from ocstrack.Model import SCHISM
42
+ from ocstrack.Observation import Satellite
43
+
44
+ # 1. Define time range and region of interest
45
+ start_date = '2021-05-01'
46
+ end_date = '2021-05-05'
47
+ bbox = [-76, 34, -72, 38] # [lon_min, lat_min, lon_max, lat_max]
48
+
49
+ # 2. Initialize the Model object
50
+ # This assumes a SCHISM run directory with standard outputs
51
+ schism_run_dir = '/path/to/your/schism/run/'
52
+ model = SCHISM(schism_run_dir, start_date=start_date, end_date=end_date)
53
+
54
+ # 3. Initialize the Observation object
55
+ sat_name = 'sentinel-3a' # Example satellite
56
+ observation = Satellite(sat_name, start_date=start_date, end_date=end_date, bbox=bbox)
57
+
58
+ # 4. Create a Collocation object and run the analysis
59
+ collocator = Collocate(model, observation)
60
+ collocated_dataset = collocator.run(output_path='collocated_data.nc')
61
+
62
+ print("Collocation complete!")
63
+ print(collocated_dataset)
64
+ ```
65
+
66
+ ## Documentation
67
+
68
+ For more detailed examples and the full API reference, please see our documentation website:
69
+
70
+ [**https://noaa-ocs-modeling.github.io/OCSTrack/**](https://noaa-ocs-modeling.github.io/OCSTrack/)
71
+
72
+ ## Contributing
73
+
74
+ We welcome contributions! If you have ideas for new features, find a bug, or would like to improve the documentation, please open an issue or submit a pull request.
75
+
76
+ ## License
77
+
78
+ This project is licensed under the terms of the CC0 1.0 Universal license. See the `LICENSE.txt` file for details.
79
+
80
+
81
+ ---
82
+
83
+ #### Disclaimer
84
+ This repository is a scientific product and is not official communication of the National Oceanic and Atmospheric Administration, or the United States Department of Commerce. All NOAA GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. Any claims against the Department of Commerce or Department of Commerce bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.
85
+
@@ -0,0 +1,22 @@
1
+ # Model Interfaces
2
+
3
+ This section provides interfaces for different ocean models.
4
+
5
+ ## SCHISM Model
6
+
7
+ The `SCHISM` class provides an interface for handling SCHISM model outputs.
8
+
9
+ ::: ocstrack.Model.model.SCHISM
10
+
11
+ ## ADCSWAN Model
12
+
13
+ The `ADCSWAN` class provides an interface for handling ADCIRC+SWAN model outputs.
14
+
15
+ ::: ocstrack.Model.model.ADCSWAN
16
+
17
+ ## Utility Functions
18
+
19
+ These are helper functions used by the model interfaces.
20
+
21
+ ::: ocstrack.Model.model.natural_sort_key
22
+ ::: ocstrack.Model.model._parse_gr3_mesh