Space Science Blog

Bringing You The Future Of Science and Technology

SEVERE WEATHER TRACKER


In this tutorial we will learn about Earth's position in the solar system and how that affects the weather. We will be using Python to plot trends in the number of sunspots versus the number of severe storms, and Matplotlib to help visualize weather-related data.

Artificial Intelligence | DIY Electronics Projects | Game Design Workshop | Gallery | Random Generators | Planetary Science | Rocket Science


Categories

Art and Web Design

Contact me for information about rates and availability.


Latest Articles

 Severe Weather Tracker



Weather takes place in a region of Earth’s atmosphere known as the troposphere, which starts at Earth’s surface and extends upwards to 10 – 13 km. Earth’s weather is due to the sun’s incessant heating of the Earth’s surface and is further complicated by the planet’s tilt of 23.5° (axial tilt) from the vertical, which gives rise to seasonal variability in Earth’s ionosphere. Due to this tilt, regions at the top and bottom of the planet experience significant contrasts in the amount of radiant solar flux received. For example, in the Arctic Circle (north of 66.5° N) in the Northern Hemisphere and the Antarctic Circle (south of 66.5° S) in the Southern Hemisphere, the sun is above the horizon for 24 hours each day in midsummer, while midwinter remains in total darkness. At the poles themselves, the year is divided into six months of constant daylight followed by six months of complete darkness.

For contrast, the equator receives approximately 12 hours of daylight each day, throughout the entire year. The amount of radiation from the sun that actually reaches the Earth’s surface is inversely proportional to the distance through the atmosphere that the energy must travel before reaching the surface. As an example, at the Arctic and Antarctic Circles at the summer solstice, the midday sun is only 47˚ above the horizon, while at the North and South Poles, during the same time, the sun circles the sky only 23.5˚ above the horizon. Therefore, in the polar regions, the sun’s incident rays must pass through a substantial portion of the Earth’s atmosphere where most of the energy is absorbed by air molecules and dust particles or reflected by clouds. This can result in an energy loss of approximately 75% at the Arctic Circle and 83% loss at the North Pole.


Incoming solar radiation enters the Earth’s atmosphere, where some of this energy is absorbed by atmospheric gases, water vapor and dust particles. Some of this energy is scattered by the atmosphere and a portion is reflected by clouds in the troposphere. Energy that reaches Earth’s surface is absorbed by the ground, water and other surface features or reflected back towards space. Earth’s weather is created by the interaction between incident solar energy and water vapor suspended in the atmosphere, although the air is not significantly heated by the sun directly. Earth’s surface absorbs most of this heat and the lowest layer of the atmosphere is then warmed from being in contact with the Earth’s surface through a process of heat exchange known as conduction. Warm air gradually spreads upwards and outwards as it cools, creating a movement of air in the process. This constant movement of air from high- to low-pressure areas, combined with the effects caused by Earth’s spinning, forces air to move counterclockwise and into low-pressure areas, while moving clockwise and out of high-pressure areas.

The amount of water vapor the air can hold ultimately depends on the temperature of the air. Warm air can hold more water vapor than cold air, therefore, as air cools, its ability to hold water vapor decreases. Water vapor in the atmosphere is a strong absorber of microwave and infrared solar radiation. Differences in air pressure between the troposphere and stratosphere causes wind to blow across the surface of the Earth. Convection currents form along shorelines, causing wind to flow from the water to over land during the day and reverse at night. This basic pattern of ebb and flow couples with other terrestrial drivers to manipulate the ionosphere above.

>>> import matplotlib.pyplot as plt
>>> # Create a list for years 2000 - 2017
>>> year = [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017]
>>> # Create a list of total storms in the US for each year
>>> total_storms = [24393, 25045, 25195, 27108, 26701, 26918, 31352, 26657, 36184, 22936, 21543, 29996, 22503, 19345, 18580, 19172, 20238, 21744]
>>> # Create a list of total number of tornadoes in the US for each year
>>>tornadoes = [1072, 1219, 938, 1374, 1820, 1262, 1117, 1102, 1685, 1305, 1543, 1894, 1119, 943, 1057, 1259, 1059, 1522]
>>> # Create a list of total hailstorms in the US for each year
>>> hailstorms = [11223, 12143, 12485, 13857, 13088, 13640, 16566, 12637, 17680, 10223, 5913, 9417, 7033, 5458, 5537, 5412, 5601, 6045]
>>> # Create a list of total windstorms in the US for each year
>>> windstorms = [12098, 11683, 11772, 11873, 11793, 12016, 13669, 12918, 16819, 11408, 14087, 18685, 14351, 12944, 11986, 12501, 13578, 14177]
>>> # Create a list of atmospheric carbon dioxide for each year
>>> carbon_dioxide = [338.58, 371.14, 404.18, 375.8, 377.52, 379.8, 381.9, 383.79, 385.6, 387.43, 389.9, 391.65, 393.85, 396.52,398.65, 400.83, 404.21, 406.53]
>>> # Create a list of mean number of sunspots for each year
>>> sunspots = [2040 , 2027 , 2075 , 1352 , 854 , 580 , 342 , 158 , 55 , 82 , 325 , 872 , 1053 , 1188 , 1367 , 869 , 466 , 253]
>>> # Create a list of geomagnetic field (Ap) levels for each year
>>> geomagnetic_field =[ 178 , 153 , 164 , 245 , 177 , 154 , 103 , 97 , 79 , 51 , 70 , 90 , 96 , 90 , 102 , 149 , 139 , 128]
>>> # Create a list of total tropical storms for each year
>>> tropical_storms = [31 , 30 , 24 , 32 , 27 , 28 , 28 , 26 , 32 , 27 , 26 , 30 , 36 , 32 , 28 , 30 , 36 , 35]
>>> # Create a list of 10.7 cm incident radio flux for each year
>>> radio_flux = [2129 , 2170 , 2124 , 1564 , 1296 , 1104 , 964 , 884 , 830 , 856 , 972 , 1308 , 1466 , 1500 , 1691 , 1427 , 1074 , 923]
>>> plt.figure(1)
>>> plt.title('Severe Weather - United States')
>>> plt.subplot(211)
>>> plt.plot(year, total_storms, lw=2, color='red')
>>> plt.plot(year, hailstorms, lw=2, color='blue')
>>> plt.plot(year, windstorms, lw=2, color='gray')
>>> plt.legend(['Total Storms', 'Hailstorms', 'Windstorms'])
>>> plt.grid(True)
>>> plt.subplot(212)
>>> plt.plot(year, tornadoes, lw=2, color='gray')
>>> plt.plot(year, sunspots, lw=2, color='yellow')
>>> plt.plot(year, radio_flux, lw=2, color='orange')
>>> plt.xlabel('Years (2000 - 2017)')
>>> plt.legend(['Tornadoes', 'Sunspots', 'Radio Flux'])
>>> plt.grid(True)
>>> plt.figure(2)
>>> plt.subplot(211)
>>> plt.plot(year, total_storms, lw=2, color='red')
>>> plt.plot(year, hailstorms, lw=2, color='blue')
>>> plt.plot(year, windstorms, lw=2, color='gray')
>>> plt.legend(['Total Storms', 'Hailstorms', 'Windstorms'])
>>> plt.grid(True)
>>> plt.subplot(212)
>>> plt.plot(year, tornadoes, lw=2, color='gray')
>>> plt.plot(year, tropical_storms, lw=2, color='green')
>>> plt.legend(['Tornadoes','Tropical Storms'])
>>> plt.xlabel('Years (2000 - 2017)')
>>> plt.grid(True)
>>> plt.figure(3)
>>> plt.subplot(211)
>>> plt.plot(year, geomagnetic_field, lw=2, color='brown')
>>> plt.legend(['Geomagnetic Field'])
>>> plt.grid(True)
>>> plt.subplot(212)
>>> plt.plot(year, tropical_storms, lw=2, color='green')
>>> plt.legend(['Tropical Storms'])
>>> plt.xlabel('Years (2000 - 2017)')
>>> plt.grid(True)
>>> plt.figure(4)
>>> plt.subplot(211)
>>> plt.plot(year, sunspots, lw=2, color='yellow')
>>> plt.plot(year, radio_flux, lw=2, color='orange')
>>> plt.legend(['Sunspots', 'Radio Flux'])
>>> plt.grid(True)
>>> plt.subplot(212)
>>> plt.plot(year, geomagnetic_field, lw=2, color='brown')
>>> plt.legend(['Geomagnetic Field'])
>>> plt.xlabel('Years (2000 - 2017)')
>>> plt.grid(True)
>>> plt.figure(5)
>>> plt.subplot(211)
>>> plt.plot(year, total_storms, lw=2, color='red')
>>> plt.legend(['Total Storms', 'Hailstorms', 'Windstorms'])
>>> plt.grid(True)
>>> plt.subplot(212)
>>> plt.plot(year, tropical_storms, lw=2, color='green')
>>> plt.legend(['Tropical Storms'])
>>> plt.xlabel('Years (2000 - 2017)')
>>> plt.grid(True)
>>> plt.figure(6)
>>> plt.subplot(211)
>>> plt.plot(year, total_storms, lw=2, color='red')
>>> plt.legend(['Total Storms', 'Hailstorms', 'Windstorms'])
>>> plt.grid(True)
>>> plt.subplot(212)
>>> plt.plot(year, tornadoes, lw=2, color='gray')
>>> plt.legend(['Tornadoes'])
>>> plt.xlabel('Years (2000 - 2017)')
>>> plt.grid(True)
>>> plt.show()


Executing the above code will create the following charts, which show direct relationships between the number of sunspots and the incident solar flux and this appears to have an impact on not just the Earth's geomagnetic field, but also on Earth's complex weather system.











Johnathan Nicolosi - 15 Jun 2018