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
Reuse same resampler for similar datasets #213
Conversation
1 similar comment
satpy/readers/aapp_l1b.py
Outdated
@@ -54,7 +55,7 @@ | |||
|
|||
|
|||
def create_xarray(arr): | |||
res = da.from_array(arr, chunks=(1000, 1000)) | |||
res = da.from_array(arr, chunks=(CHUNK_SIZE, CHUNK_SIZE)) | |||
res = xr.DataArray(res, dims=['y', 'x'], | |||
coords=[np.arange(res.shape[0]), | |||
np.arange(res.shape[1])]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't xarray create these coordinates on the fly if needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no unfortunately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coordinates could be da.arange
though, right? Plus since these are just aranges I don't think anything would use them. If you did operations with a non-coords array that had y/x dimensions and one that did I think it fills in the blanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Provide better mechanism for using the same resampler over multiple datasets
git diff origin/develop **/*py | flake8 --diff