[gdal-dev] new NBM grib2 files are not warpable

Thomas Horner haevitetty at gmail.com
Fri Jun 5 12:43:51 PDT 2020


Hello,

A follow up with some more information. According to Zachary Flamig, there
are no issues in GDAL 2.2.0. I encountered these issues in 3.0.4. In 3.1.0,
the warp works correctly, but gdal_translate still fails with an out of
memory issue. It creates a TIF of 1.8gb before it errors out.

Thomas

On Fri, Jun 5, 2020 at 11:42 AM Thomas Horner <haevitetty at gmail.com> wrote:

> Hello list,
>
> The US National Weather Service recently released version 3.2 of their NBM
> weather model blend. I have not been able to successfully to use gdalwarp
> or gdal_translate on these GRIB2 files. For gdal_translate, I get an
> "Error: Out of memory" error, even though it's only 80mb and I have 16gb of
> RAM.
>
> This is what happens when using gdalwarp to warp to EPSG:4326:
>
> -------
> > thomas at eolus:~/model_processing/tempWxData$ gdalwarp
> nbm_20200605_16Z_t001.grib2 nbm.tif -t_srs EPSG:4326 -multi
>
> Processing nbm_20200605_16Z_t001.grib2 [1/1] : 0Using internal nodata
> values (e.g. 9999) for image nbm_20200605_16Z_t001.grib2.
>
> ERROR 1: Too many points (529 out of 529) failed to transform, unable to
> compute output bounds.
> Warning 1: Unable to compute source region for output window
> 0,0,2345,1597, skipping.
> --------
>
> gdalinfo reveals the following information about the CRS:
>
> -------
> Driver: GRIB/GRIdded Binary (.grb, .grb2)
> Files: nbm_20200605_16Z_t001.grib2
> Size is 2345, 1597
> Coordinate System is:
> PROJCRS["unnamed",
>     BASEGEOGCRS["Coordinate System imported from GRIB file",
>         DATUM["unnamed",
>             ELLIPSOID["Sphere",6371200,0,
>                 LENGTHUNIT["metre",1,
>                     ID["EPSG",9001]]]],
>         PRIMEM["Greenwich",0,
>             ANGLEUNIT["degree",0.0174532925199433,
>                 ID["EPSG",9122]]]],
>     CONVERSION["unnamed",
>         METHOD["Lambert Conic Conformal (2SP)",
>             ID["EPSG",9802]],
>         PARAMETER["Latitude of false origin",25,
>             ANGLEUNIT["degree",0.0174532925199433],
>             ID["EPSG",8821]],
>         PARAMETER["Longitude of false origin",265,
>             ANGLEUNIT["degree",0.0174532925199433],
>             ID["EPSG",8822]],
>         PARAMETER["Latitude of 1st standard parallel",25,
>             ANGLEUNIT["degree",0.0174532925199433],
>             ID["EPSG",8823]],
>         PARAMETER["Latitude of 2nd standard parallel",25,
>             ANGLEUNIT["degree",0.0174532925199433],
>             ID["EPSG",8824]],
>         PARAMETER["Easting at false origin",0,
>             LENGTHUNIT["Metre",1],
>             ID["EPSG",8826]],
>         PARAMETER["Northing at false origin",0,
>             LENGTHUNIT["Metre",1],
>             ID["EPSG",8827]]],
>     CS[Cartesian,2],
>         AXIS["easting",east,
>             ORDER[1],
>             LENGTHUNIT["Metre",1]],
>         AXIS["northing",north,
>             ORDER[2],
>             LENGTHUNIT["Metre",1]]]
> Data axis to CRS axis mapping: 1,2
> Origin = (-3272421.457337170839310,3790842.106035435572267)
> Pixel Size = (2539.702999999999975,-2539.702999999999975)
> Corner Coordinates:
> Upper Left  (-3272421.457, 3790842.106) (138d23'39.07"W, 53d 3'24.76"N)
> Lower Left  (-3272421.457, -265063.585) (126d17' 8.03"W, 19d12'55.22"N)
> Upper Right ( 2683182.078, 3790842.106) ( 59d 1'17.54"W, 54d22'46.84"N)
> Lower Right ( 2683182.078, -265063.585) ( 69d11'54.98"W, 20d19' 6.30"N)
> Center      ( -294619.690, 1762889.261) ( 98d21'20.81"W, 40d37' 0.08"N)
> -------
>
> If you want a file to test with, download from here:
>
> https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/blend.20200605/16/grib2/blend.t16z.master.f001.co.grib2
>
> That file will be removed after a couple days though.
>
> I don't know the details of coordinate transformation, so I have no idea
> how to solve this problem. Can anyone help?
>
> Thanks,
> Thomas
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200605/ba3860dd/attachment.html>


More information about the gdal-dev mailing list