Closed mpudig closed 8 months ago
Thanks for this! I'll try to get to this sometime this week!
@mpudig you should have merge rights now, right?
if you are happy merge whenever.
@mpudig I'll merge
@mpudig welcome to GeophysicalFlows.jl contributors!
@navidcy Apologies for the delay, I was making the long trip back to Australia. Thanks for merging!!
This pull request addresses issue #339 and discussion #325.
The conclusion from the discussion was that we should accept buoyancy as an input instead of density in
multilayerqg
. The density array was used only to calculate the reduced gravity array. Previously, the derived reduced gravity array resulted in spurious internal PV gradients as discussed extensively in discussion #325. It also implied that the Boussinesq approximation did not hold, which is implicitly assumed in the form of the layered QG equations solved here.This pull request has changed the input field of
multilayerqg
from $\rho$, the density, to $b = -g \frac{\delta \rho}{\rho_0}$, the Boussinesq buoyancy, where $|\delta \rho| \ll \rho_0$. The reduced gravity is now derived directly from $b$, https://github.com/mpudig/GeophysicalFlows.jl/blob/density_to_buoyancy/src/multilayerqg.jl#L348. I have set the change in buoyancy to scale like 1/nlayers with the other default parameters as they are inmultilayerqg
– I believe this is consistent with the other nondimensional parameter values and an order 1 Burger number.