Index: ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18614)
+++ ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18615)
@@ -141,6 +141,7 @@
 	HydrologySedimentKmaxEnum,
 	IndependentObjectEnum,
 	InversionControlParametersEnum,
+	InversionControlScalingFactorsEnum,
 	InversionCostFunctionThresholdEnum,
 	InversionCostFunctionsCoefficientsEnum,
 	InversionCostFunctionsEnum,
Index: ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18614)
+++ ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18615)
@@ -149,6 +149,7 @@
 		case HydrologySedimentKmaxEnum : return "HydrologySedimentKmax";
 		case IndependentObjectEnum : return "IndependentObject";
 		case InversionControlParametersEnum : return "InversionControlParameters";
+		case InversionControlScalingFactorsEnum : return "InversionControlScalingFactors";
 		case InversionCostFunctionThresholdEnum : return "InversionCostFunctionThreshold";
 		case InversionCostFunctionsCoefficientsEnum : return "InversionCostFunctionsCoefficients";
 		case InversionCostFunctionsEnum : return "InversionCostFunctions";
Index: ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18614)
+++ ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18615)
@@ -152,6 +152,7 @@
 	      else if (strcmp(name,"HydrologySedimentKmax")==0) return HydrologySedimentKmaxEnum;
 	      else if (strcmp(name,"IndependentObject")==0) return IndependentObjectEnum;
 	      else if (strcmp(name,"InversionControlParameters")==0) return InversionControlParametersEnum;
+	      else if (strcmp(name,"InversionControlScalingFactors")==0) return InversionControlScalingFactorsEnum;
 	      else if (strcmp(name,"InversionCostFunctionThreshold")==0) return InversionCostFunctionThresholdEnum;
 	      else if (strcmp(name,"InversionCostFunctionsCoefficients")==0) return InversionCostFunctionsCoefficientsEnum;
 	      else if (strcmp(name,"InversionCostFunctions")==0) return InversionCostFunctionsEnum;
@@ -258,11 +259,11 @@
 	      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;
          else stage=3;
    }
    if(stage==3){
-	      if (strcmp(name,"QmuIsdakota")==0) return QmuIsdakotaEnum;
+	      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 if (strcmp(name,"QmuMassFluxSegmentsPresent")==0) return QmuMassFluxSegmentsPresentEnum;
@@ -381,11 +382,11 @@
 	      else if (strcmp(name,"StressbalanceVerticalAnalysis")==0) return StressbalanceVerticalAnalysisEnum;
 	      else if (strcmp(name,"EnthalpyAnalysis")==0) return EnthalpyAnalysisEnum;
 	      else if (strcmp(name,"FlaimAnalysis")==0) return FlaimAnalysisEnum;
-	      else if (strcmp(name,"FlaimSolution")==0) return FlaimSolutionEnum;
          else stage=4;
    }
    if(stage==4){
-	      if (strcmp(name,"HydrologyShreveAnalysis")==0) return HydrologyShreveAnalysisEnum;
+	      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;
@@ -504,11 +505,11 @@
 	      else if (strcmp(name,"Adjointp")==0) return AdjointpEnum;
 	      else if (strcmp(name,"Adjointx")==0) return AdjointxEnum;
 	      else if (strcmp(name,"Adjointy")==0) return AdjointyEnum;
-	      else if (strcmp(name,"Adjointz")==0) return AdjointzEnum;
          else stage=5;
    }
    if(stage==5){
-	      if (strcmp(name,"BalancethicknessMisfit")==0) return BalancethicknessMisfitEnum;
+	      if (strcmp(name,"Adjointz")==0) return AdjointzEnum;
+	      else if (strcmp(name,"BalancethicknessMisfit")==0) return BalancethicknessMisfitEnum;
 	      else if (strcmp(name,"BedSlopeX")==0) return BedSlopeXEnum;
 	      else if (strcmp(name,"BedSlopeY")==0) return BedSlopeYEnum;
 	      else if (strcmp(name,"Boundary")==0) return BoundaryEnum;
@@ -627,11 +628,11 @@
 	      else if (strcmp(name,"IntExternalResult")==0) return IntExternalResultEnum;
 	      else if (strcmp(name,"J")==0) return JEnum;
 	      else if (strcmp(name,"StringExternalResult")==0) return StringExternalResultEnum;
-	      else if (strcmp(name,"Step")==0) return StepEnum;
          else stage=6;
    }
    if(stage==6){
-	      if (strcmp(name,"Time")==0) return TimeEnum;
+	      if (strcmp(name,"Step")==0) return StepEnum;
+	      else if (strcmp(name,"Time")==0) return TimeEnum;
 	      else if (strcmp(name,"WaterColumnOld")==0) return WaterColumnOldEnum;
 	      else if (strcmp(name,"Outputdefinition")==0) return OutputdefinitionEnum;
 	      else if (strcmp(name,"OutputdefinitionList")==0) return OutputdefinitionListEnum;
@@ -750,11 +751,11 @@
 	      else if (strcmp(name,"BasalforcingsOceanQuadDragCoef")==0) return BasalforcingsOceanQuadDragCoefEnum;
 	      else if (strcmp(name,"BasalforcingsOceanTurningAngle")==0) return BasalforcingsOceanTurningAngleEnum;
 	      else if (strcmp(name,"BasalforcingsOceanSsh")==0) return BasalforcingsOceanSshEnum;
-	      else if (strcmp(name,"BasalforcingsOceanVx")==0) return BasalforcingsOceanVxEnum;
          else stage=7;
    }
    if(stage==7){
-	      if (strcmp(name,"BasalforcingsOceanVy")==0) return BasalforcingsOceanVyEnum;
+	      if (strcmp(name,"BasalforcingsOceanVx")==0) return BasalforcingsOceanVxEnum;
+	      else if (strcmp(name,"BasalforcingsOceanVy")==0) return BasalforcingsOceanVyEnum;
 	      else if (strcmp(name,"SurfaceforcingsRhoAir")==0) return SurfaceforcingsRhoAirEnum;
 	      else if (strcmp(name,"SurfaceforcingsAirCoef")==0) return SurfaceforcingsAirCoefEnum;
 	      else if (strcmp(name,"SurfaceforcingsAirLinDragCoef")==0) return SurfaceforcingsAirLinDragCoefEnum;
Index: ../trunk-jpl/src/m/classes/m1qn3inversion.m
===================================================================
--- ../trunk-jpl/src/m/classes/m1qn3inversion.m	(revision 18614)
+++ ../trunk-jpl/src/m/classes/m1qn3inversion.m	(revision 18615)
@@ -8,10 +8,11 @@
 		iscontrol                   = 0
 		incomplete_adjoint          = 0
 		control_parameters          = NaN
+		control_scaling_factors     = NaN
 		maxsteps                    = 0
 		maxiter                     = 0
-		dxmin                       = 0;
-		gttol                       = 0;
+		dxmin                       = 0
+		gttol                       = 0
 		cost_functions              = NaN
 		cost_functions_coefficients = NaN
 		min_parameters              = NaN
@@ -21,7 +22,7 @@
 		vz_obs                      = NaN
 		vel_obs                     = NaN
 		thickness_obs               = NaN
-		surface_obs               = NaN
+		surface_obs                 = NaN
 
 	end
 	methods
@@ -44,6 +45,9 @@
 			%drag and B are supported yet)
 			self.control_parameters={'FrictionCoefficient'};
 
