Index: ../trunk-jpl/src/m/classes/misfit.m
===================================================================
--- ../trunk-jpl/src/m/classes/misfit.m	(revision 19066)
+++ ../trunk-jpl/src/m/classes/misfit.m	(revision 19067)
@@ -7,6 +7,7 @@
 %                    'observation_enum',SurfaceObservationsEnum,...
 %                    'observation',md.geometry.surface,...
 %                    'timeinterpolation','nearestneighbor',...
+%                    'local',1,...
 %                    'weights',ones(md.mesh.numberofvertices,1),...
 %                    'weights_enum',WeightsSurfaceObservationsEnum);
 %
@@ -21,6 +22,7 @@
 		observation       = NaN; %observed field that we compare the model against
 		observation_enum  = NaN; %enum for observed field.
 		timeinterpolation = '';
+		local             = 1;
 		weights           = NaN; %weight coefficients for every vertex
 		weights_enum      = NaN; %enum to identify this particular set of weights
 		cumulated         = NaN; %do we cumulate misfit through time?
@@ -40,6 +42,7 @@
 				self.model_enum=getfieldvalue(options,'model_enum');
 				self.observation=getfieldvalue(options,'observation',NaN);
 				self.observation_enum=getfieldvalue(options,'observation_enum');
+				self.local=getfieldvalue(options,'local',1);
 				self.timeinterpolation=getfieldvalue(options,'timeinterpolation','nearestneighbor');
 				self.weights=getfieldvalue(options,'weights',NaN);
 				self.weights_enum=getfieldvalue(options,'weights_enum',NaN);
@@ -47,6 +50,7 @@
 			end
 		end % }}}
 		function self = setdefaultparameters(self) % {{{
+			self.local=1;
 			self.timeinterpolation='nearestneighbor';
 		end % }}}
 		function md = checkconsistency(self,md,solution,analyses) % {{{
@@ -54,7 +58,7 @@
 			if ~ischar(self.name),
 				error('misfit error message: ''name'' field should be a string!');
 			end
-			md = checkfield(md,'fieldname','self.definitionenum','field',self.definitionenum,'values',[Outputdefinition1Enum,Outputdefinition2Enum,Outputdefinition3Enum,Outputdefinition4Enum,Outputdefinition5Enum,Outputdefinition6Enum,Outputdefinition7Enum,Outputdefinition8Enum,Outputdefinition9Enum,Outputdefinition10Enum]);
+			md = checkfield(md,'fieldname','self.definitionenum','field',self.definitionenum,'values',[Outputdefinition1Enum:Outputdefinition100Enum]);
 
 			if ~ischar(self.timeinterpolation),
 				error('misfit error message: ''timeinterpolation'' field should be a string!');
@@ -73,6 +77,7 @@
 			fielddisplay(self,'model_enum','enum for field that is modeled');
 			fielddisplay(self,'observation','observed field that we compare the model against');
 			fielddisplay(self,'observation_enum','observation enum');
+			fielddisplay(self,'local','is the response local to the elements, or global? (default is 1)''');
 			fielddisplay(self,'timeinterpolation','interpolation routine used to interpolate misfit between two time steps (default is ''nearestneighbor''');
 			fielddisplay(self,'weights','weights (at vertices) to apply to the misfit');
 			fielddisplay(self,'weights_enum','enum for weights for identification purposes');
@@ -85,6 +90,7 @@
 		WriteData(fid,'object',self,'fieldname','model_enum','format','Integer');
 		WriteData(fid,'object',self,'fieldname','observation','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
 		WriteData(fid,'object',self,'fieldname','observation_enum','format','Integer');
+		WriteData(fid,'object',self,'fieldname','local','format','Integer');
 		WriteData(fid,'object',self,'fieldname','timeinterpolation','format','String');
 		WriteData(fid,'object',self,'fieldname','weights','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
 		WriteData(fid,'object',self,'fieldname','weights_enum','format','Integer');
