You are on page 1of 2

1 2.7 5 8 9.8 9 7.5 6.3 5 4 2.9 2.1 1.3 0.

5 0 0
0 0 0]; // 2 hr s u n i t hydrograph
8 mprintf (" o r d i n a t e s o f 6 hr s u n i t hydrograph ");
9 for i =1:18
10 O1(i+2)=R(i);
11
12
13 end
14 for i =1:16
15 O2(i+4)=R(i);
16 end // o f f s e t u n i t
hydrograph
17 for i =1:20
18 S(i)=O1(i)+O2(i)+R(i); //sum
19 f(i)=S(i) /3; // o r d i n a t e s o f 6
hr s u n i t hydrograph
20 f(i)= round (f(i) *10) /10;
21 mprintf ("nn%f" ,f(i));
22 end
Scilab code Exa 4.31 EX4 31
1
2
3 // example 4 . 3 1
4 // c a l c u l a t e o r d i n a t e o f 9 hr u n i t hydrograph
5 clc ; funcprot (0) ;
6 // g i v e n
7 t =[0:3:45]; // t ime
8 O =[0 9 20 35 49 43 35 28 22 17 12 9 6 3 0 0];
// o r d i n a t e o f 2 hr u n i t hydrograph
9 of (1) =0;
10 of (2) =0;
11 for i =3:16
12 of(i)=O(i -2) +of(i -2) ; // o f f s e t
92
o r d i n a t e
13 end
14 for i =1:16
15 s(i)=O(i)+of(i); // o r d i n a t e
o f s??curve
16 end
17 of1 (3) =0;
18 for i =4:16
19 of1 (i)=s(i -3) ; // o f f s e t
o f s??curve
20 end
21 mprintf (" o r d i n a t e s o f 9 hr s u n i t hydrograph : ");
22 for i =1:16
23 y(i)=s(i)-of1 (i);
24 u(i)=2*y(i) /3; //
o r d i n a t e o f 9 hr s u n i t hydrograph
25 u(i)= round (u(i) *10) /10;
26 mprintf ("nn%f" ,u(i));
27 end
Scilab code Exa 4.32 EX4 32
1
2
3 // example 4 . 3 2
4 // c a l c u l a t e r e c u r r e n c e i n t e r v a l o f f l o o d u s i n g
5 // c a l i f o r n i a method
6 //Hazens method
7 // gumbel s method
8 clc ; funcprot (0) ;
9 // g i v e n
10 q =[9200 7800 6600 5800 5260 4980 4525 3810 3630 3250
3110 3090 2380 2390 1723]; // Di s c h a r g e a r r ang ed
i n d e c r e a s i n g o r d e r
11 N =15;
93
12 C =0.3;
13 m =[1:1:15];
14 C =[0.3 0.44 0.52 0.57 0.61 0.66 0.7 0.74 0.78 0.82
0.86 0.88 0.94 0.96 1]; // f rom t a b l e 4 . 2 5
15 mprintf (" C a l i f o r n i a Hazen Gumbel")
;
16 for i =1:15
17 Ca(i)=N/m(i);
18 H(i)=2*N /(2* m(i) -1);
19 G(i)=N/(m(i)+C(i) -1);
20 Ca(i)= round (Ca(i) *100) /100;
21 G(i)= round (G(i) *100) /100;
22 H(i)= round (H(i) *100) /100;
23 mprintf ("nn%f %f %f" ,Ca(i),H(i
),G(i));
24 end
Scilab code Exa 4.33 EX4 33
1
2
3 // example 4 . 3 3
4 // c a l c u l a t e f l o o d magni tude wi th r e t u r n p e r i o d o f
240 y e a r s
5 clc ; funcprot (0) ;
6 // g i v e n
7 T1 =40; T2 =80; // Return p e r i o d
8 F1 =27000; F2 =31000; //Peak f l o o d
9 y80 = -(2.303* log10 (2.303* log10 (T2 /(T2 -1) )));
10 y40 = -(2.303* log10 (2.303* log10 (T1 /(T1 -1) )));
11 y=(F2 -F1)/( y80 -y40);
12 T =240;
13 y240 = -(2.303* log10 (2.303* log10 (T/(T -1))));
14 x240 =F2 +( y240 -y80)*y;
15 mprintf (" f l o o d magni tude wi th r e t u r n p e r i o d o f 240
94
y e a r s=%i cumec . " ,x240 );
Scilab code

You might also like