Open tomchor opened 1 year ago
I agree that verbose is good and that prefixing the names by the equation the diagnostic is relevant too (especially for the budgets of variances) is helpful.
We rarely regret having more modules so that might a great idea. I think you could also omit "Equation" from the end, ie
using Oceanostics
χ = TracerVariance.DissipationRate(model)
ε = KineticEnergy.DissipationRate(model)
I agree that verbose is good and that prefixing the names by the equation the diagnostic is relevant too (especially for the budgets of variances) is helpful.
We rarely regret having more modules so that might a great idea. I think you could also omit "Equation" from the end, ie
using Oceanostics χ = TracerVariance.DissipationRate(model) ε = KineticEnergy.DissipationRate(model)
I think putting diagnostics explicitly in terms of equations (whenever possible) is helpful since it probably means we don't need to explicitly write Term
at the end of terms and people will still understand it refers to a term.
Plus omitting Equation
can probably lead to things like KineticEnergy.KineticEnergy
, which doesn't look right. So I think I prefer putting "Equation
" there somewhere.
At the moment the diagnostics don't follow a strict naming pattern. Taking the
TKEBudgetTerms
as an example:https://github.com/tomchor/Oceanostics.jl/blob/3b46106a5ca35e6f6e10264d968dda949f01cf23/src/Oceanostics.jl#L4-L9
Some diagnostics have
Term
appended to their names (likeKineticEnergyDiffusiveTerm
), some don't (likeKineticEnergyDissipationRate
). Some start withKineticEnergy
(likeKineticEnergyDiffusiveTerm
again) but some don't (likeXShearProductionRate
).It would be nice to agree on a naming pattern to use from now on. I think it's more important to be clear than it is to be concise. For example, something like the snippet below (which is made up code just for example sake) isn't 100% clear
Which is why the currently implemented code has a more verbose name:
We could keep following this pattern and make things more verbose, following the pattern "budgeted quantity" + "term name", which would bring
KineticEnergyDissipationRate
,KineticEnergyPressureRedistribution
,TracerVarianceForcing
, etc.Another option is to not export function/diagnostic names at the top/package level and name the modules according to the equations the diagnostic terms come from. That way the snippet above would become something like
which, I would argue, is pretty readable, and not too verbose.
cc @glwagner