Open rcaneill opened 5 years ago
Hi @rcaneill - thanks for this useful idea.
So far, xgcm only supports grids in which the variables are assumed to be centered. But I know this is not the case for some models, like MOM5 / MOM6. Could you let us know what is your specific use case here?
As you have already seen, the interpolation function is exceedingly simple:
https://github.com/xgcm/xgcm/blob/cac66afeb2426546b142aef07b7752bd02ea0ebb/xgcm/grid.py#L1249-L1252
I would definitely be open to extending this to the more general case where the interpolation weights vary spatially. There would be some design questions to answer here, such as
Hi, I am using NEMO in s coordinates, where the vertical variable are not necessarily centered. I'll think about the design questions and keep you in touch if I find a clean solution.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
Can this be achieved in principal with #344 ?
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
@andersy005 This now seems too early? Shouldnt my post count as activity?
@andersy005 This now seems too early? Shouldnt my post count as activity?
You're right... My hunch is that this is related to this bug: https://github.com/actions/stale/issues/509. I will look into it sometime next week.
Thanks @andersy005
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days.
Thank you for your contribution!
Hello, I am trying to figure how to do interpolation that are not centred, e.g. when a "center" point is not at the middle point of 2 "right" points. I tried different ways but I did not manage to find a satisfying way that would fit in the xgcm.Axis class. My idea was to implement a new function for interpolation between data_left and data_right, taking also a weight representing the distance to the new position for each data, and use it instead of
raw_interp_function
:For an interpolation from "right" to "center", weights would be (C: "center, R: "right", wl: "weight_left", wr: "weight_right"):
I did not really find how to implement this solution without changing too much code, as I am not yet familiar with xgcm. Maybe it is necessary to reshape some parts. Does someone has an idea of the rough lines? Or another solution?