anchor.diff:  !--------------------------------------------------------------------
   !
         integer idate(14),dtpr,tmpr,result
  -      real xmonth(12),xday(7)
  +      integer i,j,k,iday,idt,mon,jd
  +      character * 3   xmonth(12),xday(7), amonth,aday
         character * 128 wrk
  -      data xmonth / 4HJAN ,4HFEB ,4HMAR ,4HAPR ,4HMAY ,4HJUN , &
  -                    4HJUL ,4HAUG ,4HSEP ,4HOCT ,4HNOV ,4HDEC /
  -      data xday   / 4HSUN ,4HMON ,4HTUE ,4HWED ,4HTHU , &
  -                    4HFRI ,4HSAT /
  +      integer, external :: newdate
  +      data xmonth / 'JAN','FEB','MAR','APR','MAY','JUN', &
  +                    'JUL','AUG','SEP','OCT','NOV','DEC' /
  +      data xday   / 'SUN','MON','TUE','WED','THU', &
  +                    'FRI','SAT' /
   !
   !---------------------------------------------------------------------
   !
  
positive.code:             ndays = Calendar_Adjust(tdate1,tdate2,'E',adding)
              tdate1 = tdate1 + (ndays*24)
            endif
            result=newdate(tdate1,idate1,runnum,-6)
            if (result.ne.0)  then
               print *,'after if adding,if rounding',tdate1
               goto 2
  
negative.code: 105   continue
        stamp=dat2(1)
        if (stamp .lt. -1) then
          stamp8=stamp ; stamp8=and(masque32,stamp8)
          dat1=0
          dat3=0
          date_unsigned = stamp8
  !!!     if (w16(1).eq.0) date_unsigned = ishft(stamp8,-32)
          if (date_unsigned < troisg .or. &
             date_unsigned > troisg + max_offset) then
             print *,'newdate error: invalid stamp for mode -6, ', &
  