Reading NEXRAD Level II data fails when using S3 or fsspec cached files.
Example (fails):
import fsspec
import xradar as xd
file = (
"unidata-nexrad-level2/2013/05/20/"
"KTLX/KTLX20130520_201643_V06.gz"
)
local_file = fsspec.open_local(
f"simplecache::s3://{file}",
s3={"anon": True},
filecache={"cache_storage": "./cache"},
)
dtree = xd.io.open_nexradlevel2_datatree(local_file)
Also fails with direct S3 access:
file = (
"noaa-nexrad-level2/2013/05/20/"
"KTLX/KTLX20130520_201643_V06"
)
dtree = xd.io.open_nexradlevel2_datatree(
f"s3://{file}",
storage_options={"anon": True},
)
Error
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Occurs in init_next_record because record_number is None.
⸻
Environment
- xradar 0.2.2
- Python 3.12
- fsspec + s3fs latest
⸻
Notes
- File downloads correctly, issue happens during parsing
- Same file works when converted to CfRadial and opened with open_cfradial1_datatree
⸻
Reading NEXRAD Level II data fails when using S3 or fsspec cached files.
Example (fails):
Also fails with direct S3 access:
Error
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Occurs in init_next_record because record_number is None.
⸻
Environment
⸻
Notes
⸻