Alllow a distance to coast file to be read in. Also modify code to prevent multiple calculations of the surface distance to coast.