Skip to content

Fixes a bug in the surface buoyancy flux calculation for KPP - #603

Open
vanroekel wants to merge 3 commits into
E3SM-Project:developfrom
vanroekel:vanroekel/omega/kpp-bug-fix
Open

vanroekel wants to merge 3 commits into
E3SM-Project:developfrom
vanroekel:vanroekel/omega/kpp-bug-fix

Conversation

@vanroekel

Copy link
Copy Markdown
Collaborator

KPP requires the direct heat fluxes only for the computation of the surface buoyancy flux. The SeaIceHeatFlux term includes the direct contribution and the liquid enthalpy. The current code estimates this contribution using the SeaIceFreshWaterFlux and the SeaIceSaltFlux. When the ice is melting it estimates the salinity as

SeaIceSaltFlux / SeaIceFreshWaterFlux * conversion_to_ppt

When ice is forming, SaTop is used for the freezing temperature calculation. However for mixed sign cases (e.g. SeaIceSaltFlux < 0 and SeaIceFreshWaterFlux > 0) it gave a negative salinity from the formula, which caused a crash when CalcCTFreezing was called. The key change here is to check if both the salt and freshwater fluxes are positive before using the formula.

The mixed sign cases are assumed to use SaTop for the freezing temperature. This may not be completely correct, but I expect the error from this assumption to be very small. I've had co pilot add a count of the mixed sign cases.

I've removed the cTests from all the machines as they previously passed, this only emerged in E3SM simulations. cTests still pass on pm-cpu I will test on pm-gpu soon and can test further if desired.

I've confirmed my failing G case works with this fix.

Checklist

  • Linting
  • Building
    • CMake build does not produce any new warnings from changes in this PR
  • Testing: G-cases
  • cTests Pass on pm-cpu
  • cTests Pass on pm-gpu

fixes #602

When SeaIceFreshWaterFlux > 0 and SeaIceSaltFlux < 0, a negative
salinity can get passed to the TEOS 10 freezing calculation.  This adds
a new check to ensure positive salinities are passed to TEOS 10.  This
fixes failures in G-cases in E3SM.
@vanroekel

Copy link
Copy Markdown
Collaborator Author

@andrewdnolan could you test this to see if your cases pass now?

@andrewdnolan

Copy link
Copy Markdown

Coupled Testing

Testing on both machines was rebased onto #601.

frontier, with craygnu.

  • SMS_Vmct.T62_oQU240.GOMEGA-IAF.frontier_craygnu: PASS

pm-cpu, with intel

  • SMS_Vmct_Ld1.T62_oQU240.GOMEGA-IAF.pm-cpu_intel: PASS

@andrewdnolan andrewdnolan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approving based on a quick visual inspection and the coupled testing I did.

This branch has not been deployed

No deployments
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.

E3SM G-case failures with KPP

3 participants