跳至內容
cwa
API 參考

氣候

climate.daily

def daily(station: None = None) -> tuple[DailyClimate, ...]
def daily(station: str) -> DailyClimate
def daily(station: Sequence[str]) -> Mapping[str, DailyClimate]

回傳前一日的逐時紀錄與日溫度統計。

client.climate.daily(station: None = None) -> tuple[DailyClimate, ...]
client.climate.daily(station: str) -> DailyClimate
client.climate.daily(station: Sequence[str]) -> Mapping[str, DailyClimate]
await async_client.climate.daily(station: None = None) -> tuple[DailyClimate, ...]
await async_client.climate.daily(station: str) -> DailyClimate
await async_client.climate.daily(station: Sequence[str]) -> Mapping[str, DailyClimate]

climate.normals

def normals(station: None = None) -> tuple[ClimateNormals, ...]
def normals(station: str) -> ClimateNormals
def normals(station: Sequence[str]) -> Mapping[str, ClimateNormals]

回傳月氣候平均值。

client.climate.normals(station: None = None) -> tuple[ClimateNormals, ...]
client.climate.normals(station: str) -> ClimateNormals
client.climate.normals(station: Sequence[str]) -> Mapping[str, ClimateNormals]
await async_client.climate.normals(station: None = None) -> tuple[ClimateNormals, ...]
await async_client.climate.normals(station: str) -> ClimateNormals
await async_client.climate.normals(station: Sequence[str]) -> Mapping[str, ClimateNormals]

climate.ozone

def ozone() -> tuple[OzoneSeries, ...]

回傳臺北測得的臭氧全量序列,單位為多布森。

client.climate.ozone() -> tuple[OzoneSeries, ...]
await async_client.climate.ozone() -> tuple[OzoneSeries, ...]

climate.rainfall

def rainfall(station: None = None) -> tuple[RainfallRecord, ...]
def rainfall(station: str) -> RainfallRecord
def rainfall(station: Sequence[str]) -> Mapping[str, RainfallRecord]

回傳今年的逐日與逐月降水量。

client.climate.rainfall(station: None = None) -> tuple[RainfallRecord, ...]
client.climate.rainfall(station: str) -> RainfallRecord
client.climate.rainfall(station: Sequence[str]) -> Mapping[str, RainfallRecord]
await async_client.climate.rainfall(station: None = None) -> tuple[RainfallRecord, ...]
await async_client.climate.rainfall(station: str) -> RainfallRecord
await async_client.climate.rainfall(station: Sequence[str]) -> Mapping[str, RainfallRecord]

climate.stations

def stations(station: None = None, *, kind: StationKind = 'staffed') -> tuple[StationHistory, ...]
def stations(station: str, *, kind: StationKind = 'staffed') -> StationHistory
def stations(station: Sequence[str], *, kind: StationKind = 'staffed') -> Mapping[str, StationHistory]

回傳現存與已撤銷測站及其沿革。

client.climate.stations(station: None = None, *, kind: StationKind = 'staffed') -> tuple[StationHistory, ...]
client.climate.stations(station: str, *, kind: StationKind = 'staffed') -> StationHistory
client.climate.stations(station: Sequence[str], *, kind: StationKind = 'staffed') -> Mapping[str, StationHistory]
await async_client.climate.stations(station: None = None, *, kind: StationKind = 'staffed') -> tuple[StationHistory, ...]
await async_client.climate.stations(station: str, *, kind: StationKind = 'staffed') -> StationHistory
await async_client.climate.stations(station: Sequence[str], *, kind: StationKind = 'staffed') -> Mapping[str, StationHistory]

climate.ClimateNormals

station: ClimateStation
first_year: int | None
last_year: int | None
months: tuple[MonthlyNormal, ...]

測站在 first_year 至 last_year 期間的月平均值。

climate.ClimateStation

id: str
name: str
name_en: Text
attribute: Text

氣候測站。attribute 例如署屬有人氣象站。

climate.DailyClimate

station: ClimateStation
hours: Annotated[tuple[HourlyClimate, ...], ordered(time)]
temperatures: Annotated[tuple[DailyTemperature, ...], ordered(date)]

測站的逐時紀錄與日溫度統計。

climate.DailyRainfall

date: Day
precipitation: Rainfall

日降水量,單位為 mm;「T」(微量)視為 0.0。

climate.DailyTemperature

date: Day
maximum: Number
minimum: Number
mean: Number

日最高、最低與平均氣溫,單位為 °C。

climate.HourlyClimate

time: Time
pressure: Number
temperature: Number
humidity: Number
wind_speed: Number
wind_direction: Text
precipitation: Rainfall
sunshine_hours: Number

逐時紀錄。降水量單位為 mm;「T」(微量)視為 0.0。

climate.MonthlyNormal

month: int
pressure: Number
temperature: Number
max_temperature: Number
min_temperature: Number
days_max_at_least_30: Number
days_mean_at_least_25: Number
days_min_at_most_10: Number
humidity: Number
cloud_amount: Number
sunshine_hours: Number
precipitation: Number
days_precipitation_at_least_0_1: Number
wind_speed: Number

單一月份的平均狀況。

climate.MonthlyRainfall

year_month: str
total: Rainfall

月降水總量,單位為 mm。year_month 格式為「YYYY-MM」。

climate.OzoneSeries

name: str
values: tuple[OzoneValue, ...]

具名的臭氧序列,例如累年臭氧全量月平均值。

climate.OzoneValue

period: str
value: Number

臭氧全量,單位為多布森。period 為年份、「YYYY-MM」或月份「MM」。

climate.RainfallRecord

station: ClimateStation
days: Annotated[tuple[DailyRainfall, ...], ordered(date)]
months: Annotated[tuple[MonthlyRainfall, ...], ordered(year_month)]

測站的逐日與逐月降水量。

climate.StationHistory

id: str
name: str
name_en: Text
status: Text
altitude: Number
latitude: Number
longitude: Number
county: CountyName
address: Text
started: OptionalDay
ended: OptionalDay
notes: Text
original_id: Text
new_id: Text

現存或已撤銷測站。status 為現存測站或已撤銷。

climate.StationKind

type StationKind = Literal['staffed', 'automatic']

測站類別:staffed 為署屬有人站,automatic 為自動站。