Total gas content and surface elevation of polar ice sheets