A mass and thermodynamic model for sea ice