Skip to content

Enable stochastic EOS with Bodner#359

Merged
alperaltuntas merged 3 commits into
NCAR:dev/ncarfrom
iangrooms:stoch_eos_cleanup
Jul 23, 2025
Merged

Enable stochastic EOS with Bodner#359
alperaltuntas merged 3 commits into
NCAR:dev/ncarfrom
iangrooms:stoch_eos_cleanup

Conversation

@iangrooms
Copy link
Copy Markdown
Collaborator

This commit enables the Stanley parameterization for use with the Bodner23 MLE scheme. It also cleans up logic related to the Stanley parameterization throughout. Finally, it adds some documentation for the MOM_stoch_eos module.

This commit enables the Stanley parameterization for use with the
Bodner23 MLE scheme. It also cleans up logic related to the Stanley
parameterization throughout. Finally, it  adds some documentation
for the `MOM_stoch_eos` module.
@iangrooms iangrooms changed the title Stochastic EOS (aka Stanley parameterization) cleanup Enable stochastic EOS with Bodner Jul 17, 2025
@alperaltuntas
Copy link
Copy Markdown
Member

@iangrooms

  • Is this PR ready to be merged?
  • This PR changes answers for NCAR configuration. Are the changes expected? And if so, could you summarize the reason of changes and whether there is a way to retrieve old answers (e.g., by setting runtime parameters to different values.)

@iangrooms
Copy link
Copy Markdown
Collaborator Author

Yes, this is ready. TL;DR: The answer changes are expected, and can old answers can be recovered by setting USE_STANLEY_ML = False.

The occasion for this PR is that we enabled and were using this stochastic correction to the equation of state (EOS) in the original, FFH MLE parameterization. When we switched over to using Bodner the EOS correction was no longer being used, as it wasn't implemented for Bodner. The Bodner scheme simply didn't use the EOS correction, regardless of how you set the input parameters. This PR adds the code to implement the EOS correction for Bodner. So our old results have USE_STANLEY_ML = True and aren't actually using the EOS correction, while with the PR and USE_STANLEY_ML = True it is using the correction and the answers change. Maybe it would help to note that with the old code if you set USE_STANLEY_ML = False it won't change the answers.

This PR also cleans up the logic and documentation throughout, but not in a way that changes answers.

Copy link
Copy Markdown
Member

@alperaltuntas alperaltuntas left a comment

Choose a reason for hiding this comment

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

I confirmed that USE_STANLEY_ML = False for all of our test cases. However, the restart reproducibility test fails with a runtime error at the initialization of the continuation run. Hopefully the currently open, relevant PRs will resolve that. Otherwise, we can revisit these changes. But for the time being, I'll merge this PR as is.

@alperaltuntas alperaltuntas merged commit 3231da9 into NCAR:dev/ncar Jul 23, 2025
51 checks passed
@iangrooms
Copy link
Copy Markdown
Collaborator Author

Sounds good. This particular stochastic parameterization has been passing exact restarts for a while, so I agree it's likely that the restart problem is related to the other stochastic parameterization (GM+E). If not I will revisit this.

@gustavo-marques
Copy link
Copy Markdown
Collaborator

Is the stochastic parameterization (GM+E) enabled in the tests? I did not think so...

@alperaltuntas
Copy link
Copy Markdown
Member

It appears that ESCOMP/MOM_interface#267 broke the stochastic ERS test. This PR is good.

@iangrooms iangrooms deleted the stoch_eos_cleanup branch November 4, 2025 16:40
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.

3 participants