Skip to content
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

Clean up/generalise tracer-binning of tendency diagnostics #278

Open
rmholmes opened this issue Feb 12, 2019 · 2 comments
Open

Clean up/generalise tracer-binning of tendency diagnostics #278

rmholmes opened this issue Feb 12, 2019 · 2 comments

Comments

@rmholmes
Copy link
Contributor

This issue is to highlight the need to clean up the rebinning routines that create the tendency diagnostics ***_on_nrho (and for example, the transports ***_trans_on_nrho). Currently for my temperature-binned heat budget diagnostics there is a hack in the code to set neutral density to temperature to bin these diagnostics. The problems with this are myriad: 1) It's a hack, 2) netcdf meta-data can be incorrect, 3) we can only bin according to one variable in any given run (there are some interesting science questions that could be addressed if we could bin in T & S at the same time).

One way to do this would be to generalise the diagnose_3d_rho and rebin_onto_rho routines to be able to bin onto a tracer chosen at the function call (e.g. pot. density, temperature, salinity), rather than just to whatever neutralrho is. We could then introduce new tendency diagnostics corresponding to each tracer (e.g. ***_on_pden, ***_on_temp, ***_on_salt), that call these functions with the appropriate tracer.

One problem with the above approach is that it introduces a large number of new diagnostics and lots of new code.

@rmholmes
Copy link
Contributor Author

Another related minor side-issue is to do with the transports, which can be binned according to different variables at the same time (e.g. ty_trans_rho vs. ty_trans_nrho). In ocean_density there are variables potrho_min, potrho_max, neutralrho_min, neutralrho_max and layer_nk that set the discrete grids for potential density and neutral density. One should be able to use a different layer_nk for potential vs. neutral density. I have changes to implement this in my fork (rmholmes@74039ac), but it would require changes to everyones input.nml

@rmholmes
Copy link
Contributor Author

Another additional change added to the wish list here: The ability to bin according to a tracer grid with unequal tracer bin sizes. This would be important for salinity where most of the ocean is within the range 30-40psu (requiring fine bin sizes), but there are regions where the salinity is much lower (which could be covered by low-resolution bins).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant