Skip Navigation Links www.nws.noaa.gov 
NOAA logo - Click to go to the NOAA home page National Weather Service   NWS logo - Click to go to the NWS home page
Climate Prediction Center
 
 

 
About Us
   Our Mission
   Who We Are

Contact Us
   CPC Information
   CPC Web Team

 
HOME > Monitoring_and_Data > Oceanic and Atmospheric Data > Reanalysis: Atmospheric Data > wgrib2 FUTURE Changes with v3.0.3
 

wgrib2: v3.1.2

Changes from wgrib2 v3.1.1 to v3.1.2

Wgrib2 v3.1.2 is a minor release.

Added better support for grids up to 2**32-1 (4,294,967,295) grid points. This endeavor started in 2016. Progress started slowly because of the lack of large-memory machines and urgency. However, I received my first bug report about the 4G problem.

The makefile is now CMake aware. Without CMake, you will not be able to install libaec or OpenJPEG. Previously CMake was not necessary but libaec and OpenJPEG would only work on intel/amd machines.

The parallelization of the uncompressing of complex-compressed files was improved. Decoding of the GFS master file went from 14 seconds to 9 seconds on a 6-core ryzen 5600g cpu using a nmve drive. Unfortunately the speed was slow and unimproved on a Luster file system.

Previous versions of wgrib2 handled non-spherical Lambert Azimuthal Equal Area Projection using a spherical earth. Now this projection is handled by proj4 which means that proj4 is now installed by default.

The geolocation tag (-geolocation) is better defined (external value was added). Output is changed from "XYZ" to "geolocation=XYZ".

Alpha: USE_NETCDF4 redefined and USE_HDF5 added. The change allows linking to precompiled NetCDF/HDF5 libraries.

Alpha: compiling with Intel's oneAPP icx and ifx compilers. Icx had a problem executing one OpenMP loop. Either the loop is incorrect and several compilers have been accidently generating "correct" code for years, or icx is silently generating bad code. Anyways this is why wgrib2 compiled by icx/ifx is considered alpha status.

Update for local JMA product definition templates.

Fixes for v3.1.2 #1

USE_SHARED_LIB=1   fails, need to modify grib2/makefile

----- old grib2/makefile
${zlib}:        ${zdir}
        # cd ${zdir} && export CFLAGS="${wCPPFLAGS}" && ./configure --prefix=${cwd} --static && ${MAKE} install
        cd ${zdir} && export CFLAGS="" && ./configure --prefix=${cwd} --static && ${MAKE} install
----- fixed grib2/makefile
${zlib}:        ${zdir}
        cd ${zdir} && export CFLAGS="${wCPPFLAGS}" && ./configure --prefix=${cwd} --static && ${MAKE} install
        # removed 3/2023 cd ${zdir} && export CFLAGS="" && ./configure --prefix=${cwd} --static && ${MAKE} install
------
This is plain old fashioned bug that only affects wgrib2 v3.1.2. It is a fix that didn't fix anything.

Fixes for v3.1.2 #2

Proj fails to build using gcc on MacOS. Need to compile proj4 without -ffast-math

----- old grib2/makefile
ifeq (${COMP_SYS},gnu_linux)
   wCPPFLAGS+=-Wall -Wmissing-prototypes -Wold-style-definition -Werror=format-security -ffast-math -O3
----- new grib2/makefile
ifeq (${COMP_SYS},gnu_linux)
   wCPPFLAGS+=-Wall -Wmissing-prototypes -Wold-style-definition -Werror=format-security -O3
------
Usually fast-math only has minor impacts on the precision. However the differences were enough to trigger the Proj validation routines. Wgrib2 v3.1.2 turn off fast-math.

Fixes for v3.1.2 #3

OpenJPEG fails to build because of missing libraries.  You need to build
the third party libraries which are used the OpenJPEG auxilary programs but not 
used by the OpenJPEG library.  However, building the
third party software fails on my Ubuntu system.  So I will wait for the
OpenJPEG build to be fixed before making the third party software the 
default in the wgrib2 build. (Tested using OneAPI.)

----- old grib2/makefile
        cd ${openjpegdir}/build && cmake .. -DZLIB_INCLUDE_DIR=${cwd}/include -DZLIB_LIBRARY=${zlib} -DPNG_LIBRARY=${pnglib} -DPNG_PNG_INCLUDE_DIR=${cwd}/include -DCMAKE_C_COMPILER=${CC} -DCMAKE_POSITION_INDEPENDENT_CODE:bool=ON && make
----- new grib2/makefile
        cd ${openjpegdir}/build && cmake .. -DZLIB_INCLUDE_DIR=${cwd}/include -DZLIB_LIBRARY=${zlib} -DPNG_LIBRARY=${pnglib} -DPNG_PNG_INCLUDE_DIR=${cwd}/include -DCMAKE_C_COMPILER=${CC} -DCMAKE_POSITION_INDEPENDENT_CODE:bool=ON -BUILD_THIRDPARTY:BOOL=ON && make
------

Future Changes for v3.1.3

  • Support for OpenMP 3.1, 4.0, 4.5, 5.0 (old: 3.1)
  • testing SIMD using OpenMP 4.0
  • plan to test GPU using OpenMP 5.0
  • -ens_processing and -new_grid could use a GPU because parallelized over number of grid points
  • other loops are parallized over smaller numbers, so GPU is not ideal
  • so that is why OpenMP added the collapse clause
  • fixes for makefile (backported to v3.1.2)
  • installing the AEC library is now default, requiring a recent CMake to build
  • Found bug in -set_bitmap 1 code. Will release wgrib2 v3.1.3 ASAP (ed. 10/23/2023).

NOAA/ National Weather Service
National Centers for Environmental Prediction
Climate Prediction Center
5830 University Research Court
College Park, Maryland 20740
Climate Prediction Center Web Team
Page dates: 4/2022
Disclaimer Privacy Policy