Skip to content

Commit bf7ccaa

Browse files
authored
Update unit_hyd_routines.f
1 parent a26dc09 commit bf7ccaa

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Routing/SourceCode/unit_hyd_routines.f

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ SUBROUTINE MAKE_GRID_UH
5151
& (DIREC, NOB, UH_DAY, TMAX, PI, PJ, LE, UH_DAILY, KE,
5252
& CATCHIJ, UHM, FR, PMAX, NCOL, NROW, UH_BOX,
5353
& UH_S, UH_STRING, NAME5,NORESERVOIRS, RESER,
54-
& RESERNAME,RES_DIRECT)
54+
& RESERNAME,RES_DIRECT,LAST)
5555
IMPLICIT NONE
56-
INTEGER UH_DAY, TMAX, PMAX, KE
56+
INTEGER UH_DAY, TMAX, PMAX, KE, LAST
5757
INTEGER NOB(200)
5858
INTEGER PI, PJ, LE, NCOL, NROW
5959
INTEGER DIREC(NCOL,NROW,2)
@@ -76,6 +76,9 @@ SUBROUTINE MAKE_GRID_UH
7676
RESORDER = I
7777
END IF
7878
END DO
79+
IF (LAST .EQ. 1) THEN
80+
RESORDER = NORESERVOIRS
81+
END IF
7982
IF (UH_STRING(1:4) .ne. 'NONE') THEN ! read UH_S grid, not make it
8083
print*, 'reading UH_S grid from file'
8184
open(98, file=UH_STRING, status='old')

0 commit comments

Comments
 (0)