Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent array sizes between versions. #89

Open
john-a-m opened this issue May 3, 2024 · 0 comments
Open

Inconsistent array sizes between versions. #89

john-a-m opened this issue May 3, 2024 · 0 comments

Comments

@john-a-m
Copy link

john-a-m commented May 3, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant