Index: /issm/trunk/src/m/solutions/ice/diagnostic_core_nonlinear.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/diagnostic_core_nonlinear.m	(revision 331)
+++ /issm/trunk/src/m/solutions/ice/diagnostic_core_nonlinear.m	(revision 332)
@@ -55,8 +55,5 @@
 converged=0;
 	
-if debug,
-	disp(sprintf('%s','   starting direct shooting method'));
-end
-
+displaystring(debug,'\n%s',['   starting direct shooting method']);
 while(~converged),
 
@@ -105,7 +102,5 @@
 	% Solve
 	u_f=Solver(K_ff,p_f,solver_type);
-	if debug,
-		disp(sprintf('%s%g','      condition number of stiffness matrix: ',condest(K_ff)));
-	end
+	displaystring(debug,'%s%g','      condition number of stiffness matrix: ',condest(K_ff));
    
 	%increment index 
@@ -120,10 +115,9 @@
 		%compute relative velocity difference for this step.
 		relative_change=norm(soln(count).u_g-soln(count-1).u_g,2)/norm(soln(count-1).u_g,2);
-
 		if relative_change<eps_rel, 
-			if debug, disp(sprintf('%s %g %s %g','      convergence criterion: norm(du)/norm(u)=',relative_change,' < ',eps_rel)); end
+			displaystring(debug,'%s%g%s%g','      convergence criterion: norm(du)/norm(u)=',relative_change,' < ',eps_rel);
 			converged=1;
 		else
-			if debug, disp(sprintf('%s %g %s %g','      convergence criterion: norm(du)/norm(u)=',relative_change,' > ',eps_rel)); end
+			displaystring(debug,'%s%g%s%g','      convergence criterion: norm(du)/norm(u)=',relative_change,' > ',eps_rel);
 			converged=0;
 		end
@@ -134,7 +128,7 @@
 
 			if change<eps_abs, 
-				if debug, disp(sprintf('%s %g %s %g %s','      convergence criterion: max(du)=',change,' < ',eps_abs,'m/yr')); end
+				displaystring(debug,'%s%g%s%g','      convergence criterion: max(du)=',change,' < ',eps_abs,'m/yr');
 			else
-				if debug, disp(sprintf('%s %g %s %g %s','      convergence criterion: max(du)=',change,' > ',eps_abs,'m/yr')); end
+				displaystring(debug,'%s%g%s%g','      convergence criterion: max(du)=',change,' > ',eps_abs,'m/yr');
 				converged=0;
 			end
