NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] streaming ncdump?

Hi Tom,

> This may be a *x question, or just totally wrongheaded, but thought
> I'd ask: can one stream to netCDF tools (e.g., `ncdump`)? Why I ask:
> 
> I've got data on one host which has netCDF configuration problems.
> I've got another host on the same LAN which does not. So I thought I'd
> 
> me@goodNetCDF:~ $ ssh badNetCDF 'cat /path/to/netCDF/data' | ncdump -h
> 
> but that failed. Yes, I know I could just copy the file to /tmp :-)
> but I thought I'd ask.

The problem is that netCDF is implemented in terms of the lseek(2)
system function, to seek directly to a specified offset before reading
or writing.  If you try to seek on a pipe, such as stdin, Unix returns
the error ESPIPE.

NetCDF-Java has defined an experimental streaming protocol that could be
applied to your use case:

  http://www.unidata.ucar.edu/software/netcdf-java/stream/NcStream.html

and there's some support for ncstream in the C library (see libcdmr
directory), but the utilities ncdump and nccopy haven't been adapted to
make use of it.

--Russ



  • 2012 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: