CICE-Consortium / Icepack

Development repository for sea-ice column physics
Other
25 stars 133 forks source link

Deprecate 0-layer thermodynamics #394

Closed eclare108213 closed 2 years ago

eclare108213 commented 2 years ago

In this initial deprecation step, code is removed via cpp flags so that it can easily be reinstated if necessary. Documentation is more difficult to comment out but changes are made there also.

The intent is for this cpp'd code to be released, and then for these changes to be made permanent in a followup release, removing all of the cpp'd code, the cpp flags, and the entire icepack_therm_0layer.F90 module. The initial code release allows for feedback from the user community earlier during the process, before the proposed changes become more difficult to reinstate. (So speak up!)

165 measured results of 165 total results 161 of 165 tests PASSED 0 of 165 tests PENDING 0 of 165 tests MISSING data 4 of 165 tests FAILED

Failures are due to changed namelist values, as expected: FAIL badger_intel_smoke_col_1x1_alt01_debug_run1year compare depr_baseline different-data FAIL badger_intel_smoke_col_1x1_alt02_debug_run1year compare depr_baseline different-data FAIL badger_intel_restart_col_1x1_alt01 compare depr_baseline different-data FAIL badger_intel_restart_col_1x1_alt02 compare depr_baseline different-data

This PR uses the UNDEPRECATE_0LAYER cpp flag to remove the 0-layer thermodynamics (ktherm=0) from icepack_therm_0layer.F90 and calls to it. It also removes the internally defined heat_capacity option, which is always false when ktherm=0 and true for the other thermodynamic options. The parameter kseaice is specific to the 0-layer thermodynamics and therefore also removed. The only namelist change for the 0-layer thermo deprecation is to ktherm. To undeprecate the 0-layer option, set -DUNDEPRECATE_0LAYER in icepack.settings' CPPDEFS and adjust namelist values as needed.

Also updates a machine file for badger.

Code and documentation related to the old ridging participation and redistribution functions was also deprecated, and then reverted (not deprecated). See comments below.

eclare108213 commented 2 years ago

Thanks. I'm struggling to get the testing set up and working. The baseline runs don't complete on my laptop, and I'm not sure if the problem is the code or the laptop -- no info in the output. Could you pull down this branch and try it, quickly? I'll try badger.

eclare108213 commented 2 years ago

readthedocs output is here https://cice-consortium-icepack--394.org.readthedocs.build/en/394/ (click on Details above?)

dabail10 commented 2 years ago

Ok. Just set off the base_suite on cheyenne.

eclare108213 commented 2 years ago

@dabail10 ran the icepack base suite on cheyenne and got the following:

165 measured results of 165 total results 160 of 165 tests PASSED 0 of 165 tests PENDING 1 of 165 tests MISSING data 4 of 165 tests FAILED

The fails are because the ktherm value changes in alt01 and alt02:

FAIL cheyenne_intel_smoke_col_1x1_alt01_debug_run1year compare icepack.76ecd418d2.220716-085004 different-data FAIL cheyenne_intel_smoke_col_1x1_alt02_debug_run1year compare icepack.76ecd418d2.220716-085004 different-data FAIL cheyenne_intel_restart_col_1x1_alt01 compare icepack.76ecd418d2.220716-085004 different-data FAIL cheyenne_intel_restart_col_1x1_alt02 compare icepack.76ecd418d2.220716-085004 different-data

The missing is the snwITDrdg/snwgrain test. Why is this not in the standard tests?

kshedstrom commented 2 years ago

I'd like to note that when using the ridging scheme from within SIS2, I have found the new ridging options to be unstable while the old ones are not. For example:

WARNING from PE     4: Negative ice volume after ridging:    181    13    9.2766E-57 -7.3863E-67
FATAL from PE     4: Input to adjust_ice_categories, non-zero snow mass rests atop no ice.

This is a month and a half into a regional run - I haven't thoroughly investigated this, but I could.

eclare108213 commented 2 years ago

@kshedstrom Thanks for the heads-up. I wasn't aware of any issues like this, and I'm interested to know what the situation is in your model configuration that instigates it. We are planning to do some further development on the ridging scheme, and so keeping the old ridging functions as a backup/alternative for comparisons seems wise. I'll undeprecate the krdg options before we merge this PR. Thank you!

kshedstrom commented 2 years ago

Thank you!

The case has aicen going into the ridging with: (5.1e-10, 3.1e-19, 0, 9.27e-57, 0) vicen = (2.9e-17, 7.2e-29, 0, 9.3e-67, 0)

After ridging: aicen = (5.1e-10, 3.1e-19, 0, 9.27e-57, 4.16e-66) vicen = (2.9e-17, 8.0e-26, 0, -7.4e-67, 2.9e-66)

Clearly, these are tiny scraps of ice which don't necessarily need to ridge. In my SIS2 code, the negative number gets set to zero, but then it can't support the tiniest scrap of snow - something we can disappear as well.

eclare108213 commented 2 years ago

Ah, the residual ice issue. See https://github.com/CICE-Consortium/CICE/issues/645. Please, if you have a chance, put your configuration in a comment in that issue. I'd really like to know why the ocean isn't melting these very tiny scraps of ice! Maybe we should force it to do so, i.e. just zap the ice that is smaller than the dynamics and/or thermodynamics minimum concentration and/or volume (there are limits for numerical stability), and track it for conservation. Thanks!

kshedstrom commented 2 years ago

Note that my troubles are in MOM6-SIS2, just calling Icepack for the ice ridging. I would have to ask @GFDL-Hallberg about conservatively dealing with this.

kshedstrom commented 2 years ago

I mean @Hallberg-NOAA