Add functions to compute, plot, store the local hazard exceedence intensity and RP maps#857
Add functions to compute, plot, store the local hazard exceedence intensity and RP maps#857simonameiler wants to merge 14 commits intodevelopfrom
Conversation
… and local return period maps
| inten_stats[inten_stats < 0] = 0 | ||
| return inten_stats | ||
|
|
||
| def local_return_period(self, hazard_intensities): |
There was a problem hiding this comment.
This is a confusing method signature to me. Why would a method of the class Hazard require the user to supply hazard intensities? These are already an attribute of the object.
There was a problem hiding this comment.
Here the variable hazard_intensities does not refer to the intensities of the Hazard object but to the threshold intensities for which the return period per grid point should be calculated. To avoid confusion we could rename this to "threshold_intensities"?
There was a problem hiding this comment.
👍 threshold_intensities would be much better. 😄
| hazard_intensities : np.array | ||
| Hazard intensities to consider. |
There was a problem hiding this comment.
Be careful, this might lead to very large memory usage. Hazard intensities are on purpose sparse matrices.
There was a problem hiding this comment.
See comment above, hazard_intensities usually only includes a few values.
|
@simonameiler looks like the branch is not yet up to date with the develop branch and, e.g., changes from have been reversed. |
Thank you for the hint. I handed the pull request off to @ValentinGebhart |
|
I don't know how to resolve the issue that, even after merging develop back into this branch, many of the changes made to develop are not transferred here. One solution would be to create a new branch from develop (say "feature/write_haz_rp_maps2") and add the new functions again there. Do you think that this is fine or do you see a better solution? @emanuel-schmid @chahank |
|
@ValentinGebhart : keeping it simple is good to me, so just making a new branch is fine for me. Just then delete the old one. |
|
PR completed in a different branch (PR #898). I saved a local copy of the functions here, if needed please contact me. |
Changes proposed in this PR:
write_netcdf_local_exceedance_intenor raster fileswrite_raster_local_exceedance_inten.local_return_periodand_loc_return_periodfor given hazard intensities, incl. plotting functionplot_local_rp.write_netcdf_local_return_periodsor raster fileswrite_raster_local_return_periods.This PR fixes #854
PR Author Checklist
develop)PR Reviewer Checklist