Trying to work with some Nexrad data via AWS S3 and getting "year out of range" errors for older files when utilizing the Level2File class from MetPy.io.nexrad. Today's data works just fine.
from io import BytesIO
import boto3
from metpy.io import Level2File
s3 = boto3.resource('s3')
bucket = s3.Bucket('noaa-nexrad-level2')
for obj in bucket.objects.filter(Prefix="2013/05/31/KTLX/KTLX20130531_221445_V06.gz"):
print(obj.key)
data = obj.get()['Body'].read()
bytestream = BytesIO(obj.get()['Body'].read())
f = Level2File(bytestream)
gives ValueError: year 335010 is out of range. However, the same code works just fine for data from today:
from io import BytesIO
import boto3
from metpy.io import Level2File
s3 = boto3.resource('s3')
bucket = s3.Bucket('noaa-nexrad-level2')
for obj in bucket.objects.filter(Prefix="2019/06/26/KFTG/KFTG20190626_000349_V06"):
print(obj.key)
data = obj.get()['Body'].read()
bytestream = BytesIO(obj.get()['Body'].read())
f = Level2File(bytestream)
I haven't dug in to figure out if there is a specific date/time that this stops working.
Trying to work with some Nexrad data via AWS S3 and getting "year out of range" errors for older files when utilizing the Level2File class from MetPy.io.nexrad. Today's data works just fine.
gives
ValueError: year 335010 is out of range
. However, the same code works just fine for data from today:I haven't dug in to figure out if there is a specific date/time that this stops working.