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

Commit

Permalink
Fixed problem where orbital element input files were being read in as…
Browse files Browse the repository at this point in the history
… radians instead of degrees. Converted from degrees to radians on input.
  • Loading branch information
daminton committed Nov 18, 2022
1 parent be68934 commit 9eb46d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/netcdf/netcdf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -626,24 +626,28 @@ module function netcdf_read_frame_system(self, iu, param) result(ierr)
if (ntp > 0) tp%e(:) = pack(rtemp, tpmask)

call check( nf90_get_var(iu%ncid, iu%inc_varid, rtemp, start=[1, tslot]), "netcdf_read_frame_system nf90_getvar inc_varid" )
rtemp = rtemp * DEG2RAD
if (.not.allocated(pl%inc)) allocate(pl%inc(npl))
if (.not.allocated(tp%inc)) allocate(tp%inc(ntp))
if (npl > 0) pl%inc(:) = pack(rtemp, plmask)
if (ntp > 0) tp%inc(:) = pack(rtemp, tpmask)

call check( nf90_get_var(iu%ncid, iu%capom_varid, rtemp, start=[1, tslot]), "netcdf_read_frame_system nf90_getvar capom_varid" )
rtemp = rtemp * DEG2RAD
if (.not.allocated(pl%capom)) allocate(pl%capom(npl))
if (.not.allocated(tp%capom)) allocate(tp%capom(ntp))
if (npl > 0) pl%capom(:) = pack(rtemp, plmask)
if (ntp > 0) tp%capom(:) = pack(rtemp, tpmask)

call check( nf90_get_var(iu%ncid, iu%omega_varid, rtemp, start=[1, tslot]), "netcdf_read_frame_system nf90_getvar omega_varid" )
rtemp = rtemp * DEG2RAD
if (.not.allocated(pl%omega)) allocate(pl%omega(npl))
if (.not.allocated(tp%omega)) allocate(tp%omega(ntp))
if (npl > 0) pl%omega(:) = pack(rtemp, plmask)
if (ntp > 0) tp%omega(:) = pack(rtemp, tpmask)

call check( nf90_get_var(iu%ncid, iu%capm_varid, rtemp, start=[1, tslot]), "netcdf_read_frame_system nf90_getvar capm_varid" )
rtemp = rtemp * DEG2RAD
if (.not.allocated(pl%capm)) allocate(pl%capm(npl))
if (.not.allocated(tp%capm)) allocate(tp%capm(ntp))
if (npl > 0) pl%capm(:) = pack(rtemp, plmask)
Expand Down

0 comments on commit 9eb46d7

Please sign in to comment.