Skip to content

Update icedrv_init.F90 to read in dynamics_nml - #568

Merged
apcraig merged 2 commits into
CICE-Consortium:mainfrom
Marek-Muchow:fix-dynamic-nml
Oct 1, 2026
Merged

apcraig merged 2 commits into
CICE-Consortium:mainfrom
Marek-Muchow:fix-dynamic-nml

Conversation

@Marek-Muchow

@Marek-Muchow Marek-Muchow commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

PR checklist

  • Short (1 sentence) summary of your PR:
    This fixes loading the dynamics_nml, which was defined in icedrv_init.F90, but not loaded from icepack_in (in the stand-alone version).
  • Developer(s): Marek-Muchow
  • 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.
    These changes are not bit-for-bit in standalone Icepack, as expected. The tests that fail are
FAIL derecho_intel_smoke_col_1x1_alt04_debug_run1year compare icepack.a348e4c1e1.260926-163539 different-data
FAIL derecho_intel_smoke_col_1x1_debug_dyn_run1year compare icepack.a348e4c1e1.260926-163539 different-data
FAIL derecho_intel_smoke_col_1x1_debug_dyn_fluxopenw_run1year compare icepack.a348e4c1e1.260926-163539 different-data
FAIL derecho_intel_restart_col_1x1_alt04 compare icepack.a348e4c1e1.260926-163539 different-data
FAIL derecho_intel_restart_col_1x1_dyn compare icepack.a348e4c1e1.260926-163539 different-data

https://github.com/CICE-Consortium/Test-Results/wiki/icepack_by_hash_forks#856974a8d484e22743d5ec11f9e660696e0e0189

  • How much do the PR code changes differ from the unmodified code?
    • bit for bit
    • different at roundoff level
    • more substantial, this fixes a bug associated with not reading the dyn_nml. those variables were always defaults. see above for affected cases.
  • 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 dynamics_nml was defined, but not loaded from icepack_in (when using icepack in the stand alone version). Thus, the variables in dynamics_nml were always set to the default parameters and flexibility in the code (for example switching between the ice strength parametrisations (kstrength = 1 or 0) and ridging schemes (krdg_redist = 1 or 0) was not possible via icepack_in).

Problem was also mentioned in the Forum (https://bb.cgd.ucar.edu/cesm/threads/icepack-stand-alone-dynamics_nml-from-icepack_in-get-overwritten-by-default-parameters.12290/).

The dynamics_nml was defined, but not loaded from icepack_in. Thus, the variables in dynamics_nml were always set to the default parameters.
@apcraig

apcraig commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

In standalone Icepack, there is no dynamics. That's probably why it's not read in. Are there namelist settings in dyn_nml that matter for standalone Icepack?

@eclare108213 eclare108213 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch. It would be helpful to have results from Icepack's base_suite, which includes tests with different values of the dynamics options. If I understand the problem correctly, some of the base_suite results will be non-BFB, indicative of the error. Instructions for running test suites can be found here. Let us know if you have questions or need other help with this. Thank you for finding and fixing the problem!

@eclare108213

Copy link
Copy Markdown
Contributor

In standalone Icepack, there is no dynamics. That's probably why it's not read in. Are there namelist settings in dyn_nml that matter for standalone Icepack?

Icepack owns some dynamics-related things like ice strength, ridging, and surface stress calculations, even though it does not calculate internal stress / momentum / advection.

@apcraig

apcraig commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

I'll run a test suite then approve and merge if things go as expected. Thanks!

@apcraig

apcraig commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

I ran a full standalone Icepack test suite on derecho, https://github.com/CICE-Consortium/Test-Results/wiki/icepack_by_hash_forks#856974a8d484e22743d5ec11f9e660696e0e0189. All tests pass, but five cases are NOT bit-for-bit,

FAIL derecho_intel_smoke_col_1x1_alt04_debug_run1year compare icepack.a348e4c1e1.260926-163539 different-data
FAIL derecho_intel_smoke_col_1x1_debug_dyn_run1year compare icepack.a348e4c1e1.260926-163539 different-data
FAIL derecho_intel_smoke_col_1x1_debug_dyn_fluxopenw_run1year compare icepack.a348e4c1e1.260926-163539 different-data
FAIL derecho_intel_restart_col_1x1_alt04 compare icepack.a348e4c1e1.260926-163539 different-data
FAIL derecho_intel_restart_col_1x1_dyn compare icepack.a348e4c1e1.260926-163539 different-data

I think this is expected. I have updated the PR notes. I think this is ready to merge.

@apcraig apcraig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a quick request, could you add

write(nu_diag,*) subname,' Reading dynamics_nml'

as the first line of the new code to provide output and be consistent with output from the other namelists.

@Marek-Muchow
Marek-Muchow requested a review from apcraig October 1, 2026 07:17
@Marek-Muchow

Marek-Muchow commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Just a quick request, could you add

write(nu_diag,*) subname,' Reading dynamics_nml'

as the first line of the new code to provide output and be consistent with output from the other namelists.

Yes, I have added and committed it to the branch. Also, thanks for running the test suite. I assume I do not need to run any test suites anymore now?

@apcraig apcraig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update, I reran some tests with this change and as expected, everything compilers and runs. I will merge once github actions completes.

@apcraig
apcraig merged commit f3eddbd into CICE-Consortium:main Oct 1, 2026
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.

3 participants