-
Notifications
You must be signed in to change notification settings - Fork 2
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
eNATL60 vorticity / strain histogram #15
Comments
And of course, immediately after writing this up, I found my mistake. 🙃 I am not actually taking any differences! Sorry for spamming everyone. I'll keep this open and update you soon with my results. |
So if I fix my vorticity calculation to be def diff(a, shift, axis):
return a - np.roll(a, shift, axis)
def nemo_vort(u, v, e1f, e2f, e2v, e1u):
return (
diff(v * e2v, 1, axis=-1)
- diff(u * e1u, 1, axis=-2)
) / (e1f * e2f) I get this beautiful field And this nice histogram (Gist also updated) Would this repo be a good place to collect such examples? |
Looks great! I also had in mind to look at the vorticity-strain histograms for each model :) |
I think we should definitely keep the examples in a separate repo from the jupyterhub image. We can easily use nbgitpuller to bring them in. |
@rabernat Are you suggesting I make a new repo for the example notebooks or that Pangeo-forge makes one as part of their gallery? |
Pangeo Forge doesn't do notebooks / examples. I'm suggestion we have a standalone repo where we keep example notebooks for working with the SWOT AdAC data. Why not this repo? But what is all the stuff in this repo now? Is it being used for anything? |
I'm perfectly ok with having an example subdirectory in this repo with example notebooks 👍 |
I guess I got confused with #6 . |
I am giving a talk at the SIO SWOT seminar in less than two weeks about Pangeo and the AdAC model data effort. So I am trying to come up with a cool example.
I put together this notebook - https://nbviewer.jupyter.org/gist/rabernat/2f9ca9a0a54840fa1c2b96068574c7c5 - where I am trying to reproduce @dhruvbalwada's vorticity strain histogram analysis (see also ocean-transport/coiled_collaboration#5).
I am getting some weird results and would like some help from @roxyboy or @lesommer debugging. I figure we will need these sorts of demos for this project anyway, so hopefully this is time well spent. The notebook is 💯 runnable on https://us-central1-b.gcp.pangeo.io/, so please feel free to run it and reproduce / fix.
This is what my histogram looks like:
Obviously very different from Dhruv's result in the channel model:
My vorticity just doesn't look very vorticity-like 😱
I worry I am calculating it wrong:
Note that I am not using xgcm, for the reason described in pangeo-forge/staged-recipes#24 (comment) and also because this "kernel function" + apply_ufunc approach scales much better. But I did base my code off of @raphaeldussin's xgcm example at https://xgcm.readthedocs.io/en/stable/example_nemo_idealized.html.
I would very much appreciate if someone could have a look and help me find out what's going wrong.
I look forward to collaborating this way and building up more and more complex examples of multi-model analysis.
The text was updated successfully, but these errors were encountered: