enable writing of vertical profiles and fix bug in CDF grid writing