subroutine atmread2(fname,pmax,natm,z,prs,tmp,den,col) implicit double precision (a-h,o-z) include "parameters.dat" character fname*64 dimension z(nd3),prs(nd3),tmp(nd3),den(nd3,0:4),col(nd3,0:4) open(unit=60,file=fname,status='old') read(unit=60,fmt=*) ndat read(unit=60,fmt=900) iline read(unit=60,fmt=901) (z(n),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (prs(n),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (tmp(n),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (den(n,0),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (col(n,0),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (den(n,1),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (col(n,1),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (den(n,2),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (col(n,2),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (den(n,3),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (col(n,3),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (den(n,4),n=1,ndat) read(unit=60,fmt=900) iline read(unit=60,fmt=901) (col(n,4),n=1,ndat) close(unit=60) natm = locate(prs,ndat,pmax) + 1 return 900 format(a) 901 format(1x,1p10e11.3) 902 format(1x,i6) end