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

Commit

Permalink
Made sure that the time slot defaults to the maximum in the file when…
Browse files Browse the repository at this point in the history
… reading in an old file
  • Loading branch information
daminton committed Feb 24, 2023
1 parent 507f4cc commit 6787781
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/swiftest/swiftest_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 6787781

Please sign in to comment.