Skip to content

Use atomic write for bottom_roughness.nc to prevent netcdf corruption#115

Merged
minghangli-uni merged 1 commit intomainfrom
114-fix-netcdf-corruption
Feb 26, 2026
Merged

Use atomic write for bottom_roughness.nc to prevent netcdf corruption#115
minghangli-uni merged 1 commit intomainfrom
114-fix-netcdf-corruption

Conversation

@minghangli-uni
Copy link
Collaborator

Closes #114

Now it writes output to a temporary file and atomically replace the final file. So now it prevents file corruption when overwritting existing netcdf files particularly when the file is open in another process, such as notebook.

@minghangli-uni minghangli-uni self-assigned this Feb 26, 2026
@minghangli-uni
Copy link
Collaborator Author

@aekiss would you mind reviewing this?

Copy link
Contributor

@aekiss aekiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@minghangli-uni minghangli-uni merged commit 14b3b57 into main Feb 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Netcdf corruption when overwriting bottom_roughness.nc while file is open somewhere

2 participants