<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def doymax(da):
 """Return the day of year of the maximum value."""

    i = da.argmax(dim='time')
    out = da.time.dt.dayofyear[i]
    out.attrs['units'] = ''
    return out