Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Add the proper elevation angle to fixed angle #162

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* MNT: use CODECOV token ({pull}`155`) by [@kmuehlbauer](https://github.com/kmuehlbauer).
* MNT: fix path for notebook coverage ({pull}`157`) by [@kmuehlbauer](https://github.com/kmuehlbauer).
* ADD: NEXRAD Level2 structured reader ({pull}`158`) by [@kmuehlbauer](https://github.com/kmuehlbauer) and [@mgrover1](https://github.com/mgrover1).
* FIX: Add the proper elevation angle to fixed angle ({pull}`162`) by [@mgrover1](https://github.com/mgrover1).

## 0.4.3 (2024-02-24)

Expand Down
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