Merged
Conversation
OnnoEbbens
requested changes
Jun 12, 2024
Collaborator
OnnoEbbens
left a comment
There was a problem hiding this comment.
Nice! Only some small comments from me
nlmod/dims/resample.py
Outdated
|
|
||
|
|
||
| def get_delr(ds): | ||
| """Get the distance along rows (delr) fromythe x-coordinate of a model dataset""" |
Collaborator
There was a problem hiding this comment.
Can you make a full docstring with in-and output types?
nlmod/dims/resample.py
Outdated
| """Get the distance along columns (delr) from the x-coordinate of a model dataset""" | ||
| assert ds.gridtype == "structured" | ||
| y = (ds.extent[3] - ds.y).values | ||
| delc = _get_delr_from_x(y) |
Collaborator
There was a problem hiding this comment.
Kind of counterintuitive to call _get_delr_from_x to get_delc_from_y. Maybe rename the private method to _get_delta_along_axis or something similar?
OnnoEbbens
approved these changes
Jun 13, 2024
1 task
This file contains hidden or 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
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 pull request remove delr and delc from ds. When needed, these variables can be calculated from extend, x and y. Also see issue #343.