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

gsw_ct_freezing / gsw_t_freezing wrapper functions #4

Open
hylandg opened this issue Nov 26, 2014 · 2 comments
Open

gsw_ct_freezing / gsw_t_freezing wrapper functions #4

hylandg opened this issue Nov 26, 2014 · 2 comments

Comments

@hylandg
Copy link
Member

hylandg commented Nov 26, 2014

gsw_ct_freezing / gsw_t_freezing are now wrapper functions around the specific gsw_ct_freezing_poly / gsw_t_freezing_poly and gsw_ct_freezing_exact / gsw_t_freezing_exact functions. The wrapper functions have an optional logical flag (exact) that allows selection of the specific _poly (exact=.false. [default]) or the _exact (exact=.true.) functions. This allows maximum flexibility - the specific _poly or _exact routines can be called directly, or in a programatically controlled fashion via the wrapper.

@hylandg
Copy link
Member Author

hylandg commented Apr 2, 2017

Made _exact the default in commit d01d63a (and I should have made this comment and the following at that time).

Note that the _exact versions are for internal use only (they are not and will not be listed in the official documentation - for reasons I still don't understand). I created them specifically to make the code more readable - all the Fortran GSW functions call either the _exact or _poly routines. Users, however, will call the _poly version, or gsw_ct_freezing or gsw_t_freezing for the _exact version.

@PaulMBarker
Copy link
Member

The poly function is ridiculously accurate, from memory, the difference between the exact version and the polynomial version is less that the errors made in the fitting of the original data for the exact.

The poly version is so much quicker to run.

mer-a-o pushed a commit to JCSDA/GSW-Fortran that referenced this issue Nov 3, 2021
Change-Id: Ie9ab863fa44220e65c36eb4bc10472b52137685e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants