Index: /issm/trunk/src/m/classes/public/ismodelselfconsistent.m
===================================================================
--- /issm/trunk/src/m/classes/public/ismodelselfconsistent.m	(revision 1310)
+++ /issm/trunk/src/m/classes/public/ismodelselfconsistent.m	(revision 1311)
@@ -214,13 +214,4 @@
 %PROGNOSTIC
 if strcmp(md.analysis_type,'prognostic'),
-	%old testing
-	%	if isempty(find(md.gridondirichlet_diag)),
-	%		disp(['model ' md.name ' diagnostic is not well posed (singular). You need at least one grid with fixed velocity!'])
-	%		bool=0;return;
-	%	end
-	%	if isempty(find(md.gridondirichlet_prog)),
-	%		disp(['model ' md.name ' prognostic is not well posed (singular). You need at least one grid with fixed thickness!'])
-	%		bool=0;return;
-	%	end
 
 	%VELOCITIES
@@ -231,20 +222,4 @@
 end
 
-%THERMAL TRANSIENT
-if strcmp(md.analysis_type,'thermal')
-	if strcmp(md.sub_analysis_type,'transient')
-
-		%INITIAL TEMPERATURE, MELTING AND ACCUMULATION
-		if isempty(md.temperature),
-			disp(['An  initial temperature is needed for a transient thermal computation'])
-			bool=0;return;
-		end
-		if isstruct(md.temperature) |  isstruct(md.melting) | isstruct(md.accumulation),
-			disp(['The initial temperature, melting or accumulation should be a list and not a structure'])
-			bool=0;return;
-		end
-	end
-end
-
 %THERMAL STEADY AND THERMAL TRANSIENT
 if strcmpi(md.analysis_type,'thermal'),
@@ -257,9 +232,9 @@
 
 	%VELOCITIES AND PRESSURE
-	if (isempty(md.vx) | isnan(md.vx) | isempty(md.vy)  | isnan(md.vy) | isempty(md.vz) | isnan(md.vz)),
+	if (length(md.vx)~=md.numberofgrids | length(md.vy)~=md.numberofgrids | length(md.vz)~=md.numberofgrids),
 		disp(['a 3d velocity is required. Run ''diagnostic'' solution first!'])
 		bool=0;return;
 	end
-	if (isempty(md.pressure) | isnan(md.pressure)),
+	if (length(md.pressure)~=md.numberofgrids),
 		disp(['pressure is required. Run ''diagnostic'' solution first!'])
 		bool=0;return;
@@ -267,6 +242,6 @@
 end
 
-%THERMAL TRANSIENT AND TRANSIENT
-if strcmp(md.analysis_type,'thermal'),
+%THERMAL TRANSIENT
+if strcmpi(md.analysis_type,'thermal') & strcmp(md.sub_analysis_type,'transient'),
 
 	%DT and NDT
@@ -279,7 +254,11 @@
 	end
 
-	%INITIAL TEMPERATURE
-	if isstruct(md.temperature),
-		disp(['The initial temperature should be empty or a list but not a structure'])
+	%INITIAL TEMPERATURE, MELTING AND ACCUMULATION
+	if (length(md.temperature)~=md.numberofgrids),
+		disp(['An  initial temperature is needed for a transient thermal computation'])
+		bool=0;return;
+	end
+	if (length(md.temperature)~=md.numberofgrids | length(md.accumulation)~=md.numberofgrids | length(md.melting)~=md.numberofgrids),
+		disp(['The initial temperature, melting or accumulation should be a list and not a structure'])
 		bool=0;return;
 	end
