A dispersion compensating method for carrying out automatic level control
with the use of target output power and an ASE correction value
corresponding to the number of wavelengths to multiplex and making output
power of a wavelength multiplexed signal constant, comprising the steps
of: switching into automatic gain control in which the output power of
the wavelength multiplexed signal is made constant, to carry out
increase/decrease of the wavelengths to multiplex; varying a dispersion
compensating amount based on the increase/decrease of the wavelengths by
the automatic gain control; calculating an ASE variation amount due to
the change in the dispersion compensating amount; and reflecting the ASE
variation amount on the ASE correction value and switching into the
automatic level control.