Index: /issm/trunk-jpl/src/m/exp/contourlevelzero.m
===================================================================
--- /issm/trunk-jpl/src/m/exp/contourlevelzero.m	(revision 26220)
+++ /issm/trunk-jpl/src/m/exp/contourlevelzero.m	(revision 26221)
@@ -1,6 +1,6 @@
 function contours=contourlevelzero(md,mask,level)
-%CONTOURLEVELZERO - figure out the zero level (or offset thereof, specified by 
-%the level value) of a vectorial mask, and vectorialize it into an exp or shp 
-%compatible structure.
+%CONTOURLEVELZERO - figure out the zero level (or offset thereof, specified by the level value) 
+%                   of a vectorial mask, and vectorialize it into an exp or shp compatible 
+%structure.
 %
 %   Usage:
@@ -9,10 +9,7 @@
 %   See also: PLOT_CONTOUR
 
-if isempty(mask)
-	error('mask provided is empty');
-end
-
 %process data 
 if dimension(md.mesh)==3,
+% 	error('contourlevelzero error message: routine not supported for 3d meshes, project on a layer');
 	x = md.mesh.x2d;
 	y = md.mesh.y2d;
@@ -24,5 +21,5 @@
 end
 
-if isfield(md.mesh,'z'),
+if isprop(md.mesh,'z'),
 	z=md.mesh.z;
 else
@@ -30,6 +27,7 @@
 end
 
+if isempty(mask), error('mask provided is empty'); end
 if dimension(md.mesh)==3,
-	if length(mask)~=md.mesh.numberofvertices2d, error('Since this is a 3d model, you need to project the mask on a layer (e.g. project2d(md,mask,0))'); end
+	if length(mask)~=md.mesh.numberofvertices2d, error('mask provided should be specified at the vertices of the mesh'); end
 else
 	if length(mask)~=md.mesh.numberofvertices, error('mask provided should be specified at the vertices of the mesh'); end
