function sliced_pruned_ds = cosmo_dim_slice(ds, to_select, dim)
cosmo dim rename hdr
cosmo dim transpose hdr