You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adapt ImpactCalc._return_empty and _return_impact to return ImpactForecast #1138
Modify ImpactCalc class so that _return_empty and _return_impact checks if hazard is instance of Hazard or HazardForecast class and calls appropriate methods to return Impact or ImpactForecast object accordingly.
Implementation:
if IsInstance(self.hazard, HazardForecast):
return ImpactForecast().from_impact(impact, self.hazard.ensemble_member, self.hazard.lead_time) #return ImpactForecast object
else:
return impact #return normal impact object if hazard is not a HazardForecast
Activity