This article presents a physically grounded method to compute relative airmass as a function of the apparent solar zenith angle. Unlike traditional phenomenological formulations, the proposed approach models the atmosphere as a finite layer of 100 km thickness, combining a realistic vertical density profile derived from the ideal gas law, hydrostatic equilibrium, and standard atmospheric temperature distributions. The airmass is obtained through numerical integration along the optical path of solar radiation, explicitly accounting for Earth curvature and path geometry. Based on the numerical results, a polynomial approximation is developed to provide a practical and computationally efficient expression. The proposed model shows consistent behavior across a wide range of zenith angles and improves the physical interpretability of airmass calculations, particularly near the horizon. The artcile concludes with two simple equations that can be easily implemented into solar resource tools or irradiance models.
The usual formulas for the relative airmass are purely phenomenological. In this article, a novel approach is presented, based on a 100km-thickness atmosphere, to calculate the realtive airmass as a function of the apparent solar zenith angle.
In first place, a model of the atmospheric density is required to determine the relative airmass seen by an observer standing on the surface of the arth.
An expression for the atmospheric density can be approached by the ideal gas law:
We will also assume that the temperature is exclusively dependent on the height, or the distance to the earth's surface:
The temperature can be modeled using the ISO Standard Atmosphere (Table 4 on ISO 2533-1975), where the values of temperature are related to the Geopotential altitude:
| Geopotential altitude h (km) | Temperature T (K) |
|---|---|
| -2 | 301.15 |
| 0 | 288.15 |
| 11 | 216.65 |
| 20 | 216.65 |
| 32 | 228.65 |
| 47 | 270.65 |
| 51 | 270.65 |
| 71 | 214.65 |
| 80 | 196.65 |
The pressure can be derived with the hydrostatic equation:
First, calculate the mass contained in the blue cylinder:
The force downwards exerted by that differential of mass is:
Therefore, the expression for calculating the pressure difference:
Knowing that our criteria is that h grows upwards and P grows downwards, our vectors and are oriented in opposite directions. Therefore:
Eq 5 and 6 simplify to:
Substituting Eq. 2 into Eq. 7, and knowing that the acceleration of gravity depends directly on the height:
Rearranging terms:
The expression for the acceleration of gravity can be easily calculated applying Newton's gravity equation:
We can integrate both sides of the equality, to get the expression for calculating the pressure at any given altitude, :
The right side of the equality will be solved numerically, since there is no expression for the Temperature as a function of height. The table shown above, plus an extra point at 100km with a temperature of 195K [Source: WolframAlpha, 25-Mar-2026], will be converted into a continuous curve with a modified-Akima cubic interpolation:
We get a numerical expression for the pressure at any given altitude :
And using Eq. 2 into Eq. 12 we get the expression for the density at any given altitude :
This expression on Eq. 13 can be numerically calculated for any given altitude, using the following values for the constants:
Now that we can calculate the density of air at any given altitude, we must calculate the length of the column of atmosphere that a solar ray must traverse in order to reach an observer standing on the surface of the Earth.
Let us start the conception of the problem with an observer standing on the surface of the Earth, looking directly at the sun (don't ever do this without the adeqcuate protection: the human eye is extremely sensitive and exposure to direct sunlight can lead to ocular injuiries including blindness).
Assume that the Earth is a perfect sphere and that the sun is very low over the horizon, presenting thus a high zenithal angle θ (notice that in the figure below the Earth and atmosphere sizes are not to scale):
Let us then add some measurements, assuming a constant total atmospheric height H (which we will assume to be 100km) and R for the radius of Earth (6371km as stated above). Also, the vector pointing the sun (in parametric form) and the equation for the top of the atmosphere is presented in the following figure. Note that we assume the origin for the coordinates at the Earth's center:
We can calculate the value of t when the vector intercepts the limit of the atmosphere:
Using the equation of the top of the atmosphere and substituting Eq. 14 into it:
This gives the value of , which is equal to the total length of teh column of atmosphere traversed by a sunray reaching the surface of the earth:
Note that Eq. 16 does not result into infinty when plugging 90° for the zenithal angle, compared to the simple secant formula (that assumes earth is flat). Using R=6371 km, H=100 km and θ=90°:
Now that we know the maximum extent of the vector, for simplicity, we will assume that the parametric expression of the vector pointing the sun is:
With ξ ranging from 0 (at the Earth's surface) to 1 (at the top of the atmosphere):
The altitude for any point of the vector can be calculated using the cartesian coordinates, taking advantage of the fact that we took our origin at the center of the Earth.
The distance to the center of the Earth can be easily calculated for any point with ξ from 0 to 1:
So the altitude at which any point stands over the surface of the Earth is:
Applying Eq. 18 into Eq. 19, we get the expression for the altitude:
Analyzing the last equation, it can be seen that negative altitudes are obtained when θ>90°. This is caused by the fact that a zenithal angle greater than 90° means that the sun is below the horizon. Therefore, a sunray reaching us from below the horizon is only possible when the altiude of the surroundings is lower than the observer altitudes.
The formula to compute the density of air does not change if the altitude is negative (at negative altitudes, the atmosphere is thicker and this will result in higher densities). However, the formula for altitude gives values well below 2km at values over 91.44°. Since our density function is based on the temperature table, and this is limited to a minimum altitude of −2km, it is not recommended to go below this minumim altitude. Even more, it would not be recommended to go even below 0, since no sun-rays will go through that direction (but rather be diffracted through low elevations).
Considering this, Eq. 21 should be bounded to the range 0-100km. Nevertheless, to show that both the altitude and the density functions work even with high zenith angles, the following graphs are shown:
Note that the altitude follows the expected path:
Similarly, the density function follows the expected path, given the altitudes for each path.
The corrected equation, with a lower limit of 0km altitude is, therefore:
The resulting graphs are:
With altitudes ≥0 and densities limited to ρ0 (density at 0m altitude).
Now, we have a parameter , which we know must change from 0 to 1. Also, we have the altitude relative to the ground [Eq. 22]. We have the density of the air as a function of the altitude [Eq. 13].
To do the numeric integration, we can imageine that we are a particle with area A, travelling from ξ=0 to ξ=1, calculating at each step the altitude at our current position inside the path, the density of the air at this position and the distance differential (dx) we have traveled from the previous value of ξ. This gives us a volume (our area A times the distance differential traveled) to be multiplied by the density to calculate the mass in that portion. The distance differential is the total distance that we must travel (tmax) multiplied by the differential of the variable that goes from 0 to 1 (dξ). Summing all the portions will give us the total air mass. Calculating everything regardless the value of A, the result will be a mass by unit area (kg/m2):
Summing all the steps, and using a very small step size (1·10-5) allows us to obtain the total mass per unit area:
The relative airmass will be:
Using Eq. 24 and 25 with the formula for altitude l [Eq. 22], the formula for density ρ [Eq. 13], and the formula for the total column height tmax [Eq. 16] we get the following results for AM(θ), by performing the abovementioned numeric integration with step 10-5 with zenithal angles θ ranging from 0° to 96°.
Since the model is complicated to calculate, an approximation formula is going to be derived for the results shown above. The approximation to these results should be such that the formula is easy to implement and that the error between the data obtained and the approximant is neglibile.
An approach for this calculation is checking the most influential parameter on the value of airmass.
Having studied how the parameters affect, it is very obvious that the most relevant is the length of the column of atmosphere, tmax. In fact, having considered a constant atmospheric thickness, creates a direct correlation between the total column height and the path of a sunray reaching the surface of the earth.
The influence of the value of tmax over the relative airmass AM is shown below:
It can be seen that there is a very strong correlation between the two variables. A polynomial approximant can be used to calculate this relationship (note that the graph has logarithmic scale in the Y axis). The coefficients for the polynomial are obtained by least squares method, with a polynomial of degree 7 correlating tmax and log(AM). In order to obtain coefficients in the same order of magnitude, the polynomial will be calculated with .
The value obtained for for the data shown above is:
Resulting into the expression:
The value of can be simplified, using Eq.16:
This can be simplified to:
Using R = 6371 km and H = 100km:
Then using Eq. 30 with this value of , we can compare to the curve for AM obtained by numeric integration:
The model proposed in this article:
will be compared against other known airmass models:
Results for θ ∈ [0,96°]:
Zooming near θ = 90°:
The model developed in this work provides a physically consistent framework for the calculation of relative airmass by explicitly coupling atmospheric density profiles with the geometrical path of solar radiation through a finite atmosphere. By combining a realistic atmosphere description based on thermodynamic principles with a geometric formulation that accounts for Earth curvature, the resulting airmass values remain well-defined even at high zenith angles, avoiding the divergences associated with simpler formulations such as the secant approximation.
The numerical integration approach allows the airmass to be interpreted as the total mass of air traversed per unit area, offering a clear physical meaning that is often lacking in empirical models. Furthermore, the strong correlation identified between the airmass and the normalized atmospheric path length enables the derivation of an accurate polynomial approximation, significantly simplifying practical implementation while preserving high fidelity with respect to the full model.
Comparisons with established models show that the proposed formulation captures the expected behavior across the full angular range, with particularly improved performance near the horizon, where many classical approximations lose validity. This makes the model especially relevant for applications where low solar elevations are critical, such as solar energy resource assessment and atmospheric optics.
Future work may focus on extending the model to account for observer altitude, allowing for more accurate representation of elevated sites and enabling additional applications such as horizon distance estimation. Incorporating more detailed atmospheric profiles or temporal variability could further enhance the model’s applicability in high-precision studies.
A potential improvement regarding the observer actual altitude can be made, by including the observer altitude on Eq. 14. The vector in parametric form could have been (t⋅sinθ,R+Alt+t⋅cosθ). This also affects equations 15 to 19. Inclduing this Alt value will also allow to calculate the distance to the horizon at a given altitude, by equating l(ξ)=0 and finding the value of ξ⋅tmax. However, and despite improving the model, this would mean that the approximated expression for the relative airmass will be different for every altitude (or would need extra adjustment to account for the altitude).
The actual shape of the Earth using the reference geoid can also be considered in further works, instead of assuming a spherical Earth, therefore including the actual location in the calculation of the relative airmass.