code for dumping grid files into ascii