Index: /issm/trunk/src/m/model/ismodelselfconsistent.m
===================================================================
--- /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 7622)
+++ /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 7623)
@@ -25,4 +25,59 @@
 	else
 		analysis=[DiagnosticSolutionEnum PrognosticSolutionEnum ThermalSolutionEnum];
+	end
+
+	for i=1:length(analysis),
+		md.analysis_type=analysis(i);
+		ismodelselfconsistent(md);
+	end
+
+	if(md.cfl_coefficient>1 | md.cfl_coefficient<0),
+		error(['model not consistent: model ' md.name ' cfl_coefficient field should between  0 and 1']);
+	end
+end
+%}}}
+%recursive call for STEADYSTATE{{{1
+if md.analysis_type==SteadystateSolutionEnum,
+
+	%NDT
+	if md.dt~=0,
+		error(['model not consistent: for a steadystate computation, dt must be zero.']);
+	end
+
+	%PRESSURE
+	if isnans(md.pressure),
+		error(['model not consistent: for a steadystate computation, the model must have an initial pressure, even lithostatic will do.']);
+	end
+
+	%eps: 
+	if isnan(md.eps_rel),
+		error(['model not consistent: for a steadystate computation, eps_rel (relative convergence criterion) must be defined!']);
+	end
+
+	%recursive call to ismodelselfconsistent
+	analysis=[DiagnosticSolutionEnum ThermalSolutionEnum];
+
+	for i=1:length(analysis),
+		md.analysis_type=analysis(i);
+		ismodelselfconsistent(md);
+	end
+
+end
+%}}}
+%recursive call for GROUNDINGLINEMIGRATION2D{{{1
+if md.analysis_type==GroundingLineMigration2DSolutionEnum,
+	if strcmpi(md.cluster.name,'none'),
+		error(['model not consistent: ' md.analysis_type ' is only implemented in parallel mode !'])
+	end
+
+	if md.dt<=0,
+		error('model not consistent: field dt must be positive for a transient run')
+	end
+
+	%recursive call to ismodelselfconsistent
+	if (md.dim==2),
+		analysis=[DiagnosticSolutionEnum PrognosticSolutionEnum];
+	else
+		error(['model not consistent: for a ' md.analysis_type ' computation, the grounding line module is only implemented in 2d !'])
 	end
 
@@ -155,6 +210,9 @@
 checkvalues(md,{'gl_migration'},[NoneEnum() AgressiveMigrationEnum() SoftMigrationEnum()]);
 if (md.gl_migration~=NoneEnum),
+	if (md.dim==3 | strcmpi(md.cluster.name,'none')),
+		error(['model ' md.name ' requesting grounding line migration, but grounding line module only implemented for 2d models and parallel runs!']);
+	end
 	if isnan(md.bathymetry),
-		error(['model not consistent: model ' md.name ' requesting grounding line migration, buth bathymetry is absent!']);
+		error(['model not consistent: model ' md.name ' requesting grounding line migration, but bathymetry is absent!']);
 	end
 end
@@ -265,28 +323,4 @@
 end
 %}}}
-%STEADYSTATE{{{1
-if md.analysis_type==SteadystateSolutionEnum,
-
-	%NDT
-	if md.dt~=0,
-		error(['model not consistent: for a steadystate computation, dt must be zero.']);
-	end
-
-	%PRESSURE
-	if isnans(md.pressure),
-		error(['model not consistent: for a steadystate computation, the model must have an initial pressure, even lithostatic will do.']);
-	end
-
-	%eps: 
-	if isnan(md.eps_rel),
-		error(['model not consistent: for a steadystate computation, eps_rel (relative convergence criterion) must be defined!']);
-	end
-
-	%dim: 
-	if (md.dim==2),
-		error(['model not consistent: for a steadystate computation, model needs to be 3d']);
-	end
-end
-%}}}
 %THERMAL {{{1
 %THERMAL STEADY AND THERMAL TRANSIENT
@@ -325,15 +359,4 @@
 	fields={'temperature','spctemperature(:,2)','observed_temperature'};
 	checkgreater(md,fields,0)
-
-end
-%}}}
-%GROUNDINGLINEMIGRATION2D{{{1
-if md.analysis_type==GroundingLineMigration2DSolutionEnum,
-	if md.dim==3,
-		error(['model not consistent: for a ' md.analysis_type ' computation, the grounding line module is only implemented in 2d !'])
-	end
-	if strcmpi(md.cluster.name,'none'),
-		error(['model not consistent: ' md.analysis_type ' is only implemented in parallel mode !'])
-	end
 
 end
