def METHOD_NAME(diurnal_cycle_cube):
    """Test amplitude of diurnal cycle when coords are given in cube."""
    assert not diurnal_cycle_cube.coords('day_of_year')
    assert not diurnal_cycle_cube.coords('year')
    iris.coord_categorisation.add_day_of_year(diurnal_cycle_cube, 'time')
    iris.coord_categorisation.add_year(diurnal_cycle_cube, 'time')
    amplitude_cube = amplitude(diurnal_cycle_cube, ['day_of_year', 'year'])
    assert amplitude_cube.shape == (730,)
    assert amplitude_cube.coords('day_of_year')
    assert amplitude_cube.coords('year')
    np.testing.assert_allclose(amplitude_cube.data, DIURNAL_CYCLE_AMPLITUDE)
    assert amplitude_cube.metadata == diurnal_cycle_cube.metadata