initial check-in for extract_grids script