1

I have used gdal_translate in the past with grib2 files without a problem, but when I run my command:

gdal_translate -of GTIFF -b 1 input_grib2 output_raster

My values for the output raster are -3 for all pixels (I believe this is the nodata value from the grib2 file).

When I bring the grib2 directly into ArcGIS I can see the actual values which range from -3 to 120.1

When I use gdalinfo -stats the values of band 1 (the only band) are all -3

I am trying not to use any arcgis (arcpy) commands in this script, and I am searching for a way to fix this just using gdal.

The grib2 file is coming from here:

http://mtarchive.geol.iastate.edu/2016/07/07/mrms/ncep/PrecipRate/PrecipRate_00.00_20160707-000200.grib2.gz

After clipping the grib2 file using wgrib2 -small_grib it works -- would like to find a way around this, but I needed a smaller area of interest anyways so it works out I guess.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.