Unidata/netcdf-c — pull request #12 by SiggyF (2013-12-27 15:10:23+00:00)
Title: Shared diskless files

I extended the diskless mode. Files that are created in memory can now be opened by opening a
file with NC_DISKLESS mode using the same name.
This is in improvement over sharing open file identifiers between processes and provides an easy path
from disk-based to memory-based model coupling.

This is a simplified example of the use case I had (netcdf as shared memory between python and c) :
http://nbviewer.ipython.org/github/SiggyF/notebooks/blob/master/diskless.ipynb

and this is more detailed example (create a dataset in netcdf in python and reuse it in a fortran based model) :
http://nbviewer.ipython.org/github/nens/python-subgrid/blob/master/notebooks/delflandrain.ipynb

I added an extra test tst_diskless5.c. Note that if you want to ignore the whitespace cleanup you can do so by adding ?w=1 in a github url or add --ignore-all-space in the git command.

Please let me know if you can merge this code into the netcdf library. Feel free to contact me if extra effort is required.

Fedor Baart