windwhisper.ambient_noise
This module fetches existing sources of noise from teh EU Noise maps, to figure out whether implementing one or several wind turbines in a given area would be a net contribution to the ambient noise level or not. Source: https://www.eea.europa.eu/en/datahub/datahubitem-view/c952f520-8d71-42c9-b74c-b7eb002f939b
Attributes
Functions
|
Fetch an EU noise raster for the requested bounding box. |
|
Combine multiple Lden/Lnight rasters into a single layer. |
|
Retrieve the combined ambient noise level for a target grid. |
|
Convert a raster array into an |
Module Contents
- windwhisper.ambient_noise.NOISE_MAPS_URLS_LDEN
- windwhisper.ambient_noise.NOISE_MAPS_URLS_LNIGHT
- windwhisper.ambient_noise.PIXEL_VALUE_TO_LDEN
- windwhisper.ambient_noise.get_noise_values(url, x_min, x_max, y_min, y_max, resolution)
Fetch an EU noise raster for the requested bounding box.
The EU services accept bounding boxes in the European LAEA CRS (EPSG:3035). The raster is requested as a GeoTIFF and converted to Lden or Lnight values according to the
PIXEL_VALUE_TO_LDENlookup table.- Parameters:
url (str) – Service endpoint returning the GeoTIFF noise map.
x_min (float) – Minimum easting of the bounding box in EPSG:3035.
x_max (float) – Maximum easting of the bounding box in EPSG:3035.
y_min (float) – Minimum northing of the bounding box in EPSG:3035.
y_max (float) – Maximum northing of the bounding box in EPSG:3035.
resolution (tuple[int, int]) – Grid resolution as
(rows, columns).
- Returns:
Raster values converted to Lden/Lnight when the request succeeds or
Nonewhen the remote service responds with an error.- Return type:
numpy.ndarray | None
- windwhisper.ambient_noise.combine_noise_levels(noise_layers)
Combine multiple Lden/Lnight rasters into a single layer.
- Parameters:
noise_layers (list[numpy.ndarray | None]) – Collection of rasters to combine.
Noneelements are ignored.- Returns:
Combined Lden/Lnight raster in dB.
- Return type:
numpy.ndarray
- windwhisper.ambient_noise.get_ambient_noise_levels(latitudes, longitudes, resolution, lden=True)
Retrieve the combined ambient noise level for a target grid.
- Parameters:
latitudes (numpy.ndarray) – Latitude coordinates defining the output grid.
longitudes (numpy.ndarray) – Longitude coordinates defining the output grid.
resolution (tuple[int, int]) – Output resolution expressed as
(rows, columns).lden (bool) – When
Truerequest Lden rasters, otherwise request Lnight.
- Returns:
Ambient noise interpolated on the requested grid.
- Return type:
xarray.DataArray | None
- windwhisper.ambient_noise.create_xarray_from_raster(data, x_min, x_max, y_min, y_max)
Convert a raster array into an
xarray.DataArrayin EPSG:4326.- Parameters:
data (numpy.ndarray) – Raster values in an evenly spaced grid in EPSG:3035.
x_min (float) – Minimum easting of the bounding box in EPSG:3035.
x_max (float) – Maximum easting of the bounding box in EPSG:3035.
y_min (float) – Minimum northing of the bounding box in EPSG:3035.
y_max (float) – Maximum northing of the bounding box in EPSG:3035.
- Returns:
Raster with latitude/longitude coordinates.
- Return type:
xarray.DataArray