Based on the excellent 960gridder at https://github.com/peol/960gridder, but converted to 978 grid (with other changes)