diff --git a/examples/symba_swifter_comparison/1pl_1pl_encounter/init_cond.py b/examples/symba_swifter_comparison/1pl_1pl_encounter/init_cond.py index 20be5a433..ece9101e0 100755 --- a/examples/symba_swifter_comparison/1pl_1pl_encounter/init_cond.py +++ b/examples/symba_swifter_comparison/1pl_1pl_encounter/init_cond.py @@ -131,8 +131,7 @@ plfile = FortranFile(swiftest_pl, 'w') plfile.write_record(npl) - -plfile.write_record(np.array([plid1, plid2])) +plfile.write_record(np.array([plid1, plid2], dtype=np.int32)) plfile.write_record(np.vstack([p_pl1[0],p_pl2[0]])) plfile.write_record(np.vstack([p_pl1[1],p_pl2[1]])) plfile.write_record(np.vstack([p_pl1[2],p_pl2[2]])) diff --git a/examples/symba_swifter_comparison/1pl_1pl_encounter/pl.swiftest.in b/examples/symba_swifter_comparison/1pl_1pl_encounter/pl.swiftest.in index d8da7a92a..1bda0535d 100644 Binary files a/examples/symba_swifter_comparison/1pl_1pl_encounter/pl.swiftest.in and b/examples/symba_swifter_comparison/1pl_1pl_encounter/pl.swiftest.in differ diff --git a/src/io/io.f90 b/src/io/io.f90 index 2900fc7f4..d2791aa92 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -839,7 +839,7 @@ module subroutine io_read_frame_body(self, iu, param, form, ierr) integer(I4B), intent(out) :: ierr !! Error code associate(n => self%nbody) - read(iu, iostat=ierr, err=100) self%id(1:n) + read(iu, iostat=ierr, err=100) self%id(:) !read(iu, iostat=ierr, err=100) self%name(1:n) select case (form) case (EL) @@ -849,33 +849,33 @@ module subroutine io_read_frame_body(self, iu, param, form, ierr) if (.not.allocated(self%capom)) allocate(self%capom(n)) if (.not.allocated(self%omega)) allocate(self%omega(n)) if (.not.allocated(self%capm)) allocate(self%capm(n)) - read(iu, iostat=ierr, err=100) self%a(1:n) - read(iu, iostat=ierr, err=100) self%e(1:n) - read(iu, iostat=ierr, err=100) self%inc(1:n) + read(iu, iostat=ierr, err=100) self%a(:) + read(iu, iostat=ierr, err=100) self%e(:) + read(iu, iostat=ierr, err=100) self%inc(:) read(iu, iostat=ierr, err=100) self%capom(:) read(iu, iostat=ierr, err=100) self%omega(:) read(iu, iostat=ierr, err=100) self%capm(:) case (XV) - read(iu, iostat=ierr, err=100) self%xh(1, 1:n) - read(iu, iostat=ierr, err=100) self%xh(2, 1:n) - read(iu, iostat=ierr, err=100) self%xh(3, 1:n) - read(iu, iostat=ierr, err=100) self%vh(1, 1:n) - read(iu, iostat=ierr, err=100) self%vh(2, 1:n) - read(iu, iostat=ierr, err=100) self%vh(3, 1:n) + read(iu, iostat=ierr, err=100) self%xh(1, :) + read(iu, iostat=ierr, err=100) self%xh(2, :) + read(iu, iostat=ierr, err=100) self%xh(3, :) + read(iu, iostat=ierr, err=100) self%vh(1, :) + read(iu, iostat=ierr, err=100) self%vh(2, :) + read(iu, iostat=ierr, err=100) self%vh(3, :) end select select type(pl => self) class is (swiftest_pl) ! Additional output if the passed polymorphic object is a massive body - read(iu, iostat=ierr, err=100) pl%Gmass(1:n) - pl%mass(1:n) = pl%Gmass / param%GU - if (param%lrhill_present) read(iu, iostat=ierr, err=100) pl%rhill(1:n) - read(iu, iostat=ierr, err=100) pl%radius(1:n) + read(iu, iostat=ierr, err=100) pl%Gmass(:) + pl%mass(:) = pl%Gmass(:) / param%GU + if (param%lrhill_present) read(iu, iostat=ierr, err=100) pl%rhill(:) + read(iu, iostat=ierr, err=100) pl%radius(:) if (param%lrotation) then - read(iu, iostat=ierr, err=100) pl%rot(1, 1:n) - read(iu, iostat=ierr, err=100) pl%rot(2, 1:n) - read(iu, iostat=ierr, err=100) pl%rot(3, 1:n) - read(iu, iostat=ierr, err=100) pl%Ip(1, 1:n) - read(iu, iostat=ierr, err=100) pl%Ip(2, 1:n) - read(iu, iostat=ierr, err=100) pl%Ip(3, 1:n) + read(iu, iostat=ierr, err=100) pl%rot(1, :) + read(iu, iostat=ierr, err=100) pl%rot(2, :) + read(iu, iostat=ierr, err=100) pl%rot(3, :) + read(iu, iostat=ierr, err=100) pl%Ip(1, :) + read(iu, iostat=ierr, err=100) pl%Ip(2, :) + read(iu, iostat=ierr, err=100) pl%Ip(3, :) end if if (param%ltides) then read(iu, iostat=ierr, err=100) pl%k2(1:n)