GibbsSeaWater.jl is a Julia wrapper for GSW-C, which is the C implementation of the Thermodynamic Equation of Seawater 2010 (TEOS-10).
Start Julia and issue the following commands:
using Pkg
Pkg.add("GibbsSeaWater")
For arrays, one should use the vectorized "dot" operator:
C = [45.8;34.7]
T = [28.9;22.8]
P = [10.0;50.0]
SP = gsw_sp_from_c.(C,T,P)
Please check the official site and official repository, which provide the official implementations (C/Fortran/Matlab/PHP) and the wrappers.