c file: 'cdbug.for' subroutine cdbug(cd,cm,cy,isr,slay) c + + + PURPOSE + + + c This program prints out many of the global variables before c and after the call to CROP provide a comparison of values c which may be changed by CROP c author: John Tatarko c version: 09/01/92 c + + + KEY WORDS + + + c wind, erosion, hydrology, tillage, soil, crop, decomposition c management c + + + GLOBAL COMMON BLOCKS + + + *$noereference include 'p1werm.inc' include 'm1subr.inc' include 's1layr.inc' include 's1phys.inc' include 's1agg.inc' include 's1dbh.inc' include 's1dbc.inc' include 's1layd.inc' include 's1sgeo.inc' include 'c1db1.inc' include 'c1db2.inc' include 'c1glob.inc' include 'c1info.inc' include 'd1glob.inc' include 'w1clig.inc' include 'w1wind.inc' include 'h1et.inc' include 'h1hydro.inc' include 'h1db1.inc' include 'h1temp.inc' c + + + LOCAL COMMON BLOCKS + + + include 'crop/cenvr.inc' include 'main/main.inc' *$reference c + + + LOCAL VARIABLES + + + integer cd, cm, cy, i isr, i l, i slay, i tisr, tday, tmo, tyr c + + + LOCAL DEFINITIONS + + + c cd - The current day of simulation month. c cm - The current month of simulation year. c cy - The current year of simulation run. c isr - This variable holds the subregion index. c l - This variable is an index on soil layers. c + + + SUBROUTINES CALLED + + + c + + + FUNCTIONS CALLED + + + c + + + UNIT NUMBERS FOR INPUT/OUTPUT DEVICES + + + c * = screen and keyboard c 27 = debug CROP c + + + DATA INITIALIZATIONS + + + c + + + INPUT FORMATS + + + c + + + OUTPUT FORMATS + + + 2030 format ('**',1x,2(i2,'/'),i4,' After call to CROP Subr &egion No. ',i3) 2031 format ('**',1x,2(i2,'/'),i4,' Before call to CROP Subr &egion No. ',i3) 2032 format (' awzdpt awtdmx awtdmn aweirr awudmx awudmn ', & ' awtdpt awadir awhrmx awrrh ') 2038 format (f7.2,9f8.2) c 2045 format ('Subregion Number',i3) 2050 format ('amrslp(',i2,') acftcv(',i2,') acrlai(',i2,')', & ' aczrtd(',i2,') admf(',i2,') ahfwsf(',i2,')', & ' ac0nam(',i2,')') 2051 format (2f10.2,2f10.5,2x,f10.2,f10.2,3x,a12) 2052 format ('actdtm(',i2,') sum-phu(',i2,') acmst(',i2,')', & ' acmrt(',i2,') ahzeta ahzetp ', & ' ahzpta ') 2053 format (i10, 4f10.2,2f12.2) 2054 format (' ahzea ahzep ahzptp ', & ' actmin(',i2,') actopt(',i2,') as0rrk(',i2,')', & ' aslrr(',i2,')') 2055 format (2f10.2,2f10.3,3f12.2) 2056 format('layer aszlyt ahrsk ahrwc ahrwcs ahrwca', & ' ahrwcf ahrwcw ah0cb aheaep ahtsmx ahtsmn') 2060 format (i4,1x,f7.2,1x,e7.1,f6.2,4f7.2,f6.2,3f7.2) 2065 format(' layer asfsan asfsil asfcla asfom asdblk aslagm as0ags', & ' aslagn aslagx aseags') 2070 format (i4,2x,3f7.2,f7.3,2f7.2,f8.2,f7.3,2f8.2) c + + + END SPECIFICATIONS + + + data tisr, tday, tmo, tyr /4*0/ c write weather cligen and windgen variables if ((cd .eq. tday) .and. (cm .eq. tmo) .and. (cy .eq. tyr) .and. & (isr .eq. tisr)) then write(27,2030) cd,cm,cy,isr else write(27,2031) cd,cm,cy,isr end if write(27,2032) write(27,2038) awzdpt, awtdmx, awtdmn, aweirr, awudmx, awudmn, & awtdpt, awadir, awhrmx, awrrh c write(27,2045) isr write(27,2050) isr, isr, isr, isr, isr, isr, isr C admf(isr) is not dimensioned correctly anymore - LEW 04/23/99 C just commenting it out for now since it is a debug routine c write(27,2051) amrslp(isr), acftcv(isr), acrlai(isr), aczrtd(isr), c & admf(isr), ahfwsf(isr), ac0nam(isr) write(27,2052) isr, isr, isr, isr write(27,2053) actdtm(isr), shu, acmst(isr), acmrt(isr), & ahzeta, ahzetp, ahzpta write(27,2054) isr, isr, isr, isr write(27,2055) ahzea, ahzep, ahzptp, actmin(isr), & actopt(isr), as0rrk(isr), aslrr(isr) write(27,2056) do 200 l = 1,slay write(27,2060) l, aszlyt(l,isr), ahrsk(l,isr), ahrwc(l,isr), & ahrwcs(l,isr), ahrwca(l,isr), ahrwcf(l,isr), & ahrwcw(l,isr), ah0cb(l,isr), aheaep(l,isr), & ahtsmx(l,isr), ahtsmn(l,isr) 200 continue write(27,2065) do 300 l=1,slay write(27,2070) l, asfsan(l,isr), asfsil(l,isr), asfcla(l,isr), & asfom(l,isr), asdblk(l,isr), & aslagm(l,isr), as0ags(l,isr), aslagn(l,isr), & aslagx(l,isr), aseags(l,isr) 300 continue tisr = isr tday = cd tmo = cm tyr = cy return end