Index: /issm/trunk/src/m/classes/model/model.m
===================================================================
--- /issm/trunk/src/m/classes/model/model.m	(revision 9839)
+++ /issm/trunk/src/m/classes/model/model.m	(revision 9840)
@@ -133,10 +133,10 @@
 			 if isfield(structmd,'accumulation'), md.surfaceforcings.mass_balance=structmd.accumulation; end
 			 if isfield(structmd,'accumulation_rate'), md.surfaceforcings.mass_balance=structmd.accumulation_rate; end
-			 if isfield(structmd,'numberofgrids'), md.mesh.numberofverticess=structmd.numberofgrids; end
-			 if isfield(structmd,'numberofgrids2d'), md.mesh.numberofverticess2d=structmd.numberofgrids2d; end
-			 if isfield(structmd,'uppergrids'), md.uppernodes=structmd.uppergrids; end
-			 if isfield(structmd,'lowergrids'), md.lowernodes=structmd.lowergrids; end
-			 if isfield(structmd,'gridonbed'), md.nodeonbed=structmd.gridonbed; end
-			 if isfield(structmd,'gridonsurface'), md.nodeonsurface=structmd.gridonsurface; end
+			 if isfield(structmd,'numberofgrids'), md.mesh.numberofvertices=structmd.numberofgrids; end
+			 if isfield(structmd,'numberofgrids2d'), md.mesh.numberofvertices2d=structmd.numberofgrids2d; end
+			 if isfield(structmd,'uppergrids'), md.mesh.uppervertex=structmd.uppergrids; end
+			 if isfield(structmd,'lowergrids'), md.mesh.lowervertex=structmd.lowergrids; end
+			 if isfield(structmd,'gridonbed'), md.mesh.vertexonbed=structmd.gridonbed; end
+			 if isfield(structmd,'gridonsurface'), md.mesh.vertexonsurface=structmd.gridonsurface; end
 			 if isfield(structmd,'extractedgrids'), md.mesh.extractedvertices=structmd.extractedgrids; end
 			 if isfield(structmd,'gridoniceshelf'), md.mask.vertexonfloatingice=structmd.gridoniceshelf; end
@@ -205,5 +205,5 @@
 			 if isfield(structmd,'ishutter'), md.flowequation.ishutter=structmd.ishutter; end
 			 if isfield(structmd,'isstokes'), md.flowequation.isstokes=structmd.isstokes; end
-			 if isfield(structmd,'elements_type'), md.flowequation.element_equation=structmd.mesh.elements_type; end
+			 if isfield(structmd,'elements_type'), md.flowequation.element_equation=structmd.elements_type; end
 			 if isfield(structmd,'vertices_type'), md.flowequation.vertex_equation=structmd.vertices_type; end
 			 if isfield(structmd,'eps_rel'), md.steadystate.reltol=structmd.eps_rel; end
@@ -260,9 +260,9 @@
 			 if isfield(structmd,'nodeonsurface'), md.mesh.vertexonsurface=structmd.nodeonsurface; end
 			 if isfield(structmd,'nodeonbed'), md.mesh.vertexonbed=structmd.nodeonbed; end
-			 if isfield(structmd,'elements2d'), md.mesh.elements2d=structmd.mesh.elements2d; end
+			 if isfield(structmd,'elements2d'), md.mesh.elements2d=structmd.elements2d; end
 			 if isfield(structmd,'y2d'), md.mesh.y2d=structmd.y2d; end
 			 if isfield(structmd,'x2d'), md.mesh.x2d=structmd.x2d; end
-			 if isfield(structmd,'elements'), md.mesh.elements=structmd.mesh.elements; end
-			 if isfield(structmd,'edges'), md.mesh.edges=structmd.mesh.edges; end
+			 if isfield(structmd,'elements'), md.mesh.elements=structmd.elements; end
+			 if isfield(structmd,'edges'), md.mesh.edges=structmd.edges; end
 			 if isfield(structmd,'y'), md.mesh.y=structmd.y; end
 			 if isfield(structmd,'x'), md.mesh.x=structmd.x; end
@@ -278,18 +278,18 @@
 			 end
 			 if isfield(structmd,'spcvelocity'), 
-				 md.spcvx=NaN*ones(md.mesh.numberofvertices,1);
-				 md.spcvy=NaN*ones(md.mesh.numberofvertices,1);
-				 md.spcvz=NaN*ones(md.mesh.numberofvertices,1);
-				 pos=find(structmd.spcvelocity(:,1)); md.spcvx(pos)=structmd.spcvelocity(pos,4); 
-				 pos=find(structmd.spcvelocity(:,2)); md.spcvy(pos)=structmd.spcvelocity(pos,5); 
-				 pos=find(structmd.spcvelocity(:,3)); md.spcvz(pos)=structmd.spcvelocity(pos,6); 
+				 md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1);
+				 md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1);
+				 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
+				 pos=find(structmd.spcvelocity(:,1)); md.diagnostic.spcvx(pos)=structmd.spcvelocity(pos,4); 
+				 pos=find(structmd.spcvelocity(:,2)); md.diagnostic.spcvy(pos)=structmd.spcvelocity(pos,5); 
+				 pos=find(structmd.spcvelocity(:,3)); md.diagnostic.spcvz(pos)=structmd.spcvelocity(pos,6); 
 			 end
 			 if isfield(structmd,'spcvelocity'), 
-				 md.spcvx=NaN*ones(md.numberofnodes,1);
-				 md.spcvy=NaN*ones(md.numberofnodes,1);
-				 md.spcvz=NaN*ones(md.numberofnodes,1);
-				 pos=find(structmd.spcvelocity(:,1)); md.spcvx(pos)=structmd.spcvelocity(pos,4); 
-				 pos=find(structmd.spcvelocity(:,2)); md.spcvy(pos)=structmd.spcvelocity(pos,5); 
-				 pos=find(structmd.spcvelocity(:,3)); md.spcvz(pos)=structmd.spcvelocity(pos,6); 
+				 md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1);
+				 md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1);
+				 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
+				 pos=find(structmd.spcvelocity(:,1)); md.diagnostic.spcvx(pos)=structmd.spcvelocity(pos,4); 
+				 pos=find(structmd.spcvelocity(:,2)); md.diagnostic.spcvy(pos)=structmd.spcvelocity(pos,5); 
+				 pos=find(structmd.spcvelocity(:,3)); md.diagnostic.spcvz(pos)=structmd.spcvelocity(pos,6); 
 			 end
 			 if ismember(structmd.pressureload(end,end),[118 119 120]),
@@ -298,13 +298,13 @@
 				 pos=find(structmd.pressureload(:,end)==119); md.pressureload(pos,end)=2;
 			 end
-			 if (structmd.mesh.elements_type(end,end)>100),
-				 pos=find(structmd.mesh.elements_type==59); md.mesh.elements_type(pos,end)=0;
-				 pos=find(structmd.mesh.elements_type==55); md.mesh.elements_type(pos,end)=1;
-				 pos=find(structmd.mesh.elements_type==56); md.mesh.elements_type(pos,end)=2;
-				 pos=find(structmd.mesh.elements_type==60); md.mesh.elements_type(pos,end)=3;
-				 pos=find(structmd.mesh.elements_type==62); md.mesh.elements_type(pos,end)=4;
-				 pos=find(structmd.mesh.elements_type==57); md.mesh.elements_type(pos,end)=5;
-				 pos=find(structmd.mesh.elements_type==58); md.mesh.elements_type(pos,end)=6;
-				 pos=find(structmd.mesh.elements_type==61); md.mesh.elements_type(pos,end)=7;
+			 if (structmd.elements_type(end,end)>100),
+				 pos=find(structmd.elements_type==59); md.mesh.elements_type(pos,end)=0;
+				 pos=find(structmd.elements_type==55); md.mesh.elements_type(pos,end)=1;
+				 pos=find(structmd.elements_type==56); md.mesh.elements_type(pos,end)=2;
+				 pos=find(structmd.elements_type==60); md.mesh.elements_type(pos,end)=3;
+				 pos=find(structmd.elements_type==62); md.mesh.elements_type(pos,end)=4;
+				 pos=find(structmd.elements_type==57); md.mesh.elements_type(pos,end)=5;
+				 pos=find(structmd.elements_type==58); md.mesh.elements_type(pos,end)=6;
+				 pos=find(structmd.elements_type==61); md.mesh.elements_type(pos,end)=7;
 			 end
 			 if isfield(structmd,'rheology_law') & isnumeric(structmd.rheology_law),
@@ -345,5 +345,5 @@
 			 end
 			 if ~isfield(structmd,'diagnostic_ref');
-				 md.diagnostic_ref=NaN*ones(md.mesh.numberofvertices2d,6);
+				 md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices2d,6);
 			 end
 		 end% }}}
