Index: issm/trunk-jpl/src/m/plot/applyoptions.m
===================================================================
--- issm/trunk-jpl/src/m/plot/applyoptions.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/applyoptions.m	(revision 17674)
@@ -49,5 +49,5 @@
 
 %view 
-if strcmp(meshtype(md.mesh),'3D') & ~exist(options,'layer'),
+if strcmp(meshxdim(md.mesh),'3D') & ~exist(options,'layer'),
 	view(getfieldvalue(options,'view',3));
 else
@@ -60,5 +60,5 @@
 	eval(['axis ' getfieldvalue(options,'axis')]);
 else
-	if strcmpi(meshtype(md.mesh),'2Dhorizontal') | exist(options,'layer'),
+	if strcmpi(meshxdim(md.mesh),'2Dhorizontal') | exist(options,'layer'),
 		axis tight equal;
 	else
Index: issm/trunk-jpl/src/m/plot/plot_basaldrag.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_basaldrag.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_basaldrag.m	(revision 17674)
@@ -9,5 +9,5 @@
 
 %check layer
-if strcmp(meshtype(md.mesh),'3D'),
+if meshdim(md.mesh)==3,
 	if getfieldvalue(options,'layer',1)~=1;
 		disp('plot_basaldrag warning: basal drag is displayed in the lower layer')
Index: issm/trunk-jpl/src/m/plot/plot_edges.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_edges.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_edges.m	(revision 17674)
@@ -17,5 +17,5 @@
 end
 
-if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
+if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
 	%plot mesh
 	A=elements(:,1); B=elements(:,2); C=elements(:,3); 
Index: issm/trunk-jpl/src/m/plot/plot_icefront.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_icefront.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_icefront.m	(revision 17674)
@@ -19,5 +19,5 @@
 elementzeroice=sum(zeroice(md.mesh.elements),2);
 
-if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
+if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
 	icefront=(elementice & elementnoice) & ~(elementice==2 & elementzeroice);
 
Index: issm/trunk-jpl/src/m/plot/plot_penalties.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_penalties.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_penalties.m	(revision 17674)
@@ -21,5 +21,5 @@
 end
 
-if ~strcmp(meshtype(md.mesh),'3D'),
+if ~strcmp(meshxdim(md.mesh),'3D'),
 	error('no penalties to plot for ''2d'' model');
 elseif isempty(md.penalties),
Index: issm/trunk-jpl/src/m/plot/plot_qmu_mass_flux_segments.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_qmu_mass_flux_segments.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_qmu_mass_flux_segments.m	(revision 17674)
@@ -13,5 +13,5 @@
 allsegments=md.qmu.mass_flux_segments;
 
-if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
+if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
 
 	%recover segments
Index: issm/trunk-jpl/src/m/plot/plot_referential.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_referential.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_referential.m	(revision 17674)
@@ -28,5 +28,5 @@
 Yhat=cross(Zhat,Xhat);
 
-if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
+if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
 
 	%plot mesh
Index: issm/trunk-jpl/src/m/plot/plot_section.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_section.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_section.m	(revision 17674)
@@ -203,12 +203,12 @@
 %apply options
 options=addfielddefault(options,'title','Section value');
-if (strcmp(meshtype(md.mesh),'2Dhorizontal'))
+if meshdim(md.mesh)==2
 	options=addfielddefault(options,'colorbar',0);
 end
-if ((strcmp(meshtype(md.mesh),'2Dhorizontal')) | getfieldvalue(options,'view')==2 )
+if ((meshdim(md.mesh)==2) | getfieldvalue(options,'view')==2 )
 	options=addfielddefault(options,'xlabel','Curvilinear coordinate');
 	options=addfielddefault(options,'axis','auto');
 end
-if (strcmp(meshtype(md.mesh),'3D') & getfieldvalue(options,'view')==2 )
+if (meshdim(md.mesh)==3 & getfieldvalue(options,'view')==2 )
 	options=addfielddefault(options,'ylabel','z');
 end
Index: issm/trunk-jpl/src/m/plot/plot_segments.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_segments.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_segments.m	(revision 17674)
@@ -14,5 +14,5 @@
 segments=md.mesh.segments;
 
-if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
+if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
 	%plot mesh
 	A=elements(:,1); B=elements(:,2); C=elements(:,3); 
Index: issm/trunk-jpl/src/m/plot/plot_tensor_components.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_tensor_components.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_tensor_components.m	(revision 17674)
@@ -10,9 +10,9 @@
 upperplots=fix((i-1)/width);
 if upperplots==0, leftplots=i-1; else leftplots=i-width*upperplots-1; end
-if (strcmp(meshtype(md.mesh),'2Dhorizontal'))%3 components -> 3 indexes
+if (strcmp(meshxdim(md.mesh),'2Dhorizontal'))%3 components -> 3 indexes
 	index1=4*width*upperplots+2*leftplots+1;
 	index2=index1+1;
 	index3=index1+width*2;
-elseif strcmp(meshtype(md.mesh),'3D')%6 components -> 6 indexes
+elseif meshdim(md.mesh)==3%6 components -> 6 indexes
 	index1=3*3*width*upperplots+3*leftplots+1;
 	index2=index1+1;
@@ -28,5 +28,5 @@
 [tensor.yy datatype]=processdata(md,tensor.yy,options);
 [tensor.xy datatype]=processdata(md,tensor.xy,options);
-if  strcmp(meshtype(md.mesh),'3D')
+if  meshdim(md.mesh)==3
 	[tensor.xz datatype]=processdata(md,tensor.xz,options);
 	[tensor.yz datatype]=processdata(md,tensor.yz,options);
@@ -34,5 +34,5 @@
 end
 
-if ((strcmp(meshtype(md.mesh),'2Dhorizontal'))),
+if ((strcmp(meshxdim(md.mesh),'2Dhorizontal'))),
 	subplot(2*width,2*width,index1),
 	plot_unit(x,y,z,elements,tensor.xx,is2d,isplanet,datatype,options)
Index: issm/trunk-jpl/src/m/plot/plot_tensor_principal.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_tensor_principal.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_tensor_principal.m	(revision 17674)
@@ -10,5 +10,5 @@
 upperplots=fix((i-1)/width);
 if upperplots==0, leftplots=i-1; else leftplots=i-width*upperplots-1; end
-if (strcmp(meshtype(md.mesh),'2Dhorizontal'))%3 components -> 3 indexes
+if (meshdim(md.mesh)==2)%3 components -> 3 indexes
 	index1=4*width*upperplots+2*leftplots+1;
 	index2=index1+1;
@@ -16,5 +16,5 @@
 	index4=index3+1;
 	newwidth=2*width;
-elseif strcmp(meshtype(md.mesh),'3D')%6 components -> 6 indexes
+elseif meshdim(md.mesh)==3%6 components -> 6 indexes
 	index1=3*3*width*upperplots+3*leftplots+1;
 	index2=index1+1;
@@ -31,5 +31,5 @@
 type2=[type 'axis2'];
 plot_tensor_principalaxis(md,options,newwidth,index2,tensor,type2,plot_options);
-if  strcmp(meshtype(md.mesh),'3D')
+if  meshdim(md.mesh)==3
 	type3=[type 'axis3'];
 	plot_tensor_principalaxis(md,options,newwidth,index3,tensor,type3,plot_options);
@@ -40,9 +40,9 @@
 [tensor.principalvalue1 datatype]=processdata(md,tensor.principalvalue1,options);
 [tensor.principalvalue2 datatype]=processdata(md,tensor.principalvalue2,options);
-if  strcmp(meshtype(md.mesh),'3D')
+if  meshdim(md.mesh)==3
 	[tensor.principalvalue3 datatype]=processdata(md,tensor.principalvalue3,options);
 end
 
-if ((strcmp(meshtype(md.mesh),'2Dhorizontal'))),
+if meshdim(md.mesh)==2,
 	subplot(2*width,2*width,index3)
 	plot_unit(x,y,z,elements,tensor.principalvalue1,is2d,isplanet,datatype,options)
Index: issm/trunk-jpl/src/m/plot/plot_tensor_principalaxis.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_tensor_principalaxis.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_tensor_principalaxis.m	(revision 17674)
@@ -13,5 +13,5 @@
 [x y z elements is2d isplanet]=processmesh(md,[],options);
 
-if ((strcmp(meshtype(md.mesh),'2Dhorizontal'))),
+if meshdim(md.mesh)==2,
 	eval(['Vx=tensor.principalaxis' type(end) '(:,1); Vy=tensor.principalaxis' type(end) '(:,2);'])
 	eval(['value=tensor.principalvalue' type(end) ';']);
@@ -33,5 +33,5 @@
 
 %plot quivers
-if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
+if meshdim(md.mesh)==2,
 
 	%density
Index: issm/trunk-jpl/src/m/plot/plot_transient_results.m
===================================================================
--- issm/trunk-jpl/src/m/plot/plot_transient_results.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/plot_transient_results.m	(revision 17674)
@@ -41,5 +41,5 @@
 clear string;
 
