bsrn.io.nsrdb.check_nsrdb_availability#

bsrn.io.nsrdb.check_nsrdb_availability(stations, username, password, variant='conus')[source]#

Check which BSRN stations are geographically covered by an NSRDB variant and have BSRN archive files overlapping the variant’s year range. 检查哪些 BSRN 站点在 NSRDB 变体的地理覆盖范围内,**且**其 BSRN 存档文件 与变体的年份范围存在交集。

Workflow: 1. Filter stations by spatial coverage (bbox + satellite disk). 2. Query BSRN FTP for the covered subset to obtain file inventories. 3. Extract years from filenames and intersect with the variant’s year range.

Parameters:
  • stations (list of str) – BSRN station codes to check (e.g. ['BIL', 'BON', 'DRA']). 要检查的 BSRN 站点代码。

  • username (str) – BSRN FTP username. BSRN FTP 用户名。

  • password (str) – BSRN FTP password. BSRN FTP 密码。

  • variant (str, default "conus") – NSRDB variant name: ‘conus’, ‘full-disc’, or ‘aggregated’. NSRDB 变体名称。

Returns:

availability – A dictionary mapping station codes to availability metadata: {station_code: {'years': [list of years], 'months': [list of (y,m) tuples]}}. years is used for bulk API downloads, and months for monthly parquet writing. Stations with no overlap are omitted. {站点代码: {'years': [年份列表], 'months': [(年, 月) 元组列表]}}years 用于批量下载,months 用于生成月度 parquet。无交集站点被省略。

Return type:

dict

Raises:

ValueError – If variant is not a recognised NSRDB variant name. variant 不是已知的 NSRDB 变体名称时。