Index: /issm/trunk/src/m/classes/public/geography2.m
===================================================================
--- /issm/trunk/src/m/classes/public/geography2.m	(revision 3110)
+++ /issm/trunk/src/m/classes/public/geography2.m	(revision 3111)
@@ -33,13 +33,15 @@
 elementonland(wrongelements)=1;
 
-%any element with its barycentre on land should be on land:
+%any element with its barycentre on land should be on land: (only if landname is an expfile)
+if ischar(landname),
 weights={[1;1;1],[2;1;1],[1;2;1],[1;1;2]};
-for i=1:length(weights),
-	xelem=x(md.elements)*weights{i}/sum(weights{i});
-	yelem=y(md.elements)*weights{i}/sum(weights{i});
+	for i=1:length(weights),
+		xelem=x(md.elements)*weights{i}/sum(weights{i});
+		yelem=y(md.elements)*weights{i}/sum(weights{i});
+	end
+	baryonland=ContourToNodes(xelem,yelem,expread(landname,1),1);
+	pos=find(~baryonland); elementonland(pos)=0;
+	pos=find(baryonland); elementonland(pos)=1;
 end
-baryonland=ContourToNodes(xelem,yelem,expread(landname,1),1);
-pos=find(~baryonland); elementonland(pos)=0;
-pos=find(baryonland); elementonland(pos)=1;
 
 %figure out which elements on land are actually in the middle of the ocean!
