Skip to content

Commit

Permalink
Add description of units to absorption docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ElOceanografo authored May 21, 2024
1 parent f00db85 commit 8c87b3b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/uw_basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,19 @@ Compute volume acoustic absorption coefficient in water, given:
- `depth` in meters
- `pH` of water
Implementation based on the Francois-Garrison model.
The result is a unitless linear scale factor for sound pressure over the given `distance`. To get
absorption in terms of dB / m, set `distance = 1.0` and convert the result to decibels. For instance,
at a frequency of 100 kHz:
```julia-repl
julia> A = absorption(100e3, 1.0)
0.9959084838594522
julia> α = -20log10(A)
0.035611359656810865
```
Implementation based on the Francois and Garrison (1982) model.
"""
function absorption(frequency, distance=1000.0, salinity=35.0, temperature=27.0, depth=10.0, pH=8.1)
f = frequency/1000.0
Expand Down

0 comments on commit 8c87b3b

Please sign in to comment.