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

use -puny in denominator of scaling ratio for flux limiting #474

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

eclare108213
Copy link
Contributor

  • Short (1 sentence) summary of your PR:
    Fix the sign of puny in the denominator of the ratio used to scale heat fluxes
  • Developer(s):
    @njeffery
  • Suggest PR reviewers from list in the column to the right.
  • Please copy the PR test results link or provide a summary of testing completed below.
    Bug fix tested in E3SM by @njeffery.
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit
    • different at roundoff level
    • more substantial
  • Does this PR create or have dependencies on CICE or any other models?
    • Yes
    • No
  • Does this PR add any new test cases?
    • Yes
    • No
  • Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/.)
    • Yes
    • No, does the documentation need to be updated at a later time?
      • Yes
      • No
  • Please provide any additional information or relevant details below:
    Bottom and lateral heat fluxes are limited by the total amount of heat available for melting, and all of these terms are negative. In particular, fbot+fside<0. Therefore the value of puny needed to keep the denominator from being too small should also be negative.

Copy link
Contributor

@proteanplanet proteanplanet left a comment

Choose a reason for hiding this comment

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

I have examined the code and this is indeed a bug that needs to be fixed.

Copy link
Contributor

@njeffery njeffery left a comment

Choose a reason for hiding this comment

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

Prevents a possible NaN when abs(fbot+fside) = puny. Tested in a 5 year DTEST with round-off level differences.

@apcraig apcraig merged commit 71093e6 into CICE-Consortium:main Oct 27, 2023
1 check passed
@apcraig
Copy link
Contributor

apcraig commented Oct 27, 2023

Just want to add a note that this changes answers in all cases.

DeniseWorthen added a commit to DeniseWorthen/CICE that referenced this pull request Dec 20, 2023
Updates to Consortium/main include the following.

More accurate calculation of areafact in remapping CICE-Consortium#849. This PR implements improvements to the areafact calculation for remapping. This PR will change baselines (as expected). As noted in the 6.5 release notes, this improves C-grid solutions
Update Icepack, add snicar and snicartest tests CICE-Consortium#902. This PR includes an update to Icepack to use -puny when limiting fluxes (use -puny in denominator of scaling ratio for flux limiting  CICE-Consortium/Icepack#474). This PR will change baselines (as expected).
Update update_ocn_f implementation, Add cpl_frazil namelist CICE-Consortium#889. This PR adds a new name list configuration cpl_frazil to address an issue first noted in update_ocn_f problem CICE-Consortium/Icepack#390. In UWM the default configuration when coupled to FV3atm is ktherm=2 and update_ocn_f=true, meaning the salt and freshwater fluxes are computed in CICE and passed to MOM6. For this configuration, the default of cpl_frazil will be fresh_ice_corr. Testing has shown this PR alone does not change answers in UWM for either the ktherm=1 or ktherm=2 cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants