<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>I don't think there's any problem regarding GDAL vs xarray. It is
just a difference of convention on how GDAL and xarray choose the
origin of rasters. GDAL selects the northern-west corner as the
(0,0) image coordinate.</p>
<p>The line in GDAL that contains values 13.75 14.25 14.75 which are
at line 80 for XArray is line 124 . And 80 + 124 + 1 = 205 , the
dataset height</p>
<p>Displaying the GRIB dataset with QGIS (/GDAL) on top of OSM shows
a plausible georeferencing.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 01/02/2024 à 13:57, Laurențiu Nicola
via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:c207ea3a-6c78-4341-843e-224887bd83a8@betaapp.fastmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<style type="text/css">#qt #qt-qt p.qt-qt-MsoNormal{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;font-size:11pt;font-family:Calibri, sans-serif;}#qt #qt-qt a:link{color:blue;text-decoration-line:underline;text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;}#qt #qt-qt li.qt-qt-MsoListParagraph{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36pt;font-size:11pt;font-family:Calibri, sans-serif;}#qt #qt-qt ul{margin-bottom:0cm;}p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
<div style="font-family:Arial;">It's actually pretty easy to test:<br>
</div>
<div style="font-family:Arial;"><br>
</div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">import
numpy as np</span><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">import
xarray as xr</span><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">from
osgeo import gdal</span><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">xarray_ds
= xr.load_dataset("st4_pr.2017092016.01h", engine="cfgrib")</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">#
GDAL uses 9999 as NODATA</span><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">xarray_data
= np.nan_to_num(xarray_ds.tp.data, nan=9999.0)</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">gdal_ds
= gdal.Open("st4_pr.2017092016.01h")</span><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">gdal_data
= gdal_ds.GetRasterBand(1).ReadAsArray()</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">>>>
gdal_data[80]</span><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">array([9999.
, 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 40.5 , 41.125, 41.75 , 42.5 ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
43. , 26.5 , 26.875, 27. , 29.875, 49.875,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
50.375, 41.5 , 41.375, 0. , 0. , 0. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
0. , 0. , 0. , 0. , 0. , 0. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
0. , 0. , 0. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
0. , 0. , 0. , 0. , 0. , 0. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
0. , 0. , 0. , 0. , 0. , 0. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
0. , 0. , 0. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. ])</span><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">>>>
xarray_data[80]</span><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">array([9999.
, 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 13.75 , 14.25 , 14.75 ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
19.125, 32.5 , 30.125, 27.125, 25.5 , 22.25 ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
22.375, 20.25 , 18.375, 16.625, 15.25 , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. , 9999. , 9999. , 9999. , 9999. , 9999. ,</span><span
class="font"
style="font-family:menlo, consolas, monospace, sans-serif;"><br>
</span></div>
<div style="font-family:Arial;"><span class="font"
style="font-family:menlo, consolas, monospace, sans-serif;">
9999. ], dtype=float32)</span><br>
</div>
<div style="font-family:Arial;"><br>
</div>
<div style="font-family:Arial;">The values are obviously
different.<br>
</div>
<div style="font-family:Arial;"><br>
</div>
<div style="font-family:Arial;">I also tried to convert to NetCDF
and open them in QGIS, but they look almost the same (not
identical) to me after fixing up the coordinates, so there's
probably more at play.<br>
</div>
<div style="font-family:Arial;"><br>
</div>
<div style="font-family:Arial;">Again, comparing the
gdal_translate output with the GRIB data as read by GDAL can't
show any issues.<br>
</div>
<div style="font-family:Arial;"><br>
</div>
<div style="font-family:Arial;">Laurentiu<br>
</div>
<div style="font-family:Arial;"><br>
</div>
<div>On Thu, Feb 1, 2024, at 13:24, Laurențiu Nicola via gdal-dev
wrote:<br>
</div>
<blockquote type="cite" id="qt" style="">
<div style="font-family:Arial;">Hi Jukka,<br>
</div>
<div style="font-family:Arial;"><br>
</div>
<div style="font-family:Arial;">If GDAL shuffled around the
pixels in that file, you wouldn't be able to notice it by
comparing the GRIB and the TIFF, because both would be
shuffled.<br>
</div>
<div style="font-family:Arial;"><br>
</div>
<div style="font-family:Arial;">My suggestion was to convert the
GRIB to a NC or even CSV using xarray, then comparing the GDAL
output against that.<br>
</div>
<div style="font-family:Arial;"><br>
</div>
<div style="font-family:Arial;">Laurentiu<br>
</div>
<div style="font-family:Arial;"><br>
</div>
</blockquote>
<div style="font-family:Arial;"><br>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>