Index: issm/trunk-jpl/src/m/classes/SMBgemb.m
===================================================================
--- issm/trunk-jpl/src/m/classes/SMBgemb.m	(revision 20407)
+++ issm/trunk-jpl/src/m/classes/SMBgemb.m	(revision 20690)
@@ -256,52 +256,52 @@
 			
 		end % }}}
-		function marshall(self,md,fid) % {{{
+		function marshall(self,prefix,md,fid) % {{{
 
 			yts=365.25*24.0*3600.0;
 
-			WriteData(fid,'enum',SmbEnum(),'data',SMBgembEnum(),'format','Integer');
-			
-			WriteData(fid,'object',self,'class','smb','fieldname','isgraingrowth','format','Boolean');
-			WriteData(fid,'object',self,'class','smb','fieldname','isalbedo','format','Boolean');
-			WriteData(fid,'object',self,'class','smb','fieldname','isshortwave','format','Boolean');
-			WriteData(fid,'object',self,'class','smb','fieldname','isthermal','format','Boolean');
-			WriteData(fid,'object',self,'class','smb','fieldname','isaccumulation','format','Boolean');
-			WriteData(fid,'object',self,'class','smb','fieldname','ismelt','format','Boolean');
-			WriteData(fid,'object',self,'class','smb','fieldname','isdensification','format','Boolean');
-			WriteData(fid,'object',self,'class','smb','fieldname','isturbulentflux','format','Boolean');
-			WriteData(fid,'object',self,'class','smb','fieldname','isgraingrowth','format','Boolean');
-			WriteData(fid,'object',self,'class','smb','fieldname','isgraingrowth','format','Boolean');
-			
-			WriteData(fid,'object',self,'class','smb','fieldname','Ta','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
-			WriteData(fid,'object',self,'class','smb','fieldname','V','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
-			WriteData(fid,'object',self,'class','smb','fieldname','dswrf','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
-			WriteData(fid,'object',self,'class','smb','fieldname','dlwrf','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
-			WriteData(fid,'object',self,'class','smb','fieldname','P','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
-			WriteData(fid,'object',self,'class','smb','fieldname','eAir','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
-			WriteData(fid,'object',self,'class','smb','fieldname','pAir','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
-			
-			WriteData(fid,'object',self,'class','smb','fieldname','Tmean','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',self,'class','smb','fieldname','C','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',self,'class','smb','fieldname','Tz','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',self,'class','smb','fieldname','Vz','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',self,'class','smb','fieldname','zTop','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',self,'class','smb','fieldname','dzTop','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',self,'class','smb','fieldname','dzMin','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',self,'class','smb','fieldname','zY','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',self,'class','smb','fieldname','zMax','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',self,'class','smb','fieldname','zMin','format','DoubleMat','mattype',2);
-		
-			WriteData(fid,'object',self,'class','smb','fieldname','aIdx','format','Integer');
-			WriteData(fid,'object',self,'class','smb','fieldname','swIdx','format','Integer');
-			WriteData(fid,'object',self,'class','smb','fieldname','denIdx','format','Integer');
-			WriteData(fid,'object',self,'class','smb','fieldname','InitDensityScaling','format','Double');
-
-			WriteData(fid,'object',self,'class','smb','fieldname','outputFreq','format','Double');
-			WriteData(fid,'object',self,'class','smb','fieldname','aSnow','format','Double');
-			WriteData(fid,'object',self,'class','smb','fieldname','aIce','format','Double');
-			WriteData(fid,'object',self,'class','smb','fieldname','cldFrac','format','Double');
-			WriteData(fid,'object',self,'class','smb','fieldname','t0wet','format','Double');
-			WriteData(fid,'object',self,'class','smb','fieldname','t0dry','format','Double');
-			WriteData(fid,'object',self,'class','smb','fieldname','K','format','Double');
+			WriteData(fid,prefix,'name','md.smb.model','data',SMBgembEnum(),'format','Integer');
+			
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isgraingrowth','format','Boolean');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isalbedo','format','Boolean');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isshortwave','format','Boolean');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isthermal','format','Boolean');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isaccumulation','format','Boolean');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','ismelt','format','Boolean');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isdensification','format','Boolean');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isturbulentflux','format','Boolean');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isgraingrowth','format','Boolean');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isgraingrowth','format','Boolean');
+			
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Ta','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','V','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','dswrf','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','dlwrf','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','P','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','eAir','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','pAir','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1);
+			
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Tmean','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','C','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Tz','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Vz','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','zTop','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','dzTop','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','dzMin','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','zY','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','zMax','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','zMin','format','DoubleMat','mattype',2);
+		
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','aIdx','format','Integer');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','swIdx','format','Integer');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','denIdx','format','Integer');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','InitDensityScaling','format','Double');
+
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','outputFreq','format','Double');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','aSnow','format','Double');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','aIce','format','Double');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','cldFrac','format','Double');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','t0wet','format','Double');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','t0dry','format','Double');
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','K','format','Double');
 
 			%figure out dt from forcings: 
@@ -309,5 +309,5 @@
 			dtime=diff(time,1);
 			dt=min(dtime);
-			WriteData(fid,'data',dt,'enum',SmbDtEnum,'format','Double','scale',yts);
+			WriteData(fid,prefix,'data',dt,'name','md.smb.dt','format','Double','scale',yts);
 			
 			%process requested outputs
@@ -318,5 +318,5 @@
 				outputs      = [outputs defaultoutputs(self,md)]; %add defaults
 			end
-			WriteData(fid,'data',outputs,'enum',SmbRequestedOutputsEnum,'format','StringArray');
+			WriteData(fid,prefix,'data',outputs,'name','md.smb.requested_outputs','format','StringArray');
 		end % }}}
 	end
