!$Author$ !$Date$ !$Revision$ !$HeadURL$ subroutine dooper (sr) ! + + + PURPOSE + + + ! Dooper reads in any coefficients associated with the ! operation. ! + + + KEYWORDS + + + ! tillage, operation, management ! + + + PARAMETERS AND COMMON BLOCKS + + + include 'p1werm.inc' include 'manage/oper.inc' include 'manage/man.inc' include 'manage/mproc.inc' ! + + + ARGUMENT DECLARATIONS + + + integer sr ! + + + ARGUMENT DEFINITIONS + + + ! sr - the subregion number ! + + + ACCESSED COMMON BLOCK VARIABLE DEFINITIONS + + + ! odir - operation direction (degrees from NORTH) ! ospeed - operation speed ! + + + LOCAL VARIABLES + + + character*256 line character*1 opdumy ! ! + + + SUBROUTINES CALLED + + + ! + + + FUNCTIONS CALLED + + + ! + + + DATA INITIALIZATIONS + + + ! + + + END SPECIFICATIONS + + + ! write(*,*) '*>dooper line |', mtbl(mcur(sr)), '|' read(mtbl(mcur(sr)), 1001) opdumy, opcode, opname 1001 format(a1,1x,i2,1x,a) if( (opcode.eq.0).and.(mcount(sr).gt.0) ) then opskip = 1 print*, 'SR',sr,' Skip operation', opcode,' ',opname else print*, 'SR',sr,' Do operation', opcode,' ',opname end if ! set up stir accounting call stir_oper(sr) select case (opcode) case (1) ! original ground engaging operation ! set energy and stir values to default oenergyarea = -1 ostir = -1 ! get additional line of data mcur(sr) = mcur(sr) + 1 line = mtbl(mcur(sr)) ! read tillage speed and direction read(line(2:len_trim(line)), *, err=901) ospeed, odir, & & ostdspeed, ominspeed, omaxspeed case (3) ! added energy and stir to O1 ! get additional line of data mcur(sr) = mcur(sr) + 1 line = mtbl(mcur(sr)) ! read tillage speed and direction read(line(2:len_trim(line)), *, err=901) oenergyarea, ostir, & & ospeed, odir, ostdspeed, ominspeed, omaxspeed case (4) ! added energy and stir to O2 ! get additional line of data mcur(sr) = mcur(sr) + 1 line = mtbl(mcur(sr)) ! read tillage speed and direction read(line(2:len_trim(line)), *, err=901) oenergyarea, ostir case default ! set energy and stir values to default oenergyarea = -1 ostir = -1 end select ! initialize row spacing to zero. It is needed by P51, (set in P3 or P5) ! but may be set and not cleared by a previous operation. imprs = 0.0 return ! Error stops 901 write(0,9901) mtbl(mcur(sr)) 9901 format ('DOOPER: Error reading line ->', a) call exit (1) end