gradient() and curl() compute derivatives on UXarray's internal unit sphere.
For grids with a physical sphere_radius, returned derivatives should scale back by that radius by default.
Current workaround:
curl_data = u.curl(v)
curl_physical = curl_data / uxds.uxgrid.sphere_radius
curl_physical.attrs["units"] = "1/s"
Proposed:
curl_physical = u.curl(v) # scales by uxgrid.sphere_radius when present
curl_unit = u.curl(v, scale_by_radius=False)
gradient()andcurl()compute derivatives on UXarray's internal unit sphere.For grids with a physical
sphere_radius, returned derivatives should scale back by that radius by default.Current workaround:
Proposed: