Air Temperatures and Average Lapse Rate

Today we will examine 40 years (1979-2018) of air temperature data and derive the average lapse rate. First we need some tools:

$ sudo apt install nco gmt

We will be using NCEP Reanalysis 2 data. Grab it:

$ wget -c -O air.nc ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis2.derived/pressure/air.mon.mean.nc

Create a new file air.sh with:

#!/usr/bin/bash
# Zoe Phin, 2019/12/17

P=(1000 925 850 700 600 500 400 300 250 200 150 100 70 50 30 20 10) # Size: 17 

aircsv() {
    for t in `seq 0 479`; do
        for p in `seq 0 16`; do
            for l in `seq 0 72 | sed s/36//`; do
                ncks -v air -d time,$t,$t -d lat,$l,$l -d level,$p,$p air.nc |\
                sed -n "/air =/,/^$/p" | egrep -o '[-0-9].*[0-9]' | tr -s ', ' '\n' | awk -v l=$l '
                    function rad(x) { return x*atan2(0,-1)/180 } {
                    lat = l * 2.5 - 90; lon = n * 2.5; n += 1
                    if (lat < 0) { lat += 1.25 } else { lat -= 1.25 }
                    a = 6378137.678; b = 6356752.964; E = 1-b^2/a^2; r = rad(lat)
                    A = (a*rad(2.5))^2*(1-E)*cos(r)/(1-E*sin(r)^2)^2/510065728777854
                    printf "%5.2f %5.1f %6.2f %12.10f\n", lat, lon, $1/100+465.15, A}'
            done | awk -v T=$t -v P=${P[p]} '
                {S+=$3*$4} END {printf "%3d %4d %6.2f\n", T, P, S}'
        done
    done
}

avgair() {
    for p in ${P[*]}; do
        awk -v P=$p '$2==P{S+=$3;N+=1} END {printf "%8.1f %6.2f\n",P*100,S/N}' air.old
    done
}

plotavgair() {
    avgair > avgair.csv
    echo 'set term png size 740,740; unset key; 
    set mxtics 2; set mytics 2; set ytics 10000
    set grid mytics ytics xtics
    set title "Temperature (K) vs. Pressure (Pa)"
    set yrange [101325 to 0]
    plot "avgair.csv" u 2:1 w linespoints ps 1 pt 3 lw 3 lc rgb "red"' | gnuplot
}

slopes() {
    for p in ${P[*]}; do 
        printf "%4d: " $p; sed 's/\... / /' .p$p.dat |\
            awk '{T[$1]+=$2}END{for (i in T) printf "%s %6.2f\n",i,T[i]/12}' |\
            gmt gmtregress -Fp -o5 | awk '{printf "%9.6f\n", $1}'
    done
}

plotair() {
    for p in ${P[*]}; do 
        awk -v P=$p '$2==P{printf "%7.2f %6.2f\n", $1/12+1979+1/24, $3}' air.old > .p$p.dat
    done
    (echo 'set term png size 740,1000; set key below; 
    set mxtics 5; set mytics 5; set grid mytics ytics xtics
    set title "Temperature (K) at Pressure (hPa)"
    set xrange [1978 to 2020]; set yrange [300 to 200]; plot \';
    for p in ${P[*]}; do 
        echo "'.p$p.dat' u 1:2 t '$p' w points,\\"
    done ) | sed '$s/..$//' | gnuplot
}

lapse(){
    avgair > avgair.csv
    I=(`head -1 avgair.csv`)

    awk -v Ps=${I[0]} -v Ts=${I[1]} 'BEGIN{
    #   g  = 9.7977074331       # Based on EGM2008
        g  = 9.7977115          # Account for using Atmosphereless GM constant
        g  = g - 0.16           # Adjust g to middle of the troposphere
        R  = 8.31446261815324   # Gas Constant
        M  = 0.0289644          # from US Standard Atmosphere
    } 
    $1 >= 10000 && $1 < 100000 {
        P = $1; T = $2
        L = (g*M/R)*log(T/Ts)/log(P/Ps)
        printf "%s %10.6f\n", $1, L
    }' avgair.csv |\
        awk '{S+=$2; print} END {printf "\nAVG = %12.10f\n", S/NR}'
}

We source the code, to allow its functions to act like command-line commands we can run in parts.

$ source air.sh

The first thing we must do is generate the data for all the other commands:

$ aircsv > air.csv

This will take several hours to run on an average laptop. Afterwards we are free to run various things quickly. When complete, let’s plot the air data:

$ plotair > p.png

What’s the trend for each pressure?

$ slopes

1000:  0.019277
 925:  0.017171
 850:  0.017911
 700:  0.021696
 600:  0.015600
 500:  0.018723
 400:  0.017133
 300:  0.013247
 250:  0.006388
 200: -0.005289
 150: -0.022488
 100: -0.054646
  70: -0.051159
  50: -0.043313
  30: -0.047701
  20: -0.055906
  10: -0.110508

The above is the trend in °K/year. You’ll notice that the lower atmosphere is getting hotter while the upper atmosphere is getting colder.

This is a signature of reduced insolation with a greater reduction of cloud cover. In simple terms: there is less sun power but even less clouds, allowing MORE of that sun to get through.

This is NOT a signature of greenhouse gas forcing, as the literature has the magical pivot point at either the beginning of the tropopause (P~100 hPa) or in the middle of the troposphere (P~500 hPa) or where T~242°K (P~410 hPa), and certainly not at P~225 hPa as we see here.

What’s the average for the entire 40 years for each pressure? (Now in Pascals)

$ avgair

100000.0 288.28
 92500.0 284.13
 85000.0 280.74
 70000.0 272.96
 60000.0 266.39
 50000.0 257.76
 40000.0 247.02
 30000.0 233.47
 25000.0 226.07
 20000.0 219.35
 15000.0 212.70
 10000.0 206.58
  7000.0 207.84
  5000.0 211.68
  3000.0 217.00
  2000.0 221.34
  1000.0 229.13

What does that look like?

$ plotavgair > a.png

The troposphere is wherever pressure exceeds 10000 pascals. This may not be the exact figure, but our resolution doesn’t allow any better.

Now I want to know the tropospheric lapse rate.

$ lapse

92500.0   0.006245
85000.0   0.005475
70000.0   0.005140
60000.0   0.005190
50000.0   0.005420
40000.0   0.005660
30000.0   0.005881
25000.0   0.005887
20000.0   0.005700
15000.0   0.005381
10000.0   0.004859

AVG = 0.0055307273

Don’t let the precision of the average fool you, but the 99% confident answer is between 0.0055 and 0.0057 °C/meter. This is an average for a mixed wet/dry troposphere, i.e the actual troposphere. It is what is actually observed with the average water vapor level being what it actually is. All those using 0.0065 °C/m as used in the US/International Standard Atmosphere will not be reflecting reality (only an ideal dry atmosphere model), and should abandon doing so.

Enjoy 🙂 -Zoe

7 thoughts on “Air Temperatures and Average Lapse Rate

  1. Zoe,
    I have calculated the Troposphere lapse rate based on IGRA balloon data downloaded from Connolly and Connolly and got 6.1.
    My method averaged data from all latitudes, taking into account the area represented by each latitude band and had a cut off at 0.22 bar. This pressure represents the Tropopause as calculated using the method described by Connolly and Connolly and averaged over the entire globe on an area basis as above.
    Interestingly if you Google “virial lapse rates” and use the virial dry lapse rate to calculate a global average wet lapse rate based on the IGRA data for temperature and humidity you get 6.1, the same value.

    Liked by 1 person

    1. Dear Chris,
      I was thinking: arbitrarily cutting off at 0.22 bar is most likely erroneous. The troposphere ends at DIFFERENT pressures at different latitudes. My method was to average the gradient across all latitudes and then see where temperatures stop decreasing as you move up.

      Like

  2. Do we know much about the reverse lapse rate at the top of the graph? That is to say the reverse lapse rate in the stratosphere? I mostly understand the lapse rate in the troposphere. But I don’t really understand why it reverses.

    Like

  3. Zoe,
    Connolly and Connolly provided a spreadsheet with weather balloon data for each season in each of twelve latitude bands (15 degrees latitude each). There was a download link to this on WUWT.
    For each of those 48 tables of data I calculated the tropopause pressure using their method. Using this value I then calculated the surface temperature, tropopause temperature, lapse rate (for each Km and last fraction of a Km) up to the tropopause.
    I then calculated an area weighted global average for each parameter.
    The tropopause is usually defined as an arbitrary low value of lapse rate which means that some low values will be included in any average based on this definition. That may explain why my value is a bit higher than yours. The widely used value of 6.5 might reflect the desire for a value more aligned to the latitudes where aircraft typically fly.

    My global average results are:
    Surface 287.8K (14.7C)
    Tropopause height 11350m
    Lapse rate 6.11
    Tropopause temperature 219K
    Tropopause pressure 0.23 bar

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: