Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[submodule "CMEPS"]
path = CMEPS-interface/CMEPS
url = https://github.com/NOAA-EMC/CMEPS
branch = emc/develop
branch = production/GFS.v17
[submodule "HYCOM"]
path = HYCOM-interface/HYCOM
url = https://github.com/NOAA-EMC/HYCOM-src
Expand All @@ -29,7 +29,7 @@
[submodule "CICE"]
path = CICE-interface/CICE
url = https://github.com/NOAA-EMC/CICE
branch = develop
branch = production/GFS.v17
[submodule "CDEPS"]
path = CDEPS-interface/CDEPS
url = https://github.com/NOAA-EMC/CDEPS
Expand Down
15 changes: 14 additions & 1 deletion CDEPS-interface/ufs/cdeps_share/shr_is_restart_fh_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,12 @@ end subroutine is_restart_fh
!! @param[in] prefixtime optional, if true log filename has time prefix
!! @param[in] lastrestart optional, if present, write the time of the last restart
!! @param[in] lastoutput optional, if present, write the filename written at this FH
!! @param[in] output_dir optional, if present, write logs to specified directory
!! @param[out] rc return code
!!
!> @authorDenise.Worthen@noaa.gov
!> @date 04-14-2025
subroutine log_restart_fh(myTime, startTime, complog, prefixtime, lastrestart, lastoutput, rc)
subroutine log_restart_fh(myTime, startTime, complog, prefixtime, lastrestart, lastoutput, output_dir, rc)

use ESMF, only : ESMF_SUCCESS, ESMF_MAXSTR, ESMF_Time, ESMF_TimeInterval
use ESMF, only : ESMF_TimeGet, ESMF_TimeIntervalGet
Expand All @@ -143,6 +144,7 @@ subroutine log_restart_fh(myTime, startTime, complog, prefixtime, lastrestart, l
logical, intent(in), optional :: prefixtime
type(ESMF_Time), intent(in), optional :: lastrestart
character(len=*), intent(in), optional :: lastoutput
character(len=*), intent(in), optional :: output_dir
integer, intent(out) :: rc

! local variables
Expand Down Expand Up @@ -181,6 +183,17 @@ subroutine log_restart_fh(myTime, startTime, complog, prefixtime, lastrestart, l
else
write(filename,'(a,i4.4)')'log.'//trim(complog)//'.f',int(fhour)
end if

if (present(output_dir)) then
if (len_trim(output_dir) > 0) then
if (output_dir(len_trim(output_dir):len_trim(output_dir)) /= '/') then
filename = trim(output_dir)//'/'//trim(filename)
else
filename = trim(output_dir)//trim(filename)
end if
end if
end if

if (present(lastrestart)) then
call ESMF_TimeGet(lastrestart, yy=yr, mm=mon, dd=day, h=hour, m=minute, s=sec, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
Expand Down
2 changes: 1 addition & 1 deletion CMEPS-interface/CMEPS
2 changes: 1 addition & 1 deletion MOM6-interface/MOM6
Loading