xarray.DataArray.dt.days_in_year# DataArray.dt.days_in_year# Each datetime as the year plus the fraction of the year elapsed.