SHIPS intensity forecast — Hurricane Ian (2022)¶
Fetch SHIPS statistical intensity-forecast guidance (product='ships') for one forecast cycle of Hurricane Ian and plot the forecast intensity curve.
ships is storm + forecast-cycle keyed (variables=[storm id], ships_time=<cycle>) and is tabular: download() returns a pandas DataFrame (one row per forecast hour), not a FeatureCollection.
Needs
pip install earthlens[tropycal]; SHIPS guidance is archived for recent storms.
In [ ]:
Copied!
from pathlib import Path
from earthlens import EarthLens
OUT_DIR = Path('tropycal_output')
OUT_DIR.mkdir(exist_ok=True)
ships = None
try:
ships = EarthLens(
data_source='tropycal',
product='ships',
variables=['AL092022'],
basin='north_atlantic',
source='hurdat',
ships_time='2022-09-27 00:00',
start='2022-09-20',
end='2022-10-01',
aoi=[-180, -90, 180, 90],
path=str(OUT_DIR),
).download(progress_bar=False)
print('SHIPS table shape:', None if ships is None else ships.shape)
except Exception as exc:
print(f'skipped live query: {type(exc).__name__}: {exc}')
from pathlib import Path
from earthlens import EarthLens
OUT_DIR = Path('tropycal_output')
OUT_DIR.mkdir(exist_ok=True)
ships = None
try:
ships = EarthLens(
data_source='tropycal',
product='ships',
variables=['AL092022'],
basin='north_atlantic',
source='hurdat',
ships_time='2022-09-27 00:00',
start='2022-09-20',
end='2022-10-01',
aoi=[-180, -90, 180, 90],
path=str(OUT_DIR),
).download(progress_bar=False)
print('SHIPS table shape:', None if ships is None else ships.shape)
except Exception as exc:
print(f'skipped live query: {type(exc).__name__}: {exc}')
Inspect the guidance table¶
In [ ]:
Copied!
if ships is not None and len(ships):
display(
ships[['storm_id', 'forecast_init', 'fhr', 'vmax_noland_kt', 'shear_kt']].head()
)
if ships is not None and len(ships):
display(
ships[['storm_id', 'forecast_init', 'fhr', 'vmax_noland_kt', 'shear_kt']].head()
)
Plot the forecast intensity curve¶
In [ ]:
Copied!
if ships is not None and len(ships):
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(8, 5))
ax.plot(ships['fhr'], ships['vmax_noland_kt'], marker='o')
ax.set_title('Ian (2022) SHIPS forecast intensity — init 2022-09-27 00z')
ax.set_xlabel('Forecast hour')
ax.set_ylabel('Max wind (kt)')
ax.grid(True, alpha=0.3)
plt.tight_layout()
plt.show()
if ships is not None and len(ships):
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(8, 5))
ax.plot(ships['fhr'], ships['vmax_noland_kt'], marker='o')
ax.set_title('Ian (2022) SHIPS forecast intensity — init 2022-09-27 00z')
ax.set_xlabel('Forecast hour')
ax.set_ylabel('Max wind (kt)')
ax.grid(True, alpha=0.3)
plt.tight_layout()
plt.show()