Index: /issm/trunk/test/Verification/IceSheetNoIceFront2d_1/runme.m
===================================================================
--- /issm/trunk/test/Verification/IceSheetNoIceFront2d_1/runme.m	(revision 122)
+++ /issm/trunk/test/Verification/IceSheetNoIceFront2d_1/runme.m	(revision 123)
@@ -1,3 +1,3 @@
-% This file can be run to check that the current version of macayeal and issm models are giving 
+% This file can be run to check that the current version of issm is giving 
 % coherent results. This test deals with an icesheet without icefront for a 2d model. The geometry 
 % is square. Just run this file in Matlab, with a properly setup ISSM code. 
@@ -6,5 +6,5 @@
 
 % Errors  between archived results and the current version will get flagged if they are not within 
-% a certain tolerance. The current tolerance is 10^-14. If you have good reasons to believe this 
+% a certain tolerance. The current tolerance is 10^-12. If you have good reasons to believe this 
 % tolerance should be lowered (for example, if you are running single precision compilers?), feel 
 % free to tweak the tolerance variable.
@@ -12,7 +12,8 @@
 %packages and solutions to be tested
 packages={'macayeal','ice','cielo_serial','cielo_parallel'};
+solutions={'diagnostic','prognostic'};
 
 %Initialize log message for nightly runs.
-testname='IceSheetNoIceFront2d_1';
+testname='IceSheetNoIceFrontM2d_16';
 tolerance=10^-12;
 
@@ -21,67 +22,60 @@
 	package=packages{i};
 
-	%initialize model
-	md=model;
-	md=mesh(md,'DomainOutline.exp',50000);
-	md=geography(md,'','');
-	md=parameterize(md,'Square.par');
-	md=setelementstype(md,'macayeal','all');
+	for j=1:length(solutions),
+		solution=solutions{j};
 
-	%Compute solution using requested package
-	if strcmpi(package,'macayeal'),
-
-		%DIAGNOSTIC
-		md=solve(md,'diagnostic','macayeal');
-		%check result
-		load ArchiveMacAyealDiag
-		pos=find(ArchiveMacAyealDiag); error_vel=abs(norm((ArchiveMacAyealDiag(pos)-md.vel(pos))./ArchiveMacAyealDiag(pos),2));
-		if (error_vel>tolerance);
-			disp(['test: ' testname  ', solution: diagnostic, package: ' package ' -> ERROR (difference=' num2str(error_vel) ')'])
-		else
-			disp(['test: ' testname  ', solution: diagnostic, package: ' package ' -> SUCCESS (difference=' num2str(error_vel) ')'])
+		%check package
+		if ~(strcmpi(package,'macayeal') | strcmpi(package,'ice') | strcmpi(package,'cielo_serial') | strcmpi(package,'cielo_parallel'));
+			error(['package: ' package  ' in test: ' testname  ' not supported yet']);
+		%check solution
+		elseif ~(strcmpi(solution,'diagnostic') | strcmpi(solution,'prognostic'));
+			error(['solution: ' solution  ' in test: ' testname  ' not supported yet']);
+		end
+		%check solution requested
+		if (~strcmpi(package,'ice') & strcmpi(solution,'prognostic')),
+			disp(sprintf(['\nsolution: ' solution  ', with package: ' package  ', in test: ' testname  ', not supported yet.\n']));
+			continue
 		end
 
-	elseif strcmpi(package,'ice'),
-
-		%DIAGNOSTIC
-		md=solve(md,'diagnostic','ice');
-		%check result
-		load ArchiveIceDiag
-		pos=find(ArchiveIceDiag); error_vel=abs(norm((ArchiveIceDiag(pos)-md.vel(pos))./ArchiveIceDiag(pos),2));
-		if (error_vel>tolerance);
-			disp(['test: ' testname  ', solution: diagnostic, package: ' package ' -> ERROR (difference=' num2str(error_vel) ')'])
-		else
-			disp(['test: ' testname  ', solution: diagnostic, package: ' package ' -> SUCCESS (difference=' num2str(error_vel) ')'])
+		%initialize model
+		md=model;
+		md=mesh(md,'DomainOutline.exp',50000);
+		md=geography(md,'','');
+		md=parameterize(md,'Square.par');
+		md=setelementstype(md,'macayeal','all');
+		if strcmpi(package,'cielo_parallel'), md.cluster='wilkes'; end
+		if md.numberofgrids==388
+			load Velocities; md.vx=0.5*vx; md.vy=0.5*vy;
 		end
 
