bsrn.io.merra2.fetch_rest2#

bsrn.io.merra2.fetch_rest2(index, station_code)[source]#

Fetch MERRA-2 from Hugging Face and return REST2-ready inputs aligned to target index. Parallel to fetch_mcclear; both return aligned clear-sky inputs. 从 Hugging Face 获取 MERRA-2 并返回对齐到目标索引的 REST2 就绪输入。与 fetch_mcclear 对应。

Parameters:
  • index (pd.DatetimeIndex) – Target time index to align REST2 outputs to. 需要对齐的目标时间索引。

  • station_code (str) – BSRN station code (e.g. “QIQ”). BSRN 站点代码(如 “QIQ”)。

Returns:

aligned – REST2 inputs reindexed to index with columns PS, ALBEDO, ALPHA, BETA, TO3, TQV. 重新索引到 index 的 REST2 输入,含 PS、ALBEDO、ALPHA、BETA、TO3、TQV 列。

Return type:

pd.DataFrame

Raises:
  • ValueError – If index is not a DatetimeIndex or is empty. index 非 DatetimeIndex 或为空时。

  • FileNotFoundError – If a required monthly parquet is missing on Hugging Face. Hugging Face 上缺少所需月度 parquet 时。