<p dir="ltr">From the error message, it looks like GDAL doesn't like reading the bottom up file. Can you try something like gdal_translate to a different format? gdalinfo doesn't really read through the whole file like other utilities.</p>

<p dir="ltr">-bborie</p>
<div class="gmail_quote">On Dec 19, 2013 2:15 AM, "os662002" <<a href="mailto:olivier.sanchez@airparif.asso.fr">olivier.sanchez@airparif.asso.fr</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I have a problem trying to convert netcdf to POSTGIS raster.<br>
<br>
I've got a netcdf file which header is the following<br>
netcdf out.NO2.1 {<br>
dimensions:<br>
        Time = UNLIMITED ; // (97 currently)<br>
        lat = 46 ;<br>
        lon = 67 ;<br>
        DateStrLen = 19 ;<br>
variables:<br>
        float NO2(Time, lat, lon) ;<br>
                NO2:long_name = "NO2 Concentration" ;<br>
                NO2:units = "ppb vol" ;<br>
                NO2:grid_mapping = "crs" ;<br>
        char Times(Time, DateStrLen) ;<br>
<br>
When using raster2pgsql (raster2pgsql -f conc NETCDF:out.NO2.1.nc:NO2<br>
esmassim_data<br>
), I got the following error message :<br>
<br>
ERROR 1: nBlockYSize = 46, only 1 supported when reading bottom-up dataset<br>
ERROR 1: NETCDF:out.NO2.1.nc:NO2, band 1: IReadBlock failed at X offset 0, Y<br>
offset 0<br>
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0<br>
<br>
While gdalinfo seems to work fine giving all the raster bands that are in<br>
the file.<br>
<br>
When time dimension is absent ,the raster2pgsql works fine.<br>
<br>
Does anyone have an idea ? Is it normal, I thought that adding the -b 1<br>
option to raster2pgsql would allow me extract the right index band.<br>
<br>
Thanks in advance,<br>
<br>
Regards,<br>
<br>
Olivier SANCHEZ<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://postgis.17.x6.nabble.com/netCDF-support-tp4889659p5005322.html" target="_blank">http://postgis.17.x6.nabble.com/netCDF-support-tp4889659p5005322.html</a><br>
Sent from the PostGIS - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br>
</blockquote></div>