Grid point fields in some grib files are encoded into the JPEG 2000 code. To process these fields with eccodes, you need to enable the JPG feature. On MacOS, there are some details should be showed.app
According to the wiki page about ecCodes installation, ecCodes uses CMake for compilation and installation. If you wish to enable JPG feature of ecCodes, you are advised to configure the build with:ui
cmake -DENABLE_JPG=ON ...
This option of cmake should look for Jasper or OpenJPG. Install openjpeg
package with Homebrew for MacOS:debug
brew install openjpeg
openjpeg
has been installed at /usr/local/Cellar/openjpeg/2.3.1
.code
Then we need to make cmake recognize the installed openjpeg.orm
cmake -DENABLE_JPG=ON -DOPENJPEG_INCLUDE_DIR=/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3
In the printed debug information, you will see:get
-- The following OPTIONAL packages have been found: * Git * HDF5 * NumPy * CMath * JPEG * OpenJPEG
You have enabled JPG feature successfully.it