lesommer / oocgcm

oocgcm is a python library for the analysis of large gridded geophysical dataset.
http://oocgcm.rtfd.io
Apache License 2.0
39 stars 11 forks source link

Add method for Okubo-Weiss parameter in core.generic_2d_grid #31

Open lesommer opened 8 years ago

rabernat commented 8 years ago

Issues like this make me question the scope of oocgcm. It seems like a very specific diagnostic to implement at the level of a generic analysis package.

Surely it is enough to facilitate the calculation of vorticity / strain / divergence through finite volume derivative operations and leave the user to calculate things like OW, no?

lesommer commented 8 years ago

I understand your point. OW parameter would probably be more suitable for an example notebook.

lesommer commented 8 years ago

May be having an other repository for storing functions / script based on oocgcm would make send at some point ?

lesommer commented 8 years ago

Your comment raises the question of the scope of what we are intending to do here. This is true for grid descriptors but will also be true for other components as well (filters etc...). We need to talk about that.

rabernat commented 8 years ago

I think the most successful open source scientific projects have a clearly limited scope (think of pandas or xarray). This is very different from one's personal research codes. I'm not sure where the boundary is precisely between oocgcm and "user applications"--that is something that will evolve as the package develops. But it should be discussed.

In any case, a gallery of applications (probably as a seperate repo) is a good idea.

braaannigan commented 8 years ago

Where does PV fit in the terms of this discussion? It is like OW in the sense of being a seconday quantity calculated from vorticity/statification, but it is the fundamental flow diagnostic and so very useful for many users.

rabernat commented 8 years ago

Where does PV fit in the terms of this discussion?

I the differential operator code is complete enough, calculation PV should be trivial, something like

Q = grid.curl(velocity) * grid.gradient(buoyancy)

(where the * acts as a dot product). Behind the scenes would require a lot of careful grid logic though.