-	elseif strcmpi(package,'cielo_serial'),
-
-		%DIAGNOSTIC
-		md=solve(md,'diagnostic','cielo');
-		%check result
-		load ArchiveCieloSerialDiag
-		pos=find(ArchiveCieloSerialDiag); error_vel=abs(norm((ArchiveCieloSerialDiag(pos)-md.vel(pos))./ArchiveCieloSerialDiag(pos),2));
-		if (error_vel>tolerance);
-			disp(['test: ' testname  ', solution: diagnostic, package: ' package ' -> ERROR (difference=' num2str(error_vel) ')'])
+		%compute solution
+		if strcmpi(package,'cielo_parallel') & strcmpi(solution,'diagnostic'),
+			md=solve(md,'diagnostic_horiz','cielo');
+		elseif strcmpi(package,'cielo_serial'),
+			eval(['md=solve(md,''' solution ''',''cielo'');']);
 		else
-			disp(['test: ' testname  ', solution: diagnostic, package: ' package ' -> SUCCESS (difference=' num2str(error_vel) ')'])
+			eval(['md=solve(md,''' solution ''',''' package ''');']);
 		end
 
-	elseif strcmpi(package,'cielo_parallel'),
-
-		%DIAGNOSTIC
-		md.cluster='wilkes';
-		md=solve(md,'diagnostic_horiz','cielo');
-		%check result
-		load ArchiveCieloParallelDiag
-		pos=find(ArchiveCieloParallelDiag); error_vel=abs(norm((ArchiveCieloParallelDiag(pos)-md.vel(pos))./ArchiveCieloParallelDiag(pos),2));
-		if (error_vel>tolerance);
-			disp(['test: ' testname  ', solution: diagnostic, package: ' package ' -> ERROR (difference=' num2str(error_vel) ')'])
-		else
-			disp(['test: ' testname  ', solution: diagnostic, package: ' package ' -> SUCCESS (difference=' num2str(error_vel) ')'])
+		%compute field to be checked
+		if strcmpi(solution,'diagnostic'),
+			fieldtest=md.vel;
+		elseif strcmpi(solution,'prognostic'),
+			fieldtest=md.new_thickness';
 		end
 
-	else
-		disp(sprintf(['\npackage ' package  ' not supported yet.\n']));
+		%load archive
+		eval(['load Archive' package solution ]);
+
+		%compare to archive
+		eval(['pos=find(Archive' package solution ');']);
+		eval(['error_diff=abs(norm((Archive' package solution '(pos)-fieldtest(pos))./Archive' package solution '(pos),2));']);
+
+		%disp test result
+		if (error_diff>tolerance);
+			disp(['test: ' testname  ', solution: ' solution  ', package: ' package ' -> ERROR (difference=' num2str(error_diff) ' > ' num2str(tolerance) ')'])
+		else
+			disp(['test: ' testname  ', solution: ' solution  ', package: ' package ' -> SUCCESS (difference=' num2str(error_diff) ' < ' num2str(tolerance) ')'])
+		end
 	end
 end
Index: /issm/trunk/test/Verification/IceSheetNoIceFront2d_1/startup.m
===================================================================
--- /issm/trunk/test/Verification/IceSheetNoIceFront2d_1/startup.m	(revision 123)
+++ /issm/trunk/test/Verification/IceSheetNoIceFront2d_1/startup.m	(revision 123)
@@ -0,0 +1,1 @@
+link /u/wilkes-r1b/morlighe/issm/trunk/startup.m
Index: /issm/trunk/test/Verification/IceSheetNoIceFront2d_1/updatearchive.m
===================================================================
--- /issm/trunk/test/Verification/IceSheetNoIceFront2d_1/updatearchive.m	(revision 122)
+++ /issm/trunk/test/Verification/IceSheetNoIceFront2d_1/updatearchive.m	(revision 123)
@@ -8,4 +8,5 @@
 %packages and solutions to be tested
 packages={'macayeal','ice','cielo_serial','cielo_parallel'};
+solutions={'diagnostic','prognostic'};
 
 %go through the solutions requested
@@ -13,47 +14,48 @@
 	package=packages{i};
 
-	%initialize model
-	md=model;
-	md=mesh(md,'DomainOutline.exp',50000);
-	md=geography(md,'','');
-	md=parameterize(md,'Square.par');
-	md=setelementstype(md,'macayeal','all');
+	for j=1:length(solutions),
+		solution=solutions{j};
 
-	%Compute solution using requested package
-	if strcmpi(package,'macayeal'),
+		%check package
+		if ~(strcmpi(package,'macayeal') | strcmpi(package,'ice') | strcmpi(package,'cielo_serial') | strcmpi(package,'cielo_parallel'));
+			error(['package: ' package  ' in test: ' testname  ' not supported yet']);
+			%check solution
+		elseif ~(strcmpi(solution,'diagnostic') | strcmpi(solution,'prognostic'));
+			error(['solution: ' solution  ' in test: ' testname  ' not supported yet']);
+		end
+		%check solution requested
+		if (~strcmpi(package,'ice') & strcmpi(solution,'prognostic')),
+			disp(sprintf(['\nsolution: ' solution  ', with package: ' package  ', in test: ' testname  ', not supported yet.\n']));
+			continue
+		end
 
-		%DIAGNOSTIC
-		md=solve(md,'diagnostic','macayeal');
-		%save archive
-		ArchiveMacAyealDiag=md.vel;
-		save ArchiveMacAyealDiag ArchiveMacAyealDiag
+		%initialize model
+		md=model;
+		md=mesh(md,'DomainOutline.exp',50000);
+		md=geography(md,'','');
+		md=parameterize(md,'Square.par');
+		md=setelementstype(md,'macayeal','all');
+		if strcmpi(package,'cielo_parallel'), md.cluster='wilkes'; end
+		if md.numberofgrids==388
+			load Velocities; md.vx=0.5*vx; md.vy=0.5*vy;
+		end
 
-	elseif strcmpi(package,'ice'),
+		%compute solution
+		if strcmpi(package,'cielo_parallel') & strcmpi(solution,'diagnostic'),
+			md=solve(md,'diagnostic_horiz','cielo');
+		elseif strcmpi(package,'cielo_serial'),
+			eval(['md=solve(md,''' solution ''',''cielo'');']);
+		else
+			eval(['md=solve(md,''' solution ''',''' package ''');']);
+		end
 
-		%DIAGNOSTIC
-		md=solve(md,'diagnostic','ice');
-		%save archive
-		ArchiveIceDiag=md.vel;
-		save ArchiveIceDiag ArchiveIceDiag
-
-	elseif strcmpi(package,'cielo_serial'),
-
-		%DIAGNOSTIC
-		md=solve(md,'diagnostic','cielo');
-		%save archive
-		ArchiveCieloSerialDiag=md.vel;
-		save ArchiveCieloSerialDiag ArchiveCieloSerialDiag
-
-	elseif strcmpi(package,'cielo_parallel'),
-
-		%DIAGNOSTIC
-		md.cluster='wilkes';
-		md=solve(md,'diagnostic_horiz','cielo');
-		%save archive
-		ArchiveCieloParallelDiag=md.vel;
-		save ArchiveCieloParallelDiag ArchiveCieloParallelDiag
-
-	else
-		disp(sprintf(['\npackage ' package  ' not supported yet.\n']));
+		%save new archive
+		if strcmpi(solution,'diagnostic'),
+			fieldtest=md.vel;
+		elseif strcmpi(solution,'prognostic'),
+			fieldtest=md.new_thickness';
+		end
+		eval(['Archive' package solution '=fieldtest;']);
+		eval(['save Archive' package solution ' Archive' package solution]);
 	end
 end
