radarx.retrieve.dsd_bayes.dsd_prior#

radarx.retrieve.dsd_bayes.dsd_prior(source='generic', *, weights=None, defensive=0.01, bandwidth=None)[source]#

Prior of the Bayesian DSD retrieval on its (Dm, mu) grid.

Parameters:
  • source ({"generic", "perils2022"} or xarray.Dataset, optional) – A packaged prior (see radarx.retrieve.dsd_bayes), or DSD parameters to learn one from: a Dataset with NW (m-3 mm-1), DM (mm) and MU on any dimensions, e.g. the output of radarx.retrieve.fit_gamma_moments() applied to disdrometer spectra (ideally matched to the radar beam along the fall trajectories). Default "generic".

  • weights (array-like or xarray.DataArray, optional) – Weights of the samples of a learned prior. Default: equal.

  • defensive (float, optional) – Weight of the generic prior mixed into a learned one, so that DSDs absent from the training data stay possible. Default 0.01.

  • bandwidth ((float, float), optional) – Kernel widths in \(D_m\) (mm) and \(\mu\) of a learned prior. Default: Scott’s rule, at least one grid step.

Returns:

xarray.Dataset – On dm and mu: prior_mass (sums to one), and the mean log10_nw_mean and standard deviation log10_nw_sd of the Gaussian prior of \(\log_{10} N_w\) at each node. It can be passed as prior to dsd_bayesian().

Notes

"generic" is a radarx choice centred on the \(\mu\)-\(\Lambda\) relation of Cao et al. (2008, Eq. 7) and broad around the statistics of Bringi et al. (2003); a learned prior is a kernel density estimate with Scott’s rule (Scott 1992). See radarx.retrieve.dsd_bayes; the prior of Cao et al. (2010) is instead the histogram of 2DVD fits.

Dask. This function computes the dask array: it works on small in-memory data. The input is loaded into memory and the result is held in memory.

References

Cao, Q., G. Zhang, E. Brandes, T. Schuur, A. Ryzhkov, and K. Ikeda, 2008: Analysis of video disdrometer and polarimetric radar data to characterize rain microphysics in Oklahoma. J. Appl. Meteor. Climatol., 47 (8), 2238-2255, https://doi.org/10.1175/2008JAMC1732.1

Bringi, V. N., V. Chandrasekar, J. Hubbert, E. Gorgucci, W. L. Randeu, and M. Schoenhuber, 2003: Raindrop size distribution in different climatic regimes from disdrometer and dual-polarized radar analysis. J. Atmos. Sci., 60 (2), 354-365, https://doi.org/10.1175/1520-0469(2003)060<0354:RSDIDC>2.0.CO;2

Cao, Q., G. Zhang, E. Brandes, and T. Schuur, 2010: Polarimetric radar rain estimation through retrieval of drop size distribution using a Bayesian approach. J. Appl. Meteor. Climatol., 49 (5), 973-990, https://doi.org/10.1175/2009JAMC2227.1

Scott, D. W., 1992: Multivariate Density Estimation: Theory, Practice, and Visualization. Wiley, 317 pp., https://doi.org/10.1002/9780470316849

Dawson, D., M. Biggerstaff, and S. Waugh, 2025: PERiLS_2022: Portable In Situ Precipitation Stations (PIPS) Data. Version 1.0. NSF NCAR Earth Observing Laboratory, https://doi.org/10.26023/HFBG-7W5M-WA00

Kosiba, K. A., and Coauthors, 2024: The Propagation, Evolution, and Rotation in Linear Storms (PERiLS) Project. Bull. Amer. Meteor. Soc., 105, E1768-E1799, https://doi.org/10.1175/BAMS-D-22-0064.1

The "perils2022" prior was learned from the PIPS spectra of the first of these data sets, with no quality control beyond the processing of the drop size distributions in that data set.

Examples

>>> fits = radarx.retrieve.fit_gamma_moments(nd)
>>> prior = dsd_prior(fits)