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

Update Derecho Cray, rename subroutines, minor cleanup #502

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

apcraig
Copy link
Contributor

@apcraig apcraig commented Oct 2, 2024

PR checklist

  • Short (1 sentence) summary of your PR:
    Update Derecho Cray, rename subroutines, minor cleanup

  • Developer(s):
    apcraig

  • 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.
    Full test suite on Derecho with Icepack passes all tests. Derecho cray results changes answers due to compiler changes. https://github.com/CICE-Consortium/Test-Results/wiki/icepack_by_hash_forks#ba0bc0b8f76d965aa4186bc3e4ffc7255a91e7fb. Also tested these changes in CICE, everything is bit-for-bit.

  • How much do the PR code changes differ from the unmodified code?

    • bit for bit except on Derecho cray where compiler options were changed
    • 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.

  • Update Derecho Cray, add -Rp to -O2 standard optimization to address SAME_TBS compiler bug that is triggered in limited cases. Reported issue to NCAR. -O2 -Rp changes answers relative to -O2.

  • Rename two public Icepack subroutines, but maintain backward compatibility. Update the calls in Icepack driver, but also confirmed it works fine with the old names as well as in CICE with the old names.
    Closes Icepack Interface Refactor #255

    use icepack_therm_shared  , only: icepack_init_thermo => icepack_init_salinity 
    use icepack_therm_shared  , only: icepack_init_trcr => icepack_init_enthalpy 
  • Add a check and abort for negative values in the sqrt in computation of Tin in function calculate_Tin_from_qin.
    Closes Undefined behaviour in calculate_Tin_from_qin #482

  • Refactor calls to icepack_aggregate to make them consistent. This was part of the testing for the Derecho Cray bug, and decided to keep the implementation.

  • Update comments associated with floeshape constant attribution. Change from Steele to Rothrock 1984.
    Closes Incorrect floe size reference #479

  • Clean up some of the variable declarations in subroutine set_state_var and module icedrv_state, merge multiple lines to one line and shift to assumed shape arrays where appropriate.

  • Clean up implementation error in icedrv_restart.F90, subroutine restartfile. This subroutine was using a parameter, ntrcr, directly from icepack_tracers. Switched that to a call to icepack_query_tracer_sizes.

  • Update documentation of kice noting it's use with BL99 and MU71. See kice in mushy thermodynamics #447.

  • Generate updated interface documentation (./icepack.setup --docintfc)

- Update Derecho Cray, add -Rp to -O2 standard optimization to address
SAME_TBS compiler bug that is triggered in limited cases.  Reported
issue to NCAR.  -O2 -Rp changes answers relative to -O2.

- Rename two public Icepack subroutines, but maintain backward compatibility,
      use icepack_therm_shared  , only: icepack_init_thermo => icepack_init_salinity
      use icepack_therm_shared  , only: icepack_init_trcr => icepack_init_enthalpy
Update the calls in Icepack driver, but also confirmed it works fine with the old
names as well as in CICE with the old names.
Closes CICE-Consortium#255

- Add a check and abort for negative values in the sqrt in computation of Tin in
function calculate_Tin_from_qin.
Closes CICE-Consortium#482

- Refactor calls to icepack_aggregate to make them consistent.  This was part of the
testing for the Derecho Cray bug, and decided to keep the implementation.

- Update comments associated with floeshape constant attribution.  Change from
Steele to Rothrock 1984.
Closes CICE-Consortium#479

- Clean up some of the variable declarations in subroutine set_state_var and module
icedrv_state, merge multiple lines to one line and shift to assumed shape arrays
where appropriate.

- Clean up implementation error in icedrv_restart.F90, subroutine restartfile.  This subroutine
was using a parameter, ntrcr, directly from icepack_tracers.  Switched that to a call to
icepack_query_tracer_sizes.
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.

Just one very minor comment on the current changes. If it makes sense to you @apcraig, this PR could capture a few other minor cleanup kind of things e.g.

columnphysics/icepack_therm_shared.F90 Outdated Show resolved Hide resolved
@apcraig
Copy link
Contributor Author

apcraig commented Oct 4, 2024

I updated the icepack_init_salinity documentation and the kice documentation and note those in the PR now. CICE-Consortium/CICE#972 is a CICE issue and will need to be fixed in a CICE PR. I also updated the interface documentation (overdue).

None of the most recent changes affect any code or scripts (just comments and documentation) so no retesting has been done.

@apcraig
Copy link
Contributor Author

apcraig commented Oct 10, 2024

@eclare108213 I updated and think this is ready to merge, can you have a look.

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.

Looks great. Ticks off several issues!

@apcraig apcraig merged commit f5f03b9 into CICE-Consortium:main Oct 17, 2024
2 checks passed
dabail10 pushed a commit to ESCOMP/Icepack that referenced this pull request Oct 25, 2024
…um#502)

* Update Derecho Cray, rename subroutines, minor cleanup

Update Derecho Cray, add -Rp to -O2 standard optimization to address SAME_TBS compiler bug that is triggered in limited cases. Reported issue to NCAR. -O2 -Rp changes answers relative to -O2.

Rename two public Icepack subroutines, but maintain backward compatibility. Update the calls in Icepack driver, but also confirmed it works fine with the old names as well as in CICE with the old names.
Closes CICE-Consortium#255 

    use icepack_therm_shared  , only: icepack_init_thermo => icepack_init_salinity 
    use icepack_therm_shared  , only: icepack_init_trcr => icepack_init_enthalpy 

Add a check and abort for negative values in the sqrt in computation of Tin in function calculate_Tin_from_qin.
Closes CICE-Consortium#482

Refactor calls to icepack_aggregate to make them consistent. This was part of the testing for the Derecho Cray bug, and decided to keep the implementation.

Update comments associated with floeshape constant attribution. Change from Steele to Rothrock 1984.
Closes CICE-Consortium#479

Clean up some of the variable declarations in subroutine set_state_var and module icedrv_state, merge multiple lines to one line and shift to assumed shape arrays where appropriate.

Clean up implementation error in icedrv_restart.F90, subroutine restartfile. This subroutine was using a parameter, ntrcr, directly from icepack_tracers. Switched that to a call to icepack_query_tracer_sizes.

Update documentation of kice noting it's use with BL99 and MU71. See CICE-Consortium#447.

Generate updated interface documentation (./icepack.setup --docintfc)
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.

Undefined behaviour in calculate_Tin_from_qin Incorrect floe size reference Icepack Interface Refactor
2 participants