Geophony
Geophony module within the kadlu library
- kadlu.sound.geophony.geophony(freq, depth, sl_func=<function kewley_sl_func>, seafloor={'attenuation': 0.5, 'density': 1.5, 'sound_speed': 1700}, below_seafloor=False, progress_bar=True, **kwargs)[source]
Calculate ocean ambient noise levels.
Noise levels can be calculated either a set of lat-lon coordinates, or on a regular grid within a geographic bounding box.
If below_seafloor is False (default), the noise level is not computed below the seafloor and instead assigned a NaN value.
Use the keyword arguments from
kadlu.geospatial.ocean.Ocean
,kadlu.sound.sound_speed.SoundSpeed
andkadlu.sound.parabolic_equation.TransmissionLoss
to specify ocean data sources, sound speed profile, and configure the transmission loss computation.- Args:
- freq: float
Sound frequency in Hz.
- depth: array-like
Depths at which to compute the noise levels
- lat, lon: array-like
Latitude and longitudes at which to compute the noise levels
- south, north: float
South-north boundaries to fetch ocean data.
- west, east: float
West-east boundaries to fetch ocean data.
- xy_res: float
Horizontal spacing in km between points at which the noise level is computed. Only relevant if specifying a bounding box rather than specific locations.
- sl_func: function
Source level function
- seafloor: dict
Bottom acoustic properties.
- below_seafloor: bool
Compute the noise below the seafloor. Default is False.
- progress_bar: bool
Display calculation progress bar. Default is True.
- Returns:
- g: dict
Model output: spl,lats,lons,x,y,z,bathy.
- spl: numpy.array with shape (nx,ny,nz)
Sound pressure levels in dB re 1 uPa^2 / Hz
- lats: numpy.array with shape (ny)
Latitude coordinates
- lons: numpy.array with shape (nx)
Longitude coordinates
- x: numpy.array with shape (nx)
x coordinates
- y: numpy.array with shape (ny)
y coordinates
- z: numpy.array with shape (nz)
Depth coordinates
- bathy: numpy.array with shape (nx,ny)
Bathymetry values
- kadlu.sound.geophony.kewley_sl_func(*, freq, wind_uv, **_)[source]
Compute the wind source level according to the tabulation of Kewley et al. 1990. (Ocean Ambient Noise p. 114).
Values outside the tabulation domain are extrapolated via nearest-neighbor extrapolation.
- Args:
- freq: float
Frequency in Hz
- wind_uv: float or array
Wind speed in m/s
- Returns:
- : array-like
Source level in units of dB re 1 uPa^2 / Hz @ 1m / m^2
- kadlu.sound.geophony.source_level(freq, x, y, area, ocean, sl_func)[source]
Compute source levels at the specified frequency and coordinates.
- Args:
- freq: float
Sound frequency in Hz.
- x: float or array
x-coordinate(s)
- y: float or array
y-coordinate(s)
- area: float or array
Source area of each location in units of meters squared. Must have same shape as x and y.
- ocean: instance of
kadlu.geospatial.ocean
Ocean variables
- sl_func: function
Source level function
- Returns:
- sl: array-like
Source levels in units of dB re 1 uPa^2 / Hz @ 1m.
- kadlu.sound.geophony.transmission_loss(freq, propagation_range, lat=None, lon=None, data_range=None, seafloor={'attenuation': 0.5, 'density': 1.5, 'sound_speed': 1700}, return_ocean=False, **kwargs)[source]
Initialize transmission loss calculator.
Use the keyword arguments from
kadlu.geospatial.ocean.Ocean
,kadlu.sound.sound_speed.SoundSpeed
andkadlu.sound.parabolic_equation.TransmissionLoss
to specify ocean data sources, sound speed profile, and configure the transmission loss computation.- Args:
- freq: float
Sound frequency in Hz.
- propagation_range: float
Propagation range in km. Default is 50 km.
- lat, lon: array-like
Latitude and longitudes of point-like sound source
- data_range: float
By default, environmental data is loaded for a bounding box centered at (lat,lon) with dimensions (2 x 1.2 x propagation_range) x (2 x 1.2 x propagation_range). If the data_range argument is specified, the dimensions of this box will be modified to (2 x D) x (2 x D) where D = max(data_range, 1.2*propagation_range).
- seafloor: dict
Bottom acoustic properties.
- return_ocean: bool
Return ocean object. Default is False.
- Returns:
- transm_loss: instance of
kadlu.sound.parabolic_equation.TransmissionLoss
Transmission loss calculator
- ocean: instance of
kadlu.geospatial.ocean.Ocean
Ocean variables, only returned if return_ocean is True
- transm_loss: instance of