Index: /issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 3449)
+++ /issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 3450)
@@ -34,4 +34,5 @@
 	IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
 
+	count=1; //matlab indexing
 	for (i=0;i<iomodel->numberofvertices;i++){
 		/*keep only this partition's nodes:*/
Index: /issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp	(revision 3449)
+++ /issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp	(revision 3450)
@@ -10,20 +10,12 @@
 #include "../IoModel.h"
 
-
 void	CreateConstraintsThermal(DataSet** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
 
-
 	int i;
-	int count;
+	int count=0;
 	
 	DataSet* constraints = NULL;
 	Spc*    spc  = NULL;
 
-	/*spc intermediary data: */
-	int spc_sid;
-	int spc_node;
-	int spc_dof;
-	double spc_value;
-	
 	double* spctemperature=NULL;
 	
@@ -37,31 +29,19 @@
 	IoModelFetchData(&spctemperature,NULL,NULL,iomodel_handle,"spctemperature");
 
-	count=0;
+	count=1;
 
 	/*Create spcs from x,y,z, as well as the spc values on those spcs: */
 	for (i=0;i<iomodel->numberofvertices;i++){
-	#ifdef _PARALLEL_
-	/*keep only this partition's nodes:*/
-	if((iomodel->my_vertices[i]==1)){
-	#endif
+		/*keep only this partition's nodes:*/
+		if((iomodel->my_vertices[i]==1)){
 
-		if ((int)spctemperature[2*i]){
-	
-			/*This grid needs to be spc'd to vx_obs and vy_obs:*/
+			if ((int)spctemperature[2*i]){
 
-			spc_sid=count;
-			spc_node=i+1;
-			spc_dof=1; //we enforce first translation degree of freedom, for temperature
-			spc_value=spctemperature[2*i+1];
+				constraints->AddObject(new Spc(count,i+1,1,spctemperature[2*i+1]));
+				count++;
 
-			spc = new Spc(spc_sid,spc_node,spc_dof,spc_value);
-			constraints->AddObject(spc);
-			count++;
+			}
 
-		}
-
-	#ifdef _PARALLEL_
-	} //if((my_grids[i]==1))
-	#endif
+		} //if((my_grids[i]==1))
 	}
 
@@ -70,5 +50,4 @@
 	constraints->Presort();
 
-	
 	cleanup_and_return:
 	/*Free data: */
Index: /issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 3449)
+++ /issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 3450)
@@ -32,4 +32,5 @@
 	IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature");
 
+	count=1; //matlab indexing
 	for (i=0;i<iomodel->numberofvertices;i++){
 		/*keep only this partition's nodes:*/
