Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missed changes from year to yr, month to mo, day to dy #1169

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions time_interp/time_interp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ subroutine time_interp_month ( Time, weight, year1, year2, month1, month2 )
! mid point of current month in seconds
mid_month = days_in_month(Time) * halfday
! time into current month in seconds
cur_month = second + secmin*minute + sechour*hour + secday*(day-1)
cur_month = second + secmin*minute + sechour*hour + secday*(dy-1)

if ( cur_month >= mid_month ) then
! current time is after mid point of current month
Expand Down Expand Up @@ -466,8 +466,8 @@ subroutine time_interp_day ( Time, weight, year1, year2, month1, month2, day1, d
endif
else
! current time is before mid point of day
year2 = year; month2 = month; day2 = day
year1 = year; month1 = month; day1 = day - 1
year2 = yr; month2 = mo ; day2 = dy
year1 = yr; month1 = mo; day1 = dy - 1
weight = real(sday + halfday) / real(secday)

if (day1 < 1) then
Expand Down