Index: /issm/trunk-jpl/examples/AMR/runme.m
===================================================================
--- /issm/trunk-jpl/examples/AMR/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/AMR/runme.m	(revision 25986)
@@ -67,3 +67,3 @@
 
 	save AMRTransient md
-end% }}}
+end
Index: /issm/trunk-jpl/examples/EsaGRACE/runme.m
===================================================================
--- /issm/trunk-jpl/examples/EsaGRACE/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/EsaGRACE/runme.m	(revision 25986)
@@ -4,5 +4,5 @@
 steps=[1]; % [1:5]
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('   Step 1: Global mesh creation');
 
@@ -18,7 +18,7 @@
 
 	plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
-end %}}}
+end 
 
-if any(steps==2) %{{{
+if any(steps==2) 
 	disp('   Step 2: Define loads in meters of ice height equivalent');
 	md = loadmodel('./Models/EsaGRACE_Mesh');
@@ -36,7 +36,7 @@
 		'view',[90 -90],'caxis',[-.1 .1],...
 		'title','Ice height equivalent [m]');
-end %}}}
+end 
 
-if any(steps==3) %{{{
+if any(steps==3) 
 	disp('   Step 3: Parameterization');
 	md = loadmodel('./Models/EsaGRACE_Loads');
@@ -65,7 +65,7 @@
 
 	save ./Models/EsaGRACE_Parameterization md;
-end %}}}
+end 
 
-if any(steps==4) %{{{
+if any(steps==4) 
 	disp('   Step 4: Solve Esa solver');
 	md = loadmodel('./Models/EsaGRACE_Parameterization');
@@ -79,7 +79,7 @@
 
 	save ./Models/EsaGRACE_Solution md;
-end %}}}
+end 
 
-if any(steps==5) %{{{
+if any(steps==5) 
 	disp('   Step 5: Plot solutions');
 	md = loadmodel('./Models/EsaGRACE_Solution');
@@ -140,3 +140,3 @@
 		%export_fig(fig_name{kk});
 	end
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/EsaWahr/runme.m
===================================================================
--- /issm/trunk-jpl/examples/EsaWahr/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/EsaWahr/runme.m	(revision 25986)
@@ -4,5 +4,5 @@
 steps=[1]; % [1:7]
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('   Step 1: Mesh creation');
 
@@ -12,7 +12,7 @@
 
 	plotmodel(md,'data','mesh');
-end %}}}
+end 
 
-if any(steps==2) %{{{
+if any(steps==2) 
 	disp('   Step 2: Anisotropic mesh creation');
 
@@ -28,7 +28,7 @@
 
 	plotmodel (md,'data','mesh');
-end %}}}
+end 
 
-if any(steps==3) %{{{
+if any(steps==3) 
 	disp('   Step 3: Define loads');
 	md = loadmodel('./Models/EsaWahr_Mesh');
@@ -48,7 +48,7 @@
 
 	plotmodel (md,'data',md.esa.deltathickness,'title','Ice height equivalent [m]');
-end %}}}
+end 
 
-if any(steps==4) %{{{
+if any(steps==4) 
 	disp('   Step 4: Parameterization');
 	md = loadmodel('./Models/EsaWahr_Loads');
@@ -74,7 +74,7 @@
 
 	save ./Models/EsaWahr_Parameterization md;
-end %}}}
+end 
 
-if any(steps==5) %{{{
+if any(steps==5) 
 	disp('   Step 5: Solve Esa solver');
 	md = loadmodel('./Models/EsaWahr_Parameterization');
@@ -88,7 +88,7 @@
 
 	save ./Models/EsaWahr_Solution md;
-end %}}}
+end 
 
-if any(steps==6) %{{{
+if any(steps==6) 
 	disp('   Step 6: Plot solutions');
 	md = loadmodel('./Models/EsaWahr_Solution');
@@ -121,7 +121,7 @@
 		'colorbarpos',[0.53,0.065,0.18,0.02],'colorbartitle#4','East-west [mm]');
 	%export_fig('Fig5.pdf');
-end %}}}
+end 
 
-if any(steps==7) %{{{
+if any(steps==7) 
 	disp('   Step 7: Compare results against Wahr semi-analytic solutions');
 	md = loadmodel('./Models/EsaWahr_Solution');
@@ -162,3 +162,3 @@
 		set(gcf,'color','w');
 	%export_fig('Fig6.pdf');
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/Greenland/runme.m
===================================================================
--- /issm/trunk-jpl/examples/Greenland/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/Greenland/runme.m	(revision 25986)
@@ -5,5 +5,5 @@
 ncdata='../Data/Greenland_5km_dev1.2.nc';
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('   Step 1: Mesh creation');
 
@@ -29,7 +29,7 @@
 
 	plotmodel (md,'data','mesh');
-end %}}}
-
-if any(steps==2) %{{{
+end 
+
+if any(steps==2) 
 	disp('   Step 2: Parameterization');
 	md = loadmodel('./Models/Greenland.Mesh_generation');
@@ -40,7 +40,7 @@
 
 	save ./Models/Greenland.Parameterization md;
-end %}}}
-
-if any(steps==3) %{{{
+end 
+
+if any(steps==3) 
 	disp('   Step 3: Control method friction');
 	md = loadmodel('./Models/Greenland.Parameterization');
@@ -79,7 +79,7 @@
 
 	save ./Models/Greenland.Control_drag md;
-end %}}}
-
-if any(steps==4) %{{{
+end 
+
+if any(steps==4) 
 	disp('   Step 4: Transient run');
 	md = loadmodel('./Models/Greenland.Control_drag');
@@ -109,7 +109,7 @@
 
 	save ./Models/Greenland.Transient md;
-end %}}}
-
-if any(steps==5) %{{{
+end 
+
+if any(steps==5) 
 	disp('   Step 5: Plotting');
 	md = loadmodel('./Models/Greenland.Transient');
@@ -142,7 +142,7 @@
 	subplot(3,1,3); plot([0.2:0.2:20],volume); title('Ice Volume');
 	xlabel('years')
-end %}}}
-
-if any(steps==6) %{{{
+end 
+
+if any(steps==6) 
 	disp('   Step 6: Extract Box SMB');
 	md = loadmodel('./Models/Greenland.Transient');
@@ -171,7 +171,7 @@
 
 	clear smbbox
-end %}}}
-
-if any(steps==7) %{{{
+end 
+
+if any(steps==7) 
 	disp('   Step 7: Historical Relaxation run');
 	md = loadmodel('./Models/Greenland.Control_drag');
@@ -206,5 +206,5 @@
 end % step 7 end
 
-if any(steps==8) %{{{
+if any(steps==8) 
 	disp('   Step 8: Plotting exercise');
 
@@ -234,5 +234,5 @@
 end % step 8 end
 
-if any(steps==9) %{{{
+if any(steps==9) 
 	disp('   Step 9: Box Transient run');
 	md = loadmodel('./Models/Greenland.HistoricTransient_200yr');
@@ -287,7 +287,7 @@
 
 	save ./Models/Greenland.BoxTransient md;
-end %}}}
-
-if any(steps==10) %{{{
+end 
+
+if any(steps==10) 
 	disp('   Step 10: Plot Box Transient');
 	md = loadmodel('./Models/Greenland.BoxTransient');
@@ -313,3 +313,3 @@
 	subplot(3,1,3); plot(t,volume); title('Ice Volume');
 	xlabel('years')
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/ISMIP/runme.m
===================================================================
--- /issm/trunk-jpl/examples/ISMIP/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/ISMIP/runme.m	(revision 25986)
@@ -11,5 +11,5 @@
 
 %Mesh Generation #1
-if any(steps==1) %{{{
+if any(steps==1) 
 
 	%initialize md as a new model #help model
@@ -26,8 +26,8 @@
 	%->
 
-end %}}}
+end 
 
 %Masks #2
-if any(steps==2) %{{{
+if any(steps==2) 
 
 	% load the preceding step #help loadmodel
@@ -45,8 +45,8 @@
 	%->
 
-end %}}}
+end 
 
 %Parameterization #3
-if any(steps==3) %{{{
+if any(steps==3) 
 
 	% load the preceding step #help loadmodel
@@ -62,8 +62,8 @@
 	%->
 
-end %}}}
+end 
 
 %Extrusion #4
-if any(steps==4) %{{{
+if any(steps==4) 
 	
 	% load the preceding step #help loadmodel
@@ -81,8 +81,8 @@
 	%->
 
-end %}}}
+end 
 
 %Set the flow computing method #5
-if any(steps==5) %{{{
+if any(steps==5) 
 
 	% load the preceding step #help loadmodel
@@ -97,8 +97,8 @@
 	%->
 
-end %}}}
+end 
 
 %Set Boundary Conditions #6
-if any(steps==6) %{{{
+if any(steps==6) 
 
 	% load the preceding step #help loadmodel
@@ -150,8 +150,8 @@
 	%->
 
-end %}}}
+end 
 
 %Solving #7
-if any(steps==7) %{{{
+if any(steps==7) 
 	% load the preceding step #help loadmodel
 	% path is given by the organizer with the name of the given step
@@ -175,8 +175,8 @@
 	% plot the surface velocities #plotdoc
 	%->
-end %}}}
+end 
 
 %Solving #8
-if any(steps==8) %{{{
+if any(steps==8) 
 	% load the preceding step #help loadmodel
 	% path is given by the organizer with the name of the given step
@@ -212,3 +212,3 @@
 	% plot the surface velocities #plotdoc
 	%->
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/IceBridge/runme.m
===================================================================
--- /issm/trunk-jpl/examples/IceBridge/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/IceBridge/runme.m	(revision 25986)
@@ -5,5 +5,5 @@
 ncdata='../Data/Greenland_5km_dev1.2.nc';
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('   Step 1: Mesh creation');
 
@@ -36,7 +36,7 @@
 
 	save ./Models/Greenland.Mesh_generation md;
-end %}}}
+end 
 
-if any(steps==2) %{{{
+if any(steps==2) 
 	disp('   Step 2: Parameterization');
 	md = loadmodel('./Models/Greenland.Mesh_generation');
@@ -47,7 +47,7 @@
 
 	save ./Models/Greenland.Parameterization2 md; 
-end %}}}
+end 
 
-if any(steps==3) %{{{
+if any(steps==3) 
 	disp('   Step 3: Control method friction');
 	md = loadmodel('./Models/Greenland.Parameterization2');
@@ -92,7 +92,7 @@
 
 	save ./Models/Greenland.Control_drag md; 
-end %}}}
+end 
 
-if any(steps==4) %{{{
+if any(steps==4) 
 	disp('   Step 4: Transient run');
 	md = loadmodel('./Models/Greenland.Control_drag');
@@ -121,7 +121,7 @@
 
 	save ./Models/Greenland.Transient md; 
-end %}}}
+end 
 
-if any(steps==5) %{{{
+if any(steps==5) 
 	disp('   Step 5: Plotting'); 
 	md = loadmodel('./Models/Greenland.Transient');
@@ -154,3 +154,3 @@
 	subplot(3,1,3); plot(time_plot,volume); title('Ice Volume');
 	xlabel('years')
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/Inversion/runme.m
===================================================================
--- /issm/trunk-jpl/examples/Inversion/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/Inversion/runme.m	(revision 25986)
@@ -1,5 +1,5 @@
 steps=[1];
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	%Generate observations
 	md = model;
@@ -13,7 +13,7 @@
 		'data',md.results.StressbalanceSolution.Vel,'title','"observed velocities"')
 	save model1 md
-end %}}}
+end 
 
-if any(steps==2) %{{{
+if any(steps==2) 
 	%Modify rheology, now constant
 	loadmodel('model1.mat');
@@ -30,7 +30,7 @@
 		'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
 	save model2 md
-end %}}}
+end 
 
-if any(steps==3) %{{{
+if any(steps==3) 
 	%invert for ice rigidity
 	loadmodel('model2.mat');
@@ -51,7 +51,7 @@
 	plotmodel(md,'axis#all','tight','data',md.results.StressbalanceSolution.MaterialsRheologyBbar,'caxis',[ 1.3 1.9]*10^8,'title','inferred B',...
 		'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
-end %}}}
+end 
 
-if any(steps==4) %{{{
+if any(steps==4) 
 	%invert for ice rigidity
 	loadmodel('model2.mat');
@@ -73,3 +73,3 @@
 	plotmodel(md,'axis#all','tight','data',md.results.StressbalanceSolution.MaterialsRheologyBbar,'caxis',[ 1.3 1.9]*10^8,'title','inferred B',...
 		'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/Jakobshavn/runme.m
===================================================================
--- /issm/trunk-jpl/examples/Jakobshavn/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/Jakobshavn/runme.m	(revision 25986)
@@ -1,5 +1,5 @@
 steps=[1];
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('   Step 1: Mesh creation');
 	md=triangle(model,'Domain.exp',2000);
@@ -23,7 +23,7 @@
 
 	save JksMesh md
-end %}}}
+end 
 
-if any(steps==2) %{{{
+if any(steps==2) 
 	disp('   Step 2: Parameterization');
 	md=loadmodel('JksMesh');
@@ -33,7 +33,7 @@
 
 	save JksPar md
-end %}}}
+end 
 
-if any(steps==3) %{{{
+if any(steps==3) 
 	disp('   Step 3: Control method friction');
 	md=loadmodel('JksPar');
@@ -70,7 +70,7 @@
 
 	save JksControl md
-end %}}}
+end 
 
-if any(steps==4) %{{{
+if any(steps==4) 
 	disp('   Plotting')
 	md=loadmodel('JksControl');
@@ -85,3 +85,3 @@
 		'title','Friction Coefficient',...
 		'colorbartitle#3','(m)');
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/LcurveAnalysis/runme.m
===================================================================
--- /issm/trunk-jpl/examples/LcurveAnalysis/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/LcurveAnalysis/runme.m	(revision 25986)
@@ -1,5 +1,5 @@
 steps=[1];
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	% Generate observations
 	md = model;
@@ -13,7 +13,7 @@
 		'data',md.results.StressbalanceSolution.Vel,'title','"observed velocities"')
 	save model1 md
-end %}}}
+end 
 
-if any(steps==2) %{{{
+if any(steps==2) 
 	% Modify rheology, now constant
 	loadmodel('model1.mat');
@@ -30,7 +30,7 @@
 		'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
 	save model2 md
-end %}}}
+end 
 
-if any(steps==3) %{{{
+if any(steps==3) 
 	% Perform L-curve analysis for ice rigidity inversion
 	loadmodel('model2.mat');
@@ -106,7 +106,7 @@
 	xlabel('$\mathrm{log}(\mathcal{J}_0$)','Interpreter','latex')
 	ylabel('$\mathrm{log}(\mathcal{R})$','Interpreter','latex')
-end %}}}
+end 
 
-if any(steps==4) %{{{
+if any(steps==4) 
 	%invert for ice rigidity
 	loadmodel('model2.mat');
@@ -128,3 +128,3 @@
 	plotmodel(md,'axis#all','tight','data',md.results.StressbalanceSolution.MaterialsRheologyBbar,'caxis',[ 1.3 1.9]*10^8,'title','inferred B',...
 		'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
-end %}}}
+end 
Index: sm/trunk-jpl/examples/Mesh/runme.m
===================================================================
--- /issm/trunk-jpl/examples/Mesh/runme.m	(revision 25985)
+++ 	(revision )
@@ -1,69 +1,0 @@
-steps=[1];
-
-if any(steps==1) % Model %{{{
-	md=model;
-end %}}}
-
-if any(steps==2) % squaremesh %{{{
-	md=squaremesh(md,100,200,15,25);
-	plotmodel(md,'data','mesh');
-end %}}}
-
-if any(steps==3) % roundmesh %{{{
-	md=roundmesh(model,100,10);
-	plotmodel(md,'data','mesh');
-end %}}}
-
-if any(steps==4) % triangle %{{{
-	md=triangle(model,'Square.exp',.2);
-	plotmodel(md,'data','mesh');
-end %}}}
-
-if any(steps==5) % bamg %{{{
-	md=bamg(model,'domain','Square.exp','hmax',.05);
-	plotmodel(md,'data','mesh');
-end %}}}
-
-if any(steps==6) % Non-Uniform mesh %{{{
-	hvertices=[0.2;0.2;0.005;0.2];
-	md=bamg(md,'domain','Square.exp','hvertices',hvertices);
-	plotmodel(md,'data','mesh');
-end %}}}
-
-if any(steps==7) % Mesh adaptation %{{{
-	md=bamg(model,'domain','Square.exp','hmax',.05);
-	vel=shock(md.mesh.x,md.mesh.y);
-	plotmodel(md,'data',vel,'edgecolor','w');
-
-	md=bamg(model,'domain','Square.exp','hmax',.005);
-	vel=shock(md.mesh.x,md.mesh.y);
-	md=bamg(md,'field',vel,'err',0.05,'hmin',0.005,'hmax',0.3);
-	vel=shock(md.mesh.x,md.mesh.y);
-	plotmodel(md,'data',vel,'edgecolor','w');
-
-	md=bamg(model,'domain','Square.exp','hmax',.005);
-	vel=shock(md.mesh.x,md.mesh.y);
-	md=bamg(md,'field',vel,'err',0.03,'hmin',0.005,'hmax',0.3,'gradation',3);
-	vel=shock(md.mesh.x,md.mesh.y);
-	plotmodel(md,'data',vel,'edgecolor','w');
-
-	md=bamg(model,'domain','Square.exp','hmax',.005);
-	vel=shock(md.mesh.x,md.mesh.y);
-	md=bamg(md,'field',vel,'err',0.03,'hmin',0.005,'hmax',0.3,'gradation',1.3,'anisomax',1);
-	vel=shock(md.mesh.x,md.mesh.y);
-	plotmodel(md,'data',vel,'edgecolor','w');
-end %}}}
-
-if any(steps==8) % Mesh refinement in a specific region %{{{
-	plotmodel(md,'data',vel,'edgecolor','w');
-	exptool('refinement.exp');
-	h=NaN*ones(md.mesh.numberofvertices,1);
-	in=ContourToNodes(md.mesh.x,md.mesh.y,'refinement.exp',1);
-	h(find(in))=0.02;
-	plotmodel(md,'data',in,'edgecolor','w');
-
-	vel=shock(md.mesh.x,md.mesh.y);
-	md=bamg(md,'field',vel,'err',0.03,'hmin',0.005,'hmax',0.3,'hVertices',h);
-	vel=shock(md.mesh.x,md.mesh.y);
-	plotmodel(md,'data',vel,'edgecolor','w');
-end %}}}
Index: /issm/trunk-jpl/examples/Pig/runme.m
===================================================================
--- /issm/trunk-jpl/examples/Pig/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/Pig/runme.m	(revision 25986)
@@ -1,5 +1,5 @@
 steps=[1];
 
-if any(steps==1) %Mesh Generation #1 %{{{
+if any(steps==1) %Mesh Generation #1 
 	%Mesh parameters
 	domain =['./DomainOutline.exp'];
@@ -51,7 +51,7 @@
 	% Save model
 	save ./Models/PIG_Mesh_generation md;
-end %}}}
+end 
 
-if any(steps==2) %Masks #2 %{{{
+if any(steps==2) %Masks #2 
 	md = loadmodel('./Models/PIG_Mesh_generation');
 
@@ -79,7 +79,7 @@
 	% Save model
 	save ./Models/PIG_SetMask md;
-end %}}}
+end 
 
-if any(steps==3) %Parameterization #3 %{{{
+if any(steps==3) %Parameterization #3 
 	md = loadmodel('./Models/PIG_SetMask');
 	md = parameterize(md,'./Pig.par');
@@ -90,7 +90,7 @@
 	% Save model
 	save ./Models/PIG_Parameterization md;
-end %}}}
+end 
 
-if any(steps==4) %Control Method #4 %{{{
+if any(steps==4) %Control Method #4 
 	md = loadmodel('./Models/PIG_Parameterization');
 
@@ -132,7 +132,7 @@
 	% Save model
 	save ./Models/PIG_Control_drag md;
-end %}}}
+end 
 
-if any(steps==5) %Plot #5 %{{{
+if any(steps==5) %Plot #5 
 	md = loadmodel('./Models/PIG_Control_drag');
 
@@ -145,7 +145,7 @@
 		'caxis#1-2',([1.5,4000]),...
 		'colorbartitle#3','(m)', 'log#1-2',10);
-end %}}}
+end 
 
-if any(steps==6) %Higher-Order #6 %{{{
+if any(steps==6) %Higher-Order #6 
 	% Load Model
 
@@ -162,5 +162,5 @@
 end % step 6 end
 
-if any(steps==7) %Plot #7 %{{{
+if any(steps==7) %Plot #7 
 	mdHO = loadmodel('./Models/PIG_ModelHO');
 	mdSSA = loadmodel('./Models/PIG_Control_drag');
@@ -180,3 +180,3 @@
 		'colorbartitle#all','(m/yr)',...
 		'layer#5',1, 'log#1', 10,'log#3', 10,'log#5', 10);
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/Pig2/runme.m
===================================================================
--- /issm/trunk-jpl/examples/Pig2/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/Pig2/runme.m	(revision 25986)
@@ -1,5 +1,5 @@
 steps=[1];
 
-if any(steps==1) %Mesh Generation #1 %{{{
+if any(steps==1) %Mesh Generation #1 
 
 	%Mesh parameters
@@ -40,7 +40,7 @@
 	plotmodel(md,'data','mesh')
 	save ./Models/PIG_Mesh_generation md;
-end %}}}
-
-if any(steps==2) %Masks #2 %{{{
+end 
+
+if any(steps==2) %Masks #2 
 	md = loadmodel('./Models/PIG_Mesh_generation');
 
@@ -65,7 +65,7 @@
 
 	save ./Models/PIG_SetMask md;
-end %}}}
-
-if any(steps==3) %Parameterization #3 %{{{
+end 
+
+if any(steps==3) %Parameterization #3 
 	md = loadmodel('./Models/PIG_SetMask');
 	md = setflowequation(md,'SSA','all');
@@ -73,7 +73,7 @@
 
 	save ./Models/PIG_Parameterization md;
-end %}}}
-
-if any(steps==4) %Rheology B inversion %{{{
+end 
+
+if any(steps==4) %Rheology B inversion 
 	md = loadmodel('./Models/PIG_Parameterization');
 
@@ -117,7 +117,7 @@
 	% Save model
 	save ./Models/PIG_Control_B md;
-end %}}}
-
-if any(steps==5) %drag inversion %{{{
+end 
+
+if any(steps==5) %drag inversion 
 	md = loadmodel('./Models/PIG_Control_B');
 
@@ -151,7 +151,7 @@
 
 	save ./Models/PIG_Control_drag md;
-end %}}}
-
-if any(steps==6) %Transient Run #1 %{{{
+end 
+
+if any(steps==6) %Transient Run #1 
 
 	md = loadmodel('./Models/PIG_Control_drag');	
