0
点赞
收藏
分享

微信扫一扫

OpenWeatherMap API Weather Condition Codes

秀妮_5519 2023-05-22 阅读 52


http://bugs.openweathermap.org/projects/api/wiki/Weather_Condition_Codes

OpenWeatherMap
免费,支持获取实时天气、未来5天每3小时的天气、未来16天每天的天气、历史天气,也支持中文、摄氏度,支持根据地理位置、城市名、城市ID和邮编获取天气,也支持矩形或圆形范围获取天气,支持批量获取天气,JSON、XML格式都支持,信息非常全,包括如下参数:

Parameters:

  • coord
  • coord.lon City geo location, longitude
  • coord.lat City geo location, latitude
  • weather (more info Weather condition codes)
  • weather.id Weather condition id
  • weather.main Group of weather parameters (Rain, Snow, Extreme etc.)
  • weather.description Weather condition within the group
  • weather.icon Weather icon id
  • base Internal parameter
  • main
  • main.temp Temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
  • main.pressure Atmospheric pressure (on the sea level, if there is no sea_level or grnd_level data), hPa
  • main.humidity Humidity, %
  • main.temp_min Minimum temperature at the moment. This is deviation from current temp that is possible for large cities and megalopolises geographically expanded (use these parameter optionally). Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
  • main.temp_max Maximum temperature at the moment. This is deviation from current temp that is possible for large cities and megalopolises geographically expanded (use these parameter optionally). Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
  • main.sea_level Atmospheric pressure on the sea level, hPa
  • main.grnd_level Atmospheric pressure on the ground level, hPa
  • wind
  • wind.speed Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour.
  • wind.deg Wind direction, degrees (meteorological)
  • clouds
  • clouds.all Cloudiness, %
  • rain
  • rain.3h Rain volume for the last 3 hours
  • snow
  • snow.3h Snow volume for the last 3 hours
  • dt Time of data calculation, unix, UTC
  • sys
  • sys.type Internal parameter
  • sys.id Internal parameter
  • sys.message Internal parameter
  • sys.country Country code (GB, JP etc.)
  • sys.sunrise Sunrise time, unix, UTC
  • sys.sunset Sunset time, unix, UTC
  • id City ID
  • name City name
  • cod Internal parameter



Weather Condition Codes



Example

http://openweathermap.org/data/2.1/find/name?q=NY


