Function SBE(CON,T,P) 'Reference: Fofonff, P. and Millard, R.C. Jr. Unesco 1983. ' Algorithms for computation of fundamental properties of seawater. ' Unesco Tech. Pap. in Mar. Sci., No. 44, 53 pp. 'Input: CON - in situ conductivity (mS/cm) ' T - temperature in degree C ' P - pressure in dbars (not SI) ' 'Output S - salinity (pss-78) 'SeaBird default conductivity value at 15 deg C = 42.914 Dim Aa(5) Dim Bb(5) 'Constants A1 = 0.0000207 A2 = -0.000000000637 A3 = 3.989E-15 B1 = 0.03426 B2 = 0.0004464 B3 = 0.4215 B4 = -0.003107 C0 = 0.6766097 C1 = 0.0200564 C2 = 0.0001104259 C3 = -0.00000069698 C4 = 0.0000000010031 Aa(0) = 0.008 Aa(1) = -0.1692 Aa(2) = 25.3851 Aa(3) = 14.0941 Aa(4) = -7.0261 Aa(5) = 2.7081 Bb(0) = 0.0005 Bb(1) = -0.0056 Bb(2) = -0.0066 Bb(3) = -0.0375 Bb(4) = 0.0636 Bb(5) = -0.0144 K = 0.0162 'Conductivity Ratio at 15 degrees C r = CON / 42.914 Rp = 1 + P * (A1 + A2 * P + A3 * P ^ 2) / (1 + B1 * T + B2 * T ^ 2 + B3 * r + B4 * r * T) Rte = C0 + C1 * T + C2 * T ^ 2 + C3 * T ^ 3 + C4 * T ^ 4 Rt = r / (Rp * Rte) 'Salinity calculation S1 = 0 For J = 0 To 5 S1 = S1 + Aa(J) * Rt ^ (J / 2) Next J S2 = 0 For J = 0 To 5 S2 = S2 + Bb(J) * Rt ^ (J / 2) Next J SBE = S1 + (T - 15) / (1 + K * (T - 15)) * S2 End Function