Skip to content

Preserve mapped dates in HazardForecast.from_xarray_raster - #1310

Open
giovannicozzolongo wants to merge 1 commit into
CLIMADA-project:developfrom
giovannicozzolongo:fix/hazardforecast-explicit-date
Open

Preserve mapped dates in HazardForecast.from_xarray_raster#1310
giovannicozzolongo wants to merge 1 commit into
CLIMADA-project:developfrom
giovannicozzolongo:fix/hazardforecast-explicit-date

Conversation

@giovannicozzolongo

Copy link
Copy Markdown

Changes proposed in this PR:

  • Preserve dates loaded from an explicit date entry in data_vars.
  • Keep zero-valued forecast dates when no date mapping is supplied, with regression coverage for both paths.

This PR fixes #1305

Tests:

  • python -m pytest -q climada/hazard/test/test_forecast.py (56 passed)
  • python -m pytest -q climada/hazard/test/test_xarray.py climada/hazard/test/test_io.py (18 passed)
  • pre-commit run --files AUTHORS.md CHANGELOG.md climada/hazard/forecast.py climada/hazard/test/test_forecast.py
  • pylint climada/hazard/forecast.py climada/hazard/test/test_forecast.py (9.35/10, unchanged)

PR Author Checklist

PR Reviewer Checklist

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.

1 participant