ARM-DOE / pyart

The Python-ARM Radar Toolkit. A data model driven interactive toolkit for working with weather radar data.
https://arm-doe.github.io/pyart/
Other
516 stars 268 forks source link

Resolving Scan Type Discrepancies in CfRadial RHI Data Visualization #1533

Closed HappyXiaoAnAn closed 5 months ago

HappyXiaoAnAn commented 7 months ago

Description

I'm working with RHI data from a CfRadial format file. The data's radar.sweep_mode is 'rhi', yet the radar.scan_type is incorrectly marked as 'other'. This discrepancy causes errors when attempting to visualize the data using pyart.graph.RadarDisplay(radar).

The issue originates from https://github.com/ARM-DOE/pyart/blob/b54157f7e98243e914a586abae003278118492a2/pyart/io/cfradial.py#L200 and is related commit #1484 #1030.

My data's scan_name is 'PrecipRhi2', which fails to meet any criteria in the fallback types, resulting in the scan_type defaulting to 'other'.

Using scan_mode to determine scan_type seems inappropriate, as it leads to this type of error.

zssherman commented 7 months ago

@HappyXiaoAnAn Thanks for raising the issue! Yeah we are discussing on ways or how to approach this. The original intent was dealing with Atmospheric Radiation Measurement group radar files. We'll take a look and see how we can adjust this. For your case for now, you should be able to set:

radar.scan_type = 'rhi'

in the meantime before your plotting code.

HappyXiaoAnAn commented 7 months ago

Understood, that works. Looking forward to the upcoming adjustments and thanks for the interim solution!