@@ -180,5 +180,5 @@
 	% Save model
 	save ./Models/PIG_Transient md;
-end %}}}
+end 
 
 if any(steps==7) %High Melt #2
@@ -193,7 +193,7 @@
 
 	save ./Models/PIG_HighMelt md;
-end %}}}
-
-if any(steps==8) %Ice Front retreat %{{{
+end 
+
+if any(steps==8) %Ice Front retreat 
 	md = loadmodel('./Models/PIG_Transient');	
 
@@ -206,7 +206,7 @@
 
 	save ./Models/PIG_FrontRetreat md;
-end %}}}
-
-if any(steps==9) %High surface mass balance #3 %{{{
+end 
+
+if any(steps==9) %High surface mass balance #3 
 	%Load model from PIG_Transient
 	%...
@@ -226,3 +226,3 @@
 	%Save model
 	save ./Models/PIG_SMB md;
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/PigSensitivity/runme.m
===================================================================
--- /issm/trunk-jpl/examples/PigSensitivity/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/PigSensitivity/runme.m	(revision 25986)
@@ -1,5 +1,5 @@
 steps=[1];
 
-if any(steps==1) %Transient Run #1 %{{{
+if any(steps==1) %Transient Run #1 
 
 	md = loadmodel('../Pig/Models/PIG_Control_drag');
@@ -35,7 +35,7 @@
 	% Save model
 	save ./Models/PIG_Transient md;
-end %}}}
+end 
 
-if any(steps==2) %High Melt #2 %{{{
+if any(steps==2) %High Melt #2 
 	md = loadmodel('./Models/PIG_Transient');
 
@@ -61,7 +61,7 @@
 
 	save ./Models/PIG_HighMelt md;
-end %}}}
+end 
 
-if any(steps==3) %Ice Front retreat %{{{
+if any(steps==3) %Ice Front retreat 
 	md = loadmodel('./Models/PIG_Transient');
 
@@ -91,7 +91,7 @@
 
 	save ./Models/PIG_FrontRetreat md2;
-end %}}}
+end 
 
-if any(steps==4) %High surface mass balance #3 %{{{
+if any(steps==4) %High surface mass balance #3 
 
 	%Load model
@@ -107,3 +107,3 @@
 	%Save model
 
-end %}}} % step 4 end
+end % step 4 end
Index: /issm/trunk-jpl/examples/SlrFarrell/runme.m
===================================================================
--- /issm/trunk-jpl/examples/SlrFarrell/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/SlrFarrell/runme.m	(revision 25986)
@@ -6,5 +6,5 @@
  % [1:5]
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('   Step 1: Global mesh creation');
 
@@ -54,7 +54,7 @@
 
 	plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
-end %}}}
+end 
 
-if any(steps==2) %{{{
+if any(steps==2) 
 	disp('   Step 2: Define source as in Farrell, 1972, Figure 1');
 	md = loadmodel('./Models/SlrFarrell_Mesh');
@@ -67,7 +67,7 @@
 
 	plotmodel (md,'data',md.slr.sealevel,'view',[90 90],'title#all','Initial sea-level [m]');
-end %}}}
+end 
 
-if any(steps==3) %{{{
+if any(steps==3) 
 	disp('   Step 3: Parameterization');
 	md = loadmodel('./Models/SlrFarrell_Loads');
@@ -95,7 +95,7 @@
 
 	save ./Models/SlrFarrell_Parameterization md;
-end %}}}
+end 
 
-if any(steps==4) %{{{
+if any(steps==4) 
 	disp('   Step 4: Solve Slr solver');
 	md = loadmodel('./Models/SlrFarrell_Parameterization');
@@ -109,7 +109,7 @@
 
 	save ./Models/SlrFarrell_Solution md;
-end %}}}
+end 
 
-if any(steps==5) %{{{
+if any(steps==5) 
 	disp('   Step 5: Plot solutions');
 	md = loadmodel('./Models/SlrFarrell_Solution');
@@ -147,3 +147,3 @@
 	set(gcf,'color','w');
 	%export_fig('Fig5.pdf');
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/SlrGRACE/runme.m
===================================================================
--- /issm/trunk-jpl/examples/SlrGRACE/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/SlrGRACE/runme.m	(revision 25986)
@@ -4,5 +4,5 @@
 steps=[7];
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('   Step 1: Global mesh creation');
 
@@ -56,7 +56,7 @@
 
 	plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
-end %}}}
-
-if any(steps==2) %{{{
+end 
+
+if any(steps==2) 
 	disp('   Step 2: Define loads in meters of ice height equivalent');
 	md = loadmodel('./Models/SlrGRACE_Mesh');
@@ -72,7 +72,7 @@
 
 	plotmodel (md,'data',md.solidearth.surfaceload.icethicknesschange,'view',[90 -90],'caxis',[-.1 .1],'title','Ice height equivalent [m]');
-end %}}}
-
-if any(steps==3) %{{{
+end 
+
+if any(steps==3) 
 	disp('   Step 3: Parameterization');
 	md = loadmodel('./Models/SlrGRACE_Loads');
@@ -102,7 +102,7 @@
 
 	save ./Models/SlrGRACE_Parameterization md;
-end %}}}
-
-if any(steps==4) %{{{
+end 
+
+if any(steps==4) 
 	disp('   Step 4: Solve Slr solver');
 	md = loadmodel('./Models/SlrGRACE_Parameterization');
@@ -120,7 +120,7 @@
 
 	save ./Models/SlrGRACE_Solution md;
-end %}}}
-
-if any(steps==5) %{{{
+end 
+
+if any(steps==5) 
 	disp('   Step 5: Plot solutions');
 	md = loadmodel('./Models/SlrGRACE_Solution');
@@ -180,7 +180,7 @@
 		%export_fig(fig_name{kk});
 	end
-end %}}}
-
-if any(steps==6) %{{{
+end 
+
+if any(steps==6) 
 	disp('   Step 6: Transient run');
 	md = loadmodel('./Models/SlrGRACE_Parameterization');
@@ -216,7 +216,7 @@
 
 	save ./Models/SlrGRACE_Transient md;
-end %}}}
-
-if any(steps==7) %{{{
+end 
+
+if any(steps==7) 
 	disp('   Step 7: Plot transient');
 	md = loadmodel('./Models/SlrGRACE_Transient');
@@ -296,3 +296,3 @@
 	set(gcf,'color','w');
 	%export_fig('Fig7.pdf');
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/SlrGRACE_NIMS/runme.m
===================================================================
--- /issm/trunk-jpl/examples/SlrGRACE_NIMS/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/SlrGRACE_NIMS/runme.m	(revision 25986)
@@ -4,5 +4,5 @@
 steps=[8];
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('   Step 1: Global mesh creation');
 
@@ -21,7 +21,7 @@
 
 	plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
-end %}}}
-
-if any(steps==2) %{{{
+end 
+
+if any(steps==2) 
 	disp('   Step 2: Global mesh creation: refined coastlines');
 
@@ -80,7 +80,7 @@
 
 	plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
-end %}}}
-
-if any(steps==3) %{{{
+end 
+
+if any(steps==3) 
 	disp('   Step 3: Define loads in meters of ice height equivalent');
 	md = loadmodel('./Models/SlrGRACE_Mesh_refined');
@@ -135,7 +135,7 @@
 
 	plotmodel(md,'data',md.solidearth.surfaceload.icethicknesschange,'view',[90 90],'title','Ice height equivalent [m]');
-end %}}}
-
-if any(steps==4) %{{{
+end 
+
+if any(steps==4) 
 	disp('   Step 4: Parameterization');
 	md = loadmodel('./Models/SlrGRACE_Loads');
@@ -165,7 +165,7 @@
 
 	save ./Models/SlrGRACE_Parameterization md;
-end %}}}
-
-if any(steps==5) %{{{
+end 
+
+if any(steps==5) 
 	disp('   Step 5: Solve Slr solver');
 	md = loadmodel('./Models/SlrGRACE_Parameterization');
@@ -183,7 +183,7 @@
 
 	save ./Models/SlrGRACE_Solution md;
-end %}}}
-
-if any(steps==6) %{{{
+end 
+
+if any(steps==6) 
 	disp('   Step 6: Plot solutions');
 	md = loadmodel('./Models/SlrGRACE_Solution');
@@ -243,7 +243,7 @@
 		%export_fig(fig_name{kk});
 	end
-end %}}}
-
-if any(steps==7) %{{{
+end 
+
+if any(steps==7) 
 	disp('   Step 7: Transient run');
 	md = loadmodel('./Models/SlrGRACE_Parameterization');
@@ -280,7 +280,7 @@
 
 	save ./Models/SlrGRACE_Transient md;
-end %}}}
-
-if any(steps==8) %{{{
+end 
+
+if any(steps==8) 
 	disp('   Step 8: Plot transient');
 	md = loadmodel('./Models/SlrGRACE_Transient');
@@ -303,3 +303,3 @@
 	set(gcf,'color','w');
 	legend('GMSL','Incheon');
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/UncertaintyQuantification/runme.m
===================================================================
--- /issm/trunk-jpl/examples/UncertaintyQuantification/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/UncertaintyQuantification/runme.m	(revision 25986)
@@ -2,5 +2,5 @@
 steps=[1];
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('   Step 1: plot flux gates');
 
@@ -28,7 +28,7 @@
 		'8','9','10','11','12','13'},...
 		'textposition',textpositions);
-end %}}}
-
-if any(steps==2) %{{{
+end 
+
+if any(steps==2) 
 	disp('   Step 2: compute cross overs from CRESIS');
 
@@ -58,7 +58,7 @@
 
 	save Models/PIG.CrossOvers DeltaHH
-end %}}}
-
-if any(steps==3) %{{{
+end 
+
+if any(steps==3) 
 	disp('   Step 3: sampling analysis');
 
@@ -150,7 +150,7 @@
 
 	save ./Models/PIG.Sampling md;
-end %}}}
-
-if any(steps==4) %{{{
+end 
+
+if any(steps==4) 
 	disp('   Step 4: sensitivity analysis');
 
@@ -242,7 +242,7 @@
 
 	save ./Models/PIG.Sensitivity md;
-end %}}}
-
-if any(steps==5) %{{{
+end 
+
+if any(steps==5) 
 	disp('   Step 5: plot partition');
 
@@ -253,7 +253,7 @@
 	'linewidth',2, 'axis#all','image','unit','km','colorbar','off',...
 	'title','Partition Edges on ISSM mesh','grid','on');
-end %}}}
-
-if any(steps==6) %{{{
+end 
+
+if any(steps==6) 
 	disp('   Step 6: plot histogram');
 
@@ -273,7 +273,7 @@
 	'none','EdgeColor','red');
 
-end %}}}
-
-if any(steps==7) %{{{
+end 
+
+if any(steps==7) 
 	disp('   Step 7: plot sensitivity');
 
@@ -313,3 +313,3 @@
 		'colorbartitle#3','If_{B}','unit#all','km','figure',2,...
 		'title','Importance Factors: H, \alpha, B');
-end %}}}
+end 
Index: /issm/trunk-jpl/examples/shakti/runme.m
===================================================================
--- /issm/trunk-jpl/examples/shakti/runme.m	(revision 25985)
+++ /issm/trunk-jpl/examples/shakti/runme.m	(revision 25986)
@@ -1,5 +1,5 @@
 steps=[1:3];
 
-if any(steps==1) %{{{
+if any(steps==1) 
 	disp('	Step 1: Mesh');
 
@@ -8,7 +8,7 @@
 
 	save MoulinMesh md
-end %}}}
+end 
 
-if any(steps==2) %{{{
+if any(steps==2) 
 	disp('	Step 2: Parameterization');
 	md=loadmodel('MoulinMesh');
@@ -49,7 +49,7 @@
 
 	save MoulinParam md;
-end %}}}
+end 
 
-if any(steps==3) %{{{
+if any(steps==3) 
 	disp('	Step 3: Solve!');
 	md=loadmodel('MoulinParam');
@@ -82,3 +82,3 @@
 
 	save MoulinTransient md
-end %}}}
+end 
Index: /issm/trunk-jpl/jenkins/examples_tests.sh
===================================================================
--- /issm/trunk-jpl/jenkins/examples_tests.sh	(revision 25985)
+++ /issm/trunk-jpl/jenkins/examples_tests.sh	(revision 25986)
@@ -64,5 +64,5 @@
 			# STEP_SEVEN #{{{
 			STEP_SEVEN="\
-				if any(steps==7) %{{{\n\
+				if any(steps==7)\n\
 					disp('   Step 7: Historical Relaxation run');\n\
 					md = loadmodel('./Models/Greenland.Control_drag');\n\
@@ -96,10 +96,10 @@
 					\n\
 					save ./Models/Greenland.HistoricTransient_200yr md;\n\
-				end %}}}\n\
+				end\n\
 			"
 			#}}}
 			# STEP_EIGHT #{{{
 			STEP_EIGHT="\
-				if any(steps==8) %{{{\n\
+				if any(steps==8)\n\
 					%Load historic transient model\n\
 					md=loadmodel('./Models/Greenland.HistoricTransient_200yr');\n\
@@ -148,5 +148,5 @@
 					title('Ice Volume');\n\
 					xlabel('years');\n\
-				end %}}}\n\
+				end\n\
 			"
 			#}}}
@@ -170,4 +170,5 @@
 			#	add conditional after 'RUN_EXAMPLE -eq 1' block)
 			#
+
 			# RUNME #{{{
 			RUNME="\
@@ -187,5 +188,5 @@
 					\n\
 					%Mesh Generation #1\n\
-					if any(steps==1) %{{{\n\
+					if any(steps==1)\n\
 						%initialize md as a new model #help model\n\
 						%->\n\
@@ -205,8 +206,8 @@
 						%->\n\
 						save ./Models/ISMIP.Mesh_generation md;\n\
-					end %}}}\n\
+					end\n\
 					\n\
 					%Masks #2\n\
-					if any(steps==2) %{{{\n\
+					if any(steps==2)\n\
 						% load the preceding step #help loadmodel\n\
 						% path is given by the organizer with the name of the given step\n\
@@ -223,8 +224,8 @@
 						%->\n\
 						save ./Models/ISMIP.SetMask md;\n\
-					end %}}}\n\
+					end\n\
 					\n\
 					%Parameterization #3\n\
-					if any(steps==3) %{{{\n\
+					if any(steps==3)\n\
 						% load the preceding step #help loadmodel\n\
 						% path is given by the organizer with the name of the given step\n\
@@ -239,8 +240,8 @@
 						%->\n\
 						save ./Models/ISMIP.Parameterization md;\n\
-					end %}}}\n\
+					end\n\
 					\n\
 					%Extrusion #4\n\
-					if any(steps==4) %{{{\n\
+					if any(steps==4)\n\
 						\n\
 						% load the preceding step #help loadmodel\n\
@@ -258,8 +259,8 @@
 						%->\n\
 						save ./Models/ISMIP.Extrusion md;\n\
-					end %}}}\n\
+					end\n\
 					\n\
 					%Set the flow computing method #5\n\
-					if any(steps==5) %{{{\n\
+					if any(steps==5)\n\
 						\n\
 						% load the preceding step #help loadmodel\n\
@@ -274,8 +275,8 @@
 						%->\n\
 						save ./Models/ISMIP.SetFlow md;\n\
-					end %}}}\n\
+					end\n\
 					\n\
 					%Set Boundary Conditions #6\n\
-					if any(steps==6) %{{{\n\
+					if any(steps==6)\n\
 						\n\
 						% load the preceding step #help loadmodel\n\
@@ -328,8 +329,8 @@
 						%->\n\
 						save ./Models/ISMIP.BoundaryCondition md;\n\
-					end %}}}\n\
+					end\n\
 					\n\
 					%Solving #7\n\
-					if any(steps==7) %{{{\n\
+					if any(steps==7)\n\
 						% load the preceding step #help loadmodel\n\
 						% path is given by the organizer with the name of the given step\n\
@@ -354,8 +355,8 @@
 						%->\n\
 						plotmodel(md,'data',md.results.StressbalanceSolution.Vel)\n\
-					end %}}}\n\
+					end\n\
 					\n\
 					%Solving #8\n\
