Stream: xarray

Topic: ✔ cf-xarray get_bounds() failure


view this post on Zulip Stephen Yeager (Dec 20 2022 at 22:10):

I'm using xesmf to regrid CMIP6 data (ingested from glade-cmip6.json using intake). Conservative regridding with xesmf requires lat/lon bounds that are computed using cf.get_bounds(). My code is failing on one dataset that has 'longitude' and 'latitude' coordinates, but cf cannot seem to find the 'longitude' key (see attached summary of the error). Anyone have an idea what's going wrong? Screen-Shot-2022-12-20-at-3.01.23-PM.png

view this post on Zulip Deepak Cherian (Jan 20 2023 at 21:23):

Well there are no bounds for longitude. You can use .cf.add_bounds for a reasonable guess: https://cf-xarray.readthedocs.io/en/latest/bounds.html

view this post on Zulip Notification Bot (Dec 06 2023 at 17:57):

Stephen Yeager has marked this topic as resolved.


Last updated: May 16 2025 at 17:14 UTC