阿里云首页 数字地球引擎

城市未来7天精细化预报

本文介绍如何通过数字地球引擎 Java SDK调用StationDay方法获取数据。

前提条件

请仔细阅读通用流程文档中相关内容,了解代码操作步骤。

接口说明

接口说明:气象预测按天按站点查询

空间分辨率: 全国2000多站点

时间分辨率:48小时内逐3小时,48-72小时逐6小时,72-168小时逐12小时

更新频率:1次/天;北京时间20点

通用请求参数

名称

类型

示例值

描述

OrderId

String

aliyunape_meteor12_public_cn-*********

查看订单

Endpoint

String

aliyunape.aliyuncs.com

固定值,请勿修改为其他值

AccessKeyId

String

LT************C

用于标识用户

AccessKeySecret

String

k9*******************el

用于验证用户的密钥,必须保密

注意

以上提供的参数是针对数字地球引擎下所有产品都会用到的参数。

请求参数

参数名

是否必需

说明

备注

station

站点

54433

全国站点(入参单一站点)

代码示例

import com.aliyun.aliyunape20210908.Client;
import com.aliyun.aliyunape20210908.models.StationDayRequest;
import com.aliyun.aliyunape20210908.models.StationDayResponse;
import com.aliyun.teaopenapi.models.Config;

public class StationDay {
    /**
     * 城市未来7天精细化预报(YB-city7day-sj)
     * 按站点查询数据
     * 48小时内逐3小时,48-72小时逐6小时,72-168小时逐12小时
     * @param
     * @return
     */
    public static void main(String[] args) {

        StationDayRequest request = new StationDayRequest();
        request.setOrderId("aliyunape_meteor12_public_cn-********");
        request.setStation("57816");  //站点

        Config config = new Config();
        config.setEndpoint("aliyunape.aliyuncs.com");
        config.setAccessKeyId("LT*************C");
        config.setAccessKeySecret("j**********************SI");

        try {
            Client client = new Client(config);
            StationDayResponse response = client.stationDay(request);

            System.out.println("code:" + response.getBody().code);
            System.out.println("message:" + response.getBody().message);
            System.out.println("requestId:" + response.getBody().requestId);
            System.out.println("success:" + response.getBody().success);
            System.out.println("data:" + response.getBody().data);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

示例结果

code:200
message:操作成功
requestId:358FB738-BD36-5485-8C8E-3283762DBFEE
success:true
data:[{clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=02, min_tem_24h=999999.0, tem=14.9, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=1.1, forecast_time=20211018230000, wep_past_12h_level=2, win_level=1, wep_level=2, rhu=86.0, tem_level=4, win_d=135.0}, {clo_cov_low=95.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=02, min_tem_24h=999999.0, tem=15.0, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=1.1, forecast_time=20211019020000, wep_past_12h_level=2, win_level=1, wep_level=2, rhu=90.0, tem_level=4, win_d=154.0}, {clo_cov_low=86.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=02, min_tem_24h=999999.0, tem=16.7, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=86.0, win_pd_12h=999999.0, rhu_level=6, win_s=1.6, forecast_time=20211019050000, wep_past_12h_level=2, win_level=2, wep_level=2, rhu=90.0, tem_level=5, win_d=164.0}, {clo_cov_low=99.0, max_tem_24h=999999.0, avg_pre_12h=0.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=02, min_tem_24h=999999.0, tem=16.9, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=99.0, win_pd_12h=0.0, rhu_level=6, win_s=2.1, forecast_time=20211019080000, wep_past_12h_level=2, win_level=2, wep_level=2, rhu=89.0, tem_level=5, win_d=178.0}, {clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=02, min_tem_24h=999999.0, tem=17.2, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=4.4, forecast_time=20211019110000, wep_past_12h_level=2, win_level=3, wep_level=2, rhu=87.0, tem_level=5, win_d=182.0}, {clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=02, min_tem_24h=999999.0, tem=20.7, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=5.1, forecast_time=20211019140000, wep_past_12h_level=2, win_level=3, wep_level=2, rhu=86.0, tem_level=5, win_d=188.0}, {clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=20.3, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=07, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=5.3, forecast_time=20211019170000, wep_past_12h_level=3, win_level=3, wep_level=3, rhu=88.0, tem_level=5, win_d=170.0}, {clo_cov_low=100.0, max_tem_24h=20.8, avg_pre_12h=0.2, avg_pre_24h=0.2, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=14.3, tem=17.4, max_win_s_12h=1.0, start_forecast_time=20211018200000, pre=0.0, wep=07, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=4.0, rhu_level=6, win_s=5.6, forecast_time=20211019200000, wep_past_12h_level=3, win_level=4, wep_level=3, rhu=81.0, tem_level=5, win_d=168.0}, {clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=18.8, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=07, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=5.7, forecast_time=20211019230000, wep_past_12h_level=3, win_level=4, wep_level=3, rhu=93.0, tem_level=5, win_d=175.0}, {clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=20.2, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=07, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=5.8, forecast_time=20211020020000, wep_past_12h_level=3, win_level=4, wep_level=3, rhu=94.0, tem_level=5, win_d=183.0}, {clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=20.1, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=07, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=5.0, forecast_time=20211020050000, wep_past_12h_level=3, win_level=3, wep_level=3, rhu=94.0, tem_level=5, win_d=193.0}, {clo_cov_low=92.0, max_tem_24h=999999.0, avg_pre_12h=1.5, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=19.7, max_win_s_12h=1.0, start_forecast_time=20211018200000, pre=1.0, wep=08, station_id=57816, area_code=520115, clo_cov=93.0, win_pd_12h=4.0, rhu_level=6, win_s=0.8, forecast_time=20211020080000, wep_past_12h_level=3, win_level=1, wep_level=4, rhu=93.0, tem_level=5, win_d=222.0}, {clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=08, min_tem_24h=999999.0, tem=19.0, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=1.0, wep=08, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=1.7, forecast_time=20211020110000, wep_past_12h_level=4, win_level=2, wep_level=4, rhu=92.0, tem_level=5, win_d=335.0}, {clo_cov_low=97.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=08, min_tem_24h=999999.0, tem=17.2, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=3.0, wep=08, station_id=57816, area_code=520115, clo_cov=97.0, win_pd_12h=999999.0, rhu_level=6, win_s=4.5, forecast_time=20211020140000, wep_past_12h_level=4, win_level=3, wep_level=4, rhu=89.0, tem_level=5, win_d=6.0}, {clo_cov_low=97.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=16.7, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=07, station_id=57816, area_code=520115, clo_cov=97.0, win_pd_12h=999999.0, rhu_level=6, win_s=3.9, forecast_time=20211020170000, wep_past_12h_level=3, win_level=3, wep_level=3, rhu=87.0, tem_level=5, win_d=13.0}, {clo_cov_low=100.0, max_tem_24h=20.2, avg_pre_12h=5.1, avg_pre_24h=6.6, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=08, min_tem_24h=16.5, tem=16.5, max_win_s_12h=1.0, start_forecast_time=20211018200000, pre=1.0, wep=07, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=8.0, rhu_level=6, win_s=4.2, forecast_time=20211020200000, wep_past_12h_level=4, win_level=3, wep_level=3, rhu=81.0, tem_level=5, win_d=19.0}, {clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=13.3, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=1.0, wep=07, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=999999.0, rhu_level=6, win_s=3.1, forecast_time=20211021020000, wep_past_12h_level=3, win_level=2, wep_level=3, rhu=88.0, tem_level=4, win_d=16.0}, {clo_cov_low=100.0, max_tem_24h=999999.0, avg_pre_12h=8.5, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=08, min_tem_24h=999999.0, tem=12.4, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=3.0, wep=08, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=0.0, rhu_level=6, win_s=3.0, forecast_time=20211021080000, wep_past_12h_level=4, win_level=2, wep_level=4, rhu=89.0, tem_level=4, win_d=14.0}, {clo_cov_low=98.0, max_tem_24h=999999.0, avg_pre_12h=999999.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=12.9, max_win_s_12h=999999.0, start_forecast_time=20211018200000, pre=0.0, wep=07, station_id=57816, area_code=520115, clo_cov=98.0, win_pd_12h=999999.0, rhu_level=6, win_s=2.7, forecast_time=20211021140000, wep_past_12h_level=3, win_level=2, wep_level=3, rhu=90.0, tem_level=4, win_d=13.0}, {clo_cov_low=96.0, max_tem_24h=13.4, avg_pre_12h=0.2, avg_pre_24h=8.7, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=11.4, tem=13.1, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=96.0, win_pd_12h=0.0, rhu_level=6, win_s=2.0, forecast_time=20211021200000, wep_past_12h_level=3, win_level=2, wep_level=2, rhu=91.0, tem_level=4, win_d=29.0}, {clo_cov_low=55.0, max_tem_24h=999999.0, avg_pre_12h=0.2, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=10.0, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=74.0, win_pd_12h=0.0, rhu_level=6, win_s=2.9, forecast_time=20211022080000, wep_past_12h_level=3, win_level=2, wep_level=2, rhu=92.0, tem_level=4, win_d=63.0}, {clo_cov_low=96.0, max_tem_24h=11.1, avg_pre_12h=17.1, avg_pre_24h=17.3, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=09, min_tem_24h=9.1, tem=10.5, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=1.0, wep=07, station_id=57816, area_code=520115, clo_cov=96.0, win_pd_12h=0.0, rhu_level=6, win_s=2.3, forecast_time=20211022200000, wep_past_12h_level=5, win_level=2, wep_level=3, rhu=91.0, tem_level=4, win_d=69.0}, {clo_cov_low=99.0, max_tem_24h=999999.0, avg_pre_12h=6.1, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=08, min_tem_24h=999999.0, tem=9.7, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=3.0, wep=07, station_id=57816, area_code=520115, clo_cov=99.0, win_pd_12h=0.0, rhu_level=6, win_s=0.9, forecast_time=20211023080000, wep_past_12h_level=4, win_level=1, wep_level=3, rhu=90.0, tem_level=4, win_d=48.0}, {clo_cov_low=100.0, max_tem_24h=11.8, avg_pre_12h=0.0, avg_pre_24h=6.1, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=02, min_tem_24h=8.7, tem=11.2, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=100.0, win_pd_12h=0.0, rhu_level=6, win_s=1.7, forecast_time=20211023200000, wep_past_12h_level=2, win_level=2, wep_level=2, rhu=89.0, tem_level=4, win_d=51.0}, {clo_cov_low=94.0, max_tem_24h=999999.0, avg_pre_12h=0.0, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=02, min_tem_24h=999999.0, tem=9.9, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=0.0, wep=02, station_id=57816, area_code=520115, clo_cov=95.0, win_pd_12h=0.0, rhu_level=6, win_s=0.3, forecast_time=20211024080000, wep_past_12h_level=2, win_level=1, wep_level=2, rhu=91.0, tem_level=4, win_d=68.0}, {clo_cov_low=99.0, max_tem_24h=12.3, avg_pre_12h=0.6, avg_pre_24h=0.6, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=8.5, tem=11.4, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=0.0, wep=07, station_id=57816, area_code=520115, clo_cov=99.0, win_pd_12h=0.0, rhu_level=6, win_s=1.4, forecast_time=20211024200000, wep_past_12h_level=3, win_level=1, wep_level=3, rhu=92.0, tem_level=4, win_d=50.0}, {clo_cov_low=92.0, max_tem_24h=999999.0, avg_pre_12h=1.4, avg_pre_24h=999999.0, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=999999.0, tem=9.2, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=1.0, wep=07, station_id=57816, area_code=520115, clo_cov=92.0, win_pd_12h=0.0, rhu_level=6, win_s=0.4, forecast_time=20211025080000, wep_past_12h_level=3, win_level=1, wep_level=3, rhu=84.0, tem_level=4, win_d=19.0}, {clo_cov_low=88.0, max_tem_24h=12.3, avg_pre_12h=0.9, avg_pre_24h=2.3, alti=1223.0, dt=20211018, total=28, province=520000, wep_past_12h=07, min_tem_24h=8.3, tem=11.5, max_win_s_12h=0.0, start_forecast_time=20211018200000, pre=0.0, wep=07, station_id=57816, area_code=520115, clo_cov=88.0, win_pd_12h=0.0, rhu_level=6, win_s=1.8, forecast_time=20211025200000, wep_past_12h_level=3, win_level=2, wep_level=3, rhu=85.0, tem_level=4, win_d=14.0}]

data字段说明

字段

说明

单位

station_id

站点Id

area_code

区域编码

start_forecast_time

预报开始起报时次

yyyymmdd080000或yyyymmdd200000

forecast_time

预报时次

yyyymmddhh0000

alti

测站高度

tem

温度

摄氏度(℃)

tem_level

日间气温等级:1:极寒,2:寒冷,3:冷,4:凉爽,5:舒适,6:炎热,7:高温

rhu

相对湿度

百分率

rhu_level

日间相对湿度等级:1-极度干燥,2-重度干燥,3-干燥,4-舒适,5-湿润,6-潮湿

win_d

风向

win_s

风速

m/s(米/秒)

win_level

日间风速等级:0-轻风,风力1-2级;1-微风,风力3级;1-和风,风力4级;2-劲风,风力5级;3-强风,风力6级;4-疾风,风力7级;5-大风,风力8级;6-烈风,风力9级;7-狂风,风力10级;8-暴风,风力11级;9-飓风,风力12级以上

pre

预报降水量

毫米

clo_cov

低云量

百分率

clo_cov_low

低云量(百分率)

百分率

wep

天气现象

wep_level

天气等级描述,1:优;2:良;3:中等;4:差;5:劣

max_tem_24h

过去24小时最高气温

摄氏度(℃)

min_tem_24h

过去24小时最低气温

摄氏度(℃)

avg_pre_24h

过去24小时降水量

毫米

avg_pre_12h

过去12小时降水量

毫米

wep_past_12h

12小时内天气现象

wep_past_12h_level

天气等级描述,1:优;2:良;3:中等;4:差;5:劣

max_win_s_12h

12小时内最大风速

m/s(米/秒)

win_pd_12h

12小时内盛行风向

dt

起报时

yyyymmdd

province

省级编码