Index: ../trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.cpp	(revision 18564)
+++ ../trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.cpp	(revision 18565)
@@ -44,8 +44,66 @@
 	return Ke;
 }/*}}}*/
 ElementVector* AdjointBalancethickness2Analysis::CreatePVector(Element* element){/*{{{*/
-	_error_("Not implemented yet");
 
+	/*Intermediaries */
+	int         num_responses,i;
+	IssmDouble  vx,vy,vel,Jdet;
+	IssmDouble  surface,surfaceobs,weight;
+	int        *responses = NULL;
+	IssmDouble *xyz_list  = NULL;
+
+	/*Fetch number of nodes and dof for this finite element*/
+	int numnodes = element->GetNumberOfNodes();
+
+	/*Initialize Element vector and vectors*/
+	ElementVector* pe     = element->NewElementVector(SSAApproximationEnum);
+	IssmDouble*    basis  = xNew<IssmDouble>(numnodes);
+	IssmDouble*    dbasis = xNew<IssmDouble>(2*numnodes);
+
+	/*Retrieve all inputs and parameters*/
+	element->GetVerticesCoordinates(&xyz_list);
+	element->FindParam(&num_responses,InversionNumCostFunctionsEnum);
+	element->FindParam(&responses,NULL,InversionCostFunctionsEnum);
+	Input* surface_input      = element->GetInput(SurfaceEnum);                          _assert_(surface_input);
+	Input* surfaceobs_input   = element->GetInput(InversionSurfaceObsEnum);              _assert_(surfaceobs_input);
+	Input* weights_input      = element->GetInput(InversionCostFunctionsCoefficientsEnum); _assert_(weights_input);
+	Input* vx_input           = element->GetInput(VxEnum);                                 _assert_(vx_input);
+	Input* vy_input           = element->GetInput(VyEnum);                                 _assert_(vy_input);
+
+	/* Start  looping on the number of gaussian points: */
+	Gauss* gauss=element->NewGauss(2);
+	for(int ig=gauss->begin();ig<gauss->end();ig++){
+		gauss->GaussPoint(ig);
+
+		element->JacobianDeterminant(&Jdet,xyz_list,gauss);
+		element->NodalFunctions(basis,gauss);
+		element->NodalFunctionsDerivatives(dbasis,xyz_list,gauss);
+
+		surface_input->GetInputValue(&surface, gauss);
+		surfaceobs_input->GetInputValue(&surfaceobs, gauss);
+
+		/*Loop over all requested responses*/
+		for(int resp=0;resp<num_responses;resp++){
+			weights_input->GetInputValue(&weight,gauss,responses[resp]);
+
+			switch(responses[resp]){
+				case SurfaceAbsMisfitEnum:
+					for(i=0;i<numnodes;i++) pe->values[i]+=(surfaceobs-surface)*weight*Jdet*gauss->weight*basis[i];
+					break;
+				default:
+					_error_("response " << EnumToStringx(responses[resp]) << " not supported yet");
+			}
+		}
+	}
+
+	/*Clean up and return*/
+	xDelete<int>(responses);
+	xDelete<IssmDouble>(xyz_list);
+	xDelete<IssmDouble>(basis);
+	xDelete<IssmDouble>(dbasis);
+	delete gauss;
+	return pe;
+
 }/*}}}*/
 void AdjointBalancethickness2Analysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/
 	_error_("not implemented yet");
@@ -70,7 +128,7 @@
 
 	/*Deal with first part (partial derivative a J with respect to k)*/
 	for(resp=0;resp<num_responses;resp++) switch(responses[resp]){
-		case Balancethickness2MisfitEnum:
+		case SurfaceAbsMisfitEnum:
 			/*Nothing, \partial J/\partial k = 0*/
 			break;
 		default: _error_("response " << EnumToStringx(responses[resp]) << " not supported yet");
@@ -78,6 +136,7 @@
 
 	/*Deal with second term*/
 	switch(control_type){
+		case BalancethicknessOmegaEnum:  GradientJOmega(element,gradient,control_index); break;
 		default: _error_("control type not supported yet: " << EnumToStringx(control_type));
 	}
 
@@ -85,10 +144,10 @@
 	xDelete<int>(responses);
 
 }/*}}}*/
-void AdjointBalancethickness2Analysis::GradientJAdot(Element* element,Vector<IssmDouble>* gradient,int control_index){/*{{{*/
+void AdjointBalancethickness2Analysis::GradientJOmega(Element* element,Vector<IssmDouble>* gradient,int control_index){/*{{{*/
 
 	/*Intermediaries*/
-	IssmDouble lambda,Jdet; 
+	IssmDouble dlambda[2],ds[2],D0,Jdet; 
 	IssmDouble *xyz_list= NULL;
 
 	/*Fetch number of vertices for this finite element*/
@@ -102,7 +161,9 @@
 	/*Retrieve all inputs we will be needing: */
 	element->GetVerticesCoordinates(&xyz_list);
 	element->GradientIndexing(&vertexpidlist[0],control_index);
-	Input* adjoint_input = element->GetInput(AdjointEnum); _assert_(adjoint_input);
+	Input* adjoint_input = element->GetInput(AdjointEnum);            _assert_(adjoint_input);
+	Input* s_input       = element->GetInput(SurfaceEnum);            _assert_(s_input);
+	Input* D0_input      = element->GetInput(BalancethicknessD0Enum); _assert_(D0_input);
 
 	Gauss* gauss=element->NewGauss(2);
 	for(int ig=gauss->begin();ig<gauss->end();ig++){
@@ -110,11 +171,14 @@
 
 		element->JacobianDeterminant(&Jdet,xyz_list,gauss);
 		element->NodalFunctionsP1(basis,gauss);
-		adjoint_input->GetInputValue(&lambda,gauss);
 
+		D0_input->GetInputValue(&D0,gauss);
+		adjoint_input->GetInputDerivativeValue(&dlambda[0],xyz_list,gauss);
+		s_input->GetInputDerivativeValue(&ds[0],xyz_list,gauss);
+
 		/*Build gradient vector (actually -dJ/da): */
 		for(int i=0;i<numvertices;i++){
-			ge[i]+= - Jdet*gauss->weight*basis[i]*lambda;
+			ge[i]+= Jdet*gauss->weight*basis[i]*(ds[0]*dlambda[0] + ds[1]*dlambda[1]);
 			_assert_(!xIsNan<IssmDouble>(ge[i]));
 		}
 	}
Index: ../trunk-jpl/src/c/analyses/Balancethickness2Analysis.h
===================================================================
--- ../trunk-jpl/src/c/analyses/Balancethickness2Analysis.h	(revision 18564)
+++ ../trunk-jpl/src/c/analyses/Balancethickness2Analysis.h	(revision 18565)
@@ -31,6 +31,6 @@
 		void UpdateConstraints(FemModel* femmodel);
 
 		/*Specifics*/
-		void CreateDiffusionCoefficient(Element* element);
+		void CreateD0(Element* element);
 };
 #endif
Index: ../trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.h
===================================================================
--- ../trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.h	(revision 18564)
+++ ../trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.h	(revision 18565)
@@ -27,7 +27,7 @@
 		ElementVector* CreatePVector(Element* element);
 		void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element);
 		void GradientJ(Vector<IssmDouble>* gradient,Element* element,int control_type,int control_index);
-		void GradientJAdot(Element* element,Vector<IssmDouble>* gradient,int control_index);
+		void GradientJOmega(Element* element,Vector<IssmDouble>* gradient,int control_index);
 		void InputUpdateFromSolution(IssmDouble* solution,Element* element);
 		void UpdateConstraints(FemModel* femmodel);
 };
Index: ../trunk-jpl/src/c/analyses/Balancethickness2Analysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/Balancethickness2Analysis.cpp	(revision 18564)
+++ ../trunk-jpl/src/c/analyses/Balancethickness2Analysis.cpp	(revision 18565)
@@ -15,25 +15,27 @@
 	/*Finite element type*/
 	int finiteelement = P1Enum;
 
+	/*Load variables in element*/
+	iomodel->FetchDataToInput(elements,ThicknessEnum);
+	iomodel->FetchDataToInput(elements,SurfaceEnum);
+	iomodel->FetchDataToInput(elements,BaseEnum);
+	iomodel->FetchDataToInput(elements,MaskIceLevelsetEnum);
+	iomodel->FetchDataToInput(elements,BasalforcingsGroundediceMeltingRateEnum);
+	iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
+	iomodel->FetchDataToInput(elements,BalancethicknessThickeningRateEnum);
+	iomodel->FetchDataToInput(elements,BalancethicknessOmegaEnum);
+
 	/*Update elements: */
 	int counter=0;
 	for(int i=0;i<iomodel->numberofelements;i++){
 		if(iomodel->my_elements[i]){
 			Element* element=(Element*)elements->GetObjectByOffset(counter);
 			element->Update(i,iomodel,analysis_counter,analysis_type,finiteelement);
+
 			counter++;
 		}
 	}
 
-	iomodel->FetchDataToInput(elements,ThicknessEnum);
-	iomodel->FetchDataToInput(elements,SurfaceEnum);
-	iomodel->FetchDataToInput(elements,BaseEnum);
-	iomodel->FetchDataToInput(elements,MaskIceLevelsetEnum);
-	iomodel->FetchDataToInput(elements,FrictionCoefficientEnum);
-	iomodel->FetchDataToInput(elements,BasalforcingsGroundediceMeltingRateEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
-	iomodel->FetchDataToInput(elements,BalancethicknessThickeningRateEnum);
-	iomodel->FetchDataToInput(elements,BalancethicknessCmuEnum);
 }/*}}}*/
 void Balancethickness2Analysis::CreateNodes(Nodes* nodes,IoModel* iomodel){/*{{{*/
 
@@ -65,7 +67,7 @@
 ElementMatrix* Balancethickness2Analysis::CreateKMatrix(Element* element){/*{{{*/
 
 	/*Intermediaries */
-	IssmDouble  Jdet,D;
+	IssmDouble  Jdet,D0,omega;
 	IssmDouble* xyz_list = NULL;
 
 	/*Fetch number of nodes and dof for this finite element*/
@@ -75,12 +77,14 @@
 	ElementMatrix* Ke     = element->NewElementMatrix();
 	IssmDouble*    dbasis = xNew<IssmDouble>(2*numnodes);
 
-	/*Create input D*/
-	this->CreateDiffusionCoefficient(element);
-
 	/*Retrieve all inputs and parameters*/
 	element->GetVerticesCoordinates(&xyz_list);
-	Input* D_input = element->GetInput(BalancethicknessDiffusionCoefficientEnum); _assert_(D_input);
+	Input* omega_input = element->GetInput(BalancethicknessOmegaEnum); _assert_(omega_input);
+	Input* D0_input    = element->GetInput(BalancethicknessD0Enum);
+	if(!D0_input){
+		this->CreateD0(element);
+		D0_input = element->GetInput(BalancethicknessD0Enum); _assert_(D0_input);
+	}
 
 	/* Start  looping on the number of gaussian points: */
 	Gauss* gauss=element->NewGauss(2);
@@ -88,11 +92,12 @@
 		gauss->GaussPoint(ig);
 		element->NodalFunctionsDerivatives(dbasis,xyz_list,gauss);
 		element->JacobianDeterminant(&Jdet,xyz_list,gauss);
-		D_input->GetInputValue(&D,gauss);
+		D0_input->GetInputValue(&D0,gauss);
+		omega_input->GetInputValue(&omega,gauss);
 
 		for(int i=0;i<numnodes;i++){
 			for(int j=0;j<numnodes;j++){
-				Ke->values[i*numnodes+j] += D*gauss->weight*Jdet*(dbasis[0*numnodes+i]*dbasis[0*numnodes+j] + dbasis[1*numnodes+i]*dbasis[1*numnodes+j]);
+				Ke->values[i*numnodes+j] += D0*omega*gauss->weight*Jdet*(dbasis[0*numnodes+i]*dbasis[0*numnodes+j] + dbasis[1*numnodes+i]*dbasis[1*numnodes+j]);
 			}
 		}
 	}
@@ -106,7 +111,7 @@
 ElementVector* Balancethickness2Analysis::CreatePVector(Element* element){/*{{{*/
 
 	/*Intermediaries */
-	IssmDouble  dhdt,mb,ms,D,db[2],Jdet;
+	IssmDouble  dhdt,mb,ms,Jdet;
 	IssmDouble* xyz_list = NULL;
 
 	/*Fetch number of nodes and dof for this finite element*/
@@ -115,15 +120,12 @@
 	/*Initialize Element vector and other vectors*/
 	ElementVector* pe    = element->NewElementVector();
 	IssmDouble*    basis = xNew<IssmDouble>(numnodes);
-	IssmDouble*   dbasis = xNew<IssmDouble>(2*numnodes);
 
 	/*Retrieve all inputs and parameters*/
 	element->GetVerticesCoordinates(&xyz_list);
 	Input* ms_input   = element->GetInput(SurfaceforcingsMassBalanceEnum);                _assert_(ms_input);
 	Input* mb_input   = element->GetInput(BasalforcingsGroundediceMeltingRateEnum);       _assert_(mb_input);
 	Input* dhdt_input = element->GetInput(BalancethicknessThickeningRateEnum);            _assert_(dhdt_input);
-	Input* D_input   = element->GetInput(BalancethicknessDiffusionCoefficientEnum);       _assert_(D_input);
-	Input* bed_input  = element->GetInput(BaseEnum);                                      _assert_(bed_input);
 
 	/* Start  looping on the number of gaussian points: */
 	Gauss* gauss=element->NewGauss(2);
@@ -132,19 +134,13 @@
 
 		element->JacobianDeterminant(&Jdet,xyz_list,gauss);
 		element->NodalFunctions(basis,gauss);
-		element->NodalFunctionsDerivatives(dbasis,xyz_list,gauss);
 
 		ms_input->GetInputValue(&ms,gauss);
 		mb_input->GetInputValue(&mb,gauss);
 		dhdt_input->GetInputValue(&dhdt,gauss);
-		D_input->GetInputValue(&D,gauss);
-		bed_input->GetInputDerivativeValue(&db[0],xyz_list,gauss);
-		//db[0]=0.;
-		//db[1]=0.;
 
 		for(int i=0;i<numnodes;i++) pe->values[i]+=Jdet*gauss->weight*(
 					(ms-mb-dhdt)*basis[i]
-					//-D*db[0]*dbasis[0*numnodes+i] - D*db[1]*dbasis[1*numnodes+i]
 					);
 	}
 
@@ -219,7 +215,7 @@
 }/*}}}*/
 
 /*Specifics*/
-void Balancethickness2Analysis::CreateDiffusionCoefficient(Element* element){/*{{{*/
+void Balancethickness2Analysis::CreateD0(Element* element){/*{{{*/
 
 	/*Intermediaries */
 	IssmDouble       Gamma,h,mu0,ds[2],Cmu,B,k,s,b;
@@ -230,16 +226,12 @@
 
 	/*Fetch number of vertices and allocate output*/
 	int  numnodes = element->GetNumberOfNodes();
-	IssmDouble* D      = xNew<IssmDouble>(numnodes);
-	IssmDouble* Dgradb = xNew<IssmDouble>(numnodes);
+	IssmDouble* D0     = xNew<IssmDouble>(numnodes);
 
 	/*retrieve what we need: */
 	element->GetVerticesCoordinates(&xyz_list);
-	Input* bed_input        = element->GetInput(BaseEnum);               _assert_(bed_input);
 	Input* surface_input    = element->GetInput(SurfaceEnum);            _assert_(surface_input);
 	Input* B_input          = element->GetInput(MaterialsRheologyBEnum); _assert_(B_input);
-	Input* k_input          = element->GetInput(FrictionCoefficientEnum);_assert_(k_input);
-	Input* Cmu_input        = element->GetInput(BalancethicknessCmuEnum);_assert_(Cmu_input);
 	IssmDouble rhog = element->GetMaterialParameter(MaterialsRhoIceEnum)*element->GetMaterialParameter(ConstantsGEnum);
 
 	/*Calculate damage evolution source term: */
@@ -248,25 +240,18 @@
 		gauss->GaussNode(element->GetElementType(),i);
 		
 		B_input->GetInputValue(&B,gauss);
-		k_input->GetInputValue(&k,gauss);
-		//thickness_input->GetInputValue(&h,gauss);
 		surface_input->GetInputDerivativeValue(&ds[0],xyz_list,gauss);
-		surface_input->GetInputValue(&s,gauss);
-		bed_input->GetInputValue(&b,gauss);
-		h = s-b;
 
 		mu0   = pow(2.,(1-3*n)/(2.*n)) * B;
 		Gamma = pow(rhog,n) * pow(Hstar,2*(n+1)) * pow(Hstar/Lstar,2*(n+1)) * 1./pow(mu0,n);
-		//Cmu   = pow(mu0,n)/Hstar/(k*k);
-		Cmu_input->GetInputValue(&Cmu,gauss);
 
-		D[i] = Gamma*pow(ds[0]*ds[0]+ds[1]*ds[1],(n-1)/2)*pow(h,n+1)*(1./(n+2.)*h + Cmu);
+		D0[i] = Gamma*pow(ds[0]*ds[0]+ds[1]*ds[1],(n-1)/2)/(n+2);
 	}
 
 	/*Add input*/
-	element->AddInput(BalancethicknessDiffusionCoefficientEnum,D,element->GetElementType());
+	element->AddInput(BalancethicknessD0Enum,D0,element->GetElementType());
 	
 	/*Clean up and return*/
-	xDelete<IssmDouble>(D);
+	xDelete<IssmDouble>(D0);
 	delete gauss;
 }/*}}}*/
Index: ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18564)
+++ ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18565)
@@ -164,6 +164,7 @@
 	InversionNumCostFunctionsEnum,
 	InversionStepThresholdEnum,
 	InversionThicknessObsEnum,
+	InversionSurfaceObsEnum,
 	InversionVxObsEnum,
 	InversionVyObsEnum,
 	InversionVzObsEnum,
@@ -306,6 +307,8 @@
 	Balancethickness2MisfitEnum,
 	BalancethicknessDiffusionCoefficientEnum,
 	BalancethicknessCmuEnum,
+	BalancethicknessOmegaEnum,
+	BalancethicknessD0Enum,
 	/*}}}*/
 	/*Surfaceforcings{{{*/
 	SurfaceforcingsEnum,
@@ -526,6 +529,7 @@
 	TemperatureEnum,
 	TemperaturePicardEnum,
 	ThicknessAbsMisfitEnum,
+	SurfaceAbsMisfitEnum,
 	VelEnum,
 	VelocityEnum,
 	VxAverageEnum,
Index: ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18564)
+++ ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18565)
@@ -172,6 +172,7 @@
 		case InversionNumCostFunctionsEnum : return "InversionNumCostFunctions";
 		case InversionStepThresholdEnum : return "InversionStepThreshold";
 		case InversionThicknessObsEnum : return "InversionThicknessObs";
+		case InversionSurfaceObsEnum : return "InversionSurfaceObs";
 		case InversionVxObsEnum : return "InversionVxObs";
 		case InversionVyObsEnum : return "InversionVyObs";
 		case InversionVzObsEnum : return "InversionVzObs";
@@ -314,6 +315,8 @@
 		case Balancethickness2MisfitEnum : return "Balancethickness2Misfit";
 		case BalancethicknessDiffusionCoefficientEnum : return "BalancethicknessDiffusionCoefficient";
 		case BalancethicknessCmuEnum : return "BalancethicknessCmu";
+		case BalancethicknessOmegaEnum : return "BalancethicknessOmega";
+		case BalancethicknessD0Enum : return "BalancethicknessD0";
 		case SurfaceforcingsEnum : return "Surfaceforcings";
 		case SMBEnum : return "SMB";
 		case SurfaceforcingsMassBalanceEnum : return "SurfaceforcingsMassBalance";
@@ -517,6 +520,7 @@
 		case TemperatureEnum : return "Temperature";
 		case TemperaturePicardEnum : return "TemperaturePicard";
 		case ThicknessAbsMisfitEnum : return "ThicknessAbsMisfit";
+		case SurfaceAbsMisfitEnum : return "SurfaceAbsMisfit";
 		case VelEnum : return "Vel";
 		case VelocityEnum : return "Velocity";
 		case VxAverageEnum : return "VxAverage";
Index: ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18564)
+++ ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18565)
@@ -175,6 +175,7 @@
 	      else if (strcmp(name,"InversionNumCostFunctions")==0) return InversionNumCostFunctionsEnum;
 	      else if (strcmp(name,"InversionStepThreshold")==0) return InversionStepThresholdEnum;
 	      else if (strcmp(name,"InversionThicknessObs")==0) return InversionThicknessObsEnum;
+	      else if (strcmp(name,"InversionSurfaceObs")==0) return InversionSurfaceObsEnum;
 	      else if (strcmp(name,"InversionVxObs")==0) return InversionVxObsEnum;
 	      else if (strcmp(name,"InversionVyObs")==0) return InversionVyObsEnum;
 	      else if (strcmp(name,"InversionVzObs")==0) return InversionVzObsEnum;
@@ -258,11 +259,11 @@
 	      else if (strcmp(name,"MasstransportRequestedOutputs")==0) return MasstransportRequestedOutputsEnum;
 	      else if (strcmp(name,"QmuIsdakota")==0) return QmuIsdakotaEnum;
 	      else if (strcmp(name,"MassFluxSegments")==0) return MassFluxSegmentsEnum;
-	      else if (strcmp(name,"MassFluxSegmentsPresent")==0) return MassFluxSegmentsPresentEnum;
          else stage=3;
    }
    if(stage==3){
-	      if (strcmp(name,"QmuMassFluxSegmentsPresent")==0) return QmuMassFluxSegmentsPresentEnum;
+	      if (strcmp(name,"MassFluxSegmentsPresent")==0) return MassFluxSegmentsPresentEnum;
+	      else if (strcmp(name,"QmuMassFluxSegmentsPresent")==0) return QmuMassFluxSegmentsPresentEnum;
 	      else if (strcmp(name,"QmuNumberofpartitions")==0) return QmuNumberofpartitionsEnum;
 	      else if (strcmp(name,"QmuNumberofresponses")==0) return QmuNumberofresponsesEnum;
 	      else if (strcmp(name,"QmuPartition")==0) return QmuPartitionEnum;
@@ -320,6 +321,8 @@
 	      else if (strcmp(name,"Balancethickness2Misfit")==0) return Balancethickness2MisfitEnum;
 	      else if (strcmp(name,"BalancethicknessDiffusionCoefficient")==0) return BalancethicknessDiffusionCoefficientEnum;
 	      else if (strcmp(name,"BalancethicknessCmu")==0) return BalancethicknessCmuEnum;
+	      else if (strcmp(name,"BalancethicknessOmega")==0) return BalancethicknessOmegaEnum;
+	      else if (strcmp(name,"BalancethicknessD0")==0) return BalancethicknessD0Enum;
 	      else if (strcmp(name,"Surfaceforcings")==0) return SurfaceforcingsEnum;
 	      else if (strcmp(name,"SMB")==0) return SMBEnum;
 	      else if (strcmp(name,"SurfaceforcingsMassBalance")==0) return SurfaceforcingsMassBalanceEnum;
@@ -379,13 +382,13 @@
 	      else if (strcmp(name,"FlaimSolution")==0) return FlaimSolutionEnum;
 	      else if (strcmp(name,"HydrologyShreveAnalysis")==0) return HydrologyShreveAnalysisEnum;
 	      else if (strcmp(name,"HydrologyDCInefficientAnalysis")==0) return HydrologyDCInefficientAnalysisEnum;
-	      else if (strcmp(name,"HydrologyDCEfficientAnalysis")==0) return HydrologyDCEfficientAnalysisEnum;
-	      else if (strcmp(name,"HydrologySolution")==0) return HydrologySolutionEnum;
-	      else if (strcmp(name,"MeltingAnalysis")==0) return MeltingAnalysisEnum;
          else stage=4;
    }
    if(stage==4){
-	      if (strcmp(name,"MasstransportAnalysis")==0) return MasstransportAnalysisEnum;
+	      if (strcmp(name,"HydrologyDCEfficientAnalysis")==0) return HydrologyDCEfficientAnalysisEnum;
+	      else if (strcmp(name,"HydrologySolution")==0) return HydrologySolutionEnum;
+	      else if (strcmp(name,"MeltingAnalysis")==0) return MeltingAnalysisEnum;
+	      else if (strcmp(name,"MasstransportAnalysis")==0) return MasstransportAnalysisEnum;
 	      else if (strcmp(name,"MasstransportSolution")==0) return MasstransportSolutionEnum;
 	      else if (strcmp(name,"FreeSurfaceBaseAnalysis")==0) return FreeSurfaceBaseAnalysisEnum;
 	      else if (strcmp(name,"FreeSurfaceTopAnalysis")==0) return FreeSurfaceTopAnalysisEnum;
@@ -502,13 +505,13 @@
 	      else if (strcmp(name,"BedSlopeX")==0) return BedSlopeXEnum;
 	      else if (strcmp(name,"BedSlopeY")==0) return BedSlopeYEnum;
 	      else if (strcmp(name,"Boundary")==0) return BoundaryEnum;
-	      else if (strcmp(name,"Converged")==0) return ConvergedEnum;
-	      else if (strcmp(name,"Fill")==0) return FillEnum;
-	      else if (strcmp(name,"FractionIncrement")==0) return FractionIncrementEnum;
          else stage=5;
    }
    if(stage==5){
-	      if (strcmp(name,"Friction")==0) return FrictionEnum;
+	      if (strcmp(name,"Converged")==0) return ConvergedEnum;
+	      else if (strcmp(name,"Fill")==0) return FillEnum;
+	      else if (strcmp(name,"FractionIncrement")==0) return FractionIncrementEnum;
+	      else if (strcmp(name,"Friction")==0) return FrictionEnum;
 	      else if (strcmp(name,"Internal")==0) return InternalEnum;
 	      else if (strcmp(name,"MassFlux")==0) return MassFluxEnum;
 	      else if (strcmp(name,"MeltingOffset")==0) return MeltingOffsetEnum;
@@ -529,6 +532,7 @@
 	      else if (strcmp(name,"Temperature")==0) return TemperatureEnum;
 	      else if (strcmp(name,"TemperaturePicard")==0) return TemperaturePicardEnum;
 	      else if (strcmp(name,"ThicknessAbsMisfit")==0) return ThicknessAbsMisfitEnum;
+	      else if (strcmp(name,"SurfaceAbsMisfit")==0) return SurfaceAbsMisfitEnum;
 	      else if (strcmp(name,"Vel")==0) return VelEnum;
 	      else if (strcmp(name,"Velocity")==0) return VelocityEnum;
 	      else if (strcmp(name,"VxAverage")==0) return VxAverageEnum;
@@ -624,14 +628,14 @@
 	      else if (strcmp(name,"OutputdefinitionList")==0) return OutputdefinitionListEnum;
 	      else if (strcmp(name,"Massfluxatgate")==0) return MassfluxatgateEnum;
 	      else if (strcmp(name,"MassfluxatgateName")==0) return MassfluxatgateNameEnum;
-	      else if (strcmp(name,"MassfluxatgateSegments")==0) return MassfluxatgateSegmentsEnum;
+         else stage=6;
+   }
+   if(stage==6){
+	      if (strcmp(name,"MassfluxatgateSegments")==0) return MassfluxatgateSegmentsEnum;
 	      else if (strcmp(name,"MisfitName")==0) return MisfitNameEnum;
 	      else if (strcmp(name,"MisfitModelEnum")==0) return MisfitModelEnumEnum;
 	      else if (strcmp(name,"MisfitObservation")==0) return MisfitObservationEnum;
-         else stage=6;
-   }
-   if(stage==6){
-	      if (strcmp(name,"MisfitObservationEnum")==0) return MisfitObservationEnumEnum;
+	      else if (strcmp(name,"MisfitObservationEnum")==0) return MisfitObservationEnumEnum;
 	      else if (strcmp(name,"MisfitTimeinterpolation")==0) return MisfitTimeinterpolationEnum;
 	      else if (strcmp(name,"MisfitWeights")==0) return MisfitWeightsEnum;
 	      else if (strcmp(name,"MisfitWeightsEnum")==0) return MisfitWeightsEnumEnum;
@@ -747,14 +751,14 @@
 	      else if (strcmp(name,"SurfaceforcingsAirLinDragCoef")==0) return SurfaceforcingsAirLinDragCoefEnum;
 	      else if (strcmp(name,"SurfaceforcingsAirQuadDragCoef")==0) return SurfaceforcingsAirQuadDragCoefEnum;
 	      else if (strcmp(name,"SurfaceforcingsWindVx")==0) return SurfaceforcingsWindVxEnum;
-	      else if (strcmp(name,"SurfaceforcingsWindVy")==0) return SurfaceforcingsWindVyEnum;
+         else stage=7;
+   }
+   if(stage==7){
+	      if (strcmp(name,"SurfaceforcingsWindVy")==0) return SurfaceforcingsWindVyEnum;
 	      else if (strcmp(name,"Matseaice")==0) return MatseaiceEnum;
 	      else if (strcmp(name,"MaterialsPoisson")==0) return MaterialsPoissonEnum;
 	      else if (strcmp(name,"MaterialsYoungModulus")==0) return MaterialsYoungModulusEnum;
-         else stage=7;
-   }
-   if(stage==7){
-	      if (strcmp(name,"MaterialsTimeRelaxationStress")==0) return MaterialsTimeRelaxationStressEnum;
+	      else if (strcmp(name,"MaterialsTimeRelaxationStress")==0) return MaterialsTimeRelaxationStressEnum;
 	      else if (strcmp(name,"MaterialsTimeRelaxationDamage")==0) return MaterialsTimeRelaxationDamageEnum;
 	      else if (strcmp(name,"MaterialsRidgingExponent")==0) return MaterialsRidgingExponentEnum;
 	      else if (strcmp(name,"MaterialsCohesion")==0) return MaterialsCohesionEnum;
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 18564)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 18565)
@@ -28,6 +28,7 @@
 	iomodel->FetchDataToInput(elements,InversionVxObsEnum,0.);
 	iomodel->FetchDataToInput(elements,InversionVyObsEnum,0.); 
 	iomodel->FetchDataToInput(elements,InversionThicknessObsEnum,0.);
+	iomodel->FetchDataToInput(elements,InversionSurfaceObsEnum,0.);
 
 	iomodel->FetchData(5,InversionControlParametersEnum,InversionCostFunctionsEnum,InversionCostFunctionsCoefficientsEnum,InversionMinParametersEnum,InversionMaxParametersEnum);
 
@@ -41,6 +42,7 @@
 			case ThicknessEnum:
 			case FrictionCoefficientEnum:
 			case BalancethicknessApparentMassbalanceEnum:
+			case BalancethicknessOmegaEnum:
 				iomodel->FetchData(1,control); 
 				break;
 
Index: ../trunk-jpl/src/c/cores/balancethickness2_core.cpp
===================================================================
--- ../trunk-jpl/src/c/cores/balancethickness2_core.cpp	(revision 18564)
+++ ../trunk-jpl/src/c/cores/balancethickness2_core.cpp	(revision 18565)
@@ -21,14 +21,13 @@
 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
 
 	if(VerboseSolution()) _printf0_("call computational core:\n");
-	//solutionsequence_linear(femmodel);
-	solutionsequence_nonlinear(femmodel,false);
+	solutionsequence_linear(femmodel);
+	//solutionsequence_nonlinear(femmodel,false);
 
 	if(save_results){
 		if(VerboseSolution()) _printf0_("   saving results\n");
-		const int numoutputs = 5;
-		//int outputs[numoutputs] = {ThicknessEnum};
-		int outputs[numoutputs] = {SurfaceEnum,VxEnum,VyEnum,VelEnum,BalancethicknessDiffusionCoefficientEnum};
+		const int numoutputs = 4;
+		int outputs[numoutputs] = {SurfaceEnum,VxEnum,VyEnum,VelEnum};
 		femmodel->RequestedOutputsx(&femmodel->results,&outputs[0],numoutputs);
 	}
 
Index: ../trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 18564)
+++ ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 18565)
@@ -640,7 +640,6 @@
 		case RheologyBbarAbsGradientEnum:  RheologyBbarAbsGradientx(responses, elements,nodes, vertices, loads, materials, parameters); break;
 		case DragCoefficientAbsGradientEnum:DragCoefficientAbsGradientx(responses, elements,nodes, vertices, loads, materials, parameters); break;
 		case BalancethicknessMisfitEnum:   BalancethicknessMisfitx(responses); break;
-		case Balancethickness2MisfitEnum:  Balancethickness2Misfitx(responses); break;
 		case TotalSmbEnum:					  this->TotalSmbx(responses); break;
 		case MaterialsRheologyBbarEnum:    this->ElementResponsex(responses,MaterialsRheologyBbarEnum); break;
 		case VelEnum:                      this->ElementResponsex(responses,VelEnum); break;
@@ -718,7 +717,7 @@
 				case RheologyBbarAbsGradientEnum:   RheologyBbarAbsGradientx(&double_result,elements,nodes,vertices,loads,materials,parameters);    break;
 				case DragCoefficientAbsGradientEnum:DragCoefficientAbsGradientx(&double_result,elements,nodes,vertices,loads,materials,parameters); break;
 				case BalancethicknessMisfitEnum:    BalancethicknessMisfitx(&double_result);                                                        break;
-				case Balancethickness2MisfitEnum:   Balancethickness2Misfitx(&double_result); break;
+				case SurfaceAbsMisfitEnum:          SurfaceAbsMisfitx(&double_result); break;
 
 			   /*Vector */
 				default:
@@ -1443,14 +1442,13 @@
 	*presponse=J;
 
 }/*}}}*/
-void FemModel::Balancethickness2Misfitx(IssmDouble* presponse){/*{{{*/
+void FemModel::SurfaceAbsMisfitx(IssmDouble* presponse){/*{{{*/
 
 	/*output: */
 	IssmDouble J=0.;
 	IssmDouble J_sum;
 
-	IssmDouble  weight,thicknessobs,thickness,potential,dpotential[2];
-	IssmDouble  vx,vy,vxbar,vybar,vxobs,vyobs,vxbarobs,vybarobs,nu;
+	IssmDouble  surface,surfaceobs,weight;
 	IssmDouble  Jdet;
 	IssmDouble* xyz_list = NULL;
 
@@ -1460,8 +1458,33 @@
 
 		/*If on water, return 0: */
 		if(!element->IsIceInElement()) continue;
-		 _error_("Not implemented");
 
+		/* Get node coordinates*/
+		element->GetVerticesCoordinates(&xyz_list);
+
+		 /*Retrieve all inputs we will be needing: */
+		 Input* weights_input   =element->GetInput(InversionCostFunctionsCoefficientsEnum); _assert_(weights_input);
+		 Input* surface_input   =element->GetInput(SurfaceEnum);                            _assert_(surface_input);
+		 Input* surfaceobs_input=element->GetInput(InversionSurfaceObsEnum);                _assert_(surfaceobs_input);
+
+		 /* Start  looping on the number of gaussian points: */
+		 Gauss* gauss=element->NewGauss(2);
+		 for(int ig=gauss->begin();ig<gauss->end();ig++){
+
+			 gauss->GaussPoint(ig);
+
+			 /* Get Jacobian determinant: */
+			 element->JacobianDeterminant(&Jdet,xyz_list,gauss);
+
+			 /*Get all parameters at gaussian point*/
+			 weights_input->GetInputValue(&weight,gauss,SurfaceAbsMisfitEnum);
+			 surface_input->GetInputValue(&surface,gauss);
+			 surfaceobs_input->GetInputValue(&surfaceobs,gauss);
+
+			 /*Compute SurfaceAbsMisfitEnum*/
+			 J+=0.5*(surface-surfaceobs)*(surface-surfaceobs)*weight*Jdet*gauss->weight;
+		 }
+
 	}
 
 	/*Sum all J from all cpus of the cluster:*/
Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 18564)
+++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 18565)
@@ -1033,6 +1033,7 @@
 
 				/*No yts conversion*/
 				case ThicknessEnum:
+				case BalancethicknessOmegaEnum:
 				case FrictionCoefficientEnum:
 					if(iomodel->Data(control)){
 						for(j=0;j<NUMVERTICES;j++)nodeinputs[j]=iomodel->Data(control)[tria_vertex_ids[j]-1];
Index: ../trunk-jpl/src/c/classes/FemModel.h
===================================================================
--- ../trunk-jpl/src/c/classes/FemModel.h	(revision 18564)
+++ ../trunk-jpl/src/c/classes/FemModel.h	(revision 18565)
@@ -80,7 +80,6 @@
 		void IceVolumeAboveFloatationx(IssmDouble* pV);
 		void ElementResponsex(IssmDouble* presponse,int response_enum);
 		void BalancethicknessMisfitx(IssmDouble* pV);
-		void Balancethickness2Misfitx(IssmDouble* pV);
 		#ifdef  _HAVE_DAKOTA_
 		void DakotaResponsesx(double* d_responses,char** responses_descriptors,int numresponsedescriptors,int d_numresponses);
 		#endif
@@ -92,6 +91,7 @@
 		void OutputControlsx(Results **presults);
 		void CostFunctionx(IssmDouble* pJ,IssmDouble** pJlist,int* pn);
 		void ThicknessAbsGradientx( IssmDouble* pJ);
+		void SurfaceAbsMisfitx( IssmDouble* pJ);
 		#ifdef _HAVE_GIA_
 		void Deflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x, IssmDouble* y);
 		#endif
Index: ../trunk-jpl/src/m/classes/balancethickness.m
===================================================================
--- ../trunk-jpl/src/m/classes/balancethickness.m	(revision 18564)
+++ ../trunk-jpl/src/m/classes/balancethickness.m	(revision 18565)
@@ -9,7 +9,7 @@
 		thickening_rate   = NaN;
 		stabilization     = 0;
 
-		Cmu               = NaN;
+		omega             = NaN;
 	end
 	methods
 		function obj = balancethickness(varargin) % {{{
@@ -34,7 +34,7 @@
 			md = checkfield(md,'fieldname','balancethickness.thickening_rate','size',[md.mesh.numberofvertices 1],'NaN',1);
 			md = checkfield(md,'fieldname','balancethickness.stabilization','size',[1 1],'values',[0 1 2 3]);
 
-			%md = checkfield(md,'fieldname','balancethickness.Cmu','size',[md.mesh.numberofvertices 1],'NaN',1,'>=',0);
+			%md = checkfield(md,'fieldname','balancethickness.omega','size',[md.mesh.numberofvertices 1],'NaN',1,'>=',0);
 		end % }}}
 		function disp(obj) % {{{
 			disp(sprintf('   balance thickness solution parameters:'));
@@ -52,7 +52,7 @@
 			WriteData(fid,'object',obj,'fieldname','thickening_rate','format','DoubleMat','mattype',1,'scale',1./yts);
 			WriteData(fid,'object',obj,'fieldname','stabilization','format','Integer');
 
-			WriteData(fid,'object',obj,'fieldname','Cmu','format','DoubleMat','mattype',1);
+			WriteData(fid,'object',obj,'fieldname','omega','format','DoubleMat','mattype',1);
 		end % }}}
 	end
 end
Index: ../trunk-jpl/src/m/classes/m1qn3inversion.m
===================================================================
--- ../trunk-jpl/src/m/classes/m1qn3inversion.m	(revision 18564)
+++ ../trunk-jpl/src/m/classes/m1qn3inversion.m	(revision 18565)
@@ -21,6 +21,7 @@
 		vz_obs                      = NaN
 		vel_obs                     = NaN
 		thickness_obs               = NaN
+		surface_obs               = NaN
 
 	end
 	methods
@@ -71,7 +72,7 @@
 			md = checkfield(md,'fieldname','inversion.incomplete_adjoint','values',[0 1]);
 			md = checkfield(md,'fieldname','inversion.control_parameters','cell',1,'values',...
 				{'BalancethicknessThickeningRate' 'FrictionCoefficient' 'MaterialsRheologyBbar' 'DamageDbar',...
-				'Vx' 'Vy' 'Thickness' 'BalancethicknessNu' 'BalancethicknessApparentMassbalance'});
+				'Vx' 'Vy' 'Thickness' 'BalancethicknessOmega' 'BalancethicknessApparentMassbalance'});
 			md = checkfield(md,'fieldname','inversion.maxsteps','numel',1,'>=',0);
 			md = checkfield(md,'fieldname','inversion.maxiter','numel',1,'>=',0);
 			md = checkfield(md,'fieldname','inversion.dxmin','numel',1,'>',0);
@@ -83,6 +84,7 @@
 
 			if solution==BalancethicknessSolutionEnum()
 				md = checkfield(md,'fieldname','inversion.thickness_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
+				md = checkfield(md,'fieldname','inversion.surface_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
 			elseif solution==BalancethicknessSoftSolutionEnum()
 				md = checkfield(md,'fieldname','inversion.thickness_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
 			else
@@ -109,6 +111,7 @@
 			fielddisplay(obj,'vy_obs','observed velocity y component [m/yr]');
 			fielddisplay(obj,'vel_obs','observed velocity magnitude [m/yr]');
 			fielddisplay(obj,'thickness_obs','observed thickness [m]');
+			fielddisplay(obj,'surface_obs','observed surface elevation [m]');
 			disp('Available cost functions:');
 			disp('   101: SurfaceAbsVelMisfit');
 			disp('   102: SurfaceRelVelMisfit');
@@ -144,6 +147,7 @@
 				mattype=1;
 			end
 			WriteData(fid,'object',obj,'class','inversion','fieldname','thickness_obs','format','DoubleMat','mattype',mattype);
+			WriteData(fid,'object',obj,'class','inversion','fieldname','surface_obs','format','DoubleMat','mattype',mattype);
 
 			%process control parameters
 			num_control_parameters=numel(obj.control_parameters);
@@ -169,6 +173,7 @@
 			pos=find(obj.cost_functions==504); data(pos)=ThicknessAlongGradientEnum();
 			pos=find(obj.cost_functions==505); data(pos)=ThicknessAcrossGradientEnum();
 			pos=find(obj.cost_functions==506); data(pos)=BalancethicknessMisfitEnum();
+			pos=find(obj.cost_functions==601); data(pos)=SurfaceAbsMisfitEnum();
 			WriteData(fid,'data',data,'enum',InversionCostFunctionsEnum(),'format','DoubleMat','mattype',3);
 			WriteData(fid,'data',num_cost_functions,'enum',InversionNumCostFunctionsEnum(),'format','Integer');
 		end % }}}
Index: ../trunk-jpl/src/m/enum/InversionSurfaceObsEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/InversionSurfaceObsEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/InversionSurfaceObsEnum.m	(revision 18565)
@@ -0,0 +1,11 @@
+function macro=InversionSurfaceObsEnum()
+%INVERSIONSURFACEOBSENUM - Enum of InversionSurfaceObs
+%
+%   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=InversionSurfaceObsEnum()
+
+macro=StringToEnum('InversionSurfaceObs');
Index: ../trunk-jpl/src/m/enum/SurfaceAbsMisfitEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/SurfaceAbsMisfitEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/SurfaceAbsMisfitEnum.m	(revision 18565)
@@ -0,0 +1,11 @@
+function macro=SurfaceAbsMisfitEnum()
+%SURFACEABSMISFITENUM - Enum of SurfaceAbsMisfit
+%
+%   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=SurfaceAbsMisfitEnum()
+
+macro=StringToEnum('SurfaceAbsMisfit');
Index: ../trunk-jpl/src/m/enum/BalancethicknessOmegaEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/BalancethicknessOmegaEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/BalancethicknessOmegaEnum.m	(revision 18565)
@@ -0,0 +1,11 @@
+function macro=BalancethicknessOmegaEnum()
+%BALANCETHICKNESSOMEGAENUM - Enum of BalancethicknessOmega
+%
+%   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=BalancethicknessOmegaEnum()
+
+macro=StringToEnum('BalancethicknessOmega');
Index: ../trunk-jpl/src/m/enum/BalancethicknessD0Enum.m
===================================================================
--- ../trunk-jpl/src/m/enum/BalancethicknessD0Enum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/BalancethicknessD0Enum.m	(revision 18565)
@@ -0,0 +1,11 @@
+function macro=BalancethicknessD0Enum()
+%BALANCETHICKNESSD0ENUM - Enum of BalancethicknessD0
+%
+%   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=BalancethicknessD0Enum()
+
+macro=StringToEnum('BalancethicknessD0');
Index: ../trunk-jpl/src/m/enum/EnumDefinitions.py
===================================================================
--- ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18564)
+++ ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18565)
@@ -164,6 +164,7 @@
 def InversionNumCostFunctionsEnum(): return StringToEnum("InversionNumCostFunctions")[0]
 def InversionStepThresholdEnum(): return StringToEnum("InversionStepThreshold")[0]
 def InversionThicknessObsEnum(): return StringToEnum("InversionThicknessObs")[0]
+def InversionSurfaceObsEnum(): return StringToEnum("InversionSurfaceObs")[0]
 def InversionVxObsEnum(): return StringToEnum("InversionVxObs")[0]
 def InversionVyObsEnum(): return StringToEnum("InversionVyObs")[0]
 def InversionVzObsEnum(): return StringToEnum("InversionVzObs")[0]
@@ -306,6 +307,8 @@
 def Balancethickness2MisfitEnum(): return StringToEnum("Balancethickness2Misfit")[0]
 def BalancethicknessDiffusionCoefficientEnum(): return StringToEnum("BalancethicknessDiffusionCoefficient")[0]
 def BalancethicknessCmuEnum(): return StringToEnum("BalancethicknessCmu")[0]
+def BalancethicknessOmegaEnum(): return StringToEnum("BalancethicknessOmega")[0]
+def BalancethicknessD0Enum(): return StringToEnum("BalancethicknessD0")[0]
 def SurfaceforcingsEnum(): return StringToEnum("Surfaceforcings")[0]
 def SMBEnum(): return StringToEnum("SMB")[0]
 def SurfaceforcingsMassBalanceEnum(): return StringToEnum("SurfaceforcingsMassBalance")[0]
@@ -509,6 +512,7 @@
 def TemperatureEnum(): return StringToEnum("Temperature")[0]
 def TemperaturePicardEnum(): return StringToEnum("TemperaturePicard")[0]
 def ThicknessAbsMisfitEnum(): return StringToEnum("ThicknessAbsMisfit")[0]
+def SurfaceAbsMisfitEnum(): return StringToEnum("SurfaceAbsMisfit")[0]
 def VelEnum(): return StringToEnum("Vel")[0]
 def VelocityEnum(): return StringToEnum("Velocity")[0]
 def VxAverageEnum(): return StringToEnum("VxAverage")[0]
