ð Wildfire Smoke 9 September 2020#
Solar radiation and temperature in Pacific Grove, CA.#
There have been major wildfires in the western United States in the fall fo 2020. Pacific Grove, California, is pretty used to days with obscured sunlight becuase it can be foggy. But the thick smoke produced by the fires caused a very eerie day that made national news reporting the Mars-like atmosphere we were living in. It was indeed an eerie day with an orange glow coming inside from all the windows.
It is interesting to see how the solar radiation changed throughout the week. Here we get data from Synoptic to look at what one station recorded in Pacific Grove, California, very close to where I live (EW1554).
[1]:
from datetime import datetime
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter, HourLocator
from synoptic.services import TimeSeries
[2]:
df = (
TimeSeries(
stid="E1554",
vars="solar_radiation,air_temp",
start=datetime(2020, 9, 5, 7),
end=datetime(2020, 9, 12, 7),
obtimezone="local",
units="english",
)
.df()
.pivot("variable", index=["date_time", "stid", "name"], values="value")
)
df
ððĻ Speedy delivery from Synoptic timeseries service.
ðĶ Received data from 1 stations.
[2]:
shape: (335, 5)
| date_time | stid | name | solar_radiation | air_temp |
|---|---|---|---|---|
| datetime[Ξs, UTC] | str | str | f64 | f64 |
| 2020-09-05 07:00:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 58.0 |
| 2020-09-05 07:30:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 58.0 |
| 2020-09-05 08:00:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 58.0 |
| 2020-09-05 08:30:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 58.0 |
| 2020-09-05 09:00:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 57.0 |
| … | … | … | … | … |
| 2020-09-12 05:00:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 57.0 |
| 2020-09-12 05:30:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 57.0 |
| 2020-09-12 06:00:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 57.0 |
| 2020-09-12 06:30:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 56.0 |
| 2020-09-12 07:00:00 UTC | "E1554" | "EW1554 Pacific Grove" | 0.0 | 56.0 |
[3]:
fig, ax1 = plt.subplots(1, 1, figsize=[8, 4], dpi=200)
# Solar Radiation
p1 = ax1.fill_between(
df["date_time"],
df["solar_radiation"],
color="gold",
alpha=0.75,
zorder=3,
label="Solar Radiation",
)
ax1.plot(df["date_time"], df["solar_radiation"], color="k", zorder=100, lw=0.5)
ax1.grid(linestyle="--", axis="y", zorder=0)
ax1.set_ylabel("Solar Radiation (W m$^{-2}$)", fontweight="bold")
ax1.set_title(f"{df["stid"][0]} - {df["name"][0]}", fontweight="bold")
ax1.set_ylim(ymin=0)
# Air Temperature
ax2 = plt.twinx(ax1)
p2 = ax2.plot(
df["date_time"],
df["air_temp"],
color="tab:red",
zorder=100,
label="Temperature",
)
ax2.set_ylabel("Temperature (K)", fontweight="bold")
ax1.xaxis.set_major_formatter(DateFormatter("%d %b\n%Y"))
ax1.xaxis.set_major_locator(HourLocator([0]))
ax1.xaxis.set_minor_locator(HourLocator([12]))
# Kinda more work than I wanted to get both artists in the same legend...
ax1.legend([p1, p2[0]], [p1.get_label(), p2[0].get_label()])
fig.patch.set_facecolor("white")