Index: /issm/trunk-jpl/src/m/classes/mesh.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/mesh.m	(revision 12959)
+++ /issm/trunk-jpl/src/m/classes/mesh.m	(revision 12960)
@@ -87,4 +87,8 @@
 			md = checkfield(md,'mesh.vertexonbed','size',[md.mesh.numberofvertices 1],'values',[0 1]);
 			md = checkfield(md,'mesh.vertexonsurface','size',[md.mesh.numberofvertices 1],'values',[0 1]);
+			if (md.mesh.dimension==3),
+				md = checkfield(md,'mesh.z','>=',md.geometry.bed,'message','''mesh.z'' should be above the bed');
+				md = checkfield(md,'mesh.z','<=',md.geometry.surface,'message','''mesh.z'' should be below the ice surface');
+			end
 			if (md.mesh.dimension==2),
 				md = checkfield(md,'mesh.average_vertex_connectivity','>=',9,'message','''mesh.average_vertex_connectivity'' should be at least 9 in 2d');
Index: /issm/trunk-jpl/src/m/utils/consistency/checkfield.m
===================================================================
--- /issm/trunk-jpl/src/m/utils/consistency/checkfield.m	(revision 12959)
+++ /issm/trunk-jpl/src/m/utils/consistency/checkfield.m	(revision 12960)
@@ -136,5 +136,5 @@
 	if any(field2<lowerbound),
 		md = checkmessage(md,getfieldvalue(options,'message',...
-			['field ''' fieldname ''' should have values above ' num2str(lowerbound)]));
+			['field ''' fieldname ''' should have values above ' num2str(lowerbound(1,1))]));
 	end
 end
@@ -144,5 +144,5 @@
 	if any(field2<=lowerbound),
 		md = checkmessage(md,getfieldvalue(options,'message',...
-			['field ''' fieldname ''' should have values above ' num2str(lowerbound)]));
+			['field ''' fieldname ''' should have values above ' num2str(lowerbound(1,1))]));
 	end
 end
@@ -154,5 +154,5 @@
 	if any(field2>upperbound),
 		md = checkmessage(md,getfieldvalue(options,'message',...
-			['field ''' fieldname ''' should have values below ' num2str(upperbound)]));
+			['field ''' fieldname ''' should have values below ' num2str(upperbound(1,1))]));
 	end
 end
@@ -162,5 +162,5 @@
 	if any(field2>=upperbound),
 		md = checkmessage(md,getfieldvalue(options,'message',...
-			['field ''' fieldname ''' should have values below ' num2str(upperbound)]));
+			['field ''' fieldname ''' should have values below ' num2str(upperbound(1,1))]));
 	end
 end
