Skip to content

Commit

Permalink
FIX: Fix setting scan_mode when scan_name is empty (#1484)
Browse files Browse the repository at this point in the history
* FIX: Fix python version used in CI system

* FIX: Fix incorrect arg in ci workflow

* DEL: Remove pinning of libnetcdf

* FIX: Fix when sweep_name is an empty attribute

* FIX: Add more robust check
  • Loading branch information
mgrover1 committed Nov 2, 2023
1 parent 9ce78bf commit d58b687
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyart/io/cfradial.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,12 @@ def read_cfradial(
ray_angle_res = None

# Uses ARM scan name if present.
if hasattr(ncobj, "scan_name"):
mode = ncobj.scan_name
if not hasattr(ncobj, "scan_name"):
scan_name = ""
else:
scan_name = ncobj.scan_name
if len(scan_name) > 0:
mode = scan_name
else:
# first sweep mode determines scan_type
try:
Expand Down

0 comments on commit d58b687

Please sign in to comment.