wm_to_vol: Convert a mass of water to a volume

View source: R/wm_to_vol.R

wm_to_volR Documentation

Convert a mass of water to a volume

Description

wm_to_vol converts a water mass to a water volume. Requires temperature, salinity and atmospheric pressure. These are used to calculate the density, which is then used to convert the mass to volume.

Usage

wm_to_vol(mass, t, S, P)

Arguments

mass

numeric (kg). Water mass to convert to volume

t

numeric (°C). Temperature

S

numeric (ppt). Salinity

P

numeric (bar). Atmospheric pressure. Defaults to 1.013253

Inputs

Inputs must be in SI units:

  • mass in kg

  • t in °C

  • S in ppt

  • P in bar (Defaults to 1.013253)

Output

Output is a single numeric value for the water volume in L.

Author(s)

Nicholas Carey - nicholascarey@gmail.com

Examples

## Should return 0.9767414
wm_to_vol(mass = 1, t = 23, S = 35)


nicholascarey/respfun documentation built on June 15, 2025, 11:46 a.m.