Skip to content

Commit

Permalink
fix bounds bug (#314)
Browse files Browse the repository at this point in the history
* fix bounds bug

* Update whats_new.rst
  • Loading branch information
larsbuntemeyer authored Jan 25, 2025
1 parent a54c90f commit 4b11259
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cordex/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ def transform_bounds(
ds.cf["Y"].dims[0], ds.cf["X"].dims[0], bnds_dim
)

ds[ds.cf["longitude"].name].attrs["bounds"] = cf.LON_BOUNDS
ds[ds.cf["latitude"].name].attrs["bounds"] = cf.LAT_BOUNDS
ds[ds.cf["longitude"].name].attrs["bounds"] = trg_dims[0]
ds[ds.cf["latitude"].name].attrs["bounds"] = trg_dims[1]

return ds.assign_coords(
{
Expand Down
7 changes: 6 additions & 1 deletion docs/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ New Features
Internal Changes
~~~~~~~~~~~~~~~~

- Update of API documentation in accessor (:pull:`308`).
- Fix coordinate bounds attribute in :py:meth:`transform_bounds` (:pull:`314`).

Bugfixes
~~~~~~~~

- Fixed deprecated ``xarray`` keywords (:pull:`273`).

Breaking Changes
~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 4b11259

Please sign in to comment.