Index: ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp	(revision 18731)
+++ ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp	(revision 18732)
@@ -129,6 +129,11 @@
 	if(numoutputs)parameters->AddObject(new StringArrayParam(StressbalanceRequestedOutputsEnum,requestedoutputs,numoutputs));
 	iomodel->DeleteData(&requestedoutputs,numoutputs,StressbalanceRequestedOutputsEnum);
 
+	/*Deal with friction parameters*/
+	int frictionlaw;
+	iomodel->Constant(&frictionlaw,FrictionLawEnum);
+	if(frictionlaw==4) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum));
+
 }/*}}}*/
 void StressbalanceAnalysis::UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/
 
@@ -261,6 +266,13 @@
 			iomodel->FetchDataToInput(elements,FrictionCEnum);
 			iomodel->FetchDataToInput(elements,FrictionMEnum);
 			break;
+		case 4:
+			iomodel->FetchDataToInput(elements,FrictionCoefficientEnum);
+			iomodel->FetchDataToInput(elements,FrictionPEnum);
+			iomodel->FetchDataToInput(elements,FrictionQEnum);
+			iomodel->FetchDataToInput(elements,PressureEnum);
+			iomodel->FetchDataToInput(elements,TemperatureEnum);
+			break;
 		default:
 			_error_("not supported");
 	}
Index: ../trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp	(revision 18731)
+++ ../trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp	(revision 18732)
@@ -25,6 +25,11 @@
 	parameters->AddObject(new IntParam(ThermalNumRequestedOutputsEnum,numoutputs));
 	if(numoutputs)parameters->AddObject(new StringArrayParam(ThermalRequestedOutputsEnum,requestedoutputs,numoutputs));
 	iomodel->DeleteData(&requestedoutputs,numoutputs,ThermalRequestedOutputsEnum);
+
+	/*Deal with friction parameters*/
+	int frictionlaw;
+	iomodel->Constant(&frictionlaw,FrictionLawEnum);
+	if(frictionlaw==4) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum));
 }/*}}}*/
 void EnthalpyAnalysis::UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/
 
@@ -95,6 +100,13 @@
 			iomodel->FetchDataToInput(elements,FrictionCEnum);
 			iomodel->FetchDataToInput(elements,FrictionMEnum);
 			break;
+		case 4:
+			iomodel->FetchDataToInput(elements,FrictionCoefficientEnum);
+			iomodel->FetchDataToInput(elements,FrictionPEnum);
+			iomodel->FetchDataToInput(elements,FrictionQEnum);
+			iomodel->FetchDataToInput(elements,PressureEnum);
+			iomodel->FetchDataToInput(elements,TemperatureEnum);
+			break;
 		default:
 			_error_("not supported");
 	}
Index: ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18731)
+++ ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18732)
@@ -94,6 +94,7 @@
 	FrictionMEnum,
 	FrictionCEnum,
 	FrictionLawEnum,
+	FrictionGammaEnum,
 	GeometryHydrostaticRatioEnum,
 	HydrologyModelEnum,
 	HydrologyshreveEnum,
Index: ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18731)
+++ ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18732)
@@ -102,6 +102,7 @@
 		case FrictionMEnum : return "FrictionM";
 		case FrictionCEnum : return "FrictionC";
 		case FrictionLawEnum : return "FrictionLaw";
+		case FrictionGammaEnum : return "FrictionGamma";
 		case GeometryHydrostaticRatioEnum : return "GeometryHydrostaticRatio";
 		case HydrologyModelEnum : return "HydrologyModel";
 		case HydrologyshreveEnum : return "Hydrologyshreve";
Index: ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18731)
+++ ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18732)
@@ -102,6 +102,7 @@
 	      else if (strcmp(name,"FrictionM")==0) return FrictionMEnum;
 	      else if (strcmp(name,"FrictionC")==0) return FrictionCEnum;
 	      else if (strcmp(name,"FrictionLaw")==0) return FrictionLawEnum;
+	      else if (strcmp(name,"FrictionGamma")==0) return FrictionGammaEnum;
 	      else if (strcmp(name,"GeometryHydrostaticRatio")==0) return GeometryHydrostaticRatioEnum;
 	      else if (strcmp(name,"HydrologyModel")==0) return HydrologyModelEnum;
 	      else if (strcmp(name,"Hydrologyshreve")==0) return HydrologyshreveEnum;
@@ -135,11 +136,11 @@
 	      else if (strcmp(name,"HydrologydcEplMaxThickness")==0) return HydrologydcEplMaxThicknessEnum;
 	      else if (strcmp(name,"HydrologydcEplThickness")==0) return HydrologydcEplThicknessEnum;
 	      else if (strcmp(name,"HydrologydcEplThicknessOld")==0) return HydrologydcEplThicknessOldEnum;
-	      else if (strcmp(name,"HydrologydcEplConductivity")==0) return HydrologydcEplConductivityEnum;
          else stage=2;
    }
    if(stage==2){
-	      if (strcmp(name,"HydrologydcIsefficientlayer")==0) return HydrologydcIsefficientlayerEnum;
+	      if (strcmp(name,"HydrologydcEplConductivity")==0) return HydrologydcEplConductivityEnum;
+	      else if (strcmp(name,"HydrologydcIsefficientlayer")==0) return HydrologydcIsefficientlayerEnum;
 	      else if (strcmp(name,"HydrologydcSedimentlimitFlag")==0) return HydrologydcSedimentlimitFlagEnum;
 	      else if (strcmp(name,"HydrologydcSedimentlimit")==0) return HydrologydcSedimentlimitEnum;
 	      else if (strcmp(name,"HydrologydcTransferFlag")==0) return HydrologydcTransferFlagEnum;
@@ -258,11 +259,11 @@
 	      else if (strcmp(name,"MasstransportMinThickness")==0) return MasstransportMinThicknessEnum;
 	      else if (strcmp(name,"MasstransportPenaltyFactor")==0) return MasstransportPenaltyFactorEnum;
 	      else if (strcmp(name,"MasstransportSpcthickness")==0) return MasstransportSpcthicknessEnum;
-	      else if (strcmp(name,"MasstransportCalvingrate")==0) return MasstransportCalvingrateEnum;
          else stage=3;
    }
    if(stage==3){
-	      if (strcmp(name,"MasstransportStabilization")==0) return MasstransportStabilizationEnum;
+	      if (strcmp(name,"MasstransportCalvingrate")==0) return MasstransportCalvingrateEnum;
+	      else if (strcmp(name,"MasstransportStabilization")==0) return MasstransportStabilizationEnum;
 	      else if (strcmp(name,"MasstransportVertexPairing")==0) return MasstransportVertexPairingEnum;
 	      else if (strcmp(name,"MasstransportNumRequestedOutputs")==0) return MasstransportNumRequestedOutputsEnum;
 	      else if (strcmp(name,"MasstransportRequestedOutputs")==0) return MasstransportRequestedOutputsEnum;
@@ -381,11 +382,11 @@
 	      else if (strcmp(name,"BalancevelocityAnalysis")==0) return BalancevelocityAnalysisEnum;
 	      else if (strcmp(name,"BalancevelocitySolution")==0) return BalancevelocitySolutionEnum;
 	      else if (strcmp(name,"L2ProjectionEPLAnalysis")==0) return L2ProjectionEPLAnalysisEnum;
-	      else if (strcmp(name,"L2ProjectionBaseAnalysis")==0) return L2ProjectionBaseAnalysisEnum;
          else stage=4;
    }
    if(stage==4){
-	      if (strcmp(name,"BedSlopeSolution")==0) return BedSlopeSolutionEnum;
+	      if (strcmp(name,"L2ProjectionBaseAnalysis")==0) return L2ProjectionBaseAnalysisEnum;
+	      else if (strcmp(name,"BedSlopeSolution")==0) return BedSlopeSolutionEnum;
 	      else if (strcmp(name,"DamageEvolutionSolution")==0) return DamageEvolutionSolutionEnum;
 	      else if (strcmp(name,"DamageEvolutionAnalysis")==0) return DamageEvolutionAnalysisEnum;
 	      else if (strcmp(name,"StressbalanceAnalysis")==0) return StressbalanceAnalysisEnum;
@@ -504,11 +505,11 @@
 	      else if (strcmp(name,"Vertex")==0) return VertexEnum;
 	      else if (strcmp(name,"VertexPId")==0) return VertexPIdEnum;
 	      else if (strcmp(name,"VertexSId")==0) return VertexSIdEnum;
-	      else if (strcmp(name,"Air")==0) return AirEnum;
          else stage=5;
    }
    if(stage==5){
-	      if (strcmp(name,"Ice")==0) return IceEnum;
+	      if (strcmp(name,"Air")==0) return AirEnum;
+	      else if (strcmp(name,"Ice")==0) return IceEnum;
 	      else if (strcmp(name,"Melange")==0) return MelangeEnum;
 	      else if (strcmp(name,"Water")==0) return WaterEnum;
 	      else if (strcmp(name,"Closed")==0) return ClosedEnum;
@@ -627,11 +628,11 @@
 	      else if (strcmp(name,"TaylorHood")==0) return TaylorHoodEnum;
 	      else if (strcmp(name,"LATaylorHood")==0) return LATaylorHoodEnum;
 	      else if (strcmp(name,"XTaylorHood")==0) return XTaylorHoodEnum;
-	      else if (strcmp(name,"OneLayerP4z")==0) return OneLayerP4zEnum;
          else stage=6;
    }
    if(stage==6){
-	      if (strcmp(name,"CrouzeixRaviart")==0) return CrouzeixRaviartEnum;
+	      if (strcmp(name,"OneLayerP4z")==0) return OneLayerP4zEnum;
+	      else if (strcmp(name,"CrouzeixRaviart")==0) return CrouzeixRaviartEnum;
 	      else if (strcmp(name,"LACrouzeixRaviart")==0) return LACrouzeixRaviartEnum;
 	      else if (strcmp(name,"SaveResults")==0) return SaveResultsEnum;
 	      else if (strcmp(name,"BoolExternalResult")==0) return BoolExternalResultEnum;
@@ -750,11 +751,11 @@
 	      else if (strcmp(name,"SeaiceConcentration")==0) return SeaiceConcentrationEnum;
 	      else if (strcmp(name,"SeaiceMinConcentration")==0) return SeaiceMinConcentrationEnum;
 	      else if (strcmp(name,"SeaiceMinThickness")==0) return SeaiceMinThicknessEnum;
-	      else if (strcmp(name,"SeaiceMaxThickness")==0) return SeaiceMaxThicknessEnum;
          else stage=7;
    }
    if(stage==7){
-	      if (strcmp(name,"SeaiceSpcvx")==0) return SeaiceSpcvxEnum;
+	      if (strcmp(name,"SeaiceMaxThickness")==0) return SeaiceMaxThicknessEnum;
+	      else if (strcmp(name,"SeaiceSpcvx")==0) return SeaiceSpcvxEnum;
 	      else if (strcmp(name,"SeaiceSpcvy")==0) return SeaiceSpcvyEnum;
 	      else if (strcmp(name,"SeaiceCoriolisFactor")==0) return SeaiceCoriolisFactorEnum;
 	      else if (strcmp(name,"BasalforcingsRhoOcean")==0) return BasalforcingsRhoOceanEnum;
Index: ../trunk-jpl/src/c/classes/Loads/Friction.h
===================================================================
--- ../trunk-jpl/src/c/classes/Loads/Friction.h	(revision 18731)
+++ ../trunk-jpl/src/c/classes/Loads/Friction.h	(revision 18732)
@@ -32,6 +32,7 @@
 		void  GetAlpha2Viscous(IssmDouble* palpha2,Gauss* gauss);
 		void  GetAlpha2Weertman(IssmDouble* palpha2,Gauss* gauss);
 		void  GetAlpha2Hydro(IssmDouble* palpha2,Gauss* gauss);
+		void  GetAlpha2Temp(IssmDouble* palpha2,Gauss* gauss);
 		void  GetAlphaComplement(IssmDouble* alpha_complement,Gauss* gauss);
 };
 
Index: ../trunk-jpl/src/c/classes/Loads/Friction.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/Loads/Friction.cpp	(revision 18731)
+++ ../trunk-jpl/src/c/classes/Loads/Friction.cpp	(revision 18732)
@@ -47,9 +47,13 @@
 			break;
 		case 2:
 			GetAlpha2Weertman(palpha2,gauss);
-	  case 3:
+			break;
+		case 3:
 			GetAlpha2Hydro(palpha2,gauss);
 			break;
+		case 4:
+			GetAlpha2Temp(palpha2,gauss);
+			break;
 	  default:
 			_error_("not supported");
 	}
@@ -218,6 +222,33 @@
 	/*Assign output pointers:*/
 	*palpha2=alpha2;
 }/*}}}*/
+void Friction::GetAlpha2Temp(IssmDouble* palpha2, Gauss* gauss){/*{{{*/
+	/*Here, we want to parameterize the friction as a function of temperature
+	 *
+	 * alpha2 = alpha2_viscous * f(T)
+	 *
+	 * where f(T) = exp((T-Tpmp)/gamma)
+	 */
+
+	/*Intermediaries: */
+	IssmDouble  f,T,pressure,Tpmp,gamma;
+	IssmDouble  alpha2;
+
+	/*Get viscous part*/
+	this->GetAlpha2Viscous(&alpha2,gauss);
+
+	/*Get pressure melting point (Tpmp) for local pressure and get current temperature*/
+	element->GetInputValue(&T,gauss,TemperatureEnum);
+	element->GetInputValue(&pressure,gauss,PressureEnum);
+	Tpmp = element->TMeltingPoint(pressure);
+
+	/*Compute scaling parameter*/
+	element->parameters->FindParam(&gamma,FrictionGammaEnum);
+	alpha2 = alpha2*exp((T-Tpmp)/gamma);
+
+	/*Assign output pointers:*/
+	*palpha2=alpha2;
+}/*}}}*/
 void Friction::GetAlphaComplement(IssmDouble* palpha_complement, Gauss* gauss){/*{{{*/
 
 	/* FrictionGetAlpha2 computes alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p. 
Index: ../trunk-jpl/src/m/classes/initialization.m
===================================================================
--- ../trunk-jpl/src/m/classes/initialization.m	(revision 18731)
+++ ../trunk-jpl/src/m/classes/initialization.m	(revision 18732)
@@ -18,23 +18,23 @@
 		watercolumn   = NaN;
 	end
 	methods
-        function createxml(obj,fid) % {{{
-            fprintf(fid, '\n\n');
-            fprintf(fid, '%s\n', '<!-- initialization -->');
-            fprintf(fid,'%s\n%s\n%s\n','<frame key="1" label="Initial field values">','<section name="initialization" />');                    
-            
-			 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="vx" type="',class(obj.vx),'" default="',obj.vx,'">','     <section name="initialization" />','     <help> x component of velocity [m/yr] </help>','</parameter>');
-             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="vy" type="',class(obj.vy),'" default="',obj.vy,'">','     <section name="initialization" />','     <help> y component of velocity [m/yr] </help>','</parameter>');
-             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="vz" type="',class(obj.vz),'" default="',obj.vz,'">','     <section name="initialization" />','     <help> z component of velocity [m/yr] </help>','</parameter>');
-             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="vel" type="',class(obj.vel),'" default="',obj.vel,'">','     <section name="initialization" />','     <help> velocity norm [m/yr] </help>','</parameter>');
-             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="pressure" type="',class(obj.pressure),'" default="',obj.pressure,'">','     <section name="initialization" />','     <help> pressure field [Pa] </help>','</parameter>');
-        	 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="temperature" type="',class(obj.temperature),'" default="',obj.temperature,'">','     <section name="initialization" />','     <help> fraction of water in the ice </help>','</parameter>');
-             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="waterfraction" type="',class(obj.waterfraction),'" default="',obj.waterfraction,'">','     <section name="initialization" />','     <help> ice thickness [m] </help>','</parameter>');
-             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="sediment_head" type="',class(obj.sediment_head),'" default="',obj.sediment_head,'">','     <section name="initialization" />','     <help> sediment water head of subglacial system [m] </help>','</parameter>');
-             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="epl_head" type="',class(obj.epl_head),'" default="',obj.epl_head,'">','     <section name="initialization" />','     <help> epl water head of subglacial system [m] </help>','</parameter>');
-             fprintf(fid,'%s%s%s%s%s\n%s\n%s\n','<parameter key ="watercolumn" type="',class(obj.watercolumn),'" default="',obj.watercolumn,'">','     <section name="initialization" />','     <help> thickness of subglacial water [m] </help>','</parameter>');
-            fprintf(fid,'%s\n%s\n','</frame>');
-        end % }}}
+		function createxml(obj,fid) % {{{
+			fprintf(fid, '\n\n');
+			fprintf(fid, '%s\n', '<!-- initialization -->');
+			fprintf(fid,'%s\n%s\n%s\n','<frame key="1" label="Initial field values">','<section name="initialization" />');                    
+
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="vx" type="',class(obj.vx),'" default="',obj.vx,'">','     <section name="initialization" />','     <help> x component of velocity [m/yr] </help>','</parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="vy" type="',class(obj.vy),'" default="',obj.vy,'">','     <section name="initialization" />','     <help> y component of velocity [m/yr] </help>','</parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="vz" type="',class(obj.vz),'" default="',obj.vz,'">','     <section name="initialization" />','     <help> z component of velocity [m/yr] </help>','</parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="vel" type="',class(obj.vel),'" default="',obj.vel,'">','     <section name="initialization" />','     <help> velocity norm [m/yr] </help>','</parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="pressure" type="',class(obj.pressure),'" default="',obj.pressure,'">','     <section name="initialization" />','     <help> pressure field [Pa] </help>','</parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="temperature" type="',class(obj.temperature),'" default="',obj.temperature,'">','     <section name="initialization" />','     <help> fraction of water in the ice </help>','</parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="waterfraction" type="',class(obj.waterfraction),'" default="',obj.waterfraction,'">','     <section name="initialization" />','     <help> ice thickness [m] </help>','</parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="sediment_head" type="',class(obj.sediment_head),'" default="',obj.sediment_head,'">','     <section name="initialization" />','     <help> sediment water head of subglacial system [m] </help>','</parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','<parameter key ="epl_head" type="',class(obj.epl_head),'" default="',obj.epl_head,'">','     <section name="initialization" />','     <help> epl water head of subglacial system [m] </help>','</parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n','<parameter key ="watercolumn" type="',class(obj.watercolumn),'" default="',obj.watercolumn,'">','     <section name="initialization" />','     <help> thickness of subglacial water [m] </help>','</parameter>');
+			fprintf(fid,'%s\n%s\n','</frame>');
+		end % }}}
 		function obj = initialization(varargin) % {{{
 			switch nargin
 				case 0
@@ -72,6 +72,7 @@
 					md = checkfield(md,'fieldname','initialization.vz','NaN',1,'size',[md.mesh.numberofvertices 1]);
 				end
 				md = checkfield(md,'fieldname','initialization.pressure','NaN',1,'size',[md.mesh.numberofvertices 1]);
+				md = checkfield(md,'fieldname','initialization.temperature','NaN',1,'size',[md.mesh.numberofvertices 1]);
 			end
 			if (ismember(EnthalpyAnalysisEnum(),analyses) & md.thermal.isenthalpy)
 				md = checkfield(md,'fieldname','initialization.waterfraction','>=',0,'size',[md.mesh.numberofvertices 1]);
Index: ../trunk-jpl/src/m/classes/groundingline.m
===================================================================
--- ../trunk-jpl/src/m/classes/groundingline.m	(revision 18731)
+++ ../trunk-jpl/src/m/classes/groundingline.m	(revision 18732)
@@ -8,21 +8,21 @@
 		migration    = '';
 	end
 	methods
-         function createxml(obj,fid) % {{{
-            fprintf(fid, '\n\n');
-            fprintf(fid, '%s\n', '<!-- groundingline -->');
-            
-            % Convergence criteria          
-            fprintf(fid,'%s\n%s\n%s\n','<frame key="1" label="Grounding line migration parameters">','<section name="groundingline" />');  
-			
-            % migration (SoftMigration, AggressiveMigration, or None)drop-down
-            fprintf(fid,'%s\n%s\n%s\n%s\n','<parameter key ="migration" type="alternative" optional="false">','     <section name="groundingline" />','     <help> type of grounding line migration: "SoftMigration","AggressiveMigration" or "None" </help>');
-            fprintf(fid,'%s\n','       <option value="SoftMigration" type="string" default="true"> </option>');
-            fprintf(fid,'%s\n','       <option value="AggressiveMigration" type="string" default="false"> </option>');
-            fprintf(fid, '%s\n%s\n','       <option value="None" type="string" default="false"></option>','</parameter>');
+		function createxml(obj,fid) % {{{
+			fprintf(fid, '\n\n');
+			fprintf(fid, '%s\n', '<!-- groundingline -->');
 
-            fprintf(fid,'%s\n%s\n','</frame>');
-        end % }}}
+			% Convergence criteria          
+			fprintf(fid,'%s\n%s\n%s\n','<frame key="1" label="Grounding line migration parameters">','<section name="groundingline" />');  
+
+			% migration (SoftMigration, AggressiveMigration, or None)drop-down
+			fprintf(fid,'%s\n%s\n%s\n%s\n','<parameter key ="migration" type="alternative" optional="false">','     <section name="groundingline" />','     <help> type of grounding line migration: "SoftMigration","AggressiveMigration" or "None" </help>');
+			fprintf(fid,'%s\n','       <option value="SoftMigration" type="string" default="true"> </option>');
+			fprintf(fid,'%s\n','       <option value="AggressiveMigration" type="string" default="false"> </option>');
+			fprintf(fid, '%s\n%s\n','       <option value="None" type="string" default="false"></option>','</parameter>');
+
+			fprintf(fid,'%s\n%s\n','</frame>');
+		end % }}}
 		function obj = groundingline(varargin) % {{{
 			switch nargin
 				case 0
Index: ../trunk-jpl/src/m/classes/initialization.py
===================================================================
--- ../trunk-jpl/src/m/classes/initialization.py	(revision 18731)
+++ ../trunk-jpl/src/m/classes/initialization.py	(revision 18732)
@@ -68,6 +68,7 @@
 		if ThermalAnalysisEnum() in analyses:
 			md = checkfield(md,'fieldname','initialization.vx','NaN',1,'size',[md.mesh.numberofvertices])
 			md = checkfield(md,'fieldname','initialization.vy','NaN',1,'size',[md.mesh.numberofvertices])
+			md = checkfield(md,'fieldname','initialization.temperature','NaN',1,'size',[md.mesh.numberofvertices])
 			if md.mesh.dimension()==3:
 				md = checkfield(md,'fieldname','initialization.vz','NaN',1,'size',[md.mesh.numberofvertices])
 			md = checkfield(md,'fieldname','initialization.pressure','NaN',1,'size',[md.mesh.numberofvertices])
Index: ../trunk-jpl/src/m/classes/frictiontemp.m
===================================================================
--- ../trunk-jpl/src/m/classes/frictiontemp.m	(revision 0)
+++ ../trunk-jpl/src/m/classes/frictiontemp.m	(revision 18732)
@@ -0,0 +1,60 @@
+%FRICTIONTEMP class definition
+%
+%   Usage:
+%      frictiontemp=frictiontemp();
+
+classdef frictiontemp
+	properties (SetAccess=public) 
+		gamma       = 0;
+		coefficient = NaN;
+		p           = NaN;
+		q           = NaN;
+	end
+	methods
+		function obj = frictiontemp(varargin) % {{{
+			switch nargin
+				case 0
+					obj=setdefaultparameters(obj);
+				case 1
+					obj=structtoobj(frictiontemp(),varargin{1});
+				otherwise
+					error('constructor not supported');
+			end
+		end % }}}
+		function obj = setdefaultparameters(obj) % {{{
+
+			%By default gamma = 1;
+			obj.gamma = 1;
+
+
+		end % }}}
+		function md = checkconsistency(obj,md,solution,analyses) % {{{
+
+			%Early return
+			if ~ismember(StressbalanceAnalysisEnum(),analyses) & ~ismember(ThermalAnalysisEnum(),analyses), return; end
+
+			md = checkfield(md,'fieldname','friction.coefficient','forcing',1,'NaN',1);
+			md = checkfield(md,'fieldname','friction.q','NaN',1,'size',[md.mesh.numberofelements 1]);
+			md = checkfield(md,'fieldname','friction.p','NaN',1,'size',[md.mesh.numberofelements 1]);
+			md = checkfield(md,'fieldname','friction.gamma','NaN',1,'numel',1,'>',0.);
+
+			%Check that temperature is provided
+			md = checkfield(md,'fieldname','initialization.temperature','NaN',1,'size',[md.mesh.numberofvertices 1]);
+		end % }}}
+		function disp(obj) % {{{
+			disp(sprintf('Basal shear stress parameters: tau_b = coefficient^2 * Neff ^r * |u_b|^(s-1) * u_b * 1/f(T)\n(effective stress Neff=rho_ice*g*thickness+rho_water*g*bed, r=q/p and s=1/p)'));
+			fielddisplay(obj,'gamma','submelt sliding parameter f(T) = exp((T-Tpmp)/gamma)');
+			fielddisplay(obj,'coefficient','frictiontemp coefficient [SI]');
+			fielddisplay(obj,'p','p exponent');
+			fielddisplay(obj,'q','q exponent');
+		end % }}}
+		function marshall(obj,md,fid) % {{{
+
+			WriteData(fid,'enum',FrictionLawEnum,'data',4,'format','Integer');
+			WriteData(fid,'class','friction','object',obj,'fieldname','gamma','format','Double');
+			WriteData(fid,'class','friction','object',obj,'fieldname','coefficient','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1);
+			WriteData(fid,'class','friction','object',obj,'fieldname','p','format','DoubleMat','mattype',2);
+			WriteData(fid,'class','friction','object',obj,'fieldname','q','format','DoubleMat','mattype',2);
+		end % }}}
+	end
+end
Index: ../trunk-jpl/src/m/enum/FrictionGammaEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/FrictionGammaEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/FrictionGammaEnum.m	(revision 18732)
@@ -0,0 +1,11 @@
+function macro=FrictionGammaEnum()
+%FRICTIONGAMMAENUM - Enum of FrictionGamma
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
+%            Please read src/c/shared/Enum/README for more information
+%
+%   Usage:
+%      macro=FrictionGammaEnum()
+
+macro=StringToEnum('FrictionGamma');
Index: ../trunk-jpl/src/m/enum/EnumDefinitions.py
===================================================================
--- ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18731)
+++ ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18732)
@@ -94,6 +94,7 @@
 def FrictionMEnum(): return StringToEnum("FrictionM")[0]
 def FrictionCEnum(): return StringToEnum("FrictionC")[0]
 def FrictionLawEnum(): return StringToEnum("FrictionLaw")[0]
+def FrictionGammaEnum(): return StringToEnum("FrictionGamma")[0]
 def GeometryHydrostaticRatioEnum(): return StringToEnum("GeometryHydrostaticRatio")[0]
 def HydrologyModelEnum(): return StringToEnum("HydrologyModel")[0]
 def HydrologyshreveEnum(): return StringToEnum("Hydrologyshreve")[0]
