marEx 3.1__tar.gz → 4.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 (61) hide show
  1. {marex-3.1 → marex-4.0}/.github/workflows/README.md +0 -45
  2. {marex-3.1 → marex-4.0}/.github/workflows/ci.yml +16 -20
  3. {marex-3.1 → marex-4.0}/.github/workflows/release.yml +18 -1
  4. marex-4.0/PKG-INFO +297 -0
  5. marex-4.0/README.md +208 -0
  6. marex-4.0/examples/gridded data/01_preprocess_extremes.ipynb +2389 -0
  7. {marex-3.1 → marex-4.0}/examples/gridded data/02_id_track_events.ipynb +343 -354
  8. marex-4.0/examples/gridded data/03_visualise_events.ipynb +3167 -0
  9. marex-4.0/examples/regional data/01_preprocess_extremes.ipynb +2842 -0
  10. marex-4.0/examples/regional data/02_id_track_events.ipynb +2543 -0
  11. marex-4.0/examples/regional data/03_visualise_events.ipynb +3039 -0
  12. {marex-3.1 → marex-4.0}/examples/unstructured data/01_preprocess_extremes.ipynb +12 -4
  13. {marex-3.1 → marex-4.0}/marEx/detect.py +397 -61
  14. {marex-3.1 → marex-4.0}/marEx/plotX/base.py +193 -22
  15. {marex-3.1 → marex-4.0}/marEx/track.py +1078 -388
  16. marex-4.0/marEx.egg-info/PKG-INFO +297 -0
  17. {marex-3.1 → marex-4.0}/marEx.egg-info/SOURCES.txt +5 -1
  18. {marex-3.1 → marex-4.0}/marEx.egg-info/requires.txt +1 -0
  19. {marex-3.1 → marex-4.0}/pyproject.toml +1 -0
  20. {marex-3.1 → marex-4.0}/tests/make_test_data.ipynb +6 -6
  21. marex-4.0/tests/test_detect_detrending.py +146 -0
  22. {marex-3.1 → marex-4.0}/tests/test_detect_helpers.py +48 -9
  23. {marex-3.1 → marex-4.0}/tests/test_error_handling.py +263 -7
  24. {marex-3.1 → marex-4.0}/tests/test_gridded_preprocessing.py +272 -41
  25. {marex-3.1 → marex-4.0}/tests/test_gridded_tracking.py +285 -3
  26. {marex-3.1 → marex-4.0}/tests/test_integration.py +7 -7
  27. {marex-3.1 → marex-4.0}/tests/test_logging_system.py +7 -7
  28. {marex-3.1 → marex-4.0}/tests/test_plotx.py +242 -0
  29. marex-4.0/tests/test_track_edge_cases.py +959 -0
  30. {marex-3.1 → marex-4.0}/tests/test_track_helpers.py +18 -18
  31. {marex-3.1 → marex-4.0}/tests/test_unstructured_preprocessing.py +200 -14
  32. {marex-3.1 → marex-4.0}/tests/test_unstructured_tracking.py +1 -1
  33. marex-3.1/.github/workflows/tests.yml.bak +0 -81
  34. marex-3.1/PKG-INFO +0 -273
  35. marex-3.1/README.md +0 -185
  36. marex-3.1/examples/gridded data/01_preprocess_extremes.ipynb +0 -2948
  37. marex-3.1/examples/gridded data/03_visualise_events.ipynb +0 -2317
  38. marex-3.1/marEx.egg-info/PKG-INFO +0 -273
  39. {marex-3.1 → marex-4.0}/.github/workflows/validate.py +0 -0
  40. {marex-3.1 → marex-4.0}/.readthedocs.yaml +0 -0
  41. {marex-3.1 → marex-4.0}/CITATION.cff +0 -0
  42. {marex-3.1 → marex-4.0}/CONTRIBUTING.md +0 -0
  43. {marex-3.1 → marex-4.0}/MANIFEST.in +0 -0
  44. {marex-3.1 → marex-4.0}/examples/unstructured data/02_id_track_events.ipynb +0 -0
  45. {marex-3.1 → marex-4.0}/examples/unstructured data/03_visualise_events.ipynb +0 -0
  46. {marex-3.1 → marex-4.0}/marEx/__init__.py +0 -0
  47. {marex-3.1 → marex-4.0}/marEx/_coverage_init.py +0 -0
  48. {marex-3.1 → marex-4.0}/marEx/_dependencies.py +0 -0
  49. {marex-3.1 → marex-4.0}/marEx/exceptions.py +0 -0
  50. {marex-3.1 → marex-4.0}/marEx/helper.py +0 -0
  51. {marex-3.1 → marex-4.0}/marEx/logging_config.py +0 -0
  52. {marex-3.1 → marex-4.0}/marEx/plotX/__init__.py +0 -0
  53. {marex-3.1 → marex-4.0}/marEx/plotX/gridded.py +0 -0
  54. {marex-3.1 → marex-4.0}/marEx/plotX/unstructured.py +0 -0
  55. {marex-3.1 → marex-4.0}/marEx.egg-info/dependency_links.txt +0 -0
  56. {marex-3.1 → marex-4.0}/marEx.egg-info/top_level.txt +0 -0
  57. {marex-3.1 → marex-4.0}/setup.cfg +0 -0
  58. {marex-3.1 → marex-4.0}/tests/__init__.py +0 -0
  59. {marex-3.1 → marex-4.0}/tests/conftest.py +0 -0
  60. {marex-3.1 → marex-4.0}/tests/coverage_config.py +0 -0
  61. {marex-3.1 → marex-4.0}/tests/test_exceptions.py +0 -0
