Re: [netcdf-java] Grib2Netcdf

Hi Kevin:

1) in general, use

java -Xmx512m -classpath netdfAll-<version>.jar ucar.nc2.dataset.NetcdfDataset 
-in<fileIn>  -out<fileOut>  [-isLargeFile]

see:

http://www.unidata.ucar.edu/software/netcdf-java/reference/Cookbook.html#writeClasssic

2) it appears you are exceeding the 2G limit, so be sure to use -isLargeFile flag

3) check to see if the variables are correct, since the tables may need updating. Let me know if you see any problems


John

On 12/12/2011 10:44 AM, Kevin Manross wrote:

Greetings!

I have been using the utility ucar.nc2.iosp.grib.Grib2Netcdf in toolsUI-4.1 successfully to convert High Resolution Rapid Refresh (HRRR) GRIB2 files to netcdf-3.

When trying to use this utility in toolsUI-4.2, I am unable to write out the file:

[manross@albion HRRR]$ java -Xmx512m -classpath /mnt/home/manross/Programming/Java/toolsUI-4.2.jar ucar.nc2.iosp.grib.Grib2Netcdf hrrr_20111212-1200F0000.grib2 out_42.nc <http://out_42.nc>
Mon Dec 12 17:20:44 GMT 2011 ... Start of Grib2Netcdf
read grib file=hrrr_20111212-1200F0000.grib2 write to netCDF file=out_42.nc <http://out_42.nc>
Dec 12, 2011 5:20:44 PM ucar.nc2.iosp.grid.GridVariable makeVariable
WARNING: Duplicate record for hrrr_20111212-1200F0000.grib2
GribGridRecord{param=Total_precipitation, levelType1=1, levelValue1=0.0, forecastTime=0, pdsOffset=369269359} GribGridRecord{param=Total_precipitation, levelType1=1, levelValue1=0.0, forecastTime=0, pdsOffset=369268399}
Dec 12, 2011 5:20:44 PM ucar.nc2.iosp.grid.GridVariable makeVariable
WARNING: Duplicate record for hrrr_20111212-1200F0000.grib2
GribGridRecord{param=Water_equivalent_of_accumulated_snow_depth, levelType1=1, levelValue1=0.0, forecastTime=0, pdsOffset=369270079} GribGridRecord{param=Water_equivalent_of_accumulated_snow_depth, levelType1=1, levelValue1=0.0, forecastTime=0, pdsOffset=369269119}
Dec 12, 2011 5:20:44 PM ucar.nc2.iosp.grid.GridVariable makeVariable
WARNING: Duplicate record for hrrr_20111212-1200F0000.grib2
GribGridRecord{param=Convective_precipitation, levelType1=1, levelValue1=0.0, forecastTime=0, pdsOffset=369269599} GribGridRecord{param=Convective_precipitation, levelType1=1, levelValue1=0.0, forecastTime=0, pdsOffset=369268639}
Dec 12, 2011 5:20:44 PM ucar.nc2.iosp.grid.GridVariable makeVariable
WARNING: Duplicate record for hrrr_20111212-1200F0000.grib2
GribGridRecord{param=Large_scale_precipitation_non-convective, levelType1=1, levelValue1=0.0, forecastTime=0, pdsOffset=369269839} GribGridRecord{param=Large_scale_precipitation_non-convective, levelType1=1, levelValue1=0.0, forecastTime=0, pdsOffset=369268879} Exception in thread "main" java.lang.IllegalArgumentException: Variable starting pos=2164328984 may not exceed 2147483647
at ucar.nc2.iosp.netcdf3.N3header.writeHeader(N3header.java:671)
at ucar.nc2.iosp.netcdf3.N3header.create(N3header.java:602)
at ucar.nc2.iosp.netcdf3.N3iosp.create(N3iosp.java:641)
at ucar.nc2.NetcdfFileWriteable.create(NetcdfFileWriteable.java:605)
at ucar.nc2.FileWriter.writeToFile(FileWriter.java:225)
at ucar.nc2.FileWriter.writeToFile(FileWriter.java:96)
at ucar.nc2.iosp.grib.Grib2Netcdf.main(Grib2Netcdf.java:125)


Unfortunately, I can't even find the Grib2Netcdf utility in toolsUI-4.3.

Is this utility no longer available or supported? Is there anything like it in 4.3? If not, is there a chance that I could get this fixed in v4.2?

I'd be happy to supply the GRIB2 file if people want to test this.

Many thanks!!

-kevin.


--
+-----------------------------------------------------+
Kevin L. Manross           |  ** New Address **
CIMMS Research Associate   |     120 David L. Boren Bvd
NSSL : WRDD : SWAT         |     Rm 3923
<kevin.manross@xxxxxxxx>  
<https://hedwig.nssl.noaa.gov/frame.html?&security=false&lang=en>    |     
405.325.6385
www.cimms.ou.edu/~kmanross  <http://www.cimms.ou.edu/%7Ekmanross>  |
"My opinions are my own and not representative of
CIMMS, NSSL, NOAA or any affiliates"
+-----------------------------------------------------+



_______________________________________________
netcdf-java mailing list
netcdf-java@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/

  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: