fixed error in coast grid inp code