cosmo split hdr

function ds_splits = cosmo_split(ds, split_by, dim, check)