hdrake / xwmb

xWMB is a Python package that provides a efficient and lazy computation of Water Mass Budgets in arbitrary sub-domains of C-grid ocean models.
7 stars 2 forks source link

Provide diag_table #8

Closed cspencerjones closed 1 year ago

cspencerjones commented 1 year ago

We would love to be able to adapt the example to work with our own model output (I have run a couple of years of OM4_025.JRA and can run more with different diagnostics). It would really help if we could see your diag_table file. Is that possible?

Thanks for this package.

hdrake commented 1 year ago

Sure thing. This should contain everything you'll need: https://github.com/hdrake/xwmb/blob/6cc8f0c4486fc826bd4ec760957b4364445e7baa/examples/MOM6_diagtable

I've had best results with output on the native grid, but you could use rho2 or zstr instead, depending on your application. Diagnosing directly in rho2 means you don't have to deal with offline binning errors, but non-native budget diagnostics are currently slightly bugged in MOM6. We don't have a good sense of how impactful this bug is yet, unfortunately.

You can also work through the example notebooks here and in xwmt with the test data here: https://github.com/hdrake/xwmt/blob/84a0baeb775eefd44cd9ef6c02f25f30b5073559/xwmt/tests/conftest.py#L9-L13