Open ali-ramadhan opened 3 years ago
Can we generalize this issue to indicate a general abstraction for vectors?
We'll need this abstraction for a few purposes:
I think we only need an abstraction for two-dimensional vector fields. However, we already tuple together the velocity components. So it may make sense to design a three-dimensional abstraction, and limit it to two-dimensions if we need to.
cc @simonbyrne
Agreed. Changed the issue title to be more general.
Right now it's not trivial to set initial velocities or impose velocity boundary conditions (or forcing functions) since the
i
index does not point in the zonal direction (andj
does not point in the meridional direction).I think users will usually want to impose things on the "zonal" and "meridional" velocities, so an abstraction that allows the user to describe zonal and meridional velocities would be quite nice (and Oceananigans should be able to do the right thing on the backend).
This might come naturally with the idea of a
VectorField
that @glwagner has been mentioning.This doesn't just apply to cubed sphere grids, but to curvilinear grids in general although right now we just have the cubed sphere as the lat-lon grid is aligned with the zonal and meridional directions.