cosmo unflatten hdr

function [arr, dim_labels, dim_values] = cosmo_unflatten(ds, dim, varargin)