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

Commit

Permalink
Fixed read only bug in NetCDF file. string dimension name is pulled f…
Browse files Browse the repository at this point in the history
…rom the old file on read
  • Loading branch information
daminton committed Sep 7, 2022
1 parent 83e8070 commit 2201b8b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/netcdf/netcdf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,6 @@ module subroutine netcdf_open(self, param, readonly)
call check( nf90_inq_dimid(self%ncid, ID_DIMNAME, self%id_dimid) )
call check( nf90_inquire_dimension(self%ncid, max(self%time_dimid,self%id_dimid)+1, name=str_dim_name) )
call check( nf90_inq_dimid(self%ncid, str_dim_name, self%str_dimid) )
write(str_dim_name,*) STR_DIMNAME
call check( nf90_rename_dim(self%ncid, self%str_dimid, str_dim_name) )

call check( nf90_inq_varid(self%ncid, TIME_DIMNAME, self%time_varid))
call check( nf90_inq_varid(self%ncid, ID_DIMNAME, self%id_varid))
Expand Down Expand Up @@ -491,7 +489,7 @@ end subroutine netcdf_open
module function netcdf_read_frame_system(self, iu, param) result(ierr)
!! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott
!!
!! Read a frame (header plus records for each massive body and active test particle) from a output binary file
!! Read a frame (header plus records for each massive body and active test particle) from an output binary file
implicit none
! Arguments
class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object
Expand Down

0 comments on commit 2201b8b

Please sign in to comment.