-
Notifications
You must be signed in to change notification settings - Fork 8
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
kinematics.spin
and kinematics.eddy_kinetic_energy
#307
Conversation
The formula reference should be in Griffa et al. 2008 |
kinematics.spin
kinematics.spin
and kinematics.eddy_kinetic_energy
@selipot take a look at the current implementation. |
@@ -667,3 +724,147 @@ def velocity_from_position( | |||
dy /= dt | |||
|
|||
return np.swapaxes(dx, time_axis, -1), np.swapaxes(dy, time_axis, -1) | |||
|
|||
|
|||
def spin( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sorting alphabetically functions by convention? Just wondering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we've had a rule so far. I think it would be nice for functions to be sorted alphabetically in the code (easier to find without resorting to search).
Parameters | ||
---------- | ||
u : np.ndarray | ||
Zonal velocity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always end with a period as in
Zonal velocities.
Should we have a convention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pedantically correct thing to do (as I learned from my book editor) is to use a period when we have a full sentence (e.g. "This is a zonal velocity.") and to omit it when it's not a sentence ("Zonal velocities").
We don't need to do that because almost nobody will care. We can use periods always if you prefer it.
Add DOIs to references? |
Another implementation @RickLumpkin reminded me of https://agupubs.onlinelibrary.wiley.com/doi/10.1002/2015JC011435 |
This is now ready for another review. It bumps the version to 0.26.0. |
* first spin implementation * Implement eddy_kinetic_energy and spin * edit * EKE description and spin references * Fix change introduced in bad merge from main * Test eddy_kinetic_energy * Update kinetic_energy and spin to not demean * TODO comment * Update spin docstring * Fix docstring * Don't time average in spin calculation * Bump version * Update docstrings * Test spin --------- Co-authored-by: selipot <selipot@miami.edu>
eddy_kinetic_energy
:spin
: