Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions components/omega/configs/Default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Omega:
VelocityVertAdvTendencyEnable: true
TracerVertAdvTendencyEnable: true
PressureGradTendencyEnable: true
FrazilTendencyEnable: true
ManufacturedSolution:
WavelengthX: 5.0e6
WavelengthY: 4.33013e6
Expand All @@ -76,6 +77,12 @@ Omega:
DRhoDT: -0.2
DRhoDS: 0.8
RhoT0S0: 1000.0
Frazil:
FrazilType: teos
MassLimit: 0.1
Phi: 0.75
DepthLimit: -1.0
ConservationCheck: false
VertMix:
Background:
Diffusivity: 1.0e-5
Expand Down
18 changes: 16 additions & 2 deletions components/omega/src/ocn/Eos.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ class Teos10Eos {

/// Calculates freezing Conservative Temperature using TEOS-10 polynomial
/// (polynomial error in [-5e-4, 6e-4] K, from GSW package)
KOKKOS_FUNCTION Real calcCtFreezing(const Real Sa, const Real P,
const Real SaturationFract) const {
KOKKOS_FUNCTION static Real calcCtFreezing(const Real Sa, const Real P,
const Real SaturationFract) {
constexpr Real Sso = 35.16504;
constexpr Real C0 = 0.017947064327968736;
constexpr Real C1 = -6.076099099929818;
Expand Down Expand Up @@ -756,6 +756,20 @@ class Eos {
/// Convert potential temperature to Conservative Temperature
Real calcCtFromPt(const Real &Sa, const Real &Pt) const;

/// Calculate Conservative Temperature at freezing point.
/// P is expected in dbar to match TEOS polynomial convention.
KOKKOS_FUNCTION static Real calcCtFreezing(const Real Sa, const Real P,
const Real SaturationFract,
const EosType Choice) {
if (Choice == EosType::Teos10Eos) {
return Teos10Eos::calcCtFreezing(Sa, P, SaturationFract);
}

Kokkos::abort("Eos::calcCtFreezing: CtFreezing not implemented for "
"non-TEOS-10 EOS");
return 0.0_Real;
}

/// Initialize EOS from config and mesh
static void init();

Expand Down
Loading