Index: ../trunk-jpl/src/m/classes/inversion.m
===================================================================
--- ../trunk-jpl/src/m/classes/inversion.m	(revision 18604)
+++ ../trunk-jpl/src/m/classes/inversion.m	(revision 18605)
@@ -22,6 +22,7 @@
 		vz_obs                      = NaN
 		vel_obs                     = NaN
 		thickness_obs               = NaN
+		surface_obs                 = NaN
 	end
 	methods
 		function createxml(obj,fid) % {{{
@@ -132,7 +133,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'});
+				'BalancethicknessOmega' 'BalancethicknessApparentMassbalance'});
 			md = checkfield(md,'fieldname','inversion.nsteps','numel',1,'>=',0);
 			md = checkfield(md,'fieldname','inversion.maxiter_per_step','size',[md.inversion.nsteps 1],'>=',0);
 			md = checkfield(md,'fieldname','inversion.step_threshold','size',[md.inversion.nsteps 1]);
@@ -176,6 +177,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');
@@ -212,6 +214,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
@@ -238,6 +241,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/classes/initialization.py
===================================================================
--- ../trunk-jpl/src/m/classes/initialization.py	(revision 18604)
+++ ../trunk-jpl/src/m/classes/initialization.py	(revision 18605)
@@ -78,15 +78,13 @@
 			md = checkfield(md,'fieldname','initialization.watercolumn','NaN',1,'size',[md.mesh.numberofvertices])
 		if HydrologyDCInefficientAnalysisEnum() in analyses:
 			if hasattr(md.hydrology,'hydrologydc'):
-				md = checkfield(md,'fieldname','initialization.sediment_head','NaN',1,'size',[md.mesh.numberofvertices 1])
+				md = checkfield(md,'fieldname','initialization.sediment_head','NaN',1,'size',[md.mesh.numberofvertices,1])
 		if HydrologyDCEfficientAnalysisEnum() in analyses:
 			if hasattr(md.hydrology,'hydrologydc'):
 				if md.hydrology.isefficientlayer==1:
-					md = checkfield(md,'fieldname','initialization.epl_head','NaN',1,'size',[md.mesh.numberofvertices 1])
-					md = checkfield(md,'fieldname','initialization.epl_thickness','NaN',1,'size',[md.mesh.numberofvertices 1])
-				
+					md = checkfield(md,'fieldname','initialization.epl_head','NaN',1,'size',[md.mesh.numberofvertices,1])
+					md = checkfield(md,'fieldname','initialization.epl_thickness','NaN',1,'size',[md.mesh.numberofvertices,1])
 
-
 		return md
 	# }}}
 	def marshall(self,md,fid):    # {{{
@@ -101,8 +99,8 @@
 		WriteData(fid,'data',self.waterfraction,'format','DoubleMat','mattype',1,'enum',WaterfractionEnum())
 		WriteData(fid,'data',self.watercolumn,'format','DoubleMat','mattype',1,'enum',WatercolumnEnum())
 		WriteData(fid,'data',self.sediment_head,'format','DoubleMat','mattype',1,'enum',SedimentHeadEnum())
-		WriteData(fid,'data',self.epl_head,'format','DoubleMat','mattype',1,'enum',EplHeadEnum);
-		WriteData(fid,'data',self.epl_thickness,'format','DoubleMat','mattype',1,'enum',HydrologydcEplThicknessEnum);
+		WriteData(fid,'data',self.epl_head,'format','DoubleMat','mattype',1,'enum',EplHeadEnum())
+		WriteData(fid,'data',self.epl_thickness,'format','DoubleMat','mattype',1,'enum',HydrologydcEplThicknessEnum())
 
 		
 		if md.thermal.isenthalpy:
Index: ../trunk-jpl/src/m/classes/model.py
===================================================================
--- ../trunk-jpl/src/m/classes/model.py	(revision 18604)
+++ ../trunk-jpl/src/m/classes/model.py	(revision 18605)
@@ -659,15 +659,15 @@
 		md.stressbalance.loadingforce=project3d(md,'vector',md.stressbalance.loadingforce,'type','node')
 		md.masstransport.calvingrate=project3d(md,'vector',md.masstransport.calvingrate,'type','node')
 
-                # Hydrologydc variables
-                if hasattr(md.hydrology,'hydrologydc'):
-                        md.hydrology.spcsediment_head=project3d(md,'vector',md.hydrology.spcsediment_head,'type','node','layer',1)
-                        md.hydrology.spcepl_head=project3d(md,'vector',md.hydrology.spcepl_head,'type','node','layer',1)
-                        md.hydrology.mask_eplactive_node=project3d(md,'vector',md.hydrology.mask_eplactive_node,'type','node','layer',1)
-                        md.hydrology.sediment_transmitivity=project3d(md,'vector',md.hydrology.sediment_transmitivity,'type','node','layer',1)
-                        md.hydrology.basal_moulin_input=project3d(md,'vector',md.hydrology.basal_moulin_input,'type','node','layer',1)
-                if md.hydrology.isefficientlayer==1 :
-                        md.hydrology.spcepl_head=project3d(md,'vector',md.hydrology.spcepl_head,'type','node','layer',1)
+		# Hydrologydc variables
+		if hasattr(md.hydrology,'hydrologydc'):
+			md.hydrology.spcsediment_head=project3d(md,'vector',md.hydrology.spcsediment_head,'type','node','layer',1)
+			md.hydrology.spcepl_head=project3d(md,'vector',md.hydrology.spcepl_head,'type','node','layer',1)
+			md.hydrology.mask_eplactive_node=project3d(md,'vector',md.hydrology.mask_eplactive_node,'type','node','layer',1)
+			md.hydrology.sediment_transmitivity=project3d(md,'vector',md.hydrology.sediment_transmitivity,'type','node','layer',1)
+			md.hydrology.basal_moulin_input=project3d(md,'vector',md.hydrology.basal_moulin_input,'type','node','layer',1)
+			if md.hydrology.isefficientlayer==1 :
+				md.hydrology.spcepl_head=project3d(md,'vector',md.hydrology.spcepl_head,'type','node','layer',1)
 
 		#connectivity
 		md.mesh.elementconnectivity=numpy.tile(md.mesh.elementconnectivity,(numlayers-1,1))
Index: ../trunk-jpl/src/m/classes/inversionvalidation.m
===================================================================
--- ../trunk-jpl/src/m/classes/inversionvalidation.m	(revision 18604)
+++ ../trunk-jpl/src/m/classes/inversionvalidation.m	(revision 18605)
@@ -17,7 +17,7 @@
 		vz_obs                      = NaN
 		vel_obs                     = NaN
 		thickness_obs               = NaN
-		surface_obs               = NaN
+		surface_obs                 = NaN
 	end
 	methods
 		function obj = inversionvalidation(varargin) % {{{
