<div dir="ltr"><div>Hello,<br><br>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.<br><br>Thomas</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 5, 2020 at 11:42 AM Thomas Horner <<a href="mailto:haevitetty@gmail.com">haevitetty@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello list,<br><br>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.<br><br>This is what happens when using gdalwarp to warp to EPSG:4326:<br><br>-------<br>> thomas@eolus:~/model_processing/tempWxData$ gdalwarp nbm_20200605_16Z_t001.grib2 nbm.tif -t_srs EPSG:4326 -multi<br><br>Processing nbm_20200605_16Z_t001.grib2 [1/1] : 0Using internal nodata values (e.g. 9999) for image nbm_20200605_16Z_t001.grib2.<br><br>ERROR 1: Too many points (529 out of 529) failed to transform, unable to compute output bounds.<br>Warning 1: Unable to compute source region for output window 0,0,2345,1597, skipping.<br>--------<br><br>gdalinfo reveals the following information about the CRS:<br><br>-------<br>Driver: GRIB/GRIdded Binary (.grb, .grb2)<br>Files: nbm_20200605_16Z_t001.grib2<br>Size is 2345, 1597<br>Coordinate System is:<br>PROJCRS["unnamed",<br>    BASEGEOGCRS["Coordinate System imported from GRIB file",<br>        DATUM["unnamed",<br>            ELLIPSOID["Sphere",6371200,0,<br>                LENGTHUNIT["metre",1,<br>                    ID["EPSG",9001]]]],<br>        PRIMEM["Greenwich",0,<br>            ANGLEUNIT["degree",0.0174532925199433,<br>                ID["EPSG",9122]]]],<br>    CONVERSION["unnamed",<br>        METHOD["Lambert Conic Conformal (2SP)",<br>            ID["EPSG",9802]],<br>        PARAMETER["Latitude of false origin",25,<br>            ANGLEUNIT["degree",0.0174532925199433],<br>            ID["EPSG",8821]],<br>        PARAMETER["Longitude of false origin",265,<br>            ANGLEUNIT["degree",0.0174532925199433],<br>            ID["EPSG",8822]],<br>        PARAMETER["Latitude of 1st standard parallel",25,<br>            ANGLEUNIT["degree",0.0174532925199433],<br>            ID["EPSG",8823]],<br>        PARAMETER["Latitude of 2nd standard parallel",25,<br>            ANGLEUNIT["degree",0.0174532925199433],<br>            ID["EPSG",8824]],<br>        PARAMETER["Easting at false origin",0,<br>            LENGTHUNIT["Metre",1],<br>            ID["EPSG",8826]],<br>        PARAMETER["Northing at false origin",0,<br>            LENGTHUNIT["Metre",1],<br>            ID["EPSG",8827]]],<br>    CS[Cartesian,2],<br>        AXIS["easting",east,<br>            ORDER[1],<br>            LENGTHUNIT["Metre",1]],<br>        AXIS["northing",north,<br>            ORDER[2],<br>            LENGTHUNIT["Metre",1]]]<br>Data axis to CRS axis mapping: 1,2<br>Origin = (-3272421.457337170839310,3790842.106035435572267)<br>Pixel Size = (2539.702999999999975,-2539.702999999999975)<br>Corner Coordinates:<br>Upper Left  (-3272421.457, 3790842.106) (138d23'39.07"W, 53d 3'24.76"N)<br>Lower Left  (-3272421.457, -265063.585) (126d17' 8.03"W, 19d12'55.22"N)<br>Upper Right ( 2683182.078, 3790842.106) ( 59d 1'17.54"W, 54d22'46.84"N)<br>Lower Right ( 2683182.078, -265063.585) ( 69d11'54.98"W, 20d19' 6.30"N)<br>Center      ( -294619.690, 1762889.261) ( 98d21'20.81"W, 40d37' 0.08"N)<div>-------<br><br>If you want a file to test with, download from here:<br><a href="https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/blend.20200605/16/grib2/blend.t16z.master.f001.co.grib2" target="_blank">https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/blend.20200605/16/grib2/blend.t16z.master.f001.co.grib2</a></div><div><br></div><div>That file will be removed after a couple days though.<br><br>I don't know the details of coordinate transformation, so I have no idea how to solve this problem. Can anyone help?<br><br>Thanks,<br>Thomas<br><br><br></div></div>
</blockquote></div></div>