
The map is fixed per this article.
# Zoe Phin, 2021/02/13
# File: lai.sh
# To Run: source lai.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=MOD15A2_M_LAI&date=2016-01-01' | grep '"viewDataset' | cut -f2 -d "'" | tr '\n' ' ')
let n=1
for si in $list; do
N=$(printf "%02d" $n)
wget -O lai$N.jpg "https://neo.sci.gsfc.nasa.gov/servlet/RenderData?si=$si&cs=rgb&format=JPEG&width=750&height=375"
sleep 1
let n++
done
}
fix() {
for jpg in `ls -1 lai*.jpg`; do
pnm=${jpg/.jpg/.pnm}
echo -e 'P3\n750 375\n255\n' > $pnm
jpegtopnm $jpg | pnmtoplainpnm | sed 's/ /\n/g' | awk '{printf "%03d %03d %03d ", $1, $2, $3}' | fold -w9000 > .tmp
cut -c1-300 .tmp > .right
cut -c300- .tmp > .left
paste -d '' .left .right >> $pnm
pnmtopng $pnm > $jpg
done
rm -f *.pnm
}
animate() { convert -delay 25 -loop 0 lai*.jpg animlai.gif; }
Happy Valentines Day!
❤ -Zoe
Hi Zoe,
Have you ever looked at surface atmospheric pressure according to latitude? The annual cycle? The change over time?
LikeLike
This is just a pretty picture. 2016 Leaf Area Index played in a loop, so people can see a typical annual birth and death. Change over time is next. You’re interrsted in knowing pressure by latitude? I can do that. -Z
LikeLiked by 1 person
It probably be more beautiful with higher resolution.
And what would it look like, if black {dry} deserts were purple?
LikeLike
I made it fit the width of my blog. Dont’t know how to make deserts purple without making oceans purple. lol
LikeLike