function yd = julianday_fun(day,month,year)
%DAYOFYEAR Ordinal number of day in a year.
%


	anyobisiesto=[1936:4:2100];
	clear si,si=find(year==anyobisiesto);

	if isempty(si)==1  %Anyo normal
   	days_in_prev_months = [0 31 59 90 120 151 181 212 243 273 304 334];
	else
	days_in_prev_months = [0 31 59+1 90+1 120+1 151+1 181+1 212+1 243+1 273+1 304+1 334+1];
	end

   % Day in given month.
   yd = days_in_prev_months(month) + day;          

