The gradient of a variable is just the change in that variable as a function of distance. For instance, the temperature gradient is just the temperature change divided by the distance over which it is changing: . The gradient is a vector and has a direction as well as magnitude.
Consider the surface temperature contour plot from NOAA for 8 September 2012 in the figure above. A strong temperature variation is draped across the eastern and southern US from New York down to Texas. How do we quantify this temperature variation? First we have to specify where we want to measure the temperature gradient. Then we simply need to choose isotherms on either side of the point, take the difference between the isotherms, figure out how far apart they are in horizontal distance, and divide the temperature change between the isotherms by the distance between the isotherms. The direction for the gradient is on the normal (perpendicular to the isotherms) from the lower temperatures to the higher temperatures. It’s pretty easy to figure out where the gradient vector points just by quick examination, but it is a little harder to figure out what the gradient magnitude and actual direction are.
Now watch this video (2:12) on finding distances:
Mathematically, if we know the algebraic expression for the temperature change, such that T = T(x,y), we can find the gradient by using the del operator, which is also called the gradient operator.
Recall the del operator:
If we are looking only at changes in x and y, then we can define a horizontal del operator:
At any point, we can determine the gradient of the temperature:
Note that this quantity has dimensions of and a magnitude and a direction. The gradient direction is always normal to the isolines and pointing in the direction of an increase. We can define the normal vector, which is just the unit vector in the direction of the increasing temperature. We will call this normal vector n.
We can calculate a gradient for every point on the map, but to do this we need to know the change in the temperature over a distance that is centered on our chosen point. One approach is to calculate the gradients in the x and y directions independently and then determine the magnitude by:
and the direction by:
We can program a computer to do these calculations.
However, often we just want to estimate the gradient. The gradient can be determined by looking at the contours on either side of the point and computing the change in temperature over the distance. These partial derivatives can be approximated by small finite changes in temperatures and distances, so that is replaced by in all places in these equations. We can calculate gradients by using “centered differences” as shown in the figures below.
We then calculate the magnitude with Equation [8.12] and the direction with Equation [8.13], where we replace the partial derivatives with the small finite differences in all places in these equations.
The magnitude and direction are:
When you calculate the arctangent, keep in mind that the tangent function has the same values every 180o, or every π in radians. If you get an answer for the arctangent that is 45o, how do you know whether the angle is really 45o or 45o+180o=225o? The gradient vector always points toward the higher temperature air, so always choose the angle so that the gradient vector points toward the warmer air.
Recap of the process for calculating the temperature gradient:
- Determine the distance scale by any means that you can. Sometimes it is given to you; sometimes you can scale off a ruler; sometimes you just estimate it using the size of known boundaries.
- Determine the spacing between the isotherms.
- Find the temperature change in the x and y directions using the centered difference method. These two numbers - - are needed to calculate both the gradient magnitude and the gradient direction. Note that can be either positive or negative.
- Calculate the magnitude by finding the square root of the squares of the gradients in the x and y directions (i.e., ).
- Calculate the direction of the gradient vector by finding the arctangent of the y-gradient divided by the x-gradient. Pay attention to the direction - make sure that it points toward the warmer air.
Now watch this video (3:52) on finding gradients:
A word about finding gradients in the real world. Sometimes the centered differences method is difficult to apply because the gradient is too much east-west or north-south. For instance, in the temperature map at the beginning of this section, the x-gradient is hard to determine by the centered difference method in the Oklahoma panhandle and the y-gradient is hard to determine in central Pennsylvania because in both cases, the temperature hardly changes. In these cases, you could say that the gradient in that direction equals 0, but then your computer program might have a hard time finding the arctangent. One way around this problem is to put in a very small number for the gradient in that direction, say 1 millionth of your typical gradient numbers, to do the calculation.
A second word about finding gradients in the real word. When you are finding temperature gradients from a temperature map, it is sometimes hard to determine the temperature gradient at some locations because the isotherms are not evenly spaced and can be curvy. Don't despair! Use your best judgment as to what the gradients are, Check your answers for the magnitude and direction of the temperature gradient vector by estimating the magnitude and direction by eyeballing the normal to the isotherms at that location and pointing the gradient vector to the warmer air. If your calculated direction is 160 degrees when your eyeball check says about 220 degrees, check your math again.
Quiz 8-3: Grading your gradients.
- Find Practice Quiz 8-3. You may complete this practice quiz as many times as you want. It is not graded, but it allows you to check your level of preparedness before taking the graded quiz.
- When you feel you are ready, take Quiz 8-3. You will be allowed to take this quiz only once. Good luck!