Index: /issm/trunk/src/m/classes/balancethickness.m
===================================================================
--- /issm/trunk/src/m/classes/balancethickness.m	(revision 9750)
+++ /issm/trunk/src/m/classes/balancethickness.m	(revision 9751)
@@ -40,5 +40,7 @@
 		end % }}}
 		function checkconsistency(obj,md) % {{{
-
+			if ~ismember(md.balancethickness.stabilization,[0 1 3]),
+				checkmessage('model not consistent: balancethickness.stabilization should be a scalar (0 or 1 or 3)');
+			end
 		end % }}}
 	end
Index: /issm/trunk/src/m/classes/clusters/castor.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/castor.m	(revision 9750)
+++ /issm/trunk/src/m/classes/clusters/castor.m	(revision 9751)
@@ -46,5 +46,5 @@
 		 end
 		 %}}}
-		 function IsConsistent(cluster) % {{{1
+		 function checkconsistency(cluster,md) % {{{1
 
 			 available_queues={'shortc','longc'};
Index: /issm/trunk/src/m/classes/clusters/cosmos.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/cosmos.m	(revision 9750)
+++ /issm/trunk/src/m/classes/clusters/cosmos.m	(revision 9751)
@@ -46,5 +46,5 @@
 		 end
 		 %}}}
-		 function IsConsistent(cluster) % {{{1
+		 function checkconsistency(cluster,md) % {{{1
 
 			 available_queues={'debug','shortq','longq'};
Index: /issm/trunk/src/m/classes/clusters/gemini.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/gemini.m	(revision 9750)
+++ /issm/trunk/src/m/classes/clusters/gemini.m	(revision 9751)
@@ -46,5 +46,5 @@
 		 end
 		 %}}}
-		 function IsConsistent(cluster) % {{{1
+		 function checkconsistency(cluster,md) % {{{1
 
 			 available_queues={'debug','shortg','longg'};
Index: /issm/trunk/src/m/classes/clusters/generic.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/generic.m	(revision 9750)
+++ /issm/trunk/src/m/classes/clusters/generic.m	(revision 9751)
@@ -60,10 +60,10 @@
 		 end
 		 %}}}
-		 function IsConsistent(cluster) % {{{1
+		 function checkconsistency(cluster,md) % {{{1
 			 if cluster.np<1
-				 error(['number of processors should be at least 1']);
+				 checkmessage(['number of processors should be at least 1']);
 			 end
 			 if isnan(cluster.np),
-				 error('number of processors should not be NaN!');
+				 checkessage('number of processors should not be NaN!');
 			 end
 		 end
Index: /issm/trunk/src/m/classes/clusters/none.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/none.m	(revision 9750)
+++ /issm/trunk/src/m/classes/clusters/none.m	(revision 9751)
@@ -30,5 +30,5 @@
 		 end
 		 %}}}
-		 function IsConsistent(cluster) % {{{1
+		 function checkconsistency(cluster,md) % {{{1
 		 end
 		 %}}}
Index: /issm/trunk/src/m/classes/clusters/pfe.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/pfe.m	(revision 9750)
+++ /issm/trunk/src/m/classes/clusters/pfe.m	(revision 9751)
@@ -65,5 +65,5 @@
 		 end
 		 %}}}
-		 function IsConsistent(cluster) % {{{1
+		 function checkconsistency(cluster,md) % {{{1
 
 			 available_queues={'long','debug'};
@@ -77,9 +77,9 @@
 				 if cluster.hyperthreading,
 					 if ((cluster.cpuspernode>16 ) | (cluster.cpuspernode<1)),
-						 error('IsConsistent error message: cpuspernode should be between 1 and 16 for ''neh'' and ''har'' processors in hyperthreading mode');
+						 checkmessage('cpuspernode should be between 1 and 16 for ''neh'' and ''har'' processors in hyperthreading mode');
 					 end
 				 else
 					 if ((cluster.cpuspernode>8 ) | (cluster.cpuspernode<1)),
-						 error('IsConsistent error message: cpuspernode should be between 1 and 8 for ''neh'' and ''har'' processors');
+						 checkmessage('cpuspernode should be between 1 and 8 for ''neh'' and ''har'' processors');
 					 end
 				 end
@@ -87,19 +87,19 @@
 				 if cluster.hyperthreading,
 					 if ((cluster.cpuspernode>24 ) | (cluster.cpuspernode<1)),
-						 error('IsConsistent error message: cpuspernode should be between 1 and 24 for ''wes'' processors in hyperthreading mode');
+						 checkmessage('cpuspernode should be between 1 and 24 for ''wes'' processors in hyperthreading mode');
 					 end
 				 else
 					 if ((cluster.cpuspernode>12 ) | (cluster.cpuspernode<1)),
-						 error('IsConsistent error message: cpuspernode should be between 1 and 12 for ''wes'' processors');
+						 checkmessage('cpuspernode should be between 1 and 12 for ''wes'' processors');
 					 end
 				 end
 			 else
-				 error('IsConsistent error message: unknown processor type, should be ''neh'',''wes'' or ''har''');
+				 checkmessage('unknown processor type, should be ''neh'',''wes'' or ''har''');
 			 end
 
 			 %Miscelaneous
-			 if isempty(cluster.login), error('IsConsistent error message: login empty'); end
-			 if isempty(cluster.codepath), error('IsConsistent error message: codepath empty'); end
-			 if isempty(cluster.executionpath), error('IsConsistent error message: executionpath empty'); end
+			 if isempty(cluster.login), checkmessage('login empty'); end
+			 if isempty(cluster.codepath), checkmessage('codepath empty'); end
+			 if isempty(cluster.executionpath), checkmessage('executionpath empty'); end
 
 		 end
Index: /issm/trunk/src/m/classes/clusters/pollux.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/pollux.m	(revision 9750)
+++ /issm/trunk/src/m/classes/clusters/pollux.m	(revision 9751)
@@ -46,5 +46,5 @@
 		 end
 		 %}}}
-		 function IsConsistent(cluster) % {{{1
+		 function checkconsistency(cluster,md) % {{{1
 
 			 available_queues={'shortp','longp'};
Index: /issm/trunk/src/m/classes/groundingline.m
===================================================================
--- /issm/trunk/src/m/classes/groundingline.m	(revision 9750)
+++ /issm/trunk/src/m/classes/groundingline.m	(revision 9751)
@@ -44,4 +44,24 @@
 		function checkconsistency(obj,md) % {{{
 
+			if ~ismember({obj.migration},{'None' 'AgressiveMigration' 'SoftMigration'}),
+				checkmessage(['groundingline.migration field should be ''None'' ''AgressiveMigration'' or ''SoftMigration''']);
+			end
+			if ~strcmp(obj.migration,'None'),
+				if (md.mesh.dimension==3 | strcmpi(md.cluster.name,'none')),
+					checkmessage(['requesting grounding line migration, but grounding line module only implemented for 2d models and parallel runs!']);
+				end
+				if isnan(md.geometry.bathymetry),
+					checkmessage(['requesting grounding line migration, but bathymetry is absent!']);
+				end
+				pos=find(md.mask.vertexongroundedice); 
+				if any(md.geometry.bed(pos)-md.geometry.bathymetry(pos)),
+					checkmessage(['bathymetry not equal to bed on grounded ice !']);
+				end
+				pos=find(md.mask.vertexonfloatingice); 
+				if any(md.geometry.bathymetry(pos)-md.geometry.bed(pos)>tolerance),
+					checkmessage(['bathymetry superior to bed on floating ice !']);
+				end
+			end
+
 		end % }}}
 	end
Index: /issm/trunk/src/m/classes/materials.m
===================================================================
--- /issm/trunk/src/m/classes/materials.m	(revision 9750)
+++ /issm/trunk/src/m/classes/materials.m	(revision 9751)
@@ -85,4 +85,8 @@
 			fields={'rheology_B'};
 			checksize(md,'materials',fields,[md.mesh.numberofvertices 1]);
+
+			if ~ismember({md.materials.rheology_law},{'None' 'Paterson' 'Arrhenius'}),
+				checkmessage(['model not consistent: model ' md.miscellaneous.name ' rheology_law field should be ''none'' ''paterson'' or ''arrhenius''']);
+			end
 		end % }}}
 		function disp(obj) % {{{
Index: /issm/trunk/src/m/classes/mesh.m
===================================================================
--- /issm/trunk/src/m/classes/mesh.m	(revision 9750)
+++ /issm/trunk/src/m/classes/mesh.m	(revision 9751)
@@ -105,4 +105,16 @@
 			end
 
+
+			if (md.mesh.dimension==2),
+				if md.mesh.average_vertex_connectivity<9, 
+					checkmessage('model not consistent: connectivity should be at least 9 for 2d models');
+				end
+			end
+			if md.mesh.dimension==3,
+				if md.mesh.average_vertex_connectivity<24, 
+					checkmessage('model not consistent: connectivity should be at least 24 for 3d models');
+				end
+			end
+
 			%Solution specific checks
 			switch(md.private.solution),
Index: /issm/trunk/src/m/classes/prognostic.m
===================================================================
--- /issm/trunk/src/m/classes/prognostic.m	(revision 9750)
+++ /issm/trunk/src/m/classes/prognostic.m	(revision 9751)
@@ -47,5 +47,11 @@
 		end % }}}
 		function checkconsistency(obj,md) % {{{
+			if ~ismember(obj.stabilization,[0 1 3]),
+				checkmessage('prognostic.stabilization should be a scalar (0 or 1 or 3)');
+			end
 
+			if ~ismember(md.prognostic.hydrostatic_adjustment,{'Absolute' 'Incremental'}),
+				checkmessage(['model not consistent: model ' md.miscellaneous.name ' prognostic.hydrostatic_adjustment field should be AbsoluteEnum or IncrementalEnum']);
+			end
 		end % }}}
 		function disp(obj) % {{{
Index: /issm/trunk/src/m/classes/rifts.m
===================================================================
--- /issm/trunk/src/m/classes/rifts.m	(revision 9750)
+++ /issm/trunk/src/m/classes/rifts.m	(revision 9751)
@@ -36,5 +36,22 @@
 		end % }}}
 		function checkconsistency(obj,md) % {{{
-
+			if obj.numrifts,
+				if ~(md.mesh.dimension==2),
+					checkmessage(['model not consistent: models with rifts are only supported in 2d for now!']);
+				end
+				if ~isstruct(obj.riftstruct),
+					checkmessage(['rifts.riftstruct should be a structure!']);
+				end
+				if ~isempty(find(md.mesh.segmentmarkers>=2)),
+					%We have segments with rift markers, but no rift structure!
+					checkmessage(['model should be processed for rifts (run meshprocessrifts)!']);
+				end
+				%Check that rifts are filled with proper material
+				checkvalues(md,{'rifts.riftstruct.fill'},[WaterEnum() AirEnum() IceEnum() MelangeEnum()]);
+			else
+				if ~isnans(obj.riftstruct),
+					checkmessage(['riftstruct shoud be NaN since obj.numrifts is 0!']);
+				end
+			end
 		end % }}}
 	end
Index: /issm/trunk/src/m/classes/thermal.m
===================================================================
--- /issm/trunk/src/m/classes/thermal.m	(revision 9750)
+++ /issm/trunk/src/m/classes/thermal.m	(revision 9751)
@@ -51,4 +51,7 @@
 		end % }}}
 		function checkconsistency(obj,md) % {{{
+			if ~ismember(obj.stabilization,[0 1 2]),
+				checkmessage('thermal.stabilization should be a scalar (0 or 1 or 2)');
+			end
 
 		end % }}}
Index: /issm/trunk/src/m/classes/timestepping.m
===================================================================
--- /issm/trunk/src/m/classes/timestepping.m	(revision 9750)
+++ /issm/trunk/src/m/classes/timestepping.m	(revision 9751)
@@ -47,5 +47,7 @@
 		end % }}}
 		function checkconsistency(obj,md) % {{{
-
+			if ~ismember(md.timestepping.time_adapt,[0 1]),
+				checkmessage(['model not consistent: model ' md.miscellaneous.name ' time_adapt field should be 0 or 1']);
+			end
 		end % }}}
 	end
Index: /issm/trunk/src/m/model/ismodelselfconsistent.m
===================================================================
--- /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9750)
+++ /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9751)
@@ -12,5 +12,5 @@
 for i=1:length(fields),
 	field=fields{i};
-	if ismember(field,{'cluster' 'results' 'debug' 'radaroverlay'}),
+	if ismember(field,{'results' 'debug' 'radaroverlay'}),
 		continue;
 	end
