C******************** START FILE NSTXYR.FOR ; GROUP TFTRG1 *************
C------------------------------------------------------------------
C& TCVYR  GENERATE SHOT YEAR FROM SHOT NUMBER BY HISTORICAL ANALYSIS
C
C  TCV vsn adapted from TFTRG1:TFTRYR.FOR
C  I don't have all the calender year boundary shot numbers!
C
      SUBROUTINE TCVYR(NSHOT,ZYEAR)
C
      implicit NONE
C
      integer NSHOT
      CHARACTER*(*) ZYEAR
C
      integer ilen,ilen1,ilen3
C
C  A CAREFUL EXAMINATION OF THE RECORD YIELDS...
C
      zyear=' '
      ilen=len(zyear)
C
      ilen1 = max(1,ilen-1) ! RGA, quick fix for out of range error
      ilen3 = max(1,ilen-3)
      if(ilen.gt.3) then
         ZYEAR(ilen3:ilen)='2015'
         IF(NSHOT.GE.202514) ZYEAR(ilen3:ilen)='2016'
      else
         ZYEAR(ilen1:ilen)='15'
         IF(NSHOT.GE.202514) ZYEAR(ilen1:ilen)='16'
      endif
C
      RETURN
      END
C******************** END FILE TCVYR.FOR ; GROUP TFTRG1 ***************
 
