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

Commit

Permalink
Fixed some minor issues with the dimension coordinate definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Mar 1, 2024
1 parent b5daf15 commit ab017e7
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/swiftest/swiftest_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1072,14 +1072,13 @@ module subroutine swiftest_io_netcdf_initialize_output(self, param)
"netcdf_io_initialize_output nf90_put_var space" )

if (param%lrotation .and. nc%lc_lm_exists) then

! Populate coordinate values for l and m and export to hdf file
call netcdf_io_check( nf90_put_var(nc%id, nc%l_varid, [(i, i=0, nc%l_dim_max-1)]), &
"netcdf_io_write_frame_cb nf90_put_var l_varid")
call netcdf_io_check( nf90_put_var(nc%id, nc%m_varid, [(i, i=0, nc%m_dim_max-1)]), &
"netcdf_io_write_frame_cb nf90_put_var m_varid")
call netcdf_io_check( nf90_put_var(nc%id, nc%sign_varid, [1,-1]), &
"netcdf_io_write_frame_cb nf90_put_var sign_varid")
! Populate coordinate values for l, m, and sign
call netcdf_io_check( nf90_put_var(nc%id, nc%l_varid, [(i, i=0, nc%l_dim_max-1)], start=[1], count=[nc%l_dim_max]), &
"netcdf_io_netcdf_initialize_output nf90_put_var l_varid")
call netcdf_io_check( nf90_put_var(nc%id, nc%m_varid, [(i, i=0, nc%m_dim_max-1)], start=[1], count=[nc%m_dim_max]), &
"netcdf_io_netcdf_initialize_output nf90_put_var m_varid")
call netcdf_io_check( nf90_put_var(nc%id, nc%sign_varid, nc%sign_coords, start=[1], count=[2] ), &
"netcdf_io_netcdf_initialize_output nf90_put_var sign_varid")
end if

end associate
Expand Down Expand Up @@ -1617,10 +1616,6 @@ module function swiftest_io_netcdf_read_frame_system(self, nc, param) result(ier
! if (npl > 0) pl%Q(:) = pack(rtemp, plmask)
! end if





call self%read_particle_info(nc, param, plmask, tpmask)

if (param%in_form == "EL") then
Expand Down

0 comments on commit ab017e7

Please sign in to comment.