eo-tides 0.4.0__tar.gz → 0.6.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.
- {eo_tides-0.4.0 → eo_tides-0.6.0}/PKG-INFO +10 -10
- {eo_tides-0.4.0 → eo_tides-0.6.0}/README.md +3 -2
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides/eo.py +53 -28
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides/model.py +3 -2
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides/stats.py +6 -5
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides.egg-info/PKG-INFO +10 -10
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides.egg-info/requires.txt +4 -4
- {eo_tides-0.4.0 → eo_tides-0.6.0}/pyproject.toml +9 -7
- {eo_tides-0.4.0 → eo_tides-0.6.0}/tests/test_eo.py +33 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/LICENSE +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides/__init__.py +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides/utils.py +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides/validation.py +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides.egg-info/SOURCES.txt +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides.egg-info/dependency_links.txt +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/eo_tides.egg-info/top_level.txt +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/setup.cfg +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/tests/test_model.py +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/tests/test_stats.py +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/tests/test_utils.py +0 -0
- {eo_tides-0.4.0 → eo_tides-0.6.0}/tests/test_validation.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: eo-tides
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.0
|
4
4
|
Summary: Tide modelling tools for large-scale satellite earth observation analysis
|
5
5
|
Author: Robbi Bishop-Taylor, Stephen Sagar, Claire Phillips, Vanessa Newey
|
6
6
|
Author-email: Robbi.BishopTaylor@ga.gov.au
|
@@ -16,12 +16,11 @@ Classifier: Topic :: Scientific/Engineering :: Oceanography
|
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
17
17
|
Classifier: Topic :: Scientific/Engineering :: Image Processing
|
18
18
|
Classifier: License :: OSI Approved :: Apache Software License
|
19
|
-
Classifier: Programming Language :: Python :: 3.9
|
20
19
|
Classifier: Programming Language :: Python :: 3.10
|
21
20
|
Classifier: Programming Language :: Python :: 3.11
|
22
21
|
Classifier: Programming Language :: Python :: 3.12
|
23
22
|
Classifier: Programming Language :: Python :: 3.13
|
24
|
-
Requires-Python: <4.0,>=3.
|
23
|
+
Requires-Python: <4.0,>=3.10
|
25
24
|
Description-Content-Type: text/markdown
|
26
25
|
License-File: LICENSE
|
27
26
|
Requires-Dist: colorama>=0.4.3
|
@@ -31,11 +30,11 @@ Requires-Dist: numpy>=1.26.0
|
|
31
30
|
Requires-Dist: odc-geo>=0.4.7
|
32
31
|
Requires-Dist: pandas>=2.2.0
|
33
32
|
Requires-Dist: psutil>=5.8.0
|
34
|
-
Requires-Dist: pyogrio>=0.
|
35
|
-
Requires-Dist: pyproj>=3.
|
36
|
-
Requires-Dist: pyTMD==2.2.
|
33
|
+
Requires-Dist: pyogrio>=0.10.0
|
34
|
+
Requires-Dist: pyproj>=3.7.0
|
35
|
+
Requires-Dist: pyTMD==2.2.1
|
37
36
|
Requires-Dist: scikit-learn>=1.4.0
|
38
|
-
Requires-Dist: scipy>=1.
|
37
|
+
Requires-Dist: scipy>=1.14.1
|
39
38
|
Requires-Dist: shapely>=2.0.6
|
40
39
|
Requires-Dist: tqdm>=4.55.0
|
41
40
|
Requires-Dist: xarray>=2022.3.0
|
@@ -55,13 +54,13 @@ Requires-Dist: planetary_computer>=1.0.0; extra == "notebooks"
|
|
55
54
|
[](https://github.com/GeoscienceAustralia/eo-tides/blob/main/pyproject.toml)
|
56
55
|
[](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
|
57
56
|
[](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
|
57
|
+
[](https://joss.theoj.org/papers/b5680c39bf831c1159c41a2eb7ec9c5e)
|
58
58
|
|
59
59
|
- ⚙️ **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
|
60
60
|
- 📘 **Documentation**: <https://GeoscienceAustralia.github.io/eo-tides/>
|
61
61
|
- 🐍 **PyPI**: <https://pypi.org/project/eo-tides/>
|
62
62
|
|
63
|
-
>
|
64
|
-
> This package is a work in progress, and not currently ready for operational use.
|
63
|
+
<br>
|
65
64
|
|
66
65
|
`eo-tides` provides powerful parallelized tools for integrating satellite Earth observation data with tide modelling. 🛠️🌊🛰️
|
67
66
|
|
@@ -89,6 +88,7 @@ These tools can be applied to petabytes of freely available satellite data (e.g.
|
|
89
88
|
- [TOPEX/POSEIDON global tide models](https://www.tpxo.net/global) (TPXO10, TPXO9, TPXO8)
|
90
89
|
- [Global Ocean Tide models](https://doi.org/10.1002/2016RG000546) (GOT5.6, GOT5.5, GOT4.10, GOT4.8, GOT4.7)
|
91
90
|
- [Hamburg direct data Assimilation Methods for Tides models](https://doi.org/10.1002/2013JC009766) (HAMTIDE11)
|
91
|
+
- [Technical University of Denmark tide models](https://doi.org/10.11583/DTU.23828874) (DTU23)
|
92
92
|
|
93
93
|
For instructions on how to set up these models for use in `eo-tides`, refer to [Setting up tide models](setup.md).
|
94
94
|
|
@@ -7,13 +7,13 @@
|
|
7
7
|
[](https://github.com/GeoscienceAustralia/eo-tides/blob/main/pyproject.toml)
|
8
8
|
[](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
|
9
9
|
[](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
|
10
|
+
[](https://joss.theoj.org/papers/b5680c39bf831c1159c41a2eb7ec9c5e)
|
10
11
|
|
11
12
|
- ⚙️ **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
|
12
13
|
- 📘 **Documentation**: <https://GeoscienceAustralia.github.io/eo-tides/>
|
13
14
|
- 🐍 **PyPI**: <https://pypi.org/project/eo-tides/>
|
14
15
|
|
15
|
-
>
|
16
|
-
> This package is a work in progress, and not currently ready for operational use.
|
16
|
+
<br>
|
17
17
|
|
18
18
|
`eo-tides` provides powerful parallelized tools for integrating satellite Earth observation data with tide modelling. 🛠️🌊🛰️
|
19
19
|
|
@@ -41,6 +41,7 @@ These tools can be applied to petabytes of freely available satellite data (e.g.
|
|
41
41
|
- [TOPEX/POSEIDON global tide models](https://www.tpxo.net/global) (TPXO10, TPXO9, TPXO8)
|
42
42
|
- [Global Ocean Tide models](https://doi.org/10.1002/2016RG000546) (GOT5.6, GOT5.5, GOT4.10, GOT4.8, GOT4.7)
|
43
43
|
- [Hamburg direct data Assimilation Methods for Tides models](https://doi.org/10.1002/2013JC009766) (HAMTIDE11)
|
44
|
+
- [Technical University of Denmark tide models](https://doi.org/10.11583/DTU.23828874) (DTU23)
|
44
45
|
|
45
46
|
For instructions on how to set up these models for use in `eo-tides`, refer to [Setting up tide models](setup.md).
|
46
47
|
|
@@ -15,7 +15,7 @@ from odc.geo.geobox import GeoBox
|
|
15
15
|
if TYPE_CHECKING:
|
16
16
|
from odc.geo import Shape2d
|
17
17
|
|
18
|
-
from .model import model_tides
|
18
|
+
from .model import model_phases, model_tides
|
19
19
|
from .utils import DatetimeLike, _standardise_time
|
20
20
|
|
21
21
|
|
@@ -168,26 +168,28 @@ def tag_tides(
|
|
168
168
|
directory: str | os.PathLike | None = None,
|
169
169
|
tidepost_lat: float | None = None,
|
170
170
|
tidepost_lon: float | None = None,
|
171
|
+
return_phases: bool = False,
|
171
172
|
**model_tides_kwargs,
|
172
|
-
) -> xr.DataArray:
|
173
|
+
) -> xr.DataArray | xr.Dataset:
|
173
174
|
"""
|
174
|
-
Model tide heights for every timestep in a
|
175
|
-
dataset, and return a new
|
176
|
-
be used to "tag" each observation with tide
|
175
|
+
Model tide heights and tide phases for every timestep in a
|
176
|
+
multi-dimensional dataset, and return a new array that can
|
177
|
+
be used to "tag" each observation with tide information.
|
177
178
|
|
178
179
|
The function models tides at the centroid of the dataset
|
179
|
-
by default, but a custom tidal modelling location can
|
180
|
-
|
180
|
+
by default, but a custom tidal modelling location can be
|
181
|
+
specified using `tidepost_lat` and `tidepost_lon`.
|
181
182
|
|
182
|
-
This function uses the parallelised `model_tides`
|
183
|
-
under the hood. It supports all tidal
|
184
|
-
`pyTMD`, including:
|
183
|
+
This function uses the parallelised `model_tides` and
|
184
|
+
`model_phases` functions under the hood. It supports all tidal
|
185
|
+
models supported by `pyTMD`, including:
|
185
186
|
|
186
187
|
- Empirical Ocean Tide model (EOT20)
|
187
188
|
- Finite Element Solution tide models (FES2022, FES2014, FES2012)
|
188
189
|
- TOPEX/POSEIDON global tide models (TPXO10, TPXO9, TPXO8)
|
189
190
|
- Global Ocean Tide models (GOT5.6, GOT5.5, GOT4.10, GOT4.8, GOT4.7)
|
190
191
|
- Hamburg direct data Assimilation Methods for Tides models (HAMTIDE11)
|
192
|
+
- Technical University of Denmark tide models (DTU23)
|
191
193
|
|
192
194
|
Parameters
|
193
195
|
----------
|
@@ -209,7 +211,7 @@ def tag_tides(
|
|
209
211
|
added to the `xarray.DataArray` outputs. Defaults to "EOT20";
|
210
212
|
specify "all" to use all models available in `directory`.
|
211
213
|
For a full list of available and supported models, run
|
212
|
-
`eo_tides.
|
214
|
+
`from eo_tides.utils import list_models; list_models()`.
|
213
215
|
directory : str, optional
|
214
216
|
The directory containing tide model data files. If no path is
|
215
217
|
provided, this will default to the environment variable
|
@@ -221,6 +223,10 @@ def tag_tides(
|
|
221
223
|
Optional coordinates used to model tides. The default is None,
|
222
224
|
which uses the centroid of the dataset as the tide modelling
|
223
225
|
location.
|
226
|
+
return_phases : bool, optional
|
227
|
+
Whether to model and return tide phases in addition to tide heights.
|
228
|
+
If True, outputs will be returned as an xr.Dataset containing both
|
229
|
+
"tide_height" and "tide_phase" variables.
|
224
230
|
**model_tides_kwargs :
|
225
231
|
Optional parameters passed to the `eo_tides.model.model_tides`
|
226
232
|
function. Important parameters include `cutoff` (used to
|
@@ -230,10 +236,12 @@ def tag_tides(
|
|
230
236
|
|
231
237
|
Returns
|
232
238
|
-------
|
233
|
-
tides_da : xr.DataArray
|
234
|
-
|
235
|
-
|
236
|
-
|
239
|
+
tides_da : xr.DataArray or xr.Dataset
|
240
|
+
If `return_phases=False`: a one-dimensional "tide_height" xr.DataArray.
|
241
|
+
If `return_phases=True`: a one-dimensional xr.Dataset containing
|
242
|
+
"tide_height" and "tide_phase" variables.
|
243
|
+
Outputs will contain values for every timestep in `data`, or for
|
244
|
+
every time in `times` if provided.
|
237
245
|
"""
|
238
246
|
# Standardise data inputs, time and models
|
239
247
|
gbox, time_coords = _standardise_inputs(data, time)
|
@@ -247,16 +255,31 @@ def tag_tides(
|
|
247
255
|
lon, lat = tidepost_lon, tidepost_lat
|
248
256
|
print(f"Using tide modelling location: {lon:.2f}, {lat:.2f}")
|
249
257
|
|
250
|
-
#
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
258
|
+
# Either model both tides and phases, or model only tides
|
259
|
+
if return_phases:
|
260
|
+
# Model tide phases and heights for each observation
|
261
|
+
tide_df = model_phases(
|
262
|
+
x=lon, # type: ignore
|
263
|
+
y=lat, # type: ignore
|
264
|
+
time=time_coords,
|
265
|
+
model=model,
|
266
|
+
directory=directory,
|
267
|
+
crs="EPSG:4326",
|
268
|
+
return_tides=True,
|
269
|
+
**model_tides_kwargs,
|
270
|
+
)
|
271
|
+
|
272
|
+
else:
|
273
|
+
# Model tide heights for each observation
|
274
|
+
tide_df = model_tides(
|
275
|
+
x=lon, # type: ignore
|
276
|
+
y=lat, # type: ignore
|
277
|
+
time=time_coords,
|
278
|
+
model=model,
|
279
|
+
directory=directory,
|
280
|
+
crs="EPSG:4326",
|
281
|
+
**model_tides_kwargs,
|
282
|
+
)
|
260
283
|
|
261
284
|
# If tides cannot be successfully modeled (e.g. if the centre of the
|
262
285
|
# xarray dataset is located is over land), raise an exception
|
@@ -269,8 +292,9 @@ def tag_tides(
|
|
269
292
|
f"`tidepost_lat` and `tidepost_lon` parameters."
|
270
293
|
)
|
271
294
|
|
272
|
-
# Convert to xarray format
|
273
|
-
|
295
|
+
# Convert to xarray format, squeezing to return an xr.DataArray if
|
296
|
+
# dataframe contains only one "tide_height" column
|
297
|
+
tides_da = tide_df.reset_index().set_index(["time", "tide_model"]).drop(["x", "y"], axis=1).squeeze().to_xarray()
|
274
298
|
|
275
299
|
# If only one tidal model exists, squeeze out "tide_model" dim
|
276
300
|
if len(tides_da.tide_model) == 1:
|
@@ -313,6 +337,7 @@ def pixel_tides(
|
|
313
337
|
- TOPEX/POSEIDON global tide models (TPXO10, TPXO9, TPXO8)
|
314
338
|
- Global Ocean Tide models (GOT5.6, GOT5.5, GOT4.10, GOT4.8, GOT4.7)
|
315
339
|
- Hamburg direct data Assimilation Methods for Tides models (HAMTIDE11)
|
340
|
+
- Technical University of Denmark tide models (DTU23)
|
316
341
|
|
317
342
|
This function requires access to tide model data files.
|
318
343
|
These should be placed in a folder with subfolders matching
|
@@ -340,7 +365,7 @@ def pixel_tides(
|
|
340
365
|
added to the `xarray.DataArray` outputs. Defaults to "EOT20";
|
341
366
|
specify "all" to use all models available in `directory`.
|
342
367
|
For a full list of available and supported models, run
|
343
|
-
`eo_tides.
|
368
|
+
`from eo_tides.utils import list_models; list_models()`.
|
344
369
|
directory : str, optional
|
345
370
|
The directory containing tide model data files. If no path is
|
346
371
|
provided, this will default to the environment variable
|
@@ -416,6 +416,7 @@ def model_tides(
|
|
416
416
|
- TOPEX/POSEIDON global tide models (TPXO10, TPXO9, TPXO8)
|
417
417
|
- Global Ocean Tide models (GOT5.6, GOT5.5, GOT4.10, GOT4.8, GOT4.7)
|
418
418
|
- Hamburg direct data Assimilation Methods for Tides models (HAMTIDE11)
|
419
|
+
- Technical University of Denmark tide models (DTU23)
|
419
420
|
|
420
421
|
This function requires access to tide model data files.
|
421
422
|
These should be placed in a folder with subfolders matching
|
@@ -444,7 +445,7 @@ def model_tides(
|
|
444
445
|
The tide model (or list of models) to use to model tides.
|
445
446
|
Defaults to "EOT20"; specify "all" to use all models available
|
446
447
|
in `directory`. For a full list of available and supported models,
|
447
|
-
run `eo_tides.
|
448
|
+
run `from eo_tides.utils import list_models; list_models()`.
|
448
449
|
directory : str, optional
|
449
450
|
The directory containing tide model data files. If no path is
|
450
451
|
provided, this will default to the environment variable
|
@@ -735,7 +736,7 @@ def model_phases(
|
|
735
736
|
The tide model (or list of models) to use to model tides.
|
736
737
|
Defaults to "EOT20"; specify "all" to use all models available
|
737
738
|
in `directory`. For a full list of available and supported models,
|
738
|
-
run `eo_tides.
|
739
|
+
run `from eo_tides.utils import list_models; list_models()`.
|
739
740
|
directory : str, optional
|
740
741
|
The directory containing tide model data files. If no path is
|
741
742
|
provided, this will default to the environment variable
|
@@ -243,10 +243,11 @@ def tide_stats(
|
|
243
243
|
model : str or list of str, optional
|
244
244
|
The tide model (or list of models) to use to model tides.
|
245
245
|
If a list is provided, the resulting statistics will be
|
246
|
-
returned as a `pandas.Dataframe`; otherwise a `pandas.Series
|
247
|
-
Defaults to "EOT20"; specify "all" to use
|
248
|
-
in `directory`. For a full list of
|
249
|
-
models, run
|
246
|
+
returned as a `pandas.Dataframe`; otherwise a `pandas.Series`
|
247
|
+
will be returned. Defaults to "EOT20"; specify "all" to use
|
248
|
+
all models available in `directory`. For a full list of
|
249
|
+
available and supported models, run
|
250
|
+
`from eo_tides.utils import list_models; list_models()`.
|
250
251
|
directory : str, optional
|
251
252
|
The directory containing tide model data files. If no path is
|
252
253
|
provided, this will default to the environment variable
|
@@ -453,7 +454,7 @@ def pixel_stats(
|
|
453
454
|
added to the `xarray.Dataset` output. Defaults to "EOT20";
|
454
455
|
specify "all" to use all models available in `directory`.
|
455
456
|
For a full list of available and supported models, run
|
456
|
-
`eo_tides.
|
457
|
+
`from eo_tides.utils import list_models; list_models()`.
|
457
458
|
directory : str, optional
|
458
459
|
The directory containing tide model data files. If no path is
|
459
460
|
provided, this will default to the environment variable
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: eo-tides
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.0
|
4
4
|
Summary: Tide modelling tools for large-scale satellite earth observation analysis
|
5
5
|
Author: Robbi Bishop-Taylor, Stephen Sagar, Claire Phillips, Vanessa Newey
|
6
6
|
Author-email: Robbi.BishopTaylor@ga.gov.au
|
@@ -16,12 +16,11 @@ Classifier: Topic :: Scientific/Engineering :: Oceanography
|
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
17
17
|
Classifier: Topic :: Scientific/Engineering :: Image Processing
|
18
18
|
Classifier: License :: OSI Approved :: Apache Software License
|
19
|
-
Classifier: Programming Language :: Python :: 3.9
|
20
19
|
Classifier: Programming Language :: Python :: 3.10
|
21
20
|
Classifier: Programming Language :: Python :: 3.11
|
22
21
|
Classifier: Programming Language :: Python :: 3.12
|
23
22
|
Classifier: Programming Language :: Python :: 3.13
|
24
|
-
Requires-Python: <4.0,>=3.
|
23
|
+
Requires-Python: <4.0,>=3.10
|
25
24
|
Description-Content-Type: text/markdown
|
26
25
|
License-File: LICENSE
|
27
26
|
Requires-Dist: colorama>=0.4.3
|
@@ -31,11 +30,11 @@ Requires-Dist: numpy>=1.26.0
|
|
31
30
|
Requires-Dist: odc-geo>=0.4.7
|
32
31
|
Requires-Dist: pandas>=2.2.0
|
33
32
|
Requires-Dist: psutil>=5.8.0
|
34
|
-
Requires-Dist: pyogrio>=0.
|
35
|
-
Requires-Dist: pyproj>=3.
|
36
|
-
Requires-Dist: pyTMD==2.2.
|
33
|
+
Requires-Dist: pyogrio>=0.10.0
|
34
|
+
Requires-Dist: pyproj>=3.7.0
|
35
|
+
Requires-Dist: pyTMD==2.2.1
|
37
36
|
Requires-Dist: scikit-learn>=1.4.0
|
38
|
-
Requires-Dist: scipy>=1.
|
37
|
+
Requires-Dist: scipy>=1.14.1
|
39
38
|
Requires-Dist: shapely>=2.0.6
|
40
39
|
Requires-Dist: tqdm>=4.55.0
|
41
40
|
Requires-Dist: xarray>=2022.3.0
|
@@ -55,13 +54,13 @@ Requires-Dist: planetary_computer>=1.0.0; extra == "notebooks"
|
|
55
54
|
[](https://github.com/GeoscienceAustralia/eo-tides/blob/main/pyproject.toml)
|
56
55
|
[](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
|
57
56
|
[](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
|
57
|
+
[](https://joss.theoj.org/papers/b5680c39bf831c1159c41a2eb7ec9c5e)
|
58
58
|
|
59
59
|
- ⚙️ **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
|
60
60
|
- 📘 **Documentation**: <https://GeoscienceAustralia.github.io/eo-tides/>
|
61
61
|
- 🐍 **PyPI**: <https://pypi.org/project/eo-tides/>
|
62
62
|
|
63
|
-
>
|
64
|
-
> This package is a work in progress, and not currently ready for operational use.
|
63
|
+
<br>
|
65
64
|
|
66
65
|
`eo-tides` provides powerful parallelized tools for integrating satellite Earth observation data with tide modelling. 🛠️🌊🛰️
|
67
66
|
|
@@ -89,6 +88,7 @@ These tools can be applied to petabytes of freely available satellite data (e.g.
|
|
89
88
|
- [TOPEX/POSEIDON global tide models](https://www.tpxo.net/global) (TPXO10, TPXO9, TPXO8)
|
90
89
|
- [Global Ocean Tide models](https://doi.org/10.1002/2016RG000546) (GOT5.6, GOT5.5, GOT4.10, GOT4.8, GOT4.7)
|
91
90
|
- [Hamburg direct data Assimilation Methods for Tides models](https://doi.org/10.1002/2013JC009766) (HAMTIDE11)
|
91
|
+
- [Technical University of Denmark tide models](https://doi.org/10.11583/DTU.23828874) (DTU23)
|
92
92
|
|
93
93
|
For instructions on how to set up these models for use in `eo-tides`, refer to [Setting up tide models](setup.md).
|
94
94
|
|
@@ -5,11 +5,11 @@ numpy>=1.26.0
|
|
5
5
|
odc-geo>=0.4.7
|
6
6
|
pandas>=2.2.0
|
7
7
|
psutil>=5.8.0
|
8
|
-
pyogrio>=0.
|
9
|
-
pyproj>=3.
|
10
|
-
pyTMD==2.2.
|
8
|
+
pyogrio>=0.10.0
|
9
|
+
pyproj>=3.7.0
|
10
|
+
pyTMD==2.2.1
|
11
11
|
scikit-learn>=1.4.0
|
12
|
-
scipy>=1.
|
12
|
+
scipy>=1.14.1
|
13
13
|
shapely>=2.0.6
|
14
14
|
tqdm>=4.55.0
|
15
15
|
xarray>=2022.3.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "eo-tides"
|
3
|
-
version = "0.
|
3
|
+
version = "0.6.0"
|
4
4
|
description = "Tide modelling tools for large-scale satellite earth observation analysis"
|
5
5
|
authors = [
|
6
6
|
{ name = "Robbi Bishop-Taylor" },
|
@@ -28,13 +28,12 @@ classifiers = [
|
|
28
28
|
"Topic :: Scientific/Engineering :: Visualization",
|
29
29
|
"Topic :: Scientific/Engineering :: Image Processing",
|
30
30
|
"License :: OSI Approved :: Apache Software License",
|
31
|
-
"Programming Language :: Python :: 3.9",
|
32
31
|
"Programming Language :: Python :: 3.10",
|
33
32
|
"Programming Language :: Python :: 3.11",
|
34
33
|
"Programming Language :: Python :: 3.12",
|
35
34
|
"Programming Language :: Python :: 3.13",
|
36
35
|
]
|
37
|
-
requires-python = ">=3.
|
36
|
+
requires-python = ">=3.10,<4.0"
|
38
37
|
dependencies = [
|
39
38
|
"colorama>=0.4.3",
|
40
39
|
"geopandas>=0.10.0",
|
@@ -43,11 +42,11 @@ dependencies = [
|
|
43
42
|
"odc-geo>=0.4.7",
|
44
43
|
"pandas>=2.2.0",
|
45
44
|
"psutil>=5.8.0",
|
46
|
-
"pyogrio>=0.
|
47
|
-
"pyproj>=3.
|
48
|
-
"pyTMD==2.2.
|
45
|
+
"pyogrio>=0.10.0",
|
46
|
+
"pyproj>=3.7.0",
|
47
|
+
"pyTMD==2.2.1",
|
49
48
|
"scikit-learn>=1.4.0",
|
50
|
-
"scipy>=1.
|
49
|
+
"scipy>=1.14.1",
|
51
50
|
"shapely>=2.0.6",
|
52
51
|
"tqdm>=4.55.0",
|
53
52
|
"xarray>=2022.3.0",
|
@@ -90,6 +89,9 @@ dev = [
|
|
90
89
|
requires = ["setuptools >= 61.0"]
|
91
90
|
build-backend = "setuptools.build_meta"
|
92
91
|
|
92
|
+
[tool.setuptools]
|
93
|
+
packages = ["eo_tides"]
|
94
|
+
|
93
95
|
[tool.mypy]
|
94
96
|
files = ["eo_tides"]
|
95
97
|
python_version = "3.10"
|
@@ -47,6 +47,39 @@ def test_tag_tides(satellite_ds, measured_tides_ds, tidepost_lat, tidepost_lon):
|
|
47
47
|
assert abs(val_stats["Bias"]) < 0.20
|
48
48
|
|
49
49
|
|
50
|
+
def test_tag_tides_phases(satellite_ds, measured_tides_ds):
|
51
|
+
# Use tag_tides to model both phases and tide heights
|
52
|
+
tagged_tides_ds = tag_tides(
|
53
|
+
satellite_ds,
|
54
|
+
return_phases=True,
|
55
|
+
)
|
56
|
+
|
57
|
+
# Verify output is an xarray.Dataset
|
58
|
+
assert isinstance(tagged_tides_ds, xr.Dataset)
|
59
|
+
|
60
|
+
# Verify vars are as expected
|
61
|
+
expected_vars = ["tide_height", "tide_phase"]
|
62
|
+
assert set(expected_vars) == set(tagged_tides_ds.data_vars)
|
63
|
+
|
64
|
+
# Verify tide_phase values
|
65
|
+
expected_phases = ["low-flow", "high-flow", "low-ebb", "low-flow", "low-ebb", "low-flow", "high-flow"]
|
66
|
+
assert tagged_tides_ds.tide_phase.values.tolist() == expected_phases
|
67
|
+
|
68
|
+
# Assert tide_model dim has been squeezed out
|
69
|
+
assert "tide_model" not in tagged_tides_ds.dims
|
70
|
+
|
71
|
+
# Model two models at once
|
72
|
+
tagged_tides_ds = tag_tides(
|
73
|
+
satellite_ds,
|
74
|
+
model=["EOT20", "GOT5.5"],
|
75
|
+
return_phases=True,
|
76
|
+
)
|
77
|
+
|
78
|
+
# Assert that output now has a tide_model dimension
|
79
|
+
assert "tide_model" in tagged_tides_ds.dims
|
80
|
+
assert len(tagged_tides_ds["tide_model"]) == 2
|
81
|
+
|
82
|
+
|
50
83
|
def test_tag_tides_multiple(satellite_ds):
|
51
84
|
# Model multiple models at once
|
52
85
|
tagged_tides_da = tag_tides(satellite_ds, model=["EOT20", "HAMTIDE11"], ebb_flow=True)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|