dap4/d4core/src/main/java/dap4/core/util/DapUtil.java
static public List<Slice>
    offsetToSlices(long offset, DapVariable template)
            throws DapException
    {
        List<DapDimension> dims = template.getDimensions();
        long[] dimsizes = DapUtil.getDimSizes(dims);
        return indexToSlices(offsetToIndex(offset, dimsizes), template);
    }
static public List<Slice>
    offsetToSlices(long offset, DapVariable template)
            throws DapException
    {
        List<DapDimension> dims = template.getDimensions();
        long[] dimsizes = DapUtil.getDimSizes(dims);
        return indexToSlices(offsetToIndex(offset, dimsizes), template);
    }
Provide a helper function to convert an offset  to
a slice list.

@param offset
@param template variable template
@return
@throws dap4.core.util.DapException