Created
June 13, 2023 07:13
-
-
Save robbibt/99f89e90c868d8831d78fbc86b0194b9 to your computer and use it in GitHub Desktop.
Loading different tide models with `dea_tools.coastal.model_tides`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import sys | |
| sys.path.insert(1, '../Tools/') | |
| from dea_tools.coastal import model_tides, tidal_tag, pixel_tides, tidal_stats | |
| # Set of times to model tides for | |
| date_list = pd.date_range(start="2022-09-01", end="2022-09-30", freq="1H") | |
| # Run TPXO8 | |
| tpxo8_df = model_tides( | |
| x=[122.21], | |
| y=[-18.20], | |
| time=date_list, | |
| model="TPXO8-atlas", | |
| directory="/gdata1/data/tide_models", | |
| ) | |
| # Run TPXO9 | |
| tpxo9_df = model_tides( | |
| x=[122.21], | |
| y=[-18.20], | |
| time=date_list, | |
| model="TPXO9-atlas-v5", | |
| directory="/gdata1/data/tide_models", | |
| ) | |
| # Run FES2014 | |
| fes2014_df = model_tides( | |
| x=[122.21], | |
| y=[-18.20], | |
| time=date_list, | |
| model="FES2014", | |
| directory="/gdata1/data/tide_models", | |
| ) | |
| tpxo8_df.tide_m.rename("TPXO8").plot(legend=True) | |
| fes2014_df.tide_m.rename("FES2014").plot(legend=True) | |
| tpxo9_df.tide_m.rename("TPXO9").plot(legend=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment