제5장 강우강도식 산정

   강우강도식의 형식으로 (1) Tlbot형(I=a/(t+b)), (2) Sherman형(I=a/(t+b)), (3) Japanese(I=a/(t**n))형으로 강우강도식을 
산출하고 최적 강우강도식을 구하기 위하여 편차를 계산하는 프로그램을 foortran으로 전산화 한 내용을 소개하면 다음과 같다.


	CHARACTER C*7
	DIMENSION NT(20),FR(20),FI(20),FTI(20),FII(20),FTII(20)
	DIMENSION FSTI(20),FSTI2(20),FLT(20),FLI(20),FLT2(20),FLTLI(20)
	DIMENSION STI(20),SJI(20),SSI(20),TIV(20),TJV(20),TSV(20)
	CHARACTER PUSH
	 WRITE(6,*)' '
	WRITE(*,*) '***PROGAMMED BY PROFESSOR,SUNG KI SUK***'
	WRITE(6,*) '            ***PROGAMMED BY PROFESSOR,SUNG KI SUK***'
	WRITE(6,*)' '
	WRITE(*,*)' '
	WRITE(*,*) 'HOW MANY DO YOU WANT N ?(NUMBER OF SAMPLE) '
	READ(*,*) M
	DO 800 K= 1,10
800	WRITE(*,*)' '
	WRITE(*,*)  '           key in c  to continue '
	READ(*,802) PUSH
802	FORMAT(A1)

	DO 804 K= 1,10
804	WRITE(*,*)' '
	WRITE(*,*) 'which method do you use between FILE or KEY IN ( f/
     -k ?)'
	READ(*,802) PUSH
	DO 806 K= 1,10
806	WRITE(*,*)' '

	IF (PUSH.EQ.'k')  then

	DO 101 K=1,M
	WRITE(*,*) ' INPUT T ?(DURATION )'
	READ(*,*) NT(K)
	WRITE(*,*) ' INPUT R ?(PRECIPITATION)'
	READ(*,*) FR(K)
	FI(K) = (FR(K)/NT(K))*60
	FTI(K) = NT(K)*FI(K)
	FII(K) = FI(K)*FI(K)
	FTII(K) = NT(K)*FII(K)
	FSTI(K) = SQRT(NT(K)*1.0)*FI(K)
	FSTI2(K) = SQRT(NT(K)*1.0)*FII(K)
	ANT=NT(K)*1.0
	FLT(K) = ALOG10(ANT)
	FLI(K) = ALOG10(FI(K))
	FLT2(K) = FLT(K) **2
	FLTLI(K) = FLT(K) * FLI(K)
	TFR = TFR +FR(K)
	TFI = TFI + FI(K)
	TTI = TTI + FTI(K)
	TII = TII + FII(K)
	TTII = TTII + FTII(K)
	TSTI = TSTI + FSTI(K)
	TSTI2 = TSTI2 + FSTI2(K)
	TLT = TLT + FLT(K)
	TLI = TLI + FLI(K)
	TLT2 = TLT2 + FLT2(K)
	TLTLI = TLTLI + FLTLI(K)

 101	CONTINUE

	else
	open(1,FILE='sung1.dat',STATUS='OLD')
	 K=1
808	read(1,809,end=812)  NT(K)
	READ(1,810) FR(K)
809	FORMAT(I4)
810	FORMAT(F9.3)

	WRITE(*,*) NT(K),FR(K)
	FI(K) = (FR(K)/NT(K))*60
	FTI(K) = NT(K)*FI(K)
	FII(K) = FI(K)*FI(K)
	FTII(K) = NT(K)*FII(K)
	FSTI(K) = SQRT(NT(K)*1.0)*FI(K)
	FSTI2(K) = SQRT(NT(K)*1.0)*FII(K)
	ANT=NT(K)*1.0
	FLT(K) = ALOG10(ANT)
	FLI(K) = ALOG10(FI(K))
	FLT2(K) = FLT(K) **2
	FLTLI(K) = FLT(K) * FLI(K)
	TFR = TFR +FR(K)
	TFI = TFI + FI(K)
	TTI = TTI + FTI(K)
	TII = TII + FII(K)
	TTII = TTII + FTII(K)
	TSTI = TSTI + FSTI(K)
	TSTI2 = TSTI2 + FSTI2(K)
	TLT = TLT + FLT(K)
	TLI = TLI + FLI(K)
	TLT2 = TLT2 + FLT2(K)
	TLTLI = TLTLI + FLTLI(K)
	K=K+1
	GOTO 808
	ENDIF
812	CLOSE(1)


	WRITE(6,*) '                   *** Result Of Input Data T,R ***'
	WRITE(6,*) ' '
	WRITE(6,10)

 10	FORMAT(T4,'T',T10,'R(MM)',T18,'I(MM/HR)',
     *	 T32,'T*I',T43,'I*I',T53,'T*I*I',T64,'SQRT(T)*I',
     *	T74,'SQRT(T)*I*I',T87,'LOGT',T98,'LOGI',T107,'(LOGT)**2',
     *	       T118,'LOGT*LOGI')


	DO 102 K=1,M
	WRITE(6,20) NT(K),FR(K),FI(K),FTI(K),FII(K),FTII(K)
     *	  ,FSTI(K),FSTI2(K),FLT(K),FLI(K),FLT2(K),FLTLI(K)
20	 FORMAT(I4,T6,F9.3,T16,F10.4,T28,F10.4,T39,F10.3,
     *	    T51,F10.3,T62,F10.2,T73,F10.2,T84,F10.6,T95,F10.6,T106,F10.6,
     *	    T117,F10.6)

102	 CONTINUE

	 WRITE(6,21) TFR,TFI,TTI,TII,TTII,TSTI,TSTI2,TLT,TLI,TLT2,TLTLI
	 write(*,*)' step 1'
 21	FORMAT(/'TOTAL',T6,F9.3,T16,F10.4,T27,F11.4,T39,F10.3,
     *	    T50,F11.3,T62,F10.2,T73,F10.2,T84,F10.6,T95,F10.6,T106,F10.6,
     *	    T117,F10.6//)

	WRITE (6,*) '               TALBOT TYPE'
	AT=((TTI*TII) - (TTII * TFI)) / ((M*TII) - (TFI * TFI))
	IAT = AT +0.5
	BT = (TFI*TTI - M*TTII) / (M*TII - TFI*TFI)
	    IBT=BT+0.5
	 write(6,*)'  '
	WRITE(6,*) 'a =',IAT
	 write(6,*)'  '
	WRITE(6,*) 'b =',IBT
	  write(6,*)' '
	  DO 450 K=1,M
	      STI(K) = (IAT/ (NT(K)*1.0 + IBT))
	      TIV(K) = FI(K) -STI(K)
	      TIV(K) = TIV(K) **2
	      TTIV = TTIV + TIV(K)
450    WRITE(6,451) IAT,NT(K),IBT,STI(K)
451    FORMAT(T5,I5,' / (',I4,'  +  ',I5,' ) = ',F10.6)
       WRITE(6,*)' '
	WRITE(6,*) '              JAPANESE TYPE'

	WRITE(6,*) ' '
	    AJ=(TSTI * TII-TSTI2*TFI) / (M*TII - TFI*TFI)
	    IAJ  = AJ+ 0.5
	WRITE(6,*)'a =',IAJ
	    BJ = (TFI * TSTI -M*TSTI2) / (M * TII-TFI*TFI)
	 write(6,*)'  '
	WRITE(6,*)'b =',BJ

	 write(6,*)'  '
*	     IBJ1 = (BJ *0.0005) * 1000
*	     BJ = (IBJ1*1.0)/1000.0
	DO 401 K=1,M
	    SJI(K) = IAJ/(BJ+SQRT(NT(K)*1.0))
	    TJV(K) = FI(K)-SJI(K)
	    TJV(K) = TJV(K) **2
	    TTJV = TTJV +TJV(K)
	    WRITE(6,411) IAJ,NT(K),BJ,SJI(K)
411	   FORMAT(T4,I5,'/ ( SQRT(' ,I4,') + ',F10.6,') = ',F10.6)
  401	  CONTINUE

	WRITE(6,*) ' '
	WRITE(6,*) '              SHERMAN TYPE'

	WRITE(6,*) ' '
	SA =((TLI * TLT2 - TLTLI * TLT) / (M * TLT2 - TLT * TLT))
	SA = 10 ** SA

	WRITE(6,*)'a =',SA
	WRITE(6,*)'  '
	write(6,*)'  '
	SA = SA +0.5
	ISA = SA
       TN=(TLI*TLT-M*TLTLI)/(M*TLT2-TLT*TLT)
*	TN = TN + 0.0005
	write(6,*)'n =',TN
*	 ITN = TN * 1000
	write(6,*)' '
*	 TN = ITN * 1.0 / 1000.0
	DO 500 K=1,M
	    SSI(K) = ISA / (NT(K) ** TN)
	WRITE(6,65) ISA,NT(K),TN,SSI(K)
65     FORMAT(T4,I5,' / (',I4,' ** ',F10.7,') = ',F10.6)
		TSV(K) = FI(K) - SSI(K)
		TSV(K) = TSV(K) **2
		TTSV = TTSV + TSV(K)
 500	CONTINUE
	WRITE(6,550)
 550	FORMAT(//,T30,'TALBOT TYPE',//,T7,'T',T14,'R(MM)',
     *	     T23,'I(MM/HR)',T36,'I(MM/HR)',T53,'V*V',/)
	DO 600 K=1,M
 600	WRITE(6,551) NT(K),FR(K),FI(K),STI(K),TIV(K)
 551	FORMAT(T4,I4,T10,F10.3,T21,F10.4,T35,F10.5
     *	       ,T50,F10.6/)
	WRITE(6,999)TTIV
 999	FORMAT(T5,'TOTAL',T46,F14.6)
	WRITE(6,555)
 555	FORMAT(/,T30,'JAPANESE TYPE',//,T7,'T',T14,'R(MM)',
     *	     T23,'I(MM/HR)',T36,'I(MM/HR)',T53,'V*V',/)
	DO 556 K=1,M
 556	WRITE(6,551) NT(K),FR(K),FI(K),SJI(K),TJV(K)
	WRITE(6,999) TTJV
	WRITE(6,557)
 557	FORMAT(//,T30,'SHERMAN TYPE',//,T7,'T',T14,'R(MM)',
     *	    T23,'I(MM/HR)',T36,'I(MM/HR)',T53,'V**V',/)
	DO 558 K=1,M
 558	WRITE(6,551) NT(K),FR(K),FI(K),SSI(K),TSV(K)
	WRITE(6,999) TTSV
	 WRITE(6,*) ' '
	WRITE(6,*) '          *** AS BEST AS YOU CAN *** '
	WRITE(6,*) ' '
	WRITE(6,*) '            ***PROGAMMED BY PROFESSOR,SUNG KI SUK***'
	STOP

	END
   

   상기의 프로그램을 fortran program에서 실행파일을 만들고, 다음의 예제를 가지고 실행방법을 알아보기로 한다.


   (예제) 다음은 20년 확률 강우량이다. 이 자료를 이용하여 (1) Tabot형, (2) Sherman형, (3) Japanese형에 의한 확률 강우강도
식을 구하고 최적 강우강도식을 정하시오.
강우계속시간(min)5102030406080120
강우량(mm)1520303843617086
   먼저 자료를 fortran program에서 다음과 같이 입력하고, file명을 sung1.dat로 저장한다.

5
15.0
10
20.0
20
30.0
30
38.0
40
43.0
60
61.0
80
70.0
120
86.0

   그리고 다음과 같이 프로그램을 실행한다. (소문자 상태에서 실행한다.)


C:\FORTRAN>sung1


   File name missing or blank - Please enter name
   UNIT 6?  sung1.out
   ***PROGRAMMED BY PROFESSOR, SUNG KI SUK***

   HOW MANY DO YOU WANT N ?(NUMBER OF SAMPLE)
   8

             key in c  to continue
   c
   
   which method do you use between FILE or KEY IN ( f/  k ?)
   f

               5        15.000000
              10        20.000000
              20        30.000000
              30        38.000000
              40        43.000000
              60        61.000000
              80        70.000000
             120        86.000000
    step 1
   Stop - Program terminated.


   실행 결과치는 다음과 같다.

C:\FORTRAN>type sung1.out>prn

  
             ***PROGAMMED BY PROFESSOR,SUNG KI SUK***
  
                    *** Result Of Input Data T,R ***
  
   T     R(MM)   I(MM/HR)      T*I        I*I       T*I*I      SQRT(T)*I SQRT(T)*I*I  LOGT       LOGI     (LOGT)**2  LOGT*LOGI
   5    15.000   180.0000    900.0000  32400.000  162000.000     402.49   72448.60    .698970   2.255272    .488559   1.576368
  10    20.000   120.0000   1200.0000  14400.000  144000.000     379.47   45536.80   1.000000   2.079181   1.000000   2.079181
  20    30.000    90.0000   1800.0000   8100.000  162000.000     402.49   36224.30   1.301030   1.954242   1.692679   2.542528
  30    38.000    76.0000   2280.0000   5776.000  173280.000     416.27   31636.46   1.477121   1.880814   2.181887   2.778190
  40    43.000    64.5000   2580.0000   4160.250  166410.000     407.93   26311.73   1.602060   1.809560   2.566596   2.899023
  60    61.000    61.0000   3660.0000   3721.000  223260.000     472.50   28822.74   1.778151   1.785330   3.161822   3.174587
  80    70.000    52.5000   4200.0000   2756.250  220500.000     469.57   24652.65   1.903090   1.720159   3.621752   3.273618
 120    86.000    43.0000   5160.0000   1849.000  221880.000     471.04   20254.78   2.079181   1.633469   4.322994   3.396277
 
TOTAL  363.000   687.0000  21780.0000  73162.500 1473330.000    3421.78  285888.10  11.839600  15.118030  19.036290  21.719770
 
 
                TALBOT TYPE
   
 a =         5129
   
 b =           28
  
     5129 / (   5  +     28 ) = 155.424200
     5129 / (  10  +     28 ) = 134.973700
     5129 / (  20  +     28 ) = 106.854200
     5129 / (  30  +     28 ) =  88.431040
     5129 / (  40  +     28 ) =  75.426470
     5129 / (  60  +     28 ) =  58.284090
     5129 / (  80  +     28 ) =  47.490740
     5129 / ( 120  +     28 ) =  34.655410
  
               JAPANESE TYPE
  
 a =          476
   
 b =  5.617061E-001
   
     476/ ( SQRT(   5) +    .561706) = 170.135300
     476/ ( SQRT(  10) +    .561706) = 127.820100
     476/ ( SQRT(  20) +    .561706) =  94.559970
     476/ ( SQRT(  30) +    .561706) =  78.821880
     476/ ( SQRT(  40) +    .561706) =  69.123140
     476/ ( SQRT(  60) +    .561706) =  57.296430
     476/ ( SQRT(  80) +    .561706) =  50.073750
     476/ ( SQRT( 120) +    .561706) =  41.333230
  
               SHERMAN TYPE
  
 a =       338.1361000
   
   
 n =  4.319997E-001
  
     338 / (   5 **   .4319997) = 168.640500
     338 / (  10 **   .4319997) = 125.002000
     338 / (  20 **   .4319997) =  92.655720
     338 / (  30 **   .4319997) =  77.767980
     338 / (  40 **   .4319997) =  68.679530
     338 / (  60 **   .4319997) =  57.644250
     338 / (  80 **   .4319997) =  50.907580
     338 / ( 120 **   .4319997) =  42.727860
 
 
                             TALBOT TYPE
 
      T      R(MM)    I(MM/HR)     I(MM/HR)         V*V
 
      5      15.000   180.0000     155.42420     603.968000
 
     10      20.000   120.0000     134.97370     224.211000
 
     20      30.000    90.0000     106.85420     284.062800
 
     30      38.000    76.0000      88.43104     154.530700
 
     40      43.000    64.5000      75.42647     119.387700
 
     60      61.000    61.0000      58.28409       7.376156
 
     80      70.000    52.5000      47.49074      25.092670
 
    120      86.000    43.0000      34.65541      69.632230
 
    TOTAL                                       1488.261000
 
                             JAPANESE TYPE
 
      T      R(MM)    I(MM/HR)     I(MM/HR)         V*V
 
      5      15.000   180.0000     170.13530      97.313220
 
     10      20.000   120.0000     127.82010      61.154060
 
     20      30.000    90.0000      94.55997      20.793370
 
     30      38.000    76.0000      78.82188       7.963030
 
     40      43.000    64.5000      69.12314      21.373410
 
     60      61.000    61.0000      57.29643      13.716440
 
     80      70.000    52.5000      50.07375       5.886673
 
    120      86.000    43.0000      41.33323       2.778125
 
    TOTAL                                        230.978300
 
 
                             SHERMAN TYPE
 
      T      R(MM)    I(MM/HR)     I(MM/HR)         V**V
 
      5      15.000   180.0000     168.64050     129.038200
 
     10      20.000   120.0000     125.00200      25.020300
 
     20      30.000    90.0000      92.65572       7.052827
 
     30      38.000    76.0000      77.76798       3.125762
 
     40      43.000    64.5000      68.67953      17.468510
 
     60      61.000    61.0000      57.64425      11.261070
 
     80      70.000    52.5000      50.90758       2.535797
 
    120      86.000    43.0000      42.72786        .074063
 
    TOTAL                                        195.576500
  
           *** AS BEST AS YOU CAN *** 
  
             ***PROGAMMED BY PROFESSOR,SUNG KI SUK***
 

   여기서 최적 강우강도식은 실측값과 계산값과의 편차의 자승을 계산하여 그 총화의 값이 가장 작은 것을 선택하면 된다. 
본 예제에서는 Sherman형인 I=338/(t**0.432)을 최적의 강우강도식으로 사용하면 된다.