# How to derive a physical model of temperature above the earth surface?

At a point on the surface of the Earth, if I go straight "up" a distance $z$ (radially outward from the Earth), I'd observe a temperature profile $T(z)$. The conventional wisdom from the meteorology community (that I can find at least) is that this temperature decreases linearly up to about 11km as $T(z)=T_0-\gamma z$, where $\gamma$ is a constant known as the lapse rate. However, I have measurements of the temperature over several heights within the first few meters of the earth that clearly are not linear in height. I suspect the constant lapse rate is a simplification of the physics that is applicable after the first few meters up to 11km.

My question is, what are the governing dynamical equations for air temperature above the surface of the earth? I wish to set up and solve such an equation, and use the solution form as a fitting function to my measured data. My guess is that it would be some combination of the heat equation with solar irradiance as a kind of forcing term, coupled with a fluid dynamics equation that accounts for the thermal expansion and motion of the air. The model would have to account for the observed non-linear profile in the near-surface environment, and probably become linear at higher ranges. Any insight or references are appreciated.

Edit

To clarify, I'm okay with something that can't work over the whole earth surface. Suppose I know local parameters of the surface, and let's say that is homogeneous over a large enough swath that you can neglect some lateral effects. You can even assume it's flat if you want. I don't know what the reasonable assumptions are, nor do I know what are workable ones that lead to simple solutions. I'm just trying to get a handle on the physics of temerature and air in this environment.

-
within the first few meters, it is almost unpredictable. You'd have to factor in the terrain type and similar things. After a few meters, the wind speed is higher and even mixing can occur. But below that, for instance, a black road would cause a very different thermal gradient from a nice grassy area or a body of water. Even open fields vs covered forest makes a big difference. The first few meters are too unpredictable to model reliably for the entire surface of earth –  Jim Jul 15 at 15:41
Thanks for that. How about if I want a model that holds locally over some homogeneous area, where I know the ground composition? I'm clarifying the question above... –  rajb245 Jul 15 at 15:46
@Jim is right. You need to consider solar heating or/and radiational cooling, local wind, vertical mixing. With solar heating, you get localized "mushroom cloud" updrafts. There is something called the "dry adiabatic" lapse rate, where simple vertical motion results in expansion/compression, resulting in temperature change. Add to that the role of moisture, where evaporation absorbs heat (thus cooling) and condensation releases heat (thus heating), plus the fact that humid air is less dense than dry air, and it becomes a lesson in meteorology. –  Mike Dunlavey Jul 15 at 15:57
+1 for asking a good question, though as the above comments hint, the best answer to this will probably be "this is too hard." You are talking about a regime quite unstable to convection, and convection is hard. It requires full 3D modeling, and while we have some ad hoc methods for 1D profiles, these are still complicated and not necessarily "right." Questions like this are often answered with simulations, not pencil and paper. –  Chris White Jul 15 at 19:53
@ChrisWhite With enough computing power and patience, very little is actually "too hard" :) –  tpg2114 Jul 15 at 21:04

Okay, so this could be incredibly complicated or incredibly simple, depending on how one looks at it.

At the most basic level, you can treat this as a solution to the heat equation:

$$\frac{\partial T}{\partial t} = \alpha \nabla^2 T$$

where the Earth and the tropopause are the boundary conditions. In this model, we don't care about the transient, so the temporal derivative goes away. Since we don't care about the transient, we take the average temperature of the Earth over time (so the diurnal cycle-averaged temperature) and impose that value as the BC at $z=0$ and we know the beginning of the tropopause the temperature is again constant, so we set the BC at $z=11km$ to the temperature there.

This then gives you a linear solution for temperature, exactly what your lapse rate equation gives.

Now, your deviations in observations could be due to several things. First, the equation is for the time-averaged lapse rate; how many samples did you take? Second, the value of $\gamma$ depends heavily on humidity; what were the conditions at the times of the observations?

If you wanted to get fully into how to do all of this, it's not easy as others have alluded to. For regions under, roughly, 1200 m, we are within the atmospheric or planetary boundary layer. The composition of this layer is shown in the figure [from Wikipedia].

In this layer, there's a lot that goes on. But you can actually solve it in 2D (in spherical coordinates even) using the turbulent boundary layer equations, being sure of course to include the buoyancy terms and Coriolis terms if you are looking at a large enough scale where that matters. And really you need the low-Mach number form of them (rather than incompressible) to include the temperature equation and density variations.

Outside of 1200 meters or so, you can use the inviscid, low-Mach number Euler equations, again in 2D and again including buoyancy and Coriolis. You don't need to worry about the viscosity here to get decent answers, but know that from 1200 meters upwards is probably turbulent and that makes accurate solutions much, much harder. But for simplicity sake, you can keep it 2D and inviscid.

Then you need to blend the two solvers together at the edge of the boundary layer. The reason we do it this way is because the Euler equations+Boundary layer equations are much, much easier (less expensive) to solve even with the coupling of the two solutions through boundary conditions than it would be to get a fully turbulent Navier-Stokes solution everywhere.

The aerospace literature is very rich with how to do this and it would apply equally well to atmospheric work because the equations are the same (with the additional body force and source terms for rotating planets and buoyancy). A very quick internet search for "boundary layer coupled euler solver" turned up several recent AIAA papers from the same group, one of which is linked below for completeness.

## Edit:

I just re-read the question a bit more carefully and see that you are only taking measurements over the first few meters. I won't get full into boundary layer theory, but within the distance very close to the wall, nothing is linear at all. Here is an example of the profiles in a flat-plate boundary layer for velocity and temperature [from Wikipedia:

You can see that even on a perfectly flat plate with no roughness or variation in temperature along the plate, there is a non-linear region before the temperature becomes constant.

Again, using the boundary layer equations with the applicable terms in it will give you the solution you are looking for and it will certainly be non-linear near the surface, even for surfaces that are "simple" like an infinite, smooth flat plate. The surface roughness and non-uniform temperatures will only serve to make it less linear in that region.

-
Thanks for the very helpful answer. I'll look into boundary layer theory. Any suggestions for a good text that looks at this from a numerical modeling perspective? –  rajb245 Jul 17 at 18:55
For BL theory, the book by Schlichting is the de-facto standard but it is a bit dense and is more like a reference manual. Our school uses Viscous Fluid Flow by White when we learn about the how/why of BL theory. Both books are really good, Schlichting will have information on transformations that include the thermal terms needed for atmospheric BL's, I think White may also. –  tpg2114 Jul 17 at 19:15
@rajb245 Hop into the chat sometime and I'll talk to you about the numerical part. I may have some work that will help you. –  tpg2114 Jul 17 at 19:19