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

Dm update wut #9

Merged
merged 8 commits into from
Apr 6, 2023
Prev Previous commit
Next Next commit
fix: time_manager missing changes from year to yr, month to mo, day t…
…o dy (NOAA-GFDL#1169)
  • Loading branch information
mlee03 authored Mar 28, 2023
commit 7188e3a2e634376da74c3e4247bc9b487ef52700
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