42 INTEGER,
INTENT(in):: is
44 REAL(KIND(1d0)),
INTENT(in)::state_is
45 REAL(KIND(1d0)),
INTENT(in)::StorCap
46 REAL(KIND(1d0)),
INTENT(in)::DrainCoef1
47 REAL(KIND(1d0)),
INTENT(in)::DrainCoef2
48 REAL(KIND(1d0)),
INTENT(in)::DrainEq
49 REAL(KIND(1d0)),
INTENT(in)::nsh_real
50 REAL(KIND(1d0)),
INTENT(out):: drain_is
53 IF (state_is < 0.000000001)
THEN 56 IF (int(draineq) == 1)
THEN 58 IF (state_is < storcap)
THEN 61 drain_is = (draincoef1*(state_is - storcap)**draincoef2)/nsh_real
64 ELSEIF (int(draineq) == 2)
THEN 65 drain_is = (draincoef1*(exp(draincoef2*state_is) - 1))/nsh_real
68 ELSEIF (int(draineq) == 3)
THEN 69 drain_is = (draincoef1*(state_is**draincoef2))/nsh_real
77 IF (drain_is > state_is)
THEN 79 CALL errorhint(61,
'SUEWS_drain: drain_is > state_is for surface is ', drain_is, state_is, is)
81 ELSEIF (drain_is < 0.0001)
THEN 93 is, sfr, PipeCapacity, RunoffToWater, pin, & ! input:
95 drain, AddWater, addImpervious, nsh_real, stateOld, AddWaterRunoff, &
96 PervFraction, addVeg, SoilStoreCap, addWaterBody, FlowChange, StateLimit, &
97 runoffAGimpervious, surplusWaterBody, & ! inout:
98 runoffAGveg, runoffPipes, ev, soilstore_id, SurplusEvap, runoffWaterBody, &
99 p_mm, chang, runoff, state_id)
143 INTEGER,
INTENT(in)::is
145 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::sfr
146 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::AddWater
147 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::stateOld
148 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::AddWaterRunoff
149 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::SoilStoreCap
150 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::StateLimit
152 REAL(KIND(1d0)),
INTENT(in)::PipeCapacity
153 REAL(KIND(1d0)),
INTENT(in)::RunoffToWater
154 REAL(KIND(1d0)),
INTENT(in)::pin
155 REAL(KIND(1d0)),
INTENT(in)::addImpervious
156 REAL(KIND(1d0)),
INTENT(in)::nsh_real
157 REAL(KIND(1d0)),
INTENT(in)::PervFraction
158 REAL(KIND(1d0)),
INTENT(in)::addVeg
159 REAL(KIND(1d0)),
INTENT(in)::addWaterBody
160 REAL(KIND(1d0)),
INTENT(in)::FlowChange
162 REAL(KIND(1d0)),
INTENT(inout)::runoffAGimpervious
163 REAL(KIND(1d0)),
INTENT(inout)::surplusWaterBody
164 REAL(KIND(1d0)),
INTENT(inout)::runoffAGveg
165 REAL(KIND(1d0)),
INTENT(inout)::runoffPipes
166 REAL(KIND(1d0)),
INTENT(inout)::ev
167 REAL(KIND(1d0)),
INTENT(inout)::runoffWaterBody
169 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(inout)::soilstore_id
170 REAL(KIND(1d0)),
DIMENSION(2),
INTENT(inout) ::SurplusEvap
172 REAL(KIND(1d0)),
INTENT(out)::p_mm
174 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in) ::drain
175 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in) ::WU_nsurf
176 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(out)::chang
177 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(out)::runoff
178 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(out)::state_id
181 REAL(KIND(1d0)):: EvPart
182 REAL(KIND(1d0)),
PARAMETER:: NotUsed = -55.5
183 REAL(KIND(1d0)),
PARAMETER:: IPThreshold_mmhr = 10
209 p_mm = pin + wu_nsurf(is)
214 p_mm = p_mm + addwater(is)
225 p_mm = p_mm + addimpervious/sfr(
pavsurf)
230 chang(is) = p_mm - (drain(is) + ev)
234 IF (p_mm > ipthreshold_mmhr/nsh_real)
THEN 235 runoff(is) = runoff(is) + (p_mm - ipthreshold_mmhr/nsh_real)
236 chang(is) = ipthreshold_mmhr/nsh_real - (drain(is) + ev)
240 state_id(is) = stateold(is) + chang(is)
243 IF (state_id(is) < 0.0)
THEN 246 surplusevap(is) = abs(state_id(is))
247 ev = ev - surplusevap(is)
257 chang(is) = state_id(is) - stateold(is)
261 runoff(is) = runoff(is) + drain(is)*addwaterrunoff(is)
288 chang(is) = p_mm - (drain(is) + ev)
292 IF (p_mm > ipthreshold_mmhr/nsh_real)
THEN 293 runoff(is) = runoff(is) + (p_mm - ipthreshold_mmhr/nsh_real)
294 chang(is) = ipthreshold_mmhr/nsh_real - (drain(is) + ev)
298 state_id(is) = stateold(is) + chang(is)
301 IF (state_id(is) < 0.0)
THEN 304 IF ((soilstore_id(is) + state_id(is)) >= 0)
THEN 305 soilstore_id(is) = soilstore_id(is) + state_id(is)
309 ev = ev - abs(state_id(is))
321 chang(is) = state_id(is) - stateold(is)
327 soilstore_id(is) = soilstore_id(is) + drain(is)*addwaterrunoff(is)
330 IF (soilstore_id(is) > soilstorecap(is))
THEN 331 runoff(is) = runoff(is) + (soilstore_id(is) - soilstorecap(is))
332 soilstore_id(is) = soilstorecap(is)
333 ELSEIF (soilstore_id(is) < 0)
THEN 334 CALL errorhint(62,
'SUEWS_store: soilstore_id(is) < 0 ', soilstore_id(is), notused, is)
343 p_mm = p_mm + addwaterbody/sfr(
watersurf)
348 chang(is) = p_mm + flowchange/nsh_real - ev
351 state_id(is) = stateold(is) + chang(is)
354 IF (state_id(is) < 0.0)
THEN 356 ev = ev - abs(state_id(is))
366 chang(is) = state_id(is) - stateold(is)
382 chang(is) = state_id(is) - stateold(is)
397 sfr, pipecapacity, runofftowater, &
398 runoffagimpervious, surpluswaterbody, runoffagveg, runoffpipes)
406 is, runoff, &! input:
407 sfr, PipeCapacity, RunoffToWater, &
408 runoffAGimpervious, surplusWaterBody, runoffAGveg, runoffPipes)
412 INTEGER,
INTENT(in) :: is
413 REAL(KIND(1d0)),
INTENT(in) :: sfr(
nsurf), runoff(
nsurf), PipeCapacity, RunoffToWater
414 REAL(KIND(1d0)),
INTENT(inout) :: runoffAGimpervious, surplusWaterBody, runoffAGveg, runoffPipes
417 runoffpipes = runoffpipes + (runoff(is)*sfr(is))
421 IF (runoffpipes > pipecapacity)
THEN 428 runoffagimpervious = runoffagimpervious + (runoffpipes - pipecapacity)*(1 - runofftowater)
429 surpluswaterbody = surpluswaterbody + (runoffpipes - pipecapacity)*runofftowater
432 runoffagimpervious = runoffagimpervious + (runoffpipes - pipecapacity)
438 runoffagveg = runoffagveg + (runoffpipes - pipecapacity)*(1 - runofftowater)
439 surpluswaterbody = surpluswaterbody + (runoffpipes - pipecapacity)*runofftowater
442 runoffagveg = runoffagveg + (runoffpipes - pipecapacity)
446 runoffpipes = pipecapacity
455 snowUse, WaterDist, sfr, Drain, &! input:
456 AddWaterRunoff, AddWater)
463 INTEGER,
INTENT(in)::snowUse
465 REAL(KIND(1d0)),
INTENT(in)::WaterDist(
nsurf + 1,
nsurf - 1)
466 REAL(KIND(1d0)),
INTENT(in)::sfr(
nsurf)
467 REAL(KIND(1d0)),
INTENT(in)::Drain(
nsurf)
469 REAL(KIND(1d0)),
INTENT(out)::AddWaterRunoff(
nsurf)
470 REAL(KIND(1d0)),
INTENT(out)::AddWater(
nsurf)
473 INTEGER::NSurfDoNotReceiveDrainage = 0
477 addwaterrunoff(ii) = waterdist(8, ii)
482 DO ii = 1,
nsurf - nsurfdonotreceivedrainage
483 DO jj = 1,
nsurf - (nsurfdonotreceivedrainage + 1)
485 IF (sfr(ii) /= 0)
THEN 488 IF (snowuse == 0)
THEN 489 addwater(ii) = addwater(ii) + (drain(jj)*sfr(jj)/sfr(ii))*waterdist(ii, jj)
493 addwaterrunoff(jj) = addwaterrunoff(jj) + waterdist(ii, jj)
497 addwaterrunoff(jj) = addwaterrunoff(jj) + waterdist(ii, jj)
508 NonWaterFraction, &!input
509 SoilStoreCap, sfr, soilstore_id, &
510 SoilMoistCap, SoilState, &!output
515 REAL(KIND(1d0)),
INTENT(in)::NonWaterFraction
516 REAL(KIND(1d0)),
INTENT(in),
DIMENSION(nsurf)::SoilStoreCap, sfr, soilstore_id
518 REAL(KIND(1d0)),
INTENT(out)::SoilMoistCap, SoilState
519 REAL(KIND(1d0)),
INTENT(out)::vsmd, smd
526 IF (nonwaterfraction /= 0)
THEN 528 soilmoistcap = soilmoistcap + (soilstorecap(is)*sfr(is)/nonwaterfraction)
529 soilstate = soilstate + (soilstore_id(is)*sfr(is)/nonwaterfraction)
535 smd = soilmoistcap - soilstate
554 SMDMethod, xsmd, NonWaterFraction, SoilMoistCap, &!input
555 SoilStoreCap, surf_chang_per_tstep, &
556 soilstore_id, soilstoreOld, sfr, &
557 smd, smd_nsurf, tot_chang_per_tstep, SoilState)
562 INTEGER,
INTENT(in) ::SMDMethod
563 REAL(KIND(1d0)),
INTENT(in)::xsmd
564 REAL(KIND(1d0)),
INTENT(in)::NonWaterFraction
565 REAL(KIND(1d0)),
INTENT(in)::SoilMoistCap
567 REAL(KIND(1d0)),
INTENT(in)::surf_chang_per_tstep
568 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::soilstore_id
569 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::soilstoreOld
570 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::sfr
571 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::SoilStoreCap
573 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(out)::smd_nsurf
574 REAL(KIND(1d0)),
INTENT(out)::SoilState
575 REAL(KIND(1d0)),
INTENT(out)::smd
576 REAL(KIND(1d0)),
INTENT(out)::tot_chang_per_tstep
578 REAL(KIND(1d0)),
PARAMETER::NotUsed = -999
579 REAL(KIND(1d0)),
PARAMETER::NAN = -999
583 IF (nonwaterfraction /= 0)
THEN 585 soilstate = soilstate + (soilstore_id(is)*sfr(is)/nonwaterfraction)
586 IF (soilstate < 0)
THEN 587 CALL errorhint(62,
'SUEWS_Calculations: total SoilState < 0 (just added surface is) ', soilstate, notused, is)
588 ELSEIF (soilstate > soilmoistcap)
THEN 589 CALL errorhint(62,
'SUEWS_Calculations: total SoilState > capacity (just added surface is) ', soilstate, notused, is)
603 smd = soilmoistcap - soilstate
604 smd_nsurf = soilstorecap - soilstore_id
608 tot_chang_per_tstep = surf_chang_per_tstep
609 DO is = 1, (
nsurf - 1)
610 tot_chang_per_tstep = tot_chang_per_tstep + ((soilstore_id(is) - soilstoreold(is))*sfr(is))
613 IF (smdmethod > 0)
THEN 623 sfr, &! input: ! surface fractions
624 SoilStoreCap, &!Capacity of soil store for each surface [mm]
625 SoilDepth, &!Depth of sub-surface soil store for each surface [mm]
626 SatHydraulicConduct, &!Saturated hydraulic conductivity for each soil subsurface [mm s-1]
627 SurfaceArea, &!Surface area of the study area [m2]
628 NonWaterFraction, &! sum of surface cover fractions for all except water surfaces
629 tstep_real, & !tstep cast as a real for use in calculations
630 soilstore_id, &! inout: !Soil moisture of each surface type [mm]
631 runoffSoil, &!Soil runoff from each soil sub-surface [mm]
632 runoffSoil_per_tstep &! output:!Runoff to deep soil per timestep [mm] (for whole surface, excluding water body)
655 REAL(KIND(1d0)),
INTENT(in) ::sfr(
nsurf)
656 REAL(KIND(1d0)),
INTENT(in) ::SoilStoreCap(
nsurf)
657 REAL(KIND(1d0)),
INTENT(in) ::SoilDepth(
nsurf)
658 REAL(KIND(1d0)),
INTENT(in) ::SatHydraulicConduct(
nsurf)
659 REAL(KIND(1d0)),
INTENT(in) ::SurfaceArea
660 REAL(KIND(1d0)),
INTENT(in) ::NonWaterFraction
661 REAL(KIND(1d0)),
INTENT(in) ::tstep_real
663 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(inout) ::soilstore_id
664 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(inout) ::runoffSoil
666 REAL(KIND(1d0)),
INTENT(out) :: runoffSoil_per_tstep
670 DimenWaterCon1, DimenWaterCon2, &
675 B_r1, MatPot1, Km1, &
676 B_r2, MatPot2, Km2, &
677 Distance, KmWeight, dI, &
680 REAL(KIND(1d0)),
PARAMETER:: &
697 runoffsoil_per_tstep = 0
701 IF (sfr(is) /= 0 .AND. soilstorecap(is) > 0)
THEN 703 DO jj = is + 1,
nsurf - 1
705 IF (sfr(jj) /= 0 .AND. soilstorecap(jj) > 0)
THEN 710 soilmoistcap_vol1 = soilstorecap(is)/soildepth(is)
711 soilmoist_vol1 = soilstore_id(is)/soildepth(is)
720 IF (b_r1 >= soilmoist_vol1)
THEN 725 dimenwatercon1 = (soilmoist_vol1 - b_r1)/(soilmoistcap_vol1 - b_r1)
728 IF (dimenwatercon1 > 0.99999)
THEN 729 dimenwatercon1 = dimenwatercon1 - 0.0001
732 IF (dimenwatercon1 < 0.00000005)
THEN 733 dimenwatercon1 = dimenwatercon1 + 0.0000001
738 matpot1 = sqrt(1/dimenwatercon1**2 - 1)/alphavg
741 km1 = sathydraulicconduct(is)*sqrt(dimenwatercon1)*(1 - (1 - dimenwatercon1**2)**0.5)**2
744 IF (matpot1 > 100000)
THEN 753 soilmoistcap_vol2 = soilstorecap(jj)/soildepth(jj)
754 soilmoist_vol2 = soilstore_id(jj)/soildepth(jj)
762 IF (b_r2 >= soilmoist_vol2)
THEN 766 dimenwatercon2 = (soilmoist_vol2 - b_r2)/(soilmoistcap_vol2 - b_r2)
768 IF (dimenwatercon2 > 0.99999)
THEN 769 dimenwatercon2 = dimenwatercon2 - 0.0001
772 IF (dimenwatercon2 < 0.00000005)
THEN 773 dimenwatercon2 = dimenwatercon2 + 0.0000001
778 matpot2 = sqrt(1/dimenwatercon2**2 - 1)/alphavg
781 km2 = sathydraulicconduct(jj)*sqrt(dimenwatercon2)*(1 - (1 - dimenwatercon2**2)**0.5)**2
783 IF ((matpot2) > 100000)
THEN 794 distance = (sqrt(sfr(is)*surfacearea/nunits) + sqrt(sfr(jj)*surfacearea/nunits))/2
797 kmweight = (sfr(is)*km1 + sfr(jj)*km2)/(sfr(is) + sfr(jj))
801 di_dt = -(kmweight)*(-matpot1 + matpot2)/(distance*1000)
805 di = di_dt*tstep_real
811 IF ((soilstore_id(jj) >= di*sfr(is)/sfr(jj)) .AND. ((soilstore_id(is) + di) >= 0))
THEN 812 soilstore_id(is) = soilstore_id(is) + di
813 soilstore_id(jj) = soilstore_id(jj) - di*sfr(is)/sfr(jj)
816 ELSEIF ((soilstore_id(is) + di) < 0)
THEN 817 soilstore_id(jj) = soilstore_id(jj) + soilstore_id(is)*sfr(is)/sfr(jj)
822 soilstore_id(is) = soilstore_id(is) + soilstore_id(jj)*sfr(jj)/sfr(is)
827 IF (soilstore_id(is) > soilstorecap(is))
THEN 828 runoffsoil(is) = runoffsoil(is) + (soilstore_id(is) - soilstorecap(is))
829 soilstore_id(is) = soilstorecap(is)
835 IF (soilstore_id(jj) > soilstorecap(jj))
THEN 836 runoffsoil(jj) = runoffsoil(jj) + (soilstore_id(jj) - soilstorecap(jj))
837 soilstore_id(jj) = soilstorecap(jj)
846 runoffsoil_per_tstep = runoffsoil_per_tstep + (runoffsoil(is)*sfr(is)/nonwaterfraction)
860 wu_m3, SurfaceArea, sfr, &
861 IrrFracPaved, IrrFracBldgs, &
862 IrrFracEveTr, IrrFracDecTr, IrrFracGrass, &
863 IrrFracBSoil, IrrFracWater, &
864 DayofWeek_id, WUProfA_24hr, WUProfM_24hr, &
865 InternalWaterUse_h, HDD_id, WUDay_id, &
866 WaterUseMethod, NSH, it, imin, DLS, &
867 wu_nsurf, wu_int, wu_ext)
888 REAL(KIND(1d0)),
INTENT(in)::nsh_real
889 REAL(KIND(1d0)),
INTENT(in)::wu_m3
890 REAL(KIND(1d0)),
INTENT(in)::SurfaceArea
891 REAL(KIND(1D0)),
INTENT(IN)::IrrFracPaved
892 REAL(KIND(1D0)),
INTENT(IN)::IrrFracBldgs
893 REAL(KIND(1D0)),
INTENT(IN)::IrrFracEveTr
894 REAL(KIND(1D0)),
INTENT(IN)::IrrFracDecTr
895 REAL(KIND(1D0)),
INTENT(IN)::IrrFracGrass
896 REAL(KIND(1D0)),
INTENT(IN)::IrrFracBSoil
897 REAL(KIND(1D0)),
INTENT(IN)::IrrFracWater
898 REAL(KIND(1d0)),
INTENT(in)::InternalWaterUse_h
899 REAL(KIND(1d0)),
DIMENSION(0:23, 2),
INTENT(in)::WUProfA_24hr
900 REAL(KIND(1d0)),
DIMENSION(0:23, 2),
INTENT(in)::WUProfM_24hr
901 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(in)::sfr
903 REAL(KIND(1d0)),
DIMENSION(12),
INTENT(in)::HDD_id
904 REAL(KIND(1d0)),
DIMENSION(9),
INTENT(in)::WUDay_id
906 INTEGER,
INTENT(in)::DayofWeek_id(3)
907 INTEGER,
INTENT(in)::WaterUseMethod
908 INTEGER,
INTENT(in)::NSH
909 INTEGER,
INTENT(in)::it
910 INTEGER,
INTENT(in)::imin
911 INTEGER,
INTENT(in)::DLS
913 REAL(KIND(1d0)),
DIMENSION(nsurf),
INTENT(out)::wu_nsurf
914 REAL(KIND(1d0)),
INTENT(out)::wu_int
915 REAL(KIND(1d0)),
INTENT(out)::wu_ext
917 REAL(KIND(1d0))::wu_EveTr
918 REAL(KIND(1d0))::wu_DecTr
919 REAL(KIND(1d0))::wu_Grass
921 REAL(KIND(1d0)),
DIMENSION(nsurf)::WUDay_A_id
922 REAL(KIND(1d0)),
DIMENSION(nsurf)::WUDay_M_id
923 REAL(KIND(1d0)),
DIMENSION(nsurf)::IrrFrac
924 REAL(KIND(1d0)),
DIMENSION(nsurf)::WUArea
929 REAL(KIND(1d0)):: WUAreaTotal_m2
930 REAL(KIND(1d0)):: InternalWaterUse
931 REAL(KIND(1d0)):: flag_WuM = 1
936 REAL(KIND(1d0)),
PARAMETER::NAN = -999.
937 REAL(KIND(1d0)):: OverUse
938 REAL(KIND(1d0)):: rain_cum_daily
940 REAL(KIND(1d0)):: get_Prof_SpecTime_sum
942 REAL(KIND(1d0)):: WUProfA_tstep
943 REAL(KIND(1d0)):: WUProfM_tstep
953 tstep = int(3600/nsh)
956 rain_cum_daily = hdd_id(11)
967 irrfrac = [irrfracpaved, irrfracbldgs, &
968 irrfracevetr, irrfracdectr, irrfracgrass, &
969 irrfracbsoil, irrfracwater]
974 IF (waterusemethod == 1)
THEN 981 wuarea = irrfrac*sfr*surfacearea
982 wuareatotal_m2 = sum(wuarea)
990 IF (wu_m3 == nan .OR. wu_m3 == 0)
THEN 994 IF (wuareatotal_m2 > 0)
THEN 995 wu = (wu_m3/wuareatotal_m2*1000)
1009 wu_nsurf = wu*irrfrac
1011 wu = (wu_m3/surfacearea*1000)
1017 ELSEIF (waterusemethod == 0)
THEN 1026 IF (dayofweek_id(1) == 1 .OR. dayofweek_id(1) == 7)
THEN 1045 wuprofa_tstep = get_prof_spectime_sum(ih, imin, 0, wuprofa_24hr(:, iu), tstep)
1061 IF (rain_cum_daily > 2)
THEN 1069 wuprofm_tstep = get_prof_spectime_sum(ih, imin, 0, wuprofm_24hr(:, iu), tstep)
1072 wu_nsurf = wuprofa_tstep*wuday_a_id + wuprofm_tstep*wuday_m_id*flag_wum
1074 wu_nsurf = wu_nsurf*irrfrac
1095 wu = dot_product(wu_nsurf, sfr)
1102 internalwateruse = internalwateruse_h/nsh_real
1105 wu_ext = wu - (internalwateruse + overuse)
1107 IF (wu_ext < 0)
THEN 1108 overuse = abs(wu_ext)
1114 wu_int = wu - wu_ext
1117 IF (wu_ext /= 0 .AND. wu /= 0)
THEN 1121 wu_nsurf = wu_nsurf*wu_ext/wu
subroutine suews_update_soilmoist(NonWaterFraction, SoilStoreCap, sfr, soilstore_id, SoilMoistCap, SoilState, vsmd, smd)
subroutine suews_cal_soilstate(SMDMethod, xsmd, NonWaterFraction, SoilMoistCap, SoilStoreCap, surf_chang_per_tstep, soilstore_id, soilstoreOld, sfr, smd, smd_nsurf, tot_chang_per_tstep, SoilState)
subroutine suews_cal_wateruse(nsh_real, wu_m3, SurfaceArea, sfr, IrrFracPaved, IrrFracBldgs, IrrFracEveTr, IrrFracDecTr, IrrFracGrass, IrrFracBSoil, IrrFracWater, DayofWeek_id, WUProfA_24hr, WUProfM_24hr, InternalWaterUse_h, HDD_id, WUDay_id, WaterUseMethod, NSH, it, imin, DLS, wu_nsurf, wu_int, wu_ext)
subroutine redistributewater(snowUse, WaterDist, sfr, Drain, AddWaterRunoff, AddWater)
integer, parameter bsoilsurf
integer, parameter conifsurf
subroutine updateflood(is, runoff, sfr, PipeCapacity, RunoffToWater, runoffAGimpervious, surplusWaterBody, runoffAGveg, runoffPipes)
integer, parameter grasssurf
subroutine suews_cal_horizontalsoilwater(sfr, SoilStoreCap, SoilDepth, SatHydraulicConduct, SurfaceArea, NonWaterFraction, tstep_real, soilstore_id, runoffSoil, runoffSoil_per_tstep)
subroutine cal_water_storage(is, sfr, PipeCapacity, RunoffToWater, pin, WU_nsurf, drain, AddWater, addImpervious, nsh_real, stateOld, AddWaterRunoff, PervFraction, addVeg, SoilStoreCap, addWaterBody, FlowChange, StateLimit, runoffAGimpervious, surplusWaterBody, runoffAGveg, runoffPipes, ev, soilstore_id, SurplusEvap, runoffWaterBody, p_mm, chang, runoff, state_id)
integer, parameter excesssurf
integer, parameter decidsurf
integer, parameter pavsurf
subroutine errorhint(errh, ProblemFile, VALUE, value2, valueI)
integer, parameter bldgsurf
integer, parameter watersurf
subroutine drainage(is, state_is, StorCap, DrainEq, DrainCoef1, DrainCoef2, nsh_real, drain_is)