File Exchange

## t-s diagram

version 1.0.0.0 (527 Bytes) by Vihang bhatt

### Vihang bhatt (view profile)

draws a t-s diagram for given temperature and salinity data

Updated 16 Apr 2009

t-s diagram is very useful for determining water mass property in physical oceanography. This program helps to plot the T-S diagram with density contours in the background.

it used external code sw_dens() available from sea water toolbox of csiro

### Cite As

Vihang bhatt (2020). t-s diagram (https://www.mathworks.com/matlabcentral/fileexchange/23796-t-s-diagram), MATLAB Central File Exchange. Retrieved .

SungHyun Cho

Thanks!!!

Pingyang Li

### Pingyang Li (view profile)

Hi, could you please change the density to be potential density?

SFigueroa

### SFigueroa (view profile)

I think theta stands for potential temperature, a variable used to account for the slight compressibility of seawater.
The code calls on the csiro seawater toolbox (needed to run the code, available at: http://www.cmar.csiro.au/datacentre/ext_docs/seawater.htm).

When it does so, the input pressure is p = 0 dbar (surface, neglecting atmosphere).
So, this code is for surface physical oceanography (coastal or mixed layer), yet it should be modified for use in environments where water's compressibility becomes important, it seems.

Users may also like to keep in mind that the UNESCO 1980 equation of state of seawater (used in this code) is obsolete, and the thermodynamic equation of state 2010 (http://www.teos-10.org/) is currently being encouraged for use in the community.

Bal Krishan .

### Bal Krishan . (view profile)

is showing error
??? Input argument "theta" is undefined.

Error in ==> theta_sdiag at 5
theta=theta(:);

shengli wang

### shengli wang (view profile)

theta stands for temperature?

Nils

### Nils (view profile)

##### MATLAB Release Compatibility
Created with R2009a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux