Skip to content

Commit

Permalink
improve rpointer naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Sep 12, 2024
1 parent 39ea702 commit 4aafe19
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/nuopc_shr_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -905,18 +905,11 @@ subroutine shr_get_rpointer_name(gcomp, compname, ymd, time, rpfile, mode, rc)
day = (ymd - yr*10000 - mon*100)
write(timestr,'(i4.4,a,i2.2,a,i2.2,a,i5.5)') yr,'-',mon,'-',day,'-',time

rpfile = "rpointer."//compname
if (trim(inst_suffix) .ne. "") then
write(rpfile,*) trim(rpfile),".",trim(inst_suffix)
endif
write(rpfile,*) trim(rpfile),".",timestr
write(rpfile,*) "rpointer."//compname//trim(inst_suffix)//'.'//trim(timestr)
if (mode.eq.'read') then
inquire(file=trim(rpfile), exist=isPresent)
if(.not. isPresent) then
rpfile = "rpointer."//compname
if (inst_suffix .ne. "") then
rpfile = trim(rpfile)//"."//trim(inst_suffix)
endif
rpfile = "rpointer."//compname//trim(inst_suffix)
inquire(file=trim(rpfile), exist=isPresent)
if(.not. isPresent) then
call shr_sys_abort( subname//'ERROR no rpointer file found in '//rpfile//' or in '//rpfile//'.'//timestr )
Expand Down

0 comments on commit 4aafe19

Please sign in to comment.