c decini.for subroutine decoinit(isr) c + + + PURPOSE + + + C This subroutine initalizes values needed in the decomposiiton c submodel. The values are read from a file that indicate the previous c crop harvested and quantities of biomass remaining in the field, for c standing, surface, buried, and root residues. c The subroutine also sets all other age pools and decompdays to 0. c + + + COMMON BLOCKS + + + include 'p1werm.inc' include 'wpath.inc' include 'd1gen.inc' include 's1layr.inc' include 'm1subr.inc' include 'c1db1.inc' include 'd1glob.inc' include 'decomp/decomp.inc' c + + + LOCAL VARIABLE DECLARATION + + + character line*80 integer isr integer i,j, l, idx c + + + LOCAL VARIABLE DEFINITIONS + + + c line holds the contents of each line as it is read c isr current subregion c + + + FUNCTION DECLARATION + + + integer lentrm integer begtrm c + + + DATA INITIALIZATION + + + c + + + FORMAT STATEMENT + + + 2500 format (' Problem reading the DECOMPOSITION parameters from file &crop.db - WEPS EXECUTION HALTED') c + + + END SPECIFICATION + + + c Set harvest flag to 0 and pool values to 1 hrvflag = 0 ipool = 1 ipoolf = 1 c default initalization values for crop type, stem no. stem biomass c surface biomass, below ground biomass, and root biomass. ie. nothing ad0nam(isr) = "No Crop" addstm(1,isr) = 0.0 adzht(1,isr) = 0.0 admst(1,isr) = 0.0 admf(1,isr) = 0.0 stmnoy(1,isr)=addstm(1,isr) dmsbmy(1,isr)=admst(1,isr) c water coefficent parameters diwcsy(isr) = 0.0 dweti(isr) = 0.0 c cummulative ddays for surface residues do 90 iage= 1,mnbpls cumdds(iage,isr)=0.0 90 continue c standing stem biomass, stem number, stem diam, stem height, stem fall threshold do 70 iage= 1,mnbpls admst(iage,isr)=0.0 addstm(iage,isr)=0.0 adxstm(iage,isr)=0.0 adxstmrep(iage,isr)=0.0 stmht(iage,isr)=0.0 ddsthrsh(iage,isr) = 0.0 70 continue c cumulative ddays and biomass for all layers below ground do 40 isz= 1,nslay(isr) do 41 iage= 1,mnbpls cumddg(isz,iage,isr)=0.0 41 continue do 42 iage= 1,mnbpls admbgz(isz,iage,isr)=0.0 admrtz(isz,iage,isr)=0.0 42 continue 40 continue c flat biomass, cummddays, and covfact for surface residues do 30 iage = 1,mnbpls cumddf(iage,isr)=0.0 covfact(iage,isr)=0.0 30 continue do 31 iage = 2,mnbpls admf(iage,isr)= 0.0 31 continue c set biomass decomposition rates to 0.0 for all pools c residue type counter do 50 j = 1,5 c residue pool counter do 60 l = 1,mnbpls dkrate(j,l,isr)=0.0 60 continue 50 continue c Open output files call decopen C c temporarily initialize residue to bypass an error in crop-jt 7/22/94 c remove when problem is solved in crop do idx = 1, nslay(isr) admbgz(idx,1,isr) = 0.001 end do return 80 write(*,2500) end