+			%Scaling factor for each control
+			self.control_scaling_factors=1;
+
 			%number of iterations
 			self.maxsteps=20;
 			self.maxiter=40;
@@ -73,6 +77,7 @@
 			md = checkfield(md,'fieldname','inversion.control_parameters','cell',1,'values',...
 				{'BalancethicknessThickeningRate' 'FrictionCoefficient' 'MaterialsRheologyBbar' 'DamageDbar',...
 				'Vx' 'Vy' 'Thickness' 'BalancethicknessOmega' 'BalancethicknessApparentMassbalance'});
+			md = checkfield(md,'fieldname','inversion.control_scaling_factors','size',[1 num_controls],'>',0,'NaN',1);
 			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);
@@ -99,6 +104,7 @@
 			fielddisplay(obj,'iscontrol','is inversion activated?');
 			fielddisplay(obj,'incomplete_adjoint','1: linear viscosity, 0: non-linear viscosity');
 			fielddisplay(obj,'control_parameters','ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}');
+			fielddisplay(obj,'control_scaling_factors','order of magnitude of each control (useful for multi-parameter optimization)');
 			fielddisplay(obj,'maxsteps','maximum number of iterations (gradient computation)');
 			fielddisplay(obj,'maxiter','maximum number of Function evaluation (forward run)');
 			fielddisplay(obj,'dxmin','convergence criterion: two points less than dxmin from eachother (sup-norm) are considered identical');
@@ -131,6 +137,7 @@
 			WriteData(fid,'enum',InversionTypeEnum(),'data',2,'format','Integer');
 			if ~obj.iscontrol, return; end
 			WriteData(fid,'object',obj,'class','inversion','fieldname','incomplete_adjoint','format','Boolean');
+			WriteData(fid,'object',obj,'class','inversion','fieldname','control_scaling_factors','format','DoubleMat','mattype',3);
 			WriteData(fid,'object',obj,'class','inversion','fieldname','maxsteps','format','Integer');
 			WriteData(fid,'object',obj,'class','inversion','fieldname','maxiter','format','Integer');
 			WriteData(fid,'object',obj,'class','inversion','fieldname','dxmin','format','Double');
Index: ../trunk-jpl/src/m/enum/EnumDefinitions.py
===================================================================
--- ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18614)
+++ ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18615)
@@ -141,6 +141,7 @@
 def HydrologySedimentKmaxEnum(): return StringToEnum("HydrologySedimentKmax")[0]
 def IndependentObjectEnum(): return StringToEnum("IndependentObject")[0]
 def InversionControlParametersEnum(): return StringToEnum("InversionControlParameters")[0]
+def InversionControlScalingFactorsEnum(): return StringToEnum("InversionControlScalingFactors")[0]
 def InversionCostFunctionThresholdEnum(): return StringToEnum("InversionCostFunctionThreshold")[0]
 def InversionCostFunctionsCoefficientsEnum(): return StringToEnum("InversionCostFunctionsCoefficients")[0]
 def InversionCostFunctionsEnum(): return StringToEnum("InversionCostFunctions")[0]
Index: ../trunk-jpl/src/m/enum/InversionControlScalingFactorsEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/InversionControlScalingFactorsEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/InversionControlScalingFactorsEnum.m	(revision 18615)
@@ -0,0 +1,11 @@
+function macro=InversionControlScalingFactorsEnum()
+%INVERSIONCONTROLSCALINGFACTORSENUM - Enum of InversionControlScalingFactors
+%
+%   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=InversionControlScalingFactorsEnum()
+
+macro=StringToEnum('InversionControlScalingFactors');
