### The Hottest Day of the Year

The Question:
Not long ago, all drenched in sweat after standing outside for five minutes, I asked myself, “what is the hottest day of the year?” The answer that immediately came to mind was, “summer solstice – the longest day of the year, of course!”, which is around the 20th of June. It makes sense that the longest day of the year is also the hottest one, no? (or, at least, around that time).
The answer was rash, of course. In Israel we have the phrase “July-August Heat”, and indeed these are the worst, most unbearable months of the year. If we take the midpoint of the two months, that is, the beginning of August, we could believe that the peak occurs about 40 days after summer solstice. Indeed, looking at the average high, low, and mean temperatures of Tel Aviv throughout the last ~85 years, we can see that August dominates in terms of temperature (see Wikipedia for source chart). This, despite the fact that its mean sunshine hours is less than that of July (and even June, although not by a meaningful amount).

Click to enlarge

So, we need an explanation – how is it that the hottest day of the year does not coincide with the day with the most sunshine?

The answer lies with heat capacity, and heat absorption and discharge. The basics of it are as follows:
Earth’s temperature is governed by a perpetual battle between two opposing forces. On one hand, we have the sun, which continuously pounds us with her golden rays, heating us up. On the other, Earth is sort of like a black body, so it radiates out energy according to its temperature. The hotter Earth is, the more energy it radiates.
If the energy coming in from the sun is exactly equal to the energy being released by Earth, then the temperature doesn’t change. However, we know that sunlight in any one particular spot is not constant over time (winter has longer nights than summer, clouds, angle of incidence, solar cycles, etc). So it is generally one of two cases: either the energy coming in from the sun is more than what Earth radiates, in which case Earth heats up; or, the sun is not so strong, and Earth radiates more than it receives, causing it to cool. This argument applies both to the whole of Earth (global warming / cooling), and to local places (your frontdoor lawn).
A prime example of this is day and night cycles. Lets look at some patch of ground in a non-polar latitude. During the day, the sun shines, causing a positive flow of energy to the ground. Of course, at the same time, the ground radiates out energy – it always does so – but not at a fast enough rate to overcome the sun’s powerful beams. Thus, we have heating, peaking sometime after noon. From midday onwards, the sun’s rays get less and less powerful (due to decreasing angle of incidence), and it gets chilly towards evening. Of course, at some point the sun completely disappears over the horizon, and there is no more incoming solar radiation. Earth happily radiates its energy away, getting colder and colder, usually reaching a temperature-low a little while before dawn, when the sun returns and everything begins anew. There may be other factors at work, such as humidity and winds, but the basics are still the same.
A similar account happens over the length of a year. Earth’s axial tilt means that the incoming radiation from the sun changes over the year. We can imagine a patch of ground on Earth, sometime during the beginning of summer. Lets assume it is now dawn, the coldest time of day. The sun just begins to shine, and the aforementioned process takes place. When it is finished, about 24 hours later, it is again dawn (a day after), so it is again the coldest time of day. However, during that day, the sun burnt so furiously, that it had imparted upon Earth more energy than it could radiate away during the night. Meaning, that the temperature at dawn of day two is higher than the temperature the day before. This means that Earth has stored some of the heat coming in from the sun.
An explanation for why the hottest day does not coincide with the most sunshine now unfolds. During summer, there are many days during which the incoming energy from the sun is more than Earth can discharge in one day. During each of those days, Earth’s temperature increases. So, sure, the longest day has the most sunshine, but this doesn’t mean that the temperature is highest; instead, it implies that the temperature difference is highest, meaning, that on this day there was the largest temperature increase. The next day will also show a temperature increase. It will be a smaller one, but will make the temperature higher still.
Thus, the hottest day does not occur when the sun shines the most, but rather, some time after, when the temperature difference between two consecutive days is zero. At this point, no more heating occurs, and our patch of Earth starts to cool again, starting its path towards winter. In essence, if we plot both solar intensity and temperature versus time, we should see that the temperature lags behind the incoming solar radiation.

The Model:
In order to back up my qualitative explanation, I constructed a basic climate model which shows this effect. This is the first time I have built a dynamic, time-dependant model, so I kept it very simple (for example, I ignored the atmosphere completely, despite the fact that it is what keeps Earth’s average temperature above freezing point). Still, the model shows a considerable lag of about thirty days after summer solstice at Mediterranean latitudes (the real hottest day of the year in the Northern hemisphere is usually around late July, or also thirty days after summer solstice; in any case, it appears as if the time lag is latitude dependant).
As previously said, we look at the incoming energy from the sun, Ein, and the outgoing energy from Earth, Eout. The temperature, T, depends on them the following way:

$\frac{dT}{dt} = c(E_{in} - E_{out}) \cdot M$

In other words, the change in temperature as a function of time is proportional to the difference in energy intake, multiplied by a constant c, and the mass M. The constant c is called heat capacity, and it tells how much energy is required in order to raise the temperature of a certain amount of material. I’m making a big simplification here, since the heat capacity of a material is dependant on its temperature, but it will be good enough for now.
What shall c be? Earth’s surface is covered with sand, rock and vegetation, but its mostly just water. In fact, in this model we will treat it as one gigantic ball of water, so we will use water’s value of about 4,200 Joules per kelvin per kilogram. In other words, in order to increase the temperature of one kilogram of water by one degree, one must invest about 4,200 Joules.
What about M? Surely, we aren’t going to look at the entire Earth in one equation, since there is no seasonal change in solar input on the entire Earth. Instead, we apply our equation on one “block” of water at some specific latitude and longitude. One can imagine it to be a 1x1xN box, with the 1×1 face facing outwards, comprising the surface of a small patch of ocean. It is through this face that it radiates its energy according to its temperature, and receives energy due to heating from the sun.
N determines “how deep inside the water we look for heating and cooling”. The oceans themselves may be several kilometers deep, but its fairly obvious that sunlight doesn’t penetrate into the darkest depths. How do we choose N? In other words, how do we know how large a block of water to look at?
The choice of N is important. It tells us how much water is heating up, so directly affects the mass M, which is equal to the volume of the box times water’s density. Multiplying the mass by two, for example (the difference between a 1x1x1 cube of water, and a 1x1x2 box), has dramatic influence on the way the equation behaves.
We assume that the heating occurs at the surface (where the sun’s rays hit), and eventually propagate down to a depth of N meters. This would be true for opaque materials such as stone, and not so much for water, which lets some light through. So in essence, we are mixing up two qualities: we treat our surface material as opaque, but use water’s heat capacity. This is for simplicity’s sake, and is one of the first points that needs to be remedied in an improved model. Anyway, we assume that the heat simply diffuses down, in which case, according to Fick’s law, it has a diffusion length of:

$N = 2\sqrt{Dt}$

where D is the thermal diffusivity of water, and t is the time during which it is heated. Of course, our model doesn’t really take diffusion into account, since it treats the entire box of water as having a single homogeneous temperature, one that is independent of position. Still, this gives us a good limit for the size of the box. We only have to worry about thermal diffusivity downwards, because we assume that the nearby water “blocks” have the same temperature as we do.
Taking water’s thermal diffusivity to be 1.43 × 10−7 [m2/s], and the time to be half a year (the cooling / heating direction reverses after half a year), we get N = 3 meters. So our box is 1x1x3 meters in dimension, and we know exactly how much it weighs (multiply volume by density), giving us M for our equation.
Now we need to figure out the rest of the variables in the equation.
The outgoing energy, Eout, is calculated according to blackbody radiation. We assume that the block of water radiates only according to its temperature, with the total energy per second relating to the temperature:

$E = A \sigma T ^ 4$

Where A is radiating surface area, and σ is the Stefan-Boltzmann constant. In our specific case, we chose A = 1.
The incoming energy, Eout, depends on where exactly where are on Earth, and what time of day and year it is (there is a vast difference in solar input between day and night, and summer and winter). We will call this quantity S(t). A detailed description of how to calculate it (including a python script) can be found in this post.
All that is left is to solve the equation, and thus find out the how the temperature, T(t), varies with time. This can be compared to the solar input, S(t), and we can finally see if there is indeed a lag between the temperature and the solar input. Solving it analytically does not seem possible at all, but a simple numerical solution seems to work.

In this image, we see both temperature and solar input as a function of time, over three years for a Mediterranean latitude. The upper graph plots the temperature; the lower one, the solar input. A lag between the peaks of the two plots can be seen; this lag is 31 days long. The X axis is measured in seconds. The temperatures are on a Kelvin scale, and thus go from -40 to 4 Celsius: as previously mentioned, no other climate effects were modeled, including our warming atmosphere. The solar input is in Joules per square meter per second.

It is also interesting to see the daily fluctuations as a function of time. Notice how the solar input drops to 0 during the night. The temperature lines are straight, for that was the resolution used (smaller resolution should result in more sine-like curves, like the overall temperature). Note that this specific model may be off by up to 24 hours, meaning, the longitude position is completely arbitrary, but such a deviation would be applicable to both solar flux and temperature, so it does not affect the result.

The model shows the desired effect. It is very far from being complete, though. First, we notice that it is local – it does not care what happens at the other side of the globe – and hence will never be able to accurately predict anything within a fine degree (no cooling winds or butterfly flapping allowed here). But building global circulation models is incredibly hard, and in its current state, it is not totally useless.
Its largest fault is currently the heat dispersion and diffusion. We treat the block as having a single temperature, and yet look at diffusion for help in calculating lengths. Further, the lag time is highly dependant on choice of N, a quantity we have obtained by semi-dubious means. This first step towards a more complete model is treatment of heat.
The lack of atmosphere is also apparent, although there are indeed planets / orbiting bodies with no atmosphere, and the current model can be relevant for them.