subroutine sing_stm i (ioyr, m moveto, o jd,iyear,damt,usdur,ustpr,uxmav) c + + + PURPOSE + + + c Generate Single Storm Data. c c ----- Split out from the CLIGEN main module 10/1/99 by C. R. Meyer. c c + + + ARGUMENT DECLARATIONS + + + CC integer ioyr,moveto,jd,iyear,index,numyr integer ioyr,moveto,jd,iyear real damt,usdur,ustpr,uxmav c c + + + ARGUMENT DEFINITIONS + + + c ioyr - Years of Record for Observed Data File (?) c moveto - A global flag. If set to 'XX' it means "goto XX". c jd - Day of the Storm. c iyear - Beginning Simulation Year. c damt - Design Storm Amount in Inches for Single Storm. c usdur - Storm Duration in Hours for Single Storm. c ustpr - Time to Peak Intensity (% Duration e.g. .4). c uxmav - Maximum Intensity Inches/Hour for Single Storm. c numyr - Number of years to simulate. c index - 4-digit numeric station index. c c outfil - File which will contain generated climate data. c c + + + COMMON BLOCKS + + + include 'cbk4.inc' c read: iopt c write: mo c include 'command.inc' c modify: numyr c c + + + LOCAL VARIABLES + + + c ibyear - year of storm (iopt 4 or 7); beginning simulation year integer ndflag c c + + + INPUT FORMATS + + + 1000 format(a51) c c + + + OUTPUT FORMATS + + + 2000 format(/1x,'Enter beginning simulation year', 1' (positive integer value; e.g. 1 ): ') 2010 format(/1x,'Enter number of years to simulate: ') 2020 format(/1x,'Enter output file name (ex. Indy.cli): ', 1 'Station No. ',i4) c c + + + END SPECIFICATIONS + + + c c c **** L1 IF **** if (iopt.ne.1) then c ****** K2 IF **** if(moveto.ne.135) then c c Single storm input data section c if (iopt.eq.4.or.iopt.eq.7) then write(*,*) write(*,*)' Enter Month Day and Year of Storm (mo da yr)' read(*,*)mo,jd,ibyear write(*,*)' Enter Design Storm Amount in Inches (e.g. 6.30)' read(*,*)damt if(iopt.eq.4) then write(*,*)' Enter Storm Duration in Hours (e.g. 6)' read(*,*)usdur write(*,*) 1 ' Enter Time to Peak Intensity (% Duration e.g. .4)' read(*,*)ustpr write(*,*)' Enter Maximum Intensity Inches/Hour (e.g. 3.0) 1' read(*,*)uxmav endif else if(iopt.eq.6) then ibyear=ioyr numyr=100 else if(ibyear.le.0) then C write(*,*) "Ibyear:", ibyear write(*,2000) read(*,*) ibyear endif if(numyr.le.0) then write(*,2010) read(*,*) numyr endif endif endif c iyear=ibyear c ****** K2 ENDIF **** endif c c ****** L2 IF **** c if (moveto.eq.135 .or. iopt.ne.2) then if (iopt.ne.2) then 135 continue if(interactive) then write(*,2020)index read(*,1000)outfil endif c c Output Options c 3 - CREAMS - GLEAMS c 4 - Single Storm WEPP c 5 - Continuous Storms WEPP c 6 - Observed Data WEPP c 7 - Design Storm WEPP c c -------- Output Numbers to Analyze Confidence Limits: CC open(72,file='dist_nrs',status='unknown') CC open(73,file='rand_nrs',status='unknown') c if(iopt.eq.3) then ndflag = 136 open(8,file=outfil,status='new',err=136) ndflag = 0 rewind (8) 136 continue else ndflag = 137 if (interactive) then open(7,file=outfil,status='new',err=137) else !overwrite file if it exists open(7,file=outfil,status='unknown',err=137) endif ndflag = 0 rewind (7) 137 continue endif if(ndflag.ne.0) then if (.not. interactive) then stop "Problem opening output file." endif write(*,*)' ' write(*,*)' **** File Already Exists *****' write(*,*)' ' write(*,*)' ',outfil write(*,*)' ' write(*,*)' Enter New File Name ' write(*,*)' ' moveto = 135 endif if(moveto.eq.135) goto 135 c ****** L2 ENDIF **** endif c **** L1 ENDIF **** endif c return end