Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Apr 6, 2024
1 parent 79e18ab commit f4f1d9f
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/nuopc_shr_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module nuopc_shr_methods
use ESMF , only : ESMF_Field, ESMF_FieldGet
use ESMF , only : ESMF_GridComp, ESMF_GridCompGet, ESMF_GridCompSet
use ESMF , only : ESMF_GeomType_Flag, ESMF_FieldStatus_Flag
use ESMF , only : ESMF_Mesh, ESMF_MeshGet
use ESMF , only : ESMF_Mesh, ESMF_MeshGet, ESMF_AlarmSet
use ESMF , only : ESMF_GEOMTYPE_MESH, ESMF_GEOMTYPE_GRID, ESMF_FIELDSTATUS_COMPLETE
use ESMF , only : ESMF_Clock, ESMF_ClockCreate, ESMF_ClockGet, ESMF_ClockSet
use ESMF , only : ESMF_ClockPrint, ESMF_ClockAdvance
Expand Down Expand Up @@ -61,7 +61,7 @@ module nuopc_shr_methods
optDate = "date" , &
optEnd = "end" , &
optGLCCouplingPeriod = "glc_coupling_period"

integer, public :: dtime_drv ! initialized in esm_time_mod.F90

integer, parameter :: SecPerDay = 86400 ! Seconds per day
Expand Down Expand Up @@ -500,7 +500,7 @@ end subroutine field_getfldptr

subroutine alarmInit( clock, alarm, option, &
opt_n, opt_ymd, opt_tod, RefTime, alarmname, advance_clock, rc)

use ESMF, only : ESMF_AlarmPrint
! Setup an alarm in a clock
! Notes: The ringtime sent to AlarmCreate MUST be the next alarm
! time. If you send an arbitrary but proper ringtime from the
Expand Down Expand Up @@ -560,7 +560,7 @@ subroutine alarmInit( clock, alarm, option, &
else
NextAlarm = CurrTime
endif

! Determine calendar
call ESMF_ClockGet(clock, calendar=cal)

Expand Down Expand Up @@ -595,6 +595,7 @@ subroutine alarmInit( clock, alarm, option, &
return
end if
end if

! Determine inputs for call to create alarm
selectcase (trim(option))

Expand All @@ -612,13 +613,6 @@ subroutine alarmInit( clock, alarm, option, &
if (chkerr(rc,__LINE__,u_FILE_u)) return
update_nextalarm = .false.

! case (optEnd)
! call ESMF_TimeIntervalSet(AlarmInterval, yy=9999, rc=rc)
! if (chkerr(rc,__LINE__,u_FILE_u)) return
! call ESMF_TimeSet( NextAlarm, yy=9999, mm=12, dd=1, s=0, calendar=cal, rc=rc )
! if (chkerr(rc,__LINE__,u_FILE_u)) return
! update_nextalarm = .false.

case (optDate)
call ESMF_TimeIntervalSet(AlarmInterval, yy=9999, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
Expand Down Expand Up @@ -711,7 +705,7 @@ subroutine alarmInit( clock, alarm, option, &
alarm = ESMF_AlarmCreate( name=lalarmname, clock=clock, ringTime=NextAlarm, &
ringInterval=AlarmInterval, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

! Advance model clock to trigger alarm then reset model clock back to currtime
if (present(advance_clock)) then
if (advance_clock) then
Expand Down

0 comments on commit f4f1d9f

Please sign in to comment.