function jd=julian(mon,day,year,hour)
%
%     jd=julian(mon,day,year,hour)   where hour is decimal hour (optional)
%	     if the hours are given, then 1,1,85,0000 returns 0, while
%         if no hours are given, then  1,1,85      returns 1.  Get it?
%
%
days=[31 28 31 30 31 30 31 31 30 31 30 31];
if year/4==fix(year/4) 
	days(2)=29;
end
ind=1;
jd=0;
while ind<mon 
	jd=jd+days(ind);
     ind=ind+1;
end
jd=jd+day;
if nargin>3 
	jd=jd-1+hour/24;
end
