Day and Night
Porter Johnson

The earth moves in a nearly circular orbit about the sun, in which the motion is seen as counterclockwise (right-handed) from above; i.e., the direction of the earth's orbital angular momentum. The earth rotates counterclockwise about a fixed axis that is tilted at an angle a » 23o with respect to this "above" direction. To represent the earth and the sun, let us define a Cartesian coordinate system in which the earth moves in the x-y plane (the ecliptic), and the above direction corresponds to the +z-direction. We may further specify that the axis of rotation of the earth lies in the x-z plane, and is given by the unit vector A:

A = (sina, 0, cosa )

Let us set up a geocentric coordinate system, so that the sun appears to rotate (also counterclockwise) about the earth in a roughly circular orbit. We may specify the position of the sun by giving the angle between its location, s, with respect to the  negative x-axis. Thus the vector going from the earth to the sun is given by the unit vector S:

S = (- coss, -sins, 0)

Note: we have chosen s so that the sun is in the negative-x direction with respect to the earth at s = 0, and since the polar direction A has a positive x-component, the north pole is on the other side of the earth from the sun. Here is the relation between s and the seasons:

For simplicity we will fix the solar location s throughout the 24 hour rotational period solar day of the earth.  Let us consider a point on the surface of the earth with co-latitude q; that is, the angle between the axis of rotation and a unit vector Zo coming from the center of the earth at this point is q. That unit vector Zo lies in the x-z plane, and it makes an angle of (a - q) with the +z axis; thus it can be written as

Zo = [ sin(a - q) , 0 , cos(a - q) ]

We wish to express Zo as the sum of a vector parallel to A and a vector lying in the x-z plane perpendicular to A; that is,

Zo = Zo|| + Zo^ =
cosq (sina, 0, cosa) +  sinq (-cosa, 0, sina)

Every point on earth at co-latitude q lies at this direction from the center of the earth once per day, and as the earth rotates about its axis A, the component parallel to A remains fixed, whereas the component perpendicular to A changes.

Let us introduce the angle j as the angle between direction of the unit vector Z from the center of the earth and the vector Zo^. One may write Z as the following linear combination of Zo||, Zo^, and the vector Yo = A ´ Zo = - sinq (0, 1, 0):

Z = Zo|| + Zo^  cosj +  Yo sin j
That is, we have

Z = cosq  (sina, 0, cosa) + sin q  cosj (-cosa, 0, sina) - sinq sinj  (0, 1, 0)

We may express the unit vector Z in terms of its components:

Z = ( x, y, z) ;
where

x = cosq  sina - sinq cosa cosj  ;
y = - sinq sinj ;
z = cosq cosa + sinq sina  cosj .

As the earth rotates about its axis with 24 hour period, each point of co-latitude q (relative to the center of the earth) is at direction Z, where j passes through all values between 0 and 2 p.

For what fraction of the 24 hours is it daylight, and for what fraction is it night? One may answer that question by determining the angle between the unit vectors Z and S. If the angle between those vectors is less than 90o then it is daylight [the sun is in our sky], whereas if that angle is greater than 90o it is dark because the earth blocks the sun from us. We may state the daylight condition simply by requiring the scalar product of Z and S to be positive:

Daylight Condition:     Z S  ³  0

We may thus express the daylight condition as the following inequality:

- coss cosq  sina + coss sinq  cosa  cosj + sins sinq sinj ³ 0

We may write this condition as

B1 cosj + B2 sinj ³ C
where

The parameters B1, B2, and C are defined in terms of the co-latitude location q , the time of year s, and the inclination a of the earth's axis.

Let us define the angle jo by the relations

cosjo = B1 / Ö(B12 + B22)
sinjo = B2 / Ö(B12 + B22)
The daylight condition may then be written as

Ö(B12 + B22) cos(j - jo) ³ C

Note that if C < -Ö(B12 + B22) it is always daylight (near summer solstice near the north pole), whereas for C > Ö( B12 + B22) it is always dark (near winter solstice near the north pole). Otherwise there is are periods of both daylight and darkness, and the "twilight times" of sunrise and sunset are determined by the relations

Ö(B12 + B22) cos(j - jo) = C

or

j -jo = ± cos-1[ C / Ö(B12 + B22)]

The daylight condition is thus

- cos-1[ C /Ö(B12 + B22)] < j -jo < cos-1[ C /Ö(B12 + B22)]

and the fraction of daylight is given by

f = 2 cos-1[C /Ö(B12 + B22)] / (2p) = 1 / p cos-1 C /Ö(B12 + B22)]

Thus the number of daylight hours are given by

T= 24 / p cos-1[ C /Ö(B12 + B22)]

We may write the length of day as a function of the co-latitude location q, the time of year s:

T(s, q) = 24 / p cos-1[ coss sina / ( tanq Ö(1 - sin2a cos2s)) ]

Let us define the angle b by the relation

sinb = coss sina

and write

T(s, q) = 24 / p cos-1[ tanb / tanq ].

Note that, because coss = cos(2p - s),  is symmetric about s = pT(s, q) = T(2p - s, q). In other words, the daylight period is symmetric about the summer solstice, s = p.

Note also that, if s ® p - s , the period of daylight undergoes the transformation T® 24 - T. That is, the amount of daylight less 12 hours is anti-symmetric about the vernal equinox, s = p/2.

Let us consider several special cases:

Here is a table of the number of daylight hours as a function of the time of year for the first 26 weeks of the solar year, for several co-latitudes  in the Northern Hemisphere:

*Daylight for Various Co-latitudes in Northern Hemisphere
Week #10o20o30o 40o50o60o 70o80o90o
0.00.005.697.959.22 10.1110.8111.4312.00
1.00.005.767.999.24 10.1310.8311.4312.00
2.00.005.978.109.32 10.1710.8611.4512.00
3.00.006.298.289.44 10.2510.9011.4712.00
4.00.006.718.529.60 10.3610.9711.5012.00
5.002.817.208.829.79 10.4911.0511.5412.00
6.004.387.749.1510.02 10.6411.1511.5912.00
7.005.678.319.5110.27 10.8111.2511.6412.00
8.006.848.909.9010.53 10.9911.3711.6912.00
9.007.949.5110.3010.81 11.1811.4911.7512.00
105.008.9910.1310.7211.10 11.3811.6111.8112.00
117.7110.0110.7511.1411.40 11.5911.7411.8712.00
129.9311.0111.3811.5711.70 11.7911.8711.9412.00
1312.0012.0012.0012.0012.00 12.0012.0012.0012.00
1414.0712.9912.6212.4312.30 12.2112.1312.0612.00
1516.2913.9913.2512.8612.60 12.4112.2612.1312.00
1619.0015.0113.8713.2812.90 12.6212.3912.1912.00
1724.0016.0614.4913.7013.19 12.8212.5112.2512.00
1824.0017.1615.1014.1013.47 13.0112.6312.3112.00
1924.0018.3315.6914.4913.73 13.1912.7512.3612.00
2024.0019.6216.2614.8513.98 13.3612.8512.4112.00
2124.0021.1916.8015.1814.21 13.5112.9512.4612.00
2224.0024.0017.2915.4814.40 13.6413.0312.5012.00
2324.0024.0017.7115.7214.56 13.7513.1012.5312.00
2424.0024.0018.0315.9014.68 13.8313.1412.5512.00
2524.0024.0018.2416.0114.76 13.8713.1712.5712.00
2624.0024.0018.3116.0514.78 13.8913.1912.5712.00

The Zenith angle W, defined as the smallest angle between the solar direction S and the zenith Z during the day, is given by the relation

cosW = S Z | max = Ö(B12 + B22) - C =

sinq Ö (1 - cos2s sin2a) - cosq coss  sina

This angle may be written in the form W = q + b, where, as before,

sin b = coss  sina .

Here is a graph of the Zenith angle at various co-latitudes in the Northern Hemisphere [note that when the angle is greater than  90o the sun remains below the horizon] at various times of the year:

*Zenith Angle for Various Co-latitudes in Northern Hemisphere
Week #10o20o 30o 40o50o60o 70o80o90o
0 103.00 93.00 83.00 73.00 63.00 53.00 43.00 33.00 23.00
1 102.82 92.82 82.82 72.82 62.82 52.82 42.82 32.82 22.82
2 102.30 92.30 82.30 72.30 62.30 52.30 42.30 32.30 22.30
3 101.43 91.43 81.43 71.43 61.43 51.43 41.43 31.43 21.43
4 100.24 90.24 80.24 70.24 60.24 50.24 40.24 30.24 20.24
5 98.76 88.76 78.76 68.76 58.76 48.76 38.76 28.76 18.76
6 97.01 87.01 77.01 67.01 57.01 47.01 37.01 27.01 17.01
7 95.02 85.02 75.02 65.02 55.02 45.02 35.02 25.02 15.02
8 92.82 82.82 72.82 62.82 52.82 42.82 32.82 22.82 12.82
9 90.46 80.46 70.46 60.46 50.46 40.46 30.46 20.46 10.46
10 87.96 77.96 67.96 57.96 47.96 37.96 27.96 17.96  7.96
11 85.37 75.37 65.37 55.37 45.37 35.37 25.37 15.37  5.37
12 82.70 72.70 62.70 52.70 42.70 32.70 22.70 12.70  2.70
13 80.00 70.00 60.00 50.00 40.00 30.00 20.00 10.00  0.00
14 77.30 67.30 57.30 47.30 37.30 27.30 17.30  7.30  2.70
15 74.63 64.63 54.63 44.63 34.63 24.63 14.63  4.63  5.37
16 72.04 62.04 52.04 42.04 32.04 22.04 12.04  2.04  7.96
17 69.54 59.54 49.54 39.54 29.54 19.54  9.54  0.46 10.46
18 67.18 57.18 47.18 37.18 27.18 17.18  7.18  2.82 12.82
19 64.98 54.98 44.98 34.98 24.98 14.98  4.98  5.02 15.02
20 62.99 52.99 42.99 32.99 22.99 12.99  2.99  7.01 17.01
21 61.24 51.24 41.24 31.24 21.24 11.24  1.24  8.76 18.76
22 59.76 49.76 39.76 29.76 19.76  9.76  0.24 10.24 20.24
23 58.57 48.57 38.57 28.57 18.57  8.57  1.43 11.43 21.43
24 57.70 47.70 37.70 27.70 17.70  7.70  2.30 12.30 22.30
25 57.18 47.18 37.18 27.18 17.18  7.18  2.82 12.82 22.82
26 57.00 47.00 37.00 27.00 17.00  7.00  3.00 13.00 23.00

The Zenith Angle was measured regularly by sea captains until the twentieth century, in order to determine the latitudes for the location of their vessel. The determination of longitude was, or course, much more difficult.

The vector Z is always vertical; since it is perpendicular to the surface of the earth at any time and place. It is convenient to define vectors that lie parallel to the surface of the earth, corresponding to the directions East: E and North: N. Note that the direction of the polar axis, A has a vertical component, as well as a North component, at any point, and the angle between A and Z is our co-latitude q. Thus, the vector produce A ´ Z has magnitude sin q and lies East. Furthermore the triple product Z ´ (A ´ Z) also has magnitude sinq and lies in the direction of N. That is

E sinq = A ´ Z

N sinq = Z ´ (A ´ Z) = A (Z Z) - Z (Z A) = A - Z cosq

Here are the unit vectors Z, E, N expressed in component form:

