c file: huc1.for subroutine huc1 (bctmin, bwtdav) c Author : Amare Retta c + + + PURPOSE + + + c Calculate heat units and daylength c c + + + KEYWORDS + + + C Heat units, daylength c c + + + ARGUMENT DECLARATIONS + + + real bctmin, bwtdav c + + + COMMON BLOCKS + + + c local *$noereference include 'm1flag.inc' include 'crop/cenvr.inc' include 'crop/cgrow.inc' *$reference c c + + + LOCAL VARIABLES REAL x, sd, pi c c + + + OUTPUT FORMATS + + + c2000 FORMAT('+',109x,2(F8.2,1X)) c c + + + END OF SPECIFICATIONS + + + c c skip daylength calculations if region does not have winter dormancy c if (idrm.ne.1) goto 45 c following print for debugging c if (phu.le.0.)goto 95 c CALCULATE DAYLENGTH pi = 3.14159 hrlty = hrlt x = jd-80.25 sd = 0.4102*sin((2.*pi/365.)*x) hrlt = 7.64*acos(-tan(2.*pi*xlat/360.)*tan(sd)) c following print for debugging c write(*,373)bwtdmx,jd,hrlt,hlmn0 c373 format (' bwtdmx=',f6.1,' jd=',i6,' hrlt=',f6.1,' hlmn0=',f6.1) c skip heat unit calculations if still in dormancy period c and set dormancy flag to 1 or 0 c am0drlfl = 1 c if (hrlt .gt. hlmn0) am0drmfl=0 c if (am0drlfl.eq.1) then if (hrlt .le. hlmn0) then am0drmfl = 1 go to 95 endif c endif 45 continue c CALCULATE HEAT UNITS dhu=bwtdav-bctmin if (dhu.lt.0.) dhu=0. shu=shu+dhu hui=shu/phu c WRITE(*,*)'bctmin,bwtdmx,bwtdmn=',bctmin,bwtdmx,bwtdmn 95 continue return end