@@ -51,30 +51,10 @@ This directory contains comprehensive GitHub Actions workflows for the marEx pac
51
51
  6. `create-github-release`: GitHub release creation with changelog
52
52
  7. `announce-release`: Post-release notifications (for stable releases)
53
53
 
54
- ### 3. Performance Testing (`performance.yml`)
55
-
56
- **Triggers:**
57
- - Push/PR to `main` branch (when performance-related files change)
58
- - Weekly schedule (Sundays at 2 AM UTC)
59
- - Manual workflow dispatch
60
-
61
- **Features:**
62
- - **Quick performance tests**: Run on all PRs and pushes
63
- - **Full performance suite**: Comprehensive benchmarking (main branch only)
64
- - **Performance regression detection**: Automated performance monitoring
65
- - **Multiple Python versions**: Testing across supported Python versions
66
- - **Artifact storage**: Performance results stored for historical analysis
67
-
68
- **Jobs:**
69
- 1. `performance-tests`: Quick performance tests for PRs
70
- 2. `full-performance-tests`: Comprehensive benchmarking suite
71
-
72
54
  ## Setup Instructions
73
55
 
74
56
  ### Required Secrets
75
57
 
76
- For the workflows to function properly, you need to configure the following secrets in your GitHub repository:
77
-
78
58
  #### 1. CodeCov Integration (Optional)
79
59
  - `CODECOV_TOKEN`: Token for uploading coverage reports to Codecov
80
60
  - Go to https://codecov.io/ and connect your repository
@@ -137,29 +117,6 @@ strategy:
137
117
  python-version: ['3.10', '3.11', '3.12']
138
118
  ```
139
119
 
140
- ### Performance Regression Thresholds
141
-
142
- Customize performance regression detection by modifying the performance workflow:
143
-
144
- ```yaml
145
- - name: Performance regression check
146
- run: |
147
- # Add custom logic to compare with baseline performance
148
- python scripts/check_performance_regression.py
149
- ```
150
-
151
- ### Notification Customization
152
-
153
- Add custom notifications in the release workflow:
154
-
155
- ```yaml
156
- - name: Notify Slack
157
- run: |
158
- curl -X POST -H 'Content-type: application/json' \
159
- --data '{"text":"marEx v${{ needs.validate-tag.outputs.version }} released!"}' \
160
- ${{ secrets.SLACK_WEBHOOK_URL }}
161
- ```
162
-
163
120
  ## Workflow Dependencies
164
121
 
165
122
  The workflows require these system dependencies:
@@ -201,5 +158,3 @@ When contributing to marEx, please ensure that:
201
158
  2. New features include appropriate tests
202
159
  3. Documentation is updated if needed
203
160
  4. Performance-critical changes include performance tests
204
-
205
- The workflows will automatically run on your pull requests and provide feedback on code quality, test coverage, and performance impact.
@@ -1,10 +1,11 @@
1
- name: Continuous Integration
1
+ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
5
  branches: [ main, advanced_preproc ]
6
6
  pull_request:
7
7
  branches: [ main ]
8
+ workflow_call:
8
9
 
9
10
  concurrency:
10
11
  group: ${{ github.workflow }}-${{ github.ref }}
@@ -128,50 +129,50 @@ jobs:
128
129
 
129
130
  - name: Run unit tests
130
131
  run: |
131
- pytest tests/test_detect_helpers.py tests/test_track_helpers.py -v --tb=short
132
+ pytest tests/test_detect_helpers.py tests/test_track_helpers.py -n 2 -v --tb=short
132
133
 
133
134
  - name: Run error handling tests
134
135
  run: |
135
- pytest tests/test_error_handling.py -v --tb=short
136
+ pytest tests/test_error_handling.py -n 2 -v --tb=short
136
137
 
137
138
  - name: Run exception tests
138
139
  run: |
139
- pytest tests/test_exceptions.py -v --tb=short
140
+ pytest tests/test_exceptions.py -n 2 -v --tb=short
140
141
 
141
142
  - name: Run logging system tests
142
143
  run: |
143
- pytest tests/test_logging_system.py -v --tb=short
144
+ pytest tests/test_logging_system.py -n 2 -v --tb=short
144
145
 
145
146
  - name: Run preprocessing tests (gridded)
146
147
  run: |
147
- pytest tests/test_gridded_preprocessing.py -v --tb=short
148
+ pytest tests/test_gridded_preprocessing.py -n 2 -v --tb=short
148
149
 
149
150
  - name: Run preprocessing tests (unstructured)
150
151
  run: |
151
- pytest tests/test_unstructured_preprocessing.py -v --tb=short
152
+ pytest tests/test_unstructured_preprocessing.py -n 2 -v --tb=short
152
153
 
153
154
  - name: Run tracking tests (gridded)
154
155
  run: |
155
- pytest tests/test_gridded_tracking.py -v --tb=short
156
+ pytest tests/test_gridded_tracking.py -n 2 -v --tb=short
156
157
 
157
158
  - name: Run tracking tests (unstructured)
158
159
  run: |
159
- pytest tests/test_unstructured_tracking.py -v --tb=short
160
+ pytest tests/test_unstructured_tracking.py -n 2 -v --tb=short
160
161
 
161
162
  - name: Run plotting tests
162
163
  run: |
163
- pytest tests/test_plotx.py -v --tb=short
164
+ pytest tests/test_plotx.py -n 2 -v --tb=short
164
165
 
165
166
  - name: Run integration tests
166
167
  run: |
167
- pytest tests/test_integration.py -v --tb=short -m "not slow"
168
+ pytest tests/test_integration.py -n 2 -v --tb=short -m "not slow"
168
169
 
169
170
  coverage:
170
171
  name: Coverage Report
171
172
  runs-on: ubuntu-latest
172
173
  needs: test
173
174
  if: always()
174
- timeout-minutes: 60
175
+ timeout-minutes: 150
175
176
 
176
177
  steps:
177
178
  - name: Checkout code
@@ -236,15 +237,10 @@ jobs:
236
237
  echo "PYTEST_COVERAGE=true" >> $GITHUB_ENV
237
238
 
238
239
  - name: Generate coverage report
239
- timeout-minutes: 45
240
+ timeout-minutes: 120
240
241
  run: |
241
- # Run with parallel mode and multiprocessing support
242
- coverage run --parallel-mode --rcfile=.coveragerc -m pytest tests/ --tb=short -m "not nocov" -x --maxfail=3
243
- # Combine all coverage data files from subprocesses
244
- coverage combine
245
- coverage report -m
246
- coverage html
247
- coverage xml
242
+ # Run tests in parallel with coverage collection
243
+ pytest tests/ -n auto --cov=marEx --cov-report=term --cov-report=html --cov-report=xml --cov-config=.coveragerc --tb=short -m "not nocov" -x --maxfail=3
248
244
 
249
245
  - name: Upload coverage to Codecov
250
246
  uses: codecov/codecov-action@v4
@@ -276,10 +276,26 @@ jobs:
276
276
  generate_release_notes: true
277
277
  make_latest: ${{ needs.validate-tag.outputs.is_prerelease == 'false' }}
278
278
 
279
+ trigger-docs:
280
+ name: Trigger ReadTheDocs Build
281
+ runs-on: ubuntu-latest
282
+ needs: [validate-tag, publish-pypi]
283
+
284
+ steps:
285
+ - name: Trigger ReadTheDocs build
286
+ run: |
287
+ if [ -n "${{ secrets.READTHEDOCS_WEBHOOK_URL }}" ]; then
288
+ curl -X POST -d "branches=main" -d "token=${{ secrets.READTHEDOCS_WEBHOOK_TOKEN }}" \
289
+ ${{ secrets.READTHEDOCS_WEBHOOK_URL }}
290
+ echo "✅ ReadTheDocs build triggered for v${{ needs.validate-tag.outputs.version }}"
291
+ else
292
+ echo "ℹ️ No ReadTheDocs webhook configured. Docs will build automatically on next push."
293
+ fi
294
+
279
295
  announce-release:
280
296
  name: Post-Release Notifications
281
297
  runs-on: ubuntu-latest
282
- needs: [validate-tag, create-github-release]
298
+ needs: [validate-tag, create-github-release, trigger-docs]
283
299
  if: needs.validate-tag.outputs.is_prerelease == 'false' # Only for stable releases
284
300
 
285
301
  steps:
@@ -288,6 +304,7 @@ jobs:
288
304
  echo "🎉 marEx v${{ needs.validate-tag.outputs.version }} has been successfully released!"
289
305
  echo "📦 PyPI: https://pypi.org/project/marEx/${{ needs.validate-tag.outputs.version }}/"
290
306
  echo "📋 GitHub: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}"
307
+ echo "📚 Docs: https://marex.readthedocs.io/"
291
308
 
292
309
  # You can add additional notification steps here, such as:
293
310
  # - Slack notifications
marex-4.0/PKG-INFO ADDED
@@ -0,0 +1,297 @@
1
+ Metadata-Version: 2.4
2
+ Name: marEx
3
+ Version: 4.0
4
+ Summary: Marine Extremes Detection and Tracking
5
+ Author-email: Aaron Wienkers <aaron@wienkers.com>
6
+ Project-URL: Homepage, https://github.com/wienkers/marEx
7
+ Project-URL: Bug Tracker, https://github.com/wienkers/marEx/issues
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
11
+ Classifier: Topic :: Scientific/Engineering :: Physics
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Operating System :: MacOS
19
+ Classifier: Operating System :: Microsoft :: Windows
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: numpy
23
+ Requires-Dist: xarray[complete]
24
+ Requires-Dist: dask[complete]==2025.3.0
25
+ Requires-Dist: netcdf4
26
+ Requires-Dist: scipy
27
+ Requires-Dist: scikit-image
28
+ Requires-Dist: dask_image
29
+ Requires-Dist: pandas
30
+ Requires-Dist: numba
31
+ Requires-Dist: pillow
32
+ Requires-Dist: xhistogram
33
+ Requires-Dist: flox>=0.10.1
34
+ Requires-Dist: matplotlib
35
+ Requires-Dist: cartopy
36
+ Provides-Extra: minimal
37
+ Provides-Extra: performance
38
+ Requires-Dist: jax; extra == "performance"
39
+ Requires-Dist: jaxlib; extra == "performance"
40
+ Provides-Extra: hpc
41
+ Requires-Dist: dask_jobqueue; extra == "hpc"
42
+ Requires-Dist: psutil; extra == "hpc"
43
+ Provides-Extra: plotting
44
+ Requires-Dist: seaborn>=0.11.0; extra == "plotting"
45
+ Requires-Dist: cmocean; extra == "plotting"
46
+ Requires-Dist: cartopy; extra == "plotting"
47
+ Requires-Dist: matplotlib>=3.5.0; extra == "plotting"
48
+ Requires-Dist: ffmpeg; extra == "plotting"
49
+ Provides-Extra: full
50
+ Requires-Dist: jax; extra == "full"
51
+ Requires-Dist: jaxlib; extra == "full"
52
+ Requires-Dist: dask_jobqueue; extra == "full"
53
+ Requires-Dist: seaborn>=0.11.0; extra == "full"
54
+ Requires-Dist: cmocean; extra == "full"
55
+ Requires-Dist: ffmpeg; extra == "full"
56
+ Provides-Extra: dev
57
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
58
+ Requires-Dist: pytest-cov; extra == "dev"
59
+ Requires-Dist: pytest-xdist; extra == "dev"
60
+ Requires-Dist: black>=22.0.0; extra == "dev"
61
+ Requires-Dist: flake8>=4.0.0; extra == "dev"
62
+ Requires-Dist: flake8-pyproject; extra == "dev"
63
+ Requires-Dist: isort>=5.0.0; extra == "dev"
64
+ Requires-Dist: mypy>=0.991; extra == "dev"
65
+ Requires-Dist: pre-commit>=2.20.0; extra == "dev"
66
+ Requires-Dist: coverage[toml]>=6.0.0; extra == "dev"
67
+ Requires-Dist: nbqa; extra == "dev"
68
+ Requires-Dist: bandit[toml]>=1.7.0; extra == "dev"
69
+ Requires-Dist: psutil; extra == "dev"
70
+ Requires-Dist: sphinx>=5.0.0; extra == "dev"
71
+ Requires-Dist: sphinx-rtd-theme; extra == "dev"
72
+ Requires-Dist: myst-parser; extra == "dev"
73
+ Requires-Dist: jupyter; extra == "dev"
74
+ Requires-Dist: ipykernel; extra == "dev"
75
+ Provides-Extra: docs
76
+ Requires-Dist: sphinx>=5.0.0; extra == "docs"
77
+ Requires-Dist: sphinx-rtd-theme; extra == "docs"
78
+ Requires-Dist: myst-parser; extra == "docs"
79
+ Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
80
+ Requires-Dist: nbsphinx; extra == "docs"
81
+ Requires-Dist: pandoc; extra == "docs"
82
+ Requires-Dist: sphinxcontrib-video; extra == "docs"
83
+ Provides-Extra: test
84
+ Requires-Dist: pytest>=7.0.0; extra == "test"
85
+ Requires-Dist: pytest-cov; extra == "test"
86
+ Requires-Dist: pytest-xdist; extra == "test"
87
+ Requires-Dist: coverage[toml]>=6.0.0; extra == "test"
88
+ Requires-Dist: psutil; extra == "test"
89
+
90
+ ![logo](https://github.com/user-attachments/assets/df99a84b-c88f-447d-a362-ac538d9b924b)
91
+
92
+ [![CI](https://github.com/wienkers/marEx/actions/workflows/ci.yml/badge.svg)](https://github.com/wienkers/marEx/actions/workflows/ci.yml)
93
+ [![codecov](https://codecov.io/gh/wienkers/marEx/branch/main/graph/badge.svg)](https://codecov.io/gh/wienkers/marEx)
94
+ [![PyPI version](https://badge.fury.io/py/marEx.svg)](https://badge.fury.io/py/marEx)
95
+ [![Documentation Status](https://readthedocs.org/projects/marex/badge/?version=latest)](https://marex.readthedocs.io/en/latest/)
96
+ [![PyPI Downloads](https://static.pepy.tech/badge/marex)](https://pepy.tech/projects/marex)
97
+ [![DOI](https://zenodo.org/badge/945834123.svg)](https://doi.org/10.5281/zenodo.16922881)
98
+
99
+ # Marine Extremes Detection and Tracking
100
+
101
+ **Efficient & scalable marine extremes detection, identification, & tracking for exascale climate data.**
102
+
103
+ marEx is a high-performance Python framework for identifying and tracking extreme oceanographic events (such as Marine Heatwaves or Acidity Extremes) in massive climate datasets. Built on advanced statistical methods and distributed computing, it processes decades of daily-resolution global ocean data with unprecedented efficiency and scalability.
104
+
105
+ ---
106
+
107
+ ## Key Features
108
+
109
+ - **⚡ Extreme Performance**: Process 100+ years of high-resolution daily global data in minutes
110
+ - **🌐 Universal Grid Support**: Native support for both regular (lat/lon) grids and unstructured ocean models
111
+ - **📈 Advanced Event Tracking**: Handles coherent object splitting, merging, and evolution
112
+ - **📊 Multiple Detection Methods**: Scientifically rigorous algorithms for robust extreme event identification
113
+ - **☁️ Cloud-Native Scaling**: Identical codebase scales from laptop to supercomputer using up to 1024+ cores
114
+ - **🧠 Memory Efficient**: Intelligent chunking and lazy evaluation for datasets larger than memory
115
+
116
+
117
+ ---
118
+
119
+ https://github.com/user-attachments/assets/501537ff-5adb-4e13-ba08-6a333bac2a02
120
+
121
+ ![marEx_front](https://github.com/user-attachments/assets/939fceee-8990-46fb-b3f8-30e803b6c802)
122
+
123
+ ---
124
+
125
+ ## Quick Start
126
+
127
+ ```python
128
+ import xarray as xr
129
+ import marEx
130
+
131
+ # Load sea surface temperature data
132
+ sst = xr.open_dataset('sst_data.nc', chunks={'time': 30}).sst
133
+
134
+ # Identify extreme events
135
+ extreme_events_ds = marEx.preprocess_data(
136
+ sst,
137
+ threshold_percentile=95,
138
+ method_anomaly='shifting_baseline',
139
+ method_extreme='hobday_extreme'
140
+ )
141
+
142
+ # Track events through time
143
+ events_ds = marEx.tracker(
144
+ extreme_events_ds.extreme_events,
145
+ extreme_events_ds.mask,
146
+ R_fill=8,
147
+ area_filter_absolute=100,
148
+ allow_merging=True
149
+ ).run()
150
+
151
+ # Visualise results
152
+ fig, ax, im = (events_ds.ID_field > 0).mean("time").plotX.single_plot(
153
+ marEx.PlotConfig(var_units="MHW Frequency", cmap="hot_r", cperc=[0, 96])
154
+ )
155
+ ```
156
+
157
+ ---
158
+
159
+ ## Installation
160
+
161
+ ```bash
162
+ pip install marEx[full,hpc]
163
+ ```
164
+
165
+ For detailed installation instructions, including HPC environments and optional dependencies, see the **[Installation Guide](https://marex.readthedocs.io/en/latest/installation.html)**.
166
+
167
+ ---
168
+
169
+ ## Core Workflow
170
+
171
+ marEx follows a three-stage pipeline:
172
+
173
+ ```
174
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
175
+ │ 1. Detect │ → │ 2. Track │ → │ 3. Visualise │
176
+ │ Extremes │ │ Events │ │ & Analyse │
177
+ └─────────────────┘ └─────────────────┘ └─────────────────┘
178
+ ↓ ↓ ↓
179
+ preprocess_data() tracker() plotX()
180
+ ↓ ↓ ↓
181
+ Binary extreme map Tracked objects Maps, animations,
182
+ with unique IDs & statistics
183
+ ```
184
+
185
+ **Learn more**: [Core Concepts](https://marex.readthedocs.io/en/latest/concepts.html) | [User Guide](https://marex.readthedocs.io/en/latest/user_guide.html)
186
+
187
+ ---
188
+
189
+ ## Documentation
190
+
191
+ For detailed guides, tutorials, and API reference, visit the full documentation:
192
+
193
+ ### 📚 **[marEx Documentation on ReadTheDocs](https://marex.readthedocs.io/)**
194
+
195
+ **Quick Links:**
196
+ - **[Quickstart Guide](https://marex.readthedocs.io/en/latest/quickstart.html)** - Get started in 5 minutes
197
+ - **[Why marEx?](https://marex.readthedocs.io/en/latest/why_marex.html)** - Learn about the unique capabilities
198
+ - **[Core Concepts](https://marex.readthedocs.io/en/latest/concepts.html)** - Understanding marEx's design and workflow
199
+ - **[User Guide](https://marex.readthedocs.io/en/latest/user_guide.html)** - Comprehensive usage guide with method selection, parameter tuning, and performance optimisation
200
+ - **[API Reference](https://marex.readthedocs.io/en/latest/api.html)** - Complete function documentation
201
+ - **[Examples](https://marex.readthedocs.io/en/latest/examples.html)** - Jupyter notebooks for gridded, regional, and unstructured data
202
+ - **[Troubleshooting](https://marex.readthedocs.io/en/latest/troubleshooting.html)** - Common issues and solutions
203
+
204
+ ---
205
+
206
+ ## Examples
207
+
208
+ Explore complete workflows in the [example notebooks](https://github.com/wienkers/marEx/tree/main/examples):
209
+
210
+ - **Gridded Data**: Standard analysis for regular lat/lon grids (satellite data, CMIP6 models)
211
+ - **Regional Data**: Regional analysis with boundary handling (EURO-CORDEX)
212
+ - **Unstructured Data**: Analysis for irregular meshes (FESOM, ICON-O, MPAS-Ocean)
213
+
214
+ Each example demonstrates the full pipeline from preprocessing to visualisation.
215
+
216
+ ---
217
+
218
+ ## Key Capabilities
219
+
220
+ ### Detection Methods
221
+
222
+ marEx provides multiple scientifically rigorous methods for anomaly calculation and extreme identification:
223
+
224
+ **Anomaly Detection:**
225
+ - **Shifting Baseline**: Rolling climatology (most accurate, research standard)
226
+ - **Detrend Fixed Baseline**: Polynomial detrending + fixed climatology (preserves full time series)
227
+ - **Fixed Baseline**: Simple daily climatology (trend-inclusive)
228
+ - **Harmonic Detrending**: Fast polynomial + harmonic model (efficient screening)
229
+
230
+ **Extreme Identification:**
231
+ - **Hobday Method**: Day-of-year specific thresholds with spatial window extension (literature standard, Hobday et al. 2016)
232
+ - **Global Method**: Single threshold across time (fast, exploratory analysis)
233
+
234
+ **[→ Learn more about method selection](https://marex.readthedocs.io/en/latest/user_guide.html#method-selection-guide)**
235
+
236
+ ### Advanced Tracking
237
+
238
+ - **Morphological Operations**: Fill spatial gaps and smooth event boundaries
239
+ - **Temporal Gap Filling**: Maintain event continuity across short interruptions
240
+ - **Merge/Split Handling**: Track event genealogy with improved nearest-neighbor partitioning
241
+ - **Area Filtering**: Remove spurious small events with percentile or absolute thresholds
242
+
243
+ **[→ Explore tracking algorithms](https://marex.readthedocs.io/en/latest/modules/track.html)**
244
+
245
+ ### Performance & Scalability
246
+
247
+ - **Dask-First Architecture**: Parallel computation with automatic memory management
248
+ - **JAX Acceleration**: Optional GPU/TPU support for 10-50× speedup
249
+ - **HPC Integration**: SLURM cluster support for supercomputing environments
250
+ - **Memory Optimisation**: Process datasets 100-1000× larger than available RAM
251
+
252
+ **[→ Performance tuning guide](https://marex.readthedocs.io/en/latest/user_guide.html#performance-optimisation)**
253
+
254
+ ---
255
+
256
+ ## Getting Help
257
+
258
+ ### Support Channels
259
+
260
+ - **[Documentation](https://marex.readthedocs.io/)** - Detailed guides and API reference
261
+ - **[GitHub Issues](https://github.com/wienkers/marEx/issues)** - Bug reports and feature requests
262
+ - **[GitHub Discussions](https://github.com/wienkers/marEx/discussions)** - Questions, ideas, and community support
263
+ - **[Example Notebooks](https://github.com/wienkers/marEx/tree/main/examples)** - Complete workflow demonstrations
264
+
265
+ ### Reporting Issues
266
+
267
+ When reporting issues, please include:
268
+ - marEx version (`marEx.__version__`)
269
+ - Python version and operating system
270
+ - Dependency status (`marEx.print_dependency_status()`)
271
+ - Minimal reproducible example
272
+ - Full error traceback
273
+
274
+ ---
275
+
276
+ ## Citation
277
+
278
+ When using marEx in publications, please cite:
279
+
280
+ - **marEx package**: DOI [10.5281/zenodo.16922881](https://doi.org/10.5281/zenodo.16922881)
281
+ - **Hobday et al. (2016)**: "A hierarchical approach to defining marine heatwaves." *Progress in Oceanography* 141, 227-238. DOI [10.1016/j.pocean.2015.12.014](https://doi.org/10.1016/j.pocean.2015.12.014)
282
+
283
+ ---
284
+
285
+ ## Funding
286
+
287
+ This project has received funding through:
288
+
289
+ * The [EERIE](https://eerie-project.eu) (European Eddy-Rich ESMs) Project
290
+ * The European Union's Horizon Europe research and innovation programme under Grant Agreement No. 101081383
291
+ * The Swiss State Secretariat for Education, Research and Innovation (SERI) under contract #22.00366
292
+
293
+ ---
294
+
295
+ ## Contact
296
+
297
+ For questions, comments, or collaboration opportunities, please contact [Aaron Wienkers](mailto:aaron.wienkers@gmail.com).