跳至內容
cwa
API 參考

海象

marine.sea

def sea(station: None = None, *, days: SeaPeriod = 2) -> tuple[SeaStation, ...]
def sea(station: str, *, days: SeaPeriod = 2) -> SeaStation
def sea(station: Sequence[str], *, days: SeaPeriod = 2) -> Mapping[str, SeaStation]

回傳近幾日浮標與潮位站觀測。

client.marine.sea(station: None = None, *, days: SeaPeriod = 2) -> tuple[SeaStation, ...]
client.marine.sea(station: str, *, days: SeaPeriod = 2) -> SeaStation
client.marine.sea(station: Sequence[str], *, days: SeaPeriod = 2) -> Mapping[str, SeaStation]
await async_client.marine.sea(station: None = None, *, days: SeaPeriod = 2) -> tuple[SeaStation, ...]
await async_client.marine.sea(station: str, *, days: SeaPeriod = 2) -> SeaStation
await async_client.marine.sea(station: Sequence[str], *, days: SeaPeriod = 2) -> Mapping[str, SeaStation]

marine.tides

def tides(location: None = None) -> tuple[TideForecast, ...]
def tides(location: TownshipInput) -> TideForecast
def tides(location: Sequence[TownshipInput]) -> Mapping[str | Township, TideForecast]

回傳鄉鎮或沿海地點一個月的潮汐預報。

client.marine.tides(location: None = None) -> tuple[TideForecast, ...]
client.marine.tides(location: TownshipInput) -> TideForecast
client.marine.tides(location: Sequence[TownshipInput]) -> Mapping[str | Township, TideForecast]
await async_client.marine.tides(location: None = None) -> tuple[TideForecast, ...]
await async_client.marine.tides(location: TownshipInput) -> TideForecast
await async_client.marine.tides(location: Sequence[TownshipInput]) -> Mapping[str | Township, TideForecast]

marine.SeaCurrent

layer: int
direction: Number
direction_text: Text
speed: Number

單一深度層的海流。流速單位為 m/s,流向單位為度。

marine.SeaObservation

time: Time
tide_height: Number
tide_level: Text
wave_height: Number
wave_direction: Number
wave_direction_text: Text
wave_period: Number
sea_temperature: Number
air_temperature: Number
pressure: Number
wind_speed: Number
wind_scale: Number
wind_direction: Number
gust_speed: Number
currents: tuple[SeaCurrent, ...]

單一時刻的海況。

marine.SeaPeriod

type SeaPeriod = Literal[2, 30]

海況觀測期間:2 為 48 小時,30 為 30 天。

marine.SeaStation

id: str
observations: Annotated[tuple[SeaObservation, ...], ordered(time)]

浮標或潮位站及依時間排序的觀測。

marine.Tide

time: Time
type: str
height_twvd: Number
height_local_msl: Number
height_chart_datum: Number

一次滿潮或乾潮。潮高單位為公分。

marine.TideDay

date: Day
lunar_date: Text
tide_range: Text
tides: Annotated[tuple[Tide, ...], ordered(time)]

一天的潮汐。tide_range 為大、中或小。

marine.TideForecast

location_id: str
name: str
township: TownshipCode
latitude: Number
longitude: Number
days: Annotated[tuple[TideDay, ...], ordered(date)]

鄉鎮或沿海地點一個月的潮汐預報。