From 210e1e967ff69993dc639306e6d99e21294a3843 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Thu, 5 Jan 2023 17:31:44 -0500 Subject: [PATCH] Made reading in status from file more robust. Any body that is not tagged as INACTIVE is set to ACTIVE. This allows one to restart a run from just prior to a collision. --- src/swiftest/swiftest_io.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/swiftest/swiftest_io.f90 b/src/swiftest/swiftest_io.f90 index 32efb9e95..1924fc2e8 100644 --- a/src/swiftest/swiftest_io.f90 +++ b/src/swiftest/swiftest_io.f90 @@ -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