# The Atmosphere

## The Atmosphere

Before studying the interactions of cosmic rays in the atmosphere we need some tools and a model that will describe more or less our atmosphere. To study the cosmic rays interactions in the atmosphere it is useful to define a parameter that we will call the **vertical atmospheric depth** (sometimes also called *column density*) defined as the integral in altitude of the atmospheric density $$\rho$$ above the observation level or altitude $$h$$:

$$
X\_v(h) = \int\_h^{\infty} \rho(h^\prime) \textrm{d}h^\prime
$$

{% hint style="info" %}
Note that $$X\_v$$ is measured in $$\rm{g/cm}^2$$ and  to calculate it we need to know how the density changes as a function of the altitude $$h$$
{% endhint %}

The vertical atmospheric depth goes in the opposite direction of the altitude. Ie, it is 0 at the top layers of the atmosphere (when $$h\rightarrow \infty$$) and it is maximum at sea level, when $$h = 0$$.

<div align="center"><img src="https://978429123-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LL-TjWvtGhAa4RFZygl%2F-LcaK0Se5BPThtMZLG-R%2F-LcaMnDQJaRdraLwdxQk%2Fx.svg?alt=media&#x26;token=97956cb6-7aac-462a-b4b9-21df7f8cd957" alt="Schematics of the vertical atmospheric depth."></div>

### **The Isothermal Model**

In a hydrostatic atmosphere a particular layer of gas located at some altitude is static, meaning that the sum of its forces will add to 0. So let's imagine an element of atmosphere of width $${\rm d}h$$ and area $$A$$ as illustrated in the image below.

<div align="center"><img src="https://978429123-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LL-TjWvtGhAa4RFZygl%2F-LcGmXTiaBUfcHeeDR7p%2F-LcGpKv-icpLxMSl-V5E%2Fatmosphere.png?alt=media&#x26;token=7ccc906e-2ee9-4539-be77-b540efd8fc1c" alt="Sum of forces over an element of atmosphere"></div>

If the element remains static that means that the downward (towards the planet) force of its weight, plus the downward force exerted by pressure of the layer above it, and the upward force exerted by pressure from the layer below, they all sum to zero. We can write this equilibrium of forces as:

$$
P\cdot A - (P + \textrm{ d}P)\cdot A - (\rho A \textrm{ d}h)g\_0  =0
$$

Using the ideal gas law that we all know $$P = \frac{\rho RT}{M}$$with $$R$$ is the ideal gas constant, $$T$$ is temperature, $$M$$ is average molecular weight, and $$g\_0$$ is the gravitational acceleration at the Earth's surface. Using this we get from the equation above

$$
\frac{{\textrm d}P}{P} = -\frac{g\_0 M}{R T} {\textrm d} h
$$

&#x20;Now let's imagine that our atmosphere is isothermal which means $$T = {\rm cte}$$, we know that this is not true, but is surprisingly a good approximation for our atmosphere. If we integrate we obtain that pressure decreases exponentially with increasing height as:

$$
P = P\_0 e^{-\frac{g\_0 M}{R T} h}
$$

where we can define the **scale height** $$h\_0$$ as:

$$
h\_0 = \frac{R T}{M g\_0}
$$

Since the temperature is assumed to be constant it follows that $$\rho$$ also changes exponentially as $$\rho = \rho\_0 {\textrm e}^{-h/h\_0}$$ and therefore the column density can be written as:

$$
X\_v = X\_v^0 {\textrm e}^{-h/h\_0}
$$

where $$X\_v^0$$ is 1030 $$\textrm{g/cm}^2$$ is the atmospheric depth at sea level, $$h=0$$. In particular for the isothermal model we have that the relation between atmospheric depth (aka column density) and density is:

$$
\rho(X\_v) = \frac{X\_v}{h\_0}
$$

{% hint style="info" %}
Using typical values ($$T = 273 \textrm{;K}$$ and $$M = 29 \textrm{;g/mol}$$) we get that $$h\_0 \sim 8 \textrm{;km}$$which just happens to be approximate height of Mt. Everest
{% endhint %}

In reality the temperature changes and hence the scale height decreases with increasing altitude until the tropopause.

This equations are valid for vertical particles, for zenith angles $$< 60^\circ$$ (for which we can ignore the Earth's curvature) the formula is scaled with $$1/\cos{\theta}$$ giving the *slant depth*

$$
X = \frac{X\_v}{\cos \theta}
$$
