跳至內容
cwa
使用指南

海嘯

氣象署海嘯報告、警報與解除通報。

cwa.tsunamis.recent() 由新到舊回傳海嘯報告,latest() 只回傳最新一筆。

import cwa

report = cwa.tsunamis.latest()
if report is not None:
    print(report.report, report.issued_at, report.earthquake.magnitude)
    for area in report.areas:
        print(area.name, area.arrival_at, area.wave_height)

recent(limit=20) 的 limit 為正整數。沒有報告時,recent() 回傳空的 tuple,latest() 回傳 None。

欄位

欄位說明
number、report、type編號、報告內容與報告種類
issued_at、expires_at發布與失效時間
earthquake引發海嘯的地震:時間、位置、深度(km)與規模
areas沿海地區的預估或實測到達時間與波高
stations潮位站的預估或實測海嘯波

本頁目錄