1
subroutine open_file(lun,filename,fopened)
2
c***********************************************************************
3
c opens file input-card.dat in current directory or above
4
c***********************************************************************
11
character*(*) filename
20
c first check that we will end in the main directory
24
c if I have to read a card
28
fine=index(tempname,' ')
29
if(fine.eq.0) fine=len(tempname)
31
if(index(filename,"_card").gt.0) then
32
tempname='Cards/'//tempname(1:fine)
38
open(unit=lun,file=tempname,status='old',ERR=30)
41
30 tempname='../'//tempname
43
write(*,*) 'Warning: file ',filename,' not found'