Skip to content

Commit

Permalink
FIX: Add the proper elevation angle to fixed angle (#162)
Browse files Browse the repository at this point in the history
* ENH: Add the proper elevation angle to fixed angle

* ADD: Add proper addition to the history file
  • Loading branch information
mgrover1 authored Mar 14, 2024
1 parent 56a9ca1 commit 0145954
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
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

0 comments on commit 0145954

Please sign in to comment.