lanl / palm_lanl

LANL Contributions to PArallelized Large-eddy simulation Model (PALM)
3 stars 5 forks source link

Changes to potential density #53

Closed cbegeman closed 5 years ago

cbegeman commented 5 years ago

The following changes are included in this PR:

  1. 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.
  2. 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.
  3. Clean up buoyancy term computation.
  4. 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.
  5. Replace slope_parallel_gradients with slope_normal_gradients due to incorrect nomenclature. That is, slope_parallel_gradients previously referred to slope_normal_gradients.
cbegeman commented 5 years ago

@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.