modified optimize_surface_exact to call teos-10 functions