-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ugrid_to_tgrid.... #46
Comments
with xgcm master and metrics specified this becomes
|
Do you think it's worth having a method in def ugrid_to_tgrid(arr_ugrid):
"""
Interpolates values at U points on a B grid to T points.
"""
with xr.set_options(keep_attrs=True):
return 0.25 * (
arr_ugrid + # j, i
arr_ugrid.roll(nlat=1, roll_coords=False) + # j-1, i
arr_ugrid.roll(nlon=1, roll_coords=False) + # j, i-1
arr_ugrid.roll(nlat=1, nlon=1, roll_coords=False) #j-1, i-1
) |
Maybe as a convenience method so you can do it without xgcm? it is really convenient once xgcm makes a release... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should have a UGRID to TGRID function...and the reverse.
The text was updated successfully, but these errors were encountered: