Nordlysvarsel
Nordlysvarselet
The Northern Lights app allows users to check the three-day forecast for the probability of Northern Lights in a specific area. Additionally, it can be used to see the probability right now, based on acutal data.
What are the Northern Lights?
The northern lights are a light phenomenon that occurs when energy rich particles are thrown from the sun towards the earth. It occurs in the upper polar atmosphere, between 80km and rarely above 500km above the earth's surface, when electrons and protons collide with the atmospheric gas, which is supplied with energy, that is then emitted in the form of light. The light emission itself comes mainly from atoms and molecules in the atmosphere and not from the primary partciles themselves. [1]
When can you see Northern Lights?
For calculating the probability of Northern Lights, you need the longitude and latitude of an area. Longitude and latitude are then used to calculate the areas sunrise and sunset times for each day, as well as the cloud coverage for each hours of the day.
The KP index threshold for an area/city is determined by the area's latitude, and is a predetermined value, where the further north you are, the required value decreases. The KP index goes from 0-9. We gathered the threshold values from a table from Yr[2], as well as the KP index threshold of the aurora activity.
The real-time KP index gives us an important indication on two aspects of the northern lights activities: how wide the aurora oval extends and how far south it can be observed. The higher the KP value, the greater chance of experiencing the northern lights.
KP index thresholds:
KP | Acitivity | |
---|---|---|
> 1 | No activity | |
1 - 3 | Low activity | |
4 + | High acitivty |
If there is a high KP value and high solar wind speed and proton density, it can result in northern light acitivites. Nevertheless, the cloud coverage and air pollution can affect your chances of a clear view.[3]
The app
The app is built with Svelte and was created to be used as a smartembed.
APIs used
Met: We get weather data that is predicted for an area based on its longitude and latitude. The data we use is only the cloud coverage predicted.[4]
NOAA: From NOAA we get KP values. We differ between the KP value right now, and the three day prediction. The KP value right now are updated every five minutes, while the prediction is updated once every evening.[5]
We used a package for calculating the sunrise and sunset for each day and area.[6] Although this is a calculation that can be done in code, the earth is not perfectly round, and we would need to use an extra api to do this calculation on our own, and the data from this package seems to be as accurate as the data from Met and Yr.
Our calculations
In our app designed to predict real-time Northern Lights occurrences, we analyze the Earth's KP value in relation to the specific area or city's KP threshold. The comparison helps determine if the current value is high enough to generate aurora. If it is, we use the number to find whether there is no, low, or a high chance of aurora. Although we could use more values for predicting aurora right now, there is always a chance of it not being visible due to cloud coverage and air pollution. We do not use proton density, Bz values, or solar wind speeds in our calculation, although this would produce a better probability.
We exclude the KP index between sunrise and sunset, because the sunlight will cover any northern light activities. This implies that the farther north you are, the greater the number of daylight hours available for potential aurora activity visibility. Because of the midnight sun, we instead of the exact sunrise and sunset time use nautical dusk and dawn, which we get from SunCalc.
For the graph of predictions, as the KP values and the cloud coverage are predicted daily, they can change easily. We use the predicted KP values for a day, which is given in txt format with a three hour coverage. The cloud coverage is in a hourly format. We use these two values combined, and determine the probability based on the area Kp threshold and the Kp value predicted. In our graph, the cloud coverage won't affect the probability, but the bigger coverage, the lesser a chance of viewing aurora.