Skip to content

netcdf SWMR compatible writing #108

@heikoklein

Description

@heikoklein

SNAP currently opens the output netcdf-file for each time-step in write-append mode and closes it again after the output-timestep is written. With netcdf3 and early netcdf4 implementations this allowed files to be read while the model was still running.

The new hdf5.10 SWMR (single write multiple read) implementation https://support.hdfgroup.org/HDF5/docNewFeatures/SWMR/Design-HDF5-FileLocking.pdf explicitly states that files which are opened for reading can no longer be opened for writing. This leads to the SNAP model crashing when one starts to analyze the model-results while the model is still running.

The updated implementation should keep the write file-handle of the output netcdf-file open for the complete time the model is running. It should also ensure that the output is synced to disk after the output-timestep so all information is available to all readers. The SWMR mode should be the default, while the old writer should still be kept available.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions