Skip to content

Commit 9514c21

Browse files
Simulate Run-of-the-River (ROR) dams
- Introduced a conditional block that checks for ROR operation based on RULE = 0. - For ROR dams, FLOWOUT is set equal to FLOWIN, constrained by minimum environmental flow (Qmin). - Reservoir storage (VOL) is maintained constant. - Power generation (ENERGYPRO) is calculated using turbine flow and effective head (REALHEAD). - Reservoir water levels (HTK, HHO) are set to maximum operating head (HRESERMAX). This update allows users to represent non-storage dams by setting operation strategy (RULE = 0) in the reservoir parameter file.
1 parent 42c2dbe commit 9514c21

1 file changed

Lines changed: 25 additions & 5 deletions

File tree

routing/model/reservoir.f

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,9 @@ SUBROUTINE MAKE_CONVOLUTIONRS
990990
READ(25,*) ENV_FLOW(J,W) ! Read the percentage of environmental flow (% of maximum flow)
991991
READ(25,*)
992992
READ(25,*) RULE(J,W)
993+
IF (RULE(J,W) .EQ. 0) THEN ! run-of-the-river dam
994+
READ(25,*) Dummy
995+
END IF
993996
IF (RULE(J,W) .EQ. 1) THEN ! simplified rule curve
994997
READ(25,*) HMAX(J,W), HMIN(J,W), OP1(J,1,W),OP1(J,2,W)
995998
IF (HMAX(J,W) .LT. HMIN(J,W)) THEN
@@ -1337,6 +1340,27 @@ SUBROUTINE MAKE_CONVOLUTIONRS
13371340
ELSE
13381341
ENERGYPRO(J,I,W) = ENERGYPRO(J,I,W) *((HHO(J,I,W)+HHO(J,I+1,W))/2-(HRESERMAX(J,W)-REALHEAD(J,W)))/1000 ! this part is for hydropower production estimation, ignore if work with irrigation reservoirs
13391342
END IF
1343+
1344+
! Check for minimum environmental flow
1345+
IF (FLOWOUT(J,I,W) .LE. Qmin(J,I,W)) THEN
1346+
FLOWOUT(J,I,W) = Qmin(J,I,W)
1347+
END IF
1348+
1349+
! Set Hydrologic Budget (States & Fluxes) for ROR Dams (Run-of-the-River)
1350+
IF (RULE(J,W) .EQ. 0) THEN
1351+
print*,'RUN-OF-THE-RIVER (ROR) DAM........'
1352+
FLOWOUT(J,I,W) = FLOWIN(J,I,W)
1353+
IF (FLOWOUT(J,I,W) .LE. Qmin(J,I,W)) THEN
1354+
FLOWOUT(J,I,W) = Qmin(J,I,W)
1355+
END IF
1356+
FLOWOUT_TURB(J,I,W) = FLOWOUT(J,I,W)
1357+
VOL(J,I+1,W) = VRESER(J,W,I)
1358+
ENERGYPRO(J,I,W) = 0.9 * 9.81 * FLOWOUT(J,I,W)
1359+
ENERGYPRO(J,I,W) = ENERGYPRO(J,I,W) *(REALHEAD(J,W))/1000
1360+
HTK(J,I,W) = REALHEAD(J,W)
1361+
HHO(J,I,W)= HRESERMAX(J,W)
1362+
HHO(J,I+1,W)= HRESERMAX(J,W)
1363+
END IF
13401364
c xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
13411365
c STEP 6: Propagate water to the downstream reservoir, considering the time lag
13421366
c xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -1351,11 +1375,7 @@ SUBROUTINE MAKE_CONVOLUTIONRS
13511375
VRESER(J,W,I) = 0
13521376
REALHEAD(J,W) = 0
13531377
QRESER(J,W) = 0
1354-
FLOWOUT_TURB(J,I,W)=0.0
1355-
ELSE
1356-
IF (FLOWOUT(J,I,W) .LE. Qmin(J,I,W)) THEN
1357-
FLOWOUT(J,I,W) = Qmin(J,I,W)
1358-
END IF
1378+
FLOWOUT_TURB(J,I,W)=0.0
13591379
END IF
13601380

13611381
! Reading UH_R files for reservoirs

0 commit comments

Comments
 (0)