% nauru
%jdy is julian day (decimal)
%lat and lon are decimal latitude and longitude
%calls SolarRadiance
	%
p=1010;%pressure
k1=.001;%aerosol optical depth, band 1
k2=.001;%aerosol optical depth, band 2
oz=0.2;
qsav=1;
latq=-.53;
lonq=166.9;
watvap=iv;
ii=find(isnan(iv));watvap(ii)=qa(ii)/4.75;
;%3;%total column water vapor
jdx=floor(jdy+2.5/60/24);%julian day

tutc=(jdy+5/60/24-jdx)*24;%0:1:23;%hour of the day
[n m]=size(tutc);
clear sw sz saz dirs sky;
[sw,sz,saz,dirs,sky] = SolarRadiance(lat,lon,jdx,tutc,watvap,p,k1,k2,oz);
Rscl=sw;
plot(jdy,Rscl,jdy,rs,'o');xlabel('Julian Day (1999)');ylabel('Downward Solar Flux (W/m^2)');
ss=stdt;axis([ss endt 0 1200]);
