diff --git a/src/io/io.f90 b/src/io/io.f90 index af4b30442..062d0f70a 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -259,8 +259,6 @@ module subroutine io_dump_system(self, param) call nc%initialize(dump_param) call self%write_frame(nc, dump_param) call nc%close() - ! Syncrhonize the disk and memory buffer of the NetCDF file (e.g. commit the frame files stored in memory to disk) - call nc%flush(param) end associate idx = idx + 1 diff --git a/src/main/swiftest_driver.f90 b/src/main/swiftest_driver.f90 index cab6d4aca..ebd207e54 100644 --- a/src/main/swiftest_driver.f90 +++ b/src/main/swiftest_driver.f90 @@ -89,13 +89,14 @@ program swiftest_driver associate (system_history => param%system_history) ! If this is a new run, compute energy initial conditions (if energy tracking is turned on) and write the initial conditions to file. - if (param%lrestart) then - if (param%lenergy) call system%conservation_report(param, lterminal=.true.) - else - if (param%lenergy) call system%conservation_report(param, lterminal=.false.) ! This will save the initial values of energy and momentum - call system_history%take_snapshot(param,system) - call system_history%dump(param) + if (param%lenergy) then + if (param%lrestart) then + call system%conservation_report(param, lterminal=.true.) + else + call system%conservation_report(param, lterminal=.false.) ! This will save the initial values of energy and momentum + end if end if + call system_history%take_snapshot(param,system) call system%dump(param) write(display_unit, *) " *************** Main Loop *************** "