Created
April 15, 2017 08:26
-
-
Save bruceh48/b5c67f6db6e4ee161ed6364a97c81d9f to your computer and use it in GitHub Desktop.
Compile and install WGRIB2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update | |
apt-get install -y build-essential libaec-dev zlib1g-dev libcurl4-openssl-dev libboost-dev curl wget zip unzip bzip2 gfortran gcc g++ | |
rm -rf /usr/local/grib2/ | |
mkdir -p /usr/local/grib2/ | |
cd /code/ | |
if [ ! -f "/tmp/wgrib2.tgz" ]; then | |
wget ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz.v2.0.6c -O /tmp/wgrib2.tgz | |
fi | |
tar -xf /tmp/wgrib2.tgz | |
mv /tmp/grib2/ /usr/local/grib2/ | |
cd /usr/local/grib2/grib2 | |
export FC=gfortran && export CC=gcc | |
make && rm -rf /usr/local/bin/wgrib2 | |
ln -s /usr/local/grib2/grib2/wgrib2/wgrib2 /usr/local/bin/wgrib2 | |
rm /tmp/wgrib2.tgz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are some compile errors with reference to
grib2/wgrib2/config.h
: