Skip to main content

Seawater Library for Python

Project description

https://badge.fury.io/py/seawater.png https://api.travis-ci.org/pyoceans/python-seawater.png?branch=master https://zenodo.org/badge/doi/10.5281/zenodo.11395.png http://bottlepy.org/docs/dev/_static/Gittip.png

This is a Python re-write of the CSIRO seawater toolbox (SEAWATER-3.3) for calculating the properties of sea water. The package uses the formulas from Unesco’s joint panel on oceanographic tables and standards, UNESCO 1981 and UNESCO 1983 (EOS-80).

The EOS-80 library is considered now obsolete; it is provided here for compatibility with old scripts, and to allow a smooth transition to the new TEOS-10.

Warning

The Python version default output unit for sw.dist is ‘km’ instead of ‘nm’.

Here we assume pressure as the first dimension, i.e. M pressure by N positions (See the table below). The MatlabTM version does some guessing at this that we simply ignore to avoid confusions.

P

S

T

10

34.5487

28.7856

50

34.7275

28.4329

125

34.8605

22.8103

250

34.6810

10.2600

600

34.5680

6.8863

1000

34.5600

4.4036

The current version was tested against the MatlabTM seawater v3.3 reproducing all functions and results from that release.

More information at http://pythonhosted.org/seawater

Changelog

Version 3.3.3

  • Unified code base for python 2 and 3, we no longer use 2to3 to convert.

Version 3.3.2

  • Fixed py3k bug that prevent installation.

Version 3.3.1

  • Both gpan and bfrq accepts 3D arrays now.

  • Fixed inconsistency in use of ITS-90 and increased convergence precision from 1e-4 to 1e-10 for cndr. Note: Not sure if this fix is needed. However, it is in the original version!

Version 3.2

  • Corrected sign of potential vorticity in bfrq.

Version 3.1

  • Added swvel to compute surface wave velocity.

Version 3.0

  • Converted code so that temperature is now ITS-90 throughout.

Version 2.0.2

  • Coding changes to enable functions to return the same shape vector as the input arguments. In previous releases, some functions returned column vectors for row vector input. Also some other tidying up.

Version 2.0.1

  • New routine satAr. Solubility of Ar in seawater.

  • New routine satN2. Solubility of N2 in seawater.

  • New routine satO2. Solubility of O2 in seawater.

  • Updated test to include tests for above.

Version 1.2e

  • Fixed bug in alpha where temp used in calculations regardless of the keyword.

Version 1.2d

  • bfrq now also returns potential vorticity. Thanks to Greg Johnson (gjohnson@pmel.noaa.gov).

  • OMEGA=7.29e-5 was changed to OMEGA=7.292e-5 in gvel to be consistent with f.

  • Important API change: The usage of alpha, beta and aonb routines has changed! All these routines expect (S,T,P) to be passed instead of (S,PTMP,P) as in previous releases of seawater. Fast execution can still be obtained by passing ptmp=True.

Version 1.2c

  • Fixed a bug in bfrq where empty LAT was needed as argument when no latitude values are being passed.

  • Now pass PRESSURE instead of DEPTH, more consistent though only a negligible change is answers.

Version 1.2b

  • First official release and announcement on the networks.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seawater-3.3.3.tar.gz (22.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page