bsrn.io.nsrdb.download_nsrdb#

bsrn.io.nsrdb.download_nsrdb(latitude, longitude, year, api_key, email, variant='conus', timeout=120)[source]#

Download NSRDB data from NLR API. 从 NLR API 下载 NSRDB 数据。

Parameters:
  • latitude (float) – Site latitude [degrees]. 站点纬度 [度]。

  • longitude (float) – Site longitude [degrees]. 站点经度 [度]。

  • year (int) – Calendar year to download. 要下载的公历年份。

  • api_key (str) – NLR developer API key. NLR 开发者 API 密钥。

  • email (str) – User email registered with the API. 在 API 注册的用户邮箱。

  • variant (str, default "conus") – NSRDB variant name (see NSRDB_VARIANTS). NSRDB 变体名称(见 NSRDB_VARIANTS)。

  • timeout (int, default 120) – HTTP request timeout [s]. HTTP 请求超时 [秒]。

Returns:

df – NSRDB irradiance columns for the requested year. 所请求 year 的 NSRDB 辐照度列。

Return type:

pd.DataFrame

Raises:
  • ValueError – If year is outside the variant’s year range. / year 超出变体的年份范围时。

  • ValueError – If the location is not within the variant’s spatial coverage. 位置不在变体空间覆盖范围内时。

References