Difference between revisions of "通用预报接口/v2.5"

From CaiyunWiki
Jump to: navigation, search
m
(返回结构和说明)
Line 23: Line 23:
  
 
=='''返回结构和说明'''==
 
=='''返回结构和说明'''==
<blockquote>'''realtime'''分字段含义,请移步:[[实况天气接口/v2.5|实况接口/v2.5]]</blockquote><blockquote>'''minutely'''分字段含义,请移步:[[分钟级降雨预报接口|逐分钟降水短临预报接口/v2.5]]</blockquote><blockquote>'''hourly'''分字段含义,请移步:[[小时级预报接口/v2.5|逐小时预报接口/v2.5]]</blockquote><blockquote>'''daily'''分字段含义,请移步:[[天级预报接口/v2.5|逐日预报接口/v2.5]]</blockquote><blockquote>'''alert'''分字段含义,如下:</blockquote><syntaxhighlight lang="javascript">
+
<syntaxhighlight lang="yaml">
  
status:ok,
+
status: ok
    api_version:v2.5,
+
api_version: v2.5
    api_status:active,
+
api_status: active
    unit:metric,
+
lang: en_US
    lang:en_US,
+
unit: imperial
    result:{
+
tzshift: -14400
        forecast_keypoint:cloudy, clear weather after 23 this midnight,
+
timezone: America/New_York
        primary:0,
+
server_time: 1585894300
        realtime:{status:ok,                                                                                                ###请参考:实况接口/v2.5
+
location:
                    temperature:-1.21,
+
- 40.7128
                    pres:56320.24,
+
- -74.006
                    humidity:0.09,
+
result:
                    wind:{direction:284.91,speed:30.12}},
+
  realtime:
                    precipitation:{local:{status:ok,intensity:0.0,datasource:gfs}},
+
    status: ok
                    cloudrate:0.3,
+
    temperature: 46.92
                    dswrf:677.9,
+
    humidity: 0.6
                    visibility:24.1,
+
    cloudrate: 0.99
                   
+
    skycon: LIGHT_RAIN
                    skycon:PARTLY_CLOUDY_DAY,
+
    visibility: 14.99
                    ultraviolet:{index:5.0,desc:Moderat},
+
    dswrf: 0
                    comfort:{index:11,desc:Icy wind cold},
+
    wind:
                   
+
      speed: 20.04
                    pm25:3,
+
      direction: 327.03
                    pm10:10.0,
+
    pressure: 100027.48
                    o3:97.0,
+
    apparent_temperature: 52.9
                    no2:2.0,
+
    precipitation:
                    so2:7.0,
+
      local:
                    co:0.4,
+
        status: ok
                    aqi:10
+
        datasource: radar
          },
+
        intensity: 0.245
        minutely:{status:ok,                                                                                                  ###请参考:逐分钟降水短临预报接口/v2.5
+
      nearest:
                    precipitation_2h:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+
        status: ok
                    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+
        distance: 0
                    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+
        intensity: 6
                    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+
    air_quality:
                    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],
+
      pm25: 0
                    precipitation:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+
      pm10: 0
                    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+
      o3: 0
                    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],
+
      so2: 0
                    datasource:gfs,
+
      no2: 0
                    description:No snow in the next hour
+
      co: 0
        },
+
      aqi:
        hourly:{status:ok,                                                                                                      ###请参考:逐小时预报接口/v2.5
+
        chn: 0
                    description:cloudy, clear weather after 23 this midnight,
+
        usa: 0
                    temperature:[{value:-1.21,datetime:2018-11-20 16:00},{value:-0.51,datetime:2018-11-20 17:00}]},
+
      description:
                    pres:[{value:56320.2411405722,datetime:2018-11-20 16:00},{value:56309.4272949293,datetime:2018-11-20 17:00}],
+
        usa: ''
                    humidity:[{value:0.09,datetime:2018-11-20 16:00},{value:0.11,datetime:2018-11-20 17:00}],
+
        chn: missing
                    wind:[{direction:284.91,speed:30.12,datetime:2018-11-20 16:00},{direction:288.24,speed:32.91,datetime:2018-11-20 17:00}],
+
    life_index:
                    precipitation:[{value:0.0,datetime:2018-11-20 16:00},{value:0.0,datetime:2018-11-20 17:00}],
+
      ultraviolet:
                    cloudrate:[{value:0.3,datetime:2018-11-20 16:00},{value:0.3,datetime:2018-11-20 17:00}],
+
        index: 0
                    dswrf:[{value:677.9121814107,datetime:2018-11-20 16:00},{value:596.25984,datetime:2018-11-20 17:00}],
+
        desc: None
                    visibility:[{value:24.1,datetime:2018-11-20 16:00},{value:24.1,datetime:2018-11-20 17:00}],
+
      comfort:
 
+
        index: 2
                    skycon:[{value:PARTLY_CLOUDY_DAY,datetime:2018-11-20 16:00},{value:WIND,datetime:2018-11-20 17:00}],
+
        desc: Very hot
                    pm25:[{value:3,datetime:2018-11-20 16:00},{value:0,datetime:2018-11-20 17:00}],
+
  minutely:
                    aqi:[{value:10,datetime:2018-11-20 16:00},{value:0,datetime:2018-11-20 17:00}],
+
    status: ok
            },
+
    datasource: radar
        daily:{status:ok,                                                                                                      ###请参考:逐日预报接口/v2.5
+
    precipitation_2h:
                temperature:[{date:2018-11-20,max:1.19,avg:-4.35,min:-16.0},{date:2018-11-21,max:2.0,avg:-7.32,min:-18.0}],
+
    - 0.245
                pres:[{date:2018-11-20,max:56600.24,avg:56422.06,min:56309.43},{date:2018-11-21,max:56833.63,avg:56653.05,min:56553.63}],
+
    precipitation:
                humidity:[{date:2018-11-20,max:0.23,avg:0.14,min:0.09},{date:2018-11-21,max:0.15,avg:0.11,min:0.06}],
+
    - 0.245
                wind:[{date:2018-11-20,max:{direction:290.25,speed:35.9},avg:{direction:278.27,speed:19.65},min:{direction:230.17,speed:4.77}},
+
    probability:
                      {date:2018-11-21,max:{direction:276.13,speed:43.0},avg:{direction:262.47,speed:24.54},min:{direction:216.1,speed:12.48}}],
+
    - 0.9703164364
                precipitation:[{date:2018-11-20,max:0.0,avg:0.0,min:0.0},{date:2018-11-21,max:0.0,avg:0.0,min:0.0}],
+
    description: " rain easing off in one hour"
               
+
  hourly:
                dswrf:[{date:2018-11-20,max:743.7,avg:321.5,min:0.0},{date:2018-11-21,max:748.3,avg:202.3,min:0.0}],
+
    status: ok
                cloudrate:[{date:2018-11-20,max:0.76,avg:0.49,min:0.0},{date:2018-11-21,max:0.15,avg:0.02,min:0.0}],
+
    description: drizzle, expect rain to stop after 9 o'clock this morning, followed
                visibility:[{date:2018-11-20,max:24.1,avg:24.1,min:24.1},{date:2018-11-21,max:24.1,avg:24.1,min:24.1}],
+
      by overcast, then drizzle
               
+
    precipitation:
                skycon:[{date:2018-11-20,value:PARTLY_CLOUDY_DAY},{date:2018-11-21,value:CLEAR_DAY}],
+
    - datetime: 2020-04-03T02:00-04:00
                skycon_08h_20h:[{date:2018-11-20,value:CLEAR_DAY},{date:2018-11-21,value:CLEAR_DAY}]},
+
      value: 0.021
                skycon_20h_32h:[{date:2018-11-20,value:PARTLY_CLOUDY_NIGHT},{date:2018-11-21,value:CLEAR_NIGHT}],
+
    temperature:
                ultraviolet:[{index:5,desc:Very high,datetime:2018-11-20},{index:5,desc:Very high,datetime:2018-11-21}],
+
    - datetime: 2020-04-03T02:00-04:00
                comfort:[{index:13,desc:Dry cold,datetime:2018-11-20},{index:13,desc:Dry cold,datetime:2018-11-21}],
+
      value: 46.92
                carWashing:[{index:1,desc:Suitable,datetime:2018-11-20},{index:1,desc:Suitable,datetime:2018-11-21}],
+
    wind:
                coldRisk:[{index:4,desc:Extremely prone,datetime:2018-11-20},{index:4,desc:Extremely prone,datetime:2018-11-21}],
