[gdal-dev] GRIB2 to NetCDF - Large areas of data missing

Jason Greenlaw - NOAA Affiliate jason.greenlaw at noaa.gov
Thu Jul 18 11:18:20 PDT 2013


Etienne,

This workaround seems to have solved my problem, although I needed to
increase the value from 1000 to 2000 in some instances (some of the GRIB2
messages worked with 1000, others didn't).

So I am now using:

    gdalwarp -wm 2000 --config GDAL_CACHEMAX 2000 -of netcdf -srcnodata
9999.0 -dstnodata 9999.0 -t_srs EPSG:4326 conus-wspd-01.bin conus-wspd-01.nc

Thanks very much - I will update the trac ticket.

Jason

<Jason.Greenlaw at noaa.gov>



On Wed, Jul 17, 2013 at 6:49 PM, Etienne Tourigny
<etourigny.dev at gmail.com>wrote:

> You probably are experiencing a known bug, when the warping operation
> needs more memory than the warp cache.
>
> Try setting adding the following to the gdalwarp command (if it doesn't
> work try a larger value).
>
> --config GDAL_CACHEMAX 1000 -wm 1000
>
> Also please update the ticket with any new information
>
> http://trac.osgeo.org/gdal/ticket/4484
>
> cheers
> Etienne
>
> On Wed, Jul 17, 2013 at 5:31 PM, Jason Greenlaw - NOAA Affiliate <
> jason.greenlaw at noaa.gov> wrote:
>
>> I am experiencing strange behavior when reprojecting/converting a GRIB2
>> file to NetCDF using gdalwarp, where the resulting NetCDF file is missing
>> lots of data (or possibly being set incorrectly to NoData) west of a
>> certain longitude.  However, if I instead reproject from GRIB2 to an
>> intermediate format (e.g. GeoTIFF), then convert to NetCDF using
>> gdal_translate, the result is correct.
>>
>> The source projection is the weather service's custom lambert conformal,
>> and the destination is WGS84.  I'm using the following command:
>>
>>     gdalwarp -wm 256 -of netcdf -srcnodata 9999.0 -dstnodata 9999.0
>> -t_srs EPSG:4326 conus-wspd-01.bin conus-wspd-01.nc
>>
>> GDAL versions tested were 1.9.2 and 1.10.
>>
>> Screenshot of original GRIB2 file (first GRIB message) as displayed in
>> ArcMap: http://jetstreak.unh.edu/gdal/full.png
>> Screenshot of resulting NetCDF file (variable Band1) as displayed in
>> ncBrowse: http://jetstreak.unh.edu/gdal/cropped.png
>>
>> Original GRIB2 file (6.3mb):
>> http://jetstreak.unh.edu/gdal/conus-wspd-01.bin
>> Resulting NetCDF file (171mb):
>> http://jetstreak.unh.edu/gdal/conus-wspd-01.nc
>>
>> Anyone run into a similar problem or have any ideas for how to resolve
>> this?
>>
>> Thanks,
>> Jason
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130718/ca0328a3/attachment.html>


More information about the gdal-dev mailing list