removed use of Fortran fraction intrinsic from ocn diagnostics
The ocean surface layer averaging routine was using a Fortran fraction intrinsic incorrectly, so this replaces the intrinsic with code that computes a fraction correctly. Also did some reformatting for long lines and documenting variables. Because it removes the fraction intrinsic, it fixes another issue in which that instrinsic was not supported on the GPU by the Cray compiler on Crusher.
NOTE: This code computes variables that are never used except to compute surface-displaced density which is also currently not used (and is an expensive EOS calc). This makes this PR bfb but we might consider removing these expensive calculations if really not needed.
[bfb] Fixes #5126 Fixes #5112
Forgot to mention, I did verify manually that the fractions were computed correctly with this change and the new function appeared to be working as designed even if the results are never used. Used a simple QU240 test.
Passes:
- ERS.ne11_oQU240.WCYCL1850NS.chrysalis_intel
- SMS_D_Ld3.T62_oQU120.CMPASO-IAF.chrysalis_intel
- PEM_Ln9.ne30pg2_EC30to60E2r2.WCYCL1850.chrysalis_intel
merged to next
merged to master