-
Notifications
You must be signed in to change notification settings - Fork 66
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
mpas_tools.ocean
: Solve barotropic streamfunction from vorticity
#607
Conversation
min_depth=-5., max_depth=1.e4, | ||
min_depth=None, max_depth=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's probably better to use None
to indicate no min or max.
The minimum depth (positive down) to compute transport over | ||
The minimum depth (positive up) to compute BSF over |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we probably want to use positive up like in MPAS-Analysis.
include_bolus : bool, optional | ||
Whether to include the GM bolus velocity in the computation | ||
|
||
include_submesoscale : bool, optional | ||
Whether to include the submesoscale velocity in the computation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These would be needed if we want to use this port in MPAS-Analysis.
@cbegeman, I haven't yet tested this in MPAS-Analysis or Polaris. You are certainly free to have a look but I will ping you when this is ready for you to review. |
Testing in MPAS-AnalysisI switched to using this port in a branch of MPAS-Analysis. The results are identical (at least visually). This: |
This merge is a port of: MPAS-Dev/MPAS-Analysis#1069 Instead of computing the BSF using a least-squares solve based on the transport between vertices, the new approach inverts a Poisson equation for the BSF based on the (vertically integrated) vorticity. Using a SORRM G-Case simulation, the vertically integrated vorticity computed from the streamfunciton is within machine precision of the original vertically integrated vorticity. The velocity produced by the streamfunciton has errors that are on the order of 1e-3 compared with the original vertically integrated velocity (likely caused by the field not being perfectly divergence free).
Testing in PolarisI have a draft branch at E3SM-Project/polaris#285. I ran the barotropic gyre test case on Chrysalis with MPAS-Ocean and was able to show that the batotropic streamfunction was similar to previous results (E3SM-Project/polaris#285 (comment)). |
@cbegeman, this is ready for your review but no rush. It can go in to MPAS-Tools but it won't be possible to update either Polaris or MPAS-Analysis for a bit while we get other pieces of the MPAS-Tools 1.0.0 release together. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! The testing you've done seems sufficient to me. Let me know if you'd like me to try out anything else.
@cbegeman, thanks for the review! I think no further testing is needed on your part for now. We'll want to re-test Polaris once MPAS-Tools 1.0.0 is released, just in case. |
This merge is a port of:
MPAS-Dev/MPAS-Analysis#1069
Instead of computing the BSF using a least-squares solve based on the transport between vertices, the new approach inverts a Poisson equation for the BSF based on the (vertically integrated) vorticity.
Using a SORRM G-Case simulation, the vertically integrated vorticity computed from the streamfunciton is within machine precision of the original vertically integrated vorticity. The velocity produced by the streamfunciton has errors that are on the order of 1e-3 compared with the original vertically integrated velocity (likely caused by the field not being perfectly divergence free).
closes #605