nb_of_years = year_stop - year_start +1;
httpsUrl = "https://psl.noaa.gov/thredds/fileServer/Datasets/cpc_global_precip/";
LG=[-48.25 -48.75 -49.25] + 360;
filename_export='PRP_CPC.xlsx';
filename = strcat("precip.", num2str(year_start+ci-1), ".nc");
disp(strcat(filename, " is processed"));
dataUrl = strcat(httpsUrl, filename);
filename_out = websave(filename_tmp,dataUrl);
precip=ncread(filename_tmp,'precip');
long=ncread(filename_tmp,'lon');
lat=ncread(filename_tmp,'lat');
time=ncread(filename_tmp,'time');
if isempty(LGG)||isempty(LTT)
disp('LOCATION NOT FOUND IN THIS NetCDF FILE')
Precip(:,i)=precip(LGG,LTT,:);
X(i)={'Precipitation(mm/day)'};
AA=time/24+datenum('1900-01-01 00:00:0.0');
[yy,mm,dd,~,~,~] = datevec(AA);
DD={'Year','Month','Day'};
C={'LOCATION: Cities','','','Longitude';'DATE FROM JAN-DEZ 2021','','','Latitude'};
writecell(C,filename_export,"Sheet",sheet,"Range",'A1');
writecell(DD,filename_export,"Sheet",sheet,"Range",'A3');
writematrix(latt2,filename_export,"Sheet",sheet,"Range",'E1');
writecell(X,filename_export,"Sheet",sheet,"Range",'E3');
writematrix(date1,filename_export,"Sheet",sheet,"Range",'A4');
writematrix(Precip,filename_export,"Sheet",sheet,"Range",'E4');