Skip to content

Saving to disk an in-memory file #807

Description

@huard

My use case is that of a python console requesting a netCDF file from an http server. I can save the file to disk, but what I'd like to do is give users the possibility to keep everything in memory. I can do this using

data = get_bytes_from_server()
D = nc.Dataset(filepath, memory=data)

but then D is read-only and can't be written to disk.

  • Is it possible to write the resulting file D to disk ?
  • Is is possible to open the in-memory file in append mode and eventually save the modified version to disk ?

Apparently the HDF5 library allows writing a memory file to disk: https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplCore

On the other hand, modifying an in-memory file is a feature still being developed: Unidata/netcdf-c#879

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions