Index: /issm/trunk/src/m/model/geography.m
===================================================================
--- /issm/trunk/src/m/model/geography.m	(revision 7313)
+++ /issm/trunk/src/m/model/geography.m	(revision 7314)
@@ -32,4 +32,6 @@
 elements=md.elements;
 
+%Assign elementoniceshelf, elementonicesheet, gridonicesheet and gridoniceshelf. Only change at your own peril! This is synchronized heavily with the GroundingLineMigration module. {{{1
+
 elementoniceshelf=FlagElements(md,iceshelfname);
 elementonicesheet=FlagElements(md,icesheetname);
@@ -41,7 +43,17 @@
 elementoniceshelf=double((elementoniceshelf & ~elementonicesheet));
 elementonicesheet=double(~elementoniceshelf);
+
 %the order here is important. we choose gridoniceshelf as default on the grounding line.
 gridonicesheet(md.elements(find(elementonicesheet),:))=1;
 gridoniceshelf(md.elements(find(elementoniceshelf),:))=1;
+
+%gridoniceshelf exclusively not on ice sheet: 
+gridonicesheet(md.elements(find(elementoniceshelf),:))=0;
+
+%finally, an ice sheet that has one node on an ice shelf, becomes an iceshelf: 
+elementoniceshelf=double(sum(gridoniceshelf(elements),2)>0);
+pos=find(elementoniceshelf); elementonicesheet(pos)=0;
+
+%}}}
 
 %Return: 
