Skip to content

Commit

Permalink
FIX: correct retrieval of intermediate records in nexrad level2 reader (
Browse files Browse the repository at this point in the history
#261)

* FIX: correct retrieval of intermediate records in nexrad level2 reader
* fix/add history.md entry
  • Loading branch information
kmuehlbauer authored Feb 4, 2025
1 parent 4c68528 commit f38de38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* FIX: Correctly read transition rays in RHI scans ({issue}`247`) ({pull}`250`) by [@rcjackson](https://github.com/rcjackson)
* FIX: Correctly open NEXRAD files when split cut mode is enable ({issue} `245`) ({pull}`246`) by [@aladinor](https://github.com/aladinor)
* ADD: Example Notebook for assigning geocoords. ({issue}`243`) and ({pull}`251`) by [@syedhamidali](https://github.com/syedhamidali)
* FIX: DataTree reader now works with sweeps containing different variables ({pull}`252`) by [@egouden](https://github.com/egouden).
* FIX: Correct retrieval of intermediate records in nexrad level2 reader ({issue}`259`) ({pull}`261`) by [@kmuehlbauer](https://github.com/kmuehlbauer).

## 0.8.0 (2024-11-04)

Expand Down
8 changes: 7 additions & 1 deletion xradar/io/backends/nexrad_level2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,11 +1238,17 @@ def __init__(self, datastore, name, var):
self.group = datastore._group
self.name = name
# get rays and bins
# retrieve number of intermediate records between record_number and record_end
intermediate = [
0
for irec in datastore.ds["intermediate_records"]
if irec["record_number"] <= datastore.ds["record_end"]
]
nrays = (
datastore.ds["record_end"]
- datastore.ds["record_number"]
+ 1
- len(datastore.ds["intermediate_records"])
- len(intermediate)
)
nbins = max([v["ngates"] for k, v in datastore.ds["sweep_data"].items()])
word_size = datastore.ds["sweep_data"][name]["word_size"]
Expand Down

0 comments on commit f38de38

Please sign in to comment.