subroutine usr_opt m (moveto, o ioyr) c + + + PURPOSE + + + c Get Options from User. c c ----- Split out from the CLIGEN main module 10/6/99 by C. R. Meyer. c c + + + ARGUMENT DECLARATIONS + + + integer moveto,ioyr c c + + + ARGUMENT DEFINITIONS + + + c moveto - A global flag. If set to 'XX' it means "goto XX". c ioyr - ? c c + + + COMMON BLOCKS + + + include 'cbk4.inc' c include 'command.inc' c c + + + LOCAL VARIABLES + + + character*1 yc c c + + + LOCAL DEFINITIONS + + + c infile - File contains observed climate data. c ndflag - A flag for loop control, local to this module. c c + + + INPUT FORMATS + + + 1000 format(a51) 1010 format(13x,i2) c c + + + OUTPUT FORMATS + + + 2000 format(/1x,'Weather Generator Options',/,1x,7('-'),1x, 19('-'),1x,7('-'),//,1x,'1 - Single Year Simulation - Screen',/, 11x,'2 - Multiple Year - Screen Output',/, 11x,'3 - Multiple Year Simulation - CREAMS - GLEAMS Output File',/, 11x,'4 - Selected Single Storm WEPP - Output File',/, 11x,'5 - Multiple Year - WEPP Output File',/, 11x,'6 - Read Observed P and Temp and Generate Missing Data',/, 11x,'7 - Single Design Storm - TR 55 Storm Type WEPP Output File',/ 11x,'8 - Exit Weather Generator Program',//, 11x,'Enter generator option (1-8): ') c c + + + LOCAL VARIABLES + + + integer ndflag c + + + END SPECIFICATIONS + + + c c ndflag = 0 !never initialized if not in interactive mode - eliminates compiler complaint 56 continue if(iopt.lt.0) then write(*,2000) read(*,*)iopt endif if (iopt.eq.6) then C if(infile.eq."XXX") then if(interactive) then write(*,*)'Enter Observed Data Input File Name' read(*,1000)infile endif ndflag = 57 open(9,file=infile,status='old',err=57) ndflag = 0 57 continue if(ndflag.eq.57) then write(*,*)' Error - File not Found ' write(*,*)' Check Directory for Observed Data File or' write(*,*)' Re-enter File Name' write(*,*)' Enter c to continue or q to quit' read(*,'(a1)')yc if(yc.ne.'q'.and.yc.ne.'Q') then ndflag = 56 else moveto = 230 endif else rewind(9) read(9,1010)ioyr backspace (9) endif elseif (iopt.eq.8) then moveto = 230 endif if(ndflag.eq.56) goto 56 c if(moveto.ne.230) numyr=1 return end