Index: /issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp	(revision 1764)
+++ /issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp	(revision 1765)
@@ -29,6 +29,5 @@
 	double spc_value;
 	
-	double* dirichletvalues_thermal=NULL;
-	double* gridondirichlet_thermal=NULL;
+	double* spctemperature=NULL;
 	
 	/*Create constraints: */
@@ -36,6 +35,5 @@
 
 	/*Fetch data: */
-	ModelFetchData((void**)&gridondirichlet_thermal,NULL,NULL,model_handle,"gridondirichlet_thermal","Matrix","Mat");
-	ModelFetchData((void**)&dirichletvalues_thermal,NULL,NULL,model_handle,"dirichletvalues_thermal","Matrix","Mat");
+	ModelFetchData((void**)&spctemperature,NULL,NULL,model_handle,"spctemperature","Matrix","Mat");
 
 	count=0;
@@ -48,5 +46,5 @@
 	#endif
 
-		if ((int)gridondirichlet_thermal[i]){
+		if ((int)spctemperature[2*i]){
 	
 			/*This grid needs to be spc'd to vx_obs and vy_obs:*/
@@ -55,5 +53,5 @@
 			spc_node=i+1;
 			spc_dof=1; //we enforce first translation degree of freedom, for temperature
-			spc_value=dirichletvalues_thermal[i];
+			spc_value=spctemperature[2*i+1];
 
 			spc = new Spc(spc_sid,spc_node,spc_dof,spc_value);
@@ -75,6 +73,5 @@
 	cleanup_and_return:
 	/*Free data: */
-	xfree((void**)&gridondirichlet_thermal);
-	xfree((void**)&dirichletvalues_thermal);
+	xfree((void**)&spctemperature);
 	
 	/*Assign output pointer: */
Index: /issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 1764)
+++ /issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 1765)
@@ -47,5 +47,5 @@
 
 	//create penalties for grids: no grid can have a temperature over the melting point
-	ModelFetchData((void**)&model->gridondirichlet_thermal,NULL,NULL,model_handle,"gridondirichlet_thermal","Matrix","Mat");
+	ModelFetchData((void**)&model->spctemperature,NULL,NULL,model_handle,"spctemperature","Matrix","Mat");
 
 	for (i=0;i<model->numberofnodes;i++){
@@ -55,5 +55,5 @@
 	#endif
 
-		if (!model->gridondirichlet_thermal[i]){ //No penalty applied on spc grids!
+		if (!model->spctemperature[2*i]){ //No penalty applied on spc grids!
 		
 			pengrid_id=count+1; //matlab indexing
@@ -73,5 +73,5 @@
 	#endif
 	}
-	xfree((void**)&model->gridondirichlet_thermal);
+	xfree((void**)&model->spctemperature);
 
 	/*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these 
