[pcr] Modelling weirs
Russell, B.R.S.
B.R.S.Russell at students.uu.nl
Fri Apr 15 15:12:37 CEST 2005
Dear All.
I am experiencing some difficulty overcoming a problem with the accu-flux operations.
The problem is that I am simulating an interbasin transfer which occurs from Oct - Mar. During this period
the water is stored within a reservoir (out flow controlled by a weir) before being released for
irrigation from April - Sept. Further downstream water is removed for irrigation during April - Sept. The extraction
for irrigation is simulated using 'accuthresholdflux/state' with the volume diverted as the threshold.
A boolean on-off function would be the easiest option. If 'weir' eq 1 then .... (weir allows all flow downstream). But it would be better for simulating changes in the reservoir operation if a time series of water volumes released through the weir cell could be used.
so..
1 100000
2 100000
3 100000
4 6900000mm
5 7900000mm
......
The timeseries would determine the capacity to be allowed through the weir cell (also if there is ZERO capacity will that affectively stop flow downstream from that cell?). This makes me think that two accu-flux functions need to be used. One for irrigation downstream and one for the weir operation upstream.
BUT opening the weir and the irrigation extraction occur in the same time steps. So... Can you use capacity and threshold concurrently on two sections of the river? If not is there a solution to this weir operation?
The model scripts are below for your reference. The first is with weir operation. The second is without the weir operation.
Many thanks for any advice you can offer.
Bobby
# Model for the calculation of stream discharge in Konya Basin and Tuz Basin WITH WEIR OPERATION.
# Timestep one month
# Period 1976 - 1995
binding
# dynamic inputs
RainTss = rain.tss;
TempTss = temp.tss;
IrriTSS = irri.tss;
weirswitch = bweirswitch.tss; # boolean on / off
weirTSS = beysehirweir.tss; # discharge timeseries shown above
BlueTSS = bluetunnel6.tss; # interbasin transfer timeseries
# static inputs
Stop = 240;
Meltfactor = 1.8;
RC = rc.map;
C = c.map;
LDDmap = ldddef.map;
Stations = stations.map;
Zone = meteozonekrs.map;
Daylength = daylen.txt;
EvapStat = evapst.map;
btmap = blue1.map;
weirmap = weir.map; # location of weir
Locmap = location.map;
MaxSoilStor = soilstormax.map;
AreaOfCell = 1000000;
SecondsPerDay = 86400;
DaysOfMonth = days.txt;
# outputs
TotalDisc = totdis;
TotalDisTSS = totdis.tss;
TotalDischarge = disc0000;
areamap
clone.map;
timer
1 Stop 1;
# tstart tend dt
initial
Snow = snowinit.map;
SoilStor = soilstorinit.map;
GwStor = gwstorinit.map;
dynamic
# Input precipitation (mm) and temperature (oC * 10) (1)
Rain = timeinputscalar(RainTss, Zone);
Temp = timeinputscalar(TempTss, Zone);
# Snow or rain (mm)(2)
SnowNew = if ((Temp/10) lt 0 then Rain else 0);
Snow = Snow + SnowNew;
Rain = Rain - SnowNew;
# Snowmelt (mm) (3)
PotSnowMelt = if ((Temp/10) ge 0 then Meltfactor * Temp else 0);
SnowMelt = min(Snow, PotSnowMelt);
Snow = Snow - SnowMelt;
# Evapotranspiration (mm) (4)
Epot = if (Temp gt 0 then (16*(Temp/i.map)**a.map)*lookupscalar(Daylength, time() mod 12) else 0);
epot.tss = timeoutput (EvapStat, Epot);
ETpot = Epot * lookupscalar (cf.tbl, cf.map);
Peff = Rain + SnowMelt - ETpot;
PS = min (Peff, 0);
# Soil & lake storage (mm) (5)
SoilStor = if (Peff gt 0 then SoilStor + Peff else max (SoilStor + PS, 0));
# Surface runoff (mm) (6)
Runoff = if (SoilStor ge MaxSoilStor then SoilStor - MaxSoilStor else 0);
ro.tss = timeoutput (Stations, Runoff);
SoilStor = SoilStor - Runoff;
# Groundwater recharge (mm) (7)
GWre = RC * SoilStor;
SoilStor = SoilStor - GWre;
# Groundwater storage (mm) (8)
GwStor = max (GwStor + GWre, 0);
# Delayed runoff (mm) (9)
BaseFlow = GwStor/C;
GwStor = GwStor - BaseFlow;
bf.tss = timeoutput (Stations, BaseFlow);
# Water input via BlueTunnel (mm) (10)
Btinput = timeinputscalar (BlueTSS, btmap);
Btinput = cover (Btinput,cover.map);
# Beysehir Weir Operation (either boolean or scalar) (mm) (11)
Weir = timeinputscalar (weirswitch, weirmap);
Weir = cover (Weir,cover.map);
# Water diversion for irrigation (mm) (12)
Div = timeinputscalar(IrriTSS, Locmap);
Div = cover (Div,cover.map);
# Total discharge (m3) including water diversion for irrigation (13)
Discharge = Runoff + BaseFlow + Btinput;
DisCubic = (Discharge/1000)*AreaOfCell;
report TotalDischarge, Rest = if ((Weir) eq 1) then (accucapcityflux, accucapacitystate (LDDmap,DisCubic,????)) else (accuthresholdflux, accuthresholdstate (LDDmap,DisCubic,Div));
report TotalDisTSS = timeoutput(Stations, (TotalDischarge / (lookupscalar(DaysOfMonth, time() mod 12)*SecondsPerDay)));
# Amount of water in storages after model run (mm) (14)
report snowinit.map = Snow;
report soilstorinit.map = SoilStor;
report gwstorinit.map = GwStor;
# Model for the calculation of stream discharge in Konya Basin and Tuz Basin WITHOUT WEIR OPERATION
# Timestep one month
# Period 1976 - 1995
binding
# dynamic inputs
RainTss = rain.tss;
TempTss = temp.tss;
IrriTSS = irri50.tss;
BlueTSS = bluetunnelS6.tss;
# static inputs
Stop = 240;
Meltfactor = 1.8;
RC = rc.map;
C = c.map;
LDDmap = ldddef.map;
Stations = stations.map;
Zone = meteozonekrs.map;
Daylength = daylen.txt;
EvapStat = evapst.map;
btmap = blue1.map;
Locmap = location.map;
MaxSoilStor = soilstormax.map;
AreaOfCell = 1000000;
SecondsPerDay = 86400;
DaysOfMonth = days.txt;
# outputs
TotalDisc = totdis;
TotalDisTSS = totdis.tss;
TotalDischarge = disc0000;
areamap
clone.map;
timer
1 Stop 1;
# tstart tend dt
initial
Snow = snowinit.map;
SoilStor = soilstorinit.map;
GwStor = gwstorinit.map;
dynamic
# Input precipitation (mm) and temperature (oC * 10) (1)
Rain = timeinputscalar(RainTss, Zone);
Temp = timeinputscalar(TempTss, Zone);
# Snow or rain (mm)(2)
SnowNew = if ((Temp/10) lt 0 then Rain else 0);
Snow = Snow + SnowNew;
Rain = Rain - SnowNew;
# Snowmelt (mm) (3)
PotSnowMelt = if ((Temp/10) ge 0 then Meltfactor * Temp else 0);
SnowMelt = min(Snow, PotSnowMelt);
Snow = Snow - SnowMelt;
# Evapotranspiration (mm) (4)
Epot = if (Temp gt 0 then (16*(Temp/i.map)**a.map)*lookupscalar(Daylength, time() mod 12) else 0);
epot.tss = timeoutput (EvapStat, Epot);
ETpot = Epot * lookupscalar (cf.tbl, cf.map);
Peff = Rain + SnowMelt - ETpot;
PS = min (Peff, 0);
# Soil & lake storage (mm) (5)
SoilStor = if (Peff gt 0 then SoilStor + Peff else max (SoilStor + PS, 0));
# Surface runoff (mm) (6)
Runoff = if (SoilStor ge MaxSoilStor then SoilStor - MaxSoilStor else 0);
ro.tss = timeoutput (Stations, Runoff);
SoilStor = SoilStor - Runoff;
# Groundwater recharge (mm) (7)
GWre = RC * SoilStor;
SoilStor = SoilStor - GWre;
# Groundwater storage (mm) (8)
GwStor = max (GwStor + GWre, 0);
# Delayed runoff (mm) (9)
BaseFlow = GwStor/C;
GwStor = GwStor - BaseFlow;
bf.tss = timeoutput (Stations, BaseFlow);
# Water input via BlueTunnel (mm) (10)
Btinput = timeinputscalar (BlueTSS, btmap);
Btinput = cover (Btinput,cover.map);
# Water diversion for irrigation (mm) (11)
Div = timeinputscalar(IrriTSS, Locmap);
Div = cover (Div,cover.map);
# Total discharge (m3) including water diversion for irrigation (12)
Discharge = Runoff + BaseFlow + Btinput;
DisCubic = (Discharge/1000)*AreaOfCell;
report TotalDischarge, Rest = accuthresholdflux, accuthresholdstate (LDDmap,DisCubic,Div);
report TotalDisTSS = timeoutput(Stations, (TotalDischarge / (lookupscalar(DaysOfMonth, time() mod 12)*SecondsPerDay)));
# Amount of water in storages after model run (mm) (13)
report snowinit.map = Snow;
report soilstorinit.map = SoilStor;
report gwstorinit.map = GwStor;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.geo.uu.nl/pipermail/pcraster-info/attachments/20050415/1f766623/attachment.htm
More information about the pcraster-info
mailing list