+
    - datetime: 2020-04-03T02:00-04:00
                dressing:[{index:8,desc:Extremely cold,datetime:2018-11-20},{index:8,desc:Extremely cold,datetime:2018-11-21}],
+
      speed: 20.04
               
+
      direction: 327.03
                pm25:[{date:2018-11-20,max:3,avg:1.12,min:0},{date:2018-11-21,max:1,avg:0.58,min:0}],
+
    humidity:
                aqi:[{date:2018-11-20,max:10,avg:1.25,min:0},{date:2018-11-21,max:0,avg:0.0,min:0}],
+
    - datetime: 2020-04-03T02:00-04:00
 
+
      value: 0.6
                astro:[{date:2018-11-20,sunset:{time:19:07},sunrise:{time:08:40}},{date:2018-11-21,sunset:{time:19:07},sunrise:{time:08:41}}],
+
    skycon:
        },
+
    - datetime: 2020-04-03T02:00-04:00
      alert:{alert:{status:"ok"
+
      value: LIGHT_RAIN
              content:{
+
    pressure:
                    0:{ request_status: "ok",
+
    - datetime: 2020-04-03T02:00-04:00
                        source: "国家预警信息发布中心",
+
      value: 100027.4809084723
 
+
    visibility:
                        county: "无",
+
    - datetime: 2020-04-03T02:00-04:00
                        province: "江苏省",
+
      value: 14.99
                        regionId: "unknown"
+
    dswrf:
                        city: "南京市",
+
    - datetime: 2020-04-03T02:00-04:00
                        code: "1303",                                                      ##预警类型code
+
      value: 0
                        adcode: "320100",
+
    air_quality:
 
+
      aqi:
                        alertId: "32010041600000_20181130104521",
+
      - datetime: 2020-04-03T02:00-04:00
                        status: "预警中",
+
        value:
                        title: "南京市气象台发布霾橙色预警[Ⅱ级/严重]",
+
          chn: 0
                        description: "南京市气象台2018年11月30日10时41分升级霾黄色预警信号为霾橙色预警信号。目前我市已经出现中度霾,预计未来24小时内霾将持续,请注意防范。"
+
          usa: 0
 
+
      pm25:
                        location: "江苏省南京市",
+
      - datetime: 2020-04-03T02:00-04:00
                        latlon: {
+
        value: 0
                            0: 32.060255,
+
  daily:
                            1: 118.796877
+
    status: ok
                            }
+
    astro:
                        pubtimestamp: 1543545921,
+
    - date: 2020-04-03T00:00-04:00
                        }
+
      sunrise:
                    }
+
        time: '06:34'
              }
+
      sunset:
      },
+
        time: '19:23'
    location:[31.658613,
+
    precipitation:
                87.815109]
+
    - date: 2020-04-03T00:00-04:00
    server_time:1542702509,
+
      max: 0.028
    tzshift:28800,
+
      min: 0
}
+
      avg: 0.0075
 +
    temperature:
 +
    - date: 2020-04-03T00:00-04:00
 +
      max: 51.35
 +
      min: 46.92
 +
      avg: 49.74
 +
    wind:
 +
    - date: 2020-04-03T00:00-04:00
 +
      max:
 +
        speed: 20.04
 +
        direction: 327.03
 +
      min:
 +
        speed: 13.17
 +
        direction: 12.79
 +
      avg:
 +
        speed: 16.85
 +
        direction: 347.62
 +
    humidity:
 +
    - date: 2020-04-03T00:00-04:00
 +
      max: 0.76
 +
      min: 0.57
 +
      avg: 0.71
 +
    cloudrate:
 +
    - date: 2020-04-03T00:00-04:00
 +
      max: 1
 +
      min: 0.95
 +
      avg: 1
 +
    pressure:
 +
    - date: 2020-04-03T00:00-04:00
 +
      max: 100814.14
 +
      min: 99934.41
 +
      avg: 100305.84
 +
    visibility:
 +
    - date: 2020-04-03T00:00-04:00
 +
      max: 14.99
 +
      min: 9.67
 +
      avg: 12.62
 +
    dswrf:
 +
    - date: 2020-04-03T00:00-04:00
 +
      max: 138.9
 +
      min: 0
 +
      avg: 41.4
 +
    air_quality:
 +
      aqi:
 +
      - date: 2020-04-03T00:00-04:00
 +
        max:
 +
          chn: 0
 +
          usa: 0
 +
        avg:
 +
          chn: 0
 +
          usa: 0
 +
        min:
 +
          chn: 0
 +
          usa: 0
 +
      pm25:
 +
      - date: 2020-04-03T00:00-04:00
 +
        max: 0
 +
        avg: 0
 +
        min: 0
 +
    skycon:
 +
    - date: 2020-04-03T00:00-04:00
 +
      value: LIGHT_RAIN
 +
    life_index:
 +
      ultraviolet:
 +
      - date: 2020-04-03T00:00-04:00
 +
        index: '1'
 +
        desc: Weak
 +
      carWashing:
 +
      - date: 2020-04-03T00:00-04:00
 +
        index: '3'
 +
        desc: Less appropriate
 +
      dressing:
 +
      - date: 2020-04-03T00:00-04:00
 +
        index: '2'
 +
        desc: Very hot
 +
      comfort:
 +
      - date: 2020-04-03T00:00-04:00
 +
        index: '0'
 +
        desc: Sticky hot
 +
      coldRisk:
 +
      - date: 2020-04-03T00:00-04:00
 +
        index: '3'
 +
        desc: Prone
 +
  forecast_keypoint: " rain easing off in one hour"
  
 
