OpenWeatherMap API Weather Condition Codes

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


OpenWeatherMap OpenWeatherMap current weather and forecast
免费,支持获取实时天气、未来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://i-blog.csdnimg.cn/blog_migrate/7199162c07361e01e9d08fb61620e6d4.png

Icon list

DayNight 
01d.png 01n.png sky is clear
02d.png 02n.png few clouds
03d.png 03n.png scattered clouds
04d.png 04n.png broken clouds
09d.png 09n.png shower rain
10d.png 10n.png Rain
11d.png 11n.png Thunderstorm
13d.png 13n.png snow
50d.png 50n.png mist

Weather Condition Codes

Thunderstorm

IDMeaningIcon
200thunderstorm with light rain[[file:11d.png]]
201thunderstorm with rain[[file:11d.png]]
202thunderstorm with heavy rain[[file:11d.png]]
210light thunderstorm[[file:11d.png]]
211thunderstorm[[file:11d.png]]
212heavy thunderstorm[[file:11d.png]]
221ragged thunderstorm[[file:11d.png]]
230thunderstorm with light drizzle[[file:11d.png]]
231thunderstorm with drizzle[[file:11d.png]]
232thunderstorm with heavy drizzle[[file:11d.png]]

Drizzle

IDMeaningIcon
300light intensity drizzle[[file:09d.png]]
301drizzle[[file:09d.png]]
302heavy intensity drizzle[[file:09d.png]]
310light intensity drizzle rain[[file:09d.png]]
311drizzle rain[[file:09d.png]]
312heavy intensity drizzle rain[[file:09d.png]]
313shower rain and drizzle[[file:09d.png]]
314heavy shower rain and drizzle[[file:09d.png]]
321shower drizzle[[file:09d.png]]

Rain

IDMeaningIcon
500light rain[[file:10d.png]]
501moderate rain[[file:10d.png]]
502heavy intensity rain[[file:10d.png]]
503very heavy rain[[file:10d.png]]
504extreme rain[[file:10d.png]]
511freezing rain[[file:13d.png]]
520light intensity shower rain[[file:09d.png]]
521shower rain[[file:09d.png]]
522heavy intensity shower rain[[file:09d.png]]
531ragged shower rain[[file:09d.png]]

Snow

IDMeaningIcon
600light snow[[file:13d.png]]
601snow[[file:13d.png]]
602heavy snow[[file:13d.png]]
611sleet[[file:13d.png]]
612shower sleet[[file:13d.png]]
615light rain and snow[[file:13d.png]]
616rain and snow[[file:13d.png]]
620light shower snow[[file:13d.png]]
621shower snow[[file:13d.png]]
622heavy shower snow[[file:13d.png]]

Atmosphere

IDMeaningIcon
701mist[[file:50d.png]]
711smoke[[file:50d.png]]
721haze[[file:50d.png]]
731Sand/Dust Whirls[[file:50d.png]]
741Fog[[file:50d.png]]
751sand[[file:50d.png]]
761dust[[file:50d.png]]
762VOLCANIC ASH[[file:50d.png]]
771SQUALLS[[file:50d.png]]
781TORNADO[[file:50d.png]]

Clouds

IDMeaningIcon
800sky is clear[[file:01d.png]] [[file:01n.png]]
801few clouds[[file:02d.png]] [[file:02n.png]]
802scattered clouds[[file:03d.png]] [[file:03d.png]]
803broken clouds[[file:04d.png]] [[file:03d.png]]
804overcast clouds[[file:04d.png]] [[file:04d.png]]

Extreme

IDMeaning
900tornado
901tropical storm
902hurricane
903cold
904hot
905windy
906hail

Additional

IDMeaning
950Setting
951Calm
952Light breeze
953Gentle Breeze
954Moderate breeze
955Fresh Breeze
956Strong breeze
957High wind, near gale
958Gale
959Severe Gale
960Storm
961Violent Storm
962Hurricane

Translation

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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值