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 BGC and Icepack interfaces #968

Merged
merged 9 commits into from
Sep 16, 2024
Merged

Conversation

apcraig
Copy link
Contributor

@apcraig apcraig commented Aug 9, 2024

PR checklist

  • Short (1 sentence) summary of your PR:
    Update BGC
  • Developer(s):
    njeffery, eclare108213, 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.
    Ran full test suite on Derecho with 5 compilers. Results are as expected. skl tests are removed, zaero tests are added.
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit
    • different at roundoff level
    • more substantial for BGC
  • Does this PR create or have dependencies on Icepack or any other models?
    • Yes, requires update to Icepack
    • No
  • Does this PR update the Icepack submodule? If so, the Icepack submodule must point to a hash on Icepack's main branch.
    • Yes
    • No
  • Does this PR add any new test cases?
    • Yes, remove skl, add zaero tests
    • 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/. A test build of the technical docs will be performed as part of the PR testing.)
    • 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.

Deprecate skl BGC but leave code alone for now hoping we get help from the community to validate the latest code.

Update interfaces and bgc settings consistent with new version of Icepack BGC.

    icepack_aerosol.F90
        revised subroutine update_snow_bgc
    icepack_algae.F90
        revised subroutine zbio
        revised subroutine z_biogeochemistry
        revised subroutine algal_dyn
        add subroutine bgc_carbon_sum
    icepack_brine.F90
        revise subroutine prepare_hbrine
        revise subroutine update_hbrine
    icepack_mechred.F90
        add mbio calculation to subroutine ridge_shift
        add flux_bio calculation to subroutine ridge_ice
    icepack_therm_itd.F90
        update calculation of dvssl and dvint in subroutine lateral_melt
    icepack_zbgc.F90
        lots of stuff
    icepack_zbgc_shared.F90
        lots of stuff

Remove redundant arguments in non-BGC interfaces.

    icepack_atmo.F90
    icepack_fsd.F90
    icepack_isotope.F90
    icepack_itd.F90
    icepack_meltpond_topo.F90
    icepack_mushy_physics.F90
    icepack_snow.F90
    icepack_therm_bl99.F90
    icepack_therm_mushy.F90
    icepack_therm_shared.F90
    icepack_therm_vertical.F90
    icepack_tracers.F90
    icepack_wavefracspec.F90

Generalize merge_fluxes to make all arguments optional

Fix bug in subroutine snow_redist computation of hsn_new when nslyr=1

Update icepack_init_zbgc call.

Update bgc namelist defaults and settings in ice_in

Update testing, remove skl tests, add zaero tests.

We still need to

  • update Icepack version
  • review bgc configurations including namelist settings
  • do more testing, full suites on multiple compilers
  • update documentation as needed
  • review failing tests
  • review bgc test suite
  • decide what to do with skl
  • validate results

Update interfaces and bgc settings consistent with new version of Icepack BGC.
@apcraig apcraig added the Icepack label Aug 9, 2024
@apcraig apcraig self-assigned this Aug 9, 2024
@apcraig
Copy link
Contributor Author

apcraig commented Aug 16, 2024

Ran a full test suite on Derecho with intel, cray, gnu compilers. All cases are bit-for-bit except the bgc cases (as expected). In addition, 31 of 60 bgc test cases do not run. 14/18 skl cases fail. 18/20 cray cases fail. 1/20 non-skl case fails with intel and 2/20 non-skl cases fail with gnu.

