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

(*)Fix bug in CVMix_shear_is_used if USE_PP81=True #323

Merged

Conversation

Hallberg-NOAA
Copy link
Member

Because get_param() is case-sensitive, CVMix_shear_is_used will incorrectly return false if USE_PP81 = True and USE_LMD94 = False. This would cause such cases to fail to reproduce across restarts or use uninitialized or incorrect arrays, but because the Pacanowski and Philader parameterization is very out-dated it appears not to be used in any active test case. Moreover, no one has reported any such issues yet. Therefore, rather than adding a flag to reproduce the old (unreproducing) results, this commit simply corrects this bug. All answers are bitwise identical in all known MOM6 configurations, but this could lead to answer changes in certain unlikely configurations.

@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Feb 8, 2023
@adcroft
Copy link
Member

adcroft commented Feb 8, 2023

How about adding the variable case parameter to the obsolete lists so users get a FATAL if trying to use it?

@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Merging #323 (84426ff) into dev/gfdl (ad56b29) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##           dev/gfdl     #323      +/-   ##
============================================
- Coverage     37.20%   37.20%   -0.01%     
============================================
  Files           265      265              
  Lines         74431    74432       +1     
  Branches      13822    13822              
============================================
- Hits          27690    27689       -1     
- Misses        41650    41652       +2     
  Partials       5091     5091              
Impacted Files Coverage Δ
src/diagnostics/MOM_obsolete_params.F90 70.96% <100.00%> (+0.31%) ⬆️
src/parameterizations/vertical/MOM_CVMix_shear.F90 11.47% <100.00%> (ø)
src/framework/MOM_document.F90 72.92% <0.00%> (-0.44%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

  Because get_param is case-sensitive, CVMix_shear_is_used can incorrectly
return false if USE_PP81 = True and USE_LMD94 = False.  This would cause such
cases to fail to reproduce across restarts or use uninitialize or incorrect
arrays, but because the Pacanowski and Philader parameterization is very
out-dated it appears not to be used in any active test case.  Moreover, no one
has reported any such issues yet.  Therefore, rather than adding a flag to
reproduce the old (unreproducing) results, this commit simply corrects this bug.
The (case-sensitive) parameter "Use_PP81" was also formally obsoleted.  All
answers are bitwise identical in all known MOM6 configurations, but this could
lead to answer changes in certain unlikely configurations.
@Hallberg-NOAA
Copy link
Member Author

Also obsoleting the parameter "Use_PP81" is an excellent suggestion, and I have just updated the PR to include this.

@marshallward
Copy link
Member

@marshallward marshallward merged commit 2fe2631 into NOAA-GFDL:dev/gfdl Feb 15, 2023
@Hallberg-NOAA Hallberg-NOAA deleted the fix_CVMIX_shear_is_used_bug branch May 10, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants