Index: /issm/trunk/src/m/classes/@modellist/get.m
===================================================================
--- /issm/trunk/src/m/classes/@modellist/get.m	(revision 8297)
+++ /issm/trunk/src/m/classes/@modellist/get.m	(revision 8298)
@@ -8,6 +8,6 @@
 case 'numberofelements'
 	val = a.numberofelements;
-case 'numberofgrids'
-	val = a.numberofgrids;
+case 'numberofnodes'
+	val = a.numberofnodes;
 case 'elements' 
 	val = a.elements;
Index: /issm/trunk/src/m/classes/model.m
===================================================================
--- /issm/trunk/src/m/classes/model.m	(revision 8297)
+++ /issm/trunk/src/m/classes/model.m	(revision 8298)
@@ -27,5 +27,5 @@
 		 dim=0;
 		 numberofelements=0;
-		 numberofgrids=0;
+		 numberofnodes=0;
 		 elements=NaN;
 		 elements_type=NaN;
@@ -47,5 +47,5 @@
 		 %Initial 2d mesh 
 		 numberofelements2d=0;
-		 numberofgrids2d=0;
+		 numberofnodes2d=0;
 		 elements2d=NaN;
 		 elements_type2d=NaN;
@@ -72,8 +72,8 @@
 
 		 %Nodes
-		 gridonhutter=NaN;
-		 gridonmacayeal=NaN;
-		 gridonpattyn=NaN;
-		 gridonstokes=NaN;
+		 nodeonhutter=NaN;
+		 nodeonmacayeal=NaN;
+		 nodeonpattyn=NaN;
+		 nodeonstokes=NaN;
 		 borderstokes=NaN;
 
@@ -95,8 +95,8 @@
 
 		 %Projections
-		 uppergrids=NaN;
+		 uppernodes=NaN;
 		 upperelements=NaN;
 		 lowerelements=NaN;
-		 lowergrids=NaN;
+		 lowernodes=NaN;
 
 		 %Extrusion
@@ -105,11 +105,11 @@
 		 elementonbed=NaN;
 		 elementonsurface=NaN;
-		 gridonbed=NaN;
-		 gridonsurface=NaN;
+		 nodeonbed=NaN;
+		 nodeonsurface=NaN;
 		 minh=0;
 		 firn_layer=NaN;
 
 		 %Extraction
-		 extractedgrids=NaN;
+		 extractednodes=NaN;
 		 extractedelements=NaN;
 
@@ -146,8 +146,8 @@
 		 elementonwater=NaN;
 		 elementonnuna=NaN;
-		 gridoniceshelf=NaN;
-		 gridonicesheet=NaN;
-		 gridonwater=NaN;
-		 gridonnuna=NaN;
+		 nodeoniceshelf=NaN;
+		 nodeonicesheet=NaN;
+		 nodeonwater=NaN;
+		 nodeonnuna=NaN;
 		 surface=NaN;
 		 thickness=NaN;
@@ -158,5 +158,5 @@
 
 		 %Boundary conditions
-		 gridonboundary=NaN;
+		 nodeonboundary=NaN;
 		 pressureload=NaN;
 		 spcvelocity=NaN;
Index: /issm/trunk/src/m/kml/README.txt
===================================================================
--- /issm/trunk/src/m/kml/README.txt	(revision 8297)
+++ /issm/trunk/src/m/kml/README.txt	(revision 8298)
@@ -61,5 +61,5 @@
 There are some other utilities that are used in the construction of topological tables for the kml writing.
 
-nodeconnectivity.m   - create a node connectivity table (ngrids x mxepg+1)
+nodeconnectivity.m   - create a node connectivity table (nnodes x mxepg+1)
 edgeadjacency.m      - create an edge adjacency array (elems x edges)
 edgeperimeter.m      - create an edge perimeter (edgeper x 2) and element perimeter (edgeper x 1) list
Index: /issm/trunk/src/m/kml/kml_mesh_elem.m
===================================================================
--- /issm/trunk/src/m/kml/kml_mesh_elem.m	(revision 8297)
+++ /issm/trunk/src/m/kml/kml_mesh_elem.m	(revision 8298)
@@ -76,5 +76,5 @@
     if     (numel(data)==md.numberofelements)
         edata=data;
-    elseif (numel(data)==md.numberofgrids)
+    elseif (numel(data)==md.numberofnodes)
         ndata=data;
         display('Averaging nodal data to element data.');
@@ -123,6 +123,6 @@
 end
 kfold.visibility=1;
-kfold.descript  =sprintf('Elements=%d, Grids=%d',...
-    md.numberofelements,md.numberofgrids);
+kfold.descript  =sprintf('Elements=%d, Nodes=%d',...
+    md.numberofelements,md.numberofnodes);
 % see matlab_oop, "initializing a handle object array"
 %kfold.feature   ={repmat(kml_placemark(),1,size(md.elements,1))};
Index: /issm/trunk/src/m/kml/kml_mesh_write.m
===================================================================
--- /issm/trunk/src/m/kml/kml_mesh_write.m	(revision 8297)
+++ /issm/trunk/src/m/kml/kml_mesh_write.m	(revision 8298)
@@ -82,5 +82,5 @@
     if     (numel(data)==md.numberofelements)
         edata=data;
-    elseif (numel(data)==md.numberofgrids)
+    elseif (numel(data)==md.numberofnodes)
         ndata=data;
         display('Averaging nodal data to element data.');
Index: /issm/trunk/src/m/kml/kml_part_edges.m
===================================================================
--- /issm/trunk/src/m/kml/kml_part_edges.m	(revision 8297)
+++ /issm/trunk/src/m/kml/kml_part_edges.m	(revision 8298)
@@ -77,5 +77,5 @@
     if     (numel(data)==md.numberofelements)
         edata=data;
-    elseif (numel(data)==md.numberofgrids)
+    elseif (numel(data)==md.numberofnodes)
         ndata=data;
         display('Averaging nodal data to element data.');
@@ -123,5 +123,5 @@
     kfold.visibility=1;
     kfold.descript  =sprintf('Partitions=%d, Nodes=%d',...
-        md.npart,md.numberofgrids);
+        md.npart,md.numberofnodes);
     kfold.feature   ={repmat(kml_placemark(),1,md.npart)};
 
@@ -150,5 +150,5 @@
         elemp=md.elements(irow,:);
         epartp=epart(irow,:);
-        nodeconp=nodeconnectivity(elemp,md.numberofgrids);
+        nodeconp=nodeconnectivity(elemp,md.numberofnodes);
         [edgeadjp]=edgeadjacency(elemp,nodeconp);
         [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp);
Index: /issm/trunk/src/m/kml/kml_part_elems.m
===================================================================
--- /issm/trunk/src/m/kml/kml_part_elems.m	(revision 8297)
+++ /issm/trunk/src/m/kml/kml_part_elems.m	(revision 8298)
@@ -77,5 +77,5 @@
     if     (numel(data)==md.numberofelements)
         edata=data;
-    elseif (numel(data)==md.numberofgrids)
+    elseif (numel(data)==md.numberofnodes)
         ndata=data;
         display('Averaging nodal data to element data.');
@@ -123,5 +123,5 @@
     kfold.visibility=1;
     kfold.descript  =sprintf('Partitions=%d, Nodes=%d\n',...
-        md.npart,md.numberofgrids);
+        md.npart,md.numberofnodes);
     kfold.feature   ={repmat(kml_placemark(),1,md.npart)};
 
Index: /issm/trunk/src/m/kml/kml_partitions.m
===================================================================
--- /issm/trunk/src/m/kml/kml_partitions.m	(revision 8297)
+++ /issm/trunk/src/m/kml/kml_partitions.m	(revision 8298)
@@ -78,5 +78,5 @@
     if     (numel(data)==md.numberofelements)
         edata=data;
-    elseif (numel(data)==md.numberofgrids)
+    elseif (numel(data)==md.numberofnodes)
         ndata=data;
         display('Averaging nodal data to element data.');
@@ -124,5 +124,5 @@
     kfold.visibility=1;
     kfold.descript  =sprintf('Partitions=%d, Nodes=%d',...
-        md.npart,md.numberofgrids);
+        md.npart,md.numberofnodes);
     kfold.feature   ={repmat(kml_placemark(),1,md.npart)};
 
@@ -151,5 +151,5 @@
         elemp=md.elements(irow,:);
         epartp=epart(irow,:);
-        nodeconp=nodeconnectivity(elemp,md.numberofgrids);
+        nodeconp=nodeconnectivity(elemp,md.numberofnodes);
         [edgeadjp]=edgeadjacency(elemp,nodeconp);
         [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp);
Index: /issm/trunk/src/m/kml/nodeconnectivity.m
===================================================================
--- /issm/trunk/src/m/kml/nodeconnectivity.m	(revision 8297)
+++ /issm/trunk/src/m/kml/nodeconnectivity.m	(revision 8298)
@@ -2,5 +2,5 @@
 %  create a node connectivity table for the elements in the model.
 %
-%  [nodecon]=edgeadjacency(elem,ngrids,mxepg)
+%  [nodecon]=edgeadjacency(elem,nnodes,mxepg)
 %
 %  where the required input is:
@@ -8,11 +8,11 @@
 %
 %  and the required output is:
-%    nodecon       (numeric, node connectivity array (ngrids x mxepg+1))
+%    nodecon       (numeric, node connectivity array (nnodes x mxepg+1))
 %
 %  the optional input is:
-%    ngrids        (numeric, number of grids)
-%    mxepg         (numeric, max elements per grid)
+%    nnodes        (numeric, number of nodes)
+%    mxepg         (numeric, max elements per node)
 %
-function [nodecon]=nodeconnectivity(elem,ngrids,mxepg)
+function [nodecon]=nodeconnectivity(elem,nnodes,mxepg)
 
 if ~nargin
@@ -21,6 +21,6 @@
 end
 
-if ~exist('ngrids','var') || isempty(ngrids)
-    ngrids=max(max(elem));
+if ~exist('nnodes','var') || isempty(nnodes)
+    nnodes=max(max(elem));
 end
 if ~exist('mxepg','var') || isempty(mxepg)
@@ -30,5 +30,5 @@
 %%  create the node connectivity array
 
-nodecon=zeros(ngrids,mxepg+1);
+nodecon=zeros(nnodes,mxepg+1);
 
 %  loop over the elements
Index: /issm/trunk/src/m/model/BasinConstrain.m
===================================================================
--- /issm/trunk/src/m/model/BasinConstrain.m	(revision 8297)
+++ /issm/trunk/src/m/model/BasinConstrain.m	(revision 8298)
@@ -14,13 +14,13 @@
 %      md=BasinConstrain(md,'~Iceshelves.exp');
 
-%now, flag grids and elements outside the domain outline.
+%now, flag nodes and elements outside the domain outline.
 if ischar(domain),
 	if isempty(domain),
 		elementondomain=zeros(md.numberofelements,1);
-		gridondomain=zeros(md.numberofgrids,1);
+		nodeondomain=zeros(md.numberofnodes,1);
 		invert=0;
 	elseif strcmpi(domain,'all')
 		elementondomain=ones(md.numberofelements,1);
-		gridondomain=ones(md.numberofgrids,1);
+		nodeondomain=ones(md.numberofnodes,1);
 		invert=0;
 	else
@@ -33,8 +33,8 @@
 		end
 		%ok, flag elements and nodes
-		[gridondomain elementondomain]=ContourToMesh(md.elements(:,1:3),md.x,md.y,domain,'element and node',2);
+		[nodeondomain elementondomain]=ContourToMesh(md.elements(:,1:3),md.x,md.y,domain,'element and node',2);
 	end
 	if invert,
-		gridondomain=~gridondomain;
+		nodeondomain=~nodeondomain;
 		elementondomain=~elementondomain;
 	end
@@ -44,20 +44,20 @@
 
 %list of elements and nodes not on domain
-gridnotondomain=find(~gridondomain);
+nodenotondomain=find(~nodeondomain);
 elementnotondomain=find(~elementondomain);
 
-%all elements outside the constraint domain are equivalent to water. all grids outside are spc'd.
-md.spcvelocity(gridnotondomain,1:2)=1;
-md.spcvelocity(gridnotondomain,4)=md.vx_obs(gridnotondomain);
-md.spcvelocity(gridnotondomain,5)=md.vy_obs(gridnotondomain);
+%all elements outside the constraint domain are equivalent to water. all nodes outside are spc'd.
+md.spcvelocity(nodenotondomain,1:2)=1;
+md.spcvelocity(nodenotondomain,4)=md.vx_obs(nodenotondomain);
+md.spcvelocity(nodenotondomain,5)=md.vy_obs(nodenotondomain);
 md.elementonwater(elementnotondomain)=1;
 
-%now, make sure all elements on water have grids that are spc'd, otherwise, we'll get a singular problem.
+%now, make sure all elements on water have nodes that are spc'd, otherwise, we'll get a singular problem.
 pos=find(~md.elementonwater);
 numpos=unique(md.elements(pos,:));
-grids=setdiff(1:1:md.numberofgrids,numpos);
-md.spcvelocity(grids,1:2)=1;
-md.spcvelocity(grids,4)=md.vx_obs(grids);
-md.spcvelocity(grids,5)=md.vy_obs(grids);
+nodes=setdiff(1:1:md.numberofnodes,numpos);
+md.spcvelocity(nodes,1:2)=1;
+md.spcvelocity(nodes,4)=md.vx_obs(nodes);
+md.spcvelocity(nodes,5)=md.vy_obs(nodes);
 
 %make sure icefronts that are completely spc'd are taken out:
Index: /issm/trunk/src/m/model/BasinConstrain2.m
===================================================================
--- /issm/trunk/src/m/model/BasinConstrain2.m	(revision 8297)
+++ /issm/trunk/src/m/model/BasinConstrain2.m	(revision 8298)
@@ -14,13 +14,13 @@
 %      md=BasinConstrain(md,'~Iceshelves.exp');
 
-%now, flag grids and elements outside the domain outline.
+%now, flag nodes and elements outside the domain outline.
 if ischar(domain),
 	if isempty(domain),
 		elementondomain=zeros(md.numberofelements,1);
-		gridondomain=zeros(md.numberofgrids,1);
+		nodeondomain=zeros(md.numberofnodes,1);
 		invert=0;
 	elseif strcmpi(domain,'all')
 		elementondomain=ones(md.numberofelements,1);
-		gridondomain=ones(md.numberofgrids,1);
+		nodeondomain=ones(md.numberofnodes,1);
 		invert=0;
 	else
@@ -33,8 +33,8 @@
 		end
 		%ok, flag elements and nodes
-		[gridondomain elementondomain]=ContourToMesh(md.elements(:,1:3),md.x,md.y,domain,'element and node',2);
+		[nodeondomain elementondomain]=ContourToMesh(md.elements(:,1:3),md.x,md.y,domain,'element and node',2);
 	end
 	if invert,
-		gridondomain=~gridondomain;
+		nodeondomain=~nodeondomain;
 		elementondomain=~elementondomain;
 	end
@@ -44,20 +44,20 @@
 
 %list of elements and nodes not on domain
-gridnotondomain=find(~gridondomain);
+nodenotondomain=find(~nodeondomain);
 elementnotondomain=find(~elementondomain);
 
-%all elements outside the constraint domain are equivalent to water. all grids outside are spc'd.
-md.spcvelocity(gridnotondomain,1:2)=1;
-md.spcvelocity(gridnotondomain,4)=md.vx_obs(gridnotondomain);
-md.spcvelocity(gridnotondomain,5)=md.vy_obs(gridnotondomain);
+%all elements outside the constraint domain are equivalent to water. all nodes outside are spc'd.
+md.spcvelocity(nodenotondomain,1:2)=1;
+md.spcvelocity(nodenotondomain,4)=md.vx_obs(nodenotondomain);
+md.spcvelocity(nodenotondomain,5)=md.vy_obs(nodenotondomain);
 md.elementonwater(elementnotondomain)=1;
 
-%now, make sure all elements on water have grids that are spc'd, otherwise, we'll get a singular problem.
+%now, make sure all elements on water have nodes that are spc'd, otherwise, we'll get a singular problem.
 pos=find(~md.elementonwater);
 numpos=unique(md.elements(pos,:));
-grids=setdiff(1:1:md.numberofgrids,numpos);
-md.spcvelocity(grids,1:2)=1;
-md.spcvelocity(grids,4)=md.vx_obs(grids);
-md.spcvelocity(grids,5)=md.vy_obs(grids);
+nodes=setdiff(1:1:md.numberofnodes,numpos);
+md.spcvelocity(nodes,1:2)=1;
+md.spcvelocity(nodes,4)=md.vx_obs(nodes);
+md.spcvelocity(nodes,5)=md.vy_obs(nodes);
 
 
Index: /issm/trunk/src/m/model/BasinConstrainShelf.m
===================================================================
--- /issm/trunk/src/m/model/BasinConstrainShelf.m	(revision 8297)
+++ /issm/trunk/src/m/model/BasinConstrainShelf.m	(revision 8298)
@@ -14,13 +14,13 @@
 %      md=BasinConstrain(md,'~Iceshelves.exp');
 
-%now, flag grids and elements outside the domain outline.
+%now, flag nodes and elements outside the domain outline.
 if ischar(domain),
 	if isempty(domain),
 		elementondomain=zeros(md.numberofelements,1);
-		gridondomain=zeros(md.numberofgrids,1);
+		nodeondomain=zeros(md.numberofnodes,1);
 		invert=0;
 	elseif strcmpi(domain,'all')
 		elementondomain=ones(md.numberofelements,1);
-		gridondomain=ones(md.numberofgrids,1);
+		nodeondomain=ones(md.numberofnodes,1);
 		invert=0;
 	else
@@ -33,8 +33,8 @@
 		end
 		%ok, flag elements and nodes
-		[gridondomain elementondomain]=ContourToMesh(md.elements(:,1:3),md.x,md.y,domain,'element and node',2);
+		[nodeondomain elementondomain]=ContourToMesh(md.elements(:,1:3),md.x,md.y,domain,'element and node',2);
 	end
 	if invert,
-		gridondomain=~gridondomain;
+		nodeondomain=~nodeondomain;
 		elementondomain=~elementondomain;
 	end
@@ -44,23 +44,23 @@
 
 %list of elements and nodes not on domain
-gridnotondomain=find(~gridondomain);
+nodenotondomain=find(~nodeondomain);
 elementnotondomain=find(~elementondomain);
 
-%all elements outside the constraint domain are equivalent to water. all grids outside are spc'd.
-md.spcvelocity(gridnotondomain,1:2)=1;
-md.spcvelocity(gridnotondomain,4)=md.vx_obs(gridnotondomain);
-md.spcvelocity(gridnotondomain,5)=md.vy_obs(gridnotondomain);
+%all elements outside the constraint domain are equivalent to water. all nodes outside are spc'd.
+md.spcvelocity(nodenotondomain,1:2)=1;
+md.spcvelocity(nodenotondomain,4)=md.vx_obs(nodenotondomain);
+md.spcvelocity(nodenotondomain,5)=md.vy_obs(nodenotondomain);
 md.elementonwater(elementnotondomain)=1;
 
-%now, make sure all elements on water have grids that are spc'd, otherwise, we'll get a singular problem.
+%now, make sure all elements on water have nodes that are spc'd, otherwise, we'll get a singular problem.
 pos=find(~md.elementonwater);
 numpos=unique(md.elements(pos,:));
-grids=setdiff(1:1:md.numberofgrids,numpos);
-md.spcvelocity(grids,1:2)=1;
-md.spcvelocity(grids,4)=md.vx_obs(grids);
-md.spcvelocity(grids,5)=md.vy_obs(grids);
+nodes=setdiff(1:1:md.numberofnodes,numpos);
+md.spcvelocity(nodes,1:2)=1;
+md.spcvelocity(nodes,4)=md.vx_obs(nodes);
+md.spcvelocity(nodes,5)=md.vy_obs(nodes);
 
 
-%make sure any grid with NaN velocity is spc'd:
+%make sure any node with NaN velocity is spc'd:
 pos=find(isnan(md.vel_obs_raw));
 md.spcvelocity(pos,1:2)=1;
@@ -69,6 +69,6 @@
 md.spcvelocity(pos,5)=md.vy_obs(pos); 
 
-%iceshelves: any grid on icesheet is spc'd
-pos=find(md.gridonicesheet);
+%iceshelves: any node on icesheet is spc'd
+pos=find(md.nodeonicesheet);
 md.spcvelocity(pos,1:2)=1;
 md.spcvelocity(pos,4)=md.vx_obs(pos); 
Index: /issm/trunk/src/m/model/DepthAverage.m
===================================================================
--- /issm/trunk/src/m/model/DepthAverage.m	(revision 8297)
+++ /issm/trunk/src/m/model/DepthAverage.m	(revision 8298)
@@ -14,6 +14,6 @@
 
 %nods data
-if (length(vector)==md.numberofgrids),
-	vector_average=zeros(md.numberofgrids2d,1);
+if (length(vector)==md.numberofnodes),
+	vector_average=zeros(md.numberofnodes2d,1);
 	for i=1:md.numlayers-1,
 		vector_average=vector_average+(project2d(md,vector,i)+project2d(md,vector,i+1))/2.*(project2d(md,md.z,i+1)-project2d(md,md.z,i));
Index: /issm/trunk/src/m/model/MeltingGroundingLines.m
===================================================================
--- /issm/trunk/src/m/model/MeltingGroundingLines.m	(revision 8297)
+++ /issm/trunk/src/m/model/MeltingGroundingLines.m	(revision 8298)
@@ -7,5 +7,5 @@
 
 %get nodes on ice sheet and on ice shelf
-pos_shelf=find(~md.gridonicesheet);
+pos_shelf=find(~md.nodeonicesheet);
 pos_GL=intersect(unique(md.elements(find(md.elementonicesheet),:)),unique(md.elements(find(md.elementoniceshelf),:)));
 
@@ -16,5 +16,5 @@
 	end
 
-	%search the grid on ice sheet the closest to i
+	%search the node on ice sheet the closest to i
 	[d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2));
 
Index: /issm/trunk/src/m/model/SectionValues.m
===================================================================
--- /issm/trunk/src/m/model/SectionValues.m	(revision 8297)
+++ /issm/trunk/src/m/model/SectionValues.m	(revision 8298)
@@ -72,9 +72,9 @@
 Y(end+1)=y(nods);
 
-%Number of grids:
-numberofgrids=size(X,1);
+%Number of nodes:
+numberofnodes=size(X,1);
 
 %Compute Z
-Z=zeros(numberofgrids,1);
+Z=zeros(numberofnodes,1);
 
 %New mesh and Data interpolation
@@ -86,5 +86,5 @@
 
 	%Compute index
-	index=[1:1:(numberofgrids-1);2:1:numberofgrids]';
+	index=[1:1:(numberofnodes-1);2:1:numberofnodes]';
 
 else
@@ -99,11 +99,11 @@
 	%Some useful parameters
 	layers=ceil(mean(md.thickness)/res_v);
-	gridsperlayer=numberofgrids;
-	gridstot=gridsperlayer*layers;
-	elementsperlayer=gridsperlayer-1;
-	elementstot=(gridsperlayer-1)*(layers-1);
+	nodesperlayer=numberofnodes;
+	nodestot=nodesperlayer*layers;
+	elementsperlayer=nodesperlayer-1;
+	elementstot=(nodesperlayer-1)*(layers-1);
 
 	%initialization
-	X3=zeros(gridsperlayer*layers,1); Y3=zeros(gridsperlayer*layers,1); Z3=zeros(gridsperlayer*layers,1); S3=zeros(gridsperlayer*layers,1); index3=zeros(elementstot,4);
+	X3=zeros(nodesperlayer*layers,1); Y3=zeros(nodesperlayer*layers,1); Z3=zeros(nodesperlayer*layers,1); S3=zeros(nodesperlayer*layers,1); index3=zeros(elementstot,4);
 
 	%Get new coordinates in 3d
@@ -115,5 +115,5 @@
 
 		if i<layers %Build index3 with quads
-			index3((i-1)*elementsperlayer+1:i*elementsperlayer,:)=[i:layers:gridstot-layers; i+1:layers:gridstot-layers; i+layers+1:layers:gridstot; i+layers:layers:gridstot]';
+			index3((i-1)*elementsperlayer+1:i*elementsperlayer,:)=[i:layers:nodestot-layers; i+1:layers:nodestot-layers; i+layers+1:layers:nodestot; i+layers:layers:nodestot]';
 		end
 	end
Index: /issm/trunk/src/m/model/ThicknessCorrection.m
===================================================================
--- /issm/trunk/src/m/model/ThicknessCorrection.m	(revision 8297)
+++ /issm/trunk/src/m/model/ThicknessCorrection.m	(revision 8298)
@@ -23,5 +23,5 @@
 
 %get nodes on ice sheet and on ice shelf
-pos_shelf=find(~md.gridonicesheet);
+pos_shelf=find(~md.nodeonicesheet);
 pos_GL=intersect(unique(md.elements(find(md.elementonicesheet),:)),unique(md.elements(find(md.elementoniceshelf),:)));
 debug=(length(pos_shelf)>50000);
@@ -47,5 +47,5 @@
 	end
 
-	%search the grid on ice sheet the closest to i
+	%search the node on ice sheet the closest to i
 	[d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2));
 
Index: /issm/trunk/src/m/model/averageconnectivity.m
===================================================================
--- /issm/trunk/src/m/model/averageconnectivity.m	(revision 8297)
+++ /issm/trunk/src/m/model/averageconnectivity.m	(revision 8298)
@@ -6,6 +6,6 @@
 
 nnz=0;
-for i=1:md.numberofgrids,
+for i=1:md.numberofnodes,
 	nnz=nnz+length(find(md.elements==i));
 end
-conn=nnz/md.numberofgrids;
+conn=nnz/md.numberofnodes;
Index: /issm/trunk/src/m/model/averaging.m
===================================================================
--- /issm/trunk/src/m/model/averaging.m	(revision 8297)
+++ /issm/trunk/src/m/model/averaging.m	(revision 8298)
@@ -2,9 +2,9 @@
 %AVERAGING - smooths the input over the mesh
 %
-%   This routine takes a list over the elements or the grids in input
-%   and return a list over the grids.
+%   This routine takes a list over the elements or the nodes in input
+%   and return a list over the nodes.
 %   For each iterations it computes the average over each element (average 
-%   of the vertices values) and then computes the average over each grid
-%   by taking the average of the element around a grid weighted by the
+%   of the vertices values) and then computes the average over each node
+%   by taking the average of the element around a node weighted by the
 %   elements volume
 %
@@ -16,15 +16,15 @@
 %      pressure=averaging(md,md.pressure,0);
 
-if length(data)~=md.numberofelements & length(data)~=md.numberofgrids
+if length(data)~=md.numberofelements & length(data)~=md.numberofnodes
 	error('averaging error message: data not supported yet');
 end
 
 %initialization
-weights=zeros(md.numberofgrids,1);
+weights=zeros(md.numberofnodes,1);
 data=data(:);
 
 %load some variables (it is much faster if the variab;es are loaded from md once for all)
 index=md.elements;
-numberofgrids=md.numberofgrids;
+numberofnodes=md.numberofnodes;
 numberofelements=md.numberofelements;
 
@@ -41,22 +41,22 @@
 linesize=rep*numberofelements;
 
-%update weights that holds the volume of all the element holding the grid i
-weights=sparse(line,ones(linesize,1),repmat(areas,rep,1),numberofgrids,1);
+%update weights that holds the volume of all the element holding the node i
+weights=sparse(line,ones(linesize,1),repmat(areas,rep,1),numberofnodes,1);
 
 %initialization
 if length(data)==numberofelements
-	average_grid=sparse(line,ones(linesize,1),repmat(areas.*data,rep,1),numberofgrids,1);
-	average_grid=average_grid./weights;
+	average_node=sparse(line,ones(linesize,1),repmat(areas.*data,rep,1),numberofnodes,1);
+	average_node=average_node./weights;
 else
-	average_grid=data;
+	average_node=data;
 end
 
 %loop over iteration
 for i=1:iterations
-	average_el=average_grid(index)*summation;
-	average_grid=sparse(line,ones(linesize,1),repmat(areas.*average_el,rep,1),numberofgrids,1);
-	average_grid=average_grid./weights;
+	average_el=average_node(index)*summation;
+	average_node=sparse(line,ones(linesize,1),repmat(areas.*average_el,rep,1),numberofnodes,1);
+	average_node=average_node./weights;
 end
 
 %return output as a full matrix (C code do not like sparse matrices)
-average=full(average_grid);
+average=full(average_node);
Index: /issm/trunk/src/m/model/bamg.m
===================================================================
--- /issm/trunk/src/m/model/bamg.m	(revision 8297)
+++ /issm/trunk/src/m/model/bamg.m	(revision 8298)
@@ -25,5 +25,5 @@
 %   - maxnbv      : maximum number of vertices used to allocate memory (default is 10^6)
 %   - maxsubdiv   : maximum subdivision of exisiting elements (default is 10)
-%   - metric      : matrix (numberofgrids x 3) used as a metric
+%   - metric      : matrix (numberofnodes x 3) used as a metric
 %   - Metrictype  : 1 -> absolute error          c/(err coeff^2) * Abs(H)        (default)
 %                   2 -> relative error          c/(err coeff^2) * Abs(H)/max(s,cutoff*max(s))
@@ -265,10 +265,10 @@
 
 % Bamg Mesh parameters {{{1
-if (~exist(options,'domain') & md.numberofgrids~=0 & md.dim==2),
+if (~exist(options,'domain') & md.numberofnodes~=0 & md.dim==2),
 
 	if isstruct(md.bamg),
 		bamg_mesh=bamgmesh(md.bamg.mesh);
 	else
-		bamg_mesh.Vertices=[md.x md.y ones(md.numberofgrids,1)];
+		bamg_mesh.Vertices=[md.x md.y ones(md.numberofnodes,1)];
 		bamg_mesh.Triangles=[md.elements ones(md.numberofelements,1)];
 	end
@@ -327,12 +327,12 @@
 md.dim=2;
 md.numberofelements=size(md.elements,1);
-md.numberofgrids=length(md.x);
-md.z=zeros(md.numberofgrids,1);
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonwater=zeros(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.numberofnodes=length(md.x);
+md.z=zeros(md.numberofnodes,1);
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonwater=zeros(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
-md.gridonboundary=zeros(md.numberofgrids,1); md.gridonboundary(md.segments(:,1:2))=1;
+md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
 md.counter=1;
 md.elementconnectivity=md.bamg.mesh.ElementConnectivity;
@@ -340,5 +340,5 @@
 
 %Check for orphan
-if any(~ismember(1:md.numberofgrids,sort(unique(md.elements(:)))))
+if any(~ismember(1:md.numberofnodes,sort(unique(md.elements(:)))))
 	error('Output mesh has orphans. Decrease MaxCornerAngle to prevent outside points (ex: 0.01)');
 end
Index: /issm/trunk/src/m/model/bedslope.m
===================================================================
--- /issm/trunk/src/m/model/bedslope.m	(revision 8297)
+++ /issm/trunk/src/m/model/bedslope.m	(revision 8298)
@@ -8,10 +8,10 @@
 if (md.dim==2),
 	numberofelements=md.numberofelements;
-	numberofgrids=md.numberofgrids;
+	numberofnodes=md.numberofnodes;
 	index=md.elements;
 	x=md.x; y=md.y; z=md.z;
 else
 	numberofelements=md.numberofelements2d;
-	numberofgrids=md.numberofgrids2d;
+	numberofnodes=md.numberofnodes2d;
 	index=md.elements2d;
 	x=md.x2d; y=md.y2d; z=md.z2d;
Index: /issm/trunk/src/m/model/collapse.m
===================================================================
--- /issm/trunk/src/m/model/collapse.m	(revision 8297)
+++ /issm/trunk/src/m/model/collapse.m	(revision 8298)
@@ -18,5 +18,5 @@
 %Start with changing alle the fields from the 3d mesh 
 
-%drag is limited to grids that are on the bedrock.
+%drag is limited to nodes that are on the bedrock.
 md.drag_coefficient=project2d(md,md.drag_coefficient,1);
 
@@ -46,6 +46,6 @@
 md.elementonbed=ones(md.numberofelements2d,1);
 md.elementonsurface=ones(md.numberofelements2d,1);
-md.gridonbed=ones(md.numberofgrids2d,1);
-md.gridonsurface=ones(md.numberofgrids2d,1);
+md.nodeonbed=ones(md.numberofnodes2d,1);
+md.nodeonsurface=ones(md.numberofnodes2d,1);
 
 %elementstype
@@ -55,8 +55,8 @@
 	md.elements_type=project2d(md,md.elements_type,1);
 end	
-md.gridonhutter=project2d(md,md.gridonhutter,1);
-md.gridonmacayeal=project2d(md,md.gridonmacayeal,1);
-md.gridonpattyn=project2d(md,md.gridonpattyn,1);
-md.gridonstokes=project2d(md,md.gridonstokes,1);
+md.nodeonhutter=project2d(md,md.nodeonhutter,1);
+md.nodeonmacayeal=project2d(md,md.nodeonmacayeal,1);
+md.nodeonpattyn=project2d(md,md.nodeonpattyn,1);
+md.nodeonstokes=project2d(md,md.nodeonstokes,1);
 
 %boundary conditions
@@ -84,5 +84,5 @@
 
 %Collapse the mesh
-grids2d=md.numberofgrids2d;
+nodes2d=md.numberofnodes2d;
 elements2d=md.numberofelements2d;
 
@@ -91,9 +91,9 @@
 md.thickness=project2d(md,md.thickness,1);
 md.bed=project2d(md,md.bed,1);
-md.gridonboundary=project2d(md,md.gridonboundary,1);
+md.nodeonboundary=project2d(md,md.nodeonboundary,1);
 md.elementoniceshelf=project2d(md,md.elementoniceshelf,1);
-md.gridoniceshelf=project2d(md,md.gridoniceshelf,1);
+md.nodeoniceshelf=project2d(md,md.nodeoniceshelf,1);
 md.elementonicesheet=project2d(md,md.elementonicesheet,1);
-md.gridonicesheet=project2d(md,md.gridonicesheet,1);
+md.nodeonicesheet=project2d(md,md.nodeonicesheet,1);
 
 %Initialize with the 2d mesh
@@ -101,11 +101,11 @@
 md.y=md.y2d;
 md.z=md.z2d;
-md.numberofgrids=md.numberofgrids2d;
+md.numberofnodes=md.numberofnodes2d;
 md.numberofelements=md.numberofelements2d;
 md.elements=md.elements2d;
 
-%Keep a trace of lower and upper grids
-md.lowergrids=NaN;
-md.uppergrids=NaN;
+%Keep a trace of lower and upper nodes
+md.lowernodes=NaN;
+md.uppernodes=NaN;
 
 %Remove old mesh 
@@ -116,5 +116,5 @@
 md.elements_type2d=md.elements_type;
 md.numberofelements2d=md.numberofelements;
-md.numberofgrids2d=md.numberofgrids;
+md.numberofnodes2d=md.numberofnodes;
 md.numlayers=0;
 
Index: /issm/trunk/src/m/model/contourenvelope.m
===================================================================
--- /issm/trunk/src/m/model/contourenvelope.m	(revision 8297)
+++ /issm/trunk/src/m/model/contourenvelope.m	(revision 8298)
@@ -23,6 +23,6 @@
 %Now, build the connectivity tables for this mesh.
 %Computing connectivity
-if size(md.nodeconnectivity,1)~=md.numberofgrids,
-	md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+if size(md.nodeconnectivity,1)~=md.numberofnodes,
+	md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 end
 if size(md.elementconnectivity,1)~=md.numberofelements,
@@ -68,5 +68,5 @@
 		ord2=find(nods1(2)==md.elements(el1,:));
 
-		%swap segment grids if necessary
+		%swap segment nodes if necessary
 		if ( (ord1==1 & ord2==2) | (ord1==2 & ord2==3) | (ord1==3 & ord2==1) ),
 			temp=segments(count,1);
Index: /issm/trunk/src/m/model/contourmassbalance.m
===================================================================
--- /issm/trunk/src/m/model/contourmassbalance.m	(revision 8297)
+++ /issm/trunk/src/m/model/contourmassbalance.m	(revision 8298)
@@ -10,6 +10,6 @@
 	error('contourmassbalance error message: bad usage');
 end
-if ((length(md.vx)~=md.numberofgrids)|(length(md.vy)~=md.numberofgrids))
-	error(['thicknessevolution error message: vx and vy should have a length of ' num2str(md.numberofgrids)])
+if ((length(md.vx)~=md.numberofnodes)|(length(md.vy)~=md.numberofnodes))
+	error(['thicknessevolution error message: vx and vy should have a length of ' num2str(md.numberofnodes)])
 end
 if ~exist(file),
Index: /issm/trunk/src/m/model/display/displaybc.m
===================================================================
--- /issm/trunk/src/m/model/display/displaybc.m	(revision 8297)
+++ /issm/trunk/src/m/model/display/displaybc.m	(revision 8298)
@@ -12,9 +12,9 @@
 
 disp(sprintf('\n      geography:'));
-fielddisplay(md,'gridonboundary','grid on boundary flags list');
+fielddisplay(md,'nodeonboundary','node on boundary flags list');
 fielddisplay(md,'elementoniceshelf','element on ice shelf flags list');
-fielddisplay(md,'gridoniceshelf','grid on ice shelf flags list');
+fielddisplay(md,'nodeoniceshelf','node on ice shelf flags list');
 fielddisplay(md,'elementonicesheet','element on ice sheet flags list');
-fielddisplay(md,'gridonicesheet','grid on ice sheet flags list');
+fielddisplay(md,'nodeonicesheet','node on ice sheet flags list');
 
 disp(sprintf('\n      diagnostic:'));
Index: /issm/trunk/src/m/model/display/displaymesh.m
===================================================================
--- /issm/trunk/src/m/model/display/displaymesh.m	(revision 8297)
+++ /issm/trunk/src/m/model/display/displaymesh.m	(revision 8298)
@@ -15,6 +15,6 @@
 	disp(sprintf('\n      Elements and nodes of the original 2d mesh:'));
 	fielddisplay(md,'numberofelements2d','number of elements');
-	fielddisplay(md,'numberofgrids2d','number of nodes');
-	fielddisplay(md,'elements2d','index into (x,y,z), coordinates of the grids');
+	fielddisplay(md,'numberofnodes2d','number of nodes');
+	fielddisplay(md,'elements2d','index into (x,y,z), coordinates of the nodes');
 	fielddisplay(md,'elements_type2d','element types');
 	fielddisplay(md,'x2d','nodes x coordinate');
@@ -27,6 +27,6 @@
 end
 fielddisplay(md,'numberofelements','number of elements');
-fielddisplay(md,'numberofgrids','number of nodes');
-fielddisplay(md,'elements','index into (x,y,z), coordinates of the grids');
+fielddisplay(md,'numberofnodes','number of nodes');
+fielddisplay(md,'elements','index into (x,y,z), coordinates of the nodes');
 fielddisplay(md,'elements_type','element types');
 fielddisplay(md,'x','nodes x coordinate');
@@ -41,6 +41,6 @@
 fielddisplay(md,'bamg','Geometry and 2d mesh properties (if generated by Bamg)');
 fielddisplay(md,'penalties','penalties list');
-fielddisplay(md,'gridonbed','lower nodes flags list');
+fielddisplay(md,'nodeonbed','lower nodes flags list');
 fielddisplay(md,'elementonbed','lower elements flags list');
-fielddisplay(md,'gridonsurface','upper nodes flags list');
+fielddisplay(md,'nodeonsurface','upper nodes flags list');
 fielddisplay(md,'elementonsurface','upper elements flags list');
Index: /issm/trunk/src/m/model/display/displayparameters.m
===================================================================
--- /issm/trunk/src/m/model/display/displayparameters.m	(revision 8297)
+++ /issm/trunk/src/m/model/display/displayparameters.m	(revision 8298)
@@ -19,6 +19,6 @@
 fielddisplay(md,'elementonbed','element on bed flags list');
 fielddisplay(md,'elementonsurface','element on surface flags list');
-fielddisplay(md,'gridonbed','grid on bed flags list');
-fielddisplay(md,'gridonsurface','grid on surface flags list');
+fielddisplay(md,'nodeonbed','node on bed flags list');
+fielddisplay(md,'nodeonsurface','node on surface flags list');
 
 disp(sprintf('\n      physical parameters:'));
Index: /issm/trunk/src/m/model/divergence.m
===================================================================
--- /issm/trunk/src/m/model/divergence.m	(revision 8297)
+++ /issm/trunk/src/m/model/divergence.m	(revision 8298)
@@ -7,10 +7,10 @@
 if (md.dim==2),
 	numberofelements=md.numberofelements;
-	numberofgrids=md.numberofgrids;
+	numberofnodes=md.numberofnodes;
 	index=md.elements;
 	x=md.x; y=md.y; z=md.z;
 else
 	numberofelements=md.numberofelements2d;
-	numberofgrids=md.numberofgrids2d;
+	numberofnodes=md.numberofnodes2d;
 	index=md.elements2d;
 	x=md.x2d; y=md.y2d; z=md.z2d;
Index: /issm/trunk/src/m/model/extrude.m
===================================================================
--- /issm/trunk/src/m/model/extrude.m	(revision 8297)
+++ /issm/trunk/src/m/model/extrude.m	(revision 8298)
@@ -75,6 +75,6 @@
 x3d=[]; 
 y3d=[];
-z3d=[];  %the lower grid is on the bed
-thickness3d=md.thickness; %thickness and bed for these grids
+z3d=[];  %the lower node is on the bed
+thickness3d=md.thickness; %thickness and bed for these nodes
 bed3d=md.bed;
 
@@ -83,23 +83,23 @@
 	x3d=[x3d; md.x]; 
 	y3d=[y3d; md.y];
-	%grids are distributed between bed and surface accordingly to the given exponent
+	%nodes are distributed between bed and surface accordingly to the given exponent
 	z3d=[z3d; bed3d+thickness3d*extrusionlist(i)]; 
 end
-number_grids3d=size(x3d,1); %number of 3d grids for the non extruded part of the mesh
+number_nodes3d=size(x3d,1); %number of 3d nodes for the non extruded part of the mesh
 
 %Extrude elements 
 elements3d=[];
 for i=1:numlayers-1,
-	elements3d=[elements3d;[md.elements+(i-1)*md.numberofgrids md.elements+i*md.numberofgrids]]; %Create the elements of the 3d mesh for the non extruded part
-end
-number_el3d=size(elements3d,1); %number of 3d grids for the non extruded part of the mesh
-
-%Keep a trace of lower and upper grids
-lowergrids=NaN*ones(number_grids3d,1);
-uppergrids=NaN*ones(number_grids3d,1);
-lowergrids(md.numberofgrids+1:end)=1:(numlayers-1)*md.numberofgrids;
-uppergrids(1:(numlayers-1)*md.numberofgrids)=md.numberofgrids+1:number_grids3d;
-md.lowergrids=lowergrids;
-md.uppergrids=uppergrids;
+	elements3d=[elements3d;[md.elements+(i-1)*md.numberofnodes md.elements+i*md.numberofnodes]]; %Create the elements of the 3d mesh for the non extruded part
+end
+number_el3d=size(elements3d,1); %number of 3d nodes for the non extruded part of the mesh
+
+%Keep a trace of lower and upper nodes
+lowernodes=NaN*ones(number_nodes3d,1);
+uppernodes=NaN*ones(number_nodes3d,1);
+lowernodes(md.numberofnodes+1:end)=1:(numlayers-1)*md.numberofnodes;
+uppernodes(1:(numlayers-1)*md.numberofnodes)=md.numberofnodes+1:number_nodes3d;
+md.lowernodes=lowernodes;
+md.uppernodes=uppernodes;
 
 %same for lower and upper elements
@@ -119,5 +119,5 @@
 md.vertices_type2d=md.vertices_type;
 md.numberofelements2d=md.numberofelements;
-md.numberofgrids2d=md.numberofgrids;
+md.numberofnodes2d=md.numberofnodes;
 
 %Update mesh type
@@ -130,10 +130,10 @@
 md.z=z3d;
 md.numberofelements=number_el3d;
-md.numberofgrids=number_grids3d;
+md.numberofnodes=number_nodes3d;
 md.numlayers=numlayers;
 
 %Ok, now deal with the other fields from the 2d mesh:
 
-%drag_coefficient is limited to grids that are on the bedrock.
+%drag_coefficient is limited to nodes that are on the bedrock.
 md.drag_coefficient=project3d(md,md.drag_coefficient,'node',1);
 
@@ -168,6 +168,6 @@
 md.elementonbed=project3d(md,ones(md.numberofelements2d,1),'element',1);
 md.elementonsurface=project3d(md,ones(md.numberofelements2d,1),'element',md.numlayers-1);
-md.gridonbed=project3d(md,ones(md.numberofgrids2d,1),'node',1);
-md.gridonsurface=project3d(md,ones(md.numberofgrids2d,1),'node',md.numlayers);
+md.nodeonbed=project3d(md,ones(md.numberofnodes2d,1),'node',1);
+md.nodeonsurface=project3d(md,ones(md.numberofnodes2d,1),'node',md.numlayers);
 
 %elementstype
@@ -176,8 +176,8 @@
 	md.elements_type=zeros(number_el3d,1);
 	md.elements_type=project3d(md,oldelements_type,'element');
-	md.gridonhutter=project3d(md,md.gridonhutter,'node');
-	md.gridonmacayeal=project3d(md,md.gridonmacayeal,'node');
-	md.gridonpattyn=project3d(md,md.gridonpattyn,'node');
-	md.gridonstokes=project3d(md,md.gridonstokes,'node');
+	md.nodeonhutter=project3d(md,md.nodeonhutter,'node');
+	md.nodeonmacayeal=project3d(md,md.nodeonmacayeal,'node');
+	md.nodeonpattyn=project3d(md,md.nodeonpattyn,'node');
+	md.nodeonstokes=project3d(md,md.nodeonstokes,'node');
 end
 
@@ -185,5 +185,5 @@
 if ~isnan(md.vertices_type)
 	oldvertices_type=md.vertices_type2d;
-	md.vertices_type=zeros(number_grids3d,1);
+	md.vertices_type=zeros(number_nodes3d,1);
 	md.vertices_type=project3d(md,oldvertices_type,'node');
 end
@@ -195,9 +195,9 @@
 md.diagnostic_ref=project3d(md,md.diagnostic_ref,'node');
 
-%in 3d, pressureload: [grid1 grid2 grid3 grid4 element]
-pressureload_layer1=[md.pressureload(:,1:2)  md.pressureload(:,2)+md.numberofgrids2d  md.pressureload(:,1)+md.numberofgrids2d  md.pressureload(:,3:4)]; %Add two columns on the first layer 
+%in 3d, pressureload: [node1 node2 node3 node4 element]
+pressureload_layer1=[md.pressureload(:,1:2)  md.pressureload(:,2)+md.numberofnodes2d  md.pressureload(:,1)+md.numberofnodes2d  md.pressureload(:,3:4)]; %Add two columns on the first layer 
 pressureload=[];
 for i=1:numlayers-1,
-	pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.numberofgrids2d pressureload_layer1(:,5)+(i-1)*md.numberofelements2d pressureload_layer1(:,6)];
+	pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.numberofnodes2d pressureload_layer1(:,5)+(i-1)*md.numberofelements2d pressureload_layer1(:,6)];
 end
 md.pressureload=pressureload;
@@ -220,11 +220,11 @@
 md.thickness=project3d(md,md.thickness,'node');
 md.bed=project3d(md,md.bed,'node');
-md.gridonboundary=project3d(md,md.gridonboundary,'node');
+md.nodeonboundary=project3d(md,md.nodeonboundary,'node');
 md.elementoniceshelf=project3d(md,md.elementoniceshelf,'element');
-md.gridoniceshelf=project3d(md,md.gridoniceshelf,'node');
+md.nodeoniceshelf=project3d(md,md.nodeoniceshelf,'node');
 md.elementonicesheet=project3d(md,md.elementonicesheet,'element');
-md.gridonicesheet=project3d(md,md.gridonicesheet,'node');
+md.nodeonicesheet=project3d(md,md.nodeonicesheet,'node');
 md.elementonwater=project3d(md,md.elementonwater,'element');
-md.gridonwater=project3d(md,md.gridonwater,'node');
+md.nodeonwater=project3d(md,md.nodeonwater,'node');
 if ~isnan(md.weights),md.weights=project3d(md,md.weights,'node');end;
 
Index: /issm/trunk/src/m/model/geography.m
===================================================================
--- /issm/trunk/src/m/model/geography.m	(revision 8297)
+++ /issm/trunk/src/m/model/geography.m	(revision 8298)
@@ -2,6 +2,6 @@
 %GEOGRAPHY - establish boundaries between grounded and floating ice.
 %
-%   By default, ice is considered grounded. The contour iceshelfname defines grids 
-%   for which ice is floating. The contour icesheetname defines grids inside an iceshelf, 
+%   By default, ice is considered grounded. The contour iceshelfname defines nodes 
+%   for which ice is floating. The contour icesheetname defines nodes inside an iceshelf, 
 %   that are grounded (ie: ice rises, islands, etc ...)
 %   All input files are in the Argus format (extension .exp).
@@ -32,18 +32,18 @@
 elements=md.elements;
 
-%Assign elementoniceshelf, elementonicesheet, gridonicesheet and gridoniceshelf. Only change at your own peril! This is synchronized heavily with the GroundingLineMigration module. {{{1
+%Assign elementoniceshelf, elementonicesheet, nodeonicesheet and nodeoniceshelf. Only change at your own peril! This is synchronized heavily with the GroundingLineMigration module. {{{1
 elementoniceshelf=FlagElements(md,iceshelfname);
 elementonicesheet=FlagElements(md,icesheetname);
 
-%Because icesheet grids and elements can be included into an iceshelf, we need to update. Remember, all the previous 
+%Because icesheet nodes and elements can be included into an iceshelf, we need to update. Remember, all the previous 
 %arrays come from domain outlines that can intersect one another: 
 elementoniceshelf=double((elementoniceshelf & ~elementonicesheet));
 elementonicesheet=double(~elementoniceshelf);
 
-%the order here is important. we choose gridonicesheet as default on the grounding line.
-gridoniceshelf=zeros(md.numberofgrids,1);
-gridonicesheet=zeros(md.numberofgrids,1);
-gridonicesheet(md.elements(find(elementonicesheet),:))=1;
-gridoniceshelf(find(~gridonicesheet))=1;
+%the order here is important. we choose nodeonicesheet as default on the grounding line.
+nodeoniceshelf=zeros(md.numberofnodes,1);
+nodeonicesheet=zeros(md.numberofnodes,1);
+nodeonicesheet(md.elements(find(elementonicesheet),:))=1;
+nodeoniceshelf(find(~nodeonicesheet))=1;
 %}}}
 
@@ -52,10 +52,10 @@
 
 md.elementoniceshelf=elementoniceshelf;
-md.gridoniceshelf=gridoniceshelf;
+md.nodeoniceshelf=nodeoniceshelf;
 
 md.elementonicesheet=elementonicesheet;
-md.gridonicesheet=gridonicesheet;
+md.nodeonicesheet=nodeonicesheet;
 
-md.gridonwater=zeros(md.numberofgrids,1);
+md.nodeonwater=zeros(md.numberofnodes,1);
 md.elementonwater=zeros(md.numberofelements,1);
 
Index: /issm/trunk/src/m/model/geography2.m
===================================================================
--- /issm/trunk/src/m/model/geography2.m	(revision 8297)
+++ /issm/trunk/src/m/model/geography2.m	(revision 8298)
@@ -13,7 +13,7 @@
 elements=md.elements;
 
-%recover elements and grids on land.
+%recover elements and nodes on land.
 if ischar(landname),
-	[gridonland,elementonland]=ContourToMesh(elements,x,y,landname,'element and node',2);
+	[nodeonland,elementonland]=ContourToMesh(elements,x,y,landname,'element and node',2);
 elseif isfloat(landname),
 	if size(landname,1)~=md.numberofelements,
@@ -21,6 +21,6 @@
 	end
 	elementonland=landname;
-	gridonland=zeros(md.numberofgrids,1);
-	gridonland(md.elements(find(elementonland),:))=1;
+	nodeonland=zeros(md.numberofnodes,1);
+	nodeonland(md.elements(find(elementonland),:))=1;
 else
 	error('Invalid area option option');
@@ -28,6 +28,6 @@
 
 %Now, build the connectivity tables for this mesh.
-if size(md.nodeconnectivity,1)~=md.numberofgrids,
-	md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+if size(md.nodeconnectivity,1)~=md.numberofnodes,
+	md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 end
 if size(md.elementconnectivity,1)~=md.numberofelements,
@@ -35,7 +35,7 @@
 end
 
-%any element with 3 grids on land should be on land:
+%any element with 3 nodes on land should be on land:
 elementsonwater=find(~elementonland);
-wrongelements=elementsonwater(find(( gridonland(md.elements(elementsonwater,1)) + gridonland(md.elements(elementsonwater,2)) + gridonland(md.elements(elementsonwater,3)) ...
+wrongelements=elementsonwater(find(( nodeonland(md.elements(elementsonwater,1)) + nodeonland(md.elements(elementsonwater,2)) + nodeonland(md.elements(elementsonwater,3)) ...
                   )==3));
 elementonland(wrongelements)=1;
@@ -69,16 +69,16 @@
 elementonland(landelements)=1;
 
-%recover arrays of ice shelf grids and elements, and ice sheet grids and elements.
+%recover arrays of ice shelf nodes and elements, and ice sheet nodes and elements.
 elementoniceshelf=FlagElements(md,iceshelfname);
 elementonicesheet=FlagElements(md,icesheetname);
 
-%Because icesheet grids and elements can be included into an iceshelf, we need to update. Remember, all the previous 
+%Because icesheet nodes and elements can be included into an iceshelf, we need to update. Remember, all the previous 
 %arrays come from domain outlines that can intersect one another: 
-gridoniceshelf=zeros(md.numberofgrids,1);
-gridonicesheet=zeros(md.numberofgrids,1);
+nodeoniceshelf=zeros(md.numberofnodes,1);
+nodeonicesheet=zeros(md.numberofnodes,1);
 elementoniceshelf=double((elementoniceshelf & ~elementonicesheet));
 elementonicesheet=double(~elementoniceshelf);
-gridoniceshelf(md.elements(find(elementoniceshelf),:))=1;
-gridonicesheet(md.elements(find(elementonicesheet),:))=1;
+nodeoniceshelf(md.elements(find(elementoniceshelf),:))=1;
+nodeonicesheet(md.elements(find(elementonicesheet),:))=1;
 
 %now correct, so that none of the iceshelf and icesheet elements and nodes are in the water.
@@ -87,18 +87,18 @@
 elementonicesheet(pos)=0;
 
-pos=find(~gridonland);
-gridoniceshelf(pos)=0; 
-gridonicesheet(pos)=0;
+pos=find(~nodeonland);
+nodeoniceshelf(pos)=0; 
+nodeonicesheet(pos)=0;
 
-%create gridonwater and elementonwater: 
-gridonwater=double(~gridonland);
+%create nodeonwater and elementonwater: 
+nodeonwater=double(~nodeonland);
 elementonwater=double(~elementonland);
 
 %correct for islands:
-gridoniceshelf=double(gridoniceshelf & ~gridonicesheet);
+nodeoniceshelf=double(nodeoniceshelf & ~nodeonicesheet);
 elementoniceshelf=double(elementoniceshelf & ~elementonicesheet);
 
 %now, icesheets are everything except iceshelves and water
-gridonicesheet=double(~gridoniceshelf & ~gridonwater);
+nodeonicesheet=double(~nodeoniceshelf & ~nodeonwater);
 elementonicesheet=double(~elementoniceshelf & ~elementonwater);
 
@@ -123,27 +123,27 @@
 
 %some final checks: 
-%check that no grid thinks it's on an ice shelf or ice sheet, and lies actually in the middle of the water.
-gridsgrounded=find(~gridonwater);
+%check that no node thinks it's on an ice shelf or ice sheet, and lies actually in the middle of the water.
+nodesgrounded=find(~nodeonwater);
 lengthconnectivity=size(md.nodeconnectivity,2);
-groundedcounters=md.nodeconnectivity(gridsgrounded,lengthconnectivity);
-groundedconnectivity=md.nodeconnectivity(gridsgrounded,1:lengthconnectivity-1);
+groundedcounters=md.nodeconnectivity(nodesgrounded,lengthconnectivity);
+groundedconnectivity=md.nodeconnectivity(nodesgrounded,1:lengthconnectivity-1);
 pos=find(groundedconnectivity);
 groundedconnectivity(pos)=elementonwater(groundedconnectivity(pos));
 groundedsum=sum(groundedconnectivity,2);
 errorflags=find(groundedsum==groundedcounters);
-errorgrids=gridsgrounded(errorflags);
+errornodes=nodesgrounded(errorflags);
 
-gridonwater(errorgrids)=1;
-gridonicesheet(errorgrids)=0;
-gridoniceshelf(errorgrids)=0;
+nodeonwater(errornodes)=1;
+nodeonicesheet(errornodes)=0;
+nodeoniceshelf(errornodes)=0;
 
 %Return: 
-md.gridoniceshelf=gridoniceshelf;
+md.nodeoniceshelf=nodeoniceshelf;
 md.elementoniceshelf=elementoniceshelf;
 
-md.gridonwater=gridonwater;
+md.nodeonwater=nodeonwater;
 md.elementonwater=elementonwater;
 
-md.gridonicesheet=gridonicesheet;
+md.nodeonicesheet=nodeonicesheet;
 md.elementonicesheet=elementonicesheet;
 
Index: /issm/trunk/src/m/model/ismodelselfconsistent.m
===================================================================
--- /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 8297)
+++ /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 8298)
@@ -42,5 +42,5 @@
 	checksize(md,fields,[md.numberofelements 6]);
 end
-if any(~ismember(1:md.numberofgrids,sort(unique(md.elements(:)))));
+if any(~ismember(1:md.numberofnodes,sort(unique(md.elements(:)))));
 	error('orphan nodes have been found. Check the mesh');
 end
@@ -70,17 +70,17 @@
 %}}}
 %NO NAN {{{1
-fields={'numberofelements','numberofgrids','x','y','z','drag_coefficient','drag_type','drag_p','drag_q',...
+fields={'numberofelements','numberofnodes','x','y','z','drag_coefficient','drag_type','drag_p','drag_q',...
 	'rho_ice','rho_water','rheology_B','elementoniceshelf','surface','thickness','bed','g','lowmem','sparsity','nsteps','maxiter',...
-	'tolx','eps_res','max_nonlinear_iterations','rheology_n','gridonbed','gridonsurface','elementonbed','elementonsurface','deltaH','DeltaH','timeacc','timedec','elementconnectivity'};
+	'tolx','eps_res','max_nonlinear_iterations','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface','deltaH','DeltaH','timeacc','timedec','elementconnectivity'};
 checknan(md,fields);
 %}}}}
 %FIELDS >= 0 {{{1
-fields={'numberofelements','numberofgrids','elements','drag_coefficient','drag_type','drag_p','drag_q',...
+fields={'numberofelements','numberofnodes','elements','drag_coefficient','drag_type','drag_p','drag_q',...
 	'rho_ice','rho_water','rheology_B','elementoniceshelf','thickness','g','eps_res','max_nonlinear_iterations','eps_rel','eps_abs','nsteps','maxiter','tolx',...
-	'sparsity','lowmem','rheology_n','gridonbed','gridonsurface','elementonbed','elementonsurface','deltaH','DeltaH','timeacc','timedec'};
+	'sparsity','lowmem','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface','deltaH','DeltaH','timeacc','timedec'};
 checkgreater(md,fields,0);
 %}}}
 %FIELDS > 0 {{{1
-fields={'numberofelements','numberofgrids','elements','drag_type','drag_p',...
+fields={'numberofelements','numberofnodes','elements','drag_type','drag_p',...
 	'rho_ice','rho_water','rheology_B','thickness','g','max_nonlinear_iterations','eps_res','eps_rel','eps_abs','maxiter','tolx',...
 	'sparsity','deltaH','DeltaH','timeacc','timedec'};
@@ -92,10 +92,10 @@
 %}}}
 %SIZE NUMBEROFGRIDS {{{1
-fields={'x','y','z','rheology_B','drag_coefficient','melting_rate','accumulation_rate','surface','thickness','bed','gridonbed','gridonsurface'};
-checksize(md,fields,[md.numberofgrids 1]);
+fields={'x','y','z','rheology_B','drag_coefficient','melting_rate','accumulation_rate','surface','thickness','bed','nodeonbed','nodeonsurface'};
+checksize(md,fields,[md.numberofnodes 1]);
 %}}}
 %OTHER SIZES {{{1
 fields={'spcvelocity','diagnostic_ref'};
-checksize(md,fields,[md.numberofgrids 6]);
+checksize(md,fields,[md.numberofnodes 6]);
 %}}}
 %THICKNESS = SURFACE - BED {{{1
@@ -188,5 +188,5 @@
 	checksize(md,fields,[md.nsteps num_controls]);
 	fields={'cm_min','cm_max'};
-	checksize(md,fields,[md.numberofgrids num_controls]);
+	checksize(md,fields,[md.numberofnodes num_controls]);
 
 	%RESPONSES
@@ -195,5 +195,5 @@
 	%WEIGHTS
 	fields={'weights'};
-	checksize(md,fields,[md.numberofgrids 1]);
+	checksize(md,fields,[md.numberofnodes 1]);
 	checkgreater(md,fields,0);
 
@@ -201,9 +201,9 @@
 	if md.solution_type==BalancethicknessSolutionEnum
 		fields={'thickness_obs'};
-		checksize(md,fields,[md.numberofgrids 1]);
+		checksize(md,fields,[md.numberofnodes 1]);
 		checknan(md,fields);
 	else
 		fields={'vx_obs','vy_obs'};
-		checksize(md,fields,[md.numberofgrids 1]);
+		checksize(md,fields,[md.numberofnodes 1]);
 		checknan(md,fields);
 	end
@@ -213,5 +213,5 @@
 		pos=find(md.thickness<=0);
 		if any(find(md.spcthickness(pos,1)==0)),
-			error(['model not consistent: model ' md.name ' has some grids with 0 thickness']);
+			error(['model not consistent: model ' md.name ' has some nodes with 0 thickness']);
 		end
 	end
@@ -228,8 +228,8 @@
 	end
 	if ~isempty(md.part),
-		if numel(md.part)~=md.numberofgrids,
-			error(['model not consistent: user supplied partition for qmu analysis should have size md.numberofgrids x 1 ']);
-		end
-		if find(md.part)>=md.numberofgrids,
+		if numel(md.part)~=md.numberofnodes,
+			error(['model not consistent: user supplied partition for qmu analysis should have size md.numberofnodes x 1 ']);
+		end
+		if find(md.part)>=md.numberofnodes,
 			error(['model not consistent: user supplied partition should be indexed from 0 (c-convention)']);
 		end
@@ -237,6 +237,6 @@
 			error(['model not consistent: partition vector not indexed from 0 on']);
 		end
-		if max(md.part)>=md.numberofgrids,
-			error(['model not consistent: partition vector cannot have maximum index larger than number of grids']);
+		if max(md.part)>=md.numberofnodes,
+			error(['model not consistent: partition vector cannot have maximum index larger than number of nodes']);
 		end
 		if ~isempty(find(md.part<0)),
@@ -319,6 +319,6 @@
 	end
 	%   probably going to need some checks on fm_flightreqs here
-	if (numel(md.fm_criterion) ~= md.numberofgrids) && (numel(md.fm_criterion) ~= md.numberofelements)
-		error(['model not consistent: fm_criterion vector must have number of nodes (' int2str(md.numberofgrids) ') or elements (' int2str(md.numberofelements) ') values, not ' int2str(numel(md.fm_criterion)) ' values.']);
+	if (numel(md.fm_criterion) ~= md.numberofnodes) && (numel(md.fm_criterion) ~= md.numberofelements)
+		error(['model not consistent: fm_criterion vector must have number of nodes (' int2str(md.numberofnodes) ') or elements (' int2str(md.numberofelements) ') values, not ' int2str(numel(md.fm_criterion)) ' values.']);
 	end
 end
@@ -343,5 +343,5 @@
 			%SINGULAR
 			if ~any(sum(md.spcvelocity(:,1:2),2)==2),
-				error(['model not consistent: model ' md.name ' is not well posed (singular). You need at least one grid with fixed velocity!'])
+				error(['model not consistent: model ' md.name ' is not well posed (singular). You need at least one node with fixed velocity!'])
 			end
 
@@ -350,5 +350,5 @@
 				pos=find(md.thickness<=0);
 				if any(find(md.spcthickness(pos,1)==0)),
-					error(['model not consistent: model ' md.name ' has some grids with 0 thickness']);
+					error(['model not consistent: model ' md.name ' has some nodes with 0 thickness']);
 				end
 			end
@@ -369,8 +369,8 @@
 			end
 			%CHECK THAT ROTATION IS IN THE (X,Y) PLANE FOR 2D MODELS
-			if any(md.gridonmacayeal),
-				pos=find(sum(isnan(md.diagnostic_ref),2)==0  & md.gridonmacayeal);
+			if any(md.nodeonmacayeal),
+				pos=find(sum(isnan(md.diagnostic_ref),2)==0  & md.nodeonmacayeal);
 				if any(md.diagnostic_ref(pos,3:5)~=0);
-					error(['model not consistent: model ' md.name ' has problem with rotated spc. The rotation should be in the (x,y) plane for 2D diagnostic models (gridonmacayeal)']);
+					error(['model not consistent: model ' md.name ' has problem with rotated spc. The rotation should be in the (x,y) plane for 2D diagnostic models (nodeonmacayeal)']);
 				end
 			end
@@ -380,5 +380,5 @@
 				fields={'vx','vy'};
 				checknan(md,fields);
-				checksize(md,fields,[md.numberofgrids 1]);
+				checksize(md,fields,[md.numberofnodes 1]);
 			end
 
@@ -400,5 +400,5 @@
 			%Check the size of verticess_type
 			fields={'vertices_type'};
-			checksize(md,fields,[md.numberofgrids 1]);
+			checksize(md,fields,[md.numberofnodes 1]);
 			%Check the values of vertices_type
 			checkvalues(md,{'vertices_type'},[MacAyealApproximationEnum() HutterApproximationEnum() PattynApproximationEnum()...
@@ -436,5 +436,5 @@
 			%INITIAL VELOCITIES
 			fields={'vx','vy'};
-			checksize(md,fields,[md.numberofgrids 1]);
+			checksize(md,fields,[md.numberofnodes 1]);
 			checknan(md,fields);
 
@@ -460,5 +460,5 @@
 			%VELOCITIES AND PRESSURE
 			fields={'vx','vy','vz','pressure','geothermalflux'};
-			checksize(md,fields,[md.numberofgrids 1]);
+			checksize(md,fields,[md.numberofnodes 1]);
 			checknan(md,fields);
 
@@ -472,5 +472,5 @@
 				%INITIAL TEMPERATURE, MELTING AND ACCUMULATION
 				fields={'temperature','accumulation_rate','melting_rate'};
-				checksize(md,fields,[md.numberofgrids 1]);
+				checksize(md,fields,[md.numberofnodes 1]);
 				checknan(md,fields);
 
@@ -488,10 +488,10 @@
 			%VELOCITIES MELTING AND ACCUMULATION
 			fields={'vx','vy','accumulation_rate','melting_rate','dhdt'};
-			checksize(md,fields,[md.numberofgrids 1]);
+			checksize(md,fields,[md.numberofnodes 1]);
 			checknan(md,fields);
 
 			%SPC				 
 			%	if ~md.prognostic_DG,
-			%		if any(md.spcthickness(find(md.gridonboundary))~=1),		 
+			%		if any(md.spcthickness(find(md.nodeonboundary))~=1),		 
 			%			error(['model not consistent: model ' md.name ' should have all the nodes on boundary constrained in field spcthickness']);			 
 			%		end 
@@ -507,9 +507,9 @@
 			%VELOCITIES MELTING AND ACCUMULATION
 			fields={'vx','vy','accumulation_rate','melting_rate'};
-			checksize(md,fields,[md.numberofgrids 1]);
+			checksize(md,fields,[md.numberofnodes 1]);
 			checknan(md,fields);
 
 			%SPC
-			if any(md.spcvelocity(find(md.gridonboundary),[1:2])~=1),
+			if any(md.spcvelocity(find(md.nodeonboundary),[1:2])~=1),
 				error(['model not consistent: model ' md.name ' should have all the nodes on boundary constrained in field spcvelocity']);
 			end
@@ -557,7 +557,7 @@
 				if strcmp(fields{i},'cm_min'),
 					disp('!!! ');
-					disp('!!! WARNING: cm_min must now be of size [md.numberofgrids x 1]. Update your parameter file as follows:');
+					disp('!!! WARNING: cm_min must now be of size [md.numberofnodes x 1]. Update your parameter file as follows:');
 					disp('!!! ');
-					disp('!!! md.cm_min=md.cm_min*ones(md.numberofgrids,1);');
+					disp('!!! md.cm_min=md.cm_min*ones(md.numberofnodes,1);');
 					disp('!!! ');
 				end
@@ -565,7 +565,7 @@
 				if strcmp(fields{i},'cm_max'),
 					disp('!!! ');
-					disp('!!! WARNING: cm_max must now be of size [md.numberofgrids x 1]. Update your parameter file as follows:');
+					disp('!!! WARNING: cm_max must now be of size [md.numberofnodes x 1]. Update your parameter file as follows:');
 					disp('!!! ');
-					disp('!!! md.cm_max=md.cm_max*ones(md.numberofgrids,1);');
+					disp('!!! md.cm_max=md.cm_max*ones(md.numberofnodes,1);');
 					disp('!!! ');
 				end
Index: /issm/trunk/src/m/model/isresultconsistent.m
===================================================================
--- /issm/trunk/src/m/model/isresultconsistent.m	(revision 8297)
+++ /issm/trunk/src/m/model/isresultconsistent.m	(revision 8298)
@@ -37,5 +37,5 @@
 
 	%check size
-	if ~testsize(md,fields1,md.numberofgrids),
+	if ~testsize(md,fields1,md.numberofnodes),
 		bool=0; return
 	end
@@ -66,5 +66,5 @@
 
 		%check size
-		if ~testsize(md,fields1,md.numberofgrids),
+		if ~testsize(md,fields1,md.numberofnodes),
 			bool=0; return
 		end
@@ -101,5 +101,5 @@
 		fields={'results.DiagnosticAnalysis.gradient'};
 		%check size
-		if ~testsize(md,fields,md.numberofgrids),
+		if ~testsize(md,fields,md.numberofnodes),
 			bool=0; return
 		end
@@ -126,25 +126,25 @@
 
 		%check size
-		if ~testsize(md,fields1,md.numberofgrids),
-			bool=0; return
-		end
-
-		%no NAN
-		if ~testnan(md,fields1,md.numberofgrids),
-			bool=0; return
-		end
-
-		%check value is real
-		if ~testreal(md,fields1,md.numberofgrids),
+		if ~testsize(md,fields1,md.numberofnodes),
+			bool=0; return
+		end
+
+		%no NAN
+		if ~testnan(md,fields1,md.numberofnodes),
+			bool=0; return
+		end
+
+		%check value is real
+		if ~testreal(md,fields1,md.numberofnodes),
 			bool=0; return
 		end
 
 		%check value>=0
-		if ~testpositive(md,fields2,md.numberofgrids),
+		if ~testpositive(md,fields2,md.numberofnodes),
 			bool=0; return
 		end
 
 		%check melting (<=0 via penalties)
-		if any(abs(md.results.ThermalAnalysis(iter).melting(md.numberofgrids2d+1:end))>tolerance)
+		if any(abs(md.results.ThermalAnalysis(iter).melting(md.numberofnodes2d+1:end))>tolerance)
 			disp(['''thermal'' result not consistent: increase penalty_melting (negative melting)']);
 			bool=0; return; 
@@ -175,20 +175,20 @@
 
 		%check size
-		if ~testsize(md,fields1,md.numberofgrids),
-			bool=0; return
-		end
-
-		%no NAN
-		if ~testnan(md,fields1,md.numberofgrids),
-			bool=0; return
-		end
-
-		%check value is real
-		if ~testreal(md,fields1,md.numberofgrids),
+		if ~testsize(md,fields1,md.numberofnodes),
+			bool=0; return
+		end
+
+		%no NAN
+		if ~testnan(md,fields1,md.numberofnodes),
+			bool=0; return
+		end
+
+		%check value is real
+		if ~testreal(md,fields1,md.numberofnodes),
 			bool=0; return
 		end
 
 		%check value>=0
-		if ~testpositive(md,fields2,md.numberofgrids),
+		if ~testpositive(md,fields2,md.numberofnodes),
 			bool=0; return
 		end
@@ -196,5 +196,5 @@
 		%check melting (<=0 via penalties)
 		if (md.dim==3),
-			if any(abs(md.results.TransientAnalysis(iter).melting(md.numberofgrids2d+1:end))>tolerance)
+			if any(abs(md.results.TransientAnalysis(iter).melting(md.numberofnodes2d+1:end))>tolerance)
 				disp(['''thermal'' result not consistent: increase penalty_melting (negative melting)']);
 				bool=0; return; 
@@ -210,5 +210,5 @@
 	for i=1:length(fields),
 		if length(eval(['md.' fields{i}]))~=fieldsize
-			disp(['results not consistent: field ' fields{i} ' size should be ' num2str(md.numberofgrids)]);
+			disp(['results not consistent: field ' fields{i} ' size should be ' num2str(md.numberofnodes)]);
 			bool=0; return;
 		end
Index: /issm/trunk/src/m/model/marshall.m
===================================================================
--- /issm/trunk/src/m/model/marshall.m	(revision 8297)
+++ /issm/trunk/src/m/model/marshall.m	(revision 8298)
@@ -23,5 +23,5 @@
 
 WriteData(fid,md.dim,'Integer','dim');
-WriteData(fid,md.numberofgrids,'Integer','numberofgrids');
+WriteData(fid,md.numberofnodes,'Integer','numberofnodes');
 WriteData(fid,md.numberofelements,'Integer','numberofelements');
 WriteData(fid,md.x,'Mat','x');
@@ -32,13 +32,13 @@
 WriteData(fid,md.elements_type,'Mat','elements_type');
 WriteData(fid,md.vertices_type,'Mat','vertices_type');
-WriteData(fid,md.gridonhutter,'Mat','gridonhutter');
-WriteData(fid,md.gridonmacayeal,'Mat','gridonmacayeal');
+WriteData(fid,md.nodeonhutter,'Mat','nodeonhutter');
+WriteData(fid,md.nodeonmacayeal,'Mat','nodeonmacayeal');
 
 if md.dim==3,
 	WriteData(fid,md.numberofelements2d,'Integer','numberofelements2d');
-	WriteData(fid,md.numberofgrids2d,'Integer','numberofgrids2d');
+	WriteData(fid,md.numberofnodes2d,'Integer','numberofnodes2d');
 	WriteData(fid,md.elements2d,'Mat','elements2d');
 	WriteData(fid,md.numlayers,'Integer','numlayers');
-	WriteData(fid,md.gridonpattyn,'Mat','gridonpattyn');
+	WriteData(fid,md.nodeonpattyn,'Mat','nodeonpattyn');
 end
 WriteData(fid,md.upperelements,'Mat','upperelements');
@@ -46,7 +46,7 @@
 WriteData(fid,md.elementonbed,'Mat','elementonbed');
 WriteData(fid,md.elementonsurface,'Mat','elementonsurface');
-WriteData(fid,md.gridonbed,'Mat','gridonbed');
-WriteData(fid,md.gridonsurface,'Mat','gridonsurface');
-WriteData(fid,md.gridonstokes,'Mat','gridonstokes');
+WriteData(fid,md.nodeonbed,'Mat','nodeonbed');
+WriteData(fid,md.nodeonsurface,'Mat','nodeonsurface');
+WriteData(fid,md.nodeonstokes,'Mat','nodeonstokes');
 WriteData(fid,md.borderstokes,'Mat','borderstokes');
 
@@ -75,7 +75,7 @@
 WriteData(fid,md.elementoniceshelf,'Mat','elementoniceshelf');
 WriteData(fid,md.elementonwater,'Mat','elementonwater');
-WriteData(fid,md.gridonicesheet,'Mat','gridonicesheet');
-WriteData(fid,md.gridoniceshelf,'Mat','gridoniceshelf');
-WriteData(fid,md.gridonwater,'Mat','gridonwater');
+WriteData(fid,md.nodeonicesheet,'Mat','nodeonicesheet');
+WriteData(fid,md.nodeoniceshelf,'Mat','nodeoniceshelf');
+WriteData(fid,md.nodeonwater,'Mat','nodeonwater');
 
 WriteData(fid,md.spcvelocity,'Mat','spcvelocity');
Index: /issm/trunk/src/m/model/mechanicalproperties.m
===================================================================
--- /issm/trunk/src/m/model/mechanicalproperties.m	(revision 8297)
+++ /issm/trunk/src/m/model/mechanicalproperties.m	(revision 8298)
@@ -14,6 +14,6 @@
 
 %some checks
-if length(vx)~=md.numberofgrids | length(vy)~=md.numberofgrids,
-	error(['the input velocity should be of size ' num2str(md.numberofgrids) '!'])
+if length(vx)~=md.numberofnodes | length(vy)~=md.numberofnodes,
+	error(['the input velocity should be of size ' num2str(md.numberofnodes) '!'])
 end
 if ~(md.dim==2)
Index: /issm/trunk/src/m/model/mesh/findsegments.m
===================================================================
--- /issm/trunk/src/m/model/mesh/findsegments.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/findsegments.m	(revision 8298)
@@ -52,5 +52,5 @@
 		segments(count,:)=[nods1 el1];
 
-		%swap segment grids if necessary
+		%swap segment nodes if necessary
 		ord1=find(nods1(1)==md.elements(el1,:));
 		ord2=find(nods1(2)==md.elements(el1,:));
@@ -77,5 +77,5 @@
 				segments(count,:)=[nods el1];
 
-				%swap segment grids if necessary
+				%swap segment nodes if necessary
 				ord1=find(nods(1)==md.elements(el1,:));
 				ord2=find(nods(2)==md.elements(el1,:));
Index: /issm/trunk/src/m/model/mesh/mesh.m
===================================================================
--- /issm/trunk/src/m/model/mesh/mesh.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/mesh.m	(revision 8298)
@@ -15,5 +15,5 @@
 %      md=mesh(md,'DomainOutline.exp','Rifts.exp',1500);
 
-%Figure out a characteristic area. Resolution is a grid oriented concept (ex a 1000m  resolution grid would 
+%Figure out a characteristic area. Resolution is a node oriented concept (ex a 1000m  resolution node would 
 %be made of 1000*1000 area squares). 
 if (nargin==3),
@@ -43,8 +43,8 @@
 	[elements,x,y,segments,segmentmarkers]=TriMesh(domainname,riftname,area,'yes');
 
-	%check that all the created grids belong to at least one element
+	%check that all the created nodes belong to at least one element
 	orphan=find(~ismember([1:length(x)],sort(unique(elements(:)))));
 	for i=1:length(orphan),
-		%get rid of the orphan grid i
+		%get rid of the orphan node i
 		%update x and y
 		x=[x(1:orphan(i)-(i-1)-1); x(orphan(i)-(i-1)+1:end)];
@@ -70,14 +70,14 @@
 %Fill in rest of fields:
 md.numberofelements=length(md.elements);
-md.numberofgrids=length(md.x);
-md.z=zeros(md.numberofgrids,1);
-md.gridonboundary=zeros(md.numberofgrids,1); md.gridonboundary(md.segments(:,1:2))=1;
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.numberofnodes=length(md.x);
+md.z=zeros(md.numberofnodes,1);
+md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
 
 %Now, build the connectivity tables for this mesh.
-md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
 
Index: /issm/trunk/src/m/model/mesh/meshadaptation.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshadaptation.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/meshadaptation.m	(revision 8298)
@@ -17,6 +17,6 @@
 	error('meshadaptation error message: adaptation for 3d meshes not implemented yet')
 end
-if length(field)~=md.numberofgrids
-	error('meshadaptation error message: input field length shoud be numberofgrids')
+if length(field)~=md.numberofnodes
+	error('meshadaptation error message: input field length shoud be numberofnodes')
 end
 
@@ -25,8 +25,8 @@
 %initialization
 index=md.elements;
-numberofgrids=md.numberofgrids;
+numberofnodes=md.numberofnodes;
 numberofelements=md.numberofelements;
-gradx=zeros(numberofgrids,1);
-grady=zeros(numberofgrids,1);
+gradx=zeros(numberofnodes,1);
+grady=zeros(numberofnodes,1);
 metric=zeros(numberofelements,1);
 
@@ -48,10 +48,10 @@
 grad_ely=sum(field(index).*beta,2);
 
-%update weights that holds the volume of all the element holding the grid i
-weights=sparse(line,ones(linesize,1),repmat(areas,3,1),numberofgrids,1);
+%update weights that holds the volume of all the element holding the node i
+weights=sparse(line,ones(linesize,1),repmat(areas,3,1),numberofnodes,1);
 
-%Compute gradient for each grid (average of the elements around)
-gradx=sparse(line,ones(linesize,1),repmat(areas.*grad_elx,3,1),numberofgrids,1);
-grady=sparse(line,ones(linesize,1),repmat(areas.*grad_ely,3,1),numberofgrids,1);
+%Compute gradient for each node (average of the elements around)
+gradx=sparse(line,ones(linesize,1),repmat(areas.*grad_elx,3,1),numberofnodes,1);
+grady=sparse(line,ones(linesize,1),repmat(areas.*grad_ely,3,1),numberofnodes,1);
 gradx=gradx./weights;
 grady=grady./weights;
Index: /issm/trunk/src/m/model/mesh/meshbamg.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshbamg.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/meshbamg.m	(revision 8298)
@@ -76,5 +76,5 @@
 	%interpolate velocities onto mesh
 	disp('   interpolating velocities...');
-	if strcmpi(NamesV.interp,'grid'),
+	if strcmpi(NamesV.interp,'node'),
 		vx_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vxname),md.x,md.y,0);
 		vy_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vyname),md.x,md.y,0);
@@ -87,5 +87,5 @@
 	if thicknesspresent,
 		disp('   interpolating thickness...');
-		if strcmpi(NamesH.interp,'grid'),
+		if strcmpi(NamesH.interp,'node'),
 			h=InterpFromGridToMesh(Thi.(NamesH.xname),Thi.(NamesH.yname),Thi.(NamesH.dataname),md.x,md.y,0);
 		else
@@ -95,11 +95,11 @@
 	end
 	
-	%set gridonwater field
+	%set nodeonwater field
 	if ~strcmp(groundeddomain,'N/A'),
-		gridground=ContourToMesh(md.elements,md.x,md.y,groundeddomain,'node',2);
-		md.gridonwater=ones(md.numberofgrids,1);
-		md.gridonwater(find(gridground))=0;
+		nodeground=ContourToMesh(md.elements,md.x,md.y,groundeddomain,'node',2);
+		md.nodeonwater=ones(md.numberofnodes,1);
+		md.nodeonwater(find(nodeground))=0;
 	else
-		md.gridonwater=zeros(md.numberofgrids,1);
+		md.nodeonwater=zeros(md.numberofnodes,1);
 	end
 
Index: /issm/trunk/src/m/model/mesh/meshconvert.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshconvert.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/meshconvert.m	(revision 8298)
@@ -38,11 +38,11 @@
 md.dim=2;
 md.numberofelements=size(md.elements,1);
-md.numberofgrids=length(md.x);
-md.z=zeros(md.numberofgrids,1);
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonwater=zeros(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.numberofnodes=length(md.x);
+md.z=zeros(md.numberofnodes,1);
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonwater=zeros(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
-md.gridonboundary=zeros(md.numberofgrids,1); md.gridonboundary(md.segments(:,1:2))=1;
+md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
 md.counter=1;
Index: /issm/trunk/src/m/model/mesh/meshnodensity.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshnodensity.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/meshnodensity.m	(revision 8298)
@@ -29,8 +29,8 @@
 	[elements,x,y,segments,segmentmarkers]=TriMeshNoDensity(domainname,riftname);
 
-	%check that all the created grids belong to at least one element
+	%check that all the created nodes belong to at least one element
 	orphan=find(~ismember([1:length(x)],sort(unique(elements(:)))));
 	for i=1:length(orphan),
-		%get rid of the orphan grid i
+		%get rid of the orphan node i
 		%update x and y
 		x=[x(1:orphan(i)-(i-1)-1); x(orphan(i)-(i-1)+1:end)];
@@ -56,14 +56,14 @@
 %Fill in rest of fields:
 md.numberofelements=length(md.elements);
-md.numberofgrids=length(md.x);
-md.z=zeros(md.numberofgrids,1);
-md.gridonboundary=zeros(md.numberofgrids,1); md.gridonboundary(md.segments(:,1:2))=1;
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.numberofnodes=length(md.x);
+md.z=zeros(md.numberofnodes,1);
+md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
 
 %Now, build the connectivity tables for this mesh.
-md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
 
Index: /issm/trunk/src/m/model/mesh/meshrefine.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshrefine.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/meshrefine.m	(revision 8298)
@@ -21,14 +21,14 @@
 %Fill in rest of fields:
 md.numberofelements=length(md.elements);
-md.numberofgrids=length(md.x);
-md.z=zeros(md.numberofgrids,1);
-md.gridonboundary=zeros(md.numberofgrids,1); md.gridonboundary(md.segments(:,1:2))=1;
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.numberofnodes=length(md.x);
+md.z=zeros(md.numberofnodes,1);
+md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
 
 %Now, build the connectivity tables for this mesh.
-md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
 
Index: /issm/trunk/src/m/model/mesh/meshyams.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshyams.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/meshyams.m	(revision 8298)
@@ -70,5 +70,5 @@
 	%interpolate velocities onto mesh
 	disp('   interpolating velocities...');
-	if strcmpi(Names.interp,'grid'),
+	if strcmpi(Names.interp,'node'),
 		vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
 		vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
@@ -79,11 +79,11 @@
 	field=sqrt(vx_obs.^2+vy_obs.^2);
 
-	%set gridonwater field
+	%set nodeonwater field
 	if ~strcmp(groundeddomain,'N/A'),
-		gridground=ContourToMesh(md.elements,md.x,md.y,groundeddomain,'node',2);
-		md.gridonwater=ones(md.numberofgrids,1);
-		md.gridonwater(find(gridground))=0;
+		nodeground=ContourToMesh(md.elements,md.x,md.y,groundeddomain,'node',2);
+		md.nodeonwater=ones(md.numberofnodes,1);
+		md.nodeonwater(find(nodeground))=0;
 	else
-		md.gridonwater=zeros(md.numberofgrids,1);
+		md.nodeonwater=zeros(md.numberofnodes,1);
 	end
 
@@ -95,5 +95,5 @@
 	%rifts, because the segments are used in YamsCall to freeze the rifts elements during refinement.
 	if md.numrifts, 
-		md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+		md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 		md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
 		md.segments=findsegments(md);
@@ -106,25 +106,25 @@
 
 %Now, build the connectivity tables for this mesh.
-md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
 
 %recreate segments
 md.segments=findsegments(md);
-md.gridonboundary=zeros(md.numberofgrids,1); md.gridonboundary(md.segments(:,1:2))=1;
+md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
 
 %Fill in rest of fields:
-md.z=zeros(md.numberofgrids,1);
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.z=zeros(md.numberofnodes,1);
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
 if ~strcmp(groundeddomain,'N/A'),
-	gridground=ContourToMesh(md.elements,md.x,md.y,groundeddomain,'node',2);
-	md.gridonwater=ones(md.numberofgrids,1);
-	md.gridonwater(find(gridground))=0;
+	nodeground=ContourToMesh(md.elements,md.x,md.y,groundeddomain,'node',2);
+	md.nodeonwater=ones(md.numberofnodes,1);
+	md.nodeonwater(find(nodeground))=0;
 else
-	md.gridonwater=zeros(md.numberofgrids,1);
+	md.nodeonwater=zeros(md.numberofnodes,1);
 end
-if strcmpi(Names.interp,'grid'),
+if strcmpi(Names.interp,'node'),
 	md.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
 	md.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
Index: /issm/trunk/src/m/model/mesh/reorder.m
===================================================================
--- /issm/trunk/src/m/model/mesh/reorder.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/reorder.m	(revision 8298)
@@ -19,12 +19,12 @@
 
 %reorder nodes
-newgrids=randperm(md.numberofgrids)';
-tnewgrids=zeros(md.numberofgrids,1);tnewgrids(newgrids)=[1:md.numberofgrids]';
+newnodes=randperm(md.numberofnodes)';
+tnewnodes=zeros(md.numberofnodes,1);tnewnodes(newnodes)=[1:md.numberofnodes]';
 
 %update all fields
-md.elements=tnewgrids(md.elements(newelements,:));
-md.segments=[tnewgrids(md.segments(:,1)) tnewgrids(md.segments(:,2)) tnewelements(md.segments(:,3))];
-md.x=md.x(newgrids);
-md.y=md.y(newgrids);
-md.z=md.z(newgrids);
-md.gridonboundary=zeros(md.numberofgrids,1); md.gridonboundary(md.segments(:,1:2))=1;
+md.elements=tnewnodes(md.elements(newelements,:));
+md.segments=[tnewnodes(md.segments(:,1)) tnewnodes(md.segments(:,2)) tnewelements(md.segments(:,3))];
+md.x=md.x(newnodes);
+md.y=md.y(newnodes);
+md.z=md.z(newnodes);
+md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
Index: /issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m	(revision 8298)
@@ -56,6 +56,6 @@
 	
 	%plug md2 mesh into md mesh: 
-	[md.elements,md.x,md.y,md.z,md.numberofelements,md.numberofgrids,elconv,nodeconv,elconv2,nodeconv2]=meshplug(md.elements,md.x,md.y,md.z,...
-								md2.elements,md2.x,md2.y,md2.z,md2.extractedgrids,md2.extractedelements,domain_index);
+	[md.elements,md.x,md.y,md.z,md.numberofelements,md.numberofnodes,elconv,nodeconv,elconv2,nodeconv2]=meshplug(md.elements,md.x,md.y,md.z,...
+								md2.elements,md2.x,md2.y,md2.z,md2.extractednodes,md2.extractedelements,domain_index);
 
 	%update md2 rifts using elconv and nodeconv, and plug them into md: 
@@ -80,12 +80,12 @@
 
 %finish up "a la" mesh.h
-md.gridonboundary=zeros(md.numberofgrids,1); md.gridonboundary(md.segments(:,1:2))=1;
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
 
 %Now, build the connectivity tables for this mesh.
-md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
 
Index: /issm/trunk/src/m/model/mesh/rifts/meshplug.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/meshplug.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/rifts/meshplug.m	(revision 8298)
@@ -1,3 +1,3 @@
-function [elements,x,y,z,numberofelements,numberofgrids,elconv,nodeconv,elconv2,nodeconv2]=meshplug(elements,x,y,z,elements2,x2,y2,z2,extractedgrids,extractedelements,domain);
+function [elements,x,y,z,numberofelements,numberofnodes,elconv,nodeconv,elconv2,nodeconv2]=meshplug(elements,x,y,z,elements2,x2,y2,z2,extractednodes,extractedelements,domain);
 %MESHPLUG - embed mesh into another one
 %     See also meshaddrifts
@@ -22,9 +22,9 @@
 nodeconv2=(size(x,1)+1):(size(x,1)+size(x2,1)); nodeconv2=nodeconv2';
 
-extractedgrids_minusborder=extractedgrids;
-extractedgrids_minusborder(domain)=[];
+extractednodes_minusborder=extractednodes;
+extractednodes_minusborder(domain)=[];
 
-x(extractedgrids_minusborder)=NaN;
-y(extractedgrids_minusborder)=NaN;
+x(extractednodes_minusborder)=NaN;
+y(extractednodes_minusborder)=NaN;
 
 %now, plug md2 mesh: 
@@ -33,17 +33,17 @@
 elements2=elements2+length(x);
 
-%NaN border grids in second mesh
+%NaN border nodes in second mesh
 x2(1:length(domain))=NaN;
 y2(1:length(domain))=NaN;
 
-%redirect border grids in elements2  to elements
+%redirect border nodes in elements2  to elements
 for i=1:length(domain),
 	pos=find(elements2==(i+length(x)));
-	elements2(pos)=extractedgrids(domain(i));
+	elements2(pos)=extractednodes(domain(i));
 end
 
 %same deal for nodeconv2:
 for i=1:length(domain),
-	nodeconv2(i)=extractedgrids(domain(i));
+	nodeconv2(i)=extractednodes(domain(i));
 end
 
@@ -53,5 +53,5 @@
 
 
-%now, increase number of grids
+%now, increase number of nodes
 x=[x; x2];
 y=[y; y2];
@@ -62,28 +62,28 @@
 
 	pos=find(isnan(x));
-	grid=pos(1);
+	node=pos(1);
 
-	%collapse grid
-	x(grid)=[];
-	y(grid)=[];
-	z(grid)=[];
+	%collapse node
+	x(node)=[];
+	y(node)=[];
+	z(node)=[];
 
-	%renumber all grids > grid in elements
-	pos=find(elements>grid);
+	%renumber all nodes > node in elements
+	pos=find(elements>node);
 	elements(pos)=elements(pos)-1;
 
 	%same deal for nodeconv2: 
-	pos=find(nodeconv2>grid);
+	pos=find(nodeconv2>node);
 	nodeconv2(pos)=nodeconv2(pos)-1;
 
 end
 
-numberofgrids=length(x);
+numberofnodes=length(x);
 numberofelements=length(elements);
 
 %finish nodeconv: 
-temp_nodeconv=nodeconv;  temp_nodeconv(extractedgrids_minusborder)=[];
+temp_nodeconv=nodeconv;  temp_nodeconv(extractednodes_minusborder)=[];
 temp_nodeconvnum=1:length(temp_nodeconv);
 nodeconv(temp_nodeconv)=temp_nodeconvnum;
-nodeconv(extractedgrids_minusborder)=NaN;
+nodeconv(extractednodes_minusborder)=NaN;
 
Index: /issm/trunk/src/m/model/mesh/rifts/meshprocessoutsiderifts.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/meshprocessoutsiderifts.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/rifts/meshprocessoutsiderifts.m	(revision 8298)
@@ -23,12 +23,12 @@
 		tip=outsidetips(j);
 		%find tip in the segments, take first segment (there should be 2) that holds tip, 
-		%and grid_connected_to_tip is the other node on this segment:
+		%and node_connected_to_tip is the other node on this segment:
 		tipindex=find(rift.segments(:,1)==tip); 
 		if length(tipindex),
 			tipindex=tipindex(1);
-			grid_connected_to_tip=rift.segments(tipindex,2);
+			node_connected_to_tip=rift.segments(tipindex,2);
 		else
 			tipindex=find(rift.segments(:,2)==tip); tipindex=tipindex(1);
-			grid_connected_to_tip=rift.segments(tipindex,1);
+			node_connected_to_tip=rift.segments(tipindex,1);
 		end
 
@@ -37,5 +37,5 @@
 		%side of the rift.
 		A=tip;
-		B=grid_connected_to_tip;
+		B=node_connected_to_tip;
 
 		elements=[];
@@ -58,5 +58,5 @@
 		md.x=[md.x;md.x(tip)];
 		md.y=[md.y;md.y(tip)];
-		md.numberofgrids=num;
+		md.numberofnodes=num;
 		
 		%replace tip in elements
@@ -84,11 +84,11 @@
 %Fill in rest of fields:
 md.numberofelements=length(md.elements);
-md.numberofgrids=length(md.x);
-md.z=zeros(md.numberofgrids,1);
-md.gridonboundary=zeros(length(md.x),1); md.gridonboundary(md.segments(:,1:2))=1;
+md.numberofnodes=length(md.x);
+md.z=zeros(md.numberofnodes,1);
+md.nodeonboundary=zeros(length(md.x),1); md.nodeonboundary(md.segments(:,1:2))=1;
 md.numrifts=length(md.rifts);
 md.elements_type=3*ones(md.numberofelements,1);
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
Index: /issm/trunk/src/m/model/mesh/rifts/meshprocessrifts.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/meshprocessrifts.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/rifts/meshprocessrifts.m	(revision 8298)
@@ -29,11 +29,11 @@
 %Fill in rest of fields:
 md.numberofelements=length(md.elements);
-md.numberofgrids=length(md.x);
-md.z=zeros(md.numberofgrids,1);
-md.gridonboundary=zeros(length(md.x),1); md.gridonboundary(md.segments(:,1:2))=1;
+md.numberofnodes=length(md.x);
+md.z=zeros(md.numberofnodes,1);
+md.nodeonboundary=zeros(length(md.x),1); md.nodeonboundary(md.segments(:,1:2))=1;
 md.numrifts=length(md.rifts);
 md.elements_type=3*ones(md.numberofelements,1);
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
Index: /issm/trunk/src/m/model/mesh/rifts/rifttipsrefine.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/rifttipsrefine.m	(revision 8297)
+++ /issm/trunk/src/m/model/mesh/rifts/rifttipsrefine.m	(revision 8298)
@@ -5,5 +5,5 @@
 %      md=rifttipsrefine(md,filename,resolution,circleradius);
 
-numberofgrids=50;
+numberofnodes=50;
 
 %take rifts, and create refinement circles around tips
@@ -15,6 +15,6 @@
 	tip2=[rifts(i).x(end) rifts(i).y(end)];
 	%create circle around tip
-	expcreatecircle('Circle1.exp',tip1(1),tip1(2),circleradius,numberofgrids);
-	expcreatecircle('Circle2.exp',tip2(1),tip2(2),circleradius,numberofgrids);
+	expcreatecircle('Circle1.exp',tip1(1),tip1(2),circleradius,numberofnodes);
+	expcreatecircle('Circle2.exp',tip2(1),tip2(2),circleradius,numberofnodes);
 	!cat Circles.exp Circle1.exp Circle2.exp > Circles2.exp
 	!mv Circles2.exp Circles.exp
Index: /issm/trunk/src/m/model/modeldefault/defaultparams.m
===================================================================
--- /issm/trunk/src/m/model/modeldefault/defaultparams.m	(revision 8297)
+++ /issm/trunk/src/m/model/modeldefault/defaultparams.m	(revision 8298)
@@ -47,5 +47,5 @@
 	%drag md.drag or stress
 	md.drag_type=2; %0 none 1 plastic 2 viscous
-	md.drag_coefficient=300*ones(md.numberofgrids,1); %q=1.
+	md.drag_coefficient=300*ones(md.numberofnodes,1); %q=1.
 		
 	%zones of high md.drag
@@ -89,10 +89,10 @@
 
 	disp('      creating accumulation rates');
-	md.accumulation_rate=ones(md.numberofgrids,1); %1m/a
+	md.accumulation_rate=ones(md.numberofnodes,1); %1m/a
 	
 	%Deal with boundary conditions:
 
 	disp('      thermal model');
-	md.melting_rate=zeros(md.numberofgrids,1);
+	md.melting_rate=zeros(md.numberofnodes,1);
 	md.observed_temperature=md.temperature;
 	
Index: /issm/trunk/src/m/model/modelextract.m
===================================================================
--- /issm/trunk/src/m/model/modelextract.m	(revision 8297)
+++ /issm/trunk/src/m/model/modelextract.m	(revision 8298)
@@ -38,7 +38,7 @@
 %kick out all elements with 3 dirichlets
 spc_elem=find(~flag_elem);
-spc_grid=sort(unique(md1.elements(spc_elem,:)));
-flag=ones(md1.numberofgrids,1);
-flag(spc_grid)=0;
+spc_node=sort(unique(md1.elements(spc_elem,:)));
+flag=ones(md1.numberofnodes,1);
+flag(spc_node)=0;
 pos=find(sum(flag(md1.elements),2)==0);
 flag_elem(pos)=0;
@@ -46,30 +46,30 @@
 %extracted elements and nodes lists
 pos_elem=find(flag_elem);
-pos_grid=sort(unique(md1.elements(pos_elem,:)));
+pos_node=sort(unique(md1.elements(pos_elem,:)));
 
 %keep track of some fields
-numberofgrids1=md1.numberofgrids;
+numberofnodes1=md1.numberofnodes;
 numberofelements1=md1.numberofelements;
-numberofgrids2=length(pos_grid);
+numberofnodes2=length(pos_node);
 numberofelements2=length(pos_elem);
-flag_grid=zeros(numberofgrids1,1);
-flag_grid(pos_grid)=1;
-
-%Create Pelem and Pgrid (transform old grids in new grids and same thing for the elements)
+flag_node=zeros(numberofnodes1,1);
+flag_node(pos_node)=1;
+
+%Create Pelem and Pnode (transform old nodes in new nodes and same thing for the elements)
 Pelem=zeros(numberofelements1,1);
 Pelem(pos_elem)=[1:numberofelements2]';
-Pgrid=zeros(numberofgrids1,1);
-Pgrid(pos_grid)=[1:numberofgrids2]';
-
-%renumber the elements (some grid won't exist anymore)
+Pnode=zeros(numberofnodes1,1);
+Pnode(pos_node)=[1:numberofnodes2]';
+
+%renumber the elements (some node won't exist anymore)
 elements_1=md1.elements;
 elements_2=elements_1(pos_elem,:);
-elements_2(:,1)=Pgrid(elements_2(:,1));
-elements_2(:,2)=Pgrid(elements_2(:,2));
-elements_2(:,3)=Pgrid(elements_2(:,3));
+elements_2(:,1)=Pnode(elements_2(:,1));
+elements_2(:,2)=Pnode(elements_2(:,2));
+elements_2(:,3)=Pnode(elements_2(:,3));
 if md1.dim==3,
-	elements_2(:,4)=Pgrid(elements_2(:,4));
-	elements_2(:,5)=Pgrid(elements_2(:,5));
-	elements_2(:,6)=Pgrid(elements_2(:,6));
+	elements_2(:,4)=Pnode(elements_2(:,4));
+	elements_2(:,5)=Pnode(elements_2(:,5));
+	elements_2(:,6)=Pnode(elements_2(:,6));
 end
 
@@ -89,7 +89,7 @@
 		fieldsize=size(field);
 
-		%size = number of grids * n
-		if fieldsize(1)==numberofgrids1
-			md2.(model_fields(i))=field(pos_grid,:);
+		%size = number of nodes * n
+		if fieldsize(1)==numberofnodes1
+			md2.(model_fields(i))=field(pos_node,:);
 
 		%size = number of elements * n
@@ -103,16 +103,16 @@
 	%Mesh
 	md2.numberofelements=numberofelements2;
-	md2.numberofgrids=numberofgrids2;
+	md2.numberofnodes=numberofnodes2;
 	md2.elements=elements_2;
 
 	%uppernodes lowernodes
 	if md1.dim==3
-		md2.uppergrids=md1.uppergrids(pos_grid);
-		pos=find(~isnan(md2.uppergrids));
-		md2.uppergrids(pos)=Pgrid(md2.uppergrids(pos));
-
-		md2.lowergrids=md1.lowergrids(pos_grid);
-		pos=find(~isnan(md2.lowergrids));
-		md2.lowergrids(pos)=Pgrid(md2.lowergrids(pos));
+		md2.uppernodes=md1.uppernodes(pos_node);
+		pos=find(~isnan(md2.uppernodes));
+		md2.uppernodes(pos)=Pnode(md2.uppernodes(pos));
+
+		md2.lowernodes=md1.lowernodes(pos_node);
+		pos=find(~isnan(md2.lowernodes));
+		md2.lowernodes(pos)=Pnode(md2.lowernodes(pos));
 
 		md2.upperelements=md1.upperelements(pos_elem);
@@ -129,18 +129,18 @@
 		flag_elem_2d=flag_elem(1:md1.numberofelements2d);
 		pos_elem_2d=find(flag_elem_2d);
-		flag_grid_2d=flag_grid(1:md1.numberofgrids2d);
-		pos_grid_2d=find(flag_grid_2d);
+		flag_node_2d=flag_node(1:md1.numberofnodes2d);
+		pos_node_2d=find(flag_node_2d);
 
 		md2.numberofelements2d=length(pos_elem_2d);
-		md2.numberofgrids2d=length(pos_grid_2d);
+		md2.numberofnodes2d=length(pos_node_2d);
 		md2.elements2d=md1.elements2d(pos_elem_2d,:);
-		md2.elements2d(:,1)=Pgrid(md2.elements2d(:,1));
-		md2.elements2d(:,2)=Pgrid(md2.elements2d(:,2));
-		md2.elements2d(:,3)=Pgrid(md2.elements2d(:,3));
+		md2.elements2d(:,1)=Pnode(md2.elements2d(:,1));
+		md2.elements2d(:,2)=Pnode(md2.elements2d(:,2));
+		md2.elements2d(:,3)=Pnode(md2.elements2d(:,3));
 
 		if ~isnan(md2.elements_type2d), md2.elements_type2d=md1.elements_type2d(pos_elem_2d); end;
-		md2.x2d=md1.x(pos_grid_2d);
-		md2.y2d=md1.y(pos_grid_2d);
-		md2.z2d=md1.z(pos_grid_2d);
+		md2.x2d=md1.x(pos_node_2d);
+		md2.y2d=md1.y(pos_node_2d);
+		md2.z2d=md1.z(pos_node_2d);
 	end
 
@@ -149,6 +149,6 @@
 		%renumber first two columns
 		pos=find(~isnan(md2.edges(:,4)));
-		md2.edges(:  ,1)=Pgrid(md2.edges(:,1)); 
-		md2.edges(:  ,2)=Pgrid(md2.edges(:,2)); 
+		md2.edges(:  ,1)=Pnode(md2.edges(:,1)); 
+		md2.edges(:  ,2)=Pnode(md2.edges(:,2)); 
 		md2.edges(:  ,3)=Pelem(md2.edges(:,3));
 		md2.edges(pos,4)=Pelem(md2.edges(pos,4));
@@ -175,5 +175,5 @@
 	if ~isnan(md2.penalties),
 		for i=1:size(md1.penalties,1);
-			md2.penalties(i,:)=Pgrid(md1.penalties(i,:));
+			md2.penalties(i,:)=Pnode(md1.penalties(i,:));
 		end
 		md2.penalties=md2.penalties(find(md2.penalties(:,1)),:);
@@ -182,8 +182,8 @@
 	%recreate segments
 	if md1.dim==2
-		md2.nodeconnectivity=NodeConnectivity(md2.elements,md2.numberofgrids);
+		md2.nodeconnectivity=NodeConnectivity(md2.elements,md2.numberofnodes);
 		md2.elementconnectivity=ElementConnectivity(md2.elements,md2.nodeconnectivity);
 		md2.segments=contourenvelope(md2);
-		md2.gridonboundary=zeros(numberofgrids2,1); md2.gridonboundary(md2.segments(:,1:2))=1;
+		md2.nodeonboundary=zeros(numberofnodes2,1); md2.nodeonboundary(md2.segments(:,1:2))=1;
 	end
 
@@ -191,15 +191,15 @@
 	%Catch the elements that have not been extracted
 	orphans_elem=find(~flag_elem);
-	orphans_grid=unique(md1.elements(orphans_elem,:))';
-	%Figure out which grid are on the boundary between md2 and md1
-	gridstoflag1=intersect(orphans_grid,pos_grid);
-	gridstoflag2=Pgrid(gridstoflag1);
+	orphans_node=unique(md1.elements(orphans_elem,:))';
+	%Figure out which node are on the boundary between md2 and md1
+	nodestoflag1=intersect(orphans_node,pos_node);
+	nodestoflag2=Pnode(nodestoflag1);
 	if ~isnan(md1.spcvelocity),
-		md2.spcvelocity(gridstoflag2,1:3)=1;
+		md2.spcvelocity(nodestoflag2,1:3)=1;
 		if ~isnan(md1.vx_obs) & ~isnan(md1.vy_obs)
-			md2.spcvelocity(gridstoflag2,4)=md2.vx_obs(gridstoflag2); 
-			md2.spcvelocity(gridstoflag2,5)=md2.vy_obs(gridstoflag2);
+			md2.spcvelocity(nodestoflag2,4)=md2.vx_obs(nodestoflag2); 
+			md2.spcvelocity(nodestoflag2,5)=md2.vy_obs(nodestoflag2);
 		else
-			md2.spcvelocity(gridstoflag2,4:5)=zeros(length(gridstoflag2),2);
+			md2.spcvelocity(nodestoflag2,4:5)=zeros(length(nodestoflag2),2);
 			disp(' ')
 			disp('!! modelextract warning: spc values should be checked !!')
@@ -208,9 +208,9 @@
 	end
 	if ~isnan(md1.spctemperature),
-		md2.spctemperature(gridstoflag2,1)=1;
+		md2.spctemperature(nodestoflag2,1)=1;
 		if ~isnan(md1.observed_temperature)
-			md2.spctemperature(gridstoflag2,2)=md2.observed_temperature(gridstoflag2); 
+			md2.spctemperature(nodestoflag2,2)=md2.observed_temperature(nodestoflag2); 
 		else
-			md2.spctemperature(gridstoflag2,2)=zeros(length(gridstoflag2),2);
+			md2.spctemperature(nodestoflag2,2)=zeros(length(nodestoflag2),2);
 			disp(' ')
 			disp('!! modelextract warning: spc values should be checked !!')
@@ -221,10 +221,10 @@
 	%Diagnostic
 	if ~isnan(md2.pressureload)
-		md2.pressureload(:,1)=Pgrid(md1.pressureload(:,1)); 
-		md2.pressureload(:,2)=Pgrid(md1.pressureload(:,2)); 
+		md2.pressureload(:,1)=Pnode(md1.pressureload(:,1)); 
+		md2.pressureload(:,2)=Pnode(md1.pressureload(:,2)); 
 		md2.pressureload(:,end-1)=Pelem(md1.pressureload(:,end-1));
 		if md1.dim==3
-			md2.pressureload(:,3)=Pgrid(md1.pressureload(:,3)); 
-			md2.pressureload(:,4)=Pgrid(md1.pressureload(:,4)); 
+			md2.pressureload(:,3)=Pnode(md1.pressureload(:,3)); 
+			md2.pressureload(:,4)=Pnode(md1.pressureload(:,4)); 
 		end
 		md2.pressureload=md2.pressureload(find(md2.pressureload(:,1) & md2.pressureload(:,2) & md2.pressureload(:,end)),:);
@@ -240,6 +240,6 @@
 			for j=1:length(solutionsubfields),
 				field=md1.results.(solutionfields(i)).(solutionsubfields(j));
-				if length(field)==numberofgrids1,
-					md2.results.(solutionfields(i)).(solutionsubfields(j))=field(pos_grid);
+				if length(field)==numberofnodes1,
+					md2.results.(solutionfields(i)).(solutionsubfields(j))=field(pos_node);
 				elseif length(field)==numberofelements1,
 					md2.results.(solutionfields(i)).(solutionsubfields(j))=field(pos_elem);
@@ -260,5 +260,5 @@
 	md2.strainrate=NaN;
 
-%Keep track of pos_grid and pos_elem
-md2.extractedgrids=pos_grid;
+%Keep track of pos_node and pos_elem
+md2.extractednodes=pos_node;
 md2.extractedelements=pos_elem;
Index: /issm/trunk/src/m/model/outflow.m
===================================================================
--- /issm/trunk/src/m/model/outflow.m	(revision 8297)
+++ /issm/trunk/src/m/model/outflow.m	(revision 8298)
@@ -11,4 +11,4 @@
 VdotN=Vx.*Nx+Vy.*Ny;
 
-flag=zeros(md.numberofgrids,1);
+flag=zeros(md.numberofnodes,1);
 flag(A(find(VdotN>0)))=1;
Index: /issm/trunk/src/m/model/parametercontroloptimization.m
===================================================================
--- /issm/trunk/src/m/model/parametercontroloptimization.m	(revision 8297)
+++ /issm/trunk/src/m/model/parametercontroloptimization.m	(revision 8298)
@@ -35,5 +35,5 @@
 md2.cm_jump=0.99*ones(md2.nsteps,1);
 md2.control_analysis=1;
-md2.weights=ones(md2.numberofgrids,1);
+md2.weights=ones(md2.numberofnodes,1);
 
 %loop over the set of parameters
Index: /issm/trunk/src/m/model/parameterization/parametercontrolB.m
===================================================================
--- /issm/trunk/src/m/model/parameterization/parametercontrolB.m	(revision 8297)
+++ /issm/trunk/src/m/model/parameterization/parametercontrolB.m	(revision 8298)
@@ -24,7 +24,7 @@
 
 %weights
-weights=getfieldvalue(options,'weights',ones(md.numberofgrids,1));
-if (length(weights)~=md.numberofgrids)
-	md.weights=ones(md.numberofgrids,1);
+weights=getfieldvalue(options,'weights',ones(md.numberofnodes,1));
+if (length(weights)~=md.numberofnodes)
+	md.weights=ones(md.numberofnodes,1);
 else
 	md.weights=weights;
Index: /issm/trunk/src/m/model/parameterization/parametercontroldrag.m
===================================================================
--- /issm/trunk/src/m/model/parameterization/parametercontroldrag.m	(revision 8297)
+++ /issm/trunk/src/m/model/parameterization/parametercontroldrag.m	(revision 8298)
@@ -24,7 +24,7 @@
 
 %weights
-weights=getfieldvalue(options,'weights',ones(md.numberofgrids,1));
-if (length(weights)~=md.numberofgrids)
-	md.weights=ones(md.numberofgrids,1);
+weights=getfieldvalue(options,'weights',ones(md.numberofnodes,1));
+if (length(weights)~=md.numberofnodes)
+	md.weights=ones(md.numberofnodes,1);
 else
 	md.weights=weights;
@@ -40,8 +40,8 @@
 
 %cm_min
-cm_min=getfieldvalue(options,'cm_min',1*ones(md.numberofgrids,1));
+cm_min=getfieldvalue(options,'cm_min',1*ones(md.numberofnodes,1));
 if (length(cm_min)==1)
-	md.cm_min=cm_min*ones(md.numberofgrids,1);
-elseif (length(cm_min)==md.numberofgrids)
+	md.cm_min=cm_min*ones(md.numberofnodes,1);
+elseif (length(cm_min)==md.numberofnodes)
 	md.cm_min=cm_min;
 else
@@ -50,8 +50,8 @@
 
 %cm_max
-cm_max=getfieldvalue(options,'cm_max',250*ones(md.numberofgrids,1));
+cm_max=getfieldvalue(options,'cm_max',250*ones(md.numberofnodes,1));
 if (length(cm_max)==1)
-	md.cm_max=cm_max*ones(md.numberofgrids,1);
-elseif (length(cm_max)==md.numberofgrids)
+	md.cm_max=cm_max*ones(md.numberofnodes,1);
+elseif (length(cm_max)==md.numberofnodes)
 	md.cm_max=cm_max;
 else
Index: /issm/trunk/src/m/model/partition/adjacency.m
===================================================================
--- /issm/trunk/src/m/model/partition/adjacency.m	(revision 8297)
+++ /issm/trunk/src/m/model/partition/adjacency.m	(revision 8298)
@@ -14,5 +14,5 @@
 values=1;
 
-md.adjacency=sparse(indi,indj,values,md.numberofgrids,md.numberofgrids);
+md.adjacency=sparse(indi,indj,values,md.numberofnodes,md.numberofnodes);
 md.adjacency=double([md.adjacency | md.adjacency']);
 
@@ -21,5 +21,5 @@
 
 %get node connectivity
-md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 
 connectivity=md.nodeconnectivity(:,1:end-1);
Index: /issm/trunk/src/m/model/partition/partitioner.m
===================================================================
--- /issm/trunk/src/m/model/partition/partitioner.m	(revision 8297)
+++ /issm/trunk/src/m/model/partition/partitioner.m	(revision 8298)
@@ -75,5 +75,5 @@
 elseif strcmpi(package,'linear'),
 
-	part=1:1:md.numberofgrids;
+	part=1:1:md.numberofnodes;
 
 elseif strcmpi(package,'metis'),
Index: /issm/trunk/src/m/model/plot/plot_contour.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_contour.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_contour.m	(revision 8298)
@@ -16,5 +16,5 @@
 end
 
-%first, process data: must be on grids
+%first, process data: must be on nodes
 if datatype==1,
 	%elements -> take average
@@ -67,5 +67,5 @@
 edges_tria=[vec(elementslist), vec(elementslist+numberofelements), vec(elementslist+2*numberofelements)];
 
-%segments [grids1 gruids2]
+%segments [nodes1 nodes2]
 Seg1=index(:,[1 2]);
 Seg2=index(:,[2 3]);
Index: /issm/trunk/src/m/model/plot/plot_gridnumbering.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_gridnumbering.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_gridnumbering.m	(revision 8298)
@@ -1,7 +1,7 @@
-function plot_gridnumbering(md,options,width,i);
-%PLOT_GRIDNUMBERING - plot grid numbering
+function plot_nodenumbering(md,options,width,i);
+%PLOT_GRIDNUMBERING - plot node numbering
 %
 %   Usage:
-%      plot_gridnumbering(md,options,width,i);
+%      plot_nodenumbering(md,options,width,i);
 %
 %   See also: PLOTMODEL
@@ -9,5 +9,5 @@
 %process data and model
 [x y z elements is2d]=processmesh(md,[],options);
-[gridnumbers datatype]=processdata(md,[1:md.numberofgrids]',options);
+[nodenumbers datatype]=processdata(md,[1:md.numberofnodes]',options);
 
 %plot
@@ -47,5 +47,5 @@
 
 %apply options
-options=addfielddefault(options,'title','Grid numbering');
+options=addfielddefault(options,'title','Node numbering');
 options=addfielddefault(options,'colorbar',0);
 applyoptions(md,[],options);
Index: /issm/trunk/src/m/model/plot/plot_highlightgrids.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_highlightgrids.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_highlightgrids.m	(revision 8298)
@@ -1,7 +1,7 @@
-function plot_highlightgrids(md,options,width,i);
-%PLOT_HIGHLIGHTGRIDS - plot selected grids
+function plot_highlightnodes(md,options,width,i);
+%PLOT_HIGHLIGHTGRIDS - plot selected nodes
 %
 %   Usage:
-%      plot_highlightgrids(md,options,width,i);
+%      plot_highlightnodes(md,options,width,i);
 %
 %   See also: PLOTMODEL
@@ -9,5 +9,5 @@
 %process data and model
 [x y z elements is2d]=processmesh(md,[],options);
-[gridnumbers datatype]=processdata(md,[1:md.numberofgrids]',options);
+[nodenumbers datatype]=processdata(md,[1:md.numberofnodes]',options);
 
 %plot
@@ -40,7 +40,7 @@
 %apply options
 if ~exist(options,'highlight')
-	disp('highlightgrids warning : highlight option empty, not grid highlighted');
+	disp('highlightnodes warning : highlight option empty, not node highlighted');
 end
-options=addfielddefault(options,'title','Highlighted Grids');
+options=addfielddefault(options,'title','Highlighted Nodes');
 options=addfielddefault(options,'colorbar',0);
 applyoptions(md,[],options);
Index: /issm/trunk/src/m/model/plot/plot_importancefactors.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_importancefactors.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_importancefactors.m	(revision 8298)
@@ -61,5 +61,5 @@
 
 %distribute importance factor
-gridimportance=importancefactors(npart);
+nodeimportance=importancefactors(npart);
 
 %process data and model
@@ -72,8 +72,8 @@
 subplot(width,width,ii);
 
-%ok, plot gridimportance now.
+%ok, plot nodeimportance now.
 if is2d,
 	A=elements(:,1); B=elements(:,2); C=elements(:,3); 
-	patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', gridimportance,'FaceColor','interp','EdgeColor',edgecolor);
+	patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', nodeimportance,'FaceColor','interp','EdgeColor',edgecolor);
 else
 	error('plot_importancefactors error message: 3d meshes not supported yet');
Index: /issm/trunk/src/m/model/plot/plot_manager.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_manager.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_manager.m	(revision 8298)
@@ -62,10 +62,10 @@
 			plot_elementstype(md,options,subplotwidth,i);
 			return;
-		case 'gridnumbering',
-			plot_gridnumbering(md,options,subplotwidth,i);
-			return;
-		
-		case 'highlightgrids',
-			plot_highlightgrids(md,options,subplotwidth,i);
+		case 'nodenumbering',
+			plot_nodenumbering(md,options,subplotwidth,i);
+			return;
+		
+		case 'highlightnodes',
+			plot_highlightnodes(md,options,subplotwidth,i);
 			return;
 		case {'basal_drag','basal_dragx','basal_dragy'},
Index: /issm/trunk/src/m/model/plot/plot_overlay.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_overlay.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_overlay.m	(revision 8298)
@@ -11,5 +11,5 @@
 if strcmpi(data,'none'),
 	radaronly=1;
-	data=NaN*ones(md.numberofgrids,1);
+	data=NaN*ones(md.numberofnodes,1);
 	datatype=1;
 else
Index: /issm/trunk/src/m/model/plot/plot_penalties.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_penalties.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_penalties.m	(revision 8298)
@@ -40,5 +40,5 @@
 		P2=plot3(x(md.penalties(i,:)),y(md.penalties(i,:)),z(md.penalties(i,:)),'bo-','LineWidth',2,'MarkerSize',8,'MarkerFaceColor','b');
 	end
-	legend([P1 P2],'MacAyeal''s penalized grids','Pattyn''s penalized grids');
+	legend([P1 P2],'MacAyeal''s penalized nodes','Pattyn''s penalized nodes');
 end
 
Index: /issm/trunk/src/m/model/plot/plot_qmumean.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_qmumean.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_qmumean.m	(revision 8298)
@@ -48,9 +48,9 @@
 
 %now, project onto vertices
-responses_on_grid=responses(md.part+1);
+responses_on_node=responses(md.part+1);
 
 %plot
 A=elements(:,1); B=elements(:,2); C=elements(:,3); 
-patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', responses_on_grid,'FaceColor','interp','EdgeColor',edgecolor);
+patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', responses_on_node,'FaceColor','interp','EdgeColor',edgecolor);
 
 %apply options
Index: /issm/trunk/src/m/model/plot/plot_qmustddev.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_qmustddev.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_qmustddev.m	(revision 8298)
@@ -49,9 +49,9 @@
 
 %now, project onto vertices
-responses_on_grid=responses(md.part+1);
+responses_on_node=responses(md.part+1);
 
 %plot
 A=elements(:,1); B=elements(:,2); C=elements(:,3); 
-patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', responses_on_grid,'FaceColor','interp','EdgeColor',edgecolor);
+patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', responses_on_node,'FaceColor','interp','EdgeColor',edgecolor);
 
 %apply options
Index: /issm/trunk/src/m/model/plot/plot_riftfraction.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_riftfraction.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_riftfraction.m	(revision 8298)
@@ -23,6 +23,6 @@
 end
 
-%first, build a vector of fractions, over all grids. 
-fractions=zeros(md.numberofgrids,1);
+%first, build a vector of fractions, over all nodes. 
+fractions=zeros(md.numberofnodes,1);
 
 %plug riftproperties fractions:
Index: /issm/trunk/src/m/model/plot/plot_riftnumbering.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_riftnumbering.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_riftnumbering.m	(revision 8298)
@@ -82,6 +82,6 @@
 
 	for j=1:size(penaltypairs,1),
-		grid=penaltypairs(j,1);
-		t=text(x(grid),y(grid),[num2str(i) '.' num2str(j)]);
+		node=penaltypairs(j,1);
+		t=text(x(node),y(node),[num2str(i) '.' num2str(j)]);
 		set(t,'FontSize',fontsize);
 	end
Index: /issm/trunk/src/m/model/plot/plot_riftrelvel.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_riftrelvel.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_riftrelvel.m	(revision 8298)
@@ -8,5 +8,5 @@
 
 %some checks
-if (length(md.vx)~=md.numberofgrids | length(md.vy)~=md.numberofgrids),
+if (length(md.vx)~=md.numberofnodes | length(md.vy)~=md.numberofnodes),
 	error('plot_riftvel error message: vx and vy do not have the right size'),
 end
@@ -21,6 +21,6 @@
 
 %set as NaN all velocities not on rifts
-u=NaN*ones(md.numberofgrids,1);
-v=NaN*ones(md.numberofgrids,1);
+u=NaN*ones(md.numberofnodes,1);
+v=NaN*ones(md.numberofnodes,1);
 for i=1:md.numrifts,
 	penaltypairs=md.rifts(i).penaltypairs(:,[1 2]);
@@ -64,5 +64,5 @@
 for i=1:md.numrifts,
 	
-	%get grids on rift
+	%get nodes on rift
 	penaltypairs=md.rifts(i).penaltypairs;
 
Index: /issm/trunk/src/m/model/plot/plot_riftvel.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_riftvel.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_riftvel.m	(revision 8298)
@@ -8,5 +8,5 @@
 
 %some checks
-if (length(md.vx)~=md.numberofgrids | length(md.vy)~=md.numberofgrids),
+if (length(md.vx)~=md.numberofnodes | length(md.vy)~=md.numberofnodes),
 	error('plot_riftvel error message: vx and vy do not have the right size'),
 end
@@ -17,6 +17,6 @@
 
 %set as NaN all velocities not on rifts
-u=NaN*ones(md.numberofgrids,1);
-v=NaN*ones(md.numberofgrids,1);
+u=NaN*ones(md.numberofnodes,1);
+v=NaN*ones(md.numberofnodes,1);
 for i=1:md.numrifts,
 	penaltypairs=md.rifts(i).penaltypairs(:,[1 2]);
@@ -58,5 +58,5 @@
 
 for i=1:size(md.rifts,1),
-	%get grids on rift
+	%get nodes on rift
 	penaltypairs=md.rifts(i).penaltypairs;
 
Index: /issm/trunk/src/m/model/plot/plot_tensor_principalaxis.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_tensor_principalaxis.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plot_tensor_principalaxis.m	(revision 8298)
@@ -27,5 +27,5 @@
 end
 
-%take the center of each element if ~isongrid
+%take the center of each element if ~isonnode
 if datatype==1,
 	x=mean(md.x(md.elements'))'; y=mean(md.y(md.elements'))'; z=mean(md.z(md.elements'))';
Index: /issm/trunk/src/m/model/plot/plotanalyse.m
===================================================================
--- /issm/trunk/src/m/model/plot/plotanalyse.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plotanalyse.m	(revision 8298)
@@ -7,5 +7,5 @@
 %Do a series of plots that will help the user analyse what is going on. 
 plot(md,'data','segmentonneumann_diag','title','dynamic boundary conditions',...
-		'data','gridondirichlet_diag','title','fixed velocity grids',...
+		'data','nodeondirichlet_diag','title','fixed velocity nodes',...
 		'data','vx_obs','title','vx observation (m/s)',...
 		'data','vy_obs','title','vy observation (m/s)',... 
@@ -19,5 +19,5 @@
 
 plot(md,'data','elementoniceshelf','title','elements on iceshelf',...
-        'data','gridoniceshelf','title','nodes on iceshelf',...
+        'data','nodeoniceshelf','title','nodes on iceshelf',...
 		'data','elementonicesheet','title','elements on icesheet',...
-		'data','gridonicesheet','title','nodes on icesheet','colorbar#all','on','figure',4);
+		'data','nodeonicesheet','title','nodes on icesheet','colorbar#all','on','figure',4);
Index: /issm/trunk/src/m/model/plot/plotdoc.m
===================================================================
--- /issm/trunk/src/m/model/plot/plotdoc.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/plotdoc.m	(revision 8298)
@@ -22,7 +22,7 @@
 disp('                  - ''elements_type'': model used for each element');
 disp('                  - ''elementnumbering'': numbering of elements');
-disp('                  - ''gridnumbering'': numbering of grids');
+disp('                  - ''nodenumbering'': numbering of nodes');
 disp('                  - ''highlightelements'': to highlight elements to highlight the element list');
-disp('                  - ''highlightgrids'': to highlight grids (use highlight option to enter the grid list');
+disp('                  - ''highlightnodes'': to highlight nodes (use highlight option to enter the node list');
 disp('                  - ''mesh'': draw mesh using trisurf');
 disp('                  - ''riftvel'': velocities along rifts');
@@ -86,5 +86,5 @@
 disp('       ''fontweight'': same as standard matlab option (normal: ''n'',bold: ''b'',light: ''l'',demi: ''d'')');
 disp('       ''fontcolor'': same as standard matlab option');
-disp('       ''highlight'': highlights certain grids or elements when using ''gridnumbering'' or ''elementnumbering'' or ''highlightgrids '' or ''highlightelements'' option');
+disp('       ''highlight'': highlights certain nodes or elements when using ''nodenumbering'' or ''elementnumbering'' or ''highlightnodes '' or ''highlightelements'' option');
 disp('       ''resolution'': resolution used by section value (array of type [horizontal_resolution vertical_resolution])');
 disp('                       horizontal_resolution must be in meter, and vertical_resolution a number of layers');
@@ -119,5 +119,5 @@
 disp('       ''textcolor'':  same as standard ''color'' matlab option applied to text, use a cell of strings if more than one');
 disp('       ''textrotation'':  same as standard ''Rotation'' matlab option applied to text, use a cell of strings if more than one');
-disp('       ''mask'': list of flags of size numberofgrids or numberofelements. Only ''true'' values are plotted ');
+disp('       ''mask'': list of flags of size numberofnodes or numberofelements. Only ''true'' values are plotted ');
 disp('       ''partitionedges'': ''off'' by default. overlay plot of partition edges');
 disp('       ''log'': value of log');
Index: /issm/trunk/src/m/model/plot/processdata.m
===================================================================
--- /issm/trunk/src/m/model/plot/processdata.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/processdata.m	(revision 8298)
@@ -58,5 +58,5 @@
 
 	%check length
-	if datasize(1)~=md.numberofgrids & datasize(1)~=md.numberofelements & datasize(1)~=md.numberofgrids*6 & (md.dim==3 & ~(datasize(1)==md.numberofelements2d | datasize(1)==md.numberofgrids2d))
+	if datasize(1)~=md.numberofnodes & datasize(1)~=md.numberofelements & datasize(1)~=md.numberofnodes*6 & (md.dim==3 & ~(datasize(1)==md.numberofelements2d | datasize(1)==md.numberofnodes2d))
 		error('plotmodel error message: data not supported yet');
 	end
@@ -78,26 +78,26 @@
 	end
 
-	%treat the case datasize(1)=6*grids
-	if datasize(1)==6*md.numberofgrids
+	%treat the case datasize(1)=6*nodes
+	if datasize(1)==6*md.numberofnodes
 		%keep the only norm of data
-		data1=data(1:6:md.numberofgrids*6,:);
-		data2=data(2:6:md.numberofgrids*6,:);
+		data1=data(1:6:md.numberofnodes*6,:);
+		data2=data(2:6:md.numberofnodes*6,:);
 		data=sqrt(data1.^2+data2.^2);
-		datasize(1)=md.numberofgrids;
-		%---> go to grid data
+		datasize(1)=md.numberofnodes;
+		%---> go to node data
 	end
 
-	%treat the case datasize(1)=grids2d
-	if (md.dim==3 & datasize(1)==md.numberofgrids2d),
+	%treat the case datasize(1)=nodes2d
+	if (md.dim==3 & datasize(1)==md.numberofnodes2d),
 		data=project3d(md,data,'node');
-		datasize(1)=md.numberofgrids;
-		%---> go to grid data
+		datasize(1)=md.numberofnodes;
+		%---> go to node data
 	end
 
-	%treat the case datasize(1)=grids2d
+	%treat the case datasize(1)=nodes2d
 	if (md.dim==3 & datasize(1)==md.numberofelements2d),
 		data=project3d(md,data,'element');
 		datasize(1)=md.numberofelements;
-		%---> go to grid data
+		%---> go to node data
 	end
 
@@ -105,6 +105,6 @@
 	if exist(options,'smooth')
 		data=averaging(md,data,getfieldvalue(options,'smooth'));
-		datasize(1)=md.numberofgrids;
-		%---> go to grid data
+		datasize(1)=md.numberofnodes;
+		%---> go to node data
 	end
 end
@@ -122,5 +122,5 @@
 		flags=getfieldvalue(options,'mask');
 		pos=find(~flags);
-		if length(flags)==md.numberofgrids,
+		if length(flags)==md.numberofnodes,
 			[pos2 dummy]=find(ismember(md.elements,pos));
 			data(pos2,:)=NaN;
@@ -128,5 +128,5 @@
 			data(pos,:)=NaN;
 		else
-			disp('plotmodel warning: mask length not supported yet (supported length are md.numberofgrids and md.numberofelements');
+			disp('plotmodel warning: mask length not supported yet (supported length are md.numberofnodes and md.numberofelements');
 		end
 	end
@@ -144,6 +144,6 @@
 end
 
-%grid data
-if (datasize(1)==md.numberofgrids & datasize(2)==1),
+%node data
+if (datasize(1)==md.numberofnodes & datasize(2)==1),
 	datatype=2;
 
@@ -152,10 +152,10 @@
 		flags=getfieldvalue(options,'mask');
 		pos=find(~flags);
-		if length(flags)==md.numberofgrids,
+		if length(flags)==md.numberofnodes,
 			data(pos,:)=NaN;
 		elseif length(flags)==md.numberofelements
 			data(md.elements(pos,:),:)=NaN;
 		else
-			disp('plotmodel warning: mask length not supported yet (supported length are md.numberofgrids and md.numberofelements');
+			disp('plotmodel warning: mask length not supported yet (supported length are md.numberofnodes and md.numberofelements');
 		end
 	end
Index: /issm/trunk/src/m/model/plot/processmesh.m
===================================================================
--- /issm/trunk/src/m/model/plot/processmesh.m	(revision 8297)
+++ /issm/trunk/src/m/model/plot/processmesh.m	(revision 8298)
@@ -8,6 +8,6 @@
 
 %some checks
-if md.numberofgrids==md.numberofelements
-	error('plot error message: the number of elements is the same as the number of grids! cannot plot anything with model/plot, use matlab/plot instead')
+if md.numberofnodes==md.numberofelements
+	error('plot error message: the number of elements is the same as the number of nodes! cannot plot anything with model/plot, use matlab/plot instead')
 end
 
Index: /issm/trunk/src/m/model/plug.m
===================================================================
--- /issm/trunk/src/m/model/plug.m	(revision 8297)
+++ /issm/trunk/src/m/model/plug.m	(revision 8298)
@@ -28,5 +28,5 @@
 
 	distance=sqrt( (md.x(index)-md.x).^2 + (md.y(index)-md.y).^2 );
-	distance(holevalues)=10^10; %be sure we are not picking up the nan grids!
+	distance(holevalues)=10^10; %be sure we are not picking up the nan nodes!
 
 	index2=find(distance==min(distance));index2=index2(1);
Index: /issm/trunk/src/m/model/presolve.m
===================================================================
--- /issm/trunk/src/m/model/presolve.m	(revision 8297)
+++ /issm/trunk/src/m/model/presolve.m	(revision 8298)
@@ -31,5 +31,5 @@
 end
 
-md.riftinfo=zeros(numpairs,12); % 2 for grids + 2 for elements+ 2 for  normals + 1 for length + 1 for fill + 1 for friction + 1 for fraction + 1 for fractionincrement + 1 for state.
+md.riftinfo=zeros(numpairs,12); % 2 for nodes + 2 for elements+ 2 for  normals + 1 for length + 1 for fill + 1 for friction + 1 for fraction + 1 for fractionincrement + 1 for state.
 
 count=1;
Index: /issm/trunk/src/m/model/project2d.m
===================================================================
--- /issm/trunk/src/m/model/project2d.m	(revision 8297)
+++ /issm/trunk/src/m/model/project2d.m	(revision 8298)
@@ -32,6 +32,6 @@
 end
 
-if size(value,1)==md3d.numberofgrids,
-	projection_value=value((layer-1)*md3d.numberofgrids2d+1:layer*md3d.numberofgrids2d,:);
+if size(value,1)==md3d.numberofnodes,
+	projection_value=value((layer-1)*md3d.numberofnodes2d+1:layer*md3d.numberofnodes2d,:);
 else
 	projection_value=value((layer-1)*md3d.numberofelements2d+1:layer*md3d.numberofelements2d,:);
Index: /issm/trunk/src/m/model/project3d.m
===================================================================
--- /issm/trunk/src/m/model/project3d.m	(revision 8297)
+++ /issm/trunk/src/m/model/project3d.m	(revision 8298)
@@ -3,5 +3,5 @@
 %
 %   vertically project a vector from 2d mesh (split in noncoll and coll areas) into a 3d mesh.
-%   This vector can be a grid vector of size (md3d.numberofgrids2d,N/A) or an 
+%   This vector can be a node vector of size (md3d.numberofnodes2d,N/A) or an 
 %   element vector of size (md3d.numberofelements2d,N/A). 
 %   type is 'element' or 'node'. layer an optional layer number where vector 
@@ -23,12 +23,12 @@
 if strcmpi(type,'node'),
 
-	projected_vector=zeros(md3d.numberofgrids,size(vector2d,2));
+	projected_vector=zeros(md3d.numberofnodes,size(vector2d,2));
 	
 	if layer==0,
 		for i=1:md3d.numlayers,
-			projected_vector(((i-1)*md3d.numberofgrids2d+1):(i*md3d.numberofgrids2d),:)=vector2d;
+			projected_vector(((i-1)*md3d.numberofnodes2d+1):(i*md3d.numberofnodes2d),:)=vector2d;
 		end
 	else
-		projected_vector(((layer-1)*md3d.numberofgrids2d+1):(layer*md3d.numberofgrids2d),:)=vector2d;
+		projected_vector(((layer-1)*md3d.numberofnodes2d+1):(layer*md3d.numberofnodes2d),:)=vector2d;
 	end
 else
Index: /issm/trunk/src/m/model/removeholes.m
===================================================================
--- /issm/trunk/src/m/model/removeholes.m	(revision 8297)
+++ /issm/trunk/src/m/model/removeholes.m	(revision 8298)
@@ -3,5 +3,5 @@
 %
 %   as its name indicates, this routine takes a model, a field (value of some 
-%   physical quantity evaluated at the mesh grids) of the model, and interpolates this field 
+%   physical quantity evaluated at the mesh nodes) of the model, and interpolates this field 
 %   on the model mesh, without any hole.
 %
Index: /issm/trunk/src/m/model/setelementstype.m
===================================================================
--- /issm/trunk/src/m/model/setelementstype.m	(revision 8297)
+++ /issm/trunk/src/m/model/setelementstype.m	(revision 8298)
@@ -75,19 +75,19 @@
 
 %1: Hutter elements
-gridonhutter=zeros(md.numberofgrids,1);
-gridonhutter(md.elements(find(hutterflag),:))=1;
-md.gridonhutter=gridonhutter;
+nodeonhutter=zeros(md.numberofnodes,1);
+nodeonhutter(md.elements(find(hutterflag),:))=1;
+md.nodeonhutter=nodeonhutter;
 md.elements_type(find(hutterflag))=HutterApproximationEnum();
 
 %2: MacAyeal elements
-gridonmacayeal=zeros(md.numberofgrids,1);
-gridonmacayeal(md.elements(find(macayealflag),:))=1;
-md.gridonmacayeal=gridonmacayeal;
+nodeonmacayeal=zeros(md.numberofnodes,1);
+nodeonmacayeal(md.elements(find(macayealflag),:))=1;
+md.nodeonmacayeal=nodeonmacayeal;
 md.elements_type(find(macayealflag))=MacAyealApproximationEnum();
 
 %3: Pattyn elements
-gridonpattyn=zeros(md.numberofgrids,1);
-gridonpattyn(md.elements(find(pattynflag),:))=1;
-md.gridonpattyn=gridonpattyn;
+nodeonpattyn=zeros(md.numberofnodes,1);
+nodeonpattyn(md.elements(find(pattynflag),:))=1;
+md.nodeonpattyn=nodeonpattyn;
 md.elements_type(find(pattynflag))=PattynApproximationEnum();
 
@@ -95,13 +95,13 @@
 %First modify stokesflag to get rid of elements contrained everywhere (spc + border with pattyn or macayeal)
 if any(stokesflag),
-	gridonstokes=zeros(md.numberofgrids,1);
-	gridonstokes(md.elements(find(stokesflag),:))=1;
-	fullspcnodes=double(sum(md.spcvelocity(:,1:3),2)==3 | (gridonpattyn & gridonstokes));         %find all the grids on the boundary of the domain without icefront
-	fullspcelems=double(sum(fullspcnodes(md.elements),2)==6);         %find all the grids on the boundary of the domain without icefront
+	nodeonstokes=zeros(md.numberofnodes,1);
+	nodeonstokes(md.elements(find(stokesflag),:))=1;
+	fullspcnodes=double(sum(md.spcvelocity(:,1:3),2)==3 | (nodeonpattyn & nodeonstokes));         %find all the nodes on the boundary of the domain without icefront
+	fullspcelems=double(sum(fullspcnodes(md.elements),2)==6);         %find all the nodes on the boundary of the domain without icefront
 	stokesflag(find(fullspcelems))=0;
 end
-gridonstokes=zeros(md.numberofgrids,1);
-gridonstokes(md.elements(find(stokesflag),:))=1;
-md.gridonstokes=gridonstokes;
+nodeonstokes=zeros(md.numberofnodes,1);
+nodeonstokes(md.elements(find(stokesflag),:))=1;
+md.nodeonstokes=nodeonstokes;
 md.elements_type(find(stokesflag))=StokesApproximationEnum();
 
@@ -110,11 +110,11 @@
 	if any(pattynflag), %fill with pattyn
 		pattynflag(~stokesflag)=1;
-		gridonpattyn(md.elements(find(pattynflag),:))=1;
-		md.gridonpattyn=gridonpattyn;
+		nodeonpattyn(md.elements(find(pattynflag),:))=1;
+		md.nodeonpattyn=nodeonpattyn;
 		md.elements_type(find(~stokesflag))=PattynApproximationEnum();
 	elseif any(macayealflag), %fill with macayeal
 		macayealflag(~stokesflag)=1;
-		gridonmacayeal(md.elements(find(macayealflag),:))=1;
-		md.gridonmacayeal=gridonmacayeal;
+		nodeonmacayeal(md.elements(find(macayealflag),:))=1;
+		md.nodeonmacayeal=nodeonmacayeal;
 		md.elements_type(find(~stokesflag))=MacAyealApproximationEnum();
 	else %fill with none 
@@ -126,18 +126,18 @@
 %Now take care of the coupling between MacAyeal and Pattyn
 md.penalties=[];
-gridonmacayealpattyn=zeros(md.numberofgrids,1);
-gridonpattynstokes=zeros(md.numberofgrids,1);
-gridonmacayealstokes=zeros(md.numberofgrids,1);
+nodeonmacayealpattyn=zeros(md.numberofnodes,1);
+nodeonpattynstokes=zeros(md.numberofnodes,1);
+nodeonmacayealstokes=zeros(md.numberofnodes,1);
 if strcmpi(coupling_method,'penalties'),
-	%Create the border grids between Pattyn and MacAyeal and extrude them
-	numgrids2d=md.numberofgrids2d;
+	%Create the border nodes between Pattyn and MacAyeal and extrude them
+	numnodes2d=md.numberofnodes2d;
 	numlayers=md.numlayers;
-	bordergrids2d=find(gridonpattyn(1:numgrids2d) & gridonmacayeal(1:numgrids2d)); %Grids connected to two different types of elements
+	bordernodes2d=find(nodeonpattyn(1:numnodes2d) & nodeonmacayeal(1:numnodes2d)); %Nodes connected to two different types of elements
 
 	%initialize and fill in penalties structure
-	if ~isnan(bordergrids2d),
+	if ~isnan(bordernodes2d),
 		penalties=[];
 		for	i=1:numlayers-1,
-			penalties=[penalties; [bordergrids2d bordergrids2d+md.numberofgrids2d*(i)]];
+			penalties=[penalties; [bordernodes2d bordernodes2d+md.numberofnodes2d*(i)]];
 		end
 		md.penalties=penalties;
@@ -145,8 +145,8 @@
 elseif strcmpi(coupling_method,'tiling'),
 	if any(macayealflag) & any(pattynflag), %coupling macayeal pattyn
-		%Find grid at the border
-		gridonmacayealpattyn(find(gridonmacayeal & gridonpattyn))=1;
+		%Find node at the border
+		nodeonmacayealpattyn(find(nodeonmacayeal & nodeonpattyn))=1;
 		%Macayeal elements in contact with this layer become MacAyealPattyn elements
-		matrixelements=ismember(md.elements,find(gridonmacayealpattyn));
+		matrixelements=ismember(md.elements,find(nodeonmacayealpattyn));
 		commonelements=sum(matrixelements,2)~=0;
 		commonelements(find(pattynflag))=0; %only one layer: the elements previously in macayeal
@@ -154,18 +154,18 @@
 		macayealpattynflag=zeros(md.numberofelements,1);
 		macayealpattynflag(find(commonelements))=1;
-		gridonmacayeal=zeros(md.numberofgrids,1);
-		gridonmacayeal(md.elements(find(macayealflag),:))=1;
-		md.gridonmacayeal=gridonmacayeal;
+		nodeonmacayeal=zeros(md.numberofnodes,1);
+		nodeonmacayeal(md.elements(find(macayealflag),:))=1;
+		md.nodeonmacayeal=nodeonmacayeal;
 
 		%Create MacaAyealPattynApproximation where needed
 		md.elements_type(find(macayealpattynflag))=MacAyealPattynApproximationEnum();
 
-		%Now recreate gridonmacayeal and gridonmacayealpattyn
-		gridonmacayealpattyn(md.elements(find(macayealpattynflag),:))=1;
+		%Now recreate nodeonmacayeal and nodeonmacayealpattyn
+		nodeonmacayealpattyn(md.elements(find(macayealpattynflag),:))=1;
 	elseif any(pattynflag) & any(stokesflag), %coupling pattyn stokes
-		%Find grid at the border
-		gridonpattynstokes(find(gridonpattyn & gridonstokes))=1;
+		%Find node at the border
+		nodeonpattynstokes(find(nodeonpattyn & nodeonstokes))=1;
 		%Stokes elements in contact with this layer become PattynStokes elements
-		matrixelements=ismember(md.elements,find(gridonpattynstokes));
+		matrixelements=ismember(md.elements,find(nodeonpattynstokes));
 		commonelements=sum(matrixelements,2)~=0;
 		commonelements(find(pattynflag))=0; %only one layer: the elements previously in macayeal
@@ -173,19 +173,19 @@
 		pattynstokesflag=zeros(md.numberofelements,1);
 		pattynstokesflag(find(commonelements))=1;
-		gridonstokes=zeros(md.numberofgrids,1);
-		gridonstokes(md.elements(find(stokesflag),:))=1;
-		md.gridonstokes=gridonstokes;
+		nodeonstokes=zeros(md.numberofnodes,1);
+		nodeonstokes(md.elements(find(stokesflag),:))=1;
+		md.nodeonstokes=nodeonstokes;
 
 		%Create MacaAyealPattynApproximation where needed
 		md.elements_type(find(pattynstokesflag))=PattynStokesApproximationEnum();
 
-		%Now recreate gridonpattynstokes
-		gridonpattynstokes=zeros(md.numberofgrids,1);
-		gridonpattynstokes(md.elements(find(pattynstokesflag),:))=1;
+		%Now recreate nodeonpattynstokes
+		nodeonpattynstokes=zeros(md.numberofnodes,1);
+		nodeonpattynstokes(md.elements(find(pattynstokesflag),:))=1;
 	elseif any(stokesflag) & any(macayealflag),
-		%Find grid at the border
-		gridonmacayealstokes(find(gridonmacayeal & gridonstokes))=1;
+		%Find node at the border
+		nodeonmacayealstokes(find(nodeonmacayeal & nodeonstokes))=1;
 		%Stokes elements in contact with this layer become MacAyealStokes elements
-		matrixelements=ismember(md.elements,find(gridonmacayealstokes));
+		matrixelements=ismember(md.elements,find(nodeonmacayealstokes));
 		commonelements=sum(matrixelements,2)~=0;
 		commonelements(find(macayealflag))=0; %only one layer: the elements previously in macayeal
@@ -193,14 +193,14 @@
 		macayealstokesflag=zeros(md.numberofelements,1);
 		macayealstokesflag(find(commonelements))=1;
-		gridonstokes=zeros(md.numberofgrids,1);
-		gridonstokes(md.elements(find(stokesflag),:))=1;
-		md.gridonstokes=gridonstokes;
+		nodeonstokes=zeros(md.numberofnodes,1);
+		nodeonstokes(md.elements(find(stokesflag),:))=1;
+		md.nodeonstokes=nodeonstokes;
 
 		%Create MacaAyealMacAyealApproximation where needed
 		md.elements_type(find(macayealstokesflag))=MacAyealStokesApproximationEnum();
 
-		%Now recreate gridonmacayealstokes
-		gridonmacayealstokes=zeros(md.numberofgrids,1);
-		gridonmacayealstokes(md.elements(find(macayealstokesflag),:))=1;
+		%Now recreate nodeonmacayealstokes
+		nodeonmacayealstokes=zeros(md.numberofnodes,1);
+		nodeonmacayealstokes(md.elements(find(macayealstokesflag),:))=1;
 	elseif any(stokesflag) & any(hutterflag),
 		error('type of coupling not supported yet');
@@ -209,28 +209,28 @@
 
 %Create vertices_type
-md.vertices_type=zeros(md.numberofgrids,1);
-pos=find(gridonhutter);
+md.vertices_type=zeros(md.numberofnodes,1);
+pos=find(nodeonhutter);
 md.vertices_type(pos)=HutterApproximationEnum();
-pos=find(gridonmacayeal);
+pos=find(nodeonmacayeal);
 md.vertices_type(pos)=MacAyealApproximationEnum();
-pos=find(gridonpattyn);
+pos=find(nodeonpattyn);
 md.vertices_type(pos)=PattynApproximationEnum();
-pos=find(gridonhutter);
+pos=find(nodeonhutter);
 md.vertices_type(pos)=HutterApproximationEnum();
-pos=find(gridonpattyn & gridonmacayeal);
+pos=find(nodeonpattyn & nodeonmacayeal);
 md.vertices_type(pos)=PattynApproximationEnum();
-pos=find(gridonmacayealpattyn);
+pos=find(nodeonmacayealpattyn);
 md.vertices_type(pos)=MacAyealPattynApproximationEnum();
-pos=find(gridonstokes);
+pos=find(nodeonstokes);
 md.vertices_type(pos)=StokesApproximationEnum();
 if any(stokesflag),
-	pos=find(~gridonstokes);
+	pos=find(~nodeonstokes);
 	if(~any(pattynflag) & ~any(macayealflag)),
 		md.vertices_type(pos)=NoneApproximationEnum();
 	end
 end
-pos=find(gridonpattynstokes);
+pos=find(nodeonpattynstokes);
 md.vertices_type(pos)=PattynStokesApproximationEnum();
-pos=find(gridonmacayealstokes);
+pos=find(nodeonmacayealstokes);
 md.vertices_type(pos)=MacAyealStokesApproximationEnum();
 
Index: /issm/trunk/src/m/model/slope.m
===================================================================
--- /issm/trunk/src/m/model/slope.m	(revision 8297)
+++ /issm/trunk/src/m/model/slope.m	(revision 8298)
@@ -8,10 +8,10 @@
 if (md.dim==2),
 	numberofelements=md.numberofelements;
-	numberofgrids=md.numberofgrids;
+	numberofnodes=md.numberofnodes;
 	index=md.elements;
 	x=md.x; y=md.y; z=md.z;
 else
 	numberofelements=md.numberofelements2d;
-	numberofgrids=md.numberofgrids2d;
+	numberofnodes=md.numberofnodes2d;
 	index=md.elements2d;
 	x=md.x2d; y=md.y2d; z=md.z2d;
Index: /issm/trunk/src/m/model/thicknessevolution.m
===================================================================
--- /issm/trunk/src/m/model/thicknessevolution.m	(revision 8297)
+++ /issm/trunk/src/m/model/thicknessevolution.m	(revision 8298)
@@ -9,6 +9,6 @@
 %      dhdt=thicknessevolution(md)
 
-if (length(md.vx)~=md.numberofgrids)|(length(md.vy)~=md.numberofgrids)
-	error(['thicknessevolution error message: vx and vy should have a length of ' num2str(md.numberofgrids)])
+if (length(md.vx)~=md.numberofnodes)|(length(md.vy)~=md.numberofnodes)
+	error(['thicknessevolution error message: vx and vy should have a length of ' num2str(md.numberofnodes)])
 end
 
Index: /issm/trunk/src/m/model/tres.m
===================================================================
--- /issm/trunk/src/m/model/tres.m	(revision 8297)
+++ /issm/trunk/src/m/model/tres.m	(revision 8298)
@@ -26,5 +26,5 @@
 			md.vz=PatchToVec(md.results.DiagnosticSolution.Vz);
 		else
-			md.vz=zeros(md.numberofgrids,1);
+			md.vz=zeros(md.numberofnodes,1);
 		end
 	end
Index: /issm/trunk/src/m/qmu/importancefactors.m
===================================================================
--- /issm/trunk/src/m/qmu/importancefactors.m	(revision 8297)
+++ /issm/trunk/src/m/qmu/importancefactors.m	(revision 8298)
@@ -51,10 +51,10 @@
 
 %weight importancefactors by area
-%if numel(factors)==md.numberofgrids,
+%if numel(factors)==md.numberofnodes,
 %	%get areas for each vertex.
 %	aire=GetAreas(md.elements,md.x,md.y);
 %	num_elements_by_node=md.nodeconnectivity(:,end);
-%	grid_aire=zeros(md.numberofgrids,1);
-%	for i=1:md.numberofgrids,
+%	grid_aire=zeros(md.numberofnodes,1);
+%	for i=1:md.numberofnodes,
 %		for j=1:num_elements_by_node(i),
 %			grid_aire(i)=grid_aire(i)+aire(md.nodeconnectivity(i,j));
Index: /issm/trunk/src/m/utils/Analysis/resetspcs.m
===================================================================
--- /issm/trunk/src/m/utils/Analysis/resetspcs.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Analysis/resetspcs.m	(revision 8298)
@@ -3,5 +3,5 @@
 	resolution=20000; x_ellsworth=-1.24*10^6; y_ellsworth=1*10^5;
 	pos=find((md.x>(x_ellsworth-resolution)) & (md.x<(x_ellsworth+resolution)) & (md.y>(y_ellsworth-resolution)) & (md.y<(y_ellsworth+resolution)));
-	md.spcvelocity=zeros(md.numberofgrids,6);
+	md.spcvelocity=zeros(md.numberofnodes,6);
 	md.spcvelocity(pos,1:3)=1;
 
Index: /issm/trunk/src/m/utils/BC/SetIceSheetBC.m
===================================================================
--- /issm/trunk/src/m/utils/BC/SetIceSheetBC.m	(revision 8297)
+++ /issm/trunk/src/m/utils/BC/SetIceSheetBC.m	(revision 8298)
@@ -7,12 +7,12 @@
 %   See also: SETICESHELFBC, SETMARINEICESHEETBC
 
-%grid on Dirichlet
-pos=find(md.gridonboundary);
-md.spcvelocity=zeros(md.numberofgrids,6);
+%node on Dirichlet
+pos=find(md.nodeonboundary);
+md.spcvelocity=zeros(md.numberofnodes,6);
 md.spcvelocity(pos,1:3)=1;
-md.diagnostic_ref=NaN*ones(md.numberofgrids,6);
+md.diagnostic_ref=NaN*ones(md.numberofnodes,6);
 
 %Dirichlet Values
-if (length(md.vx_obs)==md.numberofgrids & length(md.vy_obs)==md.numberofgrids)
+if (length(md.vx_obs)==md.numberofnodes & length(md.vy_obs)==md.numberofnodes)
 	disp('      boundary conditions for diagnostic model: spc set as observed velocities');
 	md.spcvelocity(:,4:5)=[md.vx_obs md.vy_obs]; %vz is zero
@@ -30,22 +30,22 @@
 %Create zeros melting_rate and accumulation_rate if not specified
 if isnan(md.accumulation_rate),
-	md.accumulation_rate=zeros(md.numberofgrids,1);
+	md.accumulation_rate=zeros(md.numberofnodes,1);
 	disp('      no accumulation_rate specified: values set as zero');
 end
 if isnan(md.melting_rate),
-	md.melting_rate=zeros(md.numberofgrids,1);
+	md.melting_rate=zeros(md.numberofnodes,1);
 	disp('      no melting_rate specified: values set as zero');
 end
 if isnan(md.dhdt),
-	md.dhdt=zeros(md.numberofgrids,1);
+	md.dhdt=zeros(md.numberofnodes,1);
 	disp('      no dhdt specified: values set as zero');
 end
 
-md.spcthickness=zeros(md.numberofgrids,2);
+md.spcthickness=zeros(md.numberofnodes,2);
 
-if (length(md.observed_temperature)==md.numberofgrids),
-	md.spctemperature=[md.gridonsurface md.observed_temperature]; %impose observed temperature on surface
-	if (length(md.geothermalflux)~=md.numberofgrids),
-		md.geothermalflux=50*10^-3*ones(md.numberofgrids,1); %50 mW/m^2
+if (length(md.observed_temperature)==md.numberofnodes),
+	md.spctemperature=[md.nodeonsurface md.observed_temperature]; %impose observed temperature on surface
+	if (length(md.geothermalflux)~=md.numberofnodes),
+		md.geothermalflux=50*10^-3*ones(md.numberofnodes,1); %50 mW/m^2
 	end
 else
Index: /issm/trunk/src/m/utils/BC/SetIceShelfBC.m
===================================================================
--- /issm/trunk/src/m/utils/BC/SetIceShelfBC.m	(revision 8297)
+++ /issm/trunk/src/m/utils/BC/SetIceShelfBC.m	(revision 8298)
@@ -15,23 +15,23 @@
 %   See also: SETICESHEETBC, SETMARINEICESHEETBC
 
-%grid on Dirichlet (boundary and ~icefront)
+%node on Dirichlet (boundary and ~icefront)
 if nargin==2,
 	icefrontfile=varargin{1};
 	if ~exist(icefrontfile), error(['SetIceShelfBC error message: ice front file ' icefrontfile ' not found']); end
-	gridinsideicefront=ContourToMesh(md.elements,md.x,md.y,icefrontfile,'node',2);
-	gridonicefront=double(md.gridonboundary & gridinsideicefront);
+	nodeinsideicefront=ContourToMesh(md.elements,md.x,md.y,icefrontfile,'node',2);
+	nodeonicefront=double(md.nodeonboundary & nodeinsideicefront);
 elseif nargin==1,
-	gridonicefront=zeros(md.numberofgrids,1);
+	nodeonicefront=zeros(md.numberofnodes,1);
 else
 	help SetIceShelfBC
 	error('bad usage');
 end
-pos=find(md.gridonboundary & ~gridonicefront);
-md.spcvelocity=zeros(md.numberofgrids,6);
+pos=find(md.nodeonboundary & ~nodeonicefront);
+md.spcvelocity=zeros(md.numberofnodes,6);
 md.spcvelocity(pos,1:3)=1;
-md.diagnostic_ref=NaN*ones(md.numberofgrids,6);
+md.diagnostic_ref=NaN*ones(md.numberofnodes,6);
 
 %Dirichlet Values
-if (length(md.vx_obs)==md.numberofgrids & length(md.vy_obs)==md.numberofgrids)
+if (length(md.vx_obs)==md.numberofnodes & length(md.vy_obs)==md.numberofnodes)
 	disp('      boundary conditions for diagnostic model: spc set as observed velocities');
 	md.spcvelocity(pos,4:5)=[md.vx_obs(pos) md.vy_obs(pos)]; %zeros for vz
@@ -42,12 +42,12 @@
 %segment on Ice Front
 %segment on Neumann (Ice Front)
-pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
+pos=find(nodeonicefront(md.segments(:,1)) | nodeonicefront(md.segments(:,2)));
 if (md.dim==2)
 	pressureload=md.segments(pos,:);
 elseif md.dim==3
-	pressureload_layer1=[md.segments(pos,1:2)  md.segments(pos,2)+md.numberofgrids2d  md.segments(pos,1)+md.numberofgrids2d  md.segments(pos,3)];
+	pressureload_layer1=[md.segments(pos,1:2)  md.segments(pos,2)+md.numberofnodes2d  md.segments(pos,1)+md.numberofnodes2d  md.segments(pos,3)];
 	pressureload=[];
 	for i=1:md.numlayers-1,
-		pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.numberofgrids2d pressureload_layer1(:,5)+(i-1)*md.numberofelements2d ];
+		pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.numberofnodes2d pressureload_layer1(:,5)+(i-1)*md.numberofelements2d ];
 	end
 end
@@ -61,22 +61,22 @@
 %Create zeros melting_rate and accumulation_rate if not specified
 if isnan(md.accumulation_rate),
-	md.accumulation_rate=zeros(md.numberofgrids,1);
+	md.accumulation_rate=zeros(md.numberofnodes,1);
 	disp('      no accumulation_rate specified: values set as zero');
 end
 if isnan(md.melting_rate),
-	md.melting_rate=zeros(md.numberofgrids,1);
+	md.melting_rate=zeros(md.numberofnodes,1);
 	disp('      no melting_rate specified: values set as zero');
 end
 if isnan(md.dhdt),
-	md.dhdt=zeros(md.numberofgrids,1);
+	md.dhdt=zeros(md.numberofnodes,1);
 	disp('      no dhdt specified: values set as zero');
 end
 
-md.spcthickness=zeros(md.numberofgrids,2);
+md.spcthickness=zeros(md.numberofnodes,2);
 
-if (length(md.observed_temperature)==md.numberofgrids),
-	md.spctemperature=[md.gridonsurface md.observed_temperature]; %impose observed temperature on surface
-	if (length(md.geothermalflux)~=md.numberofgrids),
-		md.geothermalflux=zeros(md.numberofgrids,1);
+if (length(md.observed_temperature)==md.numberofnodes),
+	md.spctemperature=[md.nodeonsurface md.observed_temperature]; %impose observed temperature on surface
+	if (length(md.geothermalflux)~=md.numberofnodes),
+		md.geothermalflux=zeros(md.numberofnodes,1);
 	end
 else
Index: /issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m
===================================================================
--- /issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m	(revision 8297)
+++ /issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m	(revision 8298)
@@ -16,5 +16,5 @@
 %   See also: SETICESHELFBC, SETMARINEICESHEETBC
 
-%grid on Dirichlet (boundary and ~icefront)
+%node on Dirichlet (boundary and ~icefront)
 if nargin==2,
 	%User provided Front.exp, use it
@@ -23,22 +23,22 @@
 		error(['SetMarineIceSheetBC error message: ice front file ' icefrontfile ' not found']);
 	end
-	gridinsideicefront=ContourToMesh(md.elements,md.x,md.y,icefrontfile,'node',2);
-	gridonicefront=double(md.gridonboundary & gridinsideicefront);
+	nodeinsideicefront=ContourToMesh(md.elements,md.x,md.y,icefrontfile,'node',2);
+	nodeonicefront=double(md.nodeonboundary & nodeinsideicefront);
 else
 	%Guess where the ice front is
-	gridoniceshelf=zeros(md.numberofgrids,1);
-	gridoniceshelf(md.elements(find(md.elementoniceshelf),:))=1;
-	gridonicefront=double(md.gridonboundary & gridoniceshelf);
+	nodeoniceshelf=zeros(md.numberofnodes,1);
+	nodeoniceshelf(md.elements(find(md.elementoniceshelf),:))=1;
+	nodeonicefront=double(md.nodeonboundary & nodeoniceshelf);
 end
-pos=find(md.gridonboundary & ~gridonicefront);
+pos=find(md.nodeonboundary & ~nodeonicefront);
 if isempty(pos),
 	warning('SetMarineIceSheetBC warning: ice front all around the glacier, no dirichlet found. Dirichlet must be added manually')
 end
-md.spcvelocity=zeros(md.numberofgrids,6);
+md.spcvelocity=zeros(md.numberofnodes,6);
 md.spcvelocity(pos,1:3)=1;
-md.diagnostic_ref=NaN*ones(md.numberofgrids,6);
+md.diagnostic_ref=NaN*ones(md.numberofnodes,6);
 
 %Dirichlet Values
-if (length(md.vx_obs)==md.numberofgrids & length(md.vy_obs)==md.numberofgrids)
+if (length(md.vx_obs)==md.numberofnodes & length(md.vy_obs)==md.numberofnodes)
 	disp('      boundary conditions for diagnostic model: spc set as observed velocities');
 	md.spcvelocity(pos,4:5)=[md.vx_obs(pos) md.vy_obs(pos)]; %zeros for vz
@@ -47,17 +47,17 @@
 end
 
-md.spcwatercolumn=zeros(md.numberofgrids,2);
-pos=find(md.gridonboundary); 
+md.spcwatercolumn=zeros(md.numberofnodes,2);
+pos=find(md.nodeonboundary); 
 md.spcwatercolumn(pos,1)=1;
 
 %segment on Neumann (Ice Front)
-pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
+pos=find(nodeonicefront(md.segments(:,1)) | nodeonicefront(md.segments(:,2)));
 if (md.dim==2)
 	pressureload=md.segments(pos,:);
 elseif md.dim==3
-	pressureload_layer1=[md.segments(pos,1:2)  md.segments(pos,2)+md.numberofgrids2d  md.segments(pos,1)+md.numberofgrids2d  md.segments(pos,3)];
+	pressureload_layer1=[md.segments(pos,1:2)  md.segments(pos,2)+md.numberofnodes2d  md.segments(pos,1)+md.numberofnodes2d  md.segments(pos,3)];
 	pressureload=[];
 	for i=1:md.numlayers-1,
-		pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.numberofgrids2d pressureload_layer1(:,5)+(i-1)*md.numberofelements2d ];
+		pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.numberofnodes2d pressureload_layer1(:,5)+(i-1)*md.numberofelements2d ];
 	end
 end
@@ -71,23 +71,23 @@
 %Create zeros melting_rate and accumulation_rate if not specified
 if isnan(md.accumulation_rate),
-	md.accumulation_rate=zeros(md.numberofgrids,1);
+	md.accumulation_rate=zeros(md.numberofnodes,1);
 	disp('      no accumulation_rate specified: values set as zero');
 end
 if isnan(md.melting_rate),
-	md.melting_rate=zeros(md.numberofgrids,1);
+	md.melting_rate=zeros(md.numberofnodes,1);
 	disp('      no melting_rate specified: values set as zero');
 end
 if isnan(md.dhdt),
-	md.dhdt=zeros(md.numberofgrids,1);
+	md.dhdt=zeros(md.numberofnodes,1);
 	disp('      no dhdt specified: values set as zero');
 end
 
-md.spcthickness=zeros(md.numberofgrids,2);
+md.spcthickness=zeros(md.numberofnodes,2);
 
-if (length(md.observed_temperature)==md.numberofgrids),
-	md.spctemperature=[md.gridonsurface md.observed_temperature]; %impose observed temperature on surface
-	if (length(md.geothermalflux)~=md.numberofgrids),
-		md.geothermalflux=zeros(md.numberofgrids,1);
-		md.geothermalflux(find(md.gridonicesheet))=50*10^-3; %50mW/m2
+if (length(md.observed_temperature)==md.numberofnodes),
+	md.spctemperature=[md.nodeonsurface md.observed_temperature]; %impose observed temperature on surface
+	if (length(md.geothermalflux)~=md.numberofnodes),
+		md.geothermalflux=zeros(md.numberofnodes,1);
+		md.geothermalflux(find(md.nodeonicesheet))=50*10^-3; %50mW/m2
 	end
 else
Index: /issm/trunk/src/m/utils/DataProcessing/TracksToMatrix.m
===================================================================
--- /issm/trunk/src/m/utils/DataProcessing/TracksToMatrix.m	(revision 8297)
+++ /issm/trunk/src/m/utils/DataProcessing/TracksToMatrix.m	(revision 8298)
@@ -72,5 +72,5 @@
 
 %Create design site(points where we are looking for the data)
-Points=gridsamp([x_f(1)+posting/2,y_f(1)+posting/2;x_f(end)-posting/2,y_f(end)-posting/2],[length(x_f)-1;length(y_f)-1]);
+Points=nodesamp([x_f(1)+posting/2,y_f(1)+posting/2;x_f(end)-posting/2,y_f(end)-posting/2],[length(x_f)-1;length(y_f)-1]);
 
 %Compute data on these points
Index: /issm/trunk/src/m/utils/Ecco3/ecco32issm.m
===================================================================
--- /issm/trunk/src/m/utils/Ecco3/ecco32issm.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Ecco3/ecco32issm.m	(revision 8298)
@@ -1,8 +1,8 @@
-function gridfield=ecco32issm(field,transition,xecco3,yecco3)
+function nodefield=ecco32issm(field,transition,xecco3,yecco3)
 
 	xecco3linear=xecco3(:); yecco3linear=yecco3(:); %linearize
-	gridfieldlinear=zeros(length(xecco3linear),1);
-	gridfieldlinear(transition(:,1))=field(transition(:,2));
-	gridfield=xecco3;
-	gridfield(:)=gridfieldlinear;
-	%gridfield=gridfield'; %not sure we need that
+	nodefieldlinear=zeros(length(xecco3linear),1);
+	nodefieldlinear(transition(:,1))=field(transition(:,2));
+	nodefield=xecco3;
+	nodefield(:)=nodefieldlinear;
+	%nodefield=nodefield'; %not sure we need that
Index: /issm/trunk/src/m/utils/Ecco3/issm2ecco3.m
===================================================================
--- /issm/trunk/src/m/utils/Ecco3/issm2ecco3.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Ecco3/issm2ecco3.m	(revision 8298)
@@ -1,8 +1,8 @@
-function gridfield=issm2ecco3(field,transition,xecco3,yecco3)
+function nodefield=issm2ecco3(field,transition,xecco3,yecco3)
 
 	xecco3linear=xecco3(:); yecco3linear=yecco3(:); %linearize
-	gridfieldlinear=zeros(length(xecco3linear),1);
-	gridfieldlinear(transition(:,1))=field(transition(:,2));
-	gridfield=xecco3;
-	gridfield(:)=gridfieldlinear;
-	%gridfield=gridfield'; %not sure we need that
+	nodefieldlinear=zeros(length(xecco3linear),1);
+	nodefieldlinear(transition(:,1))=field(transition(:,2));
+	nodefield=xecco3;
+	nodefield(:)=nodefieldlinear;
+	%nodefield=nodefield'; %not sure we need that
Index: /issm/trunk/src/m/utils/Exp/expcontract.m
===================================================================
--- /issm/trunk/src/m/utils/Exp/expcontract.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Exp/expcontract.m	(revision 8298)
@@ -1,3 +1,3 @@
-function normal_grid=expcontract(newfile,oldfile,distance)
+function normal_node=expcontract(newfile,oldfile,distance)
 %EXPCONTRACT - contract or expand a profile, according to the normal.
 % 
@@ -12,5 +12,5 @@
 
 normal=zeros(num-1,2);
-normal_grid=zeros(num-1,2);
+normal_node=zeros(num-1,2);
 
 for i=1:num-1,
@@ -19,13 +19,13 @@
 end
 
-normal_grid(2:end,:)=[normal(1:end-1,:)+normal(2:end,:)];
-normal_grid(1,:)=normal(1,:)+normal(end,:);
+normal_node(2:end,:)=[normal(1:end-1,:)+normal(2:end,:)];
+normal_node(1,:)=normal(1,:)+normal(end,:);
 
-normal_grid_norm=sqrt(normal_grid(:,1).^2+normal_grid(:,2).^2);
-normal_grid(:,1)=normal_grid(:,1)./normal_grid_norm;
-normal_grid(:,2)=normal_grid(:,2)./normal_grid_norm;
+normal_node_norm=sqrt(normal_node(:,1).^2+normal_node(:,2).^2);
+normal_node(:,1)=normal_node(:,1)./normal_node_norm;
+normal_node(:,2)=normal_node(:,2)./normal_node_norm;
 
-contour.x(1:end-1)=contour.x(1:end-1)+distance*normal_grid(:,1);
-contour.y(1:end-1)=contour.y(1:end-1)+distance*normal_grid(:,2);
+contour.x(1:end-1)=contour.x(1:end-1)+distance*normal_node(:,1);
+contour.y(1:end-1)=contour.y(1:end-1)+distance*normal_node(:,2);
 
 contour.x(end)=contour.x(1);
Index: /issm/trunk/src/m/utils/Exp/expcreatecircle.m
===================================================================
--- /issm/trunk/src/m/utils/Exp/expcreatecircle.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Exp/expcreatecircle.m	(revision 8298)
@@ -1,18 +1,18 @@
-function expcreatecircle(filename,x0,y0,radius,numberofgrids)
+function expcreatecircle(filename,x0,y0,radius,numberofnodes)
 %EXPCREATECIRCLE - create a circular contour corresponding to given parameters
 %
 %   Creates a closed argus contour centered on x,y of radius size.
-%   The contour is made of numberofgrids
+%   The contour is made of numberofnodes
 %
 %   Usage:
-%      expcreatecircle(filename,x0,y0,radius,numberofgrids)
+%      expcreatecircle(filename,x0,y0,radius,numberofnodes)
 %
 %   See also EXPMASTER, EXPDOC
 
 %Calculate the cartesians coordinates of the points
-x_list=ones(numberofgrids+1,1);
-y_list=ones(numberofgrids+1,1);
+x_list=ones(numberofnodes+1,1);
+y_list=ones(numberofnodes+1,1);
 
-theta=(0:2*pi/numberofgrids:2*pi*(1-1/numberofgrids))';
+theta=(0:2*pi/numberofnodes:2*pi*(1-1/numberofnodes))';
 theta=[theta;0];
 
Index: /issm/trunk/src/m/utils/Interp/FieldFindVarNames.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/FieldFindVarNames.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Interp/FieldFindVarNames.m	(revision 8298)
@@ -29,5 +29,5 @@
 xenum=NaN; yenum=NaN; dataenum=NaN; indexenum=NaN;
 if length(A)==3,
-	isgrid=1;
+	isnode=1;
 	for i=1:3
 		if strcmpi(A(i).name(1),'x');
@@ -42,5 +42,5 @@
 	end
 elseif length(A)==4,
-	isgrid=0;
+	isnode=0;
 	for i=1:4
 		if strcmpi(A(i).name(1),'x');
@@ -57,9 +57,9 @@
 	end
 else
-	error(['FieldFindVarNames error message: file ' filename  ' not supported yet (it should hold 3 variables x,y and data (for grids) OR 4 variables  x,y,index and data (for mesh))']);
+	error(['FieldFindVarNames error message: file ' filename  ' not supported yet (it should hold 3 variables x,y and data (for nodes) OR 4 variables  x,y,index and data (for mesh))']);
 end
 
 %2: if only one item is missing, find it by elimination
-if ~isgrid,
+if ~isnode,
 	pos=find(isnan([xenum yenum indexenum dataenum]));
 	if length(pos)==1,
@@ -95,5 +95,5 @@
 
 %find index
-if (~isgrid & isnan(indexenum)),
+if (~isnode & isnan(indexenum)),
 	for i=1:4
 		lengthi=min(A(i).size);
@@ -108,5 +108,5 @@
 
 %4: last chance
-if ~isgrid,
+if ~isnode,
 	pos=find(isnan([xenum yenum indexenum dataenum]));
 	if length(pos)==1,
@@ -146,8 +146,8 @@
 Names.yname=A(yenum).name;
 Names.dataname=A(dataenum).name;
-if ~isgrid,
+if ~isnode,
 	Names.indexname=A(indexenum).name; 
 	Names.interp='mesh';
 else
-	Names.interp='grid';
+	Names.interp='node';
 end
Index: /issm/trunk/src/m/utils/Interp/FillHole.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/FillHole.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Interp/FillHole.m	(revision 8298)
@@ -34,5 +34,5 @@
 	end
 
-	%search the grid on the closest to i, that is not in a hole either
+	%search the node on the closest to i, that is not in a hole either
 	[d posd]=min(sqrt((x(pos_hole(i))-x_noholes).^2+(y(pos_hole(i))-y_noholes).^2));
 	field(pos_hole(i))=field_noholes(posd);
Index: /issm/trunk/src/m/utils/Interp/InterpFromFile.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/InterpFromFile.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Interp/InterpFromFile.m	(revision 8298)
@@ -38,5 +38,5 @@
 Names=FieldFindVarNames(filename);
 Data=load(filename);
-if strcmpi(Names.interp,'grid'),
+if strcmpi(Names.interp,'node'),
 	data_out=InterpFromGridToMesh(Data.(Names.xname),Data.(Names.yname),Data.(Names.dataname),x,y,default_value);
 else
Index: /issm/trunk/src/m/utils/Interp/VelFindVarNames.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/VelFindVarNames.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Interp/VelFindVarNames.m	(revision 8298)
@@ -29,5 +29,5 @@
 xenum=NaN; yenum=NaN; vxenum=NaN; vyenum=NaN; indexenum=NaN;
 if length(A)==4,
-	isgrid=1;
+	isnode=1;
 	for i=1:4
 		if strcmpi(A(i).name(1),'x');
@@ -44,5 +44,5 @@
 	end
 elseif length(A)==5,
-	isgrid=0;
+	isnode=0;
 	for i=1:5
 		if strcmpi(A(i).name(1),'x');
@@ -61,5 +61,5 @@
 	end
 else
-	error(['VelFindVarNames error message: file ' filename  ' not supported yet (it should hold 4 variables x,y,vx and vy (for grids) OR 5 variables  x,y,index,vx and vy (for mesh))']);
+	error(['VelFindVarNames error message: file ' filename  ' not supported yet (it should hold 4 variables x,y,vx and vy (for nodes) OR 5 variables  x,y,index,vx and vy (for mesh))']);
 end
 
@@ -70,5 +70,5 @@
 
 %find index
-if (~isgrid & isnan(indexenum)),
+if (~isnode & isnan(indexenum)),
 	for i=1:5
 		lengthi=min(A(i).size);
@@ -115,8 +115,8 @@
 Names.vxname=A(vxenum).name;
 Names.vyname=A(vyenum).name;
-if ~isgrid,
+if ~isnode,
 	Names.indexname=A(indexenum).name; 
 	Names.interp='mesh';
 else
-	Names.interp='grid';
+	Names.interp='node';
 end
Index: /issm/trunk/src/m/utils/Interp/plugvelocities.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/plugvelocities.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Interp/plugvelocities.m	(revision 8298)
@@ -28,5 +28,5 @@
 
 %Interpolation
-if strcmpi(Names.interp,'grid'),
+if strcmpi(Names.interp,'node'),
 	md.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,default_value);
 	md.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,default_value);
Index: /issm/trunk/src/m/utils/Mesh/BamgCall.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/BamgCall.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Mesh/BamgCall.m	(revision 8298)
@@ -25,6 +25,6 @@
 %Compute metric
 t1=clock; fprintf('%s','      computing metric...');
-if length(md.gridonwater)==md.numberofgrids,
-	pos=find(md.gridonwater);
+if length(md.nodeonwater)==md.numberofnodes,
+	pos=find(md.nodeonwater);
 else
 	pos=[];
@@ -36,5 +36,5 @@
 t1=clock; fprintf('%s','      writing initial mesh files...');
 fid=fopen('carre0.met','w');
-fprintf(fid,'%i %i\n',md.numberofgrids,3);
+fprintf(fid,'%i %i\n',md.numberofnodes,3);
 fprintf(fid,'%i %i %i\n',metric');
 fclose(fid);
@@ -49,6 +49,6 @@
 
 %Vertices
-fprintf(fid,'\n%s\n%i\n\n','Vertices',md.numberofgrids);
-fprintf(fid,'%8g %8g %i\n',[md.x md.y ones(md.numberofgrids,1)]');
+fprintf(fid,'\n%s\n%i\n\n','Vertices',md.numberofnodes);
+fprintf(fid,'%8g %8g %i\n',[md.x md.y ones(md.numberofnodes,1)]');
 
 %Triangles
@@ -72,5 +72,5 @@
 md.z=zeros(A.nods,1);
 md.elements=A.index;
-md.numberofgrids=A.nods;
+md.numberofnodes=A.nods;
 md.numberofelements=A.nels;
 numberofelements2=md.numberofelements;
Index: /issm/trunk/src/m/utils/Mesh/BamgCallFromMetric.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/BamgCallFromMetric.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Mesh/BamgCallFromMetric.m	(revision 8298)
@@ -17,5 +17,5 @@
 t1=clock; fprintf('%s','      writing initial mesh files...');
 fid=fopen('carre0.met','w');
-fprintf(fid,'%i %i\n',md.numberofgrids,3);
+fprintf(fid,'%i %i\n',md.numberofnodes,3);
 fprintf(fid,'%i %i %i\n',metric');
 fclose(fid);
@@ -30,6 +30,6 @@
 
 %Vertices
-fprintf(fid,'\n%s\n%i\n\n','Vertices',md.numberofgrids);
-fprintf(fid,'%8g %8g %i\n',[md.x md.y ones(md.numberofgrids,1)]');
+fprintf(fid,'\n%s\n%i\n\n','Vertices',md.numberofnodes);
+fprintf(fid,'%8g %8g %i\n',[md.x md.y ones(md.numberofnodes,1)]');
 
 %Triangles
@@ -53,5 +53,5 @@
 md.z=zeros(A.nods,1);
 md.elements=A.index;
-md.numberofgrids=A.nods;
+md.numberofnodes=A.nods;
 md.numberofelements=A.nels;
 numberofelements2=md.numberofelements;
Index: /issm/trunk/src/m/utils/Mesh/ComputeHessian.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/ComputeHessian.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Mesh/ComputeHessian.m	(revision 8298)
@@ -13,9 +13,9 @@
 
 %some variables
-numberofgrids=length(x);
+numberofnodes=length(x);
 numberofelements=size(index,1);
 
 %some checks
-if length(field)~=numberofgrids & length(field)~=numberofelements,
+if length(field)~=numberofnodes & length(field)~=numberofelements,
 	error('ComputeHessian error message: the given field size not supported yet');
 end
@@ -32,10 +32,10 @@
 areas=GetAreas(index,x,y);
 
-%comput weights that holds the volume of all the element holding the grid i
-weights=sparse(line,ones(linesize,1),repmat(areas,3,1),numberofgrids,1);
+%comput weights that holds the volume of all the element holding the node i
+weights=sparse(line,ones(linesize,1),repmat(areas,3,1),numberofnodes,1);
 
 %compute field on nodes if on elements
 if length(field)==numberofelements,
-	field=sparse(line,ones(linesize,1),repmat(areas.*field,3,1),numberofgrids,1)./weights ;
+	field=sparse(line,ones(linesize,1),repmat(areas.*field,3,1),numberofnodes,1)./weights ;
 end
 
@@ -44,7 +44,7 @@
 grad_ely=sum(field(index).*beta,2);
 
-%Compute gradient for each grid (average of the elements around)
-gradx=sparse(line,ones(linesize,1),repmat(areas.*grad_elx,3,1),numberofgrids,1);
-grady=sparse(line,ones(linesize,1),repmat(areas.*grad_ely,3,1),numberofgrids,1);
+%Compute gradient for each node (average of the elements around)
+gradx=sparse(line,ones(linesize,1),repmat(areas.*grad_elx,3,1),numberofnodes,1);
+grady=sparse(line,ones(linesize,1),repmat(areas.*grad_ely,3,1),numberofnodes,1);
 gradx=gradx./weights;
 grady=grady./weights;
@@ -55,6 +55,6 @@
 if strcmpi(type,'node')
 	%Compute Hessian on the nodes (average of the elements around)
-	hessian=[sparse(line,ones(linesize,1),repmat(areas.*hessian(:,1),3,1),numberofgrids,1)./weights ...
-		sparse(line,ones(linesize,1),repmat(areas.*hessian(:,2),3,1),numberofgrids,1)./weights ...
-		sparse(line,ones(linesize,1),repmat(areas.*hessian(:,3),3,1),numberofgrids,1)./weights ];
+	hessian=[sparse(line,ones(linesize,1),repmat(areas.*hessian(:,1),3,1),numberofnodes,1)./weights ...
+		sparse(line,ones(linesize,1),repmat(areas.*hessian(:,2),3,1),numberofnodes,1)./weights ...
+		sparse(line,ones(linesize,1),repmat(areas.*hessian(:,3),3,1),numberofnodes,1)./weights ];
 end
Index: /issm/trunk/src/m/utils/Mesh/ComputeMetric.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/ComputeMetric.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Mesh/ComputeMetric.m	(revision 8298)
@@ -7,5 +7,5 @@
 %
 %   Example:
-%      metric=ComputeMetric(hessian,2/9,10^-1,100,10^5,find(md.gridonwater)
+%      metric=ComputeMetric(hessian,2/9,10^-1,100,10^5,find(md.nodeonwater)
 
 %first, find the eigen values of eah line of H=[hessian(i,1) hessian(i,2); hessian(i,2)  hessian(i,3)]
Index: /issm/trunk/src/m/utils/Mesh/MeshQuality.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/MeshQuality.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Mesh/MeshQuality.m	(revision 8298)
@@ -17,6 +17,6 @@
 
 %Compute metric
-if length(md.gridonwater)==md.numberofgrids,
-	pos=find(md.gridonwater);
+if length(md.nodeonwater)==md.numberofnodes,
+	pos=find(md.nodeonwater);
 else
 	pos=[];
@@ -35,5 +35,5 @@
 e3y=[y(index(:,1))-y(index(:,3))];
 
-%metric of each the 3 grids for each element
+%metric of each the 3 nodes for each element
 M1=metric(index(:,1),:);
 M2=metric(index(:,2),:);
@@ -60,6 +60,6 @@
 lambda1=min(max(abs(lambda1)*scale/epsilon,1/hmax^2),1/hmin^2);
 lambda2=min(max(abs(lambda2)*scale/epsilon,1/hmax^2),1/hmin^2);
-if length(md.gridonwater)==md.numberofgrids;
-	pos=find(md.gridonwater);
+if length(md.nodeonwater)==md.numberofnodes;
+	pos=find(md.nodeonwater);
 	lambda1(pos)=0;
 	lambda2(pos)=0;
Index: /issm/trunk/src/m/utils/Mesh/YamsCall.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/YamsCall.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Mesh/YamsCall.m	(revision 8298)
@@ -25,6 +25,6 @@
 %Compute metric
 t1=clock; fprintf('%s','      computing metric...');
-if length(md.gridonwater)==md.numberofgrids,
-	pos=find(md.gridonwater);
+if length(md.nodeonwater)==md.numberofnodes,
+	pos=find(md.nodeonwater);
 else
 	pos=[];
@@ -46,6 +46,6 @@
 
 %Vertices
-fprintf(fid,'\n%s\n%i\n\n','Vertices',md.numberofgrids);
-fprintf(fid,'%8g %8g %i\n',[md.x md.y zeros(md.numberofgrids,1)]');
+fprintf(fid,'\n%s\n%i\n\n','Vertices',md.numberofnodes);
+fprintf(fid,'%8g %8g %i\n',[md.x md.y zeros(md.numberofnodes,1)]');
 
 %Triangles
@@ -92,5 +92,5 @@
 md.z=zeros(size(Coor,1),1);
 md.elements=Tria;
-md.numberofgrids=size(Coor,1);
+md.numberofnodes=size(Coor,1);
 md.numberofelements=size(Tria,1);
 numberofelements2=md.numberofelements;
Index: /issm/trunk/src/m/utils/Mesh/argusmesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/argusmesh.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Mesh/argusmesh.m	(revision 8298)
@@ -29,5 +29,5 @@
 end
 
-%Read first line of the argus mesh: grid and element parameters
+%Read first line of the argus mesh: node and element parameters
 [buffer,bytecount]=fscanf(fileid,'%i %i %i %i',[1 4]);
 if bytecount~=4, 
@@ -37,8 +37,8 @@
 nods=buffer(2);
 num_element_parameters=buffer(3);
-num_grid_parameters=buffer(4);
-disp(['      argus model '''   root ''' contains ' num2str(nel) ' elements and ' num2str(nods) ' grids.']);
+num_node_parameters=buffer(4);
+disp(['      argus model '''   root ''' contains ' num2str(nel) ' elements and ' num2str(nods) ' nodes.']);
 
-%initialize elements and grids
+%initialize elements and nodes
 elements=zeros(nel,3);
 element_parameters=zeros(nel,num_element_parameters);
@@ -46,17 +46,17 @@
 y=zeros(nods,1);
 z=zeros(nods,1);
-grid_parameters=zeros(nods,num_grid_parameters);
+node_parameters=zeros(nods,num_node_parameters);
 
-%read grids:
+%read nodes:
 format_string='%s %i %f %f ';
-for n=1:num_grid_parameters,
+for n=1:num_node_parameters,
 	format_string=[format_string ' %i '];
 end
 
 for n=1:nods,
-	[buffer,bytecount]=fscanf(fileid,format_string,[1,num_grid_parameters+4]);
+	[buffer,bytecount]=fscanf(fileid,format_string,[1,num_node_parameters+4]);
 	x(n)=buffer(3);
 	y(n)=buffer(4);
-	grid_parameters(n,:)=buffer(5:length(buffer));
+	node_parameters(n,:)=buffer(5:length(buffer));
 end
 
@@ -81,8 +81,8 @@
 md.y=y;
 md.z=z;
-md.numberofgrids=size(md.x,1);
+md.numberofnodes=size(md.x,1);
 md.numberofelements=size(md.elements,1);
-md.gridonbed=ones(md.numberofgrids,1);
-md.gridonsurface=ones(md.numberofgrids,1);
+md.nodeonbed=ones(md.numberofnodes,1);
+md.nodeonsurface=ones(md.numberofnodes,1);
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
@@ -93,7 +93,7 @@
 md=addnote(md,notes);
 
-%Add segments and grids on boundary
+%Add segments and nodes on boundary
 md.segments=findsegments(md);
-md.gridonboundary=zeros(md.numberofgrids,1);
-md.gridonboundary(md.segments(:,1))=1;
-md.gridonboundary(md.segments(:,2))=1;
+md.nodeonboundary=zeros(md.numberofnodes,1);
+md.nodeonboundary(md.segments(:,1))=1;
+md.nodeonboundary(md.segments(:,2))=1;
Index: /issm/trunk/src/m/utils/Mesh/squaremesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/squaremesh.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Mesh/squaremesh.m	(revision 8298)
@@ -56,12 +56,12 @@
 segments(2*(ny-1)+(nx-1)+1:2*(nx-1)+2*(ny-1),:)=[[1:ny:(nx-2)*ny+1]' [ny+1:ny:ny*(nx-1)+1]' [1:2*(ny-1):2*(nx-2)*(ny-1)+1]'];
 
-%plug coordinates and grids
+%plug coordinates and nodes
 md.x=x;
 md.y=y;
 md.z=zeros(nods,1);
-md.numberofgrids=nods;
-md.gridonboundary=zeros(nods,1);md.gridonboundary(segments(:,1:2))=1;
-md.gridonbed=ones(nods,1);
-md.gridonsurface=ones(nods,1);
+md.numberofnodes=nods;
+md.nodeonboundary=zeros(nods,1);md.nodeonboundary(segments(:,1:2))=1;
+md.nodeonbed=ones(nods,1);
+md.nodeonsurface=ones(nods,1);
 
 %plug elements
@@ -73,5 +73,5 @@
 
 %Now, build the connectivity tables for this mesh.
-md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
+md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofnodes);
 md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
 
Index: /issm/trunk/src/m/utils/Mesh/zerothickness_icesheetfront.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/zerothickness_icesheetfront.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Mesh/zerothickness_icesheetfront.m	(revision 8298)
@@ -18,9 +18,9 @@
 segments_icesheet=segments(pos,:);
 
-%retrieve grids on ice sheet front
-grid_icesheetfront=intersect(segments_icesheet(:,1),segments_icesheet(:,2));
+%retrieve nodes on ice sheet front
+node_icesheetfront=intersect(segments_icesheet(:,1),segments_icesheet(:,2));
 
 %modify thickness, surface and bed to be a default value
-thickness(grid_icesheetfront)=default_value;
-bed(grid_icesheetfront)=surface(grid_icesheetfront)-thickness(grid_icesheetfront);
+thickness(node_icesheetfront)=default_value;
+bed(node_icesheetfront)=surface(node_icesheetfront)-thickness(node_icesheetfront);
 
Index: /issm/trunk/src/m/utils/Numerics/cfl_step.m
===================================================================
--- /issm/trunk/src/m/utils/Numerics/cfl_step.m	(revision 8297)
+++ /issm/trunk/src/m/utils/Numerics/cfl_step.m	(revision 8298)
@@ -11,6 +11,6 @@
 
 %Check length of velocities 
-if size(vx,1)~=md.numberofgrids & size(vy,1)~=md.numberofgrids,
-	error('timestpes error message: size of velocity components must be the same as md.numberofgrids');
+if size(vx,1)~=md.numberofnodes & size(vy,1)~=md.numberofnodes,
+	error('timestpes error message: size of velocity components must be the same as md.numberofnodes');
 end
 
