Tom Vo

Results 265 comments of Tom Vo

> I'm not sure how straightforward this issue will be to address. An alternate strategy would be to use xESMF for spatial averages (and abandon the existing algorithm). I think...

This issue is probably not too urgent because nobody reported it before me. I don't know how common it is for lat and lon bounds to have additional dimensions beyond...

Another thing to note is that Xarray does not have a native API for generating bounds. Pitching our bounds generation functionalities might also be a good idea, considering I think...

> @tomvothecoder – I asked ChatGPT if there was a better way to approach this problem and it yielded a slightly different approach for including the bounds in the `dataarray`:...

> > I tried a similar approach where I created a datarray accessor class and stored bounds as an attribute. The issue was that accessor classes are not persistent when...

> `bounds` sticks around when I copy `x`, though I can't call `xcdat` accessors (because `x` is a DataArray) to see if they drop with xcdat operations... Oh I see...

I revived the conversation in the Xarray GitHub issue here: https://github.com/pydata/xarray/issues/1475#issuecomment-2716063411

FYI: https://github.com/pydata/xarray/pull/10137 was just merged, which enables DataArrays to hold coordinate bounds. Xarray v2025.04.0 should include this feature. > Allow assigning index coordinates with non-array dimension(s) in a [DataArray](https://docs.xarray.dev/en/latest/generated/xarray.DataArray.html#xarray.DataArray) by...

> That's awesome. Should I update this PR to try to include that advance? Sure, you can try it out in this PR. Here's the link to one of my...

@pochedls and @oliviermarti this PR should address this GH issue (same as this [comment](https://github.com/xCDAT/xcdat/pull/423#issuecomment-2491314128) from @oliviermarti). If you can check this branch out and try it that'd be great. ```python...