Re: Reading NetCDF file as inMemoryFile

Sean Gillies
 

Vincent,

Can you try naming the driver when you open the in-memory dataset? Something like

with MemoryFile(...) as memfile:
    with memfile.open(driver="netCDF") as dataset:
        ....


On Fri, Dec 20, 2019 at 8:23 AM <vincent.sarago@...> wrote:

[Edited Message Follows]

Thanks for your answer Even, and be assured that I always read the manual before asking question :-) 


```
$ more /proc/version
Linux version 4.9.184-linuxkit (root@a8c33e955a82) (gcc version 8.3.0 (Alpine 8.3.0) ) #1 SMP Tue Jul 2 22:58:16 UTC 2019
...
# From gdal /configure
  NetCDF support:            yes
  NetCDF has netcdf_mem.h:   yes
...
# NetCDF install
ENV NETCDF_VERSION=4.6.3

# NetCDF
RUN mkdir /tmp/netcdf \
&& curl -sfL https://github.com/Unidata/netcdf-c/archive/v$NETCDF_VERSION.tar.gz | tar zxf - -C /tmp/netcdf --strip-components=1

RUN cd /tmp/netcdf \
&& CPPFLAGS="-I${PREFIX}/include" LDFLAGS="-L${PREFIX}/lib" \
./configure \
--with-default-chunk-size=67108864 \
--with-chunk-cache-size=67108864 \
--prefix=$PREFIX \
--disable-static \
--enable-netcdf4 \
--enable-dap \
--with-pic \
&& make -j $(nproc) --silent && make install && make clean \
&& rm -rf /tmp/netcdf
```

My configuration meets the current spec from the docs, and still fallback to HDF5



--
Sean Gillies

Join main@rasterio.groups.io to automatically receive all group messages.