%>>>>>>>>> freq of SZA's: needs to do J_stat_1, _2, and _3 % Only UCI(C) and NCAR(D) and CAFS are parsed here SZA0 = 0.01 %%%%%%%% model C(UCI) NX = NXC NY = NYC block = blockC; cosy = cosC; countC(1:100,1:2) =0; for i=1:NX for j=1:NY for t=1:24 ishift = floor(t*NX/24.); ii = i + ishift; if ii>NX ii = ii-NX; end if cosy(ii,j) > SZA0 k=max(floor(100*cosy(ii,j)),1); for b=1:2 if block(i,j,b) == 1 countC(k,b) = countC(k,b)+1; end end end end end end sumsza = sum(countC,1) % 30303 17512 countC(:,1) = countC(:,1)./sumsza(1); countC(:,2) = countC(:,2)./sumsza(2); for k=2:100 countC(k,1) = countC(k,1) + countC(k-1,1); countC(k,2) = countC(k,2) + countC(k-1,2); end %%%%%%%% model D(NCAR) NX = NXD NY = NYD block = blockD; cosy = cosD; countD(1:100,1:2) =0; for i=1:NX for j=1:NY for t=1:24 ishift = floor(t*NX/24.); ii = i + ishift; if ii>NX ii = ii-NX; end if cosy(ii,j) > SZA0 k=max(floor(100*cosy(ii,j)),1); for b=1:2 if block(i,j,b) == 1 countD(k,b) = countD(k,b)+1; end end end end end end sumsza = sum(countD,1) % 131521 74098 countD(:,1) = countD(:,1)./sumsza(1); countD(:,2) = countD(:,2)./sumsza(2); for k=2:100 countD(k,1) = countD(k,1) + countD(k-1,1); countD(k,2) = countD(k,2) + countD(k-1,2); end %%%%%%%% CAFS Blocks = 3; LAT1 = [ -20; +20; -55]; LAT2 = [ +20; +50 +55]; LON1 = [ 160; 170; 0]; LON2 = [ 240; 225; 360]; blockX(1:M,1:Blocks) = int16(0); for i=1:M for b=1:Blocks if XXlat(i)>=LAT1(b) & XXlat(i)<=LAT2(b) if XXlon(i)>=LON1(b) & XXlon(i)<=LON2(b) blockX(i,b) = 1; end end end end countX(1:100,1:2) =0; for i=1:M if XXsza(i) > SZA0 k=max(floor(100*XXsza(i)),1); for b=1:2 if blockX(i,b) == 1 countX(k,b) = countX(k,b) + 1; % [i,b,k] end end end end sumsza = sum(countX,1) % 10464 4643 countX(:,1) = countX(:,1)./sumsza(1); countX(:,2) = countX(:,2)./sumsza(2); for k=2:100 countX(k,1) = countX(k,1) + countX(k-1,1); countX(k,2) = countX(k,2) + countX(k-1,2); end %%%%%%%%%%%%%% plot of the cum prob dist of cos(SZA's) plotX = 1:100; hold off figure(2) hold on set(gcf, 'units','normalized','outerposition',[0.2 0.2 0.6 0.5]); figure(gcf) for r=1:2 subplot(1,2,r) hold on set(gca, 'YLim',[0 1], 'YTick', 0:0.1:1) set(gca, 'XLim',[0 100], 'XTick', 0:10:100) set(gca, 'FontSize',12, 'LineWidth',1) box on grid on plot(plotX,countX(:,r),'-r','LineWidth',2) plot(plotX,countC(:,r),'-b','LineWidth',2) plot(plotX,countD(:,r),'-g','LineWidth',1) legend('CAFS','UCI ','NCAR') legend('Location','NorthWest') xlabel('cos(SZA) x 100') ylabel('cum prob dist') title('Tropical Pacific & North Pacific') end %%%%%%%%%%%%% prob dist of SZAs #2 countXX(1,:) = countX(1,:); countCC(1,:) = countC(1,:); countDD(1,:) = countD(1,:); for j=2:10 countXX(j,:) = countX(10*j,:) - countX(10*j-10,:); countCC(j,:) = countC(10*j,:) - countC(10*j-10,:); countDD(j,:) = countD(10*j,:) - countD(10*j-10,:); end countXX(1,:) = countX(10,:) - countX(1,:); countCC(1,:) = countC(10,:) - countC(1,:); countDD(1,:) = countD(10,:) - countD(1,:); countXX countCC countDD plotXX = 5:10:95; hold off figure(3) hold on set(gcf, 'units','normalized','outerposition',[0.2 0.2 0.6 0.5]); figure(gcf) for r=1:2 subplot(1,2,r) hold on set(gca, 'YLim',[0 0.5], 'YTick', 0:0.1:0.5) set(gca, 'XLim',[0 100], 'XTick', 0:10:100) set(gca, 'FontSize',12, 'LineWidth',1) box on grid on plot(plotXX,countCC(:,r),'.b','LineWidth',2,'MarkerSize',40) plot(plotXX,countDD(:,r),'.g','LineWidth',1,'MarkerSize',30) plot(plotXX,countXX(:,r),'.r','LineWidth',2,'MarkerSize',40) legend('UCI ','NCAR','CAFS') legend('Location','NorthWest') xlabel('cos(SZA) x 100') ylabel('cum prob dist') title('Tropical Pacific & North Pacific') end %%%%%%%%%%%%% results of PDFs of SZAs reported (only for cosSZA>0.01) %%% Cumulative PDF >> [countC countD countX] %%% UCI TrPac N.Pac NCAR TrPac N.Pac CAFS TrPac N.Pac ans = 0 0 0 0 0 0 0.0064 0.0074 0.0071 0.0073 0 0 0.0123 0.0149 0.0127 0.0150 0 0 0.0203 0.0218 0.0210 0.0224 0 0 0.0267 0.0299 0.0270 0.0303 0 0 0.0334 0.0372 0.0336 0.0379 0 0 0.0403 0.0452 0.0409 0.0462 0 0 0.0470 0.0527 0.0471 0.0532 0 0 0.0545 0.0606 0.0544 0.0608 0 0 0.0611 0.0685 0.0607 0.0686 0 0 0.0671 0.0749 0.0672 0.0745 0 0 0.0744 0.0827 0.0747 0.0826 0 0 0.0809 0.0903 0.0812 0.0896 0 0 0.0874 0.0976 0.0879 0.0968 0 0 0.0947 0.1046 0.0950 0.1037 0 0 0.1013 0.1122 0.1020 0.1106 0 0 0.1089 0.1195 0.1092 0.1174 0 0 0.1149 0.1263 0.1153 0.1248 0 0 0.1213 0.1336 0.1225 0.1324 0 0 0.1293 0.1406 0.1291 0.1394 0 0 0.1359 0.1474 0.1358 0.1471 0 0 0.1439 0.1546 0.1437 0.1548 0 0 0.1511 0.1633 0.1504 0.1634 0 0 0.1584 0.1713 0.1577 0.1713 0 0 0.1657 0.1794 0.1649 0.1790 0 0 0.1725 0.1883 0.1722 0.1872 0 0 0.1790 0.1971 0.1793 0.1949 0 0 0.1858 0.2056 0.1863 0.2027 0 0 0.1932 0.2133 0.1938 0.2099 0 0 0.1999 0.2200 0.2005 0.2170 0 0 0.2067 0.2264 0.2075 0.2249 0 0 0.2142 0.2318 0.2147 0.2324 0 0 0.2226 0.2394 0.2223 0.2398 0 0 0.2290 0.2449 0.2293 0.2467 0 0 0.2372 0.2535 0.2369 0.2542 0 0 0.2449 0.2595 0.2440 0.2594 0 0 0.2514 0.2667 0.2512 0.2667 0.0162 0 0.2593 0.2755 0.2587 0.2756 0.0206 0 0.2667 0.2853 0.2657 0.2832 0.0260 0 0.2736 0.2968 0.2740 0.2927 0.0320 0 0.2806 0.3034 0.2809 0.2984 0.0392 0 0.2882 0.3102 0.2890 0.3059 0.0460 0 0.2946 0.3171 0.2961 0.3156 0.0530 0 0.3032 0.3271 0.3042 0.3272 0.0597 0 0.3111 0.3324 0.3116 0.3347 0.0804 0 0.3189 0.3402 0.3198 0.3418 0.0853 0 0.3274 0.3508 0.3274 0.3507 0.0896 0 0.3368 0.3623 0.3358 0.3603 0.0950 0 0.3437 0.3702 0.3435 0.3671 0.1011 0 0.3529 0.3775 0.3525 0.3742 0.1070 0 0.3605 0.3868 0.3601 0.3835 0.1137 0 0.3759 0.4031 0.3757 0.3995 0.1236 0 0.3759 0.4031 0.3757 0.3995 0.1344 0 0.3842 0.4087 0.3847 0.4060 0.1449 0 0.3923 0.4169 0.3928 0.4152 0.1549 0 0.4005 0.4262 0.4016 0.4243 0.1647 0 0.4091 0.4333 0.4105 0.4347 0.1729 0 0.4274 0.4524 0.4277 0.4509 0.1812 0 0.4274 0.4524 0.4277 0.4509 0.1905 0 0.4365 0.4625 0.4362 0.4607 0.2028 0 0.4461 0.4738 0.4453 0.4715 0.2155 0.0009 0.4561 0.4824 0.4549 0.4802 0.2258 0.0098 0.4632 0.4931 0.4629 0.4901 0.2365 0.0220 0.4724 0.5035 0.4723 0.5005 0.2474 0.0326 0.4820 0.5138 0.4822 0.5107 0.2574 0.0426 0.4906 0.5236 0.4912 0.5216 0.2668 0.0525 0.5015 0.5333 0.5018 0.5317 0.2759 0.0623 0.5102 0.5421 0.5111 0.5404 0.2864 0.0723 0.5207 0.5517 0.5216 0.5504 0.3001 0.0824 0.5305 0.5635 0.5314 0.5615 0.3147 0.0927 0.5414 0.5757 0.5417 0.5725 0.3300 0.1032 0.5532 0.5876 0.5534 0.5834 0.3476 0.1137 0.5641 0.5994 0.5638 0.5946 0.3662 0.1247 0.5760 0.6115 0.5757 0.6064 0.3830 0.1356 0.5871 0.6240 0.5873 0.6198 0.4001 0.1471 0.5991 0.6349 0.5996 0.6311 0.4178 0.1643 0.6104 0.6489 0.6109 0.6446 0.4351 0.1769 0.6219 0.6630 0.6229 0.6584 0.4525 0.1896 0.6349 0.6781 0.6360 0.6738 0.4704 0.2028 0.6488 0.6952 0.6500 0.6900 0.4890 0.2163 0.6638 0.7144 0.6644 0.7071 0.5084 0.2304 0.6815 0.7350 0.6819 0.7271 0.5282 0.2450 0.6969 0.7522 0.6982 0.7445 0.5492 0.2605 0.7164 0.7687 0.7163 0.7619 0.5711 0.2818 0.7318 0.7829 0.7331 0.7804 0.5937 0.3187 0.7495 0.8028 0.7499 0.7997 0.6172 0.3590 0.7653 0.8204 0.7662 0.8163 0.6433 0.4044 0.7835 0.8370 0.7829 0.8339 0.6812 0.4502 0.8034 0.8563 0.8035 0.8524 0.7065 0.4961 0.8200 0.8731 0.8189 0.8686 0.7384 0.5443 0.8361 0.8896 0.8355 0.8858 0.7827 0.5984 0.8514 0.9042 0.8521 0.9036 0.8282 0.6648 0.8686 0.9198 0.8700 0.9192 0.8523 0.7643 0.8871 0.9374 0.8868 0.9360 0.8705 0.8910 0.9062 0.9524 0.9053 0.9500 0.8868 1.0000 0.9247 0.9656 0.9240 0.9640 0.9054 1.0000 0.9422 0.9775 0.9425 0.9785 0.9281 1.0000 0.9625 0.9915 0.9628 0.9912 0.9656 1.0000 0.9848 1.0000 0.9845 0.9997 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 >> %%%% differentiated PDF for every 10 units in 100*cos(SZA) countXX = countCC = countDD = 0 0 0.0611 0.0685 0.0607 0.0686 0 0 0.0682 0.0721 0.0684 0.0708 0 0 0.0707 0.0793 0.0714 0.0776 0.0320 0 0.0737 0.0768 0.0734 0.0758 0.0750 0 0.0792 0.0807 0.0785 0.0815 0.0958 0 0.0836 0.0850 0.0837 0.0865 0.1119 0.0927 0.0941 0.1010 0.0952 0.1007 0.1742 0.1236 0.1182 0.1317 0.1186 0.1285 0.2495 0.3280 0.1712 0.1779 0.1688 0.1786 0.2616 0.4557 0.1800 0.1269 0.1811 0.1314 >>