def read_electric_field(param, filename):
    """
    It reads the information about the incident electric field.

    Arguments
    ---------
    param        : class, parameters related to the surface.
    filename     : name of the file that contains the infromation of the incident
                   electric field. (filname.config)

    Returns
    -------
    electric_field: float, electric field intensity, it is in the 'z'
                          direction, '-' indicates '-z'.
    wavelength   : float, wavelength of the incident electric field.
    """

    electric_field = 0
    wavelength = 0
    with open(filename, 'r') as f:
        lines = f.readlines()
    for line in lines:
        line = line.split()

        if len(line)>0:
            if line[0] == 'WAVE':
                electric_field = param.REAL((line[1]))
                wavelength    = param.REAL((line[2]))

    return electric_field, wavelength