Python package for generation of synthetic gravity waves
Project description
Synthetic gravity waves
This python package facilitates the creation of 2D synthetic atmospheric gravity-wave wave-packets mimicking the vertical velocity structure seen in numerical weather prediction models at fixed height or pressure levels.
Installation and usage
Install the package with pip from pypi.org
python -m pip install synthetic_gravity_waves
And the import synthetic_gravity_waves and use it to create a uniformly gridded vertical velocity field with synthetic gravity wave wave-packets:
import synthetic_gravity_waves as sgw
phi = sgw.make_synthetic_gravity_wave_composite(N=512, r_sigma=10.0, r0=80.0, lw0=10.0)
w0 = 5.0 # max characteristc vertical velocity [m/s]
w = phi * w0
# w now contains synthetic gravity wave packets with amplitude between -w0 and w0
Method
The method uses a point-sampling method based on the
Poisson-disc sampling algorithm by Robert
Bridson,
but modified to in place of using a 2D density field to define the local
density of points the spatial separation between points is sampled from a
Gaussian distribution with mean r0 and standard deviation r_sigma. The
sampling is done on a grid of shape (N, N). At the sampled points 2D Gaussians envelopes modulating plane-parallel carrier waves with a controllable characterisc wavelength.
See notebooks/usage.ipynb for details.
References
-
Fast Poisson disk sampling in arbitrary dimensions , Bridson, R. (2007). Fast Poisson disk sampling in arbitrary dimensions. SIGGRAPH sketches, 10(1), 1. PDF
-
poissonDiskSampling by Adrian Bittner.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synthetic_gravity_waves-0.1.2-py3-none-any.whl.
File metadata
- Download URL: synthetic_gravity_waves-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a8ceb7dabb98d8adf612e235c37130cd1243c508c88119f58ea1b9e2c14070d
|
|
| MD5 |
1352cae3fccda53987a7354d2e323452
|
|
| BLAKE2b-256 |
608cfe81f7154f9de113f4e637f3fde68fa21f799c93f831b451e8c238f47c91
|