function TimeLonVecWind_long3(DataFolder,Fitnum)
%creates a structure with anomaly wind data from all radar stations 
%TimeLon.Time: Time vector, format: datenum
%TimeLon.Lon: Longitude of all  stations
%TimeLonVec.MeanWind: anomaly wind (mean wind minus smooted climatology)
%TimeLonVec.MeanWind_95P: 2*error of TimeLonVec.MeanWind (95% cofidence interval)
%TimeLonVec.MeanWindWeighted:anomaly wind (mean wind minus smoothed weighted climatology)
%TimeLonVec.MeanWindWeighted_err: error of TimeLonVec.MeanWindWeighted
location='TimeLonVec';
station=[{'Salmon'},{'Kodiak'},{'PrinceGeorge'},{'Saskatoon'},{'RankinInlet'},{'Kapuskasing'},{'GooseBay'},{'Stokkseyri'},{'Pykkvibaer'},{'Hankasalmi'}];
C=[0 0 0;0 0.5 0; 0 1 0; 1 0 0; 0 0 1; 1 0 1; 0 1 1;1 1 0; 1 0.5 0;0.5 0 0.5];
smoothing=30;
  TimeLonVec.Time=datenum(1993,1,1):datenum(2016,12,31);
  TimeLonVec.Lon=zeros(10,1);
  TimeLonVec.MeanWind=ones(10,size(TimeLonVec.Time,2))*NaN;
  TimeLonVec.MeanWind_95P=TimeLonVec.MeanWind;
 TimeLonVec.MeanWindWeighted=ones(10,size(TimeLonVec.Time,2))*NaN;
  TimeLonVec.MeanWindWeighted_err=TimeLonVec.MeanWind;
  figure5=figure('Name','MeanWindAllStations','units','centimeters','Position',[0 0 25 35],...                    % setter str på figuren du vil se på skjermen. VIKIT Gat units kommer FØR Position
    'PaperUnits','centimeters','PaperPosition', [0 0 25 35],...% setter str på figuren du vil lagre (uavhengig av format) VIKITG at units kommer FØR Position
    'DefaultAxesFontSize',7,'DefaultAxesFontWeight','b');               %setter str på font i figure %
DV=datevec(TimeLonVec.Time);
ind=find((DV(:,2)==1) & (DV(:,3)==1));
for i=1:length(station)
  load(fullfile(DataFolder,station{i},['Climatology',int2str(Fitnum),'_',station{i},'_Smoothing_',int2str(smoothing)]))
  load(fullfile(DataFolder,station{i},[station{i},'_Fit',int2str(Fitnum)]))
  TimeLonVec.Lon(size(station,2)-i+1)=Data.Fit.Lon(1);
  [I,ia,ib]=intersect(TimeLonVec.Time,Climatology.MeanWindDate);
  TimeLonVec.MeanWind(size(station,2)-i+1,ia)=Climatology.MeanWindMinusSC(ib);
  TimeLonVec.MeanWind_95P(size(station,2)-i+1,ia)=Climatology.MeanWindMinusSC_95(ib).*Climatology.MeanWindMinusSC(ib);
  TimeLonVec.MeanWindWeighted(size(station,2)-i+1,ia)=Climatology.MeanWindMinusSWC(ib);
  TimeLonVec.MeanWindWeighted_err(size(station,2)-i+1,ia)=Climatology.MeanWindMinusSWC_err(ib);
  subplot(size(station,2),1,size(station,2)-i+1)
  plot(TimeLonVec.Time,TimeLonVec.MeanWind(size(station,2)-i+1,:),'linewidth',1,'color',C(i,:))
  ylabel(station{i})
  legend('show')
  legend(num2str(Data.Fit.Lon(1)),'location','EastOutside')
  set(gca,'XTick',TimeLonVec.Time(ind))
  datetick('x','mm/yy','keepticks');
  if i==1
      xlabel('date [mm/yy]')
  end
  xlim([datenum(1993,1,1) datenum(2016,12,31)+1])
  ylim([-20,20])
end
save(fullfile(DataFolder,location,['TimeLonVecWind_long',int2str(Fitnum)]),'TimeLonVec')
makePDF(figure5,[45,35],['TimeLonVecWind_long',int2str(Fitnum)],fullfile(DataFolder,location))
saveas(figure5,fullfile(DataFolder,location,['TimeLonVecWind_long',int2str(Fitnum)]),'fig')
INT=zeros(size(TimeLonVec.Time,2),1);
for i=1:size(TimeLonVec.Time,2)
   
    if sum(isnan(TimeLonVec.MeanWind(:,i)))<=1
    INT(i)=1;
    end
end
ind=find(INT==1);
size(ind)
figure
plot(TimeLonVec.Time,INT,'.')
datetick('x','yy/mm/dd');
figure
plot(TimeLonVec.Lon,TimeLonVec.MeanWind(:,ind),'.')

end