diff --git a/CHANGELOG.md b/CHANGELOG.md index ce51923..b3fb9be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Drop coordinate values associated with the spatial bounds dimension in CMIP6 cleaning (PR #177, @emileten). ## [0.16.1] - 2022-01-27 ### Fixed diff --git a/dodola/core.py b/dodola/core.py index 8d6ed6d..5b1d02d 100644 --- a/dodola/core.py +++ b/dodola/core.py @@ -357,6 +357,12 @@ def standardize_gcm(ds, leapday_removal=True): coords_to_drop, drop=True ) + # Some models have coordinates values (e.g. [1.0, 2.0]) for the spatial bounds dimension. We don't need this. + if "bnds" in ds_cleaned.variables: + ds_cleaned = ds_cleaned.drop( + ["bnds"] + ) # this preserves the dimension in itself but drops the coordinates values. + # Cleanup time. # if variable is precip, need to update units to mm day-1