Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

-
### Fixed

- GMFD extreme value cleaning moved so applies to all subsequent steps, not just ERA5 bias adjustment. ([@brews](https://github.com/brews), [PR#17](https://github.com/ClimateImpactLab/poreallas/pull/28))

## [0.5.0] - 2026-08-24

Expand Down
4 changes: 4 additions & 0 deletions scripts/01-parse_gmfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ def open_gmfd(file_pattern: str, start_year: int, stop_year: int) -> xr.Dataset:
start_year=START_YEAR,
stop_year=STOP_YEAR,
)

# Cannot have leap years in QDM bias adjustment.
gmfd = gmfd.convert_calendar("noleap", dim="time")

# Fill extreme values
gmfd = gmfd.where(gmfd["tas"] < 1000).interpolate_na(dim="lat", method="linear")

regridder = xe.Regridder(gmfd, regrid_target, method="bilinear", periodic=True)
gmfd_regrid = regridder(gmfd)
gmfd_regrid.attrs |= gmfd.attrs
Expand Down
7 changes: 0 additions & 7 deletions scripts/02-bias_adjust_era5.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
chunks={},
backend_kwargs={"storage_options": {"token": "anon"}},
)
# Fill extreme values
gmfd = gmfd.sortby("latitude").chunk({"latitude": -1, "longitude": 30, "time": -1})
gmfd = (
gmfd.where(gmfd["tas"] < 1000)
.interpolate_na(dim="latitude", method="linear")
.compute()
)

era5 = xr.open_dataset(
ERA5_URI,
Expand Down
Loading