%% cond_cal.m : get calibration coefficients for SeaBird Conductivity sensors
%% input is conductivity sensor serial number 

function [c_a, c_b, c_c, c_d, c_m, CPcor] = cond_cal(condserial);

% use if mission run BEFORE 24 July 2002
if condserial==2478.1;
 fprintf('     Conductivity sensor SN 2478 (PRIOR to 24 July 2002)\n');
 %% ABCDM coefficients
 c_a = 1.55948296e-03;
 c_b = 1.51788405;
 c_c = -10.4754563;
 c_d = -8.45139917e-05;
 c_m = 2.9;
 CPcor = -9.57e-08;

% use if mission run AFTER 24 July 2002
elseif condserial==2478;
 fprintf('     Conductivity sensor SN 2478\n');
 %% ABCDM coefficients
 c_a = 3.59079939e-05;
 c_b = 1.52354114;
 c_c = -10.4913635;
 c_d = -8.44130197e-05;
 c_m = 4.4;
 CPcor = -9.57e-08;

% use if mission run BEFORE 24 July 2002
elseif condserial==2514.1;
 fprintf('     Conductivity sensor SN 2514 (PRIOR to 24 July 2002)\n');
 %% ABCDM coefficients
 c_a = 1.13996214e-04;
 c_b = 1.61186242;
 c_c = -10.6381051;
 c_d = -8.83995606e-05;
 c_m = 3.9;
 CPcor = -9.57e-08;

% this sensor's current calibration coeffients
elseif condserial==2514;
 fprintf('     Conductivity sensor SN 2514\n');
 %% ABCDM coefficients
 c_a = 1.77632750e-06;
 c_b = 1.61391254;
 c_c = -10.6475979;
 c_d = -8.69082283e-05;
 c_m = 5.8;
 CPcor = -9.57e-08;
 
elseif condserial==2258;
 fprintf('     Conductivity sensor SN 2258\n');
 %% ABCDM coefficients
 c_a = 2.85475358e-22;
 c_b = 1.56709467;
 c_c = -10.6453205;
 c_d = -1.09885720e-05;
 c_m = 23.7;
 CPcor = -9.57e-08;
  
elseif condserial==2405;
 fprintf('     Conductivity sensor SN 2405\n');
 %% ABCDM coefficients
 c_a = 2.80551784e-04;
 c_b = 1.59349759;
 c_c = -10.9374861;
 c_d = -8.48450433e-05;
 c_m = 3.5;
 CPcor = -9.57e-08;

else
 fprintf(' !!! Error: Unknown Conductivity Sensor Serial Number\n'); return
end
