From 4fd4a7f034d04c9e0e2a00056c6785d3ce52391a Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Tue, 26 Mar 2013 03:10:13 -0500 Subject: [PATCH] Toward #3 --- src/carbon_zhang2.f90 | 1 + src/gcycl.f | 4 ++-- src/graze.f | 1 + src/harvestop.f | 1 + src/modparm.f | 13 ++++++++----- src/routels.f | 1 + src/sched_mgt.f | 2 +- src/writeaa.f | 2 +- src/zero0.f | 2 +- src/zero1.f | 2 +- src/zero_urbn.f | 8 ++++---- 11 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/carbon_zhang2.f90 b/src/carbon_zhang2.f90 index aa3e268..637fc40 100644 --- a/src/carbon_zhang2.f90 +++ b/src/carbon_zhang2.f90 @@ -112,6 +112,7 @@ subroutine carbon_zhang2 real :: PN1, PN2, PN3, PN4, PN5, PN6, PN7, PN8, PN9 real :: SUM, CPN1, CPN2, CPN3, CPN4, CPN5 real :: WMIN,DMDN, wdn, Delta_BMC, DeltaWN + real :: LSLNCAT !! initilize local variables DeltaWN = 0. DeltaBMC = 0. diff --git a/src/gcycl.f b/src/gcycl.f index a7f3636..36dbdf4 100644 --- a/src/gcycl.f +++ b/src/gcycl.f @@ -83,7 +83,7 @@ subroutine gcycl rn = 0. ii = 0 rn = Aunif(rndseed10) - ii = 100 * igen * rn + ii = int(100. * igen * rn) do k = 1, ii xx = Aunif(rndseed10) end do @@ -96,7 +96,7 @@ subroutine gcycl rn = 0. ii = idg(j) rn = Aunif(rndseed10) - k = j * rn + 1 + k = int(j * rn) + 1 idg(j) = idg(k) idg(k) = ii end do diff --git a/src/graze.f b/src/graze.f index 83ef1dd..c37d9b3 100644 --- a/src/graze.f +++ b/src/graze.f @@ -172,6 +172,7 @@ subroutine graze integer :: j, l, it real :: dmi, dmii, gc, gc1, swf, frt_t, xx + real :: LMF, LSF j = 0 j = ihru diff --git a/src/harvestop.f b/src/harvestop.f index ff8f16a..38869a3 100644 --- a/src/harvestop.f +++ b/src/harvestop.f @@ -137,6 +137,7 @@ subroutine harvestop !! real :: hiad1, wur, yield, clip, yieldn, yieldp, clipn, clipp real :: hiad1, wur, clip, yieldn, yieldp, clipn, clipp real :: yldpst, clippst, rtresnew + real :: nssr !!add by zhang diff --git a/src/modparm.f b/src/modparm.f index e85b5f7..311290c 100644 --- a/src/modparm.f +++ b/src/modparm.f @@ -394,7 +394,8 @@ module parm integer, dimension (:,:), allocatable :: mgt1iop,mgt2iop,mgt3iop real, dimension (:,:), allocatable :: mgt4op, mgt5op, mgt6op real, dimension (:,:), allocatable :: mgt7op, mgt8op, mgt9op - real, dimension (:,:), allocatable :: mgt10iop, phu_op + integer, dimension (:,:), allocatable :: mgt10iop + real, dimension (:,:), allocatable :: phu_op ! mcrdb = maximum number of crops in database real, dimension (:), allocatable :: wac21,wac22,cnyld,rsdco_pl real, dimension (:), allocatable :: wsyf,leaf1,leaf2,alai_min @@ -492,8 +493,8 @@ module parm real, dimension (:), allocatable :: shallirr,deepirr,lai_aamx real, dimension (:), allocatable :: canstor,ovrlnd,ch_l1,wet_no3 real, dimension (:), allocatable :: irr_mx, auto_wstr - real, dimension (:), allocatable :: cfrt_id, cfrt_kg, cpst_id - real, dimension (:), allocatable :: cpst_kg + integer, dimension (:), allocatable :: cfrt_id, cpst_id + real, dimension (:), allocatable :: cfrt_kg, cpst_kg real, dimension (:), allocatable :: irr_asq, irr_eff real, dimension (:), allocatable :: irrsq, irrefm, irrsalt real, dimension (:), allocatable :: bio_eat, bio_trmp !!NUBZ @@ -586,7 +587,8 @@ module parm real, dimension (:,:), allocatable :: cont_cn, cont_p, filt_w real, dimension (:,:), allocatable :: strip_n, strip_cn, strip_c real, dimension (:,:), allocatable :: strip_p, fire_cn - real, dimension (:,:), allocatable :: cropno_upd,hi_upd,laimx_upd + integer, dimension (:,:), allocatable :: cropno_upd + real, dimension (:,:), allocatable :: hi_upd,laimx_upd real, dimension (:,:,:), allocatable :: pst_lag, phug !! integer, dimension (:), allocatable :: ipot,nrelease,swtrg,hrupest integer, dimension (:), allocatable :: nrelease,swtrg,hrupest @@ -729,7 +731,8 @@ module parm & ft_sed_cumul,sp_sed_cumul integer, dimension(:), allocatable:: num_sf integer, dimension(:,:), allocatable:: sf_typ,sf_dim,ft_qfg, - & sp_qfg,sf_ptp,ft_fc + & sp_qfg,sf_ptp + real, dimension(:,:), allocatable :: ft_fc !detention pond integer, dimension(:), allocatable :: dtp_subnum,dtp_imo, diff --git a/src/routels.f b/src/routels.f index 1d5a8e5..f4b0af6 100644 --- a/src/routels.f +++ b/src/routels.f @@ -29,6 +29,7 @@ subroutine routels(iru_sub) !! use parm real :: latqout, gwqout, latqrunon, surfqrunon, latqlyr + real :: no3, nh3 !! compute infiltration from surface runon to next landscape unit real :: ls_overq, ls_latq, ls_tileq, ls_gwq diff --git a/src/sched_mgt.f b/src/sched_mgt.f index c751e51..de763d0 100644 --- a/src/sched_mgt.f +++ b/src/sched_mgt.f @@ -222,7 +222,7 @@ subroutine sched_mgt irr_noa(j) = mgt10iop(nop(j),j) if (irr_noa(j) <= 0) irr_noa(j) = irrno(j) if (irr_noa(j) <= 0) irr_noa(j) = hru_sub(j) - if (wstrs_id(j) <= 0.) wstrs_id(j) = 1. + if (wstrs_id(j) <= 0.) wstrs_id(j) = 1 if (irr_eff(j) > 1.) irr_eff(j) = 0. if (irr_eff(j) == 0.) irr_eff(j) = 1. if (irr_mx(j) < 1.e-6) irr_mx(j) = 25.4 diff --git a/src/writeaa.f b/src/writeaa.f index cf9a1ef..75be74f 100644 --- a/src/writeaa.f +++ b/src/writeaa.f @@ -345,7 +345,7 @@ subroutine writeaa bio_aams = bio_aams / yrs lai_aamx = lai_aamx / yrs yldaa = yldaa / yrs - irn = irn / yrs + irn = int(irn / yrs) aairr = aairr / yrs do j = 1, nhru do nicr = 1, mcrhru(j) diff --git a/src/zero0.f b/src/zero0.f index 6bef906..078888e 100644 --- a/src/zero0.f +++ b/src/zero0.f @@ -343,7 +343,7 @@ subroutine zero0 irip = 0 irn = 0 irramt = 0. - irreff = 1. + irreff = 1 irrefm = 1. irrsalt = 0. irrsc = 0 diff --git a/src/zero1.f b/src/zero1.f index 223770c..302d195 100644 --- a/src/zero1.f +++ b/src/zero1.f @@ -167,7 +167,7 @@ subroutine zero1 phu_plt = 0. phuacc = 0. phug = 300. - phu_op = 0. + phu_op = 0 phutot = 0. plaps = 0. !! septic changes 1/29/09 diff --git a/src/zero_urbn.f b/src/zero_urbn.f index 47b06f8..b76d8e5 100644 --- a/src/zero_urbn.f +++ b/src/zero_urbn.f @@ -38,7 +38,7 @@ subroutine zero_urbn num_sf = 0 sf_fr = 0. sf_dim = 0 - sf_typ = 0. + sf_typ = 0 sf_im = 0. sf_iy = 0. sp_sa = 0. @@ -74,7 +74,7 @@ subroutine zero_urbn ft_qfg = 0 sp_qfg = 0 sf_ptp = 0 - ft_fc = 0 + ft_fc = 0. !detention pond dtp_subnum = 0 dtp_imo = 0 @@ -114,8 +114,8 @@ subroutine zero_urbn dtp_pcpret = 0. dtp_cdis = 1. dtp_wrwid = 0. - dtp_weirtype = 0. - dtp_weirdim = 0. + dtp_weirtype = 0 + dtp_weirdim = 0 dtp_addon = 0. dtp_ivol = 0. dtp_ised = 0.