-if strcmp(meshtype(md.mesh),'3D'),
+if strcmp(meshxdim(md.mesh),'3D'),
 	string='plotmodel(md';
 	for i=1:length(md.results.transient),
@@ -67,5 +67,5 @@
 clear string;
 
-if strcmp(meshtype(md.mesh),'3D'),
+if strcmp(meshxdim(md.mesh),'3D'),
 	string='plotmodel(md';
 	for i=2:length(md.results.transient),
Index: issm/trunk-jpl/src/m/plot/processdata.m
===================================================================
--- issm/trunk-jpl/src/m/plot/processdata.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/processdata.m	(revision 17674)
@@ -23,5 +23,5 @@
 
 %special case for mesh 2dvertical
-if strcmp(meshtype(md.mesh),'2Dvertical'),
+if strcmp(meshxdim(md.mesh),'2Dvertical'),
 	[data datatype] = processdata(md.mesh,md,data,options);
 	return;
@@ -56,5 +56,5 @@
 
 %check length
-if datasize(1)~=md.mesh.numberofvertices & datasize(1)~=md.mesh.numberofelements & datasize(1)~=md.mesh.numberofvertices*6 & (strcmp(md.mesh.meshtype(),'3D') & ~(datasize(1)==numberofelements2d | datasize(1)==numberofvertices2d))
+if datasize(1)~=md.mesh.numberofvertices & datasize(1)~=md.mesh.numberofelements & datasize(1)~=md.mesh.numberofvertices*6 & (strcmp(md.mesh.meshxdim(),'3D') & ~(datasize(1)==numberofelements2d | datasize(1)==numberofvertices2d))
 	error('plotmodel error message: data not supported yet');
 end
@@ -65,5 +65,5 @@
 
 	%check number of columns, add zeros if necessary,
-	if (strcmp(md.mesh.meshtype(),'3D'))
+	if (strcmp(md.mesh.meshxdim(),'3D'))
 		if datasize(2)==2,
 			data=[data, zeros(datasize(1),1)];
@@ -85,5 +85,5 @@
 
 %treat the case datasize(1)=nodes2d
-if (strcmp(md.mesh.meshtype(),'3D') & datasize(1)==numberofvertices2d),
+if (strcmp(md.mesh.meshxdim(),'3D') & datasize(1)==numberofvertices2d),
 	data=project3d(md,'vector',data,'type','node');
 	datasize(1)=md.mesh.numberofvertices;
@@ -92,5 +92,5 @@
 
 %treat the case datasize(1)=nodes2d
-if (strcmp(md.mesh.meshtype(),'3D') & datasize(1)==numberofelements2d),
+if (strcmp(md.mesh.meshxdim(),'3D') & datasize(1)==numberofelements2d),
 	data=project3d(md,'vector',data,'type','element');
 	datasize(1)=md.mesh.numberofelements;
Index: issm/trunk-jpl/src/m/plot/processmesh.m
===================================================================
--- issm/trunk-jpl/src/m/plot/processmesh.m	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/processmesh.m	(revision 17674)
@@ -16,5 +16,5 @@
 
 %special case for mesg 2dvertical
-if strcmp(meshtype(md.mesh),'2Dvertical'),
+if strcmp(meshxdim(md.mesh),'2Dvertical'),
 	[x y z elements is2d isplanet] = processmesh(md.mesh,options);
 	return;
@@ -46,5 +46,5 @@
 
 %is it a 2d plot?
-if ~strcmp(md.mesh.meshtype(),'3D');
+if md.mesh.meshdim()==2,
 	is2d=1;
 else
Index: issm/trunk-jpl/src/m/plot/processmesh.py
===================================================================
--- issm/trunk-jpl/src/m/plot/processmesh.py	(revision 17657)
+++ issm/trunk-jpl/src/m/plot/processmesh.py	(revision 17674)
@@ -42,7 +42,7 @@
 
 		#is it a 2D plot?
-		if m.strcmp(md.mesh.meshtype(),'2Dhorizontal'):
+		if m.strcmp(md.mesh.meshxdim(),'2Dhorizontal'):
 			is2d=1
-		elif m.strcmp(md.mesh.meshtype(),'3D'):
+		elif m.strcmp(md.mesh.meshxdim(),'3D'):
 			if options.getfieldvalue('layer',0)>=1:
 				is2d=1
@@ -64,5 +64,5 @@
 	else:
 		#Process mesh for plotting 
-		if m.strcmp(md.mesh.meshtype(),'2Dhorizontal'):
+		if m.strcmp(md.mesh.meshxdim(),'2Dhorizontal'):
 			is2d=1
 		else:
