Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 867)
+++ /trunk/src/series.m	(revision 868)
@@ -2105,5 +2105,5 @@
 if FieldNameRequest && numel(iview_netcdf)>=1
     set(handles.InputFields,'Visible','on')
-    if CheckList==0        % not civ input made
+    %if CheckList==0        % not civ input made
         if isfield(SeriesData.FileInfo{iview_netcdf(1)},'ListVarName')
         ListVarName=SeriesData.FileInfo{iview_netcdf(1)}.ListVarName;
@@ -2164,7 +2164,7 @@
         end
         end
-    else
-        set(handles_coord,'Visible','off')% no coord display for civ data
-    end
+%     else
+%         set(handles_coord,'Visible','off')% no coord display for civ data
+%     end
     set(handles.FieldName,'String',FieldList)
 else
Index: /trunk/src/series/histo_diff.m
===================================================================
--- /trunk/src/series/histo_diff.m	(revision 867)
+++ /trunk/src/series/histo_diff.m	(revision 868)
@@ -166,5 +166,5 @@
     rmpath(Param.FieldTransform.TransformPath)
 end
-if ~(isfield(Param,'ProjObject')&& ismember(Param.ProjObject.ProjMode,{'polygon','rectangle','ellipse'}))
+if ~(isfield(Param,'ProjObject')&& ismember(Param.ProjObject.Type,{'polygon','rectangle','ellipse'}))
     disp_uvmat('ERROR','projection in a closed domain: polygon, rectangle or ellipse is needed for histograms',checkrun)
 end
@@ -205,5 +205,5 @@
     InputFields{2}=[];%default (case of images)
     if isfield(Param,'InputFields')
-        InputFields{2}=Param.InputFields{1};%default
+        InputFields{2}=InputFields{1};%default
         if isfield(Param.InputFields,'FieldName_1')
             InputFields{2}.FieldName=Param.InputFields.FieldName_1;
@@ -249,16 +249,4 @@
         if ~isempty(transform_fct)
             switch nargin(transform_fct)
-                case 4
-                    if length(Data)==2
-                        Field=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});
-                    else
-                        Field=transform_fct(Data{1},XmlData{1});
-                    end
-                case 3
-                    if length(Data)==2
-                        Field=transform_fct(Data{1},XmlData{1},Data{2});
-                    else
-                        Field=transform_fct(Data{1},XmlData{1});
-                    end
                 case 2
                     Field=transform_fct(Data{1},XmlData{1});
@@ -268,11 +256,18 @@
         end
         
-        %% calculate tps coefficients if needed
+        %% projection of the second (ref) field on the first one
+        % calculate tps coefficients if needed (spatial derivatives)
 %         if isfield(Param,'ProjObject')&&isfield(Param.ProjObject,'ProjMode')&& strcmp(Param.ProjObject.ProjMode,'interp_tps')
 %             Field=tps_coeff_field(Field,check_proj_tps);
-%         end
-        
-        %field projection on an object
-            [Field,errormsg]=proj_field(Field,Param.ProjObject);
+%         end       
+          Field.ListVarName={'X','Y','U','V'};
+          Field.VarDimName={'nb_vector','nb_vector','nb_vector','nb_vector'};
+          F.U=scatteredInterpolant(Data{2}.X,Data{2}.Y,Data{2}.U,'linear');
+          Field.U=Field.U-F.U(Field.X,Field.Y);%substract the interpolated ref to U
+          F.V=scatteredInterpolant(Data{2}.X,Data{2}.Y,Data{2}.V,'linear');
+          Field.V=Field.V-F.V(Field.X,Field.Y);%substract the interpolated ref to V
+          
+        %field projection on a close object yielding histogram
+            [Histo,errormsg]=proj_field(Field,Param.ProjObject);% calculate histogram
             if ~isempty(errormsg)
                 disp_uvmat('ERROR',['error in histo_diff/proj_field:' errormsg],checkrun)
