R: Convert from Absolute Salinity to Practical Salinity

gsw_SP_from_SA {gsw} | R Documentation

## Convert from Absolute Salinity to Practical Salinity

### Description

Calculate Practical Salinity from Absolute Salinity, pressure, longitude, and latitude.

### Usage

    gsw_SP_from_SA(SA, p, longitude, latitude)

### Arguments

`SA` | Absolute Salinity [ g/kg ]
`p` | sea pressure [ dbar ]
`longitude` | longitude in decimal degrees [ 0 to 360 or -180 to 180]
`latitude` | latitude in decimal degrees [ -90 to 90 ]

### Details

If SP is a matrix and if its dimensions correspond to the lengths of longitude and latitude, then the latter are converted to analogous matrices with `expand.grid`.

Note: unlike the corresponding Matlab function, this does not return a flag indicating whether the location is in the ocean.

### Value

Practical Salinity (PSS-78) [ unitless ]

### References

http://www.teos-10.org/pubs/gsw/html/gsw_SP_from_SA.html

### See Also

`gsw_SA_from_SP` does the reverse, while `gsw_SP_from_SK`, `gsw_SP_from_SR` and `gsw_SP_from_Sstar` are similar to this.

### Examples

    gsw_SP_from_SA(34.7118, 10, 188, 4) # 34.548721553448317

[Package gsw version 1.0-3 Index]