-
Notifications
You must be signed in to change notification settings - Fork 131
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
Update stress12T calculation for C-grid #802
Conversation
stress12T was zero. Compute stress12T in subroutine stressC_T after computing estimate of shearT by averaging shearU. minor updates to some indentation and variable names.
FYI, the main changes are in stressC_T at line 1814 and 1841 and passing stress12T into the subroutine. Everything else is just formatting. |
+ shearU(i ,j-1) * uarea(i ,j-1) & | ||
+ shearU(i-1,j-1) * uarea(i-1,j-1) & | ||
+ shearU(i-1,j ) * uarea(i-1,j )) & | ||
/ (uarea(i,j)+uarea(i,j-1)+uarea(i-1,j-1)+uarea(i-1,j)) |
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.
This isn't terribly important, but to reduce the number of flops and potentially also paging associated with strides, I'd save the denominator in a temporary scalar and reuse it.
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.
The compiler may do this for us, but I'll update it just to make sure.
So, pulling the denominator out of the equation changes answers because it affects both shearT (diagnostic) and shearTsqr (not diagnostic). It changes answers for most C-grid cases, B and CD cases are bit-for-bit, as expected. Answer differences seem to be roundoff at first then grow. Should I commit/push the change? I'm fine doing that and think it's a good time to do so, just wanted to check. |
Yes, I recommend doing it now. |
PR checklist
Update stress12T calculation for C-grid
apcraig
All bit-for-bit on cheyenne full test suites, https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#8a45b97c1d4bb49fe7cdad98ecb7ea39dbc4b30c
stress12T was zero. Compute stress12T in subroutine stressC_T after computing estimate of shearT by averaging shearU. See #707 for additional discussion and results. This is just a diagnostic.
minor updates to some indentation and variable names.
closes #707