You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In @clyne's talk yesterday at the Pangeo Showcase seminar, he mentioned that uxarray aims to copy some aspects of the xgcm API. I thought I would share our current plans around xgcm, since they may be relevant to uxarray.
We (me and @TomNicholas) are currently in the midst of a big refactor of xgcm around the concept of a grid_ufunc. The original proposal is here: xgcm/xgcm#344
Essentially, grid ufunc defines a way to annotate a function in with a "signature" that defines the location of the inputs and outputs with respected to a structured grid. A simple example is
@grid_ufunc(signature="(X:left,Y:center),(X:center,Y:left)->(X:left,Y:left)")
def cgrid_vorticity(u, v):
# do complicated stuff
return vort
xgcm can then apply these ufuncs given a Grid object. We like this because:
It will allow us to optimize some of our existing functions to be more computationally efficient
It will enable anyone to define grid_ufuncs and have them work with xgcm
It is actually language agnostic as a specification (more at the level of SGRID) and could thus be implemented from any language. We could write grid ufuncs in C++ or Julia and run them in python.
You could imagine using a similar approach with unstructured grids, since UGRID gives a clear way to specify the locations of data wrt the unstructured mesh.
I thought I would just open this issue to put this idea on your radar.
This discussion was converted from issue #5 on November 12, 2021 16:03.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In @clyne's talk yesterday at the Pangeo Showcase seminar, he mentioned that uxarray aims to copy some aspects of the xgcm API. I thought I would share our current plans around xgcm, since they may be relevant to uxarray.
We (me and @TomNicholas) are currently in the midst of a big refactor of xgcm around the concept of a grid_ufunc. The original proposal is here: xgcm/xgcm#344
Essentially, grid ufunc defines a way to annotate a function in with a "signature" that defines the location of the inputs and outputs with respected to a structured grid. A simple example is
xgcm can then apply these ufuncs given a
Grid
object. We like this because:You could imagine using a similar approach with unstructured grids, since UGRID gives a clear way to specify the locations of data wrt the unstructured mesh.
I thought I would just open this issue to put this idea on your radar.
Progress on this is being tracked here: https://github.com/xgcm/xgcm/projects/10
Beta Was this translation helpful? Give feedback.
All reactions