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

Global sum BFB code in the surface salinity restoring routine reduces precision. #6446

Closed
maltrud opened this issue May 27, 2024 · 0 comments · Fixed by #6456
Closed

Global sum BFB code in the surface salinity restoring routine reduces precision. #6446

maltrud opened this issue May 27, 2024 · 0 comments · Fixed by #6456
Assignees

Comments

@maltrud
Copy link
Contributor

maltrud commented May 27, 2024

The global sum in subroutine ocn_get_surfaceSalinityData (required to ensure no net salt input into the ocean due to the restoring term) was originally implemented in the simplest way, which was not guaranteed to be BFB on different processor layouts. a modification was made to make it BFB, but apparently this method reduces the precision of the restoring term. while it seems to be a minor problem, we should be using the mpas reproducible sum routine instead.

this plot shows a 40 year time series of the globally averaged monthly SSS restoring tendency (log(abs(tend)) for a G-case using the IcosWISC30E3r5 mesh (in black). The red curve is a restart from year 40 using double precision output, which doesn't help. The green curve has the BFB code turned off showing much higher precision and no spikes.

Screenshot 2024-05-22 at 10 28 38 AM
@rljacob rljacob assigned maltrud and unassigned philipwjones May 31, 2024
jonbob added a commit that referenced this issue Jul 9, 2024
Replace global sum with full-precision reproducible sum

The global sum in the surface salinity restoring routine was forced to
be BFB using a truncation calculation that resulted in reduced precision
and some unexplained behavior. This PR replaces this calculation with an
mpas standard reproducible sum with full precision.

Testing was done using a G-case with the IcoswISC30E3r5 grid for one
year, then calculating the global average SSS restoring tendency term,
which should be effectively zero. Also confirmed that the new code
resulted in BFB solution when processor layout was changed from 10 nodes
on chrysalis to 15 nodes.

Fixes #6446
[non-BFB] for C- and G-cases with salinity restoring
@jonbob jonbob closed this as completed in 429dc36 Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants