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

MEKE diagnostic array fixes #1014

Merged
merged 2 commits into from
Oct 4, 2019

Conversation

marshallward
Copy link
Collaborator

This patch fixes the following MEKE diagnostics:

  • MEKE_Ue, MEKE_Ub, MEKE_Ut

The diagnostics were computed as inline operations inside post_data,
e.g.:

post_data(..., sqrt(0, max(0., MEKE*bottomFac2)))

rather than computing the fields explicitly inside of array loops.

This case causing floating point exceptions in Intel compilers, possibly
likely due to evaluations inside of halos.

We resolve these diagnostics by computing the values into a scratch
array which is then passed to post_data.

This patch fixes the following MEKE diagnostics:

- MEKE_Ue, MEKE_Ub, MEKE_Ut

The diagnostics were computed as inline operations inside post_data,
e.g.:

    post_data(..., sqrt(0, max(0., MEKE*bottomFac2)))

rather than computing the fields explicitly inside of array loops.

This case causing floating point exceptions in Intel compilers, possibly
likely due to evaluations inside of halos.

We resolve these diagnostics by computing the values into a scratch
array which is then passed to post_data.
@marshallward
Copy link
Collaborator Author

Gaea regression tests: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/9086

@codecov-io
Copy link

Codecov Report

Merging #1014 into dev/gfdl will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1014      +/-   ##
============================================
+ Coverage     43.08%   43.09%   +0.01%     
============================================
  Files           212      212              
  Lines         62230    62242      +12     
============================================
+ Hits          26814    26826      +12     
  Misses        35416    35416
Impacted Files Coverage Δ
src/parameterizations/lateral/MOM_MEKE.F90 70.14% <100%> (+0.6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57e5165...cecc6e6. Read the comment docs.

Copy link
Collaborator

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes should be useful for avoiding possible issues with doing arithmetic on values in halo regions. I approve merging these changes into dev/gfdl.

@adcroft adcroft merged commit ceaca56 into mom-ocean:dev/gfdl Oct 4, 2019
@marshallward marshallward deleted the meke_diag_arrays branch February 14, 2020 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants