Skip to content

Commit e1e56f4

Browse files
committed
ENH: improved error message in hydrometeor calculation
1 parent d5378ec commit e1e56f4

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/pyrad_proc/pyrad/proc/process_echoclass.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,13 +1612,20 @@ def process_hydroclass(procstatus, dscfg, radar_list=None):
16121612

16131613
if (
16141614
(refl_field not in radar.fields)
1615-
or (zdr_field not in radar.fields)
1616-
or (rhv_field not in radar.fields)
1617-
or (kdp_field not in radar.fields)
16181615
):
1619-
warn("Unable to create hydrometeor classification field. " + "Missing data")
1616+
warn("Unable to create hydrometeor classification field. " + "Missing dBZ field")
16201617
return None, None
1621-
1618+
if (
1619+
(rhv_field not in radar.fields)
1620+
):
1621+
warn("Unable to create hydrometeor classification field. " + "Missing RhoHV field")
1622+
return None, None
1623+
if (
1624+
(kdp_field not in radar.fields)
1625+
):
1626+
warn("Unable to create hydrometeor classification field. " + "Missing KDP field")
1627+
return None, None
1628+
16221629
# user defined parameters
16231630
centroids_file = dscfg.get("centroids_file", None)
16241631
compute_entropy = dscfg.get("compute_entropy", False)

0 commit comments

Comments
 (0)