Community-Built Software Ecosystem
The OpenSense Action’s Working Group 2 (WG2) developed a core open-source software ecosystem for the reproducible processing of opportunistic sensor (OS) rainfall data. This ecosystem was built upon common functionality extracted from pre-existing tools to ensure interoperability and adherence to the OpenSense data format standards defined by WG1.
The core software packages are:
- poligrain (https://github.com/OpenSenseAction/poligrain): This acts as the central software package in the ecosystem, designed to simplify common tasks when working with point, line, and gridded sensor data, primarily focusing on rainfall observations. Key features of poligrain include:
- Seamlessly plotting point, line, and grid data with a colorscale on maps.
- Calculating distances between data points or lines, and finding nearest neighbours.
- Providing validation plots and metrics.
- Fast calculation of grid and line intersections, which enables averaging weather radar data along a Commercial Microwave Link (CML) path.
- pycomlink (https://github.com/pycomlink/pycomlink): Although this Python package predates OpenSense, it is considered part of the software ecosystem because its data model served as the blueprint for the WG1 data format standards, ensuring high interoperability with poligrain. During the Action, the most widely used CML processing methods, such as the “nearby link approach,” were ported from the R package RAINLINK into pycomlink. Main features include:
- Wet-dry classification using several methods (e.g., standard deviation, SFTF, nearby link, MLP).
- Interfaces to pytorch and tensorflow for running trained models, currently applied to wet-dry classification, with future scope for direct rain rate estimation.
- Two different k-R relations and various Wet Antenna Attenuation (WAA) estimation methods.
- Detection of data gaps
- Spatial interpolation using Inverse Distance Weighting (IDW) and Kriging.
- pypwsqc (https://github.com/OpenSenseAction/pypwsqc): This new software package consolidates various quality control (QC) and bias correction methods specifically for Personal Weather Station (PWS) data, replacing fragmented R scripts and unmaintained Python code. The implementation achieved a significant speedup for the slowest QC filter. The current features include:
- Filters for faulty zero, high influx, and station outliers reimplemented based on the R code in PWSQC
- The indicator correlation filter was reimplemented based on pws-pyqc.
- A newly added peak removal filter.
- Bias correction methods using nearby stations or quantile mapping (currently in development).
- mergeplg (https://github.com/OpenSenseAction/mergeplg): Developed in collaboration with WG3, this Python package focuses on merging methods, particularly radar adjustment using both point data (gauges) and line data (CMLs). Key features include:
- Interpolation functions, including IDW, Ordinary Kriging, and Block Kriging, the latter designed to account for the line geometry of CMLs.
- Radar adjustment using either additive or multiplicative methods.
- Implementation of the RADOLAN method for merging radar, gauge, and CML data.
- Kriging with external drift for integrating radar, gauge, and CML data.
Software Sandbox
The OpenSense software sandbox (https://github.com/OpenSenseAction/OPENSENSE_sandbox) enables the online processing of data from opportunistic rainfall sensors using several software packages. It was developed within the OpenSense COST Action to showcase existing packages and open datasets in a single, reproducible environment. It can be run online via the service provided by Mybinder. The software sandbox predates the newly created OpenSense software ecosystem (see above) and was used to review and evaluate the state of existing available open-source implementations of methods.
The full description, details, and packages are available in the OpenSense Action sandbox GitHub, located here.
Repository
Repository with the material for the OpenSense training school 2023 on software and methods for data processing from opportunistic rainfall sensors (https://github.com/OpenSenseAction/training_school_opensene_2023).