program cooling_test_r real time(100),Temp_black(100),Temp_white(100) open(unit=10,file='cooling_data.txt') read(10,*)n do i=1,n read(10,*) time(i),Temp_black(i),Temp_white(i) end do close(10) dt=0.01 write(*,*)'Initial temperature?' read(*,*) T_ini write(*,*)'Surounding temperature?' read(*,*) Ts if(pgopen('/xwin')<=0)stop icolor=1 call pgenv(time(1),time(n),20.0,100.0,0,0) call pgpt(n,time,Temp_black,9) 101 write(*,*)'Cooling rate r?' read(*,*) r T=T_ini do i=1,10000 T=T-r*(T-Ts)*dt call pgpt(1,i*dt,T,20) end do 103 write(*,*) 'Again? (1=yes,0=no)' read(*,*) key if(key==0) goto 102 if(key/=1) goto 103 icolor=icolor+1 call pgsci(icolor) goto 101 102 write(*,*)'your last r value is', r write(*,*)'Bye!' end