-					if any(steps==8) %{{{\n\
+					if any(steps==8)\n\
 						% load the preceding step #help loadmodel\n\
 						% path is given by the organizer with the name of the given step\n\
@@ -392,5 +393,5 @@
 						%->\n\
 						plotmodel(md,'data',md.results.TransientSolution(20).Vel)\n\
-					end %}}}\n\
+					end\n\
 			"
 			#}}}
@@ -533,10 +534,87 @@
 		elif [ "${dir}" == "./Mesh" ]; then
 			# NOTE: Cannot test exptool region selection without GUI
-			sed -i.bak -e 's|steps=\[1\];|steps=\[1:7\];\n\ntry\n|' $RUNME_FILE
+			#
+
+			# RUNME #{{{
+			RUNME="\
+				try\n\
+					steps=[1:7];\n\
+					\n\
+					if any(steps==1) % Model\n\
+						md=model;\n\
+					end\n\
+					\n\
+					if any(steps==2) % squaremesh\n\
+						md=squaremesh(md,100,200,15,25);\n\
+						plotmodel(md,'data','mesh');\n\
+					end\n\
+					\n\
+					if any(steps==3) % roundmesh\n\
+						md=roundmesh(model,100,10);\n\
+						plotmodel(md,'data','mesh');\n\
+					end\n\
+					\n\
+					if any(steps==4) % triangle\n\
+						md=triangle(model,'Square.exp',.2);\n\
+						plotmodel(md,'data','mesh');\n\
+					end\n\
+					\n\
+					if any(steps==5) % bamg\n\
+						md=bamg(model,'domain','Square.exp','hmax',.05);\n\
+						plotmodel(md,'data','mesh');\n\
+					end\n\
+					\n\
+					if any(steps==6) % Non-Uniform mesh\n\
+						hvertices=[0.2;0.2;0.005;0.2];\n\
+						md=bamg(md,'domain','Square.exp','hvertices',hvertices);\n\
+						plotmodel(md,'data','mesh');\n\
+					end\n\
+					\n\
+					if any(steps==7) % Mesh adaptation\n\
+						md=bamg(model,'domain','Square.exp','hmax',.05);\n\
+						vel=shock(md.mesh.x,md.mesh.y);\n\
+						plotmodel(md,'data',vel,'edgecolor','w');\n\
+						\n\
+						md=bamg(model,'domain','Square.exp','hmax',.005);\n\
+						vel=shock(md.mesh.x,md.mesh.y);\n\
+						md=bamg(md,'field',vel,'err',0.05,'hmin',0.005,'hmax',0.3);\n\
+						vel=shock(md.mesh.x,md.mesh.y);\n\
+						plotmodel(md,'data',vel,'edgecolor','w');\n\
+						\n\
+						md=bamg(model,'domain','Square.exp','hmax',.005);\n\
+						vel=shock(md.mesh.x,md.mesh.y);\n\
+						md=bamg(md,'field',vel,'err',0.03,'hmin',0.005,'hmax',0.3,'gradation',3);\n\
+						vel=shock(md.mesh.x,md.mesh.y);\n\
+						plotmodel(md,'data',vel,'edgecolor','w');\n\
+						\n\
+						md=bamg(model,'domain','Square.exp','hmax',.005);\n\
+						vel=shock(md.mesh.x,md.mesh.y);\n\
+						md=bamg(md,'field',vel,'err',0.03,'hmin',0.005,'hmax',0.3,'gradation',1.3,'anisomax',1);\n\
+						vel=shock(md.mesh.x,md.mesh.y);\n\
+						plotmodel(md,'data',vel,'edgecolor','w');\n\
+					end\n\
+					\n\
+					if any(steps==8) % Mesh refinement in a specific region\n\
+						plotmodel(md,'data',vel,'edgecolor','w');\n\
+						exptool('refinement.exp');\n\
+						h=NaN*ones(md.mesh.numberofvertices,1);\n\
+						in=ContourToNodes(md.mesh.x,md.mesh.y,'refinement.exp',1);\n\
+						h(find(in))=0.02;\n\
+						plotmodel(md,'data',in,'edgecolor','w');\n\
+						\n\
+						vel=shock(md.mesh.x,md.mesh.y);\n\
+						md=bamg(md,'field',vel,'err',0.03,'hmin',0.005,'hmax',0.3,'hVertices',h);\n\
+						vel=shock(md.mesh.x,md.mesh.y);\n\
+						plotmodel(md,'data',vel,'edgecolor','w');\n\
+					end\n\
+			"
+			#}}}
+			touch $RUNME_FILE
+			perl -0755 -p -i'.bak' -e "s|^.*$|${RUNME}|s" $RUNME_FILE
 			RUN_EXAMPLE=1
 		elif [ "${dir}" == "./Pig" ]; then
 			# STEP_SIX #{{{
 			STEP_SIX="\
-				if any(steps==6) %{{{\n\
+				if any(steps==6)\n\
 					% Load Model\n\
 					md = loadmodel('./Models/PIG_Control_drag');\n\
@@ -554,5 +632,5 @@
 					% Save Model\n\
 					save ./Models/PIG_ModelHO md;\n\
-				end %}}}\n\
+				end\n\
 			"
 			#}}}
@@ -651,4 +729,8 @@
 		fi
 
+		if [ "${dir}" == "./Mesh" ]; then
+			rm -f $RUNME_FILE
+		fi
+
 		if [ "${dir}" == "./Pig" ]; then
 			mv -f DomainOutline.exp DomainOutline.bkp
