<div dir="ltr"><div>Thanks a lot to both of you! The 
GDAL_NETCDF_IGNORE_XY_AXIS_NAME_CHECKS option did the trick!</div><div></div><div>Didn't know about the --debug on flag,
 it will come in handy in the future <br></div><div><br></div><div>Regarding the last part:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
What is at least missing in that particular file is the <br>
Easting:standard_name = "projection_x_coordinate" and <br>
Northing:standard_name = "projection_y_coordinate" attributes.

</blockquote><div><br></div><div> How can I manually set those values?</div><div><br></div><div>Thanks for the help,<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar, 26 mar 2024 a las 20:14, Even Rouault via gdal-dev (<<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Yes, some versions ago the netCDF driver became much more stricter, <br>
expecting a strict respect of the netCDF CF conventions for axis names & <br>
attributes, to avoid false identification of non-georeferenced axis, <br>
which could cause issues.<br>
<br>
The below debug message gives a hint to use the <br>
GDAL_NETCDF_IGNORE_XY_AXIS_NAME_CHECKS=YES to relax those checks.<br>
<br>
Cf <a href="https://gdal.org/drivers/raster/netcdf.html#configuration-options" rel="noreferrer" target="_blank">https://gdal.org/drivers/raster/netcdf.html#configuration-options</a><br>
<br>
$ gdalinfo <a href="http://20240321000000.nc" rel="noreferrer" target="_blank">20240321000000.nc</a> --config <br>
GDAL_NETCDF_IGNORE_XY_AXIS_NAME_CHECKS YES<br>
[...]<br>
Origin = (24500.000000000000000,465500.000000000000000)<br>
Pixel Size = (1000.000000000000000,-1000.000000000000000)<br>
[...]<br>
Corner Coordinates:<br>
Upper Left  (   24500.000,  465500.000)<br>
Lower Left  (   24500.000,   14500.000)<br>
Upper Right (  375500.000,  465500.000)<br>
Lower Right (  375500.000,   14500.000)<br>
Center      (  200000.000,  240000.000)<br>
<br>
What is at least missing in that particular file is the <br>
Easting:standard_name = "projection_x_coordinate" and <br>
Northing:standard_name = "projection_y_coordinate" attributes.<br>
<br>
Even<br>
<br>
Le 26/03/2024 à 20:02, Andrew C Aitchison via gdal-dev a écrit :<br>
> On Tue, 26 Mar 2024, Cristhian Rivera via gdal-dev wrote:<br>
><br>
>> Hi all,<br>
>><br>
>> I'm trying to debug an issue with a NetCDF file where in previous gdal<br>
>> versions (up until 3.3.0) the geolocation was correctly identified by<br>
>> gdalinfo, but in newer versions (>= 3.3.1) it is not.<br>
><br>
> I note that both versions output the warnings:<br>
><br>
> Warning 1: dimension #2 (Easting) is not a Longitude/X dimension.<br>
> Warning 1: dimension #1 (Northing) is not a Latitude/Y dimension.<br>
><br>
> gdalinfo --debug on <a href="http://20240321000000.nc" rel="noreferrer" target="_blank">20240321000000.nc</a><br>
> gives me more info:<br>
><br>
> Warning 1: dimension #2 (Easting) is not a Longitude/X dimension.<br>
> Warning 1: dimension #1 (Northing) is not a Latitude/Y dimension.<br>
> GDAL_netCDF:<br>
> =====<br>
> SetProjectionFromVar( 65536, 4)<br>
> GDAL_netCDF: got grid_mapping crs<br>
> GDAL_netCDF: bIsGdalFile=0 bIsGdalCfFile=0 bSwitchedXY=0 bBottomUp=1<br>
> netCDF: Georeferencing ignored due to non-specific enough X axis name. <br>
> Set GDAL_NETCDF_IGNORE_XY_AXIS_NAME_CHECKS=YES as configuration option <br>
> to bypass this check<br>
> netCDF: Georeferencing ignored due to non-specific enough Y axis name. <br>
> Set GDAL_NETCDF_IGNORE_XY_AXIS_NAME_CHECKS=YES as configuration option <br>
> to bypass this check<br>
> GDAL_netCDF: bGotGeogCS=0 bGotCfSRS=0 bGotCfGT=0 bGotCfWktSRS=0 <br>
> bGotGdalSRS=0 bGotGdalGT=0<br>
> GDAL_netCDF: did not get geotransform from CF nor GDAL!<br>
> GDAL_netCDF: did not get projection from CF nor GDAL!<br>
> GDAL_netCDF: netcdf type=5 gdal type=6 signedByte=1<br>
> GDAL: GDALOpen(<a href="http://20240321000000.nc" rel="noreferrer" target="_blank">20240321000000.nc</a>, this=0x63c988f650a0) succeeds as <br>
> netCDF.<br>
> GDAL: GDALDefaultOverviews::OverviewScan()<br>
> GDAL: GDALClose(<a href="http://20240321000000.nc" rel="noreferrer" target="_blank">20240321000000.nc</a>, this=0x63c988f650a0)<br>
><br>
><br>
>> In the attachments are the outputs of gdalinfo from the versions <br>
>> mentioned,<br>
>> but the difference in both outputs is that newer versions cannot find <br>
>> the<br>
>> "Origin" and "Pixel size", and the Corner coordinates differ a lot:<br>
>><br>
>> *Gdal 3.3.0:*<br>
>><br>
>>> Origin = (24500.000000000000000,465500.000000000000000)<br>
>>> Pixel Size = (1000.000000000000000,-1000.000000000000000)<br>
>><br>
>><br>
>><br>
>> Corner Coordinates:<br>
>>> Upper Left  (   24500.000,  465500.000)<br>
>>> Lower Left  (   24500.000,   14500.000)<br>
>>> Upper Right (  375500.000,  465500.000)<br>
>>> Lower Right (  375500.000,   14500.000)<br>
>>> Center      (  200000.000,  240000.000)<br>
>><br>
>><br>
>>> = *Gdal 3.3.1*<br>
>><br>
>>> Corner Coordinates:<br>
>>> Upper Left  (    0.0,    0.0)<br>
>>> Lower Left  (    0.0,  451.0)<br>
>>> Upper Right (  351.0,    0.0)<br>
>>> Lower Right (  351.0,  451.0)<br>
>>> Center      (  175.5,  225.5)<br>
>><br>
>><br>
>> The files can also be found in the following drive repo if they are not<br>
>> available in the mail:<br>
>> <a href="https://drive.google.com/drive/folders/1zqV3n2SYUhOjgwxpYpChwqdNTiHAgNHj?usp=sharing" rel="noreferrer" target="_blank">https://drive.google.com/drive/folders/1zqV3n2SYUhOjgwxpYpChwqdNTiHAgNHj?usp=sharing</a> <br>
>><br>
>><br>
>><br>
>> I've tried checking the changelog of that version but it seems only <br>
>> like a<br>
>> bug fix release.<br>
>> Any ideas of what else I can test to identify the issue?<br>
><br>
><br>
-- <br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><b style="color:rgb(0,0,0)">Cristhian Rivera</b></div><div><a href="mailto:cristhian.rivera@hyds.es" target="_blank">cristhian.rivera@hyds.es</a><br></div><b style="color:rgb(0,0,0)"><div><b style="color:rgb(0,0,0)"><br></b></div>HYDS (Hydrometeorological Innovative Solutions)</b><br style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">Jordi Girona 1-3, Ed. ParcUPC K2M 002</span><br style="color:rgb(0,0,0)"><div><span style="color:rgb(0,0,0)">08034 Barcelona (Spain)</span><br><span style="color:rgb(0,0,0)"><a href="https://www.hyds.es" target="_blank">https://www.hyds.es</a><br></span></div><div><font color="#888888"><font color="#888888"><span style="color:rgb(34,34,34);font-family:Helvetica">Tel: <a href="tel:+34933524050" value="+34934054662" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:12.8px" target="_blank">(+34) 933 524 050</a></span></font></font><span style="color:rgb(0,0,0)"></span></div><div><b style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><span style="border-collapse:separate;border-spacing:0px;line-height:normal"><a href="https://www.hyds.es/disclaimer/" target="_blank">Disclaimer</a> | <a href="https://www.hyds.es/es/disclaimer/" target="_blank">Aviso Legal</a> | </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><a href="https://www.hyds.es/ca/disclaimer/" target="_blank">Avís Legal</a></b><br><span style="color:rgb(0,0,0)"></span></div></div></div>