Vectorx-componenty-componentz-component
Z cosq  sina - sinq cosa cosj  - sinq sinj cosq cosa + sinq sina  cosj
E cosa sinj - cosj- sina sinj 
Nsinq  sina + cosq cosa cosjcosq sinj sinq cosa - cosq sina  cosj

We can determine the location of the sun  in the sky at any point on earth at any time by expressing the solar location vector S in terms of the unit vectors Z, E, N:

S = SZ (S Z) + SE( S E) + SN( S N)

We have already calculated the vertical component, S Z. The North component SN is given by

SN = - coss Nx - sins Ny = - coss (sinq  sina + cosq cosa cosj) - sins cosq sinj

whereas the East component SE is 

SE = - coss Ex - sins Ey = - coss cosa sinj + sins cosj

In particular, at sunrise-sunset the vertical component S Z is zero.

The direction of the rising or setting sun is dependent on of co-latitude, in that the sun does not always rise precisely in the East and does not always set precisely in the West.  In fact, there is substantial variation in the location of the rising sun.  The following table indicates the direction of the rising sun, as given by the number of degrees North [positive] or South [negative] of East for various co-latitudes in the Northern Hemisphere:


*Sunrise Angle (North of East) for Various Co-latitudes in Northern Hemisphere
Week #10o20o 30o 40o50o60o 70o80o90o
0 * * -51.39 -37.44 -30.67 -26.82 -24.57 -23.38 -23.00
1 * * -50.87 -37.12 -30.42 -26.61 -24.38 -23.20 -22.82
2 * * -49.35 -36.17 -29.69 -25.98 -23.81 -22.66 -22.30
3 * * -46.94 -34.64 -28.48 -24.95 -22.88 -21.78 -21.43
4 * * -43.78 -32.56 -26.85 -23.55 -21.60 -20.57 -20.24
5 * -70.08 -40.03 -30.02 -24.82 -21.80 -20.01 -19.06 -18.76
6 * -58.77 -35.80 -27.06 -22.44 -19.74 -18.13 -17.28 -17.01
7 * -49.25 -31.21 -23.77 -19.77 -17.41 -16.01 -15.25 -15.02
8 * -40.46 -26.35 -20.20 -16.84 -14.85 -13.66 -13.03 -12.82
9 * -32.07 -21.29 -16.41 -13.71 -12.10 -11.14 -10.63 -10.46
10 -52.93 -23.90 -16.09 -12.45 -10.42 -9.21 -8.48 -8.09 -7.96
11 -32.58 -15.87 -10.78 -8.36 -7.01 -6.20 -5.71 -5.45 -5.37
12 -15.74 -7.91 -5.40 -4.20 -3.52 -3.12 -2.87 -2.74 -2.70
13 .00 .00 .00 .00 .00 .00 .00 .00 .00
14 15.74 7.91 5.40 4.20 3.52 3.12 2.87 2.74 2.70
15 32.58 15.87 10.78 8.36 7.01 6.20 5.71 5.45 5.37
16 52.93 23.90 16.09 12.45 10.42 9.21 8.48 8.09 7.96
17 * 32.07 21.29 16.41 13.71 12.10 11.14 10.63 10.46
18 * 40.46 26.35 20.20 16.84 14.85 13.66 13.03 12.82
19 * 49.25 31.21 23.77 19.77 17.41 16.01 15.25 15.02
20 * 58.77 35.80 27.06 22.44 19.74 18.13 17.28 17.01
21 * 70.08 40.03 30.02 24.82 21.80 20.01 19.06 18.76
22 * * 43.78 32.56 26.85 23.55 21.60 20.57 20.24
23 * * 46.94 34.64 28.48 24.95 22.88 21.78 21.43
24 * * 49.35 36.17 29.69 25.98 23.81 22.66 22.30
25 * * 50.87 37.12 30.42 26.61 24.38 23.20 22.82
26 * * 51.39 37.44 30.67 26.82 24.57 23.38 23.00