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.
CRS provides all-sky satellite-derived irradiances (not a clear-sky model like McClear). Requests use
time_ref=UTandverbose=false(fixed; not configurable). Parsed frame contains only UTC index and all-skyghi_crs,bni_crs,dhi_crs[W/m²] (other SoDa fields are dropped). Location and start are validated by_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.
elev (float, optional) – Station elevation [m]. If None, use SoDa default terrain lookup (-999).
summarization (str, default "PT01H") – ISO-8601 duration for temporal aggregation (e.g., “PT01M”, “PT15M”, “PT01H”).
timeout (int, default 30) – HTTP request timeout in seconds.
- Returns:
data – Columns ghi_crs, bni_crs, dhi_crs only; UTC DatetimeIndex.
- Return type:
pd.DataFrame
- Raises:
requests.HTTPError – SoDa returned a non-success HTTP status (often with ows:ExceptionText in the body).
ValueError – Coverage or start failed _check_crs_coverage, XML instead of CSV, parse error, or empty data.
References