Skip to content

Commit

Permalink
Update to 2012Rev637
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyzlj committed Apr 22, 2020
1 parent 5607f13 commit 5de4be1
Show file tree
Hide file tree
Showing 105 changed files with 881 additions and 752 deletions.
2 changes: 1 addition & 1 deletion VERSIONS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION_MAJOR 2012
VERSION_MINOR 627
VERSION_MINOR 637
VERSION_PATCH
7 changes: 2 additions & 5 deletions src/addh.f
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ subroutine addh
!! hhvaroute(:,:,:)|varies |routing storage array for hourly time step
!! ievent |none |rainfall/runoff code
!! |0 daily rainfall/curve number technique
!! |1 daily rainfall/Green&Ampt technique/daily
!! |1 sub-daily rainfall/Green&Ampt/hourly
!! | routing
!! |2 sub-daily rainfall/Green&Ampt technique/
!! | daily routing
!! |3 sub-daily rainfall/Green&Ampt/hourly routing
!! ihout |none |outflow hydrograph storage location number
!! inum1 |none |hydrograph storage location number of
!! |first dataset to be added
Expand Down Expand Up @@ -70,7 +67,7 @@ subroutine addh


!! add hydrograph points (hourly time step)
if (ievent > 2) then
if (ievent > 0) then
! do kk = 1, 24
do kk = 1, nstep ! modified for urban modeling by J.Jeong 4/15/2008
if (hhvaroute(2,inum1,kk) + hhvaroute(2,inum2,kk) > 0.1) then
Expand Down
21 changes: 19 additions & 2 deletions src/allocate_parms.f
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ subroutine allocate_parms
motot = 600 !! (50 years limit)

allocate (surlag(mhru))
allocate (cdn(mhru))
allocate (cmn(mhru))
allocate (nperco(mhru))
allocate (phoskd(mhru))
allocate (psp(mhru))
allocate (sdnco(mhru))
!!!!!!!!!! drains
allocate (wnan(mlyr))

Expand Down Expand Up @@ -355,7 +361,11 @@ subroutine allocate_parms
allocate (rammo_mo(motot,msub))
allocate (drydep_no3_mo(motot,msub))
allocate (drydep_nh4_mo(motot,msub))
!!! atmospheric deposition by month
!!! atmospheric deposition by day
allocate (rcn_d(msub))
allocate (rammo_d(msub))
allocate (drydep_no3_d(msub))
allocate (drydep_nh4_d(msub))

allocate (fcst_reg(msub))
allocate (harg_petco(msub))
Expand All @@ -380,6 +390,7 @@ subroutine allocate_parms
allocate (phutot(msub))
allocate (plaps(msub))
allocate (rammo_sub(msub))
allocate (atmo_day(msub))
allocate (rcn_sub(msub))
allocate (sub_bactlp(msub))
allocate (sub_bactp(msub))
Expand Down Expand Up @@ -598,6 +609,10 @@ subroutine allocate_parms
allocate (lkspst_bry(mres))
allocate (lkspst_conc(mres))
allocate (lkspst_rea(mres))
allocate (theta_n(mres))
allocate (theta_p(mres))
allocate (con_nirr(mres))
allocate (con_pirr(mres))
allocate (mores(mres))
allocate (ndtargr(mres))
allocate (oflowmn_fps(mres))
Expand Down Expand Up @@ -1197,7 +1212,9 @@ subroutine allocate_parms
allocate (potlagi(mhru))

allocate (pplnt(mhru))
allocate (prf(mch)) !Moriasi 4/8/14
allocate (prf(mch)) !Moriasi 4/8/14
allocate (spcon(mch))
allocate (spexp(mch))
allocate (qdr(mhru))
allocate (qdayout(mhru))
allocate (rch_dakm(mxsubch))
Expand Down
9 changes: 3 additions & 6 deletions src/alph.f
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ subroutine alph(iwave)
!! |precipitation data for sub-daily modeling
!! ievent |none |rainfall/runoff code
!! |0 daily rainfall/curve number technique
!! |1 daily rainfall/Green&Ampt technique/daily
!! |1 sub-daily rainfall/Green&Ampt/hourly
!! | routing
!! |2 sub-daily rainfall/Green&Ampt technique/
!! | daily routing
!! |3 sub-daily rainfall/Green&Ampt/hourly routing
!! ihru |none |HRU number
!! iwave |none |flag to differentiate calculation of HRU and
!! |subbasin sediment calculation
Expand Down Expand Up @@ -79,7 +76,7 @@ subroutine alph(iwave)
ab = 0.02083

select case (ievent)
case(0, 1) !! daily rainfall, estimate al5
case(0) !! daily rainfall, estimate al5
preceff = 0.
if (iwave > 0) then
!! subbasin sediment calculations
Expand Down Expand Up @@ -110,7 +107,7 @@ subroutine alph(iwave)
al5 = amp_r(i_mo,hru_sub(j))
end if

case default !! subdaily rainfall, get from pcp data
case (1) !! subdaily rainfall, get from pcp data
if (idt <= 30) then
k = 0
k = 30 / idt
Expand Down
4 changes: 2 additions & 2 deletions src/anfert.f
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ subroutine anfert

if (imgt == 1) then
write (143, 1000) subnum(j), hruno(j), iyr, i_mo, iida,
* " ",
* hru_km(j), " ",
* "AUTOFERT", phubase(j), phuacc(j), sol_sw(j),bio_ms(j),
* sol_rsd(1,j),sol_sumno3(j),sol_sumsolp(j), dwfert,
* fertno3, fertnh3, fertorgn, fertsolp, fertorgp
Expand All @@ -350,7 +350,7 @@ subroutine anfert
endif


1000 format (a5,1x,a4,3i6,2a15,7f10.2,20x,f10.2,10x,5f10.2)
1000 format (a5,1x,a4,3i6,1x,e10.5,1x,2a15,7f10.2,20x,f10.2,10x,5f10.2)

return
end subroutine
17 changes: 8 additions & 9 deletions src/apex_day.f
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ subroutine apex_day
!! id1 |julian date |first day of simulation in year
!! ievent |none |rainfall/runoff code
!! |0 daily rainfall/curve number technique
!! |1 daily rainfall/Green&Ampt technique/daily
!! |1 sub-daily rainfall/Green&Ampt/hourly
!! | routing
!! |2 sub-daily rainfall/Green&Ampt technique/
!! | daily routing
!! |3 sub-daily rainfall/Green&Ampt/hourly routing
!! inum1 |none |reach number
!! ifirstr(:) |none |measured data search code
!! |0 first day of measured data located in file
Expand Down Expand Up @@ -108,7 +105,7 @@ subroutine apex_day

do j = 1, mvaro
varoute(j,ihout) = 0.
if (ievent > 1) then
if (ievent > 0) then
do ii = 1, nstep
hhvaroute(j,ihout,ii) = 0.
end do
Expand Down Expand Up @@ -145,14 +142,16 @@ subroutine apex_day
varoute(15,ihout) = 0.0
varoute(16,ihout) = 0.0
varoute(17,ihout) = 0.0
varoute(18,ihout) = 0.0
varoute(18,ihout) = 0.0
varoute(19,ihout) = 0.0
varoute(20,ihout) = 0.0
varoute(21,ihout) = 0.0
varoute(22,ihout) = 0.0
read (112+inum1,*) idapa(inum1), iypa(inum1), flodaya(inum1),
varoute(22,ihout) = 0.0
if (curyr /= nbyr .and. iida /= idal) then
read (112+inum1,*) idapa(inum1), iypa(inum1), flodaya(inum1),
& seddaya(inum1), orgndaya(inum1), orgpdaya(inum1), no3daya(inum1),
& minpdaya(inum1)
endif
else
varoute(2,ihout) = 0.0
varoute(3,ihout) = 0.0
Expand All @@ -176,7 +175,7 @@ subroutine apex_day
varoute(22,ihout) = 0.0
endif

if (ievent > 2) then
if (ievent > 0) then
do ii = 1, nstep
hhvaroute(2,ihout,ii) = flodaya(inum1) / real(nstep)
hhvaroute(3,ihout,ii) = seddaya(inum1) / real(nstep)
Expand Down
5 changes: 3 additions & 2 deletions src/autoirr.f
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ subroutine autoirr

if (imgt == 1) then
write (143, 1000) subnum(j), hruno(j), iyr, i_mo, iida,
* " ", " AUTOIRR", phubase(j), phuacc(j)
* hru_km(j), " ", " AUTOIRR", phubase(j), phuacc(j)
* , sol_sw(j),bio_ms(j), sol_rsd(1,j),sol_sumno3(j)
* ,sol_sumsolp(j), aird(j)
* ,irrsc(j), irrno(j)
Expand All @@ -192,7 +192,8 @@ subroutine autoirr
endif
end if

1000 format (a5,1x,a4,3i6,2a15,7f10.2,10x,f10.2,70x,i10,10x,i10)
1000 format (a5,1x,a4,3i6,1x,e10.5,1x,2a15,7f10.2,10x,f10.2,70x,i10,
* 10x,i10)

return
end
Loading

0 comments on commit 5de4be1

Please sign in to comment.