The model code consits of two seperate .m files. The first one (tsfc_calc) calculates the surface energy and mass balance over snow and clean ice surfaces. The second one (tsfc_deb_calc) does the same, but for debris-covered ice. Surface temperatures are calculated by using the numerical Newton-Raphson method, while internal debris temperatures are ccalculated using a Crank-Nicholson scheme. It is written in MATLAB_R2022a.