Skip to content

eNATL60 vorticity / strain histogram #15

@rabernat

Description

@rabernat

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:

image

Obviously very different from Dhruv's result in the channel model:

image

My vorticity just doesn't look very vorticity-like 😱

image

I worry I am calculating it wrong:

def nemo_vort(u, v, e1f, e2f, e2v, e1u):
    return (
        np.roll(v * e2v, 1, axis=-1)
        - np.roll(u * e1u, 1, axis=-2)
    ) / (e1f  * e2f)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions