Index: ../trunk-jpl/src/m/contrib/netCDF/export_netCDF.py
===================================================================
--- ../trunk-jpl/src/m/contrib/netCDF/export_netCDF.py	(revision 18864)
+++ ../trunk-jpl/src/m/contrib/netCDF/export_netCDF.py	(revision 18865)
@@ -85,11 +85,14 @@
 				freq=step_args[1]
 				vartab=var
 				for time in range(freq-1,last,freq):
-					timevar=md.results.__dict__[supfield].__getitem__(time).__dict__[field]
-					#print 'Treating '+str(group)+'.'+str(supfield)+'.'+str(field)+' for time '+str(time)
-					vartab=numpy.column_stack((vartab,timevar))
-				print numpy.shape(ncvar)
-				ncvar[:,:]=vartab
+					if time!=0:
+						timevar=md.results.__dict__[supfield].__getitem__(time).__dict__[field]
+#						print 'Treating '+str(group)+'.'+str(supfield)+'.'+str(field)+' for time '+str(time)
+						vartab=numpy.column_stack((vartab,timevar))
+				try:
+					ncvar[:,:]=vartab[:,:]
+				except ValueError:
+					ncvar[:]=vartab.T[:]
 			else:
 				try:
 					nan_val=numpy.isnan(var)
@@ -168,19 +171,17 @@
 					#grab first time step
 					subfields=dict.keys(md.results.__dict__[supfield].__getitem__(0).__dict__)
 					for field in subfields:
-#						print 'Treating '+str(group)+'.'+str(supfield)+'.'+str(field)+' for time '+str(0)
 						if str(field)!='errlog' and str(field)!='outlog' and str(field)!='SolutionType':
 							Var=md.results.__dict__[supfield].__getitem__(0).__dict__[field]
 							CreateVar(Var,True,last_step,step_freq)
-#							print 'Treating '+str(group)+'.'+str(supfield)+'.'+str(field)+' for time '+str(0)
 					
 				elif type(md.results.__dict__[supfield])==results:#only one timestep
 					subfields=dict.keys(md.results.__dict__[supfield].__dict__)
 					for field in subfields:
 						if str(field)!='errlog' and str(field)!='outlog' and str(field)!='SolutionType':
+#							print 'Treating '+str(group)+'.'+str(supfield)+'.'+str(field)
 							Var=md.results.__dict__[supfield].__dict__[field]
 							CreateVar(Var,False)
-#							print 'Treating '+str(group)+'.'+str(supfield)+'.'+str(field)
 				else:
 					print 'Result format not suported'
 		else:
