PROGRAM UNPACKVAX *+ * Name: * UNPACKVAX * * Purpose: * Unload Kurucz flux distributions from VAX binary files * *- * Array declarations for flux distributions REAL*4 HNU(1221), WAVE(1221) CHARACTER TITLE*80 * Local declarations CHARACTER*20 FILEIN, FILEOUT INTEGER*2 ISKIP INTEGER STATUS *. * Select the file to be converted 1 WRITE (*,*) ' File to be unpacked ' READ (*,'(A)') FILEIN OPEN (1,FILE=FILEIN,STATUS='OLD',ERR=1) * and name the file to be written. 2 WRITE (*,*) ' File to be written ' READ (*,'(A)') FILEOUT OPEN (2,FILE=FILEOUT,STATUS='NEW',ERR=2,FORM='UNFORMATTED') * Read the wavelength grid CALL VAXWRD_I2 ( 1, ISKIP, STATUS ) DO I = 1,1221 CALL VAXWRD_R4 ( 1, WAVE(I), STATUS ) ENDDO * and write it out. WRITE(2) WAVE do i = 1,1201,100 write(*,2000) (wave(ii),ii=i,i+100,5) enddo 2000 format (1x,20f7.1) * Loop over model atmospheres, DO N = 1,500 * reading the model title CALL VAXWRD_I2 ( 1, ISKIP, STATUS ) IF (STATUS.NE.0) GOTO 999 CALL VAXWRD_AN ( 1, TITLE, 80, STATUS ) * and fluxes CALL VAXWRD_I2 ( 1, ISKIP, STATUS ) DO I = 1,1221 CALL VAXWRD_R4 ( 1, HNU(I), STATUS ) ENDDO * and writing them out. WRITE (*,'(A)') TITLE WRITE (2) TITLE WRITE (2) HNU stop ENDDO 999 END