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

Commit

Permalink
Fixed inconsistent io between Python and Fortran codes
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Aug 5, 2021
1 parent 41510b3 commit 9413e61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions python/swiftest/swiftest/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,7 @@ def swiftest_stream(f, param):
npl = f.read_ints()
ntp = f.read_ints()
iout_form = f.read_reals('c')
#cbid = f.read_ints()
cbid = np.array([0])
cbid = f.read_ints()
Mcb = f.read_reals(np.float64)
Rcb = f.read_reals(np.float64)
J2cb = f.read_reals(np.float64)
Expand All @@ -495,6 +494,7 @@ def swiftest_stream(f, param):
p5 = f.read_reals(np.float64)
p6 = f.read_reals(np.float64)
Mpl = f.read_reals(np.float64)
Rhill = f.read_reals(np.float64)
Rpl = f.read_reals(np.float64)
if param['RHILL_PRESENT'] == 'YES':
Rhill = f.read_reals(np.float64)
Expand Down
12 changes: 6 additions & 6 deletions src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1350,12 +1350,12 @@ module subroutine io_write_frame_body(self, iu, param)
write(iu) pl%rhill(1:n)
write(iu) pl%radius(1:n)
if (param%lrotation) then
write(iu) pl%rot(1, 1:n)
write(iu) pl%rot(2, 1:n)
write(iu) pl%rot(3, 1:n)
write(iu) pl%Ip(1, 1:n)
write(iu) pl%Ip(2, 1:n)
write(iu) pl%Ip(3, 1:n)
write(iu) pl%rot(1, 1:n)
write(iu) pl%rot(2, 1:n)
write(iu) pl%rot(3, 1:n)
end if
if (param%ltides) then
write(iu) pl%k2(1:n)
Expand Down Expand Up @@ -1389,12 +1389,12 @@ module subroutine io_write_frame_cb(self, iu, param)
write(iu) cb%j2rp2
write(iu) cb%j4rp4
if (param%lrotation) then
write(iu) cb%rot(1)
write(iu) cb%rot(2)
write(iu) cb%rot(3)
write(iu) cb%Ip(1)
write(iu) cb%Ip(2)
write(iu) cb%Ip(3)
write(iu) cb%rot(1)
write(iu) cb%rot(2)
write(iu) cb%rot(3)
end if
if (param%ltides) then
write(iu) cb%k2
Expand Down

0 comments on commit 9413e61

Please sign in to comment.