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

Fix sfc_flux argument order in icepack_therm_vertical.F90 #513

Merged

Conversation

kieranricardo
Copy link
Contributor

@kieranricardo kieranricardo commented Feb 10, 2025

For detailed information about submitting Pull Requests (PRs) to the CICE-Consortium,
please refer to: https://github.com/CICE-Consortium/About-Us/wiki/Resource-Index#information-for-developers

PR checklist

  • Short (1 sentence) summary of your PR:
    Fixes set_sfcflux argument order in icepack_therm_vertical.F90, this caused errors for models using calc_tsfc=false. Addresses set_sfcflux arguments are switched in icepack_therm_vertical.F90 #512
  • Developer(s):
    Kieran Ricardo
  • 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.
    Passed GitHub actions tests: https://github.com/ACCESS-NRI/Icepack/actions/runs/13231902867/job/36930302099?pr=6
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit (except for models using calc_tsfc=false)
    • 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 document the changes in detail, including why the changes are made. This will become part of the PR commit log.

The call to set_sfcflux in icepack_therm_vertical.F90 has the fsurfn_f and fcondtopn_f arguments switched, causing issues for models using calc_Tsfc = .false.. This PR fixes these.

@anton-seaice
Copy link

This presumably will impact the CICE test that sets calc_Tsfc = .false.

If it makes sense to run CICE or Icepack tests, I can do them if that is useful @apcraig

@dabail10
Copy link
Contributor

We should definitely run the Icepack / CICE tests here to make sure it does not affect configurations with calc_Tsfc = .true. Also, if it is answer changing for calc_Tsfc = .false. then we should do a QC test in CICE.

https://cice-consortium-cice.readthedocs.io/en/main/user_guide/ug_testing.html#quadratic-skill-validation-test

Copy link
Contributor

@eclare108213 eclare108213 left a comment

Choose a reason for hiding this comment

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

Good catch, thanks.

Copy link
Contributor

@dabail10 dabail10 left a comment

Choose a reason for hiding this comment

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

I still think it would be useful to see the QC tests here.

@apcraig
Copy link
Contributor

apcraig commented Feb 13, 2025

I fired off some test suites this morning, waiting to see what they report. We have no tests for Icepack with calc_tsfc=.false. so just checking whether all tests are bit-for-bit. We do have a test in CICE with calc_tsfc=.false. so checking results for CICE too.

My understanding is that this is a bug. calc_tsfc=.true. should be bit-for-bit. calc_tsfc=.false. should change some results, but in stand-alone mode, is it just a diagnostic bug? If true, what would QC tell us? Happy to do QC if it makes sense. Are you suggesting QC if answers are not bit-for-bit with calc_tsfc=.true.?

@dabail10
Copy link
Contributor

I fired off some test suites this morning, waiting to see what they report. We have no tests for Icepack with calc_tsfc=.false. so just checking whether all tests are bit-for-bit. We do have a test in CICE with calc_tsfc=.false. so checking results for CICE too.

My understanding is that this is a bug. calc_tsfc=.true. should be bit-for-bit. calc_tsfc=.false. should change some results, but in stand-alone mode, is it just a diagnostic bug? If true, what would QC tell us? Happy to do QC if it makes sense. Are you suggesting QC if answers are not bit-for-bit with calc_tsfc=.true.?

I just think it would be good to evaluate the change with calc_tsfc = .false. If it is answer changing with calc_Tsfc = .true. then that would be an issue.

@eclare108213
Copy link
Contributor

I'm not sure that our tests are able to evaluate whether calc_Tsfc=.false. would be climate-changing, because I don't think our forcing has the fields necessary to produce results equivalent to calc_Tsfc=.true.

@dabail10
Copy link
Contributor

@kieranricardo did you evaluate this bug fix in your coupled system?

@anton-seaice
Copy link

@kieranricardo did you evaluate this bug fix in your coupled system?

The bug fixed version is the one we've been using, kieran might have records of what impact this had, but as its a bug we might not have paid too much attention to the old results

@apcraig
Copy link
Contributor

apcraig commented Feb 14, 2025

All the standalone Icepack and CICE tests are bit-for-bit based on log and restart files. It could be that some diagnostic fields on history files are not bit-for-bit, we don't check that. Are there some history fields that I should turn on and compare with/without this change? Or should we just do the merge?

@anton-seaice
Copy link

I am surprised about set_nml.alt03 ? either way, i think it's good to just merge

@apcraig
Copy link
Contributor

apcraig commented Feb 14, 2025

Yes, the alt03 results were bit-for-bit. Again, I don't think calc_tsfc affects the stand-alone model, although it might impact some diagnostic fields in the stand-alone model that might be on history files. But the prognostic state is not affected. At least that's my interpretation.

@apcraig
Copy link
Contributor

apcraig commented Feb 14, 2025

@apcraig apcraig merged commit 619d06d into CICE-Consortium:main Feb 15, 2025
2 checks passed
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.

5 participants