Skip to content

Conversation

@spjuhel
Copy link
Collaborator

@spjuhel spjuhel commented Apr 2, 2025

Changes proposed in this PR:

Implements RiskTrajectory objects to ease the evaluation of risk / impact in between two points in time.

See the associated discussion here: #1039

A notebook showcasing this new module is available in doc/tutorial/climada_trajectory.ipynb. (It is not a real tutorial yet, but will serve as its basis).

Also note that the future option appraisal module will be based on this.

Remaining TODO s

  • Sort the list of Snapshot by their date when instantiating
  • Add a check that Exposures have the same shape within a risk trajectory.
  • Add a check that group_id are identical for Exposures or handle that case (Handled, different group_id are possible, metric is computed at each date and interpolated in between)
  • Make a decision about risk transfer (possibly after discussion with @chahank, see Integration of risk trajectories within climada #1039 ):
  • Make plots nicer, also cleanup "plot.py" file (no longer needed?)
  • Write extensive guide (see Integration of risk trajectories within climada #1039 )

PR Author Checklist

PR Reviewer Checklist

@chahank

This comment was marked as duplicate.

@chahank

This comment was marked as duplicate.

@chahank

This comment was marked as duplicate.

@chahank

This comment was marked as duplicate.

@chahank

This comment was marked as duplicate.

@spjuhel
Copy link
Collaborator Author

spjuhel commented Apr 4, 2025

I created a discussion here #1039
I think it is better than an Issue, as we will probably continue this discussion if/when we want to integrate timeseries in the future.

@spjuhel
Copy link
Collaborator Author

spjuhel commented Nov 4, 2025

Can I ask when you plan to continue and finish the review?
The code should be very stable now.

Comment on lines +1 to +2
# 100% Coverage goal:
## Integration test for risk period with periods and freq defined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure to understan the purpose of this file. Are integration tests planed for later on?

Comment on lines +106 to +107
is defined on a per coordinate basis, this one is applied total impact on the whole region
considered, and proportionally rescales the impacts per coordinate accordingly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
is defined on a per coordinate basis, this one is applied total impact on the whole region
considered, and proportionally rescales the impacts per coordinate accordingly.
is defined on a per coordinate basis, this one is applied total impact on the whole region
considered, and proportionally rescales the impacts per coordinate accordingly.

What does the rescales the impacts per coordinate accordingly mean ? Attachment and cover would just apply for the whole exposure right? What is being rescaled?

Comment on lines +119 to +123
4. **Adjustment**: The original impact per exposure point is scaled
by the ratio of (Residual Risk / Total Impact) or
(Transferred Risk / Total Impact) for that event.
This ensures the risk transfer is shared proportionally among all
impacted exposure points.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is the scaling. Could you please explain what this corresponds too? I am not familiar with this risk transfer spreadind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants