!*==plotout.spg processed by SPAG 6.70Rc at 15:33 on 10 Dec 2012 !*------------------ SPAG Configuration Options -------------------- !*--0323,76 000101,-1 000000102011332010100002000000210211210,136 10 -- !*--1100000011112111000000000000,10,10,10,10,10,10,900,100 200000000 -- !*--000000010000000000000,72,72 73,42,38,33 00011112110000100000000 -- !*---------------------------------------------------------------------- !$Author: fredfox $ !$Date: 2011-04-27 10:55:57 -0500 (Wed, 27 Apr 2011) $ !$Revision: 11826 $ !$HeadURL: https://eweru-dev1.eweru.ksu.edu/svn/code/weps1/branches/WEPS_F90_update/weps.src/src/sweep/plotout.for $ !********************************************************************** ! subroutine plotout.for !********************************************************************** subroutine plotout(yplot,ycharin,yin) use c_plot implicit none !*--PLOTOUT18 ! !*** Start of declarations rewritten by SPAG ! ! Dummy arguments ! integer :: yplot character(12),dimension(30) :: ycharin real,dimension(30) :: yin intent (in) ycharin,yin,yplot ! ! Local variables ! integer :: j,nline character(500) :: line character(500),dimension(500) :: plotdat logical :: used ! !*** End of declarations rewritten by SPAG ! ! + + + PURPOSE + + + ! 1. to create headings for tsterode.eplt file ! 2. to store dep var (yin) and indep var (xin) ! and write to tsterode.eplt file for each eros run ! plotout is called from erodout.for with yin data ! the xin data come from common/plot/ with erodin.for ! + + + ARGUMENT DECLARATAIONS + + + ! + + + ARGUMENT DEFINITIONS + + + ! yplot = number of dep variables to put in tsterode.eplt file ! ycharin(i)= name(s) of dep. variables ! yin(i) = value(s) of dep. variables ! ! + + + PARAMETERS + + + ! ! + + + GLOBAL COMMON BLOCKS + + + ! ! + + + LOCAL COMMON BLOCKS + + + ! ! + + + LOCAL VARIABLES + + + ! ! ! + + + LOCAL VARIABLE DEFINITIONS + + + ! i,j = temp indexes ! used = logical for presence of tsterode.eplt file ! ! + + + SUBROUTINES CALLED + + + ! ! + + + FORMATS + + + 1000 format (40F12.4) 1100 format (' file:') 1200 format ('tsterode.eplt') ! ! + + + END SPECIFICATIONS + + + ! ^^^ tmp out ! write(*,*)'^^^' ! write(*,*)'out from plotout.for' ! write(*,*) 'yplot=', yplot ! write(*,*) 'ycharin=', ycharin(1:yplot) ! write(*,*) 'xplot=', xplot ! write(*,*) 'xcharin=', xcharin(1:xplot) ! write(*,*) 'xin=', xin(1:xplot) ! write(*,*) 'yin=', yin(1:yplot) ! ^^^ end tmp out ! ! create tsterode.eplt file inquire (file='tsterode.eplt',exist=used) if (.NOT.used) then ! write heading for tsterode.eplt open (unit=80,file='tsterode.eplt',status='new') write (80,1100) write (80,1200) ! write(80,*)((ycharin(i),i=1,yplot),(xcharin(i),i=1,xplot)) write (80,*) ycharin(1:yplot),xcharin(1:xplot) write (80,*) close (unit=80) end if ! ! read current tsterode.eplt file to plotdat char. array open (unit=80,file='tsterode.eplt',status='old') j = 0 do read (80,'(a)',end=10) line j = j + 1 plotdat(j) = line end do ! ! update the tsterode.eplt file 10 nline = j rewind (unit=80) do j = 1,nline write (80,'(a)') plotdat(j) end do ! change sign of erosion components (yin) and write variables write (80,1000) (-1)*yin(1:yplot),xin(1:xplot) close (unit=80) end subroutine plotout