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

Remove month loop in GetIndex2Interp #254

Merged
merged 1 commit into from
Jan 9, 2024
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
21 changes: 0 additions & 21 deletions src/Core/hcoio_util_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1177,27 +1177,6 @@ SUBROUTINE GetIndex2Interp ( HcoState, Lct, &
IF ( tidx2 > 0 ) EXIT
ENDDO

! Repeat above but now only modify month.
IF ( tidx2 < 0 ) THEN
tmpYMDhm = availYMDhm(tidx1)
DO
! Increase by one month
tmpYMDhm = tmpYMDhm + 1.0e6_dp

! Exit if we are beyond available dates
IF ( tmpYMDhm > availYMDhm(nTime) ) EXIT

! Check if there is a time slice with that date
DO I = tidx1,nTime
IF ( ABS( tmpYMDhm - availYMDhm(I) ) < EPSILON ) THEN
tidx2 = I
EXIT
ENDIF
ENDDO
IF ( tidx2 > 0 ) EXIT
ENDDO
ENDIF

! Repeat above but now only modify day
IF ( tidx2 < 0 ) THEN
tmpYMDhm = availYMDhm(tidx1)
Expand Down