Index: /issm/trunk-jpl/src/c/classes/Elements/Element.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 25419)
+++ /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 25420)
@@ -2921,50 +2921,54 @@
 			break;
 		case PentaEnum:
-			if(IsOnSurface()){
-				/*Here, we want to change the BC of the thermal model, keep
-				 * the temperatures as they are for the base of the penta and
-				 * yse yearlytemperatures for the top*/
-				PentaInput* temp_input = xDynamicCast<PentaInput*>(this->GetInput(TemperatureEnum)); _assert_(temp_input);
-				switch(temp_input->GetInputInterpolationType()){
-					case P1Enum:
-						temp_input->element_values[3] = yearlytemperatures[3];
-						temp_input->element_values[4] = yearlytemperatures[4];
-						temp_input->element_values[5] = yearlytemperatures[5];
-						temp_input->SetInput(P1Enum,NUM_VERTICES,&vertexlids[0],temp_input->element_values);
-						break;
-					case P1xP2Enum:
-					case P1xP3Enum:
-					case P1xP4Enum:
-						temp_input->element_values[3] = yearlytemperatures[3];
-						temp_input->element_values[4] = yearlytemperatures[4];
-						temp_input->element_values[5] = yearlytemperatures[5];
-						temp_input->SetInput(temp_input->GetInputInterpolationType(),this->lid,this->GetNumberOfNodes(temp_input->GetInputInterpolationType()),temp_input->element_values);
-						break;
-					default:
-						_error_("Interpolation "<<EnumToStringx(temp_input->GetInputInterpolationType())<<" not supported yet");
-				}
-
-				bool isenthalpy;
-				this->parameters->FindParam(&isenthalpy,ThermalIsenthalpyEnum);
-				if(isenthalpy){
-					/*Convert that to enthalpy for the enthalpy model*/
-					PentaInput* enth_input = xDynamicCast<PentaInput*>(this->GetInput(EnthalpyEnum)); _assert_(enth_input);
-					switch(enth_input->GetInputInterpolationType()){
+			bool isthermal;
+         this->parameters->FindParam(&isthermal,TransientIsthermalEnum);
+         if(isthermal){
+				if(IsOnSurface()){
+					/*Here, we want to change the BC of the thermal model, keep
+					 * the temperatures as they are for the base of the penta and
+					 * yse yearlytemperatures for the top*/
+					PentaInput* temp_input = xDynamicCast<PentaInput*>(this->GetInput(TemperatureEnum)); _assert_(temp_input);
+					switch(temp_input->GetInputInterpolationType()){
 						case P1Enum:
-							ThermalToEnthalpy(&enth_input->element_values[3],yearlytemperatures[3],0.,0.);
-							ThermalToEnthalpy(&enth_input->element_values[4],yearlytemperatures[4],0.,0.);
-							ThermalToEnthalpy(&enth_input->element_values[5],yearlytemperatures[5],0.,0.);
-							enth_input->SetInput(P1Enum,NUM_VERTICES,&vertexlids[0],enth_input->element_values);
+							temp_input->element_values[3] = yearlytemperatures[3];
+							temp_input->element_values[4] = yearlytemperatures[4];
+							temp_input->element_values[5] = yearlytemperatures[5];
+							temp_input->SetInput(P1Enum,NUM_VERTICES,&vertexlids[0],temp_input->element_values);
 							break;
 						case P1xP2Enum:
 						case P1xP3Enum:
 						case P1xP4Enum:
-							ThermalToEnthalpy(&enth_input->element_values[3],yearlytemperatures[3],0.,0.);
-							ThermalToEnthalpy(&enth_input->element_values[4],yearlytemperatures[4],0.,0.);
-							ThermalToEnthalpy(&enth_input->element_values[5],yearlytemperatures[5],0.,0.);
-							enth_input->SetInput(enth_input->GetInputInterpolationType(),this->lid,this->GetNumberOfNodes(enth_input->GetInputInterpolationType()),enth_input->element_values);
+							temp_input->element_values[3] = yearlytemperatures[3];
+							temp_input->element_values[4] = yearlytemperatures[4];
+							temp_input->element_values[5] = yearlytemperatures[5];
+							temp_input->SetInput(temp_input->GetInputInterpolationType(),this->lid,this->GetNumberOfNodes(temp_input->GetInputInterpolationType()),temp_input->element_values);
 							break;
 						default:
 							_error_("Interpolation "<<EnumToStringx(temp_input->GetInputInterpolationType())<<" not supported yet");
+					}
+
+					bool isenthalpy;
+					this->parameters->FindParam(&isenthalpy,ThermalIsenthalpyEnum);
+					if(isenthalpy){
+						/*Convert that to enthalpy for the enthalpy model*/
+						PentaInput* enth_input = xDynamicCast<PentaInput*>(this->GetInput(EnthalpyEnum)); _assert_(enth_input);
+						switch(enth_input->GetInputInterpolationType()){
+							case P1Enum:
+								ThermalToEnthalpy(&enth_input->element_values[3],yearlytemperatures[3],0.,0.);
+								ThermalToEnthalpy(&enth_input->element_values[4],yearlytemperatures[4],0.,0.);
+								ThermalToEnthalpy(&enth_input->element_values[5],yearlytemperatures[5],0.,0.);
+								enth_input->SetInput(P1Enum,NUM_VERTICES,&vertexlids[0],enth_input->element_values);
+								break;
+							case P1xP2Enum:
+							case P1xP3Enum:
+							case P1xP4Enum:
+								ThermalToEnthalpy(&enth_input->element_values[3],yearlytemperatures[3],0.,0.);
+								ThermalToEnthalpy(&enth_input->element_values[4],yearlytemperatures[4],0.,0.);
+								ThermalToEnthalpy(&enth_input->element_values[5],yearlytemperatures[5],0.,0.);
+								enth_input->SetInput(enth_input->GetInputInterpolationType(),this->lid,this->GetNumberOfNodes(enth_input->GetInputInterpolationType()),enth_input->element_values);
+								break;
+							default:
+								_error_("Interpolation "<<EnumToStringx(temp_input->GetInputInterpolationType())<<" not supported yet");
+						}
 					}
 				}
