Predicting liquid droplets in mixed-phase clouds beyond lidar attenuation using artificial neural nets and Doppler cloud radar spectra
VOODOO is a machine learning approach based convolutional neural networks (CNN) to relate Doppler spectra morphologies to the presence of (supercooled) liquid cloud droplets in mixed-phase clouds.
VoodooNet requires Python 3.10 or newer.
Before installing VoodooNet, install PyTorch according to your infrastructure. Otherwise pip installs the default PyTorch build, which on Linux includes CUDA libraries and is several gigabytes. For example on a Linux machine without GPU you might run:
pip3 install torch --extra-index-url https://download.pytorch.org/whl/cpupip3 install voodoonetTo log training runs with Weights & Biases, install the train extra:
pip3 install voodoonet[train]pip3 install -e .[dev]If you wish to acknowledge VoodooNet in your publication, please cite:
Schimmel et al. (2022). Identifying cloud droplets beyond lidar attenuation from vertically pointing cloud radar observations using artificial neural networks. Atmos. Meas. Tech., 15(18), 5343–5366. https://doi.org/10.5194/amt-15-5343-2022
import glob
import voodoonet
rpg_files = glob.glob('/path/to/rpg/files/*.LV0')
probability_liquid = voodoonet.infer(rpg_files)You can for example plot the resulting liquid probability:
import matplotlib.pyplot as plt
plt.pcolor(probability_liquid.T)
plt.show()Download some RPG-FMCW-94 raw files and corresponding classification files from the Cloudnet data portal using cloudnet-api-client, which is installed with voodoonet. For example, for Leipzig LIM on 2021-01-10:
import voodoonet
from cloudnet_api_client import APIClient
client = APIClient()
rpg_meta = client.raw_files(
site_id="leipzig-lim",
instrument_id="rpg-fmcw-94",
filename_suffix=".LV0",
date="2021-01-10",
)
classification_meta = client.files(
site_id="leipzig-lim",
product_id="classification",
date="2021-01-10",
)
rpg_files = client.download(rpg_meta, "data/")
classification_files = client.download(classification_meta, "data/")
voodoonet.generate_training_data(rpg_files, classification_files, 'training-data-set.pt')Alternatively, just use N random days from a site. Files are downloaded into download_dir (default cloudnet-data) and reused on subsequent runs:
import voodoonet
voodoonet.generate_training_data_for_cloudnet('leipzig-lim', 'training-data-set.pt', n_days=5)import voodoonet
pre_computed_training_data_set = 'training-data-set.pt'
voodoonet.train(pre_computed_training_data_set, 'trained-model.pt')import glob
import voodoonet
from voodoonet.utils import VoodooOptions
rpg_files = glob.glob('/path/to/rpg/files/*.LV0')
options = VoodooOptions(trained_model='trained-model.pt')
probability_liquid = voodoonet.infer(rpg_files, options=options)
