-
Notifications
You must be signed in to change notification settings - Fork 18
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
Improve resample_in_space and rectify_dataset #1098
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
konstntokas
force-pushed
the
konstntokas-xxx-improve_resample_in_space
branch
from
December 23, 2024 11:36
b78cca8
to
92ffe7b
Compare
CI fails due to two tests failures in |
forman
approved these changes
Dec 27, 2024
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.
Great, thanks! Please take care of my suggestions, then merge.
konstntokas
force-pushed
the
konstntokas-xxx-improve_resample_in_space
branch
from
January 2, 2025 11:52
3f38055
to
27b4ae2
Compare
This was referenced Jan 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR improves the
resampling_in_space
method, if another CRS is required and therefore a reprojection needs to be done.The method
xcube.core.GridMapping.transform
now supports lazy execution. Ifcomputations based on actual data are required—such as determining whether the
grid mapping is regular or estimating the resolution in the x or y direction—only a
single chunk is accessed whenever possible, ensuring faster performance.
-> see large example
examples/notebooks/resampling/reproject_large_esa_cci_landcover.ipynb
execution time of cell 5 drops from 1.42min to ~800ms.The function
xcube.core.resampling.rectify_dataset
now supportsxarray.Datasets
containing multi-dimensional data variables structured as
var(..., y_dim, x_dim)
.The two spatial dimensions (
y_dim
andx_dim
) must occupy the last two positionsin the variable's dimensions.
-> see large example
examples/notebooks/resampling/reproject_large_esa_cci_landcover.ipynb
execution time of cell 6 drops from 4.51min to ~2.16ms, even though now 5 time steps are selected compared to just one.Checklist:
Add docstrings and API docs for any new/modified user-facing classes and functionsNew/modified features documented indocs/source/*
CHANGES.md