Glacier-climate model for recosntructing palaeoclimates