PASS derecho_intel_smoke_gx3_8x2_bgcz_diag1_run5day run 75.44 1.30 19.69
PASS derecho_intel_smoke_gx3_8x2_bgczm_debug_diag1 run 35.54 3.17 11.21
FAIL derecho_intel_smoke_gx3_8x1_bgcskl_debug_diag1 run -1 -1 -1
PEND derecho_intel_restart_gx1_4x2_bgcsklclim_medium run
PASS derecho_intel_restart_gx1_8x1_bgczclim_medium run 355.39 14.46 144.17
PASS derecho_intel_smoke_gx3_30x1_bgcz_histall run 19.04 0.32 2.43
FAIL derecho_intel_restart_gx3_32x1_bgcz_gx3ncarbulk_histall_iobinary_precision8 run
PEND derecho_intel_restart_gx3_16x2_bgcskl_gx3ncarbulk_histall_iobinary run
PASS derecho_intel_restart_gx3_30x1_bgczm_histall_iocdf1_ionetcdf run 76.64 1.57 12.71
PASS derecho_intel_restart_gx3_15x2_bgcskl_histall_iocdf2_ionetcdf_precision8 run 298.70 2.42 275.03
PASS derecho_intel_restart_gx3_16x2_bgczm_histall_iocdf5_iopio1_precision8 run 51.28 1.21 10.89
PEND derecho_intel_restart_gx3_30x1_bgcskl_histall_iohdf5_iopio1_precision8 run
PASS derecho_intel_restart_gx3_16x2_bgczm_histall_iopio2_iopnetcdf2 run 50.01 1.22 11.02
PEND derecho_intel_restart_gx3_30x1_bgcskl_histall_iopio2_iopnetcdf5 run
PASS derecho_intel_smoke_gx3_8x2_bgczm_reprosum_run10day run 151.33 2.58 39.65
PASS derecho_intel_smoke_gx3_8x2_bgczm_gridc_reprosum_run10day run 156.99 9.51 38.96
PASS derecho_intel_smoke_gx3_8x2_bgczm_gridcd_reprosum_run10day run 157.57 11.10 38.75
PASS derecho_intel_smoke_gx3_8x1_bgczm_cmplogrest_reprosum_run10day_thread run 104.46 2.89 37.35
PASS derecho_intel_smoke_gx3_8x1_bgczm_cmplogrest_gridc_reprosum_run10day_thread run 108.39 6.24 37.44
PASS derecho_intel_smoke_gx3_8x1_bgczm_cmplogrest_gridcd_reprosum_run10day_thread run 109.76 7.89 37.17
FAIL derecho_cray_smoke_gx3_8x2_bgcz_diag1_run5day run -1 -1 -1
FAIL derecho_cray_smoke_gx3_8x2_bgczm_debug_diag1 run -1 -1 -1
PASS derecho_cray_smoke_gx3_8x1_bgcskl_debug_diag1 run 46.99 3.00 39.26
PEND derecho_cray_restart_gx1_4x2_bgcsklclim_medium run
FAIL derecho_cray_restart_gx1_8x1_bgczclim_medium run
FAIL derecho_cray_smoke_gx3_30x1_bgcz_histall run -1 -1 -1
FAIL derecho_cray_restart_gx3_32x1_bgcz_gx3ncarbulk_histall_iobinary_precision8 run
PEND derecho_cray_restart_gx3_16x2_bgcskl_gx3ncarbulk_histall_iobinary run
FAIL derecho_cray_restart_gx3_30x1_bgczm_histall_iocdf1_ionetcdf run
PASS derecho_cray_restart_gx3_15x2_bgcskl_histall_iocdf2_ionetcdf_precision8 run 253.77 1.35 233.13
FAIL derecho_cray_restart_gx3_16x2_bgczm_histall_iocdf5_iopio1_precision8 run
FAIL derecho_cray_restart_gx3_30x1_bgcskl_histall_iohdf5_iopio1_precision8 run
FAIL derecho_cray_restart_gx3_16x2_bgczm_histall_iopio2_iopnetcdf2 run
FAIL derecho_cray_restart_gx3_30x1_bgcskl_histall_iopio2_iopnetcdf5 run
FAIL derecho_cray_smoke_gx3_8x2_bgczm_reprosum_run10day run -1 -1 -1
FAIL derecho_cray_smoke_gx3_8x2_bgczm_gridc_reprosum_run10day run -1 -1 -1
FAIL derecho_cray_smoke_gx3_8x2_bgczm_gridcd_reprosum_run10day run -1 -1 -1
FAIL derecho_cray_smoke_gx3_8x1_bgczm_cmplogrest_reprosum_run10day_thread run -1 -1 -1
FAIL derecho_cray_smoke_gx3_8x1_bgczm_cmplogrest_gridc_reprosum_run10day_thread run -1 -1 -1
FAIL derecho_cray_smoke_gx3_8x1_bgczm_cmplogrest_gridcd_reprosum_run10day_thread run -1 -1 -1
PASS derecho_gnu_smoke_gx3_8x2_bgcz_diag1_run5day run 81.16 1.37 20.86
FAIL derecho_gnu_smoke_gx3_8x2_bgczm_debug_diag1 run -1 -1 -1
FAIL derecho_gnu_smoke_gx3_8x1_bgcskl_debug_diag1 run -1 -1 -1
PEND derecho_gnu_restart_gx1_4x2_bgcsklclim_medium run
PASS derecho_gnu_restart_gx1_8x1_bgczclim_medium run 430.24 27.90 195.56
PASS derecho_gnu_smoke_gx3_30x1_bgcz_histall run 18.81 0.28 2.27
FAIL derecho_gnu_restart_gx3_32x1_bgcz_gx3ncarbulk_histall_iobinary_precision8 run
PEND derecho_gnu_restart_gx3_16x2_bgcskl_gx3ncarbulk_histall_iobinary run
PASS derecho_gnu_restart_gx3_30x1_bgczm_histall_iocdf1_ionetcdf run 77.69 1.46 12.85
PEND derecho_gnu_restart_gx3_15x2_bgcskl_histall_iocdf2_ionetcdf_precision8 run
PASS derecho_gnu_restart_gx3_16x2_bgczm_histall_iocdf5_iopio1_precision8 run 55.22 1.21 11.63
PASS derecho_gnu_restart_gx3_30x1_bgcskl_histall_iohdf5_iopio1_precision8 run 294.64 1.02 268.49
PASS derecho_gnu_restart_gx3_16x2_bgczm_histall_iopio2_iopnetcdf2 run 54.46 1.24 11.71
PEND derecho_gnu_restart_gx3_30x1_bgcskl_histall_iopio2_iopnetcdf5 run
PASS derecho_gnu_smoke_gx3_8x2_bgczm_reprosum_run10day run 163.02 2.64 41.84
PASS derecho_gnu_smoke_gx3_8x2_bgczm_gridc_reprosum_run10day run 167.07 9.98 40.72
PASS derecho_gnu_smoke_gx3_8x2_bgczm_gridcd_reprosum_run10day run 168.42 11.43 40.84
PASS derecho_gnu_smoke_gx3_8x1_bgczm_cmplogrest_reprosum_run10day_thread run 115.20 2.83 43.93
PASS derecho_gnu_smoke_gx3_8x1_bgczm_cmplogrest_gridc_reprosum_run10day_thread run 120.59 6.49 44.60
PASS derecho_gnu_smoke_gx3_8x1_bgczm_cmplogrest_gridcd_reprosum_run10day_thread run 122.12 8.10 44.31

