Note
Because of the models/data sources currently implemented, this can only forecast locations within the United States. I have partially developed support for Canada too, but it is currently incomplete.
- Cloud Cover:
- Probability of Precipitation: dark grey bars are shown on top of the cloud cover plot. Height of the bar corresponds to probability of precipitation from 0% (no bar) to 100% (bar fills full plot height). For example, in the example forecast above, we see a maximuim precipitation probability of ~30% on Wednesday afternoon.
- Transparency: 1-5 scale representing the overall transparency of the atmosphere. Transparency is indicated using the same color scale as Seeing (below).
- Seeing: 1-5 scale representing how clearly objects can be resolved for astronomical observation due to the effects of atmospheric turbulence. Poor seeing corresponds to "boiling" images and poor angular resolution. Seeing is indicated using the same color scale as Transparency.
- Planetary k-index (Kp): Represents the overall variance in Earth's magnetic fields due to solar flares/CMEs. High values of Kp correspond to geomagnetic storm levels (G-scale) and probability of auroras. Consistent with how Kp is displayed by NOAA's SWPC, the height of bars correspond to the value of Kp, and bars are also colored and labeled to indicate the geomagnetic storm level.
- Sun/moon altitudes, lunar phase, and astronomical twilight/night times: Time series of the sun (gold line) and moon (blue line) altitudes for the forecast location are indicated in the Altitude plot. Icons of the sun and moon are shown at their current altitudes. The icon used to represent the moon also corresponds to the current lunar phase. The horizon is indicated by a horizontal black line. Astronomical twilight and night times are indicated by light and dark grey shading, respectively.
- Temperature/Dewpoint: Time series of temperature and dewpoint temperature are shown in blue and purple, respectively. Daily high and low temperatures are also annotated.
- Wind Speed/Gusts: Time series of average wind speed and wind gusts are shown in blue and red (dotted), respectively.
-
Clone this git repository:
git clone https://github.com/klarrieu/astro-atmos.git cd astro-atmos
-
Install the required packages:
mamba
is preferred overconda
since it resolves much faster, but these commands also work by replacingmamba
withconda
.mamba env update
mamba env create -n <env-name> --file environment.yml mamba activate <env-name>
pip install -r requirements.txt
-
Enter desired forecast location by editing
forecast_location.txt
:[Location] # latitude, decimal degrees lat = 39.2 # longitude, decimal degrees lon = -120.4 # timezone name,timezone name, IANA format (optional, defaults to system timezone) timezone = US/Pacific # elevation in meters (optional, defaults to 0) elevation = 0
Units of measurement for temperature and wind speed can also be adjusted in this file.
-
Generate a forecast:
python make_forecast.py
After processing, an interactive plot will be generated. An image file for the forecast will also be saved.
-
To further customize your forecast plots or grab the raw data from your forecast, check out the Docs.
- add smoke data source
- add weather forecasts for Canada
- annotate times for sunrise/sunset
- lowpass filter temp for low/high annotation
- add options for 12/24 hr times, light/dark styles
- make subplots modular (separate method per subplot)
- make web app interface (streamlit?)
- more robust http requests with retries, checking data integrity
- Candian Meteorological Centre (CMC) RDPS model: seeing, transparency. Other parameters such as cloud cover, dewpoint, etc. can be extracted from these models as well but it has not been fully implemented.
- National Oceanic and Atmospheric Administration (NOAA): planetary k-index.
- National Weather Service (NWS): cloud cover, probability of precipitation, temperature, dewpoint, wind speed/gusts.
- Sun/moon: All celestial body data is calculated using
astropy
. See the documentation for more details.
Please submit an issue if you have any trouble using this code.
Contributions are welcome and encouraged! Submit a PR.