CICE-Consortium / Icepack

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

Bug in init_vertical_profile for BL99 thermodynamics #450

Closed zhaobin74 closed 9 months ago

zhaobin74 commented 1 year ago

Hi all,

In GEOS coupled model with MOM6 and CICE6, we still run BL99 thermodynamics. We recently encountered an issue. Occasionally the run crashed with "(temperature_changes)Thermo iteration does not converge" error because fluxes don't match energy change in all ice layers. The crash happens in grid cells with ice fraction of order 1.e-8 and thickness of 1cm (category 1). At the beginning of the time step when error happens, one or more middle layers have Tin close to or at Tmlt.

I managed to track down the issue is in init_vertical_profile. There zTin is computed based on enthalpy zqin and Tmlts. https://github.com/CICE-Consortium/Icepack/blob/66682a877bd902b239b333324f29531b5d117cb3/columnphysics/icepack_therm_vertical.F90#L887 In our case where it crashed, zTin gets above Tmlts, but it then is reset to be equal to Tmlts in calculate_Tin_from_qin
https://github.com/CICE-Consortium/Icepack/blob/66682a877bd902b239b333324f29531b5d117cb3/columnphysics/icepack_therm_shared.F90#L84-L85 However, enthalpy zqin is NOT recomputed based on the updated zTin=Tmlts, and that results in inconsistent ice temperature and enthalpy which is exactly the flux error in temperature_changes.

I think it is a bug to not update zqin when zTin is reset to Tmlt. In fact, there are commented code https://github.com/CICE-Consortium/Icepack/blob/66682a877bd902b239b333324f29531b5d117cb3/columnphysics/icepack_therm_vertical.F90#L972-L978 to do the enthalpy correction. After I uncomment the above code, the run went past the crash.

I understand BL99 is not the mainstream scheme used by Icepack nowadays, but still want to report it and hopefully it gets addressed. Thanks.

dabail10 commented 1 year ago

Thanks for reporting this. I will check it out.