1
Integer Function NextUnopen()
2
c********************************************************************
3
C Returns an unallocated FORTRAN i/o unit.
4
c********************************************************************
9
INQUIRE (UNIT=N, OPENED=EX)
15
Stop ' There is no available I/O unit. '
16
C *************************
21
subroutine OpenData(Tablefile)
22
c********************************************************************
23
c generic subroutine to open the table files in the right directories
24
c********************************************************************
27
Character Tablefile*40,up*3,lib*4,dir*8,tempname*100
28
data up,lib,dir/'../','lib/','Pdfdata/'/
29
Integer IU,NextUnopen,i
37
c first try in the current directory
39
tempname=dir//Tablefile
40
open(IU,file=tempname,status='old',ERR=10)
43
10 tempname=lib//tempname
44
open(IU,file=tempname,status='old',ERR=20)
48
open(IU,file=tempname,status='old',ERR=30)
50
30 tempname=up//tempname
52
write(*,*) 'Error: PDF file ',Tablefile,' not found'
57
print*,'table for the pdf NOT found!!!'