grid ancillary functions