In [1]:

```
#Given
Na = 24.; #concentration of sodium ion
Ca = 3.6; #concentration of calcium ion
Mg = 2.; #concentration of magnesium ion
EC = 180.; #electrical conductivity
# Calculations
SAR = Na/(((Ca+Mg)/2)**(0.5)); #Sodium absorption ratio
SAR = round(SAR*100)/100;
# Results
print "SAR = %.2f."%(SAR);
print "Water falls under S2 class."; #from table 3.2
print "For EC = 180";
print "water falls under C1 class."; #from table 3.1
print "Water is medium sodium and low saline water.";
```

In [2]:

```
#Given
gammad = 15.; #dry weigth of soil
gammaw = 9.81; #unit weigth of water
Fc = 0.3; #field capacity
pwp = 0.08; #permanent wilting point
d = 0.8; #root zone depth
# Calculations
d1 = gammad*Fc*1000/gammaw;
d2 = gammad*pwp*1000/gammaw;
d3 = gammad*d*(Fc-pwp)*1000/gammaw;
# Results
print "Depth of moisture in root zone at field capacity = %.f mm/m."%(d1);
print "Depth of moisture in root zone at permanent wilting point = %.f mm/m."%(d2);
print "Depth of moisture available in root zone = %.f mm/m."%(d3);
```

In [3]:

```
#Given
gammad = 15.3; #dry weigth of soil
gammaw = 9.81; #unit weigth of water
Fc = 0.15; #field capacity
Mc = 0.08; #moisture content before irrigation
D = 60.; #Depth of water applied
# Calculations
d = (gammaw*D)/(gammad*(Fc-Mc));
# Results
print "Depth upto which soil profile is wetted = %.f mm."%(d);
```

In [4]:

```
#Given
Sg = 1.6; #Apparent specific gravity
Fc = 0.2; #Field capacity
M1 = 150.; #mass of sample soil
M2 = 136.; #mass of sample after drying
d = 0.9; #depth of soil to be irrigated
# Calculations
Mc = (M1-M2)/M2;
D = Sg*d*1000*(Fc-Mc);
# Results
print "Depth of water required to irrigate the soil = %.f mm."%(D);
```

In [5]:

```
#Given
d = 2.; #root zone depth
Wc = 0.05; #existing water content
gammad = 15; #dry density of soil
gammaw = 9.81; #unit weigth of water
Vw = 500. #water applied to the soil
Wl = 0.1; #water loss
A = 1000.; #area of plot
# Calculations
Vu = Vw*0.9; #volume of water used in soil
Wu = Vu*gammaw; #weigth of water used in soil
Ws = A*d*gammad; #total dry weigth of soil
Wa = Wu*100/Ws; #percent water added
Fc = Wc*100+Wa;
Fc = round(Fc*100)/100;
# Results
print "The Field Capacity of soil is = %.2f percent."%(Fc);
```

In [6]:

```
#Given
Fc = 0.22; #Field Capacity
wc = 0.1; #wilting coefficient
gammad = 15.; #dry unit weigth of soil
gammaw = 9.81; #unit wiegth of water
d = 0.7; #root zone depth
w = 0.14; #falled moisture content
E = 0.75; #water application efficiency
# Calculations
SC = gammad*d*(Fc-wc)*100/gammaw;
D = gammad*d*(Fc-w)*1000/gammaw;
FIR = D/E; #Field irrigation requirement
SC = round(SC*10)/10;
D = round(D);
FIR = round(FIR)+1;
# Results
print "Maximum storage capacity of soil = %.2f cm."%(SC);
print "Water depth required to be applied = %.2f mm"%(D);
print "Field Irrigation Requirement = %.2f mm"%(FIR);
```

In [7]:

```
#Given
Fc = 0.27; #Field capacity
pwp = 0.14; #permanent wilting point
gammad = 15.; #dry density of soil
gammaw = 9.81; #unit weigth of water
d = 0.75; #effective depth of root zone
Du = 11.; #daily consumptive use of water
# Calculations
Am = Fc-pwp; #Available moisture
#let readily available moisture be 80 percent of available moisture
RAm = 0.8*Am;
Mo = Fc-RAm;
D = gammad*d*(Fc-Mo)*100/gammaw;
WF = D*10/Du;
# Results
print "Watering Frequency = %i days."%(WF);
```

In [8]:

```
#Given
Fc = 0.22; #Field capacity
Sg = 1.56; #Apparent specific gravity
d = 0.6; #root zone depth
#irrigation is started when 70 percent of moisture is used
l = 250.; #length of field
b = 40.; #width of field
q = 20.; #Discharge
# Calculations
m = (1-0.7)*Fc;
D = Sg*d*(Fc-m)*1000;
A = l*b;
t = A*D/(q*3600);
D = round(D);
t = round(t);
# Results
print "Net depth of irrigation water required = %.2f mm."%(D);
print "Time required to irrigate field = %.2f hours."%(t);
```

In [9]:

```
#Given
B = 110.; #Base period
D = 1400.; #Duty of water
# Calculations
delta = 8.64*B*100/D;
delta = round(delta);
# Results
print "Delta for crop is = %.2f cm."%(delta);
```

In [10]:

```
#Given
B = 120.; #Base period
delta = 92.; #total depth requirement of crop
# Calculations
D = 8.64*B*100/delta;
# Results
print "Duty of water = %.2f hectares/cumec."%(D);
```

In [11]:

```
#Given
Cr = 2.; #crop ratio
A = 80000.; #Area of field
CI = 85.; #percent field culturable irrigable
IK = 30.; #irrigation intensity during kharif season
IR = 60.; #irrigation intensity for rabi season
DuK = 800.; #Duty of water for kharif season
DuR = 1700.; #Duty of water for rabi season
# Calculations
CIA = A*CI/100; #Culturable irrigable area
AK = CIA*IK/100; #Area under kharif season
AR = CIA*IR/100; #Area under rabi season
DK = AK/DuK;
DR = AR/DuR;
# Results
print "Dischage required at head of canal during Kharif season = %.2f cumecs."%(DK);
print "Dischage required at head of canal during Rabi season = %.2f cumecs."%(DR);
print "Water requirement during kharif is greater than during rabi season";
print "Hence,canal should be designed to carry discharge of %.2f cumecs."%(DK);
```

In [12]:

```
#Given
CA = 2600.; #culturable area
IS = 20.; #irrigation intensity for sugarcane
IR = 40.; #irrigation intensity for rice
DuS = 750.; #Duty of water for sugarcane
DuR = 1800.; #Duty of water for rice
PK = 1.2; #Peak demand
# Calculations
AS = CA*IS/100; #Area under sugarcane
AR = CA*IR/100; #Area under rice
DS = AS/DuS;
DR = AR/DuR;
DT = DS+DR;
DD = PK*DT-0.005333+0.01;
DR = round(DR*1000)/1000;
DT = round(DT*1000)/1000;
# Results
print "Water required for Rice = %.2f cumecs."%(DR);
print " Sugarcane is a perennial crop.";
print "Hence,Water required for Sugarcane = %.2f cumecs."%(DT);
print "Design dischage to meet the peak demand = %.2f cumecs."%(DD);
```

In [13]:

```
#Given
ql = 20.; #discharge in left branch
Al = 20000.; #culturable area in left branch
Bl = 120.; #Base period in left branch
Il = 0.8; #intensity of rabi in left branch
qr = 8.; #discharge in rigth branch
Ar = 12000.; #culturable area in rigth branch
Br = 120.; #Base period in rigth branch
Ir = 0.5; #intensity of rabi in rigth branch
# Calculations and Results
#for left canal
ARl = Al*Il;
Dl = ARl/ql;
print "Duty for left canal is = %i hectares/cumecs."%(Dl);
#for rigth canal
ARr = Ar*Ir;
Dr = ARr/qr;
print "Duty for left canal is = %i hectares/cumecs."%(Dr);
print "Since,left canal has higher duty,it is more efficient";
```

In [14]:

```
#Given
CA = 1200.; #culturable area
IA = 0.4; #intensity of irrigation of crop A
IB = 0.35; #intensity of irrigation of crop B
bA = 20.; #kor period of crop A
bB = 15.; #kor period of crop B
deltaA = 0.1; #kor depth of crop A
deltaB = 0.16; #kor depth of crop B
# Calculations and Results
#crop A
A = CA*IA;
Du = 8.64*bA/deltaA;
qA = A/Du;
qA = round(qA*1000)/1000;
print "Discharge required for crop A = %.2f cumec."%(qA);
#crop B
A = CA*IB;
Du = 8.64*bB/deltaB;
qB = A/Du;
qB = round(qB*1000)/1000;
print "Discharge required for crop B = %.2f cumec."%(qB);
D = qA+qB;
D = round(D*10)/10;
print "Design discharge of water course = %.2f cumec."%(D);
```

In [15]:

```
#Given
B = 12.; #transplantaion period
D = 0.5; #total depth of water required by the crop
R = 0.1; #rain falling on field
L = 0.2; #loss of water
A = 600.; #irrigated area
I = 0.6; #intensity of irrigation
delta = D-R;
Dui = 8.64*B/delta;
# Calculations and Results
#math.since water loss is 20 percent
Du = (1-L)*Dui;
print "Duty of water required = %.2f hectares/cumec."%(Du);
TA = I*A;
q = TA/Du;
q = round(q*100)/100;
print "Discharge at head of water course = %.2f cumecs."%(q);
```

In [16]:

```
import math
#Given
CF = 0.8; #Capacity factory
Tf = 13./20; #time factor
A = [850., 120., 600., 500., 360.];
#Given values of area
B = [320., 90., 120., 120., 120.];
#Given values of Base period
D = [580., 580., 1600. ,2000., 600.];
#Given values of duty at head canal
# Calculations and Results
DS = A[0]/D[0]; #discharge for sugarcane
DOS = A[1]/D[1]; #discharge for overlap sugarcane
DW = A[2]/D[2]; #discharge for wheat
DB = A[3]/D[3]; #discharge for bajri
DV = A[4]/D[4]; #discharge for vegetables
DR = DS+DW;
DM = DS+DB;
DH = DS+DOS+DV;
print "Maximum demand is in hot weather";
q = DH/Tf;
D = q/CF;
q = round(1000*q)/1000;
D = round(100*D)/100;
print "Full supply discharge at head = %.2f cumecs"%(q);
print "Design discharge = %.2f cumecs."%(D);
```

In [17]:

```
import math
from numpy import zeros
#Given
CL = 0.2; #Canal loss
RL = 0.12; #Reservior loss
A = [4800., 5600., 2400., 3200., 1400];
#Given values of area under crop
D = [1800., 800., 1400., 900., 700];
#Given values of duty at field
B = [120., 360., 200., 120., 120];
#Given values of base period
# Calculations and Results
#(a) Wheat
d = A[0]/D[0];
V1 = d*B[0];
#(b) Sugarcane
d = A[1]/D[1];
V2 = d*B[1];
#(c) Cotton
d = A[2]/D[2];
V3 = round(d*B[2]);
#(d) Rice
d = A[3]/D[3];
V4 = round(d*B[3]);
#(e) vegetables
d = A[4]/D[4];
V5 = d*B[4];
Vd = (V1+V2+V3+V4+V5)*8.64;
SC = Vd/((1-CL)*(1-RL));
print "Reservior capacity = %.2f hectare-metres."%(SC);
#Alternative method
delta = zeros(5)
for i in range(5):
delta[i] = 8.64*B[i]/D[i];
V = zeros(5)
for j in range(5):
V[j] = A[j]*delta[j];
s = 0;
for k in range(5):
s = s+V[k];
SC = s/((1-CL)*(1-RL));
print " By Alternative method.Storage capacity = %.f hectare-metres."%(SC);
```

In [18]:

```
import math
from numpy import zeros
#Given
eita = 0.7; #water application efficiency
k = 0.75; #crop factor
T = [19., 16., 12.,.5, 13.];
#Given values of temperature
p = [7.19 ,7.15, 7.30, 7.03]; #daytime hours of the year
RD = 1.2; #rainfall in december
RJ = 0.8; #rainfall in january
f = zeros(4)
for i in range(4):
f[i] = p[i]*(1.8*T[i]+32)/40;
s = 0;
for i in range(4):
s = s+f[i];
C = k*s;
R = RD+RJ;
CIR = C-R;
FIR = CIR/eita;
C = round(10*C)/10;
CIR = round(CIR*10)/10;
FIR = round(FIR*10)/10;
# Results
print "Consumptive use = %.2f cm."%(C);
print "consumptive irrigatin requirement = %.2f cm."%(CIR);
print "field irrigatio reqiurement = %.2f cm."%(FIR);
```

In [19]:

```
import math
#Given
L = 20.; #latitude of place(degree North)
T = 15.; #mean monthly temperature(degree celcius)
RH = 0.5; #relative humidity
E = 250.; #elevation of area
V = 25.; #wind velocity at 2 m heigth
#from table 3.10
VP = 12.79; #saturation vapour pressure
s = 0.8; #slope of curve between vapur pressure and temperature
#from table 3.11
R = 10.8;
#from table 3.12
N = 11.1;
#from table 3.9
n = 7.74;
# Calculations
p = n/N;
e = VP*RH;
Ea = 0.002187*(160+V)*(VP-e);
r = 0.2;
alpha = 0.49;
sigma = 2.01E-9;
Ta = 293;
H = R*(1-r)*(0.29*math.cos(math.pi/9)+0.55*p)-sigma*Ta**4*(0.56-0.092*e**0.5)*(0.10+0.9*p);
Et = (s*H+alpha*Ea)*31/(s+alpha);
Et = round(Et*10)/10;
# Results
print "consumptive use of rice in january = %.2f mm of water."%(Et);
```

In [20]:

```
import math
#Given
Fc = 0.27; #Field capacity
pwp = 0.13; #permanent wilting point
d = 80.; #depth of soil(cm)
gammad = 1.5; #dry unit weigth of soil(g/cc)
gammaw = 1.; #unit weigth of water(g/cc)
M = 0.18; #avearge soil moisture
eita = 0.8; #field efficiency
FC = 0.15; #field channel
# Calculations
SC = gammad*d*(Fc-pwp)/gammaw;
D = gammad*d*(Fc-M)/gammaw;
FIR = D/eita;
W = FIR/(1-FC);
W = round(W*10)/10;
# Results
print "maximum storage capacity = %.2f cm"%(SC);
print "depth of irrigation water = %.2f cm"%(D);
print "field irrigation requirement = %.2f cm"%(FIR);
print "water required at canal outlet = %.2f cm"%(W);
```

In [22]:

```
import math
from numpy import zeros
#Given
W = 0.4; #amount of water available from precipitation
Cl = 0.15; #Channel loss
RL = 0.1; #reservior loss
B = [120., 320., 120., 200., 100]; #Base period
D = [1800., 800., 900., 1400., 1200]; #Duty at field
A = [500., 600., 300., 1200., 500]; #Area under crop
# Calculations
for i in range(5):
delta[i] = 8.64*B[i]/D[i];
V = zeros(5)
for i in range(5):
V[i] = delta[i]*A[i];
s = 0;
for i in range(5):
s = s+V[i];
C = s*(1-W)/((1-Cl)*(1-RL));
# Results
print "Reservior capacity = %.f ha-m."%(C);
```

In [23]:

```
#Given
GCA = 10000.; #gross commanded area
CCA = 0.75*GCA; #Culturable commanded area
IR = 0.6; #intensity of irrigation during rabi season
IK = 0.3; #intensity of irrigation during kharif season
DuR = 2500.; #duty during rabi season
DuK = 1000.; #duty during kharif season
# Calculations
AR = IR*CCA; #area under irrigation in rabi season
AK = IK*CCA; #area under irrigation in kharif season
DR = AR/DuR;
DK = AK/DuK;
# Results
print "discharge required at head of distributory = %.2f cumecs."%(DK);
```

In [24]:

```
import math
#Given
Fc = 0.18; #field capacity
wc = 0.07; #wilting cofficient
Sg = 1.35; #bulk density of soil
d = 1.2; #root zone depth
# Calculations and Results
m = Fc-wc;
mo = wc+m/3;
dw = 100*Sg*d*(Fc-mo);
print "Depth of water required = %.2f cm"%(dw);
ev1 = 1.1; #average evapotranspiration rates in 1 NOV-30 NOV
ev2 = 1.7; #average evapotranspiration rates in 1 DEC-31 DEC
ev3 = 2.4; #average evapotranspiration rates in 1 JAN-31 JAN
ev4 = 1.5; #average evapotranspiration rates in 1 FEB-28 FEB
ev5 = 3.5; #average evapotranspiration rates in 1 MAR-25 MAR
#irrigation requirement from 1 NOV to 3 JAn
dev = (ev1*30+ev2*31+ev3*3)/10;
print "Water consumed by evapotranspiration = %.2f cm."%(dev);
print "No water is required during 1 NOV-3 JAN";
#irrigation requirement after 3rd JAN
ws = (ev3-1.5)*16/10; #water consumed from soil from 4 JAN-19 JAN
ts = ws+dev; #water withdrawn from soil from 1 NOV-19 JAN
s = (dw-ts)*10;
day = s/ev3;
depth = ts+(4*ev3)/10+(2*ev3)/10;
print "depth of water required in first irrigation = %.2f cm."%(depth);
#/irrigation requirement from 26 JAn to 25 MAR
w1 = ev3*6;
w2 = ev4*28;
w3 = ev5*25;
W = w1+w2+w3;
x = (dw*10-(14.4+42))/ev5;
print "Hence second irrigation is required after %.2f days i.e on 18th March."%(x);
depth1 = (W-(dw*10))/10;
print "required water depth = %.2f cm"%(depth1);
print "First Watering on 29 JAn and 30 JAN = %.2f cm.Second watering required on 18th March = %.2f cm."%(depth,depth1);
```

In [25]:

```
#Given
Fc = 0.26; #Field capacity of soil
A = 3000.; #Area of field
OM = 0.12; #optimum moisture
pwp = 0.1; #permanent wilting point
d = 80.; #depth of root zone
RD = 1.4; #relative density of soil
f = 10.; #frequency of irrigation
eita = 0.23; #overall efficiency
# Calculations
D = RD*d*(Fc-OM);
U = D*10/f;
Wr = A*D*100;
q = Wr/(f*24*3600);
q = round(q*100)/100;
# Results
print "daily consumptive = %.2f mm."%(U);
print "discharge in canal = %.2f q cumecs."%(q);
```

In [26]:

```
#Given
C1 = 0.2; #consumptive requirement of crop for 1 to 15 days
C2 = 0.3; #consumptive requirement of crop for 16 to 40 days
C3 = 0.5; #consumptive requirement of crop for 41 to 50 days
C4 = 0.1; #consumptive requirement of crop for 51 to 55 days
A = 50.; #area of land
wr = 5.; #presowing water requirement
R = 3.5; #rainfall during 36th and 45th day
# Calculations
w1 = 15*C1*100;
w2 = 25*C2*100;
w3 = 10*C3*100;
w4 = 5*C4*100;
w5 = 5*100;
W = w1+w2+w3+w4+w5;
ER = 3.5*100;
q = (W-ER)*A;
# Results
print "total water to be delivered = %i cubic metre."%(q);
```

In [27]:

```
#Given
Fc = 0.3; #field capacity
pwp = 0.11; #permanent wilting percent
gammad = 1300.; #density of soil
gammaw = 1000.; #density of water
d = 700.; #root zone depth
CW = 12.; #daily consumptive use of water
# Calculations
WHC = Fc-pwp;
mo = Fc-(0.75*WHC);
D = gammad*d*(Fc-mo)/gammaw;
I = D/CW;
# Results
print " watering interval = %i days"%(I);
```

In [28]:

```
#Given
A = 1000.; #total area
AI = 0.7*A; #area under irrigation
B = 15.; #Base period
d = 500.; #depth of water required during transplantation
R = 120.; #useful rain falling
Wl = 0.2; #water loss
# Calculations
delta = d-R;
Du = 8.64*B*1000/delta;
DuH = Du*(1-Wl);
q = AI/DuH;
q = round(q*100)/100;
# Results
print "Duty of water = %i hec/cumec."%(Du);
print "discharge required in water course = %.2f cumecs."%(q);
```

In [29]:

```
from numpy import zeros
#Given
Ar = 4000.; #culturable commanded area
CL = 0.25; #canal loss
RL = 0.15; #reservior loss
B = [120., 360., 180., 120., 120.]; #base period
D = [1800., 1700., 1400., 800., 700.]; #duty of water
I = [20., 20., 10., 15., 15.]; #intensity of irrigation
A = zeros(5)
# Calculations
for i in range(5):
A[i] = Ar*I[i]/10; #area under crop
Q = zeros(5)
for i in range(5):
Q[i] = A[i]/D[i]; #discharge required
for i in range(5):
V[i] = 8.64E4*Q[i]*B[i]; #quantity of water
s = 0;
for i in range(5):
s = s+V[i];
SC = round(s/((1-CL)*(1-RL)*1000000));
# Results
print "Storage capacity = %iD+06 cubic metre."%(SC);
```