Commit 18c1336f authored by Ignacio Pisso's avatar Ignacio Pisso
Browse files

correct missing trailing slash (/) in readpaths.f90. issue a warning.

parent 242571dd
...@@ -62,20 +62,32 @@ subroutine readpaths !(pathfile) ...@@ -62,20 +62,32 @@ subroutine readpaths !(pathfile)
read(unitpath,'(a)',err=998) path(i) read(unitpath,'(a)',err=998) path(i)
length(i)=index(path(i),' ')-1 length(i)=index(path(i),' ')-1
if (verbosity.gt.0) then
print*, 'path read', i, '=', path(i)
end if
end do
do i=1,numpath
string_test = path(i) string_test = path(i)
character_test = string_test(length(i):length(i)) character_test = string_test(length(i):length(i))
!print*, 'character_test, string_test ', character_test, string_test !print*, 'character_test, string_test ', character_test, string_test
if ((character_test .NE. '/') .AND. (i .LT. 4)) then if ((character_test .NE. '/') .AND. (i .LT. 4)) then
print*, 'WARNING: path not ending in /' print*, 'readpaths> WARNING: path not ending in /'
print*, path(i) print*, path(i)
path(i) = string_test(1:length(i)) // '/' path(i) = string_test(1:length(i)) // '/'
length(i)=length(i)+1 length(i)=length(i)+1
print*, 'fix: padded with /' print*, 'fix: padded with /'
print*, path(i) print*, path(i)
print*, 'length(i) increased 1' print*, 'length(i) increased 1', length(i)
endif endif
end do
end do
! Check whether any nested subdomains are to be used ! Check whether any nested subdomains are to be used
!*************************************************** !***************************************************
...@@ -94,9 +106,18 @@ subroutine readpaths !(pathfile) ...@@ -94,9 +106,18 @@ subroutine readpaths !(pathfile)
30 numbnests=i-1 30 numbnests=i-1
if (verbosity.gt.0) then
do i=1,numpath
print*, 'path tested', i, '=', path(i)
end do
end if
close(unitpath) close(unitpath)
return return
998 write(*,*) ' #### TRAJECTORY MODEL ERROR! ERROR WHILE #### ' 998 write(*,*) ' #### TRAJECTORY MODEL ERROR! ERROR WHILE #### '
write(*,*) ' #### READING FILE PATHNAMES. #### ' write(*,*) ' #### READING FILE PATHNAMES. #### '
stop stop
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment