From 6787781d0b07eebd554edc9e7f59cb91819db8c1 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Fri, 24 Feb 2023 11:47:58 -0500 Subject: [PATCH] Made sure that the time slot defaults to the maximum in the file when reading in an old file --- src/swiftest/swiftest_io.f90 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/swiftest/swiftest_io.f90 b/src/swiftest/swiftest_io.f90 index 40c357fc2..a37168960 100644 --- a/src/swiftest/swiftest_io.f90 +++ b/src/swiftest/swiftest_io.f90 @@ -1043,11 +1043,7 @@ module function swiftest_io_netcdf_read_frame_system(self, nc, param) result(ier call nc%open(param, readonly=.true.) call nc%find_tslot(self%t, tslot) call netcdf_io_check( nf90_inquire_dimension(nc%id, nc%time_dimid, len=nc%max_tslot), "netcdf_io_read_frame_system nf90_inquire_dimension time_dimid" ) - if (tslot > nc%max_tslot) then - write(*,*) - write(*,*) "Error in reading frame from NetCDF file. Requested time index value (",tslot,") exceeds maximum time in file (",nc%max_tslot,"). " - call base_util_exit(FAILURE) - end if + tslot = min(tslot, nc%max_tslot) call self%read_hdr(nc, param)