radarx.retrieve.cloud_classification.classify_cloud_targets#
- radarx.retrieve.cloud_classification.classify_cloud_targets(obj, temperature=None, *, dbz=None, ldr=None, dfr=None, height=None, radar_height=None, melting_temperature=(0.0, 2.0), min_dbz=None, min_drizzle_dbz=-20.0, min_insect_ldr=-20.0, max_insect_dbz=10.0, min_large_dfr=3.0, n_threads=None, engine='auto')[source]#
Classify the echoes of a cloud radar into droplets, drizzle or rain, ice, melting ice and insects.
See
radarx.retrieve.cloud_classificationfor the classes and the rules.- Parameters:
obj (
xarray.DataArray,xarray.Datasetorxarray.DataTree) – The reflectivity (DataArray), a sweep or time-height section with it, or a volume withsweep_*groups (sweeps without a reflectivity are skipped).temperature (
str,float,xarray.DataArrayorxarray.Dataset, optional) – Air temperature of the gates: the name of a field (temperature,air_temperatureorTby default), a DataArray on the gates, a profile Dataset on aheightcoordinate (m above sea level) withtemperature(interpolated to the heights of the gates, seeheight), or a number (a constant temperature). Kelvin, or degrees Celsius if theunitsattribute says so (withoutunits, values below 150 are Celsius). Use the wet-bulb temperature to place the melting layer as Cloudnet does.dbz (
strorxarray.DataArray, optional) – The reflectivity in dBZ. Default:objitself for a DataArray, else the first ofDBZH,DBZ,reflectivity,Z,Zh.ldr (
strorxarray.DataArray, optional) – Linear depolarization ratio in dB, to find insects. DefaultNone: no insect class.dfr (
strorxarray.DataArray, optional) – Dual-frequency ratio in dB (radarx.retrieve.dual_frequency_ratio()) to tell large ice from ice. DefaultNone: no large-ice class.height (
strorxarray.DataArray, optional) – Height of the gates in m above sea level (a DataArray with arangedimension), for a temperature profile. Default: thebeam_height,heightorzof the data, else the 4/3 Earth model from theelevation(orzenith_angle).radar_height (
float, optional) – Radar altitude in m above sea level for the 4/3 Earth model.melting_temperature (
tupleoffloat, optional) – Lower and upper bound in degrees Celsius of the melting zone. Default(0.0, 2.0).min_dbz (
float, optional) – Smallest reflectivity (dBZ) of an echo. DefaultNone: every finite value.min_drizzle_dbz (
float, optional) – Smallest reflectivity (dBZ) of drizzle or rain. Default -20.min_insect_ldr (
float, optional) – Smallest depolarization ratio (dB) of insects;Noneturns the insect rule off. Default -20.max_insect_dbz (
float, optional) – Largest reflectivity (dBZ) of insects. Default 10.min_large_dfr (
float, optional) – Smallest dual-frequency ratio (dB) of large ice;Noneturns the rule off. Default 3.n_threads (
int, optional) – Threads of the compiled kernel. Default: all cores.engine (
{"auto", "compiled", "numpy"}, optional) – Implementation."auto"(default) prefers the compiled kernel.
- Returns:
xarray.DataArrayorxarray.DataTree–TARGET_CLASS(int8, codes in the table of the module and in theflag_valuesandflag_meaningsattributes) on the gates of the reflectivity. A volume gives a DataTree with the root of the input and one node per sweep.- Raises:
ValueError – For an unknown
engine, a melting zone that is not an increasing pair, or a profile withoutheight.KeyError – If the reflectivity or the temperature is not found.
ImportError – If
engine="compiled"and the kernel is not available.
References
Illingworth, A. J., et al., 2007: Cloudnet: Continuous evaluation of cloud profiles in seven operational models using ground-based observations. Bull. Amer. Meteor. Soc., 88, 883-898, https://doi.org/10.1175/BAMS-88-6-883
Tukiainen, S., E. O’Connor, and A. Korpinen, 2020: CloudnetPy: A Python package for processing cloud remote sensing data. J. Open Source Softw., 5, 2123, https://doi.org/10.21105/joss.02123
Examples
>>> cls = classify_cloud_targets(section, "temperature", ldr="ldr") >>> cls = section.radarx.classify_cloud_targets(model_profile, dfr=dfr)