Skip to content

Commit

Permalink
remove "prev" argument for inst files; move open file logging to befo…
Browse files Browse the repository at this point in the history
…re pio call
  • Loading branch information
peverwhee committed Nov 4, 2024
1 parent 2f59d18 commit f820ab6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/control/cam_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5738,7 +5738,7 @@ subroutine wshist (rgnht_in)
inst_filename_spec = hfilename_spec(t)
end if
fname_inst = interpret_filename_spec( inst_filename_spec, number=(t-1), &
prev=prev, flag_spec='i' )
flag_spec='i' )
end if
!
! Check that this new filename isn't the same as a previous or current filename
Expand Down
6 changes: 4 additions & 2 deletions src/utils/cam_pio_utils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1133,12 +1133,14 @@ subroutine cam_pio_openfile(file, fname, mode)

integer :: ierr

if(pio_iotask_rank(pio_subsystem) == 0) then
write(iulog,*) 'Opening existing file ', trim(fname), file%fh
end if

ierr = pio_openfile(pio_subsystem, file, pio_iotype, fname, mode)

if(ierr/= PIO_NOERR) then
call endrun('Failed to open '//trim(fname)//' to read')
else if(pio_iotask_rank(pio_subsystem) == 0) then
write(iulog,*) 'Opened existing file ', trim(fname), file%fh
end if

end subroutine cam_pio_openfile
Expand Down

0 comments on commit f820ab6

Please sign in to comment.