cosmo dim slice hdr

function sliced_pruned_ds = cosmo_dim_slice(ds, to_select, dim)