BSRNDataset#

The central data object for one monthly BSRN station file. BSRNDataset wraps station identity, validated Pydantic logical records (LR0100, LR0300, LR4000), and auto-resolved metadata into a single typed model.

Pipeline methods delegate to the existing standalone functions so both the object-oriented and functional APIs remain available.

Minute-level columns come from data(): call ds.data() for LR0100 means only, or pass include for optional LR0300 / LR4000 fields.

bsrn.dataset.BSRNDataset(*, station_code, ...)

One monthly BSRN dataset: station identity and minute data.

Construction#

bsrn.dataset.BSRNDataset.from_file(path[, ...])

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

Data access#

bsrn.dataset.BSRNDataset.data([include])

Minute-resolution DataFrame derived from lr0100.

Pipeline methods#

bsrn.dataset.BSRNDataset.solpos()

Add solar position and extraterrestrial irradiance columns to the cached data() frame.

bsrn.dataset.BSRNDataset.clear_sky([model, ...])

Add clear-sky irradiance columns to the cached data() frame.

bsrn.dataset.BSRNDataset.qc_test([tests])

Run QC tests and add flag columns to the cached data() frame.

bsrn.dataset.BSRNDataset.qc_mask([flag_remove])

Set irradiance values to NaN where QC flags fail; optionally drop flag columns.

bsrn.dataset.BSRNDataset.average(freq[, ...])

Time-average the cached data() with explicit labeled windows.

Plotting#

You can quickly generate plots directly from the dataset.

bsrn.dataset.BSRNDataset.plot

Accessor for built-in plotting routines.

bsrn.dataset.BSRNPlot(ds)

Visualization accessor for BSRNDataset.

bsrn.dataset.BSRNPlot.daily(dates[, output_file])

Plot daily time series (day or booklet mode from dates).

bsrn.dataset.BSRNPlot.table([output_file, title])

Plot the QC results summary table.