c file: huc1.for subroutine huc1 (bctmin, bwtdav, bwtdmn) 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, bwtdmn 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 (am0drlfl.eq.0) 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 c start dormancy if (drmfl .eq. 1)goto 45 if (hrlt .le. hlmn0) then if (bwtdmn.le.-5.) then drmfl = 1 endif endif 45 continue if (hrlt.gt.hlmn0) drmfl=0 if (drmfl.eq.1) then am0drmfl=1 goto 95 endif 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