Skip to content

Hazard.from_raster_xarray stores native values of dates in Hazard.event_name #789

@peanutfun

Description

@peanutfun

The current implementation uses the exact date/event values as Hazard.event_name if no explicit event names can be found in the dataset. This causes issues when trying to store the hazard object or a related impact object as H5 file. We should somehow make sure that Hazard.event_name is sanitized. Suggestions:

  • Using a different default value for event_name including none at all (empty list)
  • Trying to cast any time information to a string, e.g. via pandas.Timestamp(x).isoformat()

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions