Big Blue Marble

I don’t know about you, but I always thought this was a beautiful image:

Blue Marble ; Source: NASA, 2012, Showing 2004.

I decided to fix it per this article, and make a large (1920×960) animated version. The result is here. It’s 7MB, so please wait for it to load. Right-click and save image in case wordpress is annoying. I made it my wallpaper, and so can you!

Enjoy 🙂 -Zoe

# Zoe Phin, 2021/02/14
# File: terra.sh
# Run: source terra.sh; require; download; fix; animate

require() { sudo apt-get install -y netpbm imagemagick; }

download() {
    list=$(wget -qO- 'https://neo.sci.gsfc.nasa.gov/view.php?datasetId=BlueMarbleNG' | grep '"viewDataset' | cut -f2 -d "'" | tr '\n' ' ')	
    let n=1
    for si in $list; do 
        N=$(printf "%02d" $n)
        wget -O terra$N.jpg "https://neo.sci.gsfc.nasa.gov/servlet/RenderData?si=$si&cs=rgb&format=JPEG&width=1920&height=960"
        let n++
    done
}

fix() { 
    for jpg in `ls -1 terra*.jpg`; do
        pnm=${jpg/.jpg/.pnm}
        echo -e 'P3\n1920 960\n255\n' > $pnm
        jpegtopnm $jpg | pnmtoplainpnm | sed 1,3d | sed 's/  /\n/g' | awk '{printf "%03d %03d %03d ", $1, $2, $3}' | fold -w23040 > .tmp

        cut -c1-756 .tmp > .right
        cut -c756-  .tmp > .left
        paste -d '' .left .right >> $pnm

        pnmtopng $pnm > $jpg
    done
    rm -f *.pnm
}

animate() { convert -delay 50 -loop 0 terra*.jpg animterra.gif; }

Published by Zoe Phin

https://phzoe.com

5 thoughts on “Big Blue Marble

    1. Oh yeah? Is Svalbard warming a propaganda talking point in Norway?

      P.S. This animation is just the year 2004, looped. It’s just 12 (Jan-Dec) beautiful cloudless images prepared by NASA in 2012.

      Like

      1. Yes. Svalbard =climate catastrophy, melting permafrost and all of that. I think the norwegian meteorological institute has forgotten all about AMO, and also forgotten that the Norwegian Polar Institute has 57 000 aerial photos dating from as early as 1932. It can be clearly seen, that in the 1930s, it was just as warm at Svalbard.

        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

<span>%d</span> bloggers like this: