lat=37.2
(fSolD(lat,dn=100))
lat=-37.2
(fSolD(lat,dn=283))
#Declination angle along the year
SolD<-fSolD(lat,BTd=fBTd())
library(lattice)
xyplot(decl~DiaAno,data=SolD,type='l')
#Calculation of the daylength for several latitudes
SolD<-data.frame()
for (i in c(-60,-40,-20,0,20,40,60)){
if (i>0) {NomLat=paste(i,'N',sep='')} else
if (i<0) {NomLat=paste(abs(i),'S',sep='')} else NomLat="0";
SolDaux<-fSolD(lat=i,BTd=fBTd(Modo='Serie'));
SolD<-rbind(SolD,data.frame(SolDaux,Lat=NomLat));}
p<-xyplot(12/pi*2*abs(ws)~DiaAno,
data=SolD,groups=factor(Lat),
xlab='dn',ylab=expression(omega[s] (h)),
type='l')
library(latticedl)
print(direct.label(p,method=last.points));
Run the code above in your browser using DataLab