util.coordinates: remove broken dist_to_coast function#840
util.coordinates: remove broken dist_to_coast function#840emanuel-schmid merged 7 commits intodevelopfrom
Conversation
peanutfun
left a comment
There was a problem hiding this comment.
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 <[email protected]>
tovogt
left a comment
There was a problem hiding this comment.
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 <[email protected]> * 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 <[email protected]>
Changes proposed in this PR:
Centroids.set_dist_coastto 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_coastfunction 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