E3SM icon indicating copy to clipboard operation
E3SM copied to clipboard

removed use of Fortran fraction intrinsic from ocn diagnostics

Open philipwjones opened this issue 3 years ago • 1 comments

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

philipwjones avatar Aug 11 '22 17:08 philipwjones

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.

philipwjones avatar Aug 11 '22 17:08 philipwjones

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

jonbob avatar Aug 16 '22 21:08 jonbob

merged to master

jonbob avatar Aug 17 '22 20:08 jonbob