From 35529a7c1776217d72ae59b40ab99227fd1ebad0 Mon Sep 17 00:00:00 2001 From: mgrover1 Date: Tue, 31 Oct 2023 16:21:24 -0500 Subject: [PATCH] FIX: Fix when sweep_name is an empty attribute --- pyart/io/cfradial.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyart/io/cfradial.py b/pyart/io/cfradial.py index 1ecb7d09dc..b9022c2659 100644 --- a/pyart/io/cfradial.py +++ b/pyart/io/cfradial.py @@ -192,7 +192,9 @@ def read_cfradial( ray_angle_res = None # Uses ARM scan name if present. - if hasattr(ncobj, "scan_name"): + if not hasattr(ncobj, "scan_name"): + ncobj.scan_name = "" + elif len(ncobj.scan_name) > 0: mode = ncobj.scan_name else: # first sweep mode determines scan_type