Skip to content

Commit

Permalink
fix writing IRIS sigmet files to UF (#1216)
Browse files Browse the repository at this point in the history
  • Loading branch information
wx4stg authored Jul 23, 2022
1 parent 5ea116f commit 2b19cd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyart/io/uf_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ def _set_field_header(self):
range_start = self.radar.range['meters_to_center_of_first_gate']
range_start -= (range_step / 2.) # range bin center to edge
range_start_km, range_start_m = divmod(range_start, 1000)
if isinstance(range_start_m, np.ndarray):
range_start_m = range_start_m[0]
if isinstance(range_step, np.ndarray):
range_step = range_step[0]
header['range_start_km'] = int(range_start_km)
header['range_start_m'] = int(round(range_start_m))
header['range_spacing_m'] = int(round(range_step))
Expand Down

0 comments on commit 2b19cd6

Please sign in to comment.