Code Monkey home page Code Monkey logo

go-eccodes's Introduction

go-eccodes

Go wrapper for ecCodes

Examples

https://github.com/amsokol/go-eccodes/tree/master/cmd

Build and install ecCodes C library

Build and install ecCodes C library for Linux

Install development tools

sudo apt-get install gcc make cmake libtool

Build and install zlib

source: zlib

cd ./contrib
tar -xzf zlib-1.2.11.tar.gz
cd zlib-1.2.11
make distclean
./configure --static
make
sudo make install
cd ..
rm -r ./zlib-1.2.11
cd ..

Build and install libpng

source: libpng

cd ./contrib
tar -xzf libpng-1.6.34.tar.gz
cd libpng-1.6.34
./configure --disable-shared
make check
sudo make install
cd ..
rm -r ./libpng-1.6.34
cd ..

Build and install libaec

source: libaec

cd ./contrib
tar -xzf libaec-1.0.2.tar.gz
cd libaec-1.0.2
mkdir build
cd build
../configure --disable-shared
make check
sudo make install
cd ../..
rm -r ./libaec-1.0.2
cd ..

Build end install libjpeg

source: libjpeg

cd ./contrib
tar -xzf jpegsrc.v9b.tar.gz
cd jpeg-9b
./configure --disable-shared
make
make test
sudo make install
cd ..
rm -r ./jpeg-9b
cd ..

Build end install libopenjpeg2

source: libopenjpeg2

cd ./contrib
tar -xzf openjpeg-2.1.2.tar.gz
cd openjpeg-2.1.2
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS:bool=OFF -DBUILD_THIRDPARTY:bool=ON ..
make
sudo make install
cd ../..
rm -r ./openjpeg-2.1.2
cd ..

Build end install libjasper

source: libjasper

cd ./contrib
tar -xzf jasper-version-2.0.14.tar.gz
mkdir build
cd build
cmake -DJAS_ENABLE_SHARED=false ../jasper-version-2.0.14
make clean all
make test
sudo make install
cd ..
rm -r ./build
rm -r ./jasper-version-2.0.14
cd ..

Build end install libeccodes

source: libeccodes

cd ./contrib
tar -xzf eccodes-2.5.0-Source.tar.gz
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_NETCDF=OFF -DENABLE_JPG=ON -DENABLE_PNG=ON -DENABLE_AEC=ON \
    -DENABLE_PYTHON=OFF -DENABLE_FORTRAN=OFF -DENABLE_MEMFS=ON ../eccodes-2.5.0-Source
make
ctest
sudo make install
cd ..
rm -r ./build
rm -r ./eccodes-2.5.0-Source
cd ..

Build and install ecCodes C library for Windows (using MSYS2/MINGW64)

Install MSYS2

source: MSYS2

  • download installer for x86_64

  • install MSYS2 following the guide

  • uncomment MSYS=winsymlinks:nativestrict everywhere to enable symbol links

Install Mingw-w64 (run MSYS2 MinGW 64-bit shell)

pacman -S --needed base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake

Install ecCodes dependencies (run MSYS2 MinGW 64-bit shell)

pacman -S mingw-w64-x86_64-zlib
curl -O http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-openjpeg2-2.1.2-2-any.pkg.tar.xz
pacman -U mingw-w64-x86_64-openjpeg2-2.1.2-2-any.pkg.tar.xz
pacman -S mingw-w64-x86_64-jasper

Build and install libaec

source: libaec

  • extract libaec-1.0.2.tar.gz to MSYS2 user home directory

  • replace original files by files from contrib\MSYS2\patches\libaec-1.0.2

  • run MSYS2 MinGW 64-bit shell and execute commands to build and install:

tar -xzf libaec-1.0.2.tar.gz
cd libaec-1.0.2
mkdir build
cd build
../configure
make check
make install

Build end install libeccodes

source: libeccodes

  • extract eccodes-2.5.0-Source.tar.gz to MSYS2 user home directory

  • replace original files by files from contrib\MSYS2\patches\eccodes-2.5.0-Source

  • run MSYS2 MinGW 64-bit shell and execute commands to build and install:

mkdir build
cd build
cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=/mingw64 -DDISABLE_OS_CHECK=ON -DENABLE_NETCDF=OFF -DENABLE_JPG=ON -DENABLE_PNG=ON -DENABLE_AEC=ON \
    -DENABLE_PYTHON=OFF -DENABLE_FORTRAN=OFF -DENABLE_MEMFS=OFF ../eccodes-2.5.0-Source
make
make install
  • set ECCODES_DEFINITION_PATH environment variable to <your_path>\msys64\mingw64\share\eccodes\definitions

go-eccodes's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-eccodes's Issues

Error installing go-eccodes

I've installed all the dependencies listed in the readme. When I then run go get github.com/amsokol/go-eccodes I get the following error:

../../go/src/github.com/amsokol/go-eccodes/io/file.go:8:2: invalid input file name "+linux_amd64.go"

No sure what to do with this. I am running Macbook Pro 10.13.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.