eo-tides 0.0.20__py3-none-any.whl → 0.0.21__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/stats.py CHANGED
@@ -1,15 +1,266 @@
1
- def tide_stats(a):
1
+ # Used to postpone evaluation of type annotations
2
+ from __future__ import annotations
3
+
4
+ import os
5
+ from typing import TYPE_CHECKING
6
+
7
+ import matplotlib.pyplot as plt
8
+ import numpy as np
9
+ import odc.geo.xr
10
+ import pandas as pd
11
+ from scipy import stats
12
+
13
+ # Only import if running type checking
14
+ if TYPE_CHECKING:
15
+ import xarray as xr
16
+
17
+ from .eo import tag_tides
18
+ from .model import model_tides
19
+
20
+
21
+ def tide_stats(
22
+ ds: xr.Dataset,
23
+ model: str = "EOT20",
24
+ directory: str | os.PathLike | None = None,
25
+ tidepost_lat: float | None = None,
26
+ tidepost_lon: float | None = None,
27
+ plain_english: bool = True,
28
+ plot: bool = True,
29
+ modelled_freq: str = "2h",
30
+ linear_reg: bool = False,
31
+ round_stats: int = 3,
32
+ **model_tides_kwargs,
33
+ ) -> pd.Series:
2
34
  """
3
- Test function.
35
+ Takes a multi-dimensional dataset and generate statistics
36
+ about the data's astronomical and satellite-observed tide
37
+ conditions.
38
+
39
+ By comparing the subset of tides observed by satellites
40
+ against the full astronomical tidal range, we can evaluate
41
+ whether the tides observed by satellites are biased
42
+ (e.g. fail to observe either the highest or lowest tides).
43
+
44
+ For more information about the tidal statistics computed by this
45
+ function, refer to Figure 8 in Bishop-Taylor et al. 2018:
46
+ <https://www.sciencedirect.com/science/article/pii/S0272771418308783#fig8>
4
47
 
5
48
  Parameters
6
49
  ----------
7
- a : int
8
- Test
50
+ ds : xarray.Dataset
51
+ A multi-dimensional dataset (e.g. "x", "y", "time") to
52
+ use to calculate tide statistics. This dataset must contain
53
+ a "time" dimension.
54
+ model : string, optional
55
+ The tide model to use to model tides. Defaults to "EOT20";
56
+ for a full list of available/supported models, run
57
+ `eo_tides.model.list_models`.
58
+ directory : string, optional
59
+ The directory containing tide model data files. If no path is
60
+ provided, this will default to the environment variable
61
+ `EO_TIDES_TIDE_MODELS` if set, or raise an error if not.
62
+ Tide modelling files should be stored in sub-folders for each
63
+ model that match the structure required by `pyTMD`
64
+ (<https://geoscienceaustralia.github.io/eo-tides/setup/>).
65
+ tidepost_lat, tidepost_lon : float or int, optional
66
+ Optional coordinates used to model tides. The default is None,
67
+ which uses the centroid of the dataset as the tide modelling
68
+ location.
69
+ plain_english : bool, optional
70
+ An optional boolean indicating whether to print a plain english
71
+ version of the tidal statistics to the screen. Defaults to True.
72
+ plot : bool, optional
73
+ An optional boolean indicating whether to plot how satellite-
74
+ observed tide heights compare against the full tidal range.
75
+ Defaults to True.
76
+ modelled_freq : str, optional
77
+ An optional string giving the frequency at which to model tides
78
+ when computing the full modelled tidal range. Defaults to '2h',
79
+ which computes a tide height for every two hours across the
80
+ temporal extent of `ds`.
81
+ linear_reg: bool, optional
82
+ Whether to return linear regression statistics that assess
83
+ whether satellite-observed tides show any decreasing or
84
+ increasing trends over time. This may indicate whether your
85
+ satellite data may produce misleading trends based on uneven
86
+ sampling of the local tide regime.
87
+ round_stats : int, optional
88
+ The number of decimal places used to round the output statistics.
89
+ Defaults to 3.
90
+ **model_tides_kwargs :
91
+ Optional parameters passed to the `eo_tides.model.model_tides`
92
+ function. Important parameters include `cutoff` (used to
93
+ extrapolate modelled tides away from the coast; defaults to
94
+ `np.inf`), `crop` (whether to crop tide model constituent files
95
+ on-the-fly to improve performance) etc.
9
96
 
10
97
  Returns
11
98
  -------
12
- Test
99
+ A `pandas.Series` containing the following statistics:
100
+
101
+ - `tidepost_lat`: latitude used for modelling tide heights
102
+ - `tidepost_lon`: longitude used for modelling tide heights
103
+ - `observed_min_m`: minimum tide height observed by the satellite
104
+ - `all_min_m`: minimum tide height from all available tides
105
+ - `observed_max_m`: maximum tide height observed by the satellite
106
+ - `all_max_m`: maximum tide height from all available tides
107
+ - `observed_range_m`: tidal range observed by the satellite
108
+ - `all_range_m`: full astronomical tidal range based on all available tides
109
+ - `spread_m`: proportion of the full astronomical tidal range observed by the satellite (see Bishop-Taylor et al. 2018)
110
+ - `low_tide_offset`: proportion of the lowest tides never observed by the satellite (see Bishop-Taylor et al. 2018)
111
+ - `high_tide_offset`: proportion of the highest tides never observed by the satellite (see Bishop-Taylor et al. 2018)
112
+
113
+ If `linear_reg = True`, the output will also contain:
114
+
115
+ - `observed_slope`: slope of any relationship between observed tide heights and time
116
+ - `observed_pval`: significance/p-value of any relationship between observed tide heights and time
13
117
 
14
118
  """
15
- return a
119
+ # Verify that only one tide model is provided
120
+ if isinstance(model, list):
121
+ raise Exception("Only single tide models are supported by `tide_stats`.")
122
+
123
+ # If custom tide modelling locations are not provided, use the
124
+ # dataset centroid
125
+ if not tidepost_lat or not tidepost_lon:
126
+ tidepost_lon, tidepost_lat = ds.odc.geobox.geographic_extent.centroid.coords[0]
127
+
128
+ # Model tides for each observation in the supplied xarray object
129
+ ds_tides = tag_tides(
130
+ ds,
131
+ model=model,
132
+ directory=directory,
133
+ tidepost_lat=tidepost_lat, # type: ignore
134
+ tidepost_lon=tidepost_lon, # type: ignore
135
+ return_tideposts=True,
136
+ **model_tides_kwargs,
137
+ )
138
+
139
+ # Drop spatial ref for nicer plotting
140
+ ds_tides = ds_tides.drop_vars("spatial_ref")
141
+
142
+ # Generate range of times covering entire period of satellite record
143
+ all_timerange = pd.date_range(
144
+ start=ds_tides.time.min().item(),
145
+ end=ds_tides.time.max().item(),
146
+ freq=modelled_freq,
147
+ )
148
+
149
+ # Model tides for each timestep
150
+ all_tides_df = model_tides(
151
+ x=tidepost_lon, # type: ignore
152
+ y=tidepost_lat, # type: ignore
153
+ time=all_timerange,
154
+ model=model,
155
+ directory=directory,
156
+ crs="EPSG:4326",
157
+ **model_tides_kwargs,
158
+ )
159
+
160
+ # Get coarse statistics on all and observed tidal ranges
161
+ obs_mean = ds_tides.tide_height.mean().item()
162
+ all_mean = all_tides_df.tide_height.mean()
163
+ obs_min, obs_max = ds_tides.tide_height.quantile([0.0, 1.0]).values
164
+ all_min, all_max = all_tides_df.tide_height.quantile([0.0, 1.0]).values
165
+
166
+ # Calculate tidal range
167
+ obs_range = obs_max - obs_min
168
+ all_range = all_max - all_min
169
+
170
+ # Calculate Bishop-Taylor et al. 2018 tidal metrics
171
+ spread = obs_range / all_range
172
+ low_tide_offset = abs(all_min - obs_min) / all_range
173
+ high_tide_offset = abs(all_max - obs_max) / all_range
174
+
175
+ # Extract x (time in decimal years) and y (distance) values
176
+ all_times = all_tides_df.index.get_level_values("time")
177
+ all_x = all_times.year + ((all_times.dayofyear - 1) / 365) + ((all_times.hour - 1) / 24)
178
+ time_period = all_x.max() - all_x.min()
179
+
180
+ # Extract x (time in decimal years) and y (distance) values
181
+ obs_x = ds_tides.time.dt.year + ((ds_tides.time.dt.dayofyear - 1) / 365) + ((ds_tides.time.dt.hour - 1) / 24)
182
+ obs_y = ds_tides.tide_height.values.astype(np.float32)
183
+
184
+ # Compute linear regression
185
+ obs_linreg = stats.linregress(x=obs_x, y=obs_y)
186
+
187
+ if plain_english:
188
+ print(
189
+ f"\n{spread:.0%} of the {all_range:.2f} m modelled astronomical "
190
+ f"tidal range is observed at this location.\nThe lowest "
191
+ f"{low_tide_offset:.0%} and highest {high_tide_offset:.0%} "
192
+ f"of astronomical tides are never observed.\n"
193
+ )
194
+
195
+ if linear_reg:
196
+ if obs_linreg.pvalue > 0.05:
197
+ print(f"Observed tides show no significant trends " f"over the ~{time_period:.0f} year period.")
198
+ else:
199
+ obs_slope_desc = "decrease" if obs_linreg.slope < 0 else "increase"
200
+ print(
201
+ f"Observed tides {obs_slope_desc} significantly "
202
+ f"(p={obs_linreg.pvalue:.3f}) over time by "
203
+ f"{obs_linreg.slope:.03f} m per year (i.e. a "
204
+ f"~{time_period * obs_linreg.slope:.2f} m "
205
+ f"{obs_slope_desc} over the ~{time_period:.0f} year period)."
206
+ )
207
+
208
+ if plot:
209
+ # Create plot and add all time and observed tide data
210
+ fig, ax = plt.subplots(figsize=(10, 5))
211
+ all_tides_df.reset_index(["x", "y"]).tide_height.plot(ax=ax, alpha=0.4)
212
+ ds_tides.tide_height.plot.line(ax=ax, marker="o", linewidth=0.0, color="black", markersize=2)
213
+
214
+ # Add horizontal lines for spread/offsets
215
+ ax.axhline(obs_min, color="black", linestyle=":", linewidth=1)
216
+ ax.axhline(obs_max, color="black", linestyle=":", linewidth=1)
217
+ ax.axhline(all_min, color="black", linestyle=":", linewidth=1)
218
+ ax.axhline(all_max, color="black", linestyle=":", linewidth=1)
219
+
220
+ # Add text annotations for spread/offsets
221
+ ax.annotate(
222
+ f" High tide\n offset ({high_tide_offset:.0%})",
223
+ xy=(all_timerange.max(), np.mean([all_max, obs_max])),
224
+ va="center",
225
+ )
226
+ ax.annotate(
227
+ f" Spread\n ({spread:.0%})",
228
+ xy=(all_timerange.max(), np.mean([obs_min, obs_max])),
229
+ va="center",
230
+ )
231
+ ax.annotate(
232
+ f" Low tide\n offset ({low_tide_offset:.0%})",
233
+ xy=(all_timerange.max(), np.mean([all_min, obs_min])),
234
+ )
235
+
236
+ # Remove top right axes and add labels
237
+ ax.spines["right"].set_visible(False)
238
+ ax.spines["top"].set_visible(False)
239
+ ax.set_ylabel("Tide height (m)")
240
+ ax.set_xlabel("")
241
+ ax.margins(x=0.015)
242
+
243
+ # Export pandas.Series containing tidal stats
244
+ output_stats = {
245
+ "tidepost_lat": tidepost_lat,
246
+ "tidepost_lon": tidepost_lon,
247
+ "observed_mean_m": obs_mean,
248
+ "all_mean_m": all_mean,
249
+ "observed_min_m": obs_min,
250
+ "all_min_m": all_min,
251
+ "observed_max_m": obs_max,
252
+ "all_max_m": all_max,
253
+ "observed_range_m": obs_range,
254
+ "all_range_m": all_range,
255
+ "spread": spread,
256
+ "low_tide_offset": low_tide_offset,
257
+ "high_tide_offset": high_tide_offset,
258
+ }
259
+
260
+ if linear_reg:
261
+ output_stats.update({
262
+ "observed_slope": obs_linreg.slope,
263
+ "observed_pval": obs_linreg.pvalue,
264
+ })
265
+
266
+ return pd.Series(output_stats).round(round_stats)
eo_tides/validation.py CHANGED
@@ -75,7 +75,7 @@ def eval_metrics(x, y, round=3, all_regress=False):
75
75
  return pd.Series(stats_dict).round(round)
76
76
 
77
77
 
78
- def round_date_strings(date, round_type="end"):
78
+ def _round_date_strings(date, round_type="end"):
79
79
  """
80
80
  Round a date string up or down to the start or end of a given time
81
81
  period.
@@ -286,8 +286,8 @@ def load_gauge_gesla(
286
286
  if time is None:
287
287
  time = ["1800", str(datetime.datetime.now().year)]
288
288
  time = [time] if not isinstance(time, (list, tuple)) else time
289
- start_time = round_date_strings(time[0], round_type="start")
290
- end_time = round_date_strings(time[-1], round_type="end")
289
+ start_time = _round_date_strings(time[0], round_type="start")
290
+ end_time = _round_date_strings(time[-1], round_type="end")
291
291
 
292
292
  # Identify paths to load and nodata values for each site
293
293
  metadata_df["file_name"] = data_path + metadata_df["file_name"]
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2024 Geoscience Australia
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -1,18 +1,31 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eo-tides
3
- Version: 0.0.20
3
+ Version: 0.0.21
4
4
  Summary: Tide modelling tools for large-scale satellite earth observation analysis
5
5
  Author-email: Robbi Bishop-Taylor <Robbi.BishopTaylor@ga.gov.au>
6
6
  Project-URL: Homepage, https://GeoscienceAustralia.github.io/eo-tides/
7
7
  Project-URL: Repository, https://github.com/GeoscienceAustralia/eo-tides
8
8
  Project-URL: Documentation, https://GeoscienceAustralia.github.io/eo-tides/
9
- Keywords: python
10
- Requires-Python: >=3.9
9
+ Keywords: earth observation,tide modelling,tide modeling,satellite data,coastal analysis,oceanography,remote sensing
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Topic :: Scientific/Engineering
13
+ Classifier: Topic :: Scientific/Engineering :: GIS
14
+ Classifier: Topic :: Scientific/Engineering :: Oceanography
15
+ Classifier: Topic :: Scientific/Engineering :: Visualization
16
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
17
+ Classifier: License :: OSI Approved :: Apache Software License
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Requires-Python: <4.0,>=3.9
11
23
  Description-Content-Type: text/markdown
12
24
  License-File: LICENSE
25
+ Requires-Dist: colorama
13
26
  Requires-Dist: geopandas >=1.0.0
14
27
  Requires-Dist: numpy
15
- Requires-Dist: odc-geo[xr]
28
+ Requires-Dist: odc-geo
16
29
  Requires-Dist: pandas
17
30
  Requires-Dist: pyproj
18
31
  Requires-Dist: pyTMD ==2.1.6
@@ -20,18 +33,21 @@ Requires-Dist: scikit-learn
20
33
  Requires-Dist: scipy
21
34
  Requires-Dist: shapely
22
35
  Requires-Dist: tqdm
36
+ Requires-Dist: xarray
23
37
  Provides-Extra: notebooks
24
- Requires-Dist: odc-stac ; extra == 'notebooks'
38
+ Requires-Dist: odc-stac >=0.3.10 ; extra == 'notebooks'
25
39
  Requires-Dist: pystac-client ; extra == 'notebooks'
26
40
  Requires-Dist: folium ; extra == 'notebooks'
27
41
  Requires-Dist: matplotlib ; extra == 'notebooks'
28
42
 
29
- # `eo-tides:` Tide modelling tools for large-scale satellite earth observation analysis
43
+ # `eo-tides`: Tide modelling tools for large-scale satellite earth observation analysis
44
+
45
+ <img align="right" width="200" src="docs/assets/eo-tides-logo.gif" alt="eo-tides logo" style="margin-right: 40px;">
30
46
 
31
47
  [![Release](https://img.shields.io/github/v/release/GeoscienceAustralia/eo-tides)](https://pypi.org/project/eo-tides/)
32
48
  [![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)
49
+ ![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FGeoscienceAustralia%2Feo-tides%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)
33
50
  [![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
51
  [![License](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)](https://img.shields.io/github/license/GeoscienceAustralia/eo-tides)
36
52
 
37
53
  - **Github repository**: <https://github.com/GeoscienceAustralia/eo-tides/>
@@ -40,18 +56,20 @@ Requires-Dist: matplotlib ; extra == 'notebooks'
40
56
  > [!CAUTION]
41
57
  > This package is a work in progress, and not currently ready for operational use.
42
58
 
43
- The `eo-tides` package provides powerful, parallelized tools for seamlessly integrating satellite Earth observation data with tide modelling.
59
+ `eo-tides` provides powerful parallelized tools for integrating satellite Earth observation data with tide modelling. 🛠️🌊🛰️
44
60
 
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.
61
+ `eo-tides` combines advanced tide modelling functionality from the [`pyTMD`](https://pytmd.readthedocs.io/en/latest/) package 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
62
 
47
63
  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
64
 
65
+ ![eo-tides abstract showing satellite data, tide data array and tide animation](docs/assets/eo-tides-abstract.gif)
66
+
49
67
  ## Highlights
50
68
 
51
69
  - 🌊 Model tides from multiple global ocean tide models in parallel, and return tide heights in standardised `pandas.DataFrame` format for further analysis
52
70
  - 🛰️ "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
71
+ - 🌐 Model tides for every individual satellite pixel, producing three-dimensional "tide height" `xarray`-format datacubes that can be integrated with satellite data
72
+ <!-- - 🎯 Combine multiple tide models into a single locally-optimised "ensemble" model informed by satellite altimetry and satellite-observed patterns of tidal inundation -->
55
73
  - 📈 Calculate statistics describing local tide dynamics, as well as biases caused by interactions between tidal processes and satellite orbits
56
74
  - 🛠️ Validate modelled tides using measured sea levels from coastal tide gauges (e.g. [GESLA Global Extreme Sea Level Analysis](https://gesla.org/))
57
75
 
@@ -59,18 +77,18 @@ These tools can be applied to petabytes of freely available satellite data (e.g.
59
77
 
60
78
  `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
79
 
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`)
80
+ - [Empirical Ocean Tide model](https://doi.org/10.5194/essd-13-3869-2021) (EOT20)
81
+ - [Finite Element Solution tide models](https://doi.org/10.5194/os-2020-96) (FES2022, FES2014, FES2012)
82
+ - [TOPEX/POSEIDON global tide models](https://www.tpxo.net/global) (TPXO10, TPXO9, TPXO8)
83
+ - [Global Ocean Tide models](https://doi.org/10.1002/2016RG000546) (GOT5.6, GOT5.5, GOT4.10, GOT4.8, GOT4.7)
84
+ - [Hamburg direct data Assimilation Methods for Tides models](https://doi.org/10.1002/2013JC009766) (HAMTIDE11)
67
85
 
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/).
86
+ For instructions on how to set up these models for use in `eo-tides`, refer to [Setting up tide models](setup.md).
69
87
 
70
88
  ## Citing `eo-tides`
71
89
 
72
90
  To cite `eo-tides` in your work, please use the following citation:
73
91
 
74
92
  ```
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
93
+ Bishop-Taylor, R., Sagar, S., Phillips, C., & Newey, V. (2024). eo-tides: Tide modelling tools for large-scale satellite earth observation analysis. https://github.com/GeoscienceAustralia/eo-tides
76
94
  ```
@@ -0,0 +1,11 @@
1
+ eo_tides/__init__.py,sha256=TWmQNplePCcNAlua5WI_H7SShkWNk-Gd3X70EDEknSo,1557
2
+ eo_tides/eo.py,sha256=K2Ubxvp5yYxVwAOaUZDHCIV_AppRuqMiQRtArhe7YOM,22480
3
+ eo_tides/model.py,sha256=WC-3gBH-ToREl1RS6CxYJLfXlpy03vtwZKd_464QYcU,32958
4
+ eo_tides/stats.py,sha256=gpkewfgM7ixOr_XXepkMHpezmvjlt5-Qo2xbUmzyKhs,10898
5
+ eo_tides/utils.py,sha256=l9VXJawQzaRBYaFMsP8VBeaN5VA3rFDdzcvF7Rk04Vc,5620
6
+ eo_tides/validation.py,sha256=yFuIjAxS9qf097_n4DHWG4AOa6n4nt1HGibUkOkJW6o,11437
7
+ eo_tides-0.0.21.dist-info/LICENSE,sha256=owxWsXViCL2J6Ks3XYhot7t4Y93nstmXAT95Zf030Cc,11350
8
+ eo_tides-0.0.21.dist-info/METADATA,sha256=t60AoRbSg9K6GEXlk3TCd9nrEQbaFrHp7rgAmwAda_g,6298
9
+ eo_tides-0.0.21.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
10
+ eo_tides-0.0.21.dist-info/top_level.txt,sha256=lXZDUUM1DlLdKWHRn8zdmtW8Rx-eQOIWVvt0b8VGiyQ,9
11
+ eo_tides-0.0.21.dist-info/RECORD,,
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Geoscience Australia
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,10 +0,0 @@
1
- eo_tides/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- eo_tides/model.py,sha256=wo2bsWEefpTFd3KrkzZelIU4FV_noCNJjMQs2arwypk,46021
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.20.dist-info/LICENSE,sha256=NYULqbFuDRV6CysPbkR2WZk863YwwHeftBtnsb4cWf8,1077
7
- eo_tides-0.0.20.dist-info/METADATA,sha256=_Ns8em48OsUfgl97Rw4hSPXPqfJV9FelTtq25qcb4ag,5335
8
- eo_tides-0.0.20.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
- eo_tides-0.0.20.dist-info/top_level.txt,sha256=lXZDUUM1DlLdKWHRn8zdmtW8Rx-eQOIWVvt0b8VGiyQ,9
10
- eo_tides-0.0.20.dist-info/RECORD,,