c ======================================================= program demo1 C ---------------------------------------------------------------- C ---------------------------------------------------------------- implicit double precision (a-h,o-z) integer A,Z parameter (maxSet=361) data x,Q /0.1d0, 10.0d0/ dimension pdf(-6:6),pdfN(-6:6),pdf0(-6:6) dimension ialist(maxSet), izlist(maxSet) character tlist(maxSet)*132, file*132, dir*40 character nlist(maxSet)*40, name*40 include 'pdfNames.f' !*** Names of PDS files and (A,Z) values data dir /'./Grids/'/ !*** DIRECTORY OF PDS FILES c ------------------------------------------------------ CALL TRMSTR(DIR,IDIR) !*** find length of directory name 1 continue write(6,*) 'enter x,Q' read (5,*) x,q write(6,*) ' --------------------------------------' write(6,*) ' x,Q = ',x,Q write(6,*) ' --------------------------------------' write(6,*) > ' FILE NAME A Z :(Dbar,Ubar,G,U,D,S,C,B)' 2 do iset=1,maxSet,1 !*** Loop over different nuclear sets ia=ialist(iset) iz=izlist(iset) CALL TRMSTR(tlist(iset),Itlist) !*** find length of file name file=dir(1:Idir)//tlist(iset)(1:Itlist)//'.pds' !*** Join the string c write(6,*) ' --------------------------------------' c write(6,*) ' A,Z = ',ia,iz c write(6,*) ' File = ',file c write(6,*) ' --------------------------------------' c ------------------------------------------------------ Call SetNPDF (file,ierr) !*** Call by file name c ------------------------------------------------------ if(ierr.ne.0) then write(6,*) ' ***** Error with file ',file write(6,*) ' will skip this file ' goto 999 endif c ------------------------------------------------------ c ------------------------------------------------------ c.... nCTEQ do iptn=-5,5 pdfN(iptn)= CtqNpdf(iptn,x,Q,iA,iZ) !*** Get A,Z adjusted nucleon values enddo !*** End of loop over partons write(6,112) tlist(iset),ia,iz,(pdfN(i),i=-2,5,1) 112 Format(A20,'||',2(I3,1x),9(1pg10.3,1x)) 999 enddo !*** End of loop over iset=1,maxSet goto 1 !*** Input different x,Q c ------------------------------------------------------ end c =======================================================