File Exchange

image thumbnail

Water Salinity from Pressure and Conductivity of the water

version 2.0.0.1 (119 KB) by Gabriel Ruiz Martinez
A simple script which computes the water salinity from pressure and conductivity of water data.

4 Downloads

Updated 18 Jan 2021

View Version History

View License

In order to know the water salinity, the script uses the Fofonnoff and Millard equation.
The inputs are:
- Pressure of the water, db.
- Water conductivity, mS/cm.
- Temperature of the water, ºC.
Generally, these physical variables are measured, using a CTD.

Cite As

Gabriel Ruiz Martinez (2021). Water Salinity from Pressure and Conductivity of the water (https://www.mathworks.com/matlabcentral/fileexchange/32176-water-salinity-from-pressure-and-conductivity-of-the-water), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

Bobby Fischer

clc
lon=30;
conduc=linspace(0,2000,lon);
sali=zeros(1,lon);
for k=1:lon
sali(k)=conduc2sali(30,0,conduc(k));
end
figure(1)
close(1)
figure(1)
plot(sali,conduc)
xlabel('salinity')
ylabel('conductivity')
% Can conductivity drop this quickly with salinity?

Nadia Lo Bue

Running the code typing [S]= conduc2sali(C,T,P) this error occurs
Error using *
Inner matrix dimensions must agree.

Error in conduc2sali (line 43)
RT35 = (((c3+c4*T)*T+c2)*T+c1)*T+c0;

Running from Run button it "Review the inputs.."
Anyone had the same problem?

Cesar Canul

The script works fine if you modify lines 2 and 3 to:
cnd = C / 42,914;
R = cnd

Ben Phillips

output unit would be helpful

Alex

Me

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!