Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative interface to EQN_OF_STATE="LINEAR" #842

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

awallcraft
Copy link

The existing interface to EQN_OF_STATE="LINEAR" is based on RHO_T0_S0, the
density at T=0, S=0. This is the most computationally efficient way to
specify a linear EOS, but we are usually linearizing about a reference
T and S that are not 0.

The new interface is based on TREF, SREF, and RHO_TREF_SREF, where:

RHO(T,S) = RHO_TREF_SREF + DRHO_DT*(T-TREF) + DRHO_DS*(S-SREF)
RHO_T0_S0 = RHO_TREF_SREF - DRHO_DTTREF - DRHO_DSSREF
RHO(T,S) = RHO_T0_S0 + DRHO_DTT + DRHO_DSS

The defaults for TREF and SREF are zero and for RHO_TREF_SREF is 1000.0.
So if the new interface is not used answers are not changed but there
are always new model parameters.

Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from one minor spelling error, this new PR looks good to me.

Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that these changes are a helpful addition, and that they will not adversely impact any existing configurations.

The existing interface to EQN_OF_STATE="LINEAR" is based on RHO_T0_S0, the
density at T=0, S=0.  This is the most computationally efficient way to
specify a linear EOS, but we are usually linearizing about a reference
T and S that are not 0.

The new interface is based on TREF, SREF, and RHO_TREF_SREF, where:

RHO(T,S) = RHO_TREF_SREF + DRHO_DT*(T-TREF) + DRHO_DS*(S-SREF)
RHO_T0_S0 = RHO_TREF_SREF - DRHO_DT*TREF - DRHO_DS*SREF
RHO(T,S) = RHO_T0_S0 + DRHO_DT*T + DRHO_DS*S

The defaults for TREF and SREF are zero and for RHO_TREF_SREF is 1000.0.
So if the new interface is not used answers are not changed but there
are always new model parameters.
@Hallberg-NOAA
Copy link
Member

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26515 with the expected warnings about new runtime parameters.

@Hallberg-NOAA Hallberg-NOAA merged commit 9e7cfe9 into NOAA-GFDL:dev/gfdl Feb 25, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants