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

Method definition for gsw_z_from_p is too strict #26

Open
haakon-e opened this issue Dec 3, 2022 · 2 comments
Open

Method definition for gsw_z_from_p is too strict #26

haakon-e opened this issue Dec 3, 2022 · 2 comments

Comments

@haakon-e
Copy link
Contributor

haakon-e commented Dec 3, 2022

According to the TEOS-10 documentation for gsw_z_from_p [link], geo_strf_dyn_height, sea_surface_geopotential should be optional arguments, but in this package, they are mandatory.

function gsw_z_from_p(p, lat, geo_strf_dyn_height, sea_surface_geopotential)
ccall((:gsw_z_from_p, libgswteos), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble), p, lat, geo_strf_dyn_height, sea_surface_geopotential)
end

@b-r-hamilton
Copy link

I believe I was able to fix this by adding the function definition on a local version of GibbsSeaWater.jl
function gsw_z_from_p(p, lat) ccall((:gsw_z_from_p, libgswteos), Cdouble, (Cdouble, Cdouble), p, lat) end
in the gen_gswteos10.jl file. Not sure if there is some issue with this solution, but happy to create a pull request if it would be useful.

@kouketsu
Copy link
Collaborator

Thanks for your suggestion @haakon-e.
Thanks for your comment @b-r-hamilton.
Actually, I plan to update them together with binary upgrades (but BinaryBuilding system is down now, please wait).

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

3 participants