Skip to content

Commit

Permalink
ENH: Add the proper elevation angle to fixed angle
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 committed Mar 14, 2024
1 parent 56a9ca1 commit 73f83c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/io/test_nexrad_level2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from collections import OrderedDict

import numpy as np
import pytest
import xarray

Expand All @@ -26,6 +27,7 @@ def test_open_nexradlevel2_datatree(nexradlevel2_files):
assert ds["DBZH"].shape == (720, 1832)
assert ds["DBZH"].dims == ("azimuth", "range")
assert int(ds.sweep_number.values) == 0
np.testing.assert_almost_equal(ds.sweep_fixed_angle.values, 0.4833984)


@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion xradar/io/backends/nexrad_level2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ def open_store_coordinates(self):
prt_mode = "not_set"
follow_mode = "not_set"

fixed_angle = self.root.msg_5["elevation_data"][self._group]
fixed_angle = self.root.msg_5["elevation_data"][self._group]["elevation_angle"]

coords = {
"azimuth": Variable((dim,), azimuth, get_azimuth_attrs(), encoding),
Expand Down

0 comments on commit 73f83c4

Please sign in to comment.