Earth Average Elevations and Depths

What is the average depth of the ocean? What is the average elevation on land? And what is the average elevation of the Earth? I will answer all of these questions.

I get my data from NOAA:

ETOPO1 is a 1 arc-minute global relief model of Earth’s surface that integrates land topography and ocean bathymetry. Built from global and regional data sets, it is available in “Ice Surface” (top of Antarctic and Greenland ice sheets) and “Bedrock” (base of the ice sheets).

I need a tool to read NOAA’s files.

> sudo apt install nco

Download the relevant files:

> wget -c https://www.ngdc.noaa.gov/mgg/global/relief/ETOPO1/data/ice_surface/cell_registered/netcdf/ETOPO1_Ice_c_gmt4.grd.gz
> wget -c https://www.ngdc.noaa.gov/mgg/global/relief/ETOPO1/data/bedrock/cell_registered/netcdf/ETOPO1_Bed_c_gmt4.grd.gz

Unzip and rename the files:

> unzip ETOPO1_Ice_c_gmt4.grd.gz; mv ETOPO1_Ice_c_gmt4.grd etop01i.csv
> unzip ETOPO1_Bed_c_gmt4.grd.gz; mv ETOPO1_Bed_c_gmt4.grd etop01b.csv

Now here is my main program. Save the following to a new file etop.sh.

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

for l in `seq 0 10799`; do
    ncks -v z -d y,$l,$l etop01$1.nc | sed -n '/z =/,/^$/p' | egrep -o '[-0-9].*[0-9]' | tr -s ', ' '\n' | awk -v l=$l '  
    function rad(x) { return x*atan2(0,-1)/180 }  
    {
        a = 6378137.678; b = 6356752.964; E = 1-b^2/a^2;                         

        lon = n - 180 + 1/120; n+=1/60     
        lat = l/60 - 90 + 1/120

        x = rad(lat)    
        A = rad(1/60)^2*a^2*(1-E)*cos(x)/(1-E*sin(x)^2)^2      

        printf "%7.3f %8.3f %5.0f %6.3f\n", lat, lon, $1, A 
    }'   
done 

This program takes 1 argument: b for bedrock, and i for ice. Make the program executable and run it: (This will take quite a bit of time, and generates two 8.5GB files)

> chmod +x etop.sh
> ./etop.sh b > b.csv
> ./etop.sh i > i.csv

I will use the Surface Area from this article. Now I write an additional program: etop2.sh

echo -n 'Over land, Bedrock, Water surface = 0 ... '
awk '$3>0 {S+=$3*$4}       END {printf "%8.3f\n", S/510065728777854.5264}' b.csv 
echo -n 'Over land, Bedrock, No water included ...'
awk '$3>0 {S+=$3*$4;N+=$4} END {printf "%8.3f\n", S/N}' b.csv 
echo -n 'Under water, Bedrock, No land Included ... '
awk '$3<=0{S+=$3*$4;N+=$4} END {printf "%8.3f\n", S/N}' b.csv
echo -n 'Bedrock, Overall Average ... '
awk '     {S+=$3*$4}       END {printf "%8.3f\n", S/510065728777854.5264}' b.csv 

echo -n 'Over land, Ice Top, Water surface = 0 ... '
awk '$3>0 {S+=$3*$4}       END {printf "%8.3f\n", S/510065728777854.5264}' i.csv 
echo -n 'Over land, Ice Top, No water included ...'
awk '$3>0 {S+=$3*$4;N+=$4} END {printf "%8.3f\n", S/N}' i.csv 
echo -n 'Under water, Ice Top, No land Included ... '
awk '$3<=0{S+=$3*$4;N+=$4} END {printf "%8.3f\n", S/N}' i.csv 
echo -n 'Ice Top, Overall Average ... '
awk '     {S+=$3*$4}       END {printf "%8.3f\n", S/510065728777854.5264}' i.csv 

Make it executable and run it: (This will take >30 minutes on an average laptop)

> chmod +x etop2.sh
> ./etop2.sh

Over land, Bedrock, Water surface = 0 ...  180.573
Over land, Bedrock, No water included ... 651.100
Under water, Bedrock, No land Included ... -3624.931
Bedrock, Overall Average ... -2439.039
Over land, Ice Top, Water surface = 0 ...  231.404
Over land, Ice Top, No water included ... 796.560
Under water, Ice Top, No land Included ... -3683.895
Ice Top, Overall Average ... -2382.302

It’s interesting to note that total ice stacks up to an average of ~51 meters globe wide.

Using Ice Top data:

The average depth of the ocean is: 3683.9 meters

The average elevation on land is 796.6 meters

Average height above sea level is 231.4 meters

Treating the ocean bottom and land top as a surface, the average height is 2382.3 meters BELOW sea level.

Enjoy 🙂 -Zoe

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: