[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #FHN-347066]: ArrayIndexOutOfBoundsException reading grib2

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [netCDFJava #FHN-347066]: ArrayIndexOutOfBoundsException reading grib2
  • Date: Thu, 24 Feb 2011 14:31:33 -0700

Hi Steve,

Using the latest version of wgrib2, I get the following error. 
./wgrib2 -grid /local/robb/data/grib/wrf2/testWrf.grb2 | m

*** FATAL ERROR: rd_grib2_msg, missing end section ('7777') ***

Can you confirm the testWrf.grb2 is intact?

Investigating the file with Octal Dump(od), 

The first record starts with GRIB and ends with 7777 and
the last part of the file seems ok too.

664060060 236 034   U   d 240   l   +   P   d 234   f 213 021 252   5   H
664060100   7   7   7   7

The problem is that our grib library converts the Grid template number to -1 
which is invalid. This code has been used to read many different grib files so 
I don't suspect that's the problem. What's your take on this?

Robb...





Ticket Details
===================
Ticket ID: FHN-347066
Department: Support netCDF Java
Priority: High
Status: Open