@apcraig apcraig mentioned this pull request Aug 16, 2024
18 tasks
Refactor bgc_tracer_type initialization in CICE ice_init_column.F90,
subroutine init_zbgc, fixes implementation bug
Resynchronize unittest source code as needed (opticep/ice_init_column.F90)
@apcraig
Copy link
Contributor Author

apcraig commented Sep 13, 2024

Several changes have been made to CICE and Icepack in the last couple weeks. Icepack still needs to be updated, but a full test suite was run on Derecho with 5 and 6 compilers for CICE and Icepack respectively on Sept 12. Test results are as expected. All tests are bit-for-bit except bgc and congel. A small number of tests do fail but that's consistent with what is happening on the main trunk. These failed tests are understood (mostly hdf5 and nvhpc compiler).

I think the Icepack PR and this PR are ready to be merged if approved.

@eclare108213 eclare108213 changed the title Update BGC Update BGC and Icepack interfaces Sep 15, 2024
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 good, just one edit needed in ice_in. Do you expect the congel test to be non-BFB?

grid_o = 0.006
grid_o_t = 0.006
l_sk = 0.024
l_sk = 20.0
Copy link
Contributor

Choose a reason for hiding this comment

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

l_sk=2.0 in Icepack and in the CICE user guide

@apcraig apcraig marked this pull request as ready for review September 15, 2024 21:18
@apcraig
Copy link
Contributor Author

apcraig commented Sep 15, 2024

I fixed the default namelist.

Also, yes, the congel tests are changing answers relative to the current main. But they are only different by roundoff. This was done to preserve bit-for-bit with non-bgc and non-congel tests. From my testing, the bgc and congel changes separately preserved bit-for-bit, but when done together, they changed results (for non-bgc, non-congel cases). This must have been happening due to some compiler optimization. I refactored the congel code slightly which changes congel results to roundoff, but then the compiler ended up retaining bit-for-bit when the congel and bgc changes were both introduced for non-congel, non-bgc cases. Clear as day?

I plan to merge this tonight after some final testing.

@apcraig apcraig merged commit d9d0176 into CICE-Consortium:main Sep 16, 2024
2 checks passed
@apcraig
Copy link
Contributor Author

apcraig commented Sep 16, 2024

I merged the BGC changes. Thanks @njeffery for all your help. I know working towards merging in the Consortium versions was some extra effort. Derecho is down this week, but I will retest the merged version as soon as I can. I suspect we may have a few minor things to fix down the track, but I actually think we're in quite good shape overall at this point!

@njeffery
Copy link
Contributor

Excellent! well done @apcraig!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants