Skip to content

Commit

Permalink
wind speed comparision demo
Browse files Browse the repository at this point in the history
  • Loading branch information
fcseidl committed Jan 5, 2024
1 parent 0ac96d5 commit 08e9d7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion GMW/gmw.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def get_mangrove_locations_from_tiles(gmwdir: str, tilenames: list[str]) -> np.n
return np.vstack([latitude, longitude]).T


# TODO: actually return BoundingBox rather than Polygon
# TODO: actually return BoundingBox rather than Polygon, once debugged
def get_tiles(tilenames: list[str]) -> list[BoundingBox]:
"""Return a list of Bounding Boxes representing the 1x1 degree tiles containing mangroves."""
return [Polygon(get_tile_corners(tn)) for tn in tilenames]
Expand Down
9 changes: 6 additions & 3 deletions windspeedcomparison.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
This script performs a comparison between maximum wind speeds from different storms as reported in IBTrACS and ERA5
datasets.
This script performs a comparison between maximum wind speeds from different storms as
reported in IBTrACS and ERA5 datasets.
"""

import cdsapi
Expand All @@ -15,8 +15,11 @@
from Spherical.functions import addtolon


mps2kts = 1.94384
mps2kts = 1.94384 # unit conversion ratio

# where to save the data from each storm
savepath = "/Users/fcseidl/EarthLab-local/BioExtremes/WindComparisonBasins.csv"

np.random.seed(0)

# IBTrACS data where max wind and basin are recorded
Expand Down

0 comments on commit 08e9d7a

Please # to comment.