eo-tides 0.0.17__tar.gz → 0.0.19__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.
@@ -0,0 +1,76 @@
1
+ Metadata-Version: 2.1
2
+ Name: eo-tides
3
+ Version: 0.0.19
4
+ Summary: Tide modelling tools for large-scale satellite earth observation analysis
5
+ Author-email: Robbi Bishop-Taylor <Robbi.BishopTaylor@ga.gov.au>
6
+ Project-URL: Homepage, https://GeoscienceAustralia.github.io/eo-tides/
7
+ Project-URL: Repository, https://github.com/GeoscienceAustralia/eo-tides
8
+ Project-URL: Documentation, https://GeoscienceAustralia.github.io/eo-tides/
9
+ Keywords: python
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: geopandas>=1.0.0
14
+ Requires-Dist: numpy
15
+ Requires-Dist: odc-geo[xr]
16
+ Requires-Dist: pandas
17
+ Requires-Dist: pyproj
18
+ Requires-Dist: pyTMD==2.1.6
19
+ Requires-Dist: scikit-learn
20
+ Requires-Dist: scipy
21
+ Requires-Dist: shapely
22
+ Requires-Dist: tqdm
23
+ Provides-Extra: notebooks
24
+ Requires-Dist: odc-stac; extra == "notebooks"
25
+ Requires-Dist: pystac-client; extra == "notebooks"
26
+ Requires-Dist: folium; extra == "notebooks"
27
+ Requires-Dist: matplotlib; extra == "notebooks"
28
+
29
+ # `eo-tides:` Tide modelling tools for large-scale satellite earth observation analysis
30
+
31
+ [![Release](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)](https://pypi.org/project/eo-tides/)
32
+ [![Build status](https://img.shields.io/github/actions/workflow/status/GeoscienceAustralia/eo-tides/main.yml?branch=main)](https://github.com/GeoscienceAustralia/eo-tides/actions/workflows/main.yml?query=branch%3Amain)
33
+ [![codecov](https://codecov.io/gh/GeoscienceAustralia/eo-tides/branch/main/graph/badge.svg)](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
34
+ [![Commit activity](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)
35
+ [![License](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
36
+
37
+ - **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
38
+ - **Documentation** <https://GeoscienceAustralia.github.io/eo-tides/>
39
+
40
+ > [!CAUTION]
41
+ > This package is a work in progress, and not currently ready for operational use.
42
+
43
+ The `eo-tides` package provides powerful, parallelized tools for seamlessly integrating satellite Earth observation data with tide modelling.
44
+
45
+ `eo-tides` combines advanced tide modelling functionality from the [`pyTMD`](https://pytmd.readthedocs.io/en/latest/) package and integrates it with [`pandas`](https://pandas.pydata.org/docs/index.html), [`xarray`](https://docs.xarray.dev/en/stable/) and [`odc-geo`](https://odc-geo.readthedocs.io/en/latest/), providing a suite of flexible tools for efficient analysis of coastal and ocean earth observation data – from regional, continental, to global scale.
46
+
47
+ These tools can be applied to petabytes of freely available satellite data (e.g. from [Digital Earth Australia](https://knowledge.dea.ga.gov.au/) or [Microsoft Planetary Computer](https://planetarycomputer.microsoft.com/)) loaded via Open Data Cube's [`odc-stac`](https://odc-stac.readthedocs.io/en/latest/) or [`datacube`](https://opendatacube.readthedocs.io/en/latest/) packages, supporting coastal and ocean earth observation analysis for any time period or location globally.
48
+
49
+ ## Highlights
50
+
51
+ - 🌊 Model tides from multiple global ocean tide models in parallel, and return tide heights in standardised `pandas.DataFrame` format for further analysis
52
+ - 🛰️ "Tag" satellite data with tide height and stage based on the exact moment of image acquisition
53
+ - 🌐 Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be combined with satellite data
54
+ - 🎯 Combine multiple tide models into a single locally-optimised "ensemble" model informed by satellite altimetry and satellite-observed patterns of tidal inundation
55
+ - 📈 Calculate statistics describing local tide dynamics, as well as biases caused by interactions between tidal processes and satellite orbits
56
+ - 🛠️ Validate modelled tides using measured sea levels from coastal tide gauges (e.g. [GESLA Global Extreme Sea Level Analysis](https://gesla.org/))
57
+
58
+ ## Supported tide models
59
+
60
+ `eo-tides` supports [all ocean tide models supported by `pyTMD`](https://pytmd.readthedocs.io/en/latest/getting_started/Getting-Started.html#model-database). These include:
61
+
62
+ - [Empirical Ocean Tide model](https://doi.org/10.5194/essd-13-3869-2021) (`EOT20`)
63
+ - [Finite Element Solution tide models](https://doi.org/10.5194/os-2020-96) (`FES2022`, `FES2014`, `FES2012`)
64
+ - [TOPEX/POSEIDON global tide models](https://www.tpxo.net/global) (`TPXO10`, `TPXO9`, `TPXO8`)
65
+ - [Global Ocean Tide models](https://doi.org/10.1002/2016RG000546) (`GOT5.6`, `GOT5.5`, `GOT4.10`, `GOT4.8`, `GOT4.7`)
66
+ - [Hamburg direct data Assimilation Methods for Tides models](https://doi.org/10.1002/2013JC009766) (`HAMTIDE11`)
67
+
68
+ For instructions on how to set up these models for use in `eo-tides`, refer to [Setting up tide models](https://geoscienceaustralia.github.io/eo-tides/setup/).
69
+
70
+ ## Citing `eo-tides`
71
+
72
+ To cite `eo-tides` in your work, please use the following citation:
73
+
74
+ ```
75
+ Bishop-Taylor, R., Sagar, S., Phillips, C., & Newey, V. (2024). eo-tides: Tide modelling tools for large-scale satellite earth observation analysis [Computer software]. https://github.com/GeoscienceAustralia/eo-tides
76
+ ```
@@ -0,0 +1,48 @@
1
+ # `eo-tides:` Tide modelling tools for large-scale satellite earth observation analysis
2
+
3
+ [![Release](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)](https://pypi.org/project/eo-tides/)
4
+ [![Build status](https://img.shields.io/github/actions/workflow/status/GeoscienceAustralia/eo-tides/main.yml?branch=main)](https://github.com/GeoscienceAustralia/eo-tides/actions/workflows/main.yml?query=branch%3Amain)
5
+ [![codecov](https://codecov.io/gh/GeoscienceAustralia/eo-tides/branch/main/graph/badge.svg)](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
6
+ [![Commit activity](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)
7
+ [![License](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
8
+
9
+ - **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
10
+ - **Documentation** <https://GeoscienceAustralia.github.io/eo-tides/>
11
+
12
+ > [!CAUTION]
13
+ > This package is a work in progress, and not currently ready for operational use.
14
+
15
+ The `eo-tides` package provides powerful, parallelized tools for seamlessly integrating satellite Earth observation data with tide modelling.
16
+
17
+ `eo-tides` combines advanced tide modelling functionality from the [`pyTMD`](https://pytmd.readthedocs.io/en/latest/) package and integrates it with [`pandas`](https://pandas.pydata.org/docs/index.html), [`xarray`](https://docs.xarray.dev/en/stable/) and [`odc-geo`](https://odc-geo.readthedocs.io/en/latest/), providing a suite of flexible tools for efficient analysis of coastal and ocean earth observation data – from regional, continental, to global scale.
18
+
19
+ These tools can be applied to petabytes of freely available satellite data (e.g. from [Digital Earth Australia](https://knowledge.dea.ga.gov.au/) or [Microsoft Planetary Computer](https://planetarycomputer.microsoft.com/)) loaded via Open Data Cube's [`odc-stac`](https://odc-stac.readthedocs.io/en/latest/) or [`datacube`](https://opendatacube.readthedocs.io/en/latest/) packages, supporting coastal and ocean earth observation analysis for any time period or location globally.
20
+
21
+ ## Highlights
22
+
23
+ - 🌊 Model tides from multiple global ocean tide models in parallel, and return tide heights in standardised `pandas.DataFrame` format for further analysis
24
+ - 🛰️ "Tag" satellite data with tide height and stage based on the exact moment of image acquisition
25
+ - 🌐 Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be combined with satellite data
26
+ - 🎯 Combine multiple tide models into a single locally-optimised "ensemble" model informed by satellite altimetry and satellite-observed patterns of tidal inundation
27
+ - 📈 Calculate statistics describing local tide dynamics, as well as biases caused by interactions between tidal processes and satellite orbits
28
+ - 🛠️ Validate modelled tides using measured sea levels from coastal tide gauges (e.g. [GESLA Global Extreme Sea Level Analysis](https://gesla.org/))
29
+
30
+ ## Supported tide models
31
+
32
+ `eo-tides` supports [all ocean tide models supported by `pyTMD`](https://pytmd.readthedocs.io/en/latest/getting_started/Getting-Started.html#model-database). These include:
33
+
34
+ - [Empirical Ocean Tide model](https://doi.org/10.5194/essd-13-3869-2021) (`EOT20`)
35
+ - [Finite Element Solution tide models](https://doi.org/10.5194/os-2020-96) (`FES2022`, `FES2014`, `FES2012`)
36
+ - [TOPEX/POSEIDON global tide models](https://www.tpxo.net/global) (`TPXO10`, `TPXO9`, `TPXO8`)
37
+ - [Global Ocean Tide models](https://doi.org/10.1002/2016RG000546) (`GOT5.6`, `GOT5.5`, `GOT4.10`, `GOT4.8`, `GOT4.7`)
38
+ - [Hamburg direct data Assimilation Methods for Tides models](https://doi.org/10.1002/2013JC009766) (`HAMTIDE11`)
39
+
40
+ For instructions on how to set up these models for use in `eo-tides`, refer to [Setting up tide models](https://geoscienceaustralia.github.io/eo-tides/setup/).
41
+
42
+ ## Citing `eo-tides`
43
+
44
+ To cite `eo-tides` in your work, please use the following citation:
45
+
46
+ ```
47
+ Bishop-Taylor, R., Sagar, S., Phillips, C., & Newey, V. (2024). eo-tides: Tide modelling tools for large-scale satellite earth observation analysis [Computer software]. https://github.com/GeoscienceAustralia/eo-tides
48
+ ```
@@ -9,11 +9,73 @@ import odc.geo.xr
9
9
  import pandas as pd
10
10
  import pyproj
11
11
  import pyTMD
12
+ from pyTMD.io.model import load_database, model
12
13
  from tqdm import tqdm
13
14
 
14
15
  from eo_tides.utils import idw
15
16
 
16
17
 
18
+ def available_models(directory=None, show_supported=True):
19
+ """
20
+ Prints a list of all tide models available for tide
21
+ modelling using `eo-tides`.
22
+
23
+ This function scans the specified tide model directory
24
+ for tide models supported by the `pyTMD` package, and
25
+ prints a list of models that are available in the
26
+ directory as well as the full list of supported models.
27
+
28
+ For instructions on setting up tide models, see:
29
+ <https://geoscienceaustralia.github.io/eo-tides/setup/>
30
+
31
+ Parameters
32
+ ----------
33
+ directory : str
34
+ Path to the directory containing tide model files.
35
+
36
+ Returns
37
+ -------
38
+ available_m : list
39
+ A list of all available tide models within
40
+ `directory`.
41
+ """
42
+ # TODO: Pull directory code into re-usable function
43
+
44
+ # Set tide modelling files directory. If no custom path is provided,
45
+ # first try global environmental var, then "/var/share/tide_models"
46
+ if directory is None:
47
+ if "EO_TIDES_TIDE_MODELS" in os.environ:
48
+ directory = os.environ["EO_TIDES_TIDE_MODELS"]
49
+ else:
50
+ directory = "/var/share/tide_models"
51
+
52
+ # Verify path exists
53
+ directory = pathlib.Path(directory).expanduser()
54
+ if not directory.exists():
55
+ raise FileNotFoundError("Invalid tide directory")
56
+
57
+ # Get full list of supported models from the database
58
+ supported_models = load_database()["elevation"].keys()
59
+
60
+ # Print list of supported models, marking available and
61
+ # unavailable models and appending available to list
62
+ print(f"Tide models available in `{directory}`:")
63
+ available_m = []
64
+ for m in supported_models:
65
+ try:
66
+ model(directory=directory).elevation(m=m)
67
+ # Mark available models with a green tick
68
+ print(f" ✅ {m}")
69
+ available_m.append(m)
70
+ except:
71
+ if show_supported:
72
+ # Mark unavailable models with a red cross
73
+ print(f" ❌ {m}")
74
+
75
+ # Return list of available models
76
+ return available_m
77
+
78
+
17
79
  def _model_tides(
18
80
  model,
19
81
  x,
@@ -207,16 +269,16 @@ def _model_tides(
207
269
  "x": np.repeat(x, time_repeat),
208
270
  "y": np.repeat(y, time_repeat),
209
271
  "tide_model": model,
210
- "tide_m": tide,
272
+ "tide_height": tide,
211
273
  }).set_index(["time", "x", "y"])
212
274
 
213
275
  # Optionally convert outputs to integer units (can save memory)
214
276
  if output_units == "m":
215
- tide_df["tide_m"] = tide_df.tide_m.astype(np.float32)
277
+ tide_df["tide_height"] = tide_df.tide_height.astype(np.float32)
216
278
  elif output_units == "cm":
217
- tide_df["tide_m"] = (tide_df.tide_m * 100).astype(np.int16)
279
+ tide_df["tide_height"] = (tide_df.tide_height * 100).astype(np.int16)
218
280
  elif output_units == "mm":
219
- tide_df["tide_m"] = (tide_df.tide_m * 1000).astype(np.int16)
281
+ tide_df["tide_height"] = (tide_df.tide_height * 1000).astype(np.int16)
220
282
 
221
283
  return tide_df
222
284
 
@@ -261,7 +323,7 @@ def _ensemble_model(
261
323
  to ensure that interpolations are performed in the correct CRS.
262
324
  tide_df : pandas.DataFrame
263
325
  DataFrame containing tide model predictions with columns
264
- `["time", "x", "y", "tide_m", "tide_model"]`.
326
+ `["time", "x", "y", "tide_height", "tide_model"]`.
265
327
  ensemble_models : list
266
328
  A list of models to include in the ensemble modelling process.
267
329
  All values must exist as columns with the prefix "rank_" in
@@ -298,7 +360,7 @@ def _ensemble_model(
298
360
  pandas.DataFrame
299
361
  DataFrame containing the ensemble model predictions, matching
300
362
  the format of the input `tide_df` (e.g. columns `["time", "x",
301
- "y", "tide_m", "tide_model"]`. By default the 'tide_model'
363
+ "y", "tide_height", "tide_model"]`. By default the 'tide_model'
302
364
  column will be labeled "ensemble" for the combined model
303
365
  predictions (but if a custom dictionary of ensemble functions is
304
366
  provided via `ensemble_func`, each ensemble will be named using
@@ -362,7 +424,7 @@ def _ensemble_model(
362
424
  # Add temp columns containing weightings and weighted values
363
425
  .assign(
364
426
  weights=ensemble_f, # use custom func to compute weights
365
- weighted=lambda i: i.tide_m * i.weights,
427
+ weighted=lambda i: i.tide_height * i.weights,
366
428
  )
367
429
  # Groupby is specified in a weird order here as this seems
368
430
  # to be the easiest way to preserve correct index sorting
@@ -374,7 +436,7 @@ def _ensemble_model(
374
436
  # Calculate weighted mean and convert back to dataframe
375
437
  grouped.weighted.sum()
376
438
  .div(grouped.weights.sum())
377
- .to_frame("tide_m")
439
+ .to_frame("tide_height")
378
440
  # Label ensemble model and ensure indexes are in expected order
379
441
  .assign(tide_model=ensemble_n)
380
442
  .reorder_levels(["time", "x", "y"], axis=0)
@@ -405,47 +467,25 @@ def model_tides(
405
467
  ensemble_models=None,
406
468
  **ensemble_kwargs,
407
469
  ):
408
- """Compute tides at multiple points and times using tidal harmonics.
470
+ """
471
+ Compute tide heights from multiple tide models and for
472
+ multiple coordinates and/or timesteps.
409
473
 
410
- This function supports all tidal models supported by `pyTMD`,
411
- including FES Finite Element Solution models, TPXO TOPEX/POSEIDON
412
- models, EOT Empirical Ocean Tide models, GOT Global Ocean Tide
413
- models, and HAMTIDE Hamburg direct data Assimilation Methods for
414
- Tides models.
474
+ This function is parallelised to improve performance, and
475
+ supports all tidal models supported by `pyTMD`, including:
476
+
477
+ - Empirical Ocean Tide model (`EOT20`)
478
+ - Finite Element Solution tide models (`FES2022`, `FES2014`, `FES2012`)
479
+ - TOPEX/POSEIDON global tide models (`TPXO10`, `TPXO9`, `TPXO8`)
480
+ - Global Ocean Tide models (`GOT5.6`, `GOT5.5`, `GOT4.10`, `GOT4.8`, `GOT4.7`)
481
+ - Hamburg direct data Assimilation Methods for Tides models (`HAMTIDE11`)
415
482
 
416
483
  This function requires access to tide model data files.
417
484
  These should be placed in a folder with subfolders matching
418
- the formats specified by `pyTMD`:
485
+ the structure required by `pyTMD`. For more details:
486
+ <https://geoscienceaustralia.github.io/eo-tides/setup/>
419
487
  <https://pytmd.readthedocs.io/en/latest/getting_started/Getting-Started.html#directories>
420
488
 
421
- For FES2014 (<https://www.aviso.altimetry.fr/es/data/products/auxiliary-products/global-tide-fes/description-fes2014.html>):
422
-
423
- - `{directory}/fes2014/ocean_tide/`
424
-
425
- For FES2022 (<https://www.aviso.altimetry.fr/en/data/products/auxiliary-products/global-tide-fes.html>):
426
-
427
- - `{directory}/fes2022b/ocean_tide/`
428
-
429
- For TPXO8-atlas (<https://www.tpxo.net/tpxo-products-and-registration>):
430
-
431
- - `{directory}/tpxo8_atlas/`
432
-
433
- For TPXO9-atlas-v5 (<https://www.tpxo.net/tpxo-products-and-registration>):
434
-
435
- - `{directory}/TPXO9_atlas_v5/`
436
-
437
- For EOT20 (<https://www.seanoe.org/data/00683/79489/>):
438
-
439
- - `{directory}/EOT20/ocean_tides/`
440
-
441
- For GOT4.10c (<https://earth.gsfc.nasa.gov/geo/data/ocean-tide-models>):
442
-
443
- - `{directory}/GOT4.10c/grids_oceantide_netcdf/`
444
-
445
- For HAMTIDE (<https://www.cen.uni-hamburg.de/en/icdc/data/ocean/hamtide.html>):
446
-
447
- - `{directory}/hamtide/`
448
-
449
489
  This function is a modification of the `pyTMD` package's
450
490
  `compute_tide_corrections` function. For more info:
451
491
  <https://pytmd.readthedocs.io/en/stable/user_guide/compute_tide_corrections.html>
@@ -514,9 +554,10 @@ def model_tides(
514
554
  want to model tides for a specific list of timesteps across
515
555
  multiple spatial points (e.g. for the same set of satellite
516
556
  acquisition times at various locations across your study area).
517
- - "one-to-one": Model tides using a different timestep for each
518
- x and y coordinate point. In this mode, the number of x and
557
+ - "one-to-one": Model tides using a unique timestep for each
558
+ set of x and y coordinates. In this mode, the number of x and
519
559
  y points must equal the number of timesteps provided in "time".
560
+
520
561
  parallel : boolean, optional
521
562
  Whether to parallelise tide modelling using `concurrent.futures`.
522
563
  If multiple tide models are requested, these will be run in
@@ -538,7 +579,7 @@ def model_tides(
538
579
  for millimetres.
539
580
  output_format : str, optional
540
581
  Whether to return the output dataframe in long format (with
541
- results stacked vertically along "tide_model" and "tide_m"
582
+ results stacked vertically along "tide_model" and "tide_height"
542
583
  columns), or wide format (with a column for each tide model).
543
584
  Defaults to "long".
544
585
  ensemble_models : list, optional
@@ -734,7 +775,7 @@ def model_tides(
734
775
  if output_format == "wide":
735
776
  # Pivot into wide format with each time model as a column
736
777
  print("Converting to a wide format dataframe")
737
- tide_df = tide_df.pivot(columns="tide_model", values="tide_m")
778
+ tide_df = tide_df.pivot(columns="tide_model", values="tide_height")
738
779
 
739
780
  # If in 'one-to-one' mode, reindex using our input time/x/y
740
781
  # values to ensure the output is sorted the same as our inputs
@@ -812,7 +853,7 @@ def _pixel_tides_resample(
812
853
  how=ds.odc.geobox,
813
854
  chunks=dask_chunks,
814
855
  resampling=resample_method,
815
- ).rename("tide_m")
856
+ ).rename("tide_height")
816
857
 
817
858
  # Optionally process and load into memory with Dask
818
859
  if dask_compute:
@@ -1064,7 +1105,7 @@ def pixel_tides(
1064
1105
  .set_index("tide_model", append=True)
1065
1106
  # Convert to xarray and select our tide modelling xr.DataArray
1066
1107
  .to_xarray()
1067
- .tide_m
1108
+ .tide_height
1068
1109
  # Re-index and transpose into our input coordinates and dim order
1069
1110
  .reindex_like(rescaled_ds)
1070
1111
  .transpose("tide_model", "time", y_dim, x_dim)
@@ -0,0 +1,76 @@
1
+ Metadata-Version: 2.1
2
+ Name: eo-tides
3
+ Version: 0.0.19
4
+ Summary: Tide modelling tools for large-scale satellite earth observation analysis
5
+ Author-email: Robbi Bishop-Taylor <Robbi.BishopTaylor@ga.gov.au>
6
+ Project-URL: Homepage, https://GeoscienceAustralia.github.io/eo-tides/
7
+ Project-URL: Repository, https://github.com/GeoscienceAustralia/eo-tides
8
+ Project-URL: Documentation, https://GeoscienceAustralia.github.io/eo-tides/
9
+ Keywords: python
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: geopandas>=1.0.0
14
+ Requires-Dist: numpy
15
+ Requires-Dist: odc-geo[xr]
16
+ Requires-Dist: pandas
17
+ Requires-Dist: pyproj
18
+ Requires-Dist: pyTMD==2.1.6
19
+ Requires-Dist: scikit-learn
20
+ Requires-Dist: scipy
21
+ Requires-Dist: shapely
22
+ Requires-Dist: tqdm
23
+ Provides-Extra: notebooks
24
+ Requires-Dist: odc-stac; extra == "notebooks"
25
+ Requires-Dist: pystac-client; extra == "notebooks"
26
+ Requires-Dist: folium; extra == "notebooks"
27
+ Requires-Dist: matplotlib; extra == "notebooks"
28
+
29
+ # `eo-tides:` Tide modelling tools for large-scale satellite earth observation analysis
30
+
31
+ [![Release](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)](https://pypi.org/project/eo-tides/)
32
+ [![Build status](https://img.shields.io/github/actions/workflow/status/GeoscienceAustralia/eo-tides/main.yml?branch=main)](https://github.com/GeoscienceAustralia/eo-tides/actions/workflows/main.yml?query=branch%3Amain)
33
+ [![codecov](https://codecov.io/gh/GeoscienceAustralia/eo-tides/branch/main/graph/badge.svg)](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
34
+ [![Commit activity](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)
35
+ [![License](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
36
+
37
+ - **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
38
+ - **Documentation** <https://GeoscienceAustralia.github.io/eo-tides/>
39
+
40
+ > [!CAUTION]
41
+ > This package is a work in progress, and not currently ready for operational use.
42
+
43
+ The `eo-tides` package provides powerful, parallelized tools for seamlessly integrating satellite Earth observation data with tide modelling.
44
+
45
+ `eo-tides` combines advanced tide modelling functionality from the [`pyTMD`](https://pytmd.readthedocs.io/en/latest/) package and integrates it with [`pandas`](https://pandas.pydata.org/docs/index.html), [`xarray`](https://docs.xarray.dev/en/stable/) and [`odc-geo`](https://odc-geo.readthedocs.io/en/latest/), providing a suite of flexible tools for efficient analysis of coastal and ocean earth observation data – from regional, continental, to global scale.
46
+
47
+ These tools can be applied to petabytes of freely available satellite data (e.g. from [Digital Earth Australia](https://knowledge.dea.ga.gov.au/) or [Microsoft Planetary Computer](https://planetarycomputer.microsoft.com/)) loaded via Open Data Cube's [`odc-stac`](https://odc-stac.readthedocs.io/en/latest/) or [`datacube`](https://opendatacube.readthedocs.io/en/latest/) packages, supporting coastal and ocean earth observation analysis for any time period or location globally.
48
+
49
+ ## Highlights
50
+
51
+ - 🌊 Model tides from multiple global ocean tide models in parallel, and return tide heights in standardised `pandas.DataFrame` format for further analysis
52
+ - 🛰️ "Tag" satellite data with tide height and stage based on the exact moment of image acquisition
53
+ - 🌐 Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be combined with satellite data
54
+ - 🎯 Combine multiple tide models into a single locally-optimised "ensemble" model informed by satellite altimetry and satellite-observed patterns of tidal inundation
55
+ - 📈 Calculate statistics describing local tide dynamics, as well as biases caused by interactions between tidal processes and satellite orbits
56
+ - 🛠️ Validate modelled tides using measured sea levels from coastal tide gauges (e.g. [GESLA Global Extreme Sea Level Analysis](https://gesla.org/))
57
+
58
+ ## Supported tide models
59
+
60
+ `eo-tides` supports [all ocean tide models supported by `pyTMD`](https://pytmd.readthedocs.io/en/latest/getting_started/Getting-Started.html#model-database). These include:
61
+
62
+ - [Empirical Ocean Tide model](https://doi.org/10.5194/essd-13-3869-2021) (`EOT20`)
63
+ - [Finite Element Solution tide models](https://doi.org/10.5194/os-2020-96) (`FES2022`, `FES2014`, `FES2012`)
64
+ - [TOPEX/POSEIDON global tide models](https://www.tpxo.net/global) (`TPXO10`, `TPXO9`, `TPXO8`)
65
+ - [Global Ocean Tide models](https://doi.org/10.1002/2016RG000546) (`GOT5.6`, `GOT5.5`, `GOT4.10`, `GOT4.8`, `GOT4.7`)
66
+ - [Hamburg direct data Assimilation Methods for Tides models](https://doi.org/10.1002/2013JC009766) (`HAMTIDE11`)
67
+
68
+ For instructions on how to set up these models for use in `eo-tides`, refer to [Setting up tide models](https://geoscienceaustralia.github.io/eo-tides/setup/).
69
+
70
+ ## Citing `eo-tides`
71
+
72
+ To cite `eo-tides` in your work, please use the following citation:
73
+
74
+ ```
75
+ Bishop-Taylor, R., Sagar, S., Phillips, C., & Newey, V. (2024). eo-tides: Tide modelling tools for large-scale satellite earth observation analysis [Computer software]. https://github.com/GeoscienceAustralia/eo-tides
76
+ ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "eo-tides"
3
- version = "0.0.17"
3
+ version = "0.0.19"
4
4
  description = "Tide modelling tools for large-scale satellite earth observation analysis"
5
5
  authors = [{ name = "Robbi Bishop-Taylor", email = "Robbi.BishopTaylor@ga.gov.au" }]
6
6
  readme = "README.md"
@@ -6,7 +6,7 @@ import pystac_client
6
6
  import pytest
7
7
  import xarray as xr
8
8
 
9
- from eo_tides.model import model_tides, pixel_tides
9
+ from eo_tides.model import available_models, model_tides, pixel_tides
10
10
  from eo_tides.validation import eval_metrics
11
11
 
12
12
  GAUGE_X = 122.2183
@@ -34,7 +34,7 @@ def measured_tides_ds():
34
34
 
35
35
  # Update index and column names
36
36
  measured_tides_df.index.name = "time"
37
- measured_tides_df.columns = ["tide_m"]
37
+ measured_tides_df.columns = ["tide_height"]
38
38
 
39
39
  # Apply station AHD offset
40
40
  measured_tides_df += ahd_offset
@@ -90,6 +90,12 @@ def satellite_ds(request):
90
90
  return ds
91
91
 
92
92
 
93
+ # Test available tide models
94
+ def test_available_models():
95
+ available_m = available_models()
96
+ assert available_m == ["FES2014", "HAMTIDE11"]
97
+
98
+
93
99
  # Run test for multiple input coordinates, CRSs and interpolation methods
94
100
  @pytest.mark.parametrize(
95
101
  "x, y, crs, method",
@@ -115,12 +121,12 @@ def test_model_tides(measured_tides_ds, x, y, crs, method):
115
121
  )
116
122
 
117
123
  # Compare measured and modelled tides
118
- val_stats = eval_metrics(x=measured_tides_ds.tide_m, y=modelled_tides_df.tide_m)
124
+ val_stats = eval_metrics(x=measured_tides_ds.tide_height, y=modelled_tides_df.tide_height)
119
125
 
120
126
  # Test that modelled tides contain correct headings and have same
121
127
  # number of timesteps
122
128
  assert modelled_tides_df.index.names == ["time", "x", "y"]
123
- assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_m"]
129
+ assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_height"]
124
130
  assert len(modelled_tides_df.index) == len(measured_tides_ds.time)
125
131
 
126
132
  # Test that modelled tides meet expected accuracy
@@ -159,7 +165,7 @@ def test_model_tides_multiplemodels(measured_tides_ds, models, output_format):
159
165
  if output_format == "long":
160
166
  # Verify output has correct columns
161
167
  assert modelled_tides_df.index.names == ["time", "x", "y"]
162
- assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_m"]
168
+ assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_height"]
163
169
 
164
170
  # Verify tide model column contains correct values
165
171
  assert modelled_tides_df.tide_model.unique().tolist() == models
@@ -193,11 +199,11 @@ def test_model_tides_units(measured_tides_ds, units, expected_range, expected_dt
193
199
  )
194
200
 
195
201
  # Calculate tide range
196
- tide_range = modelled_tides_df.tide_m.max() - modelled_tides_df.tide_m.min()
202
+ tide_range = modelled_tides_df.tide_height.max() - modelled_tides_df.tide_height.min()
197
203
 
198
204
  # Verify tide range and dtypes are as expected for unit
199
205
  assert np.isclose(tide_range, expected_range, rtol=0.01)
200
- assert modelled_tides_df.tide_m.dtype == expected_dtype
206
+ assert modelled_tides_df.tide_height.dtype == expected_dtype
201
207
 
202
208
 
203
209
  # Run test for each combination of mode, output format, and one or
@@ -290,7 +296,7 @@ def test_model_tides_ensemble():
290
296
  )
291
297
 
292
298
  assert modelled_tides_df.index.names == ["time", "x", "y"]
293
- assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_m"]
299
+ assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_height"]
294
300
  assert all(modelled_tides_df.tide_model == "ensemble")
295
301
 
296
302
  # Default, ensemble + other models requested
@@ -304,10 +310,10 @@ def test_model_tides_ensemble():
304
310
  )
305
311
 
306
312
  assert modelled_tides_df.index.names == ["time", "x", "y"]
307
- assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_m"]
313
+ assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_height"]
308
314
  assert set(modelled_tides_df.tide_model) == set(models)
309
315
  assert np.allclose(
310
- modelled_tides_df.tide_m,
316
+ modelled_tides_df.tide_height,
311
317
  [
312
318
  -2.831,
313
319
  -1.897,
@@ -336,7 +342,7 @@ def test_model_tides_ensemble():
336
342
  )
337
343
 
338
344
  assert modelled_tides_df.index.names == ["time", "x", "y"]
339
- assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_m"]
345
+ assert modelled_tides_df.columns.tolist() == ["tide_model", "tide_height"]
340
346
  assert set(modelled_tides_df.tide_model) == set(models)
341
347
 
342
348
  # Wide mode, default
@@ -487,7 +493,7 @@ def test_pixel_tides(satellite_ds, measured_tides_ds, resolution):
487
493
  )
488
494
 
489
495
  # Calculate accuracy stats
490
- gauge_stats = eval_metrics(x=measured_tides_ds.tide_m, y=modelled_tides_gauge)
496
+ gauge_stats = eval_metrics(x=measured_tides_ds.tide_height, y=modelled_tides_gauge)
491
497
 
492
498
  # Assert pixel_tide outputs are accurate
493
499
  assert gauge_stats["Correlation"] > 0.99
eo_tides-0.0.17/PKG-INFO DELETED
@@ -1,55 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: eo-tides
3
- Version: 0.0.17
4
- Summary: Tide modelling tools for large-scale satellite earth observation analysis
5
- Author-email: Robbi Bishop-Taylor <Robbi.BishopTaylor@ga.gov.au>
6
- Project-URL: Homepage, https://GeoscienceAustralia.github.io/eo-tides/
7
- Project-URL: Repository, https://github.com/GeoscienceAustralia/eo-tides
8
- Project-URL: Documentation, https://GeoscienceAustralia.github.io/eo-tides/
9
- Keywords: python
10
- Requires-Python: >=3.9
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: geopandas>=1.0.0
14
- Requires-Dist: numpy
15
- Requires-Dist: odc-geo[xr]
16
- Requires-Dist: pandas
17
- Requires-Dist: pyproj
18
- Requires-Dist: pyTMD==2.1.6
19
- Requires-Dist: scikit-learn
20
- Requires-Dist: scipy
21
- Requires-Dist: shapely
22
- Requires-Dist: tqdm
23
- Provides-Extra: notebooks
24
- Requires-Dist: odc-stac; extra == "notebooks"
25
- Requires-Dist: pystac-client; extra == "notebooks"
26
- Requires-Dist: folium; extra == "notebooks"
27
- Requires-Dist: matplotlib; extra == "notebooks"
28
-
29
- # `eo-tides:` Tide modelling tools for large-scale satellite earth observation analysis
30
-
31
- [![Release](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)](https://pypi.org/project/eo-tides/)
32
- [![Build status](https://img.shields.io/github/actions/workflow/status/GeoscienceAustralia/eo-tides/main.yml?branch=main)](https://github.com/GeoscienceAustralia/eo-tides/actions/workflows/main.yml?query=branch%3Amain)
33
- [![codecov](https://codecov.io/gh/GeoscienceAustralia/eo-tides/branch/main/graph/badge.svg)](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
34
- [![Commit activity](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)
35
- [![License](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
36
-
37
- - **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
38
- - **Documentation** <https://GeoscienceAustralia.github.io/eo-tides/>
39
-
40
- > [!CAUTION]
41
- > This package is a work in progress, and not currently ready for operational use.
42
-
43
- The `eo-tides` package provides tools for analysing coastal and ocean satellite earth observation data using information about ocean tides.
44
-
45
- `eo-tides` combines advanced tide modelling functionality from the [`pyTMD`](https://pytmd.readthedocs.io/en/latest/) package and integrates it with `pandas`, `xarray` and `odc-geo` to provide a powerful set of tools for integrating satellite imagery with tide data.
46
-
47
- Some key functionality includes the ability to:
48
-
49
- - Model tides from multiple global ocean tide models (e.g. FES2022, FES2014, TPXO9, EOT20 and many more) in parallel, and return tide heights in standardised `pandas.DataFrame` format for further analysis
50
- - "Tag" satellite data timeseries with tide data based on the exact moment of each satellite acquisition
51
- - Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be combined with satellite data
52
- - Calculate statistics describing local tide dynamics, as well as biases caused by interactions between tidal processes and satellite orbits
53
- - Validate modelled tides using measured sea levels from coastal tide gauges
54
-
55
- These tools can be applied directly to petabytes of freely available satellite data (e.g. from Digital Earth Australia or Microsoft Planetary Computer) loaded via Open Data Cube's `odc-stac` or `datacube` packages, supporting coastal and ocean earth observation analysis for any time period or location globally.
eo_tides-0.0.17/README.md DELETED
@@ -1,27 +0,0 @@
1
- # `eo-tides:` Tide modelling tools for large-scale satellite earth observation analysis
2
-
3
- [![Release](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)](https://pypi.org/project/eo-tides/)
4
- [![Build status](https://img.shields.io/github/actions/workflow/status/GeoscienceAustralia/eo-tides/main.yml?branch=main)](https://github.com/GeoscienceAustralia/eo-tides/actions/workflows/main.yml?query=branch%3Amain)
5
- [![codecov](https://codecov.io/gh/GeoscienceAustralia/eo-tides/branch/main/graph/badge.svg)](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
6
- [![Commit activity](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)
7
- [![License](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
8
-
9
- - **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
10
- - **Documentation** <https://GeoscienceAustralia.github.io/eo-tides/>
11
-
12
- > [!CAUTION]
13
- > This package is a work in progress, and not currently ready for operational use.
14
-
15
- The `eo-tides` package provides tools for analysing coastal and ocean satellite earth observation data using information about ocean tides.
16
-
17
- `eo-tides` combines advanced tide modelling functionality from the [`pyTMD`](https://pytmd.readthedocs.io/en/latest/) package and integrates it with `pandas`, `xarray` and `odc-geo` to provide a powerful set of tools for integrating satellite imagery with tide data.
18
-
19
- Some key functionality includes the ability to:
20
-
21
- - Model tides from multiple global ocean tide models (e.g. FES2022, FES2014, TPXO9, EOT20 and many more) in parallel, and return tide heights in standardised `pandas.DataFrame` format for further analysis
22
- - "Tag" satellite data timeseries with tide data based on the exact moment of each satellite acquisition
23
- - Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be combined with satellite data
24
- - Calculate statistics describing local tide dynamics, as well as biases caused by interactions between tidal processes and satellite orbits
25
- - Validate modelled tides using measured sea levels from coastal tide gauges
26
-
27
- These tools can be applied directly to petabytes of freely available satellite data (e.g. from Digital Earth Australia or Microsoft Planetary Computer) loaded via Open Data Cube's `odc-stac` or `datacube` packages, supporting coastal and ocean earth observation analysis for any time period or location globally.
@@ -1,55 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: eo-tides
3
- Version: 0.0.17
4
- Summary: Tide modelling tools for large-scale satellite earth observation analysis
5
- Author-email: Robbi Bishop-Taylor <Robbi.BishopTaylor@ga.gov.au>
6
- Project-URL: Homepage, https://GeoscienceAustralia.github.io/eo-tides/
7
- Project-URL: Repository, https://github.com/GeoscienceAustralia/eo-tides
8
- Project-URL: Documentation, https://GeoscienceAustralia.github.io/eo-tides/
9
- Keywords: python
10
- Requires-Python: >=3.9
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: geopandas>=1.0.0
14
- Requires-Dist: numpy
15
- Requires-Dist: odc-geo[xr]
16
- Requires-Dist: pandas
17
- Requires-Dist: pyproj
18
- Requires-Dist: pyTMD==2.1.6
19
- Requires-Dist: scikit-learn
20
- Requires-Dist: scipy
21
- Requires-Dist: shapely
22
- Requires-Dist: tqdm
23
- Provides-Extra: notebooks
24
- Requires-Dist: odc-stac; extra == "notebooks"
25
- Requires-Dist: pystac-client; extra == "notebooks"
26
- Requires-Dist: folium; extra == "notebooks"
27
- Requires-Dist: matplotlib; extra == "notebooks"
28
-
29
- # `eo-tides:` Tide modelling tools for large-scale satellite earth observation analysis
30
-
31
- [![Release](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)](https://pypi.org/project/eo-tides/)
32
- [![Build status](https://img.shields.io/github/actions/workflow/status/GeoscienceAustralia/eo-tides/main.yml?branch=main)](https://github.com/GeoscienceAustralia/eo-tides/actions/workflows/main.yml?query=branch%3Amain)
33
- [![codecov](https://codecov.io/gh/GeoscienceAustralia/eo-tides/branch/main/graph/badge.svg)](https://codecov.io/gh/GeoscienceAustralia/eo-tides)
34
- [![Commit activity](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/commit-activity/m/GeoscienceAustralia/eo-tides)
35
- [![License](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
36
-
37
- - **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
38
- - **Documentation** <https://GeoscienceAustralia.github.io/eo-tides/>
39
-
40
- > [!CAUTION]
41
- > This package is a work in progress, and not currently ready for operational use.
42
-
43
- The `eo-tides` package provides tools for analysing coastal and ocean satellite earth observation data using information about ocean tides.
44
-
45
- `eo-tides` combines advanced tide modelling functionality from the [`pyTMD`](https://pytmd.readthedocs.io/en/latest/) package and integrates it with `pandas`, `xarray` and `odc-geo` to provide a powerful set of tools for integrating satellite imagery with tide data.
46
-
47
- Some key functionality includes the ability to:
48
-
49
- - Model tides from multiple global ocean tide models (e.g. FES2022, FES2014, TPXO9, EOT20 and many more) in parallel, and return tide heights in standardised `pandas.DataFrame` format for further analysis
50
- - "Tag" satellite data timeseries with tide data based on the exact moment of each satellite acquisition
51
- - Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be combined with satellite data
52
- - Calculate statistics describing local tide dynamics, as well as biases caused by interactions between tidal processes and satellite orbits
53
- - Validate modelled tides using measured sea levels from coastal tide gauges
54
-
55
- These tools can be applied directly to petabytes of freely available satellite data (e.g. from Digital Earth Australia or Microsoft Planetary Computer) loaded via Open Data Cube's `odc-stac` or `datacube` packages, supporting coastal and ocean earth observation analysis for any time period or location globally.
File without changes
File without changes
File without changes
File without changes