out_file=fopen('out_Z.txt','w');
lengthdata=length(mean_water);

for i=1:lengthdata
    
yearday=floor(yd_processed(i));
hours=(yd_processed(i)-yearday)*24;
fprintf(out_file,'%d %3.2f %5.4f\n\n',yearday,hours,mean_water(i));

end

fclose(out_file);