Package Overview#

bsrn is a Python package designed for the Baseline Surface Radiation Network (BSRN). It provides a comprehensive suite of tools for researchers and practitioners working with high-quality surface radiation measurements.

Modules#

The package is organized into several key modules:

  • bsrn.archive: Logical-record (LR) specs, validation, and formatting for station-to-archive .dat output; see Station-to-archive (LR).

  • bsrn.io: BSRN station-to-archive reader, FTP retrieval, and remote fetchers (SoDa McClear / CAMS CRS, MERRA-2 on Hugging Face); see I/O Operations.

  • bsrn.qc: A multi-level quality control pipeline (see Quality control, step by step (QIQ March)).

  • bsrn.modeling: Clear-sky modeling and detection algorithms.

  • bsrn.physics: Fundamental solar position and astronomical calculations.

  • bsrn.visualization: Tools for visualizing solar data and QC results.

  • bsrn.utils: Utility functions for data manipulation and analysis (including pretty_average() for LR0100-style averaging; see Time Averaging of 1-min Data (floor / ceiling / center)).

Data Pipeline#

Typical workflows in bsrn involve:

  1. Reading: Loading raw BSRN data into pandas DataFrames.

  2. Modeling: Generating clear-sky expectations using atmospheric data.

  3. Quality Control: Applying automated tests to identify questionable data points.

  4. Analysis: Performing high-level research tasks like clear-sky detection or irradiance separation.

  5. Visualization: Creating publication-quality plots.