Removed function inside function to improve performance.
Removed function inside function to improve performance.

castelao/python-gsw,lukecampbell/python-gsw,TEOS-10/python-gsw,ocefpaf/python-gsw,rabernat/python-gsw