def precip_to_energy(prec):
    """Convert precip to W/m2

    Parameters
    ---------
    prec : (mm/day)
    """
    density_water = 1000
    Lv = 2.51e6
    coef = density_water / 1000 / 86400 * Lv
    return coef * prec