sir i have program who calculate extreme event for whole 95 years but i want to calculate extreme event annually (it mean 365 then 365 ….each separate years) then what will be change in this program for doing this? my data size is (prec_all_years) 20x22x34675(lon,lat,time).this is daily data.
prec_all_years = prec_all_years*86400; % rainfall in mm/day
xx = []
for ii= 1:95;
for i = 1:length(X1);
for j = 1:length(Y1);
xx = [xx (i-1)*[1:365]];
prec1 = prec_all_years(i,j,xx);
inds1 = find(prec1 >=64.5 & prec1 <= 124.5); inds2 = find(prec1 > 124.5 & prec1 <=244.5); inds3 = find(prec1 > 244.5);
hr(i,j) = length(inds1); vhr(i,j)= length(inds2); ehr(i,j)= length(inds3);
end end end % now find frequency of rainfall in different regions
% western region
xe = [13:20]; ye = [11:16]; xw = [1:8]; yw = [11:16]; xn = [5:9]; yn = [15:20]; xs = [5:9]; ys = [3:7];
% eastern region
freq_east_hr = hr(xe,ye);
count_hr_east = sum(freq_east_hr(:))
freq_east_vhr = vhr(xe,ye);
count_vhr_east = sum(freq_east_vhr(:))
freq_east_ehr = ehr(xe,ye);
count_ehr_east = sum(freq_east_ehr(:))
Best Answer