def kNH3_TOT_CW95(TempK, Sal):
    """Ammonium association constant following CW95."""
    PKNH3expCW = 9.244605 - 2729.33 * (1 / 298.15 - 1 / TempK)
    PKNH3expCW += (0.04203362 - 11.24742 / TempK) * Sal ** 0.25
    PKNH3expCW += (-13.6416 + 1.176949 * TempK ** 0.5 - 0.02860785 * TempK +
        545.4834 / TempK) * Sal ** 0.5
    PKNH3expCW += (-0.1462507 + 0.0090226468 * TempK ** 0.5 - 0.0001471361 *
        TempK + 10.5425 / TempK) * Sal ** 1.5
    PKNH3expCW += (0.004669309 - 0.0001691742 * TempK ** 0.5 - 0.5677934 /
        TempK) * Sal ** 2
    PKNH3expCW += (-2.354039e-05 + 0.009698623 / TempK) * Sal ** 2.5
    KNH3 = 10.0 ** -PKNH3expCW
    KNH3 = KNH3 * (1 - 0.001005 * Sal)
    return KNH3
