I have around 200 barometers (altitude up to 200 m above sea-level) of which some in direct sunlight that can become relatively hot. I am investigating whether there is any relation between measured air pressure and temperature.
Since some barometers also measure temperature, I was able to make the following plot:
Air pressure is measured in cmH2O and temperature in °C.
Based on 0.5-quantile (i.e. median) regression (blue line in the plot) I get the following coefficients
Coefficients:
Value Std. Error t value Pr(>|t|)
(Intercept) 1035.69548 0.02500 41423.62580 0.00000
TEMPERATURE_VALUE -0.06811 0.00115 -59.40118 0.00000
which suggest a drop of 0.068 cmH20 per unit °C of temperature increase.
Note that quantile regression is used to mitigate the effects of outliers caused by broken barometers.
Now my question is whether this result can be backed by theory? Most obvious starting point is the ideal gas law which can be written in the following specific form:
$$ P = \rho \frac{R^*}{M} T $$
where $R^*$ is the universal gas constant and $M$ the molar mass of Earth's air.
Assuming constant $\rho$ and using $T_b$ = 288.15 K, $R^*$ = 8.3144598 J/(mol·K) and $M$ = 0.0289644 kg/mol one gets:
$$ \rho \frac{R^*}{M} (T_b + 1) - \rho \frac{R^*}{M} T_b = 351.65 \;\text{Pa} = 3.59 \; \text{cmH2O} $$
which is clearly wrong (in magnitude and sign).
Furthermore, the confusing bit is the fact that $\rho$ also depends on $T$. Thus, as the air gets hotter, it expands and changes the density. This results in upward convection which in turn causes local air flow increase. Both the density and flow speed impact pressure according to Bernoulli's principle.
Which brings me to my question: what is the theoretical correct way to compute the effect of temperature on air pressure around sea-level?
PS I couldn't find any relevant paper on this topic, so paper suggestions are also welcome.
EDIT
If I assume that $\rho$ depends on $T$ as well, I end up here. Assuming dry air, the density calculation is again based on the ideal gas law, and as such doesn't bring any new information. If I take this information into consideration, then
$$ \rho (T_b + 1) \frac{R^*}{M} (T_b + 1) - \rho (T_b)\frac{R^*}{M} T_b = 0 \;\text{Pa} $$
meaning that increase in temperature will reduce the density, resulting in zero change in pressure.
If instead of dry air, I use the density formula for humid air (90 %) and Buck equation for saturation vapor pressure of water, I end up with -0.0004 Pa.