TEOS-10 / python-gsw

Python implementation of the Thermodynamic Equation Of Seawater - 2010 (TEOS-10)
MIT License
45 stars 22 forks source link

specvol() 75-term #31

Closed castelao closed 7 years ago

castelao commented 7 years ago

specvol() based on 75-term equation

doctest values obtained from GSW-Matlab 3.0.5

Temporarily disabling test_profile on specvol. This is not the best way to do it, but test_profile was meant for 48-term and looks like it wasn't validated for Matlab's specvol anyways. Therefore, approval of test_profile() doesn't guarantee it is correct anyways.

Once there are more converted functions, it would be a good idea to update and reactivate test_profile for specvol().

There are more functions ready to PR. I'm submitting this first as a test.

efiring commented 7 years ago

@ocefpaf I guess I'm 80% committed to an eventual hybrid in which at least the core functions with the polynomials are wrapped C, but the functions like Nsquared and the geostrophic calculations are reimplemented in Python. I think this gives us the best of both worlds. There is a major performance and memory advantage in using C for the the big polynomials, in addition to the advantage of reducing the number of different codebases in which they are defined.

efiring commented 7 years ago

It looks like the git commit history is a bit confusing, with all the merges. Maybe this can all be fixed up via a "rebase -i" on current master?

ocefpaf commented 7 years ago

@efiring I believe you can squash and merge with GitHub interface now if that is an acceptable solution for simplifying the commit history here.