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.datoutput; see Station-to-archive (LR) and Writing a station-to-archive .dat file.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 (includingpretty_average()for LR0100-style averaging; see Time Averaging of 1-min Data (floor / ceiling / center)).
Data Pipeline#
Typical workflows in bsrn involve:
Reading: Loading raw BSRN data into pandas DataFrames.
Modeling: Generating clear-sky expectations using atmospheric data.
Quality Control: Applying automated tests to identify questionable data points.
Analysis: Performing high-level research tasks like clear-sky detection or irradiance separation.
Visualization: Creating publication-quality plots.