TEOS-10 / GibbsSeaWater.jl

Gibbs-SeaWater (GSW) Oceanographic Toolbox in Julia
http://www.teos-10.org
Other
23 stars 3 forks source link

export all functions starting with gsw_ #6

Closed Alexander-Barth closed 4 years ago

Alexander-Barth commented 4 years ago

Do we agree to export all functions names starting with gsw_ ? Instead of calling GibbsSeaWater.gsw_t_from_ct we would just call gsw_t_from_ct.

ax1ine commented 4 years ago

I think it's a good idea!

Alexander-Barth commented 4 years ago

There are also some function like this: (3 output arguments)

gsw_specvol_alpha_beta(sa::Float64, ct::Float64, p::Float64, specvol, alpha, beta)

In Julia, this would be more convenient:

specvol, alpha, beta = gsw_specvol_alpha_beta(sa::Float64, ct::Float64, p::Float64)
function gsw_specvol_alpha_beta(sa::Float64, ct::Float64, p::Float64)
    specvol = Ref{Float64}()
    alpha = Ref{Float64}()
    beta = Ref{Float64}()
    gsw_specvol_alpha_beta(sa,ct,p,specvol,alpha,beta)
    return specvol,alpha,beta
end

We could choose to export only the 3 input argument function.