-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fixes in MEKE that allows GME to work properly #128
Conversation
* Follow equation 1 of Jansen et al. (2015), balancing the GEOMETRIC GM coefficient against bottom drag (Equations 3 and 12); * Added limited for SN in this formula, to avoid extremely large values. TODO: * Increase GEOMETRIC_ALPHA in this calculation * Use GEOMETRIC_EPSILON as a limiter for SN
In this commit, bottomFac2 is calculated when CS%MEKE_GEOMETRIC is set to true. Previously, bottomFac2 was calculated in MEKE_lengthScales_0d but something else on that subroutine was returning Nan so we decided to pull out just the bottomFac2 calculation from that.
* Moved MEKE_equilibrium_alt toward top of subroutine to avoid unnecessary calculations.
This commit adds a subroutine that calculates a new equilibrium value for MEKE at each time step. This is not copied into MEKE%MEKE; rather, it is used as a restoring term to nudge MEKE%MEKE back to an equilibrium value. To select this option one needs to set MEKE_EQUILIBRIUM_RESTORING=True. The timescale for nudging is controlled via MEKE_RESTORING_TIMESCALE.
ce8df8d
to
ebf5ee0
Compare
This patch fixes the following MEKE diagnostics: - MEKE_Ue, MEKE_Ub, MEKE_Ut The diagnostics were computed as inline operations inside post_data, e.g.: post_data(..., sqrt(0, max(0., MEKE*bottomFac2))) rather than computing the fields explicitly inside of array loops. This case causing floating point exceptions in Intel compilers, possibly likely due to evaluations inside of halos. We resolve these diagnostics by computing the values into a scratch array which is then passed to post_data.
Test tc2 was failing because of some MEKE diagnostics. I've cherry-picked commit 3f041d9 from https://github.com/NOAA-GFDL/MOM6/pull/1014 that fixes these issues. |
I was able to reproduce this error on my desktop, and got the following error:
I haven't looked at what's going on yet, but looks like One bit of good news is that the updated Makefile will report this information more clearly when it's merged into dev/master. |
…ibrium_restoring * Also deletes unneeded variables from subroutine MEKE_equilibrium_restoring.
Thanks, @marshallward. I was able to reproduce the error on Cheyenne with gnu/8.3.0. |
Codecov Report
@@ Coverage Diff @@
## dev/ncar #128 +/- ##
============================================
+ Coverage 43.16% 43.16% +<.01%
============================================
Files 213 213
Lines 62198 62232 +34
============================================
+ Hits 26849 26865 +16
- Misses 35349 35367 +18
Continue to review full report at Codecov.
|
This is suggesting to me that we need to continue doing an optimized test run ( |
Summary:
Adds a new equilibrium formula for MEKE a4f9550;
Rearranges MEKE_EQUILIBRIUM subroutine to avoid unnecessary calculations 839217d;
Adds option to nudge MEKE to an equilibrium value. To select this option one needs to set MEKE_EQUILIBRIUM_RESTORING=True. The timescale for nudging is controlled via MEKE_RESTORING_TIMESCALE ebf5ee0.
This PR should not change answers since none of these options are enabled in our tests.