[gdal-dev] gdal_translate shifted values

Furuya, Takahiro tfuruya6 at gatech.edu
Wed Jan 31 15:53:18 PST 2024


Hi gdal-dev, I am Takahiro, a student who is using gdal_translate.
I have an issue with gdal_translate and would like to ask a question.
I used gdal_translate to transform a NCEP GRIB file (downloadable from https://data.eol.ucar.edu/cgi-bin/codiac/fgr_form/id=21.093, or attached to this email) to GeoTiff, and compare those 2 data formats. The command I used is
>gdal_translate -of GTiff st4_pr.2017092016.01h st4_pr.2017092016.01h.tif

(The GRIB file I used was st4_pr.2017092016.01h, which can be downloaded from the above link by specifying “Begin Date/Time” to “20170920”/“15:00:00”  and “End Date/Time” to “20170920”/“15:59:59”.)

Then I read the 2 data files in R and checked if the original value at a certain grid cell in the GRIB file remained at the same grid cell in the GeoTiff file, but the value was shifted by 6 rows (the value I checked was 9.75 [mm/hour] that was stored in index [100,86] in the original GRIB file, but it was shifted to [106,86] in the GeoTiff file).

You can see the Python script used for reading the original GRIB file here: https://bpa.st/ZNOSI
The R script used for checking the tif-translated data: https://bpa.st/WZLSY

The version of gdal_translate I used is 3.0.2.
Is this a known issue of gdal_translate? Or is this issue not supposed to happen (is this the mistake of my side?)?

Best regards,
Takahiro



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240131/9d0857be/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: st4_pr.2017092016.01h
Type: application/octet-stream
Size: 10174 bytes
Desc: st4_pr.2017092016.01h
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240131/9d0857be/attachment.obj>


More information about the gdal-dev mailing list