{"message":"","cod":"200","type":"geonames_lang-name","calctime":0.0485, "list":[ {"id":5128638, "coord":{"lat":43.000351,"lon":-75.499901}, "name":"New York", "main":{ "temp":285,"temp_min":284.8,"temp_max":289.8,"pressure":999.16,"humidity":98.9},"dt":1347646686,"date":"2012-09-14 19:18:06","wind":{"speed":2.58,"deg":276,"gust":7.4}, "rain":{"3h":4.8}, "clouds":{"all":82}, "weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}], "url":"http:\/\/openweathermap.org\/city\/5128638" }]}



How to get icon URL

For code 501 - moderate rain icon = "10d" 
URL is
https://file.cfanz.cn/uploads/png/2023/05/22/21/66FO1F521e.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=



Icon list

Day

Night

 

01d.png 

OpenWeatherMap API Weather Condition Codes_ci

01n.png 

OpenWeatherMap API Weather Condition Codes_ci_02

sky is clear

02d.png 

OpenWeatherMap API Weather Condition Codes_ico_03

02n.png 

OpenWeatherMap API Weather Condition Codes_ico_04

few clouds

03d.png 

OpenWeatherMap API Weather Condition Codes_ci_05

03n.png 

OpenWeatherMap API Weather Condition Codes_3d_06

scattered clouds

04d.png 

OpenWeatherMap API Weather Condition Codes_3d_07

04n.png 

OpenWeatherMap API Weather Condition Codes_ci_08

broken clouds

09d.png 

OpenWeatherMap API Weather Condition Codes_ci_09

09n.png 

OpenWeatherMap API Weather Condition Codes_ico_10

shower rain

10d.png 

OpenWeatherMap API Weather Condition Codes_ico_11

10n.png 

OpenWeatherMap API Weather Condition Codes_3d_12

Rain

11d.png 

OpenWeatherMap API Weather Condition Codes_3d_13

11n.png 

OpenWeatherMap API Weather Condition Codes_3d_14

Thunderstorm

13d.png 

OpenWeatherMap API Weather Condition Codes_ico_15

13n.png 

OpenWeatherMap API Weather Condition Codes_ico_16

snow

50d.png 

OpenWeatherMap API Weather Condition Codes_ci_17

50n.png 

OpenWeatherMap API Weather Condition Codes_3d_18

mist


Weather Condition Codes



Thunderstorm

ID

Meaning

Icon

200

thunderstorm with light rain

[[file:11d.png]]

201

thunderstorm with rain

[[file:11d.png]]

202

thunderstorm with heavy rain

[[file:11d.png]]

210

light thunderstorm

[[file:11d.png]]

211

thunderstorm

[[file:11d.png]]

212

heavy thunderstorm

[[file:11d.png]]

221

ragged thunderstorm

[[file:11d.png]]

230

thunderstorm with light drizzle

[[file:11d.png]]

231

thunderstorm with drizzle

[[file:11d.png]]

232

thunderstorm with heavy drizzle

[[file:11d.png]]


Drizzle

ID

Meaning

Icon

300

light intensity drizzle

[[file:09d.png]]

301

drizzle

[[file:09d.png]]

302

heavy intensity drizzle

[[file:09d.png]]

310

light intensity drizzle rain

[[file:09d.png]]

311

drizzle rain

[[file:09d.png]]

312

heavy intensity drizzle rain

[[file:09d.png]]

313

shower rain and drizzle

[[file:09d.png]]

314

heavy shower rain and drizzle

[[file:09d.png]]

321

shower drizzle

[[file:09d.png]]


Rain

ID

Meaning

Icon

500

light rain

[[file:10d.png]]

501

moderate rain

[[file:10d.png]]

502

heavy intensity rain

[[file:10d.png]]

503

very heavy rain

[[file:10d.png]]

504

extreme rain

[[file:10d.png]]

511

freezing rain

[[file:13d.png]]

520

light intensity shower rain

[[file:09d.png]]

521

shower rain

[[file:09d.png]]

522

heavy intensity shower rain

[[file:09d.png]]

531

ragged shower rain

[[file:09d.png]]


Snow

ID

Meaning

Icon

600

light snow

[[file:13d.png]]

601

snow

[[file:13d.png]]

602

heavy snow

[[file:13d.png]]

611

sleet

[[file:13d.png]]

612

shower sleet

[[file:13d.png]]

615

light rain and snow

[[file:13d.png]]

616

rain and snow

[[file:13d.png]]

620

light shower snow

[[file:13d.png]]

621

shower snow

[[file:13d.png]]

622

heavy shower snow

[[file:13d.png]]


Atmosphere

ID

Meaning

Icon

701

mist

[[file:50d.png]]

711

smoke

[[file:50d.png]]

721

haze

[[file:50d.png]]

731

Sand/Dust Whirls

[[file:50d.png]]

741

Fog

[[file:50d.png]]

751

sand

[[file:50d.png]]

761

dust

[[file:50d.png]]

762

VOLCANIC ASH

[[file:50d.png]]

771

SQUALLS

[[file:50d.png]]

781

TORNADO

[[file:50d.png]]


Clouds

ID

Meaning

Icon

800

sky is clear

[[file:01d.png]] [[file:01n.png]]

801

few clouds

[[file:02d.png]] [[file:02n.png]]

802

scattered clouds

[[file:03d.png]] [[file:03d.png]]

803

broken clouds

[[file:04d.png]] [[file:03d.png]]

804

overcast clouds

[[file:04d.png]] [[file:04d.png]]


Extreme

ID

Meaning

900

tornado

901

tropical storm

902

hurricane

903

cold

904

hot

905

windy

906

hail


Additional

ID

Meaning

950

Setting

951

Calm

952

Light breeze

953

Gentle Breeze

954

Moderate breeze

955

Fresh Breeze

956

Strong breeze

957

High wind, near gale

958

Gale

959

Severe Gale

960

Storm

961

Violent Storm

962

Hurricane


Translation

http://bugs.openweathermap.org/projects/api/boards/3



举报

相关推荐

0 条评论