Nightly day

Winter is finally here, and the nights are getting colder. And longer. It now starts to grow dark at 17:00, and at 18:00 it feels like the middle of the night, or so my friends have shared with me. The Autumn Equinox, the date in which the night and day are of equal length, has already passed. What causes this phenomenon? Why are summer days long and hot, and winter days so short and dreary? The answer, as was briefly grazed when we tried to cause perpetual winter, is because of Earth’s tilt and its rotation around the sun.

During the northern summer, the north pole is tilted towards the sun. No matter how much Earth turns about itself, there are areas in the northern hemisphere that will always be basked in light. The opposite goes for the south hemisphere – there are areas that never see sunshine during northern summer. However, once Earth gets to the other side of the sun, everything is reversed. As a general rule, the larger your latitude, the more extreme the differences between night and day, with the equator having little or no difference. In the first article, it was not considered, but being in a state of perpetual winter as discussed also means that there are parts in the northern hemisphere that will never see sunlight. Ever. The pole will always face away from the sun, and it will be ghastly cold and dark all year long. And again, the south has it reversed – Antarctica will forever be shined upon. In perpetual winter, the lengths of days and nights do not change.
However, in real life, the length does change. Somewhere in winter, is the longest night; this is called Winter Solstice. In the summer, some day happens to be followed by the shortest night; this is called Summer Solstice. Since Earth is in continuous motion, there must be some time, when the day and night are equal, because the length must continuously flow from longest to shortest, and back to longest (actually, days are discrete, so there is no guarantee that there will be a day and night that are exactly equal; however, it doesn’t matter for our discussion). There are two of these points, called Autumn Equinox and Vernal Equinox, and they mark the beginning of winter and summer respectively.
When trying to predict how the lengths of light and darkness vary with time, our previous model may be of use, because it has the ability to calculate the energy density coming in from the sun. From the previous article, we saw that there is only one case in which this value can be 0 – in case our current location on Earth is not facing the sun, meaning that it is night. Hence, we can use the model to note when it is night, and when it is day on Earth, for any given latitude. By day, the meaning is not a 24 hour time span, but rather a period of time during which the sun is found shining in the sky. Night, therefore, means a sunless sky.
I tweaked the python script a bit, to allow the division between night and day. For relatively small latitudes, we see that there is little difference between the length of night and day. The following graph shows in red the length of day and in blue the length of night as a function of how many day+night cycles have passed since the origin, for a Mediterranean latitude. The green bar shows the combined day and night time (24 hours, in normal cases). It was created by looking at the incoming energy density from the sun for a period of one year.

What’s really interesting, though, are high latitude areas. First, note how things may go in areas like Norway, at 60 degrees latitude:

Notice that there are times when the sun shines only for about 5 hours. It never has the chance to reach the zenith – during dawn, it starts to peek from over the horizon, 2.5 hours later it is at its peak, very low and certainly not over our heads, and 2.5 hours after that it has already set. However, in even higher latitudes (for example, 82 degrees), we get things like:

[The division in the graph is due to our starting position; imagine that the last night peak is added to the first, and everything will work out. After all, we have a cyclic recurrence going on here, Earth does not end after a single year.]
142 days without sunlight in winter, and 142 days with everlasting shining during summer. You can’t even see what’s going on during the rest of the year because of the scale on the graph (there is a continuum from long darkness to long daylight, of course, but the peaks we see here are sudden). Also note the numbers on the x axis – the sun sets and rises only 83 times during one year. It’s no wonder that these areas are relatively sparsely populated (in addition to the cold, seclusion, and lack of trees thereof).
Of course, at 90 degrees latitude, immediately at the poles, we have exactly half a year of light, and half a year of darkness, because Earth’s rotation around itself has no effect at the poles.

What strikes me most is the number of applications and cool phenomena which can be viewed with such a simple script and a spreadsheet. Of course, as always, there is much room for further play. For example, it can easily be shown that an Earth with no tilt will not feature these effects, and on the contrary, larger axial tilts mean larger differences between day and night for more areas. Adding a short precession period to the game effectively reduces the cycle in which the night and day exchange in lengths: suppose that the precession period was half the length of Earth’s yearly rotation. Then, after Earth finishes half a circle around the sun, its axial tilt would face in the same direction relative to the sun again, effectively returning us to our initial state, since the day/night cycles are determined by the tilt. Reversing the direction of the precession increases this effect.

Note: the calculations here, and in the energy density model in general, are rather basic. We do not take into consideration other, more complicated effects which contribute to the system. For example, atmospheric bending of light, which makes light reach Earth even after the sun has set, or the fact that Earth’s orbit is nor circular, but very slightly elliptic. These can be added of course, with enough mathematical and computational rigour. However, as we have seen, even basic calculations prove a useful tool in order to show principles and effects.

The changes in the code are given here: the rest of the functions remain the same. This is not clean code, but it does the job.

def getFluxIntegralMeans(totalDuration, integralRange,
                integrationDivisions = 2):
    time = 0
    # Change solar flux parameters here.
    mySolarFlux = generateSolarFluxFunction(latitudeDegrees = 31.5)
    results = []
    integrationTimestep = integralRange / integrationDivisions
    while int(totalDuration) > time:
        totalEnergyForThisRange = \
            numericalIntegration(mySolarFlux, time,
                    time + integralRange, integrationTimestep)
        meanEnergyForThisRange = \
                totalEnergyForThisRange / integralRange
        results.append( (   time + integralRange / 2,
                            meanEnergyForThisRange)     )
        time += integralRange
    return results

# Gets the results of getFluxIntegralMeans, and returns
# the lengths of all days and nights via two lists
def getDayNightAlternation(results):
    sign = lambda x: 1 if x > 0 else 0 if x == 0 else -1
    lastTime = 0
    timesList = []
    for i in xrange( len(results) - 1):                
        if sign(results[i][1]) != sign(results[i+1][1]):
            currentTime = (results[i][0] + results[i+1][0]) * 0.5            
            timesList.append(currentTime - lastTime)
            lastTime = currentTime
    # Append the last time piece.
    currentTime = results[-1][0]
    timesList.append(currentTime - lastTime)

    # Alternating day and nights.
    if results[0][1] == 0:
        dayNight = 1
        dayNight = 0
    days = []
    nights = []
    for i in xrange(len(timesList)):    
        if i % 2 == dayNight:
    return days, nights

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s