!$Author: fredfox $ !$Date: 2007-02-24 00:43:48 $ !$Revision: 1.38 $ !$Source: /weru/cvs/weps/weps.src/crop/callcrop.for,v $ subroutine callcrop(daysim, sr) ! ***************************************************************** wjr ! Wrapper to call crop ! Arguments integer daysim integer sr ! Includes include 'p1werm.inc' include 'c1db1.inc' include 'c1db2.inc' include 'c1db3.inc' include 'c1info.inc' include 'c1glob.inc' include 'c1gen.inc' include 'd1glob.inc' include 'd1gen.inc' include 'm1flag.inc' include 'm1dbug.inc' include 's1layr.inc' include 's1dbc.inc' include 's1dbh.inc' include 's1phys.inc' include 's1sgeo.inc' ! Contains required variables for biodrag() include 'h1hydro.inc' include 'h1et.inc' include 'h1temp.inc' include 'w1clig.inc' include 'timer.fi' include 'crop/prevstate.inc' include 'manage/tcrop.inc' include 'decomp/decomp.inc' ! Local Variables integer lay ! + + + END OF SPECIFICATIONS + + + call timer(TIMCROP,TIMSTART) ! Note that crop "may" really require (admbgz + admrtz) in place of admbgz ! because crop wants to know the amount of biomass in each soil layer ! for nutrient cycling. However, since the nutrient cycling is supposed ! to be disabled, we won't worry about it right now. LEW - 04/23/99 if (am0cdb.eq.1) call cdbug(sr, nslay(sr)) call crop(nslay(sr), aszlyt(1,sr), aszlyd(1,sr), asdblk(1,sr), & & asfcce(1,sr), asfom(1,sr), asfcec(1,sr), asfsmb(1,sr), & & asfcla(1,sr), as0ph(1,sr), asftan(1,sr), asftap(1,sr), & & asmno3(sr), & & ac0bn1(sr), ac0bn2(sr), ac0bn3(sr), & & ac0bp1(sr), ac0bp2(sr), ac0bp3(sr), & & ac0ck(sr), acgrf(sr), acehu0(sr), aczmxc(sr), & & ac0nam(sr),ac0idc(sr), acxrow(sr), & & actdtm(sr), aczmrt(sr), actmin(sr), actopt(sr), & & ac0fd1(1,sr), ac0fd2(1,sr), ac0fd1(2,sr), ac0fd2(2,sr), & & ac0bceff(sr), & & admbgz(1,1,sr), ac0alf(sr), ac0blf(sr), ac0clf(sr), & & ac0dlf(sr), ac0arp(sr), ac0brp(sr), ac0crp(sr), & & ac0drp(sr), ac0aht(sr), ac0bht(sr), & & ac0sla(sr), ac0hue(sr), actverndel(sr), & & aweirr, awtdmx, awtdmn, awzdpt, & & ahtsmx(1,sr), ahtsmn(1,sr), & & ahzpta, ahzeta, ahzptp, ahfwsf(sr), & & am0cif, am0cgf, & & acthudf(sr), acbaflg(sr), acbaf(sr), acyraf(sr), & & achyfg(sr), acthum(sr), acdpop(sr), acdmaxshoot(sr), & & ac0transf(sr), ac0storeinit(sr), acfshoot(sr), & & ac0growdepth(sr), acfleafstem(sr), ac0shoot(sr), & & ac0diammax(sr), ac0ssa(sr), ac0ssb(sr), & & acfleaf2stor(sr), acfstem2stor(sr), acfstor2stor(sr), & & acyld_coef(sr), acresid_int(sr), acxstm(sr), & & acmstandstem(sr), acmstandleaf(sr), acmstandstore(sr), & & acmflatstem(sr), acmflatleaf(sr), acmflatstore(sr), & & acmshoot(sr), acmtotshoot(sr), acmbgstemz(1,sr), & & acmrootstorez(1,sr), acmrootfiberz(1,sr), & & aczht(sr), aczshoot(sr), acdstm(sr), aczrtd(sr), & & acdayap(sr), acdayam(sr), acthucum(sr), actrthucum(sr), & & acgrainf(sr), aczgrowpt(sr), acfliveleaf(sr), & & acleafareatrend(sr), actwarmdays(sr), actchillucum(sr), & & acthu_shoot_beg(sr), acthu_shoot_end(sr), & & acxstmrep(sr), & & prevstandstem(sr), prevstandleaf(sr), prevstandstore(sr), & & prevflatstem(sr), prevflatleaf(sr), prevflatstore(sr), & & prevmshoot(sr), prevmtotshoot(sr), prevbgstemz(1,sr), & & prevrootstorez(1,sr), prevrootfiberz(1,sr), & & prevht(sr), prevzshoot(sr), prevstm(sr), prevrtd(sr), & & prevdayap(sr), prevhucum(sr), prevrthucum(sr), & & prevgrainf(sr), prevchillucum(sr), prevliveleaf(sr), & & daysim, acdayspring(sr), aczloc_regrow(sr), & & atmstandstem(sr), atmstandleaf(sr), atmstandstore(sr), & & atmflatstem(sr), atmflatleaf(sr), atmflatstore(sr), & & atmbgstemz(1,sr), & & atzht(sr), atdstm(sr), atxstmrep(sr), atgrainf(sr) ) ! check for abandoned stems in crop regrowth if( ( atmstandstem(sr) + atmstandleaf(sr) + atmstandstore(sr) & & + atmflatstem(sr) + atmflatleaf(sr) + atmflatstore(sr) ) & & .gt. 0.0 ) then ! zero out residue pools which crop is not transferring atmflatrootstore(sr) = 0.0 atmflatrootfiber(sr) = 0.0 do lay = 1, nslay(sr) atmbgleafz(lay,sr) = 0.0 atmbgstorez(lay,sr) = 0.0 atmbgrootstorez(lay,sr) = 0.0 atmbgrootfiberz(lay,sr) = 0.0 end do call trans( & & atmstandstem(sr), atmstandleaf(sr), atmstandstore(sr), & & atmflatstem(sr), atmflatleaf(sr), atmflatstore(sr), & & atmflatrootstore(sr), atmflatrootfiber(sr), & & atmbgstemz(1,sr), atmbgleafz(1,sr), atmbgstorez(1,sr), & & atmbgrootstorez(1,sr), atmbgrootfiberz(1,sr), & & atzht(sr), atdstm(sr), atxstmrep(sr), atgrainf(sr), & & admstandstem(1,sr), admstandleaf(1,sr), admstandstore(1,sr),& & admflatstem(1,sr), admflatleaf(1,sr), admflatstore(1,sr), & & admflatrootstore(1,sr), admflatrootfiber(1,sr), & & admbgstemz(1,1,sr), admbgleafz(1,1,sr), admbgstorez(1,1,sr),& & admbgrootstorez(1,1,sr), admbgrootfiberz(1,1,sr), & & adzht(1,sr), addstm(1,sr), adxstmrep(1,sr), adgrainf(1,sr), & & ac0nam(sr), acxstm(sr), acrbc(sr), ac0sla(sr), ac0ck(sr), & & acdkrate(1,sr), accovfact(sr), acddsthrsh(sr), achyfg(sr), & & acresevapa(sr), acresevapb(sr), & & ad0nam(1,sr),adxstm(1,sr),adrbc(1,sr),ad0sla(1,sr),ad0ck(1,sr),& & dkrate(1,1,sr), covfact(1,sr), ddsthrsh(1,sr), adhyfg(1,sr),& & adresevapa(1,sr), adresevapb(1,sr), & & cumdds(1,sr), cumddf(1,sr), cumddg(1,1,sr), & & nslay(sr) ) end if ! update all derived globals for crop global variables call cropupdate( & & acmstandstem(sr), acmstandleaf(sr), acmstandstore(sr), & & acmflatstem(sr), acmflatleaf(sr), acmflatstore(sr), & & acmshoot(sr), acmbgstemz(1,sr), & & acmrootstorez(1,sr),acmrootfiberz(1,sr), & & aczht(sr), acdstm(sr), aczrtd(sr), & & acthucum(sr), aczgrowpt(sr), acmbgstem(sr), & & acmrootstore(sr), acmrootfiber(sr), acxstmrep(sr), & & acm(sr), acmst(sr), acmf(sr), acmrt(sr), acmrtz(1,sr), & & acrcd(sr), aszrgh(sr), asxrgs(sr), asargo(sr), & & acrsai(sr), acrlai(sr), acrsaz(1,sr), acrlaz(1,sr), & & acffcv(sr), acfscv(sr), acftcv(sr), acfcancov(sr), & & ac0rg(sr), acxrow(sr), & & nslay(sr), ac0ssa(sr), ac0ssb(sr), ac0sla(sr), & & accovfact(sr), ac0ck(sr), acxstm(sr), acdpop(sr) ) ! dependent variables have been updated am0cropupfl = 0 if (am0cdb.eq.1) call cdbug(sr, nslay(sr)) call timer(TIMCROP,TIMSTOP) end