Skip to content

Commit

Permalink
Merge pull request #59 from jedwards4b/mv_adjustl
Browse files Browse the repository at this point in the history
the adjustl needs to be prior to inquire statement
  • Loading branch information
jedwards4b authored Dec 9, 2024
2 parents 46405f1 + 889255b commit a48ff87
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/nuopc_shr_methods.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module nuopc_shr_methods

use ESMF , only : operator(<), operator(/=), operator(+)
use ESMF , only : operator(-), operator(*) , operator(>=)
use ESMF , only : operator(<=), operator(>), operator(==), MOD
Expand Down Expand Up @@ -824,7 +823,6 @@ subroutine shr_get_rpointer_name(gcomp, compname, ymd, time, rpfile, mode, rc)
character(len=16) timestr
logical :: isPresent
character(len=ESMF_MAXSTR) :: inst_suffix

character(len=*), parameter :: subname='shr_get_rpointer_name'

rc = ESMF_SUCCESS
Expand All @@ -838,8 +836,8 @@ subroutine shr_get_rpointer_name(gcomp, compname, ymd, time, rpfile, mode, rc)
mon = (ymd - yr*10000)/100
day = (ymd - yr*10000 - mon*100)
write(timestr,'(i4.4,a,i2.2,a,i2.2,a,i5.5)') yr,'-',mon,'-',day,'-',time

write(rpfile,*) "rpointer."//compname//trim(inst_suffix)//'.'//trim(timestr)
rpfile = adjustl(rpfile)
if (mode.eq.'read') then
inquire(file=trim(rpfile), exist=isPresent)
if(.not. isPresent) then
Expand All @@ -850,7 +848,6 @@ subroutine shr_get_rpointer_name(gcomp, compname, ymd, time, rpfile, mode, rc)
endif
endif
endif
rpfile = adjustl(rpfile)
end subroutine shr_get_rpointer_name

logical function chkerr(rc, line, file)
Expand Down

0 comments on commit a48ff87

Please sign in to comment.