Learn R Programming

oce (version 0.1-76)

sw.depth: Water depth

Description

Compute depth from pressure and latitude.

Usage

sw.depth(p, lat=45, degrees=TRUE)

Arguments

p
either pressure [dbar], in which case lat must also be given, or a ctd object, in which case lat will be inferred from the object.
lat
Latitude in $^\circ$N or radians north of the equator.
degrees
Flag indicating whether degrees are used for latitude; if set to FALSE, radians are used.

Value

  • Depth below the ocean surface, in metres.

Details

If the first argument is a ctd object, then the pressure and latitude are extracted from it, and used to for the calculation.

The information given below is adapted from the fortran code at http://sam.ucsd.edu/sio210/propseawater/ppsw_fortran/ppsw.f, on which this R code was based.

Depth in meters from pressure in decibars using Saunders and Fofonoff's method, with the formula refitted for 1980 equation of state

Check value: depth = 9712.653 m for p=10000 decibars, latitude=30 deg above for standard ocean: t=0 deg. celsuis ; s=35 (ipss-78)

References

(authors?), 1976, (title?), Deep-Sea Res., 23, 109-111.

Examples

Run this code
d <- sw.depth(10, 45);

Run the code above in your browser using DataLab