Fix bug in reduce2grid re format of attributes