def freezept(S, P=0):

    """Compute freezing temperature of sea water

    Usage: freezept(S, [P])

    Input:
        S = Salinity,      [psu]
        P = Pressure,      [dbar]
    P is optional, with a default value = 0

    Output:
        T = Freezing point,   [�C]

    Algorithm: UNESCO 1983

    """

    a0 = -0.0575
    a1 =  1.710523e-3
    a2 = -2.154996e-4
    b  = -7.53e-4

    Tf = a0*S + a1*S**1.5 + a2*S**2 + b*P
    return Tf