Changeset 20 for trunk/src/readpaths.f90
- Timestamp:
- Dec 23, 2013, 6:23:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/readpaths.f90
r4 r20 20 20 !********************************************************************** 21 21 22 subroutine readpaths 22 subroutine readpaths !(pathfile) 23 23 24 24 !***************************************************************************** … … 30 30 ! * 31 31 ! 1 February 1994 * 32 ! last modified * 33 ! HS, 7.9.2012 * 34 ! option to give pathnames file as command line option * 32 35 ! * 33 36 !***************************************************************************** … … 47 50 implicit none 48 51 49 integer :: i 52 integer :: i 53 character(256) :: string_test 54 character(1) :: character_test 50 55 51 56 ! Read the pathname information stored in unitpath 52 57 !************************************************* 53 58 54 55 open(unitpath,file='pathnames',status='old',err=999) 59 open(unitpath,file=trim(pathfile),status='old',err=999) 56 60 57 61 do i=1,numpath 58 62 read(unitpath,'(a)',err=998) path(i) 59 63 length(i)=index(path(i),' ')-1 64 65 66 string_test = path(i) 67 character_test = string_test(length(i):length(i)) 68 !print*, 'character_test, string_test ', character_test, string_test 69 if ((character_test .NE. '/') .AND. (i .LT. 4)) then 70 print*, 'WARNING: path not ending in /' 71 print*, path(i) 72 path(i) = string_test(1:length(i)) // '/' 73 length(i)=length(i)+1 74 print*, 'fix: padded with /' 75 print*, path(i) 76 print*, 'length(i) increased 1' 77 endif 60 78 end do 61 79 … … 70 88 length(numpath+2*(i-1)+2)=index(path(numpath+2*(i-1)+2),' ')-1 71 89 end do 90 print*,length(5),length(6) 72 91 73 92
Note: See TracChangeset
for help on using the changeset viewer.