day_of_year
Calculates the day of the year given month, day, and year.
Prototype
function day_of_year ( year : integer, month : integer, day : integer ) return_val [dimsizes(year)] : integer
Arguments
yearA multi-dimensional integer array or scalar value representing years. Values must be >= 0.
monthAn integer array of the same size as year representing months of the year. Values must be 1 to 12.
dayAn integer array of the same size as year representing days of the month. Values must be 1 to 31.
Return value
A integer array of the same size as year where each value represents the day of the year (Gregorian calendar).
Description
This function calculates the day of the year given month, day, and year.
See Also
day_of_week, days_in_month, monthday, isleapyear
Examples
Example 1
doy = day_of_year((/1996,1990/),(/3,3/),(/1,1/)) ; doy = (/61,60/).