@@ -595,8 +595,8 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc)
595595 logical :: top_parent_is_global
596596 logical :: history_file_on_native_grid
597597
598- integer :: num_restart_interval , restart_starttime
599- real ,dimension (:),allocatable :: restart_interval
598+ integer :: num_restart_fh , restart_starttime
599+ real ,dimension (:),allocatable :: restart_fh
600600
601601 integer :: urc
602602 type (ESMF_State) :: tempState
@@ -634,16 +634,16 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc)
634634 call ESMF_ConfigLoadFile(config= CF ,filename= ' model_configure' ,rc= rc)
635635 if (ESMF_LogFoundError(rcToCheck= rc, msg= ESMF_LOGERR_PASSTHRU, line= __LINE__, file= __FILE__)) return
636636
637- num_restart_interval = ESMF_ConfigGetLen(config= CF, label = ' restart_interval:' ,rc= rc)
637+ num_restart_fh = ESMF_ConfigGetLen(config= CF, label = ' restart_interval:' ,rc= rc)
638638 if (ESMF_LogFoundError(rcToCheck= rc, msg= ESMF_LOGERR_PASSTHRU, line= __LINE__, file= __FILE__)) return
639- if (mype == 0 ) print * ,' af ufs config,num_restart_interval =' ,num_restart_interval
640- if (num_restart_interval <= 0 ) num_restart_interval = 1
641- allocate (restart_interval(num_restart_interval ))
642- restart_interval = 0
643- call ESMF_ConfigGetAttribute(CF,valueList= restart_interval ,label= ' restart_interval:' , &
644- count= num_restart_interval , rc= rc)
639+ if (mype == 0 ) print * ,' af ufs config,num_restart_fh =' ,num_restart_fh
640+ if (num_restart_fh <= 0 ) num_restart_fh = 1
641+ allocate (restart_fh(num_restart_fh ))
642+ restart_fh = 0
643+ call ESMF_ConfigGetAttribute(CF,valueList= restart_fh ,label= ' restart_interval:' , &
644+ count= num_restart_fh , rc= rc)
645645 if (ESMF_LogFoundError(rcToCheck= rc, msg= ESMF_LOGERR_PASSTHRU, line= __LINE__, file= __FILE__)) return
646- if (mype == 0 ) print * ,' af ufs config,restart_interval =' ,restart_interval
646+ if (mype == 0 ) print * ,' af ufs config,restart_fh =' ,restart_fh
647647!
648648 call fms_init(fcst_mpi_comm% mpi_val)
649649 call mpp_init()
@@ -762,8 +762,8 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc)
762762 if (mype == 0 ) write (* ,* )' time_init=' , date_init,' time=' ,date,' time_end=' ,date_end,' dt_atmos=' ,dt_atmos
763763
764764 call fcst_time_array_setup(Time_init, Time_end, Time_step_restart, &
765- Time_restart, num_restart_interval , &
766- restart_interval )
765+ Time_restart, num_restart_fh , &
766+ restart_fh )
767767
768768!- ----- initialize component models ------
769769
@@ -1158,51 +1158,41 @@ end subroutine fcst_initialize
11581158 ! >
11591159 ! > @param[inout] Time_init model initialization time
11601160 ! > @param[inout] Time_end model end time
1161- ! > @param[inout] Time_step_restart restart time based on restart_interval
1161+ ! > @param[inout] Time_step_restart restart time based on restart_fh
11621162 ! > @param[inout] Time_restart calculated restart time
1163- ! > @param[inout] num_restart_interval user defined restart interval
1164- ! > @param[inout] restart_interval restart interval, allocatable
1163+ ! > @param[inout] num_restart_fh user defined restart interval
1164+ ! > @param[inout] restart_fh restart interval, allocatable
11651165 ! >
11661166 ! > @author Daniel Sarmiento @date May 16, 2025
11671167 subroutine fcst_time_array_setup (Time_init , Time_end , Time_step_restart , &
1168- Time_restart , num_restart_interval , &
1169- restart_interval )
1168+ Time_restart , num_restart_fh , &
1169+ restart_fh )
11701170
11711171 type (time_type), intent (inout ) :: Time_init, Time_end, &
11721172 Time_step_restart, &
11731173 Time_restart
11741174 type (time_type) :: iautime
1175- integer , intent (inout ) :: num_restart_interval
1175+ integer , intent (inout ) :: num_restart_fh
11761176 integer :: total_inttime, tmpvar, &
11771177 i, restart_starttime
11781178 logical :: freq_restart
1179- real , dimension (:), allocatable , intent (inout ) :: restart_interval
1179+ real , dimension (:), allocatable , intent (inout ) :: restart_fh
11801180
11811181 ! set up forecast time array that controls when to write out restart files
11821182 frestart = 0
11831183 call get_time(Time_end - Time_init, total_inttime)
1184- ! set iau offset time
1185- Atmos% iau_offset = iau_offset
1186- if (iau_offset > 0 ) then
1187- iautime = set_time(iau_offset * 3600 , 0 )
1188- endif
11891184 ! if the second item is -1, the first number is frequency
11901185 freq_restart = .false.
1191- if (num_restart_interval == 2 ) then
1192- if (restart_interval (2 )== - 1 ) freq_restart = .true.
1186+ if (num_restart_fh == 2 ) then
1187+ if (restart_fh (2 )== - 1 ) freq_restart = .true.
11931188 endif
11941189 if (freq_restart) then
1195- if (restart_interval (1 ) >= 0 ) then
1196- tmpvar = restart_interval (1 ) * 3600
1190+ if (restart_fh (1 ) >= 0 ) then
1191+ tmpvar = restart_fh (1 ) * 3600
11971192 Time_step_restart = set_time (tmpvar, 0 )
1198- if (iau_offset > 0 ) then
1199- Time_restart = Time_init + iautime + Time_step_restart
1200- frestart(1 ) = tmpvar + iau_offset * 3600
1201- else
1202- Time_restart = Time_init + Time_step_restart
1203- frestart(1 ) = tmpvar
1204- endif
1205- if (restart_interval(1 ) > 0 ) then
1193+ Time_restart = Time_init + Time_step_restart
1194+ frestart(1 ) = tmpvar
1195+ if (restart_fh(1 ) > 0 ) then
12061196 i = 2
12071197 do while ( Time_restart < Time_end )
12081198 frestart(i) = frestart(i-1 ) + tmpvar
@@ -1212,17 +1202,13 @@ subroutine fcst_time_array_setup(Time_init, Time_end, Time_step_restart, &
12121202 endif
12131203 endif
12141204 ! otherwise it is an array with forecast time at which the restart files will be written out
1215- else if (num_restart_interval >= 1 ) then
1216- if (num_restart_interval == 1 .and. restart_interval (1 ) == 0 ) then
1205+ else if (num_restart_fh >= 1 ) then
1206+ if (num_restart_fh == 1 .and. restart_fh (1 ) == 0 ) then
12171207 frestart(1 ) = total_inttime
12181208 else
1219- if (iau_offset > 0 ) then
1220- restart_starttime = iau_offset * 3600
1221- else
1222- restart_starttime = 0
1223- endif
1224- do i= 1 ,num_restart_interval
1225- frestart(i) = restart_interval(i) * 3600 . + restart_starttime
1209+ restart_starttime = 0
1210+ do i= 1 ,num_restart_fh
1211+ frestart(i) = restart_fh(i) * 3600 . + restart_starttime
12261212 enddo
12271213 endif
12281214 endif
0 commit comments