Skip to content

Commit 5e892f4

Browse files
committed
Update to 2012Rev670
1 parent 6225b66 commit 5e892f4

File tree

262 files changed

+2399
-1970
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+2399
-1970
lines changed

VERSIONS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
VERSION_MAJOR 2012
2-
VERSION_MINOR 664
2+
VERSION_MINOR 670
33
VERSION_PATCH

src/HQDAV.f90

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
SUBROUTINE HQDAV(A,CBW,QQ,SSS,ZCH,ZX,CHW,FPW,jrch)
2+
! adopted from APEX1501 by Jaehak Jeong 2017
3+
! THIS SUBPROGRAM COMPUTES FLOW AREA AND DEPTH GIVEN RATE in a reach
4+
5+
USE PARM
6+
7+
real*8, intent (in out) :: A, ZX, CHW, FPW
8+
real*8, intent (in) :: CBW, QQ, SSS, ZCH
9+
integer, intent (in) :: jrch
10+
11+
real*8:: RFPW, RFPX
12+
ZX=.5*ZCH
13+
RFPW = ch_w(2,jrch) * 4. !width of floodplain
14+
RFPX = SQRT(ch_s(2,jrch)) * RFPW / ch_n(1,jrch)
15+
16+
DO IT=1,10
17+
IF(QQ>QCAP(jrch))THEN
18+
ZX=MAX(ZX,ZCH)
19+
ZZ=ZX-ZCH
20+
!COMPUTE CH FLOW ABOVE QCAP
21+
ACH=CHXA(jrch)+ZZ*ch_w(2,jrch)
22+
R=ACH/CHXP(jrch)
23+
QCH=ACH*R**.66667*RCHX(jrch)
24+
CHW=ch_w(2,jrch)
25+
!COMPUTE FP FLOW
26+
AFP=ZZ*(RFPW-ch_w(2,jrch))
27+
QFP=AFP*ZZ**.66667*RFPX/RFPW
28+
Q=QCH+QFP
29+
A=ACH+AFP
30+
FPW=RFPW
31+
NBCF=1
32+
ELSE
33+
X1=ZX*RCSS(jrch)
34+
A=ZX*(CBW+X1)
35+
P=CBW+2.*SSS*ZX
36+
Q=A**1.66667*RCHX(jrch)/P**.66667
37+
CHW=CBW+2.*X1
38+
FPW=0.
39+
NBCX=1
40+
END IF
41+
FU=Q-QQ
42+
X6=MAX(1.,QQ)
43+
IF(ABS(FU/X6)<.001)EXIT
44+
IF(IT==1)THEN
45+
DFQ=-.1*ZX
46+
ELSE
47+
DFDZ=(FU-FU1)/(ZX-ZX1)
48+
DFQ=FU/DFDZ
49+
END IF
50+
FU1=FU
51+
ZX1=ZX
52+
ZX=ZX-DFQ
53+
END DO
54+
RETURN
55+
END

src/NCsed_leach.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ subroutine orgncswat2(iwave)
5454

5555
integer, intent (in) :: iwave
5656
integer :: j
57-
real :: xx, wt1, er, conc
58-
real :: sol_mass, QBC, VBC, YBC, YOC, YW, TOT, YEW, X1, PRMT_21, PRMT_44
59-
real :: DK, V, X3, CO, CS, perc_clyr, latc_clyr
57+
real*8 :: xx, wt1, er, conc
58+
real*8 :: sol_mass, QBC, VBC, YBC, YOC, YW, TOT, YEW, X1, PRMT_21, PRMT_44
59+
real*8 :: DK, V, X3, CO, CS, perc_clyr, latc_clyr
6060
integer :: k
6161
latc_clyr = 0.
6262

src/addh.f

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ subroutine addh
6969

7070
!! add hydrograph points (hourly time step)
7171
if (ievent > 0) then
72-
! do kk = 1, 24
7372
do kk = 1, nstep ! modified for urban modeling by J.Jeong 4/15/2008
7473
if (hhvaroute(2,inum1,kk) + hhvaroute(2,inum2,kk) > 0.1) then
7574
hhvaroute(1,ihout,kk) = (hhvaroute(1,inum1,kk) *
@@ -79,12 +78,16 @@ subroutine addh
7978
end if
8079
end do
8180
do ii = 2, mvaro
82-
! do kk = 1, 24
8381
do kk = 1, nstep ! modified for urban modeling by J.Jeong 4/15/2008
8482
hhvaroute(ii,ihout,kk) = hhvaroute(ii,inum1,kk) +
8583
* hhvaroute(ii,inum2,kk)
8684
end do
8785
end do
86+
87+
DO K = 1, nstep
88+
QHY(K,ihout,IHX(1))=QHY(K,inum1,IHX(1))+QHY(K,inum2,IHX(1)) !flood routing jaehak 2017
89+
END DO
90+
8891
endif
8992

9093
do ii = 29, mvaro

src/albedo.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ subroutine albedo
3636
use parm
3737

3838
integer :: j
39-
real :: cej, eaj
39+
real*8 :: cej, eaj
4040

4141
j = 0
4242
j = ihru

src/allocate_parms.f

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,9 @@ subroutine allocate_parms
11731173
allocate (pnd_cla(mhru))
11741174
allocate (pnd_sag(mhru))
11751175
allocate (pnd_lag(mhru))
1176+
1177+
allocate (twlpnd(mhru)) !!srini pond/wet infiltration to shallow gw storage
1178+
allocate (twlwet(mhru)) !!srini pond/wet infiltration to shallow gw storage
11761179

11771180
allocate (pnd_solp(mhru))
11781181
allocate (pnd_solpg(mhru))
@@ -1740,8 +1743,8 @@ subroutine allocate_parms
17401743
!! LID simulations
17411744
!! Common variable
17421745
!! van Genuchten equation's coefficients
1743-
allocate(lid_vgcl,lid_vgcm,lid_qsurf_total,
1744-
& lid_farea_sum)
1746+
! allocate(lid_vgcl,lid_vgcm,lid_qsurf_total,
1747+
! & lid_farea_sum)
17451748
allocate(lid_cuminf_last(mhru,4),lid_sw_last(mhru,4),
17461749
& interval_last(mhru,4),lid_f_last(mhru,4),lid_cumr_last(mhru,4),
17471750
& lid_str_last(mhru,4),lid_farea(mhru,4),lid_qsurf(mhru,4),
@@ -1881,6 +1884,10 @@ subroutine allocate_parms
18811884
tillage_factor = 0.
18821885
!! By Zhang for C/N cycling
18831886
!! ============================
1887+
1888+
!FLOOD ROUTING
1889+
allocate(QHY(nstep+1,mhyd,4), NHY(4*msub))
1890+
allocate(RCHX(msub),RCSS(msub),QCAP(msub),CHXA(msub),CHXP(msub))
18841891
18851892
call zero0
18861893
call zero1

src/alph.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ subroutine alph(iwave)
7070

7171
integer, intent (in) :: iwave
7272
integer :: j, k, kk, jj
73-
real :: ab, ajp, preceff, rainsum
73+
real*8 :: ab, ajp, preceff, rainsum
7474

7575
j = 0
7676
j = ihru

src/anfert.f

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ subroutine anfert
167167

168168
use parm
169169

170-
real, parameter :: rtoaf = 0.50
170+
real*8, parameter :: rtoaf = 0.50
171171
integer :: j, ly, ifrt
172-
real :: tsno3, tpno3, dwfert, xx, targn, tfp
172+
real*8 :: tsno3, tpno3, dwfert, xx, targn, tfp
173173

174174
j = 0
175175
j = ihru

src/apex_day.f

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ subroutine apex_day
178178

179179
if (ievent > 0) then
180180
do ii = 1, nstep
181-
hhvaroute(2,ihout,ii) = flodaya(inum1) / real(nstep)
182-
hhvaroute(3,ihout,ii) = seddaya(inum1) / real(nstep)
183-
hhvaroute(4,ihout,ii) = orgndaya(inum1) / real(nstep)
184-
hhvaroute(5,ihout,ii) = orgpdaya(inum1) / real(nstep)
185-
hhvaroute(6,ihout,ii) = no3daya(inum1) / real(nstep)
186-
hhvaroute(7,ihout,ii) = minpdaya(inum1) / real(nstep)
181+
hhvaroute(2,ihout,ii) = flodaya(inum1) / dfloat(nstep)
182+
hhvaroute(3,ihout,ii) = seddaya(inum1) / dfloat(nstep)
183+
hhvaroute(4,ihout,ii) = orgndaya(inum1) / dfloat(nstep)
184+
hhvaroute(5,ihout,ii) = orgpdaya(inum1) / dfloat(nstep)
185+
hhvaroute(6,ihout,ii) = no3daya(inum1) / dfloat(nstep)
186+
hhvaroute(7,ihout,ii) = minpdaya(inum1) / dfloat(nstep)
187187

188188
end do
189189
end if

src/apply.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ subroutine apply
6464
use parm
6565

6666
integer :: j, kk, k, jj
67-
real :: xx, gc
67+
real*8 :: xx, gc
6868

6969
j = 0
7070
j = ihru

0 commit comments

Comments
 (0)