Skip to content

Commit

Permalink
Fix GOT bug
Browse files Browse the repository at this point in the history
  • Loading branch information
robbibt committed Oct 11, 2024
1 parent 614159b commit eca85e2
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 85 deletions.
173 changes: 96 additions & 77 deletions docs/notebooks/Model_tides.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eo_tides/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def _model_tides(
lon,
lat,
pytmd_model.model_file,
grid=pytmd_model.type,
grid=pytmd_model.file_format,
crop=crop,
bounds=bounds,
method=method,
Expand Down
Binary file modified tests/data/tide_models.tar.gz
Binary file not shown.
14 changes: 7 additions & 7 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ def measured_tides_ds():
def test_list_models():
# Using env var
available_models, supported_models = list_models()
assert available_models == ["EOT20", "HAMTIDE11"]
assert len(supported_models) > 2
assert available_models == ["EOT20", "GOT5.5", "HAMTIDE11"]
assert len(supported_models) > 3

# Not printing outputs
available_models, supported_models = list_models(show_available=False, show_supported=False)
assert available_models == ["EOT20", "HAMTIDE11"]
assert available_models == ["EOT20", "GOT5.5", "HAMTIDE11"]

# Providing a string path
available_models, supported_models = list_models(directory="./tests/data/tide_models")
assert available_models == ["EOT20", "HAMTIDE11"]
assert available_models == ["EOT20", "GOT5.5", "HAMTIDE11"]

# Providing a pathlib
path = pathlib.Path("./tests/data/tide_models")
available_models, supported_models = list_models(directory=path)
assert available_models == ["EOT20", "HAMTIDE11"]
assert available_models == ["EOT20", "GOT5.5", "HAMTIDE11"]


# Run test for multiple input coordinates, CRSs and interpolation methods
Expand Down Expand Up @@ -108,8 +108,8 @@ def test_model_tides(measured_tides_ds, x, y, crs, method):
[
(["EOT20"], "long"),
(["EOT20"], "wide"),
(["EOT20", "HAMTIDE11"], "long"),
(["EOT20", "HAMTIDE11"], "wide"),
(["EOT20", "GOT5.5", "HAMTIDE11"], "long"),
(["EOT20", "GOT5.5", "HAMTIDE11"], "wide"),
],
ids=[
"single_model_long",
Expand Down

0 comments on commit eca85e2

Please sign in to comment.