def firn_permittivity(rhof, rhoi=917.0, epsi_real=3.12, epsi_imag=-9.5):
    """
    Calculate the dielectric permittivity of firn with the DECOMP mixing model
    Wilhelms (2005), GRL

    Parameters
    ---------
    rhof:           firn density       (kg/m3)
    rhoi:           ice density       (kg/m3)
    epsi_real:      real permittivity of ice (relative)
    epsi_imag:      imaginary permittivity of ice (relative)

    Output
    ---------
    eps_f:          firn permittivity   (relative)
    """
    lhs = 1.0 + rhof / rhoi * ((epsi_real - 1.0j * epsi_imag) ** (1 / 3.0) - 1)
    eps_f = lhs ** 3.0
    return eps_f
