Compute a matrix of monthly average day length

day_length_matrix(year, month, extent, nrows, ncols)

Arguments

year

year for computation. Must be >= 1900

month

month for computation

extent

vector of (xmin, xmax, ymin, ymax)

nrows

number of rows (latitudes) in generated matrix

ncols

number of columns (longitudes) in generated matrix

Value

a matrix of specified dimensions, where each cell represents the day length as a fraction of 24 hours