sir i have program who calculate extreme event annually for whole 95 years but this program works only for those who does not include leap years it means data size is 20x22x34675(lon,lat,time)(365*95) but i want to calculate extreme event annually for those data who include leap years (it mean 365 Or 366 then 365 Or 366 ….each separate years) then what will be change in this program for doing this? my data size is (prec_all_years) 20x22x34698(lon,lat,time)(365*95+23).this is daily data.please help me sir.thank you.
prec_all_years = prec_all_years*86400; % rainfall in mm/day
bins = [64.5 124.5 244.5 Inf];% Reshape into lat/lon/day/year, and bin over 3rd dimension (days)
counts = histc(reshape(prec_all_years,20,22,365,95),bins,3);% Extract the counts for each of the 3 categories
hr = squeeze(counts(: , : , 1 , : ));vhr = squeeze(counts(: , : , 2 , : ));ehr = squeeze(counts(: , : , 3 , : ));% Extract a region
xe = 13:20; ye = 11:16;% xe is x for east,ye is y for east
% Extract counts for each category
count_hr_east = sum(reshape(hr(xe , ye , : ) , [] , 95 ));count_vhr_east = sum(reshape(vhr(xe , ye , : ) , [] , 95 ));count_ehr_east = sum(reshape(ehr(xe , ye , : ) , [] , 95 ));
Best Answer