Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 21951)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 21952)
@@ -2295,4 +2295,5 @@
 	int elementswidth       = this->GetElementsWidth();//just tria elements in this version
 	int amrtype;
+	bool isgroundingline;
 
 	/*Branch to specific amr depending on requested method*/	
@@ -2411,5 +2412,6 @@
 
 	/*Adjust base, thickness and mask grounded ice leve set*/
-	if(true) this->AdjustBaseThicknessAndMask();
+	this->parameters->FindParam(&isgroundingline,TransientIsgroundinglineEnum);
+	if(isgroundingline) this->AdjustBaseThicknessAndMask();
 
 	/*Reset current configuration: */
Index: /issm/trunk-jpl/test/NightlyRun/test462.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test462.m	(revision 21952)
+++ /issm/trunk-jpl/test/NightlyRun/test462.m	(revision 21952)
@@ -0,0 +1,38 @@
+%Test Name: SquareSheetShelfAmrBamgField
+md=triangle(model(),'../Exp/Square.exp',150000.);
+md=setmask(md,'../Exp/SquareShelf.exp','');
+md=parameterize(md,'../Par/SquareSheetShelf.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.transient.isstressbalance=1;
+md.transient.ismasstransport=1;
+md.transient.issmb=0;
+md.transient.isthermal=0;
+md.transient.isgroundingline=0;
+%amr bamg settings, just field
+md.amr=amrbamg();
+md.amr.hmin=10000;
+md.amr.hmax=100000;
+md.amr.fieldname='Vel';
+md.amr.keepmetric=1;
+md.amr.gradation=1.2;
+md.amr.groundingline_resolution=2000;
+md.amr.groundingline_distance=0;
+md.amr.icefront_resolution=1000;
+md.amr.icefront_distance=0;
+md.amr.thicknesserror_resolution=1000;
+md.amr.thicknesserror_threshold=0;
+md.amr.deviatoricerror_resolution=1000;
+md.amr.deviatoricerror_threshold=0;
+md.transient.amr_frequency = 1;
+md=solve(md,'Transient');
+
+%Fields and tolerances to track changes
+field_names     ={'Vx','Vy','Vel','Pressure'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13};
+field_values={...
+	(md.results.TransientSolution(end).Vx),...
+	(md.results.TransientSolution(end).Vy),...
+	(md.results.TransientSolution(end).Vel),...
+	(md.results.TransientSolution(end).Pressure),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test463.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test463.m	(revision 21952)
+++ /issm/trunk-jpl/test/NightlyRun/test463.m	(revision 21952)
@@ -0,0 +1,38 @@
+%Test Name: SquareSheetShelfAmrBamgGroundingline
+md=triangle(model(),'../Exp/Square.exp',150000.);
+md=setmask(md,'../Exp/SquareShelf.exp','');
+md=parameterize(md,'../Par/SquareSheetShelf.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.transient.isstressbalance=1;
+md.transient.ismasstransport=1;
+md.transient.issmb=0;
+md.transient.isthermal=0;
+md.transient.isgroundingline=0;
+%amr bamg settings, just grounding line
+md.amr=amrbamg();
+md.amr.hmin=10000;
+md.amr.hmax=100000;
+md.amr.fieldname='None';
+md.amr.keepmetric=0;
+md.amr.gradation=1.2;
+md.amr.groundingline_resolution=12000;
+md.amr.groundingline_distance=100000;
+md.amr.icefront_resolution=1000;
+md.amr.icefront_distance=0;
+md.amr.thicknesserror_resolution=1000;
+md.amr.thicknesserror_threshold=0;
+md.amr.deviatoricerror_resolution=1000;
+md.amr.deviatoricerror_threshold=0;
+md.transient.amr_frequency = 1;
+md=solve(md,'Transient');
+
+%Fields and tolerances to track changes
+field_names     ={'Vx','Vy','Vel','Pressure'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13};
+field_values={...
+	(md.results.TransientSolution(end).Vx),...
+	(md.results.TransientSolution(end).Vy),...
+	(md.results.TransientSolution(end).Vel),...
+	(md.results.TransientSolution(end).Pressure),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test464.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test464.m	(revision 21952)
+++ /issm/trunk-jpl/test/NightlyRun/test464.m	(revision 21952)
@@ -0,0 +1,38 @@
+%Test Name: SquareSheetShelfAmrBamgIceFront
+md=triangle(model(),'../Exp/Square.exp',150000.);
+md=setmask(md,'../Exp/SquareShelf.exp','');
+md=parameterize(md,'../Par/SquareSheetShelf.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.transient.isstressbalance=1;
+md.transient.ismasstransport=1;
+md.transient.issmb=0;
+md.transient.isthermal=0;
+md.transient.isgroundingline=0;
+%amr bamg settings, just ice front
+md.amr=amrbamg();
+md.amr.hmin=10000;
+md.amr.hmax=100000;
+md.amr.fieldname='None';
+md.amr.keepmetric=0;
+md.amr.gradation=1.2;
+md.amr.groundingline_resolution=12000;
+md.amr.groundingline_distance=0;
+md.amr.icefront_resolution=12000;
+md.amr.icefront_distance=100000;
+md.amr.thicknesserror_resolution=1000;
+md.amr.thicknesserror_threshold=0;
+md.amr.deviatoricerror_resolution=1000;
+md.amr.deviatoricerror_threshold=0;
+md.transient.amr_frequency = 1;
+md=solve(md,'Transient');
+
+%Fields and tolerances to track changes
+field_names     ={'Vx','Vy','Vel','Pressure'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13};
+field_values={...
+	(md.results.TransientSolution(end).Vx),...
+	(md.results.TransientSolution(end).Vy),...
+	(md.results.TransientSolution(end).Vel),...
+	(md.results.TransientSolution(end).Pressure),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test465.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test465.m	(revision 21952)
+++ /issm/trunk-jpl/test/NightlyRun/test465.m	(revision 21952)
@@ -0,0 +1,38 @@
+%Test Name: SquareSheetShelfAmrBamgAll
+md=triangle(model(),'../Exp/Square.exp',150000.);
+md=setmask(md,'../Exp/SquareShelf.exp','');
+md=parameterize(md,'../Par/SquareSheetShelf.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.transient.isstressbalance=1;
+md.transient.ismasstransport=1;
+md.transient.issmb=0;
+md.transient.isthermal=0;
+md.transient.isgroundingline=0;
+%amr bamg settings, field, grounding line and ice front
+md.amr=amrbamg();
+md.amr.hmin=20000;
+md.amr.hmax=100000;
+md.amr.fieldname='Vel';
+md.amr.keepmetric=0;
+md.amr.gradation=1.2;
+md.amr.groundingline_resolution=10000;
+md.amr.groundingline_distance=100000;
+md.amr.icefront_resolution=15000;
+md.amr.icefront_distance=100000;
+md.amr.thicknesserror_resolution=1000;
+md.amr.thicknesserror_threshold=0;
+md.amr.deviatoricerror_resolution=1000;
+md.amr.deviatoricerror_threshold=0;
+md.transient.amr_frequency = 1;
+md=solve(md,'Transient');
+
+%Fields and tolerances to track changes
+field_names     ={'Vx','Vy','Vel','Pressure'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13};
+field_values={...
+	(md.results.TransientSolution(end).Vx),...
+	(md.results.TransientSolution(end).Vy),...
+	(md.results.TransientSolution(end).Vel),...
+	(md.results.TransientSolution(end).Pressure),...
+	};
