bsrn.io.crs.download_crs#

bsrn.io.crs.download_crs(latitude, longitude, start, end, email, elev=None, summarization='PT01H', timeout=30)[source]#

Download and parse CAMS Radiation Service (CRS) time series from SoDa. 从 SoDa 下载并解析 CAMS 辐射服务 (CRS) 时间序列。

CRS provides all-sky satellite-derived irradiances (not a clear-sky model like McClear). Requests use time_ref=UT and verbose=false (fixed; not configurable). Parsed frame contains only UTC index and all-sky ghi_crs, bni_crs, dhi_crs [W/m²] (other SoDa fields are dropped). Location and start are validated by _check_crs_coverage. CRS 提供**全天空**卫星反演辐照度(不同于 McClear 类晴空模型)。请求固定为 time_ref=UTverbose=false``(不可配置)。 解析结果仅含 UTC 索引与全天空 ``ghi_crsbni_crsdhi_crs [W/m²](其余 SoDa 列丢弃)。 地理位置与 start_check_crs_coverage 校验。

Parameters:
  • latitude (float) – Latitude in decimal degrees. [degrees] 十进制度纬度 [度]。

  • longitude (float) – Longitude in decimal degrees. [degrees] 十进制度经度 [度]。

  • start (datetime.datetime or pandas.Timestamp) – Start date (inclusive) of requested period. 请求时间段的起始日期(含)。

  • end (datetime.datetime or pandas.Timestamp) – End date (inclusive) of requested period. 请求时间段的结束日期(含)。

  • email (str) – SoDa account email. SoDa 账户邮箱。

  • elev (float, optional) – Station elevation [m]. If None, use SoDa default terrain lookup (-999). 站点海拔高度 [米]。若为 None 则使用 SoDa 默认地形查找 (-999)。

  • summarization (str, default "PT01H") – ISO-8601 duration for temporal aggregation (e.g., “PT01M”, “PT15M”, “PT01H”). 时间聚合的 ISO-8601 时长(如 “PT01M”、”PT15M”、”PT01H” 等)。

  • timeout (int, default 30) – HTTP request timeout in seconds. HTTP 请求超时时间(秒)。

Returns:

data – Columns ghi_crs, bni_crs, dhi_crs only; UTC DatetimeIndex. 仅列 ghi_crs、bni_crs、dhi_crs;UTC DatetimeIndex。

Return type:

pd.DataFrame

Raises:
  • requests.HTTPError – SoDa returned a non-success HTTP status (often with ows:ExceptionText in the body). SoDa 返回非成功 HTTP 状态(响应体常含 ows:ExceptionText)。

  • ValueError – Coverage or start failed _check_crs_coverage, XML instead of CSV, parse error, or empty data. _check_crs_coverage 校验、XML 非 CSV、解析失败或无数据时。

References