def calc_pKBPB(sal):
    """
    Calculate pKa of dye at sample salinity.

    Eq 17 of Nand & Ellwood (2018, doi:10.1002/lom3.10253)

    Form:
    pKa = pKa(t=35) + A (35 - sal)

    A = 1.74e-3 +/- 0.8e-4

    Parameters
    ----------
    sal : array_like
        Salinity in PSU

    Returns
    -------
    array_like : pKa of dye at specified salinity
    """
    pKa35 = 3.515654103
    A = 0.00174
    return pKa35 + A * (35.0 - sal)