</syntaxhighlight>
 
</syntaxhighlight>
 
{{预警类型}}
 
 
{{天气现象}}
 
  
 
=='''生活指数'''==
 
=='''生活指数'''==

Revision as of 09:24, 7 April 2020

本文版本:通用预报接口/v2.5,当前稳定版本版本:v2.5,历史版本:v2.2v2.3,和 v2.4

授权与认证

请先至彩云开放平台注册,注册后可以获得 token 。

把您的 token 拼到 API 请求的 URL 中,如

https://api.caiyunapp.com/v2.5/TAkhjf8d1nlSlspN/121.6544,25.1552/weather.json

其中 TAkhjf8d1nlSlspN 就是一个共用测试 token 。不要把私有token 告诉任何人!

请求样例

示例1如下

https://api.caiyunapp.com/v2.5/TAkhjf8d1nlSlspN/121.6544,25.1552/weather.json
https://api.caiyunapp.com/v2.5/TAkhjf8d1nlSlspN/121.6544,25.1552/weather.jsonp?callback=MYCALLBACK
token:这里是测试 token ,即 TAkhjf8d1nlSlspN
经纬度:经度在前,纬度在后,中间用半角逗号隔开,这里是 121.6544,25.1552
返回格式:json 或者 jsonp,jsonp 需提供回调函数名

示例2如下

https://api.caiyunapp.com/v2.5/TAkhjf8d1nlSlspN/121.6544,25.1552/weather?lang=en_US
语言选项 lang:默认为简体中文(zh_CN)、繁体中文(zh_TW)、美式英语(en_US)、英式英语(en_GB)
单位制选项 unit:默认为公制(metric)、科学单位体系(SI) 、英制(imperial)
时区偏移秒数 tzshift:用户提供所需时区偏移秒,考虑欧美夏令时,默认东八(tzshift=28800);例如,用户希望取得印度(东5.5区)习惯定义下的逐日天气,加参数&tzshift=19800(=3600*5.5),然后daily的计算都会做相应处理。
定制返回的起始时间戳 begin:默认为当前utc时间戳,可以用来返回两日内的历史数据
定制返回逐小时预报总小时数 hourlysteps:默认为48小时(包括当前时刻)
定制返回逐日预报总天数 dailysteps:默认为5天(包括今天)
返回周围预警: alert=true (注意小写)

返回结构和说明

status: ok
api_version: v2.5
api_status: active
lang: en_US
unit: imperial
tzshift: -14400
timezone: America/New_York
server_time: 1585894300
location:
- 40.7128
- -74.006
result:
  realtime:
    status: ok
    temperature: 46.92
    humidity: 0.6
    cloudrate: 0.99
    skycon: LIGHT_RAIN
    visibility: 14.99
    dswrf: 0
    wind:
      speed: 20.04
      direction: 327.03
    pressure: 100027.48
    apparent_temperature: 52.9
    precipitation:
      local:
        status: ok
        datasource: radar
        intensity: 0.245
      nearest:
        status: ok
        distance: 0
        intensity: 6
    air_quality:
      pm25: 0
      pm10: 0
      o3: 0
      so2: 0
      no2: 0
      co: 0
      aqi:
        chn: 0
        usa: 0
      description:
        usa: ''
        chn: missing
    life_index:
      ultraviolet:
        index: 0
        desc: None
      comfort:
        index: 2
        desc: Very hot
  minutely:
    status: ok
    datasource: radar
    precipitation_2h:
    - 0.245
    precipitation:
    - 0.245
    probability:
    - 0.9703164364
    description: " rain easing off in one hour"
  hourly:
    status: ok
    description: drizzle, expect rain to stop after 9 o'clock this morning, followed
      by overcast, then drizzle
    precipitation:
    - datetime: 2020-04-03T02:00-04:00
      value: 0.021
    temperature:
    - datetime: 2020-04-03T02:00-04:00
      value: 46.92
    wind:
    - datetime: 2020-04-03T02:00-04:00
      speed: 20.04
      direction: 327.03
    humidity:
    - datetime: 2020-04-03T02:00-04:00
      value: 0.6
    skycon:
    - datetime: 2020-04-03T02:00-04:00
      value: LIGHT_RAIN
    pressure:
    - datetime: 2020-04-03T02:00-04:00
      value: 100027.4809084723
    visibility:
    - datetime: 2020-04-03T02:00-04:00
      value: 14.99
    dswrf:
    - datetime: 2020-04-03T02:00-04:00
      value: 0
    air_quality:
      aqi:
      - datetime: 2020-04-03T02:00-04:00
        value:
          chn: 0
          usa: 0
      pm25:
      - datetime: 2020-04-03T02:00-04:00
        value: 0
  daily:
    status: ok
    astro:
    - date: 2020-04-03T00:00-04:00
      sunrise:
        time: '06:34'
      sunset:
        time: '19:23'
    precipitation:
    - date: 2020-04-03T00:00-04:00
      max: 0.028
      min: 0
      avg: 0.0075
    temperature:
    - date: 2020-04-03T00:00-04:00
      max: 51.35
      min: 46.92
      avg: 49.74
    wind:
    - date: 2020-04-03T00:00-04:00
      max:
        speed: 20.04
        direction: 327.03
      min:
        speed: 13.17
        direction: 12.79
      avg:
        speed: 16.85
        direction: 347.62
    humidity:
    - date: 2020-04-03T00:00-04:00
      max: 0.76
      min: 0.57
      avg: 0.71
    cloudrate:
    - date: 2020-04-03T00:00-04:00
      max: 1
      min: 0.95
      avg: 1
    pressure:
    - date: 2020-04-03T00:00-04:00
      max: 100814.14
      min: 99934.41
      avg: 100305.84
    visibility:
    - date: 2020-04-03T00:00-04:00
      max: 14.99
      min: 9.67
      avg: 12.62
    dswrf:
    - date: 2020-04-03T00:00-04:00
      max: 138.9
      min: 0
      avg: 41.4
    air_quality:
      aqi:
      - date: 2020-04-03T00:00-04:00
        max:
          chn: 0
          usa: 0
        avg:
          chn: 0
          usa: 0
        min:
          chn: 0
          usa: 0
      pm25:
      - date: 2020-04-03T00:00-04:00
        max: 0
        avg: 0
        min: 0
    skycon:
    - date: 2020-04-03T00:00-04:00
      value: LIGHT_RAIN
    life_index:
      ultraviolet:
      - date: 2020-04-03T00:00-04:00
        index: '1'
        desc: Weak
      carWashing:
      - date: 2020-04-03T00:00-04:00
        index: '3'
        desc: Less appropriate
      dressing:
      - date: 2020-04-03T00:00-04:00
        index: '2'
        desc: Very hot
      comfort:
      - date: 2020-04-03T00:00-04:00
        index: '0'
        desc: Sticky hot
      coldRisk:
      - date: 2020-04-03T00:00-04:00
        index: '3'
        desc: Prone
  forecast_keypoint: " rain easing off in one hour"

生活指数

1.目前支持的生活指数(life_index)包括:紫外线(ultraviolet)、舒适度(comfort)、洗车(carWashing)、感冒(coldRisk)、(穿衣指数(dressing),不建议继续使用,请使用舒适度):


紫外线(ultraviolet)实况
level desc 自然语言描述
0 None 无(夜间)
1 Weak 很弱
2 Weak 很弱
3 Low
4 Low
5 Moderate 中等
6 Moderate 中等
7 High
8 High
9 Very High 很强
10 Very High 很强
11 Extreme 极强
紫外线(ultraviolet)逐日预报(午间时段,10:00AM~14:00PM)
level desc 自然语言描述
0 None 无(夜间)
1 Weak 最弱
2 Low
3 Moderate 中等
4 High
5 Very high 很强
舒适度(comfort)实况和逐日预报
level desc 自然语言描述
0 Sticky 闷热
1 Extremely hot 酷热
2 Very hot 很热
3 Hot
4 Warm 温暖
5 Comfort 舒适
6 Cool 凉爽
7 Cold
8 Very cold 很冷
9 Freezing 寒冷
10 Frigid 极冷
11 Icy 刺骨的冷
12 Clammy 湿冷
13 Dry cold 干冷
洗车(carWashing)逐日预报
level desc 自然语言描述
1 Suitable 适宜
2 More appropriate 较适宜
3 Less appropriate 较不适宜
4 Unfit 不适应
感冒(coldRisk)逐日预报
level desc 自然语言描述
1 Less prone 少发
2 Easily prone 较易发
3 Prone 易发
4 Extremely prone 极易发

支持的单位制

1.目前支持的单位制包括:科学单位体系(SI,大写)、英制(imperial)、公制(不带参数&unit默认公制,公制还包括: metric:v1和metric:v2):

单位制
要素
SI(科学单位体系) imperial(英制) metric:v1(公制v1) metric:v2(公制v2) default metric(默认公制)
实况降水量 米/秒(meter/sec) 英寸/小时(in/hr) 雷达降水强度(0~1) 毫米/小时(mm/hr) 雷达降水强度(0~1)
逐分钟降水短临预报降水量 米/秒(meter/sec) 英寸/小时(in/hr) 雷达降水强度(0~1) 毫米/小时(mm/hr) 雷达降水强度(0~1)
逐小时预报降水量 米/秒(meter/sec) 英寸/小时(in/hr) 雷达降水强度(0~1) 毫米/小时(mm/hr) 毫米/小时(mm/hr)
逐日预报降水量 米/秒(meter/sec) 英寸/小时(in/hr) 雷达降水强度(0~1) 毫米/小时(mm/hr) 毫米/小时(mm/hr)
距离 米(m) 英里(mi) 公里(km) 公里(km) 公里(km)
温度 开尔文(K) 华氏度(℉) 摄氏度(℃) 摄氏度(℃) 摄氏度(℃)
气压 帕(Pa) 帕(Pa) 帕(Pa) 帕(Pa) 帕(Pa)
相对湿度 0~1 0~1 0~1 0~1 0~1
风向 从北顺时针(0~360°) 从北顺时针(0~360°) 从北顺时针(0~360°) 从北顺时针(0~360°) 从北顺时针(0~360°)
风速 米/秒(m/s) 英里/小时(mi/hr) 公里/小时(km/hr) 公里/小时(km/hr) 公里/小时(km/hr)
云量 0~1 0~1 0~1 0~1 0~1
能见度 米(m) 英里(mi) 公里(km) 公里(km) 公里(km)

unit=metric:v1时,所有类型中precipitation的单位都是:雷达降水强度(0~1)

unit=metric:v2时,所有类型中precipitation的单位都是:毫米/小时(mm/hr)

2.判断降水等级:

  • 带参数&unit=metric:v1,请求实况、分钟级、逐小时和逐日降水强度,单位都为雷达降水强度(0 ~ 1);
  • 雷达降水强度(0 ~ 1)判断降水等级:0.03~0.25 小雨(雪), 0.25~0.35 中雨(雪), 0.35~0.48大雨(雪), >0.48 暴雨(雪);
  • v2.4版本中,本地存在降水时,可以根据skycon(存在于realtime、hourly、daily字段),和skycon_08h_20h和skycon_20h_32h(存在于daily字段),中的:LIGHT_RAIN, MODERATE_RAIN, HEAVY_RAIN, STORM_RAIN(LIGHT_SNOW, MODERATE_SNOW, HEAVY_SNOW,STORM_SNOW)直接获取降水等级
  • 大暴雨(雪)和特大暴雨(雪),需要根据24小时累计公制降水量(mm/24hr)来判断,研发中...