Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Made reading in status from file more robust. Any body that is not ta…
Browse files Browse the repository at this point in the history
…gged as INACTIVE is set to ACTIVE. This allows one to restart a run from just prior to a collision.
  • Loading branch information
daminton committed Jan 5, 2023
1 parent 64fbf6d commit 210e1e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/swiftest/swiftest_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,7 @@ module subroutine swiftest_io_netcdf_read_hdr_system(self, nc, param)
status = nf90_inq_varid(nc%id, nc%status_varname, nc%status_varid)
if (status == NF90_NOERR) then
call netcdf_io_check( nf90_get_var(nc%id, nc%status_varid, body_status, start=[1,tslot], count=[idmax,1]), "netcdf_io_read_hdr_system nf90_getvar status_varid" )
where(body_status(:) /= INACTIVE) body_status(:) = ACTIVE
else
body_status(:) = ACTIVE
end if
Expand Down

0 comments on commit 210e1e9

Please sign in to comment.