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

Add barotropic gyre task #241

Merged
merged 20 commits into from
Nov 22, 2024
Merged

Conversation

cbegeman
Copy link
Collaborator

@cbegeman cbegeman commented Nov 7, 2024

The barotropic gyre test case is added in order to evaluate linearized barotropic ocean dynamics alongside laplacian viscosity and surface wind forcing. This is the Munk model (1950). The variant of this test case with a balance between wind stress and bottom stress due to drag (the Stommel model) is not included.

By default, only a short forward step is run. The long forward step needed to bring the model to equilibrium and evaluate the numerical solution against an analytical solution may be run by changing the steps_to_run argument in the config file after setting up the test case.

Checklist

  • User's Guide has been updated
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.md) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Testing comment in the PR documents testing used to verify the changes
  • New tests have been added to a test suite

@cbegeman cbegeman added the ocean Related to ocean tests or analysis label Nov 7, 2024
@cbegeman cbegeman self-assigned this Nov 7, 2024
@cbegeman
Copy link
Collaborator Author

cbegeman commented Nov 7, 2024

The MPAS-Ocean solution after 3 years is compared with the analytical solution for free slip boundary conditions, with an L2 norm of 8.25e-2:
image

The no slip boundary condition is also included and produces a figure that is visually identical, with an L2 norm of 8.27e-2. Since the no slip error is larger, we evaluate against the free slip boundary condition by default. However, there is a known issue with MPAS-Ocean that the boundary condition does not exactly match either.

@cbegeman
Copy link
Collaborator Author

cbegeman commented Nov 8, 2024

This PR depends on MPAS-Dev/MPAS-Tools#590 for the BSF routine.

@cbegeman
Copy link
Collaborator Author

Testing

This case has been run with MPAS-O on chrys, intel-impi.

@cbegeman cbegeman requested a review from xylar November 11, 2024 01:48
@cbegeman cbegeman marked this pull request as ready for review November 11, 2024 01:49
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

This looks great! I'm still running my tests and I need to take care of things on the MPAS-Tools side before this can go in.

In the meantime, I think these 2 commits probably don't belong in this PR:
a71753b
3d01c42

And I have one suggestion for making a variable M lowercase.

polaris/ocean/tasks/barotropic_gyre/init.py Outdated Show resolved Hide resolved
@cbegeman cbegeman force-pushed the add-barotropic-gyre-task branch from 4418742 to f56f1f6 Compare November 12, 2024 20:12
@cbegeman
Copy link
Collaborator Author

@xylar Thanks for reviewing! I made those changes and re-ran just the initial state step.

@xylar
Copy link
Collaborator

xylar commented Nov 12, 2024

CI failures are expected until we get MPAS-Tools sorted out.

@cbegeman cbegeman force-pushed the add-barotropic-gyre-task branch from f56f1f6 to 9b4e73b Compare November 13, 2024 15:26
@xylar
Copy link
Collaborator

xylar commented Nov 21, 2024

@cbegeman, could you rebase this now that #243 is in? I think CI should pass once that happens. I'll review first thing tomorrow.

@cbegeman cbegeman force-pushed the add-barotropic-gyre-task branch from 9b4e73b to a038dfb Compare November 21, 2024 19:09
@xylar
Copy link
Collaborator

xylar commented Nov 21, 2024

Great, looks good so far. I'll take a final look in the morning.

Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

This looks great! I ran it though the paces again and got the same comparison plot from the analysis step as above.

@cbegeman
Copy link
Collaborator Author

@xylar Thank you for reviewing and prioritizing the MPAS-Tools update!

@cbegeman cbegeman merged commit cd94c14 into E3SM-Project:main Nov 22, 2024
5 checks passed
@cbegeman cbegeman deleted the add-barotropic-gyre-task branch November 22, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ocean Related to ocean tests or analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants