Make prho rather than rho_ocean the prognostic variable used to calculate buoyancy tendency in ocean cases. This removes the contribution of pressure to density gradients.
Reference prho to surface_pressure. When the surface_pressure (the pressure at the top of the model domain) is significantly greater than atmospheric pressure, Pressure terms are not computed when surface_pressure is less than 10 dbar because these terms are small and it saves computational time. There are significant (10s%) differences between dprho/dS(P=100 dbar) and dprho/dS(P=1700 dbar) which impact the relative buoyancy of, for example, the ice-ocean BL.
Clean up buoyancy term computation.
Improve readability of slope initialization by moving computations to init_ocean rather than overwriting fields in init_slope. This disables gravity-parallel scalar gradients in the sloped atmosphere case.
Replace slope_parallel_gradients with slope_normal_gradients due to incorrect nomenclature. That is, slope_parallel_gradients previously referred to slope_normal_gradients.
@xylar I realized there was inconsistent use of potential density and in situ density in the code base. You can look this over when it's convenient for you.
The following changes are included in this PR:
prho
rather thanrho_ocean
the prognostic variable used to calculate buoyancy tendency in ocean cases. This removes the contribution of pressure to density gradients.prho
tosurface_pressure
. When thesurface_pressure
(the pressure at the top of the model domain) is significantly greater than atmospheric pressure, Pressure terms are not computed when surface_pressure is less than 10 dbar because these terms are small and it saves computational time. There are significant (10s%) differences between dprho/dS(P=100 dbar) and dprho/dS(P=1700 dbar) which impact the relative buoyancy of, for example, the ice-ocean BL.