Skip to content

Commit

Permalink
fix: add floor function back to astronomy_mod(#1350)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlee03 authored Aug 23, 2023
1 parent 54b5a21 commit be5c138
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion astronomy/astronomy.F90
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ function orbital_time(time) result(t)
real(kind=r8_kind) :: t

t = (time - autumnal_eq_ref)//period_time_type
t = twopi*(t - real(t, r8_kind))
t = twopi*(t - real(floor(t), r8_kind))
if (time < autumnal_eq_ref) t = twopi - t

end function orbital_time
Expand Down
2 changes: 1 addition & 1 deletion astronomy/include/astronomy.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ integer, parameter :: lkind = FMS_AST_KIND_
int = floor(norm_time)
int = modulo(int,num_angles)
int_1 = int+1
x = norm_time - real((norm_time), FMS_AST_KIND_)
x = norm_time - real(floor(norm_time), FMS_AST_KIND_)
ANGLE_ = (1.0_lkind - x) * real(orb_angle(int), FMS_AST_KIND_) &
+ x * real(orb_angle(int_1), FMS_AST_KIND_)
ANGLE_ = modulo(ANGLE_, real(twopi, FMS_AST_KIND_))
Expand Down

0 comments on commit be5c138

Please sign in to comment.