-
Notifications
You must be signed in to change notification settings - Fork 128
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
util.coordinates: remove broken dist_to_coast function #840
Conversation
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.
Nice. While removing code is great, I would like to keep the public functions and add deprecation warnings. This way, we do not habe a major change following semantic versioning. I am fine with removing utm_zones
though, seems like a really obsolete function to me.
Co-authored-by: Lukas Riedel <34276446+peanutfun@users.noreply.github.com>
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.
I added dist_to_coast
, but would still opt to remove get_coastlines
since it's clearly a helper function for the distance computations.
Fix trailing whitespace
Many thanks! I'd suggest to wait with merging though until 5.0 🤔 |
Okay, this is ready to be merged. @emanuel-schmid If we merge this before CLIMADA-project/climada_petals#122 is merged, we can also ditch CLIMADA-project/climada_petals#106 and instead include the necessary changes directly in CLIMADA-project/climada_petals#122. That's a bit easier, since CLIMADA-project/climada_petals#106 is only about a few lines anyway, and all of the affected lines will also be affected by CLIMADA-project/climada_petals#122 |
…ct#840) * util.coordinates: remove dist_to_coast function * Update climada/hazard/centroids/centr.py Co-authored-by: Lukas Riedel <34276446+peanutfun@users.noreply.github.com> * u_coord: dist_to_coast as wrapper for dist_to_coast_nasa * Update climada/hazard/centroids/centr.py Fix trailing whitespace * Centroids.get_dist_coast: fix tests --------- Co-authored-by: Lukas Riedel <34276446+peanutfun@users.noreply.github.com>
Changes proposed in this PR:
Centroids.set_dist_coast
to avoid Persistent Wind Intensity Patterns in Historical Typhoon Tracks Beyond 180 Degrees Longitude #831 and similar issues with the implementation ofutil.coordinates.dist_to_coast
(it is also quite slow, actually).util.coordinates.dist_to_coast
function because it is now used nowhere.dist_to_coast
, further reducing the amount of code inutil.coordinates
.This PR fixes #831, see CLIMADA-project/climada_petals#106 for a follow-up PR in petals.
PR Author Checklist
develop
)PR Reviewer Checklist