friend functions for grid slice data