
sample_index = 0;
%wera_waves = ['/home/wera/www/efs/data/cran_nkl_jan_feb_2008'];
hs_est = nan * ones(1008,48000);
 ts_est = nan * ones(1008,48000);
 for iday =46:59 
 for ihr = 00:23  
     for imin = 10:20:50
    sample_index = sample_index + 1;
    if ihr== 0 
        if imin == 0
          filename = (['20080',int2str(iday),'0000_nkl_spec.mat']);
        else 
          filename = (['20080',int2str(iday),'00',int2str(imin),'_nkl_spec.mat']);
        end
    elseif ihr < 10
       if imin == 0
       filename = (['20080',int2str(iday),'0',int2str(ihr),'00_nkl_spec.mat']);
       else
       filename = (['20080',int2str(iday),'0',int2str(ihr),int2str(imin),'_nkl_spec.mat']);
       end
   else
       if imin == 0
           filename = (['20080',int2str(iday),'',int2str(ihr),'00_nkl_spec.mat']);
       else
           filename = (['20080',int2str(iday),'',int2str(ihr),int2str(imin),'_nkl_spec.mat']);
       end
    end
 filename
  fid=fopen(filename,'rb');
  if fid > 0
    eval(['load ',filename]);
    data_reshape = reshape(data,48000,512);
    [hs,ts] = wvprmtrs(data_reshape,16045000,0.0075);
    hs_est(sample_index,:) = hs';
    ts_est(sample_index,:) = ts'; 
    st = fclose(fid);
  end

 end
 end
 end
 save hs_nkl_46_59 hs_est
 save ts_nkl_46_59 ts_est
