Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions fms2_io/netcdf_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2283,8 +2283,10 @@ subroutine flush_file(fileobj)

integer :: err !< Netcdf error code

err = nf90_sync(fileobj%ncid)
call check_netcdf_code(err, "Flush_file: File:"//trim(fileobj%path))
if (fileobj%is_root) then
err = nf90_sync(fileobj%ncid)
call check_netcdf_code(err, "Flush_file: File:"//trim(fileobj%path))
endif
end subroutine flush_file

end module netcdf_io_mod
Expand Down