eo-tides 0.6.2.dev8__py3-none-any.whl → 0.6.3__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 +13 -2
- {eo_tides-0.6.2.dev8.dist-info → eo_tides-0.6.3.dist-info}/METADATA +3 -2
- eo_tides-0.6.3.dist-info/RECORD +10 -0
- eo_tides-0.6.2.dev8.dist-info/RECORD +0 -10
- {eo_tides-0.6.2.dev8.dist-info → eo_tides-0.6.3.dist-info}/WHEEL +0 -0
- {eo_tides-0.6.2.dev8.dist-info → eo_tides-0.6.3.dist-info}/licenses/LICENSE +0 -0
eo_tides/model.py
CHANGED
@@ -124,7 +124,11 @@ def _model_tides(
|
|
124
124
|
if crop == "auto":
|
125
125
|
warnings.warn(
|
126
126
|
"On-the-fly cropping is not compatible with the provided "
|
127
|
-
"
|
127
|
+
"model files; running with `crop=False`. This will not "
|
128
|
+
"affect your results but may lead to a minor slowdown. "
|
129
|
+
"This can occur when analysing clipped model files restricted "
|
130
|
+
"to the western hemisphere. To suppress this warning, manually "
|
131
|
+
"set `crop=False`."
|
128
132
|
)
|
129
133
|
|
130
134
|
# Read tidal constants and interpolate to grid points
|
@@ -326,6 +330,9 @@ def ensemble_tides(
|
|
326
330
|
x = tide_df.index.get_level_values(level="x")
|
327
331
|
y = tide_df.index.get_level_values(level="y")
|
328
332
|
|
333
|
+
# Identify input datatype
|
334
|
+
input_dtype = tide_df.tide_height.dtype
|
335
|
+
|
329
336
|
# Load model ranks points and reproject to same CRS as x and y
|
330
337
|
model_ranking_cols = [f"rank_{m}" for m in ensemble_models]
|
331
338
|
try:
|
@@ -369,6 +376,7 @@ def ensemble_tides(
|
|
369
376
|
.set_index(["tide_model", "x", "y"])
|
370
377
|
.groupby(["x", "y"])
|
371
378
|
.rank()
|
379
|
+
.astype("float32") # use smaller dtype for rankings to save memory
|
372
380
|
)
|
373
381
|
|
374
382
|
# If no custom ensemble funcs are provided, use a default ensemble
|
@@ -400,9 +408,12 @@ def ensemble_tides(
|
|
400
408
|
|
401
409
|
# Use weightings to combine multiple models into single ensemble
|
402
410
|
ensemble_df = (
|
403
|
-
# Calculate weighted mean
|
411
|
+
# Calculate weighted mean
|
404
412
|
grouped.weighted.sum()
|
405
413
|
.div(grouped.weights.sum())
|
414
|
+
# Make sure datatype is the same as the input
|
415
|
+
.astype(input_dtype)
|
416
|
+
# Convert to dataframe
|
406
417
|
.to_frame("tide_height")
|
407
418
|
# Label ensemble model and ensure indexes are in expected order
|
408
419
|
.assign(tide_model=ensemble_n)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: eo-tides
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.3
|
4
4
|
Summary: Tide modelling tools for large-scale satellite earth observation analysis
|
5
5
|
Project-URL: Homepage, https://GeoscienceAustralia.github.io/eo-tides/
|
6
6
|
Project-URL: Repository, https://github.com/GeoscienceAustralia/eo-tides
|
@@ -23,6 +23,7 @@ Classifier: Topic :: Scientific/Engineering :: Oceanography
|
|
23
23
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
24
24
|
Requires-Python: <4.0,>=3.10
|
25
25
|
Requires-Dist: colorama>=0.4.3
|
26
|
+
Requires-Dist: dask[complete]>=2023.1.0
|
26
27
|
Requires-Dist: geopandas>=0.10.0
|
27
28
|
Requires-Dist: matplotlib>=3.8.0
|
28
29
|
Requires-Dist: numpy>=1.26.0
|
@@ -31,7 +32,7 @@ Requires-Dist: pandas>=2.2.0
|
|
31
32
|
Requires-Dist: psutil>=5.8.0
|
32
33
|
Requires-Dist: pyogrio>=0.10.0
|
33
34
|
Requires-Dist: pyproj>=3.7.0
|
34
|
-
Requires-Dist: pytmd
|
35
|
+
Requires-Dist: pytmd==2.2.2
|
35
36
|
Requires-Dist: scikit-learn>=1.4.0
|
36
37
|
Requires-Dist: scipy>=1.14.1
|
37
38
|
Requires-Dist: shapely>=2.0.6
|
@@ -0,0 +1,10 @@
|
|
1
|
+
eo_tides/__init__.py,sha256=pGvVlxMKiYjm_273G-oYcOgVuPra7uEdNZv0oN1i69c,1693
|
2
|
+
eo_tides/eo.py,sha256=TuFt9SSiO9Z2o8Kr1g-wFPzofp0HTcgkfhT83zu03kc,23983
|
3
|
+
eo_tides/model.py,sha256=jRx6HNgTbK0inNqOkVivr52jPMJPWZ85gJeLjY2Vfk8,37697
|
4
|
+
eo_tides/stats.py,sha256=ELQpqIH86442IYgjrGrIK3mi0-pu2ZijFw53arA2FYg,23072
|
5
|
+
eo_tides/utils.py,sha256=T19OuPLHzaUKcovCVGANvmOiRu-L8VuDXSTzmNlA6Bo,26647
|
6
|
+
eo_tides/validation.py,sha256=KP8WLT5z7KLFjQ9oDla7VJOyLQAK4SVbcz2ySAbsbwI,11882
|
7
|
+
eo_tides-0.6.3.dist-info/METADATA,sha256=rf23tf7WWIZldMBDQl3PEA4edIE0Vs24UW-OoCRI2tg,8224
|
8
|
+
eo_tides-0.6.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
+
eo_tides-0.6.3.dist-info/licenses/LICENSE,sha256=owxWsXViCL2J6Ks3XYhot7t4Y93nstmXAT95Zf030Cc,11350
|
10
|
+
eo_tides-0.6.3.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
eo_tides/__init__.py,sha256=pGvVlxMKiYjm_273G-oYcOgVuPra7uEdNZv0oN1i69c,1693
|
2
|
-
eo_tides/eo.py,sha256=TuFt9SSiO9Z2o8Kr1g-wFPzofp0HTcgkfhT83zu03kc,23983
|
3
|
-
eo_tides/model.py,sha256=EqulqgiqwzOOtBSqgPHDIX1tW3w6e-lkjF6nsjWFG1U,37173
|
4
|
-
eo_tides/stats.py,sha256=ELQpqIH86442IYgjrGrIK3mi0-pu2ZijFw53arA2FYg,23072
|
5
|
-
eo_tides/utils.py,sha256=T19OuPLHzaUKcovCVGANvmOiRu-L8VuDXSTzmNlA6Bo,26647
|
6
|
-
eo_tides/validation.py,sha256=KP8WLT5z7KLFjQ9oDla7VJOyLQAK4SVbcz2ySAbsbwI,11882
|
7
|
-
eo_tides-0.6.2.dev8.dist-info/METADATA,sha256=sXsdkKSEsded3MHj5LHwhwx4sKGCGnFvjuFuIWqPock,8189
|
8
|
-
eo_tides-0.6.2.dev8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
-
eo_tides-0.6.2.dev8.dist-info/licenses/LICENSE,sha256=owxWsXViCL2J6Ks3XYhot7t4Y93nstmXAT95Zf030Cc,11350
|
10
|
-
eo_tides-0.6.2.dev8.dist-info/RECORD,,
|
File without changes
|
File without changes
|