About
weathergen generates time-varying weather profiles using a synthesis of in-situ observations and satellite reanalysis estimates of meteorological parameters, and is able to recreate weather patterns allowing for the simulation frameworks like maria to simulate climatologically-accurate ground-based astronomical observations.
Methodology
Atmospheric parameters are generated by combining three ingredients:
The probability distributions of each parameter for each time of year and time of day.
An eigenmodal decomposition of how parameters covary.
Characteristic spectra of how each eigenmode changes over time.
These are all calculated using climatological data from ERA5, GML, ESO, MKWC, and Meteostat. For each region, reanalysis weather parameters are compiled and adjusted (e.g. for seasonal diurnal and trends) with respect to in-situ meteorological trends.
The generated profiles depend on reanalysis data which are limited to a temporal resolution of an hour, but other means of adjustment are possible depending on the sophistication of the alternate sources of weather data. For example, the level of turbulent fluctuation in total column water vapor (the largest driver of sub-millimeter atmospheric interference) is not stationary from hour to hour.
Usage
Install the package using pip:
pip install weathergen
Import the package and instantiate a `Weather` object, and pass it an array of times to the `generate` function. For example, to simulate hourly weather for Princeton, New Jersey between June 1st and September 1st we would write
import numpy as np
from datetime import datetime
import weathergen
t0 = datetime(2022,6,1).timestamp() # June 1, 2022
t1 = datetime(2022,9,1).timestamp() # August 1, 2022
gen_times = np.arange(t0, t1, 3600) # three months of hourly data
weather = weathergen.Weather(region='princeton', seasonal=True, diurnal=True)
weather.generate(time=gen_times, mode='random')
Specified times should be supplied in Unix time. The weather parameters are contained in the attributes of the weather object, e.g. weather.temperature or weather.pressure. The values are typically two-dimensional with shape (n_height, n_time), where weather.height and weather.time describe the time and height of each dimension, in Unix time and meters above sea level. Single-level parameters are described by a single number for each time and do not have a height dimension.
Note that the supplied year is arbitrary; the underlying model considers only seasonal and diurnal climatological variations. All available regions are outlined in the dataframe weathergen.regions.
Metadata
Release files for weathergen 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| weathergen-2.4.0.tar.gz | 91.7 MB | Without provenance | Details for weathergen-2.4.0.tar.gz |
Release files / weathergen-2.4.0.tar.gz
| Download URL | weathergen-2.4.0.tar.gz |
|---|---|
| Size | 91.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8772bf94e04775249f362634198d7392d9afebeb0a097cd4797e5c6979b35abe
|
|
BLAKE2b-256 checksum How to use checksums |
396dd57515ba1afe92e6dd5ce862162e311f6120373fadf13232271cf37da84e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|
Security for weathergen 2.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.