[netcdfgroup] Reading classic netcdf3 files from string or file handle instead of file name

  • To: netcdfgroup@xxxxxxxxxxxxxxxx
  • Subject: [netcdfgroup] Reading classic netcdf3 files from string or file handle instead of file name
  • From: Doug Hunt <dhunt@xxxxxxxx>
  • Date: Mon, 11 Nov 2013 11:19:00 -0700 (MST)
Hi Netcdf Folks:

I'm interested in adding a feature to the PDL::NetCDF library in which I allow users to pass not the file name of a netcdf 3 file to read, but a buffer containing the contents in memory. Alternatively, fmemopen(3) could be used on the buffer and the resulting FILE * could be passed in.

I quick look at the netCDF source code shows that it is a bit complicated:
from 'ncopen' (which takes a file name as input) there is a complex path until the 'fopen' is finally done and a FILE * is obtained.

Has anyone done this? I note that this functionality seems similar, though not identical to Dr. Heimbigner's NC_DISKLESS mode.

Best Regards,

  Doug Hunt

dhunt@xxxxxxxx
Software Engineer IV
UCAR - COSMIC, Tel. (303) 497-2611



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