GET https://contrails.googleapis.com/v2/detections/masks:以 NetCDF4 格式获取凝结尾迹检测掩码。
如果成功,响应将是凝结尾迹检测掩码的 NetCDF。
查询参数
| 参数 | |
|---|---|
start_time |
必需。请求的开始时间。 格式:ISO 8601 日期时间字符串 示例: |
end_time |
必需。请求的结束时间(含边界值)。请注意, 格式:ISO 8601 日期时间字符串 示例: |
satellite_origin |
可选。有效值为 格式:字符串 示例: |
示例
如需从卫星检索特定时间点的检测掩码,请执行以下操作:
response = requests.get( url="https://contrails.googleapis.com/v2/detections/masks", params={"start_time": "2026-04-10T00:00:00Z", "end_time": "2026-04-10T01:00:00Z", "satellite_origin": "MTG-000-FULL-DISK"}, headers={"x-goog-api-key": API_KEY}, )或在 C网址 中:
curl "https://contrails.sandbox.googleapis.com/v2/detections/masks?\ key=API_KEY&\ start_time=2026-04-10T00:00:00Z&\ end_time=2026-04-10T01:00:00Z&\ satellite_origin=MTG-000-FULL-DISK"如果使用 xarray 加载,此请求会返回以下数据集:
维度:(时间:6,y:5568,x:5568) 坐标 名称 维度 数据类型 值 时间 (时间) datetime64[ns] 2026-04-10T00:00:07 ... 2026-04-10T00:50:07 y (y) float32 5.569e+06 5.567e+06 ... -5.569e+06 x (x) float32 -5.569e+06 -5.567e+06 ... 5.569e+06 数据变量 掩盖 (time, y, x) float32 0.0 0.0 0.0 0.0 ... 0.0 ... 投影 () DataArray +proj=geos +lon_0=0 +h=35786400 +x_0=0 +y_0=0 +a=6378137 +b=6356752.3 +units=m +no_defs 请注意,
projection的格式为 pyproj.Proj 对象的字符串形式。projection可用于在地图 x、y 坐标与经度、纬度坐标之间进行转换。