Index: /issm/trunk-jpl/examples/Greenland/CheatSheet.m
===================================================================
--- /issm/trunk-jpl/examples/Greenland/CheatSheet.m	(revision 18263)
+++ /issm/trunk-jpl/examples/Greenland/CheatSheet.m	(revision 18263)
@@ -0,0 +1,38 @@
+if any(steps==8)
+	disp('   Step 8: Plotting exercise');
+
+	%load historic transient model
+	md = loadmodel('./Models/Greenland.HistoricTransient');
+
+	%Create Line Plots of relaxation run.  Create a figure.
+	figure
+
+	%Save surface mass balance, by looping through 200 years, or 1000 steps
+	surfmb=[]; for i=1:100; surfmb=[surfmb ...
+		md.results.TransientSolution(i).SurfaceforcingsMassBalance]; end
+
+	%Plot surface mass balance time series in first subplot
+	subplot(3,1,1); plot([0.2:0.2:200],mean(surfmb));
+
+	%Title this plot Mean surface mass balance
+	title('Mean Surface mass balance');
+
+	%Save velocity by looping through 1000 steps
+	vel=[]; for i=1:100; vel=[vel md.results.TransientSolution(i).Vel]; end
+
+	%Plot velocity time series in second subplot
+	subplot(3,1,2); plot([0.2:0.2:200],mean(vel));
+
+	%Title this plot Mean Velocity
+	title('Mean Velocity');
+
+	%Save Ice Volume by looping through 1000 steps
+	volume=[]; for i=1:100; volume=[volume md.results.TransientSolution(i).IceVolume]; end
+
+	%Plot volume time series in third subplot
+	subplot(3,1,3); plot([0.2:0.2:200],volume);
+
+	%Title this plot Mean Velocity and add an x label of years
+	title('Ice Volume'); xlabel('years');
+
+end
Index: /issm/trunk-jpl/examples/Greenland/runme.m
===================================================================
--- /issm/trunk-jpl/examples/Greenland/runme.m	(revision 18262)
+++ /issm/trunk-jpl/examples/Greenland/runme.m	(revision 18263)
@@ -115,5 +115,4 @@
 	disp('   Step 5: Plotting'); 
 	md = loadmodel('./Models/Greenland.Transient');
-	%md = loadmodel('./Models/Greenland.HistoricTransient');
 
 	%Planview plots
@@ -146,6 +145,5 @@
 
 if any(steps==6)
-	disp('   Step 6: Historical Relaxation run');
-	md = loadmodel('./Models/Greenland.Control_drag');
+	disp('   Step 6: Extract Box SMB');
 
 	ncbox='../Data/Box_Greenland_SMB_monthly_1840-2012_5km_ver20140421.nc';
@@ -161,8 +159,27 @@
 	[x1 y1]=ll2xy(lat,lon,+1,45,70);
 
-	%surface mass balance
+	years_of_simulation = 1840:2012;
+	t = [years_of_simulation(1):1/12:years_of_simulation(end)+11/12];
+
+	%Area of grid for 5km box
+	area_of_grid=5000*5000;
+	totalsmb=reshape(sum(sum(smbbox,1),2),length(t),1);
+
+	%save surface mass balance mat dataset
 	smbmean = mean(mean(smbbox,3),4);
-	save -v7.3 smbbox smbbox x1 y1;
-	clear smbbox
+	save -v7.3 smbbox smbmean totalsmb smbbox x1 y1 t;
+
+	%plot a time series of total SMB
+	plot(t,totalsmb); title('Total Surface mass balance, m^3');
+
+	clear smbbox smbmean totalsmb x1 y1 t
+
+end
+
+if any(steps==7)
+	disp('   Step 7: Historical Relaxation run');
+	md = loadmodel('./Models/Greenland.Control_drag');
+
+	load smbbox
 
 	%Interpolate and set surface mass balance
@@ -190,6 +207,44 @@
 end
 
-if any(steps==7)
-	disp('   Step 7: Box Transient run');
+if any(steps==8)
+	disp('   Step 8: Plotting exercise');
+
+	%load historic transient model
+	md = loadmodel('./Models/Greenland.HistoricTransient');
+
+	%Create Line Plots of relaxation run.  Create a figure.
+	figure
+
+	%Save surface mass balance, by looping through 200 years, or 1000 steps
+	surfmb=[]; for i=1:100; surfmb=[surfmb ...
+		md.results.TransientSolution(i).SurfaceforcingsMassBalance]; end
+
+	%Plot surface mass balance time series in first subplot
+	subplot(3,1,1); plot([0.2:0.2:200],mean(surfmb)); 
+	
+	%Title this plot Mean surface mass balance
+	title('Mean Surface mass balance');
+
+	%Save velocity by looping through 1000 steps
+	vel=[]; for i=1:100; vel=[vel md.results.TransientSolution(i).Vel]; end
+
+	%Plot velocity time series in second subplot
+	subplot(3,1,2); plot([0.2:0.2:200],mean(vel)); 
+	
+	%Title this plot Mean Velocity
+	title('Mean Velocity');
+
+	%Save Ice Volume by looping through 1000 steps
+	volume=[]; for i=1:100; volume=[volume md.results.TransientSolution(i).IceVolume]; end
+
+	%Plot volume time series in third subplot
+	subplot(3,1,3); plot([0.2:0.2:200],volume); 
+	
+	%Title this plot Mean Velocity and add an x label of years
+	title('Ice Volume'); xlabel('years');
+end
+
+if any(steps==9)
+	disp('   Step 9: Box Transient run');
 	md = loadmodel('./Models/Greenland.HistoricTransient');
 
@@ -246,6 +301,6 @@
 end
 
-if any(steps==8)
-	disp('   Step 8: Plot Box Transient');
+if any(steps==10)
+	disp('   Step 10: Plot Box Transient');
 	md = loadmodel('./Models/Greenland.BoxTransient');
 
