def _adjust_doy(doys, start, freq):
    """Adjust the day of year based on start day.

    Args:
        doys (numpy.ndarray): an array of DOY.
        start (int): a start DOY.
        freq (int): the frequency of the year, e.g. 365.

    Returns:
        list: an array of adjusted DOYs.
    """
    doys = list(map(lambda doy: doy - start, doys))
    doys = list(map(lambda doy: doy if doy >= 0 else doy + start + freq - start, doys))
    return doys