modify error tolerance for rare mushy thermo failure #352
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a bugfix for a very infrequent failure in the mushy layer thermodynamics. The mushy temperature change iteration is currently set to a tolerance of ferrmax which is the same as the final energy conservation tolerance. Every so often, when the temperature change iteration error is very close to ferrmax, the total energy conservation will fail because of round-off level errors in the thickness routine.
@njeffery @eclare108213 @dabail10
Should not affect any of our tests -- this is expected to be BFB.
This problem turned up in MPAS-seaice and was addressed there by lowering the error tolerance in ice_therm_mushy.F90 to 0.9*ferrmax, which will likely not be BFB. Instead, we are loosening the final error tolerance comparison for this rare case, which will not affect any of our tests because they do not hit this problem (they would abort if they did). This modification will allow the code to run without aborting in this special case. See Bug in temperature_change_mushy #233.