def elvlcWrite(info, outfile=None, addLvl=0):
    """
    Write Chianti data to .elvlc file.

    Parameters
    ----------
    info : `dict`
        Information about the Chianti data to write. Should contain
        the following keys: ionS, the Chianti style name of the ion such as c_4
        conf, an integer denoting the configuration - not too essential
        term, a string showing the configuration
        spin, an integer of the spin of the state in LS coupling
        l, an integer of the angular momentum quantum number
        spd, an string for the alphabetic symbol of the angular momemtum, S, P, D, etc
        j, a floating point number, the total angular momentum
        ecm, the observed energy in inverse cm, if unknown, the value is 0.
        eryd, the observed energy in Rydbergs, if unknown, the value is 0.
        ecmth, the calculated energy from the scattering calculation, in inverse cm
        erydth, the calculated energy from the scattering calculation in Rydbergs
        ref, the references in the literature to the data in the input info
    outfile : `str`
        Output filename. ionS+'.elvlc' (in current directory) if None
    addLvl : `int`
        Add a constant value to the index of all levels

    Notes
    -----
    For use with files created before elvlc format change in November 2012

    See Also
    --------
    ChiantiPy.tools.io.elvlcWrite : Write .elvlc file using the new format.
    """
    if outfile:
        elvlcName = outfile
    else:
        elvlcName = info['ionS'] + '.elvlc'
    print(' elvlc file name = %s' % elvlcName)
    out = open(elvlcName, 'w')
    for i, conf in enumerate(info['conf']):
        mult = int(2.0 * info['j'][i] + 1.0)
        thisTerm = info['term'][i].ljust(14)
        pstring = '%3i%6s%15s%3i%3i%2s%5.1f%3i%15.3f%15.6f%15.3f%15.6f \n' % (
            i + 1 + addLvl, conf, thisTerm, info['spin'][i], info['l'][i],
            info['spd'][i], info['j'][i], mult, info['ecm'][i], info['eryd'
            ][i], info['ecmth'][i], info['erydth'][i])
        out.write(pstring)
    out.write(' -1\n')
    out.write('%filename:  ' + elvlcName + '\n')
    for one in info['ref']:
        out.write(one + '\n')
    out.write(' -1\n')
    out.close()
