Inconsistent array sizes between versions.
john-a-m opened this issue · 0 comments
john-a-m commented
I noticed that a change between 2024.4.0
and 2023.4.2
causes the following code to print out (857, 1988)
for 2023.4.2
and (857, 1989)
for 2024.4.0
. On the machine where I have 2023.4.2
installed I upgraded using pip3 install goes2go==2024.4.0
, however this did not fix the inconsistency. Which shape is right?
dataset = goes_latest(product="ABI-L2-RRQPEF", download=False, verbose=False)
satellite_height = dataset.goes_imager_projection.attrs["perspective_point_height"]
x_values = dataset.x.values
y_values = dataset.y.values
x_values *= satellite_height
y_values *= satellite_height
coord_ref_sys = CRS.from_cf(dataset.goes_imager_projection.attrs)
dataset.rio.write_crs(coord_ref_sys.to_string(), inplace=True)
dataset = dataset.rio.reproject("EPSG:4326")
dataset = dataset.rio.clip_box(
minx=-124.725839,
miny=24.498131,
maxx=-66.949895,
maxy=49.384358,
crs=4326
)
numpy_array = dataset[["RRQPE"]].to_array().to_numpy()[0]
print(numpy_array.shape)