Index: /issm/trunk-jpl/test/NightlyRun/test2002.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test2002.m	(revision 21084)
+++ /issm/trunk-jpl/test/NightlyRun/test2002.m	(revision 21085)
@@ -31,6 +31,5 @@
 icemask=ones(md.mesh.numberofvertices,1);
 pos=find(mask==0);  icemask(pos)=-1;
-pos=find(sum(mask(md.mesh.elements),2)<3);   icemask(md.mesh.elements(pos))=-1;
-
+pos=find(sum(mask(md.mesh.elements),2)<3);   icemask(md.mesh.elements(pos,:))=-1;
 md.mask.ice_levelset=icemask;
 md.mask.ocean_levelset=zeros(md.mesh.numberofvertices,1);
@@ -43,5 +42,4 @@
 %make sure wherever there is an ice load, that the mask is set to ice: 
 pos=find(md.slr.deltathickness); md.mask.ice_levelset(md.mesh.elements(pos,:))=-1;
-
 % }}}
 
Index: /issm/trunk-jpl/test/NightlyRun/test2002.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test2002.py	(revision 21084)
+++ /issm/trunk-jpl/test/NightlyRun/test2002.py	(revision 21085)
@@ -1,4 +1,3 @@
 #Test Name: EarthSlr
-#Earth Sea Level Rise test. Uses the mesh3dsurface geometry.
 from MatlabFuncs import *
 from PythonFuncs import *
@@ -42,7 +41,7 @@
 
 icemask=ones((md.mesh.numberofvertices,1))
-pos=nonzero(mask==0);  icemask[pos]=-1
-pos=nonzero(sum(mask[md.mesh.elements.astype(int)-1],axis=1)<3)
-icemask[md.mesh.elements[pos].astype(int)-1]=-1
+pos=nonzero(mask==0)[0];  icemask[pos]=-1
+pos=nonzero(sum(mask[md.mesh.elements.astype(int)-1],axis=1)<3)[0]
+icemask[md.mesh.elements[pos,:].astype(int)-1]=-1
 md.mask.ice_levelset=icemask
 
@@ -54,4 +53,8 @@
 md.mask.land_levelset=zeros((md.mesh.numberofvertices,1))
 md.mask.groundedice_levelset=-ones((md.mesh.numberofvertices,1))
+
+#make sure wherever there is an ice load, that the mask is set to ice: 
+pos=nonzero(md.slr.deltathickness)[0];
+icemask[md.mesh.elements[pos,:]-1]=-1
 # }}}
 
