A disk drive is disclosed that estimates a sinusoidal error in a wedge
time period due to eccentricity in the disk rotating to generate
eccentricity compensation values. During a write operation a head is
positioned over a target data sector within a target track, a write clock
frequency is set using an eccentricity compensation value corresponding
to the target data sector, and data is written to the target data sector
using the write clock frequency. In this manner, the eccentricity
compensation value adjusts the write clock frequency to better optimize
the linear bit density from the inner to outer diameter tracks.