cf-xarray
cf-xarray copied to clipboard
wrongly shaped bounds from add_bounds method
Hey there,
was tinkering around with the add_bounds
method and got this (from dump):
float yc_bounds(bounds, yc) ;
From the CF-conventions, I found the following example for cell boundaries:
float A_bnds(eta, 2) ;
Here the shape is transposed.
Also ncview
complains about the bounds with:
Error, compiled with max number of vertices for bounds var of 50! But found a var with n=600
So I guess, the bounds should be transposed.
I think, adding a .transpose()
in this line should solve this:
https://github.com/xarray-contrib/cf-xarray/blob/b031b45838a0c6c7ece71d9324face2e346cf360/cf_xarray/accessor.py#L483