Last active
June 6, 2023 02:47
-
-
Save r35krag0th/ce83baab3b7da3157b74c7838a246d45 to your computer and use it in GitHub Desktop.
Building 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
#!/usr/bin/env bash | |
# NOTE: This requires you to have Homebrew installed | |
# --> https://brew.sh/ | |
# NOTE: You need to have Homebrew's GCC installed | |
# --> brew install gcc | |
wget ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz | |
tar xvzf wgrib2.tgz | |
cd grib2/ | |
# NOTE: gfortran is provided by the GCC homebrew formula | |
export CC=$(brew --prefix gcc)/bin/gcc-8 | |
export FC=$(brew --prefix gcc)/bin/gfortran | |
echo -e "\033[32m==> \033[0mRunning MAKE" | |
make | |
echo "" | |
echo -e "\033[32m==> \033[0mRunning MAKE LIB" | |
make lib |
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
# Tested and Working on Ubuntu 14.04 and 18.04 | |
sudo apt-get update && sudo apt-get upgrade -y | |
sudo apt-get install gfortran build-essential | |
wget ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz | |
tar xvzf wgrib2.tgz | |
cd grib2/ | |
export CC=gcc | |
export FC=gfortran | |
make && make lib | |
ls -alh wgrib2/wgrib2 | |
wgrib2/wgrib2 -config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a major flaw in the compilation code: I get an error message:
Grib.c:(.text+0x3f0): undefined reference to `aec_grib_out'
Please help me resolve.