<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Right, thanks Even.</div>

<div> </div>

<div>I was generally aware of the issue and had added SYS_PTRACE capability to my docker service. That made the HDF5 driver work with /vsicurl/ in the container, but not the NetCDF driver, which did confuse me.</div>

<div> </div>

<div>Now, instead of running a container with --security_opt=seccomp:unconfined, i whitelisted userfaultfd in the seccomp profile for the docker deamon. That way I can use the netcdf driver in docker swarm services (where I was not able to make the security_opt work) and do not have to remove the secure computing mode entirely (I hope).</div>

<div> </div>

<div>Thanks again for your steady and swift replies!</div>

<div> </div>

<div>Cheers</div>

<div>Stefan</div>

<div> </div>

<div> 
<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Donnerstag, 12. Oktober 2023 um 14:22 Uhr<br/>
<b>Von:</b> "Even Rouault" <even.rouault@spatialys.com><br/>
<b>An:</b> "Stefan Blumentrath" <Stefan.Blumentrath@gmx.de>, "gdal-dev" <gdal-dev@lists.osgeo.org><br/>
<b>Betreff:</b> Re: [gdal-dev] Cannot choose netCDF driver instead of HDF5 for nc files</div>

<div name="quoted-content">
<p>Works for me with GDAL 3.6, 3.7 and master on Ubuntu 20.04</p>

<p>$ gdalinfo /vsicurl/<a class="moz-txt-link-freetext" href="https://nbstds.met.no/thredds/fileServer/NBS/S2B/2022/07/03/S2B_MSIL1C_20220703T112119_N0400_R037_T32VLN_20220703T121203.nc" target="_blank">https://nbstds.met.no/thredds/fileServer/NBS/S2B/2022/07/03/S2B_MSIL1C_20220703T112119_N0400_R037_T32VLN_20220703T121203.nc</a><br/>
Driver: netCDF/Network Common Data Format<br/>
[...]</p>

<p>/vsicurl/ functionality for the netCDF driver requires using a specific system call of Linux. See <a class="moz-txt-link-freetext" href="https://gdal.org/drivers/raster/netcdf.html#vsi-virtual-file-system-api-support" target="_blank">https://gdal.org/drivers/raster/netcdf.html#vsi-virtual-file-system-api-support</a></p>

<div class="moz-cite-prefix">Le 12/10/2023 à 14:01, Stefan Blumentrath via gdal-dev a écrit :</div>

<blockquote>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hi,</div>

<div> </div>

<div>I am wondering if the behavior of the NetCDF driver changed in recent GDAL version(s)?</div>

<div> </div>

<div>I do have the netCDF driver installed and also HDF5, which has been shaddowing the netCDF driver. So I used to do the following:</div>

<div>export GDAL_SKIP=HDF5</div>

<div>gdalinfo /vsicurl/<a class="moz-txt-link-freetext" href="https://nbstds.met.no/thredds/fileServer/NBS/S2B/2022/07/03/S2B_MSIL1C_20220703T112119_N0400_R037_T32VLN_20220703T121203.nc" target="_blank">https://nbstds.met.no/thredds/fileServer/NBS/S2B/2022/07/03/S2B_MSIL1C_20220703T112119_N0400_R037_T32VLN_20220703T121203.nc</a></div>

<div>But this gives me now:</div>

<div>ERROR 4: `/vsicurl/<a class="moz-txt-link-freetext" href="https://nbstds.met.no/thredds/fileServer/NBS/S2B/2022/07/03/S2B_MSIL1C_20220703T112119_N0400_R037_T32VLN_20220703T121203.nc" target="_blank">https://nbstds.met.no/thredds/fileServer/NBS/S2B/2022/07/03/S2B_MSIL1C_20220703T112119_N0400_R037_T32VLN_20220703T121203.nc</a>' not recognized as a supported file format.</div>

<div> </div>

<div>(or in Python syntax:</div>

<div>from osgeo import gdal</div>

<div>gdal.GetDriverByName("HDF5").Deregister()</div>

<div>ds = gdal.Open("/vsicurl/<a class="moz-txt-link-freetext" href="https://nbstds.met.no/thredds/fileServer/NBS/S2B/2022/07/03/S2B_MSIL1C_20220703T112119_N0400_R037_T32VLN_20220703T121203.nc" target="_blank">https://nbstds.met.no/thredds/fileServer/NBS/S2B/2022/07/03/S2B_MSIL1C_20220703T112119_N0400_R037_T32VLN_20220703T121203.nc</a>")</div>

<div>)</div>

<div> </div>

<div>If I do not deregister the HDF5 driver the dataset is opened, but with the HDF5 driver, and I want to use the netCDF driver for those CF-convention files...</div>

<div> </div>

<div>I am on Ubuntu 22.04, GDAL 3.6.4, released 2023/04/17...</div>

<div> </div>

<div>Any idea how that can be solved? Is it a bug or a feature?</div>

<div>Thanks for helping in advance!</div>

<div> </div>

<div>Cheers</div>

<div>Stefan</div>
</div>
 

<fieldset class="moz-mime-attachment-header"> </fieldset>

<pre class="moz-quote-pre">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org" onclick="parent.window.location.href='mailto:gdal-dev@lists.osgeo.org'; return false;" target="_blank">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>

<pre class="moz-signature">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</div>
</div>
</div></div></body></html>