Index: /issm/trunk-jpl/src/m/model/ismodelselfconsistent.m
===================================================================
--- /issm/trunk-jpl/src/m/model/ismodelselfconsistent.m	(revision 12663)
+++ /issm/trunk-jpl/src/m/model/ismodelselfconsistent.m	(revision 12664)
@@ -6,5 +6,5 @@
 
 %initialize consistency as true
-modelconsistency(true);
+md.private.isconsistent=true;
 
 %Get solution and associated analyses
@@ -24,17 +24,17 @@
 	%Check that current field is an object
 	if ~isobject(md.(field))
-		checkmessage(['field ''' char(field) ''' is not an object']);
+		md=checkmessage(md,['field ''' char(field) ''' is not an object']);
 	end
 
 	%Check consistency of the object
 	if verLessThan('matlab', '7.6')
-		checkconsistency(md.(field),md,solution,analyses);
+		md=checkconsistency(md.(field),md,solution,analyses);
 	else
-		md.(field).checkconsistency(md,solution,analyses);
+		md=md.(field).checkconsistency(md,solution,analyses);
 	end
 end
 
 %error message if mode is not consistent
-if modelconsistency==false,
-	error(' ');
+if md.private.isconsistent==false,
+	error('Model not consistent, see messages above');
 end
