def ctd_sbe16digi_preswat(p0, t0, C1, C2, C3, D1, D2, T1, T2, T3, T4, T5):
    """
    Description:

        OOI Level 1 Pressure (Depth) data product, which is calculated using
        data from the Sea-Bird Electronics conductivity, temperature and depth
        (CTD) family of instruments.

        This data product is derived from SBE 16Plus instruments outfitted with
        a digiquartz pressure sensor. This applies to the CTDBP-N,O instruments
        only.

    Implemented by:

        2013-05-10: Christopher Wingard. Initial Code.
        2013-05-10: Christopher Wingard. Minor edits to comments.
        2014-01-31: Russell Desiderio. Standardized comment format.
        2014-01-31: Russell Desiderio. Modified algorithm to use pressure [Hz] (pf)
                    to calculate pressure period instead of pressure [counts] (p0).
                    See SeaBird 16Plus V2 User Manual (reference (2)), page 57, item 5.

    Usage:

        p = ctd_sbe16digi_preswat(p0,t0,C1,C2,C3,D1,D2,T1,T2,T3,T4,T5)

            where

        p = sea water pressure (PRESWAT_L1) [dbar]
        p0 = raw pressure (PRESWAT_L0) [counts]
        t0 = raw temperature from pressure sensor thermistor [counts]
        C1 = digiquartz pressure calibration coefficients
        C2 = digiquartz pressure calibration coefficients
        C3 = digiquartz pressure calibration coefficients
        D1 = digiquartz pressure calibration coefficients
        D2 = digiquartz pressure calibration coefficients
        T1 = digiquartz pressure calibration coefficients
        T2 = digiquartz pressure calibration coefficients
        T3 = digiquartz pressure calibration coefficients
        T4 = digiquartz pressure calibration coefficients
        T5 = digiquartz pressure calibration coefficients

    References:

        OOI (2012). Data Product Specification for Pressure (Depth). Document
            Control Number 1341-00020. https://alfresco.oceanobservatories.org/
            (See: Company Home >> OOI >> Controlled >> 1000 System Level >>
            1341-00020_Data_Product_SPEC_PRESWAT_OOI.pdf)

        OOI (2011). SeaBird 16Plus V2 User Manual. 1341-00020_PRESWAT Artifact.
            https://alfresco.oceanobservatories.org/ (See: Company Home >> OOI >>
            >> REFERENCE >> Data Product Specification Artifacts >> 1341-00020_PRESWAT >>
            PRESWAT_SeaBird_16PlusV2_2009.pdf)
    """
    # Convert raw pressure input to frequency [Hz]
    pf = p0 / 256.0

    # Convert raw temperature input to voltage
    tv = t0 / 13107.0

    # Calculate U (thermistor temp):
    U = (23.7 * (tv + 9.7917)) - 273.15

    # Calculate calibration parameters
    C = C1 + C2 * U + C3 * U**2
    D = D1 + D2 * U
    T0 = T1 + T2 * U + T3 * U**2 + T4 * U**3 + T5 * U**4

    # Calculate T (pressure period, in microseconds):
    T = (1.0 / pf) * 1.0e6

    # compute pressure in psi, rescale and compute in dbar and return
    p_psi = C * (1.0 - T0**2 / T**2) * (1.0 - D * (1.0 - T0**2 / T**2))
    p_dbar = (p_psi * 0.689475729) - 10.1325
    return p_dbar