program nod1 c c c integer i,j,k,noofstep real*8 dt character*17 t0 character*12 t1 character*11 t2 character*13 t4 character*8 t5 character*10 fname, gname character*1 char1(80,42),char2(80,40),char3(80,40),char4(80,40) c c write(6,*) ' ' c write(6,*) 'please print the time at which you would like to have' c write(6,*) ' the graph; MUST be a FLOATING point number.' c write(6,*) ' [example: 7.0] ' c write(6,*) ' ' c read(5,77, err=901, end=903) gtime c 77 format(f12.6) c write(6,*) ' ' write(6,*) 'please print the name of the file to be processed ' read(5,79) fname write(6,*) ' ' write(6,*) 'please print the name of the graphic file ' read(5,79) gname 79 format(a10) c open(10, file=fname) open(7, file=gname) c c 3 continue read (10,333) t4 333 format(a13) if(t4.eq.' maxcol1 =') then read(10,303) noofstep write(6,*) 'noofstep',noofstep go to 4 303 format(t14,i6) else go to 3 endif 4 continue read (10,444) t5 444 format(a7) if(t5.eq.' c =') then read(10,404) dt write(6,*) dt go to 5 404 format(t9,f10.5) else go to 4 endif c 5 continue write(6,*)'noofstep= ',noofstep,'dt= ',dt do 222 k=1,noofstep 1 continue read (10,111, end=903) t0 111 format(a17) if(t0.eq.' total time host') then read(10,101, end= 903) t1, t2, t3 c if (t3.eq.gtime) then go to 7 c else c go to 1 c endif 101 format(a12,a11, f12.6) else go to 1 endif c c i = 1 7 continue c read(10,103) ((char1(i,j),j=1,42),i=1,80) 103 format(t10,42a) read(10,*) read(10,104) ((char2(i,j),j=1,40),i=1,80) 104 format(t10,40a) read(10,*) read(10,104) ((char3(i,j),j=1,40),i=1,80) read(10,*) read(10,104) ((char4(i,j),j=1,40),i=1,80) c do 10 i=1,80 do 9 j=1,42 if (char1(i,j) .EQ. '*') then char1(i,j)='1' else char1(i,j)='0' endif 9 continue do 8 j=1,40 if (char2(i,j) .EQ. '*') then char2(i,j)='1' else char2(i,j)='0' endif if (char3(i,j) .EQ. '*') then char3(i,j)='1' else char3(i,j)='0' endif if (char4(i,j) .EQ. '*') then char4(i,j)='1' else char4(i,j)='0' endif 8 continue 10 continue write(7,105) t2,t3 write(7,*)'data(',k,',:,:)=[' 105 format('%',a,f5.1) write(7,106) ((char1(i,j),j=1,42),(char2(i,j),j=1,40), 1 (char3(i,j),j=1,40),(char4(i,j),j=1,40),i=1,80) 106 format(162a2) write(7,*)'];' 222 continue write(7,*)'for i=1:',noofstep write(7,*)' databuffer(:,:)=data(i,:,:);' write(7,*)' pcolor(databuffer);view(180,90);' write(7,*)' waitforbuttonpress;' write(7,*)' Mov(i)=getframe;' write(7,*)'end' write(7,*)'%movie(Mov,1,2)' go to 905 901 write(6,*) 'Error in input; Please rerun checking the input! ' go to 905 903 write(6,*) ' End of File reached: ' write(6,*) ' time t = ', gtime,' does not exist!' write(6,*) ' OR' write(6,*) ' file "', fname,'" is not the right one!' 905 continue stop end