enzh-CNfrdeeliwitjakorues

Bottle Sample Salinity

Bottle sample salinities are calculated in both PSal (Portasal Data Acquisition program) and DECODR, software developed by SIO-CalCOFI from Fortran source code by Mantyla & Newton.

Visual Basic source code for the calculation of salinity from conductivity :
'two conductivity values, from two Portasal cell fills; averaging 5 cond readings = 10 cond ratio readings total that must agree within 0.0004
    For j = 1 To 2 
      cr2 = cr!(j) * cr!(j)
      sqcr = Sqr(cr!(j))

      deltas = (BathT# - 15#) / (1# + 0.0162 * (BathT# - 15#)) * (0.0005 - 0.0056 * sqcr - 0.0066 * cr!(j) - 0.0375 * cr!(j) * sqcr + 0.0636 * cr2 - 0.0144 * cr2 * sqcr)

      sal!(j) = 0.008 - 0.1692 * sqcr + 25.3851 * cr!(j) + 14.0941 * cr!(j) * sqcr - 7.0261 * cr2 + 2.7081 * cr2 * sqcr + deltas

      With datalog
        .Row = currrow%  'reccnt%
        .Col = 7 + j
        .Text = Format(sal!(j), "0.00000")
       ' .Text = Str(.Col)
      End With
    Next j
    AveSal! = (sal!(1) + sal!(2)) / 2


'References: the practical salinity scale 1978 (the unesco equation of state of seawater) , for lab salinometers

'When IAPSO Standards or Sub Standard are run, any drift! between first value a last value must be removed

  salin(1, 1) = sal(1, 1)
  salin(1, 2) = sal(1, 2)
  For J = 1 To 2
    drift = (sal(1, J) - sal(nta%, J)) / (nta% - 1)
    dri = 0#
    For ic% = 2 To nta%
      If (cr!(ic%, J) > check) Then GoTo 609
      dri = dri + drift
      salin(ic%, J) = sal(ic%, J) + dri + offst
    Next ic%
  Next J


We never see salinities over 44 and sample the same section of ocean so we do not apply different corrections or algorithms.

Origintal Fortran code converted to Visual Basic:

Original Fortran Code:
C         CALCULATE SALINITY
C
         CR2=CR(IB,K)*CR(IB,K)
         SQCR=SQRT(CR(IB,K))
         DELTAS = (T(IB) - 15.) / (1. + 0.0162 * (T(IB) - 15.))
     *         * (0.0005 - 0.0056 * SQCR - 0.0066 * CR(IB,K)
     *         - 0.0375 * CR(IB,K) * SQCR + 0.0636 * CR2
     *         - 0.0144 * CR2 * SQCR)
         SAL(IB,K)= 0.0080 - 0.1692 * SQCR + 25.3851 * CR(IB,K)
     *       + 14.0941 * CR(IB,K) * SQCR - 7.0261 * CR2
     *       + 2.7081 * CR2 * SQCR
     *       + DELTAS

C
C        REFERENCES: THE PRACTICAL SALINITY SCALE 1978 (THE UNESCO
C                 EQUATION OF STATE OF SEAWATER), FOR LAB SALINOMETERS

C      WHEN COPENHAGEN SAMPLES ARE RUN, ANY DRIFT BETWEEN FIRST VALUE AND
C      LAST VALUE MUST BE REMOVED
C
      DO 610 K=1,2
         DRIFT=(SAL(1,K)-SAL(NTA,K))/(NTA-1)
         DRI=0.
         DO 609 IC=2,NTA
            IF(CR(IC,K) .GE. CHECK) GO TO 609
            DRI=DRI+DRIFT
            SALIN(IC,K)=SAL(IC,K)+DRI + OFFST
 609     CONTINUE
 610  CONTINUE

Seabird Salinity Algorithm (from Seasoft 7.23.1)

Practical Salinity = [PSU]
(Salinity is PSS-78, valid from 2 to 42 psu.)
Note: Absolute Salinity (TEOS-10) is available in our seawater calculator, SeaCalc III. All other SBE Data Processing modules output only Practical Salinity, and all parameters derived from salinity in those modules (density, sound velocity, etc.) are based on Practical Salinity.  
Salinity calculation:
Using the following constants
A1 = 2.070e-5, A2 = -6.370e-10, A3 = 3.989e-15, B1 = 3.426e-2, B2 = 4.464e-4, B3 = 4.215e-1, B4 = -3.107e-3, C0 = 6.766097e-1, C1 = 2.00564e-2, C2 = 1.104259e-4, C3 = -6.9698e-7, C4 = 1.0031e-9
C Computer Code –
static double a[6] = { /* constants for salinity calculation */
 0.0080, -0.1692, 25.3851, 14.0941, -7.0261, 2.7081
};
static double b[6]={ /* constants for salinity calculation */
 0.0005, -0.0056, -0.0066, -0.0375, 0.0636, -0.0144
};
double Salinity(double C, double T, double P)  /* compute salinity */
// C = conductivity S/m, T = temperature deg C ITPS-68, P = pressure in decibars
{
 double R, RT, RP, temp, sum1, sum2, result, val;
 int i;
 if (C <= 0.0)
  result = 0.0;
 else {
  C *= 10.0; /* convert Siemens/meter to mmhos/cm */
  R = C / 42.914;
  val = 1 + B1 * T + B2 * T * T + B3 * R + B4 * R * T;
  if (val) RP = 1 + (P * (A1 + P * (A2 + P * A3))) / val;
  val = RP * (C0 + (T * (C1 + T * (C2 + T * (C3 + T * C4)))));
  if (val) RT = R / val;
  if (RT <= 0.0) RT = 0.000001;
  sum1 = sum2 = 0.0;
  for (i = 0;i < 6;i++) {
   temp = pow(RT, (double)i/2.0);
   sum1 += a[i] * temp;
   sum2 += b[i] * temp;
  }
   val = 1.0 + 0.0162 * (T - 15.0);
  if (val)
   result = sum1 + sum2 * (T - 15.0) / val;
  else
   result = -99.;
 }
return result;
}

Go to top
Our website is protected by DMC Firewall!