Waggle Sensor Plugin for the OTT Parsivel2 - Laser Disdrometer.
The plugin establishes a serial connection wtih the Parsivel2, writes data at user defined frequencies to a local file, and uploads to Beehive via the Waggle Plugin.
The OTT Parsivel2 is a laser disdrometer which is capable of measuring all types of preciptiation. The Parsivel2 classifies hydrometeors into 32 separate size and velocity classes, allowing users to calculate the type, amount, and intensity of preciptiation. From this particle size distribution, users are capable of calculating the equivalent radar reflectivity factor, among other parameters, to investigate microphyiscal characteristics of precipitation.
To execute the plugin use the following workflow:
A environment.yml file has been included within this repository to allow users to reproduce the application's conda environment.
conda env create -f environment.ymlconda activate waggle_parsivelPySerial offers a handy toolist to list all serial ports currently in use. To determine the port for the instrument, run:
python -m serial.tools.list_portsOtherwise, check USB devices locally:
ls -lh /dev/ttyUSB*The default serial settings for the OTT Parsivel2 are
- Baud Rate = 19200
- Data Bits = 8
- Parity = None
- Stop Bits = 1
To execute the OTT Parsivel2 I/O Plugin:
- Before deploying the plugin locally on the waggle node, pull any recent changes and build the image
cd waggle-parsivel-io
sudo pluginctl build .- Next, deploy the plugin via
pluginctl
sudo pluginctl deploy -n parsivel --selector zone=core --privileged 10.31.81.1:5000/local/waggle-parsivel-io- Verify the image deployed successfully
sudo pluginctl ps- To change the default serial device:
sudo pluginctl deploy -n parsivel --selector zone=core --privileged 10.31.81.1:5000/local/waggle-parsivel-io -- --device /dev/ttyUSB5- To enable printing information to screen:
sudo pluginctl deploy -n parsivel --selector zone=core --privileged 10.31.81.1:5000/local/waggle-parsivel-io -- --verbose- To change the frequency of file generation to hourly:
sudo pluginctl deploy -n parsivel --selector zone=core --privileged 10.31.81.1:5000/local/waggle-parsivel-io -- --freq 60If utilizing a local computer and not the Waggle node, reference the application directly
python app.py --device "/dev/ttyUSB5" --verboseimport sage_data_client
df = sage_data_client.query(
start="2025-02-12T16:00:00Z",
end="2025-02-12T17:00:00.000Z",
filter={
"plugin": "10.31.81.1:5000/local/waggle-parsivel-io.*",
"vsn": "W09F"
}
)name: atmos-parsivel
plugins:
- name: waggle-parsivel-io
pluginSpec:
image: registry.sagecontinuum.org/jrobrien/waggle-parsivel-io:0.25.02.04
args:
- --device
- /dev/ttyUSB5
privileged: true
selector:
zone: core
nodeTags: []
nodes:
W09F: true
scienceRules:
- 'schedule("waggle-parsivel-io"): cronjob("waggle-parsivel-io", "*/10 * * * *")'
successCriteria:
- WallClock('1day')