eo-tides 0.0.17__py3-none-any.whl → 0.0.18__py3-none-any.whl

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/model.py CHANGED
@@ -207,16 +207,16 @@ def _model_tides(
207
207
  "x": np.repeat(x, time_repeat),
208
208
  "y": np.repeat(y, time_repeat),
209
209
  "tide_model": model,
210
- "tide_m": tide,
210
+ "tide_height": tide,
211
211
  }).set_index(["time", "x", "y"])
212
212
 
213
213
  # Optionally convert outputs to integer units (can save memory)
214
214
  if output_units == "m":
215
- tide_df["tide_m"] = tide_df.tide_m.astype(np.float32)
215
+ tide_df["tide_height"] = tide_df.tide_height.astype(np.float32)
216
216
  elif output_units == "cm":
217
- tide_df["tide_m"] = (tide_df.tide_m * 100).astype(np.int16)
217
+ tide_df["tide_height"] = (tide_df.tide_height * 100).astype(np.int16)
218
218
  elif output_units == "mm":
219
- tide_df["tide_m"] = (tide_df.tide_m * 1000).astype(np.int16)
219
+ tide_df["tide_height"] = (tide_df.tide_height * 1000).astype(np.int16)
220
220
 
221
221
  return tide_df
222
222
 
@@ -261,7 +261,7 @@ def _ensemble_model(
261
261
  to ensure that interpolations are performed in the correct CRS.
262
262
  tide_df : pandas.DataFrame
263
263
  DataFrame containing tide model predictions with columns
264
- `["time", "x", "y", "tide_m", "tide_model"]`.
264
+ `["time", "x", "y", "tide_height", "tide_model"]`.
265
265
  ensemble_models : list
266
266
  A list of models to include in the ensemble modelling process.
267
267
  All values must exist as columns with the prefix "rank_" in
@@ -298,7 +298,7 @@ def _ensemble_model(
298
298
  pandas.DataFrame
299
299
  DataFrame containing the ensemble model predictions, matching
300
300
  the format of the input `tide_df` (e.g. columns `["time", "x",
301
- "y", "tide_m", "tide_model"]`. By default the 'tide_model'
301
+ "y", "tide_height", "tide_model"]`. By default the 'tide_model'
302
302
  column will be labeled "ensemble" for the combined model
303
303
  predictions (but if a custom dictionary of ensemble functions is
304
304
  provided via `ensemble_func`, each ensemble will be named using
@@ -362,7 +362,7 @@ def _ensemble_model(
362
362
  # Add temp columns containing weightings and weighted values
363
363
  .assign(
364
364
  weights=ensemble_f, # use custom func to compute weights
365
- weighted=lambda i: i.tide_m * i.weights,
365
+ weighted=lambda i: i.tide_height * i.weights,
366
366
  )
367
367
  # Groupby is specified in a weird order here as this seems
368
368
  # to be the easiest way to preserve correct index sorting
@@ -374,7 +374,7 @@ def _ensemble_model(
374
374
  # Calculate weighted mean and convert back to dataframe
375
375
  grouped.weighted.sum()
376
376
  .div(grouped.weights.sum())
377
- .to_frame("tide_m")
377
+ .to_frame("tide_height")
378
378
  # Label ensemble model and ensure indexes are in expected order
379
379
  .assign(tide_model=ensemble_n)
380
380
  .reorder_levels(["time", "x", "y"], axis=0)
@@ -405,47 +405,24 @@ def model_tides(
405
405
  ensemble_models=None,
406
406
  **ensemble_kwargs,
407
407
  ):
408
- """Compute tides at multiple points and times using tidal harmonics.
408
+ """
409
+ Compute tide heights from multiple tide models and for
410
+ multiple coordinates and/or timesteps.
409
411
 
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.
412
+ This function is parallelised to improve performance, and
413
+ supports all tidal models supported by `pyTMD`, including:
414
+ - Empirical Ocean Tide model (`EOT20`)
415
+ - Finite Element Solution tide models (`FES2022`, `FES2014`, `FES2012`)
416
+ - TOPEX/POSEIDON global tide models (`TPXO10`, `TPXO9`, `TPXO8`)
417
+ - Global Ocean Tide models (`GOT5.6`, `GOT5.5`, `GOT4.10`, `GOT4.8`, `GOT4.7`)
418
+ - Hamburg direct data Assimilation Methods for Tides models (`HAMTIDE11`)
415
419
 
416
420
  This function requires access to tide model data files.
417
421
  These should be placed in a folder with subfolders matching
418
- the formats specified by `pyTMD`:
422
+ the structure required by `pyTMD`. For more details:
423
+ <https://geoscienceaustralia.github.io/eo-tides/setup/>
419
424
  <https://pytmd.readthedocs.io/en/latest/getting_started/Getting-Started.html#directories>
420
425
 
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
426
  This function is a modification of the `pyTMD` package's
450
427
  `compute_tide_corrections` function. For more info:
451
428
  <https://pytmd.readthedocs.io/en/stable/user_guide/compute_tide_corrections.html>
@@ -514,9 +491,10 @@ def model_tides(
514
491
  want to model tides for a specific list of timesteps across
515
492
  multiple spatial points (e.g. for the same set of satellite
516
493
  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
494
+ - "one-to-one": Model tides using a unique timestep for each
495
+ set of x and y coordinates. In this mode, the number of x and
519
496
  y points must equal the number of timesteps provided in "time".
497
+
520
498
  parallel : boolean, optional
521
499
  Whether to parallelise tide modelling using `concurrent.futures`.
522
500
  If multiple tide models are requested, these will be run in
@@ -538,7 +516,7 @@ def model_tides(
538
516
  for millimetres.
539
517
  output_format : str, optional
540
518
  Whether to return the output dataframe in long format (with
541
- results stacked vertically along "tide_model" and "tide_m"
519
+ results stacked vertically along "tide_model" and "tide_height"
542
520
  columns), or wide format (with a column for each tide model).
543
521
  Defaults to "long".
544
522
  ensemble_models : list, optional
@@ -734,7 +712,7 @@ def model_tides(
734
712
  if output_format == "wide":
735
713
  # Pivot into wide format with each time model as a column
736
714
  print("Converting to a wide format dataframe")
737
- tide_df = tide_df.pivot(columns="tide_model", values="tide_m")
715
+ tide_df = tide_df.pivot(columns="tide_model", values="tide_height")
738
716
 
739
717
  # If in 'one-to-one' mode, reindex using our input time/x/y
740
718
  # values to ensure the output is sorted the same as our inputs
@@ -812,7 +790,7 @@ def _pixel_tides_resample(
812
790
  how=ds.odc.geobox,
813
791
  chunks=dask_chunks,
814
792
  resampling=resample_method,
815
- ).rename("tide_m")
793
+ ).rename("tide_height")
816
794
 
817
795
  # Optionally process and load into memory with Dask
818
796
  if dask_compute:
@@ -1064,7 +1042,7 @@ def pixel_tides(
1064
1042
  .set_index("tide_model", append=True)
1065
1043
  # Convert to xarray and select our tide modelling xr.DataArray
1066
1044
  .to_xarray()
1067
- .tide_m
1045
+ .tide_height
1068
1046
  # Re-index and transpose into our input coordinates and dim order
1069
1047
  .reindex_like(rescaled_ds)
1070
1048
  .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.18
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,10 @@
1
+ eo_tides/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ eo_tides/model.py,sha256=5teDNCgtqRyp0vJHhXMdPtZYdaKzXcAo-a9Cum46Jgg,43305
3
+ eo_tides/stats.py,sha256=Lzo46pWUhox3ZUnMLtyLzqZ9FrCNG6nJ6iS5IpqEsy8,158
4
+ eo_tides/utils.py,sha256=l9VXJawQzaRBYaFMsP8VBeaN5VA3rFDdzcvF7Rk04Vc,5620
5
+ eo_tides/validation.py,sha256=kpYGHOeK-YP11c3tHt9l5_8IvOHF1SAJP79PXA7i-Vs,11434
6
+ eo_tides-0.0.18.dist-info/LICENSE,sha256=NYULqbFuDRV6CysPbkR2WZk863YwwHeftBtnsb4cWf8,1077
7
+ eo_tides-0.0.18.dist-info/METADATA,sha256=WLxfpg2EhN7Ly9GbNhLLFJVa2LiuO3NHckIcmjY2pqE,5335
8
+ eo_tides-0.0.18.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
+ eo_tides-0.0.18.dist-info/top_level.txt,sha256=lXZDUUM1DlLdKWHRn8zdmtW8Rx-eQOIWVvt0b8VGiyQ,9
10
+ eo_tides-0.0.18.dist-info/RECORD,,
@@ -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.
@@ -1,10 +0,0 @@
1
- eo_tides/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- eo_tides/model.py,sha256=Gx8oUAyo5kzyl7SZhqzS2QlnblXkubr_Wn2NijYzUlc,43811
3
- eo_tides/stats.py,sha256=Lzo46pWUhox3ZUnMLtyLzqZ9FrCNG6nJ6iS5IpqEsy8,158
4
- eo_tides/utils.py,sha256=l9VXJawQzaRBYaFMsP8VBeaN5VA3rFDdzcvF7Rk04Vc,5620
5
- eo_tides/validation.py,sha256=kpYGHOeK-YP11c3tHt9l5_8IvOHF1SAJP79PXA7i-Vs,11434
6
- eo_tides-0.0.17.dist-info/LICENSE,sha256=NYULqbFuDRV6CysPbkR2WZk863YwwHeftBtnsb4cWf8,1077
7
- eo_tides-0.0.17.dist-info/METADATA,sha256=G8PxvP4subHP1pg6uZkAYGfmItfsjWepEWs32q9ra9w,3593
8
- eo_tides-0.0.17.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
- eo_tides-0.0.17.dist-info/top_level.txt,sha256=lXZDUUM1DlLdKWHRn8zdmtW8Rx-eQOIWVvt0b8VGiyQ,9
10
- eo_tides-0.0.17.dist-info/RECORD,,