Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export all functions starting with gsw_ #6

Closed
Alexander-Barth opened this issue Dec 16, 2019 · 2 comments
Closed

export all functions starting with gsw_ #6

Alexander-Barth opened this issue Dec 16, 2019 · 2 comments

Comments

@Alexander-Barth
Copy link
Member

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
Copy link
Collaborator

ax1ine commented Dec 16, 2019

I think it's a good idea!

@Alexander-Barth
Copy link
Member Author

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.

Alexander-Barth added a commit that referenced this issue Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants