bsrn.dataset.BSRNDataset.from_file#

classmethod BSRNDataset.from_file(path, include_lrs=None, strict=False)[source]#

Parse a BSRN .dat.gz station-to-archive file and return a fully validated BSRNDataset.

Parameters:
  • path (str or Path) – Path to the .dat.gz file (filename format XXXMMYY.dat.gz).

  • include_lrs (sequence of str or 'all', optional) – Logical records to parse. Supports 'lr0100' (required), 'lr0300', 'lr4000', and 'lr0001'. Default None parses all supported records.

  • strict (bool, optional) – Passed to read_bsrn_archive(). If True, malformed optional LR blocks raise. If False (default), malformed optional LRs are returned as None.

Return type:

BSRNDataset

Raises: