Last data update: 2014.03.03

R: watdepth
watdepthR Documentation

watdepth

Description

PUBLIC function: calculates the depth (in m) from the gauge pressure p (or the total pressure P) and the latitude (in degrees: -90 to 90) and the atmospheric pressure Pa (in bar)

Usage

watdepth(P=Pa, p=pmax(0, P-Pa), lat=0, Pa=1.013253)

Arguments

P

total pressure in bar, standard: 1 atm (at the sea surface)

p

gauge pressure in bar (total pressure minus atmospheric pressure), standard: 0 (at the water surface)

lat

latitude in degrees: -90 to 90, standard: 0

Pa

atmospheric pressure in bar, standard: 1 atm (at sea level)

Value

water depth d in meters

Author(s)

Andreas F. Hofmann (a.hofmann@nioo.knaw.nl)

References

Fofonoff1983

Examples

watdepth(100)
plot(watdepth(1:100))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(AquaEnv)
Loading required package: minpack.lm
Loading required package: deSolve

Attaching package: 'deSolve'

The following object is masked from 'package:graphics':

    matplot

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AquaEnv/watdepth.Rd_%03d_medium.png", width=480, height=480)
> ### Name: watdepth
> ### Title: watdepth
> ### Aliases: watdepth
> ### Keywords: misc
> 
> ### ** Examples
> 
> watdepth(100)
[1] 982.0882
> plot(watdepth(1:100))
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>