md=triangle(model(),'../Exp/Square.exp',350000.);
md=setmask(md,'../Exp/SquareShelf.exp','');
md=parameterize(md,'../Par/SquareSheetShelf.par');
md.initialization.vx(:)=0.;
md.initialization.vy(:)=0.;
md.geometry.bed=-700.-abs(md.mesh.y-500000.)/1000.;
md.geometry.bathymetry=-700.-abs(md.mesh.y-500000.)/1000.;
md.geometry.thickness(:)=1000.;
md.geometry.surface=md.geometry.bed+md.geometry.thickness;
md.surfaceforcings.mass_balance(:)=100.;
md=extrude(md,3,1.);
md=setflowequation(md,'SSA','all');
md.transient.isstressbalance=0;
md.transient.isgroundingline=1;
md.groundingline.migration='AgressiveMigration';
md.transient.requested_outputs={'IceVolume','IceVolumeAboveFloatation'};
md.cluster=generic('name',oshostname(),'np',3);

md=solve(md,TransientSolutionEnum());

%Fields and tolerances to track changes
field_names     ={'Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1',...
	'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2',...
	'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3'};
field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
	1e-11,1e-10,1e-11,3e-11,2e-12,5e-12,...
	1e-10,1e-10,1e-10,5e-11,2e-12,5e-12};
field_values={...
	(md.results.TransientSolution(1).Base),...
	(md.results.TransientSolution(1).Surface),...
	(md.results.TransientSolution(1).Thickness),...
	(md.results.TransientSolution(1).MaskGroundediceLevelset),...
	(md.results.TransientSolution(1).IceVolume),...
	(md.results.TransientSolution(1).IceVolumeAboveFloatation),...
	(md.results.TransientSolution(2).Base),...
	(md.results.TransientSolution(2).Surface),...
	(md.results.TransientSolution(2).Thickness),...
	(md.results.TransientSolution(2).MaskGroundediceLevelset),...
	(md.results.TransientSolution(2).IceVolume),...
	(md.results.TransientSolution(2).IceVolumeAboveFloatation),...
	(md.results.TransientSolution(3).Base),...
	(md.results.TransientSolution(3).Surface),...
	(md.results.TransientSolution(3).Thickness),...
	(md.results.TransientSolution(3).MaskGroundediceLevelset),...
	(md.results.TransientSolution(3).IceVolume),...
	(md.results.TransientSolution(3).IceVolumeAboveFloatation),...
	};
