Index: /issm/trunk-jpl/test/Par/79North.par
===================================================================
--- /issm/trunk-jpl/test/Par/79North.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/79North.par	(revision 15988)
@@ -22,14 +22,12 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=50.*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0.;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
 
 %Ice shelf melting and surface mass balance 
-pos=find(md.mask.elementonfloatingice);
 md.basalforcings.melting_rate=zeros(md.mesh.numberofvertices,1);
-md.basalforcings.melting_rate(md.mesh.elements(pos,:))=10;
+md.basalforcings.melting_rate(find(md.mask.groundedice_levelset<0.))=0.;
 md.surfaceforcings.mass_balance=15.*ones(md.mesh.numberofvertices,1);
 
Index: /issm/trunk-jpl/test/Par/79North.py
===================================================================
--- /issm/trunk-jpl/test/Par/79North.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/79North.py	(revision 15988)
@@ -34,14 +34,12 @@
 
 #Friction
-pos=numpy.nonzero(md.mask.elementonfloatingice)
 md.friction.coefficient=50.*ones((md.mesh.numberofvertices,1))
-md.friction.coefficient[md.mesh.elements[pos].astype(int)-1]=0.
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=ones((md.mesh.numberofelements,1))
 md.friction.q=ones((md.mesh.numberofelements,1))
 
 #Ice shelf melting and surface mass balance 
-pos=numpy.nonzero(md.mask.elementonfloatingice)
 md.basalforcings.melting_rate=zeros((md.mesh.numberofvertices,1))
-md.basalforcings.melting_rate[md.mesh.elements[pos].astype(int)-1]=10.
+md.basalforcings.melting_rate[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.surfaceforcings.mass_balance=15*numpy.ones((md.mesh.numberofvertices,1))
 
Index: /issm/trunk-jpl/test/Par/GiaBenchmarksAB.par
===================================================================
--- /issm/trunk-jpl/test/Par/GiaBenchmarksAB.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/GiaBenchmarksAB.par	(revision 15988)
@@ -45,7 +45,6 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/GiaBenchmarksCD.par
===================================================================
--- /issm/trunk-jpl/test/Par/GiaBenchmarksCD.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/GiaBenchmarksCD.par	(revision 15988)
@@ -44,7 +44,6 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/ISMIPA.par
===================================================================
--- /issm/trunk-jpl/test/Par/ISMIPA.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/ISMIPA.par	(revision 15988)
@@ -7,8 +7,6 @@
 
 disp('      creating drag');
-md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1); %q=1.
-%Take care of iceshelves: no basal drag
-pos=find(md.mask.elementonfloatingice);
-md.friction.coefficient(md.mesh.elements(pos,:))=0.;
+md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1);
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/ISMIPA.py
===================================================================
--- /issm/trunk-jpl/test/Par/ISMIPA.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/ISMIPA.py	(revision 15988)
@@ -10,8 +10,6 @@
 
 print "      creating drag"
-md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices,1))    #q=1.
-#Take care of iceshelves: no basal drag
-pos=numpy.nonzero(md.mask.elementonfloatingice)[0]
-md.friction.coefficient[md.mesh.elements[pos,:]-1]=0.
+md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/ISMIPB.par
===================================================================
--- /issm/trunk-jpl/test/Par/ISMIPB.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/ISMIPB.par	(revision 15988)
@@ -7,8 +7,6 @@
 
 disp('      creating drag');
-md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1); %q=1.
-%Take care of iceshelves: no basal drag
-pos=find(md.mask.elementonfloatingice);
-md.friction.coefficient(md.mesh.elements(pos,:))=0.;
+md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1);
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/ISMIPB.py
===================================================================
--- /issm/trunk-jpl/test/Par/ISMIPB.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/ISMIPB.py	(revision 15988)
@@ -10,8 +10,6 @@
 
 print "      creating drag"
-md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices,1))    #q=1.
-#Take care of iceshelves: no basal drag
-pos=numpy.nonzero(md.mask.elementonfloatingice)[0]
-md.friction.coefficient[md.mesh.elements[pos,:]-1]=0.
+md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/ISMIPC.par
===================================================================
--- /issm/trunk-jpl/test/Par/ISMIPC.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/ISMIPC.par	(revision 15988)
@@ -9,7 +9,5 @@
 %md.friction.coefficient=sqrt(md.constants.yts.*(1000.+1000.*sin(md.mesh.x*2.*pi/max(md.mesh.x/2.)).*sin(md.mesh.y*2.*pi/max(md.mesh.x/2.)))./(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)));
 md.friction.coefficient=sqrt(md.constants.yts.*(1000.+1000.*sin(md.mesh.x*2.*pi/max(md.mesh.x)).*sin(md.mesh.y*2.*pi/max(md.mesh.x))));
-%Take care of iceshelves: no basal drag
-pos=find(md.mask.elementonfloatingice);
-md.friction.coefficient(md.mesh.elements(pos,:))=0.;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=zeros(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/ISMIPC.py
===================================================================
--- /issm/trunk-jpl/test/Par/ISMIPC.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/ISMIPC.py	(revision 15988)
@@ -12,7 +12,5 @@
 #md.friction.coefficient=sqrt(md.constants.yts.*(1000.+1000.*sin(md.mesh.x*2.*pi/max(md.mesh.x/2.)).*sin(md.mesh.y*2.*pi/max(md.mesh.x/2.)))./(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)));
 md.friction.coefficient=numpy.sqrt(md.constants.yts*(1000.+1000.*numpy.sin(md.mesh.x.reshape(-1,1)*2.*numpy.pi/numpy.max(md.mesh.x))*numpy.sin(md.mesh.y.reshape(-1,1)*2.*numpy.pi/numpy.max(md.mesh.x))))
-#Take care of iceshelves: no basal drag
-pos=numpy.nonzero(md.mask.elementonfloatingice)[0]
-md.friction.coefficient[md.mesh.elements[pos,:]-1]=0.
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.zeros((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/ISMIPD.par
===================================================================
--- /issm/trunk-jpl/test/Par/ISMIPD.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/ISMIPD.par	(revision 15988)
@@ -8,7 +8,5 @@
 disp('      creating drag');
 md.friction.coefficient=sqrt(md.constants.yts.*(1000.+1000.*sin(md.mesh.x*2.*pi/max(md.mesh.x))));
-%Take care of iceshelves: no basal drag
-pos=find(md.mask.elementonfloatingice);
-md.friction.coefficient(md.mesh.elements(pos,:))=0.;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=zeros(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/ISMIPD.py
===================================================================
--- /issm/trunk-jpl/test/Par/ISMIPD.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/ISMIPD.py	(revision 15988)
@@ -11,7 +11,5 @@
 print "      creating drag"
 md.friction.coefficient=numpy.sqrt(md.constants.yts*(1000.+1000.*numpy.sin(md.mesh.x.reshape(-1,1)*2.*numpy.pi/numpy.max(md.mesh.x))))
-#Take care of iceshelves: no basal drag
-pos=numpy.nonzero(md.mask.elementonfloatingice)[0]
-md.friction.coefficient[md.mesh.elements[pos,:]-1]=0.
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.zeros((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/Pig.par
===================================================================
--- /issm/trunk-jpl/test/Par/Pig.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/Pig.par	(revision 15988)
@@ -27,7 +27,6 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=50*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/Pig.py
===================================================================
--- /issm/trunk-jpl/test/Par/Pig.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/Pig.py	(revision 15988)
@@ -38,7 +38,6 @@
 
 #Friction
-pos=numpy.nonzero(md.mask.elementonfloatingice)
 md.friction.coefficient=50.*ones((md.mesh.numberofvertices,1))
-md.friction.coefficient[md.mesh.elements[pos].astype(int)-1]=0.
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=ones((md.mesh.numberofelements,1))
 md.friction.q=ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/RoundSheetEISMINT.par
===================================================================
--- /issm/trunk-jpl/test/Par/RoundSheetEISMINT.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/RoundSheetEISMINT.par	(revision 15988)
@@ -6,5 +6,5 @@
 
 disp('      creating drag');
-md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1); %q=1. no drag is specified in the analytical solution
+md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1);
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/RoundSheetEISMINT.py
===================================================================
--- /issm/trunk-jpl/test/Par/RoundSheetEISMINT.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/RoundSheetEISMINT.py	(revision 15988)
@@ -9,5 +9,5 @@
 
 print "      creating drag"
-md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices,1))    #q=1. no drag is specified in the analytical solution
+md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices,1)) 
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/RoundSheetShelf.par
===================================================================
--- /issm/trunk-jpl/test/Par/RoundSheetShelf.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/RoundSheetShelf.par	(revision 15988)
@@ -68,7 +68,6 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/RoundSheetShelf.py
===================================================================
--- /issm/trunk-jpl/test/Par/RoundSheetShelf.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/RoundSheetShelf.py	(revision 15988)
@@ -76,7 +76,6 @@
 
 #Friction
-pos=numpy.nonzero(md.mask.elementonfloatingice)
 md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices,1))
-md.friction.coefficient[md.mesh.elements[pos,:].astype(int)-1]=0
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/RoundSheetStaticEISMINT.par
===================================================================
--- /issm/trunk-jpl/test/Par/RoundSheetStaticEISMINT.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/RoundSheetStaticEISMINT.par	(revision 15988)
@@ -10,8 +10,6 @@
 
 disp('      creating drag');
-md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1); %q=1. no drag is specified in the analytical solution
-%Take care of iceshelves: no basal drag
-pos=find(md.mask.elementonfloatingice);
-md.friction.coefficient(md.mesh.elements(pos,:))=0.;
+md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1);
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/RoundSheetStaticEISMINT.py
===================================================================
--- /issm/trunk-jpl/test/Par/RoundSheetStaticEISMINT.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/RoundSheetStaticEISMINT.py	(revision 15988)
@@ -13,8 +13,6 @@
 
 print "      creating drag"
-md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices,1))    #q=1. no drag is specified in the analytical solution
-#Take care of iceshelves: no basal drag
-pos=numpy.nonzero(md.mask.elementonfloatingice)[0]
-md.friction.coefficient[md.mesh.elements[pos,:]-1]=0.
+md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices,1))
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/SquareEISMINT.par
===================================================================
--- /issm/trunk-jpl/test/Par/SquareEISMINT.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareEISMINT.par	(revision 15988)
@@ -9,8 +9,6 @@
 
 disp('      creating drag');
-md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1); %q=1.
-%Take care of iceshelves: no basal drag
-pos=find(md.mask.elementonfloatingice);
-md.friction.coefficient(md.mesh.elements(pos,:))=0.;
+md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1);
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/SquareEISMINT.py
===================================================================
--- /issm/trunk-jpl/test/Par/SquareEISMINT.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareEISMINT.py	(revision 15988)
@@ -12,8 +12,6 @@
 
 print "      creating drag"
-md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices,1))    #q=1.
-#Take care of iceshelves: no basal drag
-pos=numpy.nonzero(md.mask.elementonfloatingice)[0]
-md.friction.coefficient[md.mesh.elements[pos,:]-1]=0.
+md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/SquareSheetConstrained.par
===================================================================
--- /issm/trunk-jpl/test/Par/SquareSheetConstrained.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareSheetConstrained.par	(revision 15988)
@@ -30,7 +30,6 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/SquareSheetConstrained.py
===================================================================
--- /issm/trunk-jpl/test/Par/SquareSheetConstrained.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareSheetConstrained.py	(revision 15988)
@@ -40,7 +40,6 @@
 
 #Friction
-pos=numpy.nonzero(md.mask.elementonfloatingice)
 md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices,1))
-md.friction.coefficient[md.mesh.elements[pos,:].astype(int)-1]=0.
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/SquareSheetShelf.par
===================================================================
--- /issm/trunk-jpl/test/Par/SquareSheetShelf.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareSheetShelf.par	(revision 15988)
@@ -35,7 +35,6 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0.;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/SquareSheetShelf.py
===================================================================
--- /issm/trunk-jpl/test/Par/SquareSheetShelf.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareSheetShelf.py	(revision 15988)
@@ -46,7 +46,6 @@
 
 #Friction
-pos=numpy.nonzero(md.mask.elementonfloatingice)
 md.friction.coefficient=20.*ones((md.mesh.numberofvertices,1))
-md.friction.coefficient[md.mesh.elements[pos].astype(int)-1]=0.
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=ones((md.mesh.numberofelements,1))
 md.friction.q=ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/SquareShelf.par
===================================================================
--- /issm/trunk-jpl/test/Par/SquareShelf.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareShelf.par	(revision 15988)
@@ -28,7 +28,6 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=20*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/SquareShelf.py
===================================================================
--- /issm/trunk-jpl/test/Par/SquareShelf.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareShelf.py	(revision 15988)
@@ -59,7 +59,6 @@
 
 #Friction
-pos=nonzero(md.mask.elementonfloatingice)
 md.friction.coefficient = 20.*ones((md.mesh.numberofvertices,1))
-md.friction.coefficient[md.mesh.elements[pos,:].astype(int)-1] = 0.
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p = ones((md.mesh.numberofelements,1))
 md.friction.q = ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/SquareShelf2.par
===================================================================
--- /issm/trunk-jpl/test/Par/SquareShelf2.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareShelf2.par	(revision 15988)
@@ -28,7 +28,6 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=20*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/SquareShelf2.py
===================================================================
--- /issm/trunk-jpl/test/Par/SquareShelf2.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareShelf2.py	(revision 15988)
@@ -59,7 +59,6 @@
 
 #Friction
-pos=nonzero(md.mask.elementonfloatingice)
 md.friction.coefficient = 20.*ones((md.mesh.numberofvertices,1))
-md.friction.coefficient[md.mesh.elements[pos,:].astype(int)-1] = 0.
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p = ones((md.mesh.numberofelements,1))
 md.friction.q = ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/SquareShelfConstrained.par
===================================================================
--- /issm/trunk-jpl/test/Par/SquareShelfConstrained.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareShelfConstrained.par	(revision 15988)
@@ -32,7 +32,6 @@
 
 %Friction
-pos=find(md.mask.elementonfloatingice);
 md.friction.coefficient=20*ones(md.mesh.numberofvertices,1);
-md.friction.coefficient(md.mesh.elements(pos,:))=0;
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/test/Par/SquareShelfConstrained.py
===================================================================
--- /issm/trunk-jpl/test/Par/SquareShelfConstrained.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareShelfConstrained.py	(revision 15988)
@@ -44,7 +44,6 @@
 
 #Friction
-pos=numpy.nonzero(md.mask.elementonfloatingice)
 md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices,1))
-md.friction.coefficient[md.mesh.elements[pos,:].astype(int)-1]=0.
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
Index: /issm/trunk-jpl/test/Par/SquareThermal.par
===================================================================
--- /issm/trunk-jpl/test/Par/SquareThermal.par	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareThermal.par	(revision 15988)
@@ -15,8 +15,6 @@
 
 disp('      creating drag');
-md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1); %q=1.
-%Take care of iceshelves: no basal drag
-pos=find(md.mask.elementonfloatingice);
-md.friction.coefficient(md.mesh.elements(pos,:))=0.;
+md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1);
+md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
@@ -41,3 +39,3 @@
 md.thermal.spctemperature(:)=md.initialization.temperature;
 md.basalforcings.geothermalflux=zeros(md.mesh.numberofvertices,1); 
-pos=find(md.mask.elementongroundedice);md.basalforcings.geothermalflux(md.mesh.elements(pos,:))=1.*10^-3; %1 mW/m^2
+md.basalforcings.geothermalflux(find(md.mask.groundedice_levelset>0.)=1.*10^-3; %1 mW/m^2
Index: /issm/trunk-jpl/test/Par/SquareThermal.py
===================================================================
--- /issm/trunk-jpl/test/Par/SquareThermal.py	(revision 15987)
+++ /issm/trunk-jpl/test/Par/SquareThermal.py	(revision 15988)
@@ -19,8 +19,6 @@
 
 print "      creating drag"
-md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices,1))    #q=1.
-#Take care of iceshelves: no basal drag
-pos=numpy.nonzero(md.mask.elementonfloatingice)[0]
-md.friction.coefficient[md.mesh.elements[pos,:]-1]=0.
+md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
 md.friction.p=numpy.ones((md.mesh.numberofelements,1))
 md.friction.q=numpy.ones((md.mesh.numberofelements,1))
@@ -45,4 +43,3 @@
 md.thermal.spctemperature[:]=md.initialization.temperature
 md.basalforcings.geothermalflux=numpy.zeros((md.mesh.numberofvertices,1)) 
-pos=numpy.nonzero(md.mask.elementongroundedice)[0]
-md.basalforcings.geothermalflux[md.mesh.elements[pos,:]-1]=1.*10**-3    #1 mW/m^2
+md.basalforcings.geothermalflux[numpy.nonzero(md.mask.groundedice_levelset>0.)[0]]=1.*10**-3    #1 mW/m^2
