Skip to content

Commit

Permalink
Add more error messaging fixing ESCOMP#524
Browse files Browse the repository at this point in the history
  • Loading branch information
ekluzek committed Jan 18, 2025
1 parent 4b636c6 commit b742505
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cesm/driver/esm_time_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ subroutine esm_time_clockinit(ensemble_driver, instance_driver, logunit, maintas
inquire( file=trim(restart_pfile), exist=exists)
if (.not. exists) then
rc = ESMF_FAILURE
write(logunit,*) " drv_restart_pointer file does NOT exist, correct this and rerun = "//trim(restart_pfile)
call ESMF_LogWrite(trim(subname)//' ERROR rpointer file '//trim(restart_pfile)//' not found', &
ESMF_LOGMSG_ERROR, line=__LINE__, file=__FILE__)
return
Expand All @@ -150,13 +151,15 @@ subroutine esm_time_clockinit(ensemble_driver, instance_driver, logunit, maintas
open(newunit=unitn, file=restart_pfile, form='FORMATTED', status='old',iostat=ierr)
if (ierr < 0) then
rc = ESMF_FAILURE
write(logunit,*) " error opening rpointer file "
call ESMF_LogWrite(trim(subname)//' ERROR rpointer file open returns error', &
ESMF_LOGMSG_ERROR, line=__LINE__, file=__FILE__)
return
end if
read(unitn,'(a)', iostat=ierr) restart_file
if (ierr < 0) then
rc = ESMF_FAILURE
write(logunit,*) " error in read of rpointer file "
call ESMF_LogWrite(trim(subname)//' ERROR rpointer file read returns error', &
ESMF_LOGMSG_INFO, line=__LINE__, file=__FILE__)
return
Expand Down

0 comments on commit b742505

Please sign in to comment.