anchor.diff:     10 CONTINUE
         IF(SW(9).GT.0) SW9=1.
         IF(SW(9).LT.0) SW9=-1.
  -      IYR = int(YRD/1000.)
  +      IYR = YRD/1000.
         DAY = YRD - IYR*1000.
         XLONG=LONG
   C      Eq. A22 (remainder of code)
  
positive.code: C  PARMS NOT USED: 83, 90,100,140-150
     49 CONTINUE
        TINF=P(31)
        DO I = 1,NSW
          TINF = TINF + ABS(SW(I))*T(I)
        enddo
        GLOBE7 = TINF
        END FUNCTION GLOBE7
  C-----------------------------------------------------------------------
        SUBROUTINE TSELEC(SV)
  C        SET SWITCHES
  C        Output in  COMMON/CSW/SW(25),ISW,SWC(25)
  C        SW FOR MAIN TERMS, SWC FOR CROSS TERMS
  C
  C        TO TURN ON AND OFF PARTICULAR VARIATIONS CALL TSELEC(SV),
  C        WHERE SV IS A 25 ELEMENT ARRAY CONTAINING 0. FOR OFF, 1.
  C        FOR ON, OR 2. FOR MAIN EFFECTS OFF BUT CROSS TERMS ON
  C
  C        To get current values of SW: CALL TRETRV(SW)
  C
        Real,intent(in) :: SV(25)
        Real,intent(out) :: SVV(25) !from Python use gtd7.csw.sw instead of tretrv
  
        Real SAV(25)
        COMMON/CSW/SW(25),ISW,SWC(25)
        SAVE
        DO I = 1,25
          SAV(I)=SV(I)
          SW(I)=MOD(SV(I),2.)
          IF(ABS(SV(I)).EQ.1.OR.ABS(SV(I)).EQ.2.) THEN
            SWC(I)=1.
          ELSE
            SWC(I)=0.
          ENDIF
        End DO
        ISW=64999
        RETURN
        ENTRY TRETRV(SVV)
        DO I=1,25
          SVV(I)=SAV(I)
        End Do
        END SUBROUTINE TSELEC
  C-----------------------------------------------------------------------
        Real FUNCTION GLOB7S(P)
  C      VERSION OF GLOBE FOR LOWER ATMOSPHERE 10/26/99
        REAL LONG
        COMMON/LPOLY/PLG(9,4),CTLOC,STLOC,C2TLOC,S2TLOC,C3TLOC,S3TLOC,
       $ IYR,DAY,DF,DFA,APD,APDF,APT(4),LONG
        COMMON/CSW/SW(25),ISW,SWC(25)
        Real P(*),T(14)
        SAVE
        DATA DR/1.72142E-2/,DGTR/1.74533E-2/,PSET/2./
        DATA DAYL/-1./,P32,P18,P14,P39/4*-1000./
  
negative.code: C           the drag data used to define this model component.
  C
  C        SUBROUTINES FOR SPECIAL OUTPUTS:
  C        
  C        HIGH ALTITUDE DRAG: EFFECTIVE TOTAL MASS DENSITY 
  C        (SUBROUTINE GTD7D, OUTPUT D(6))
  C           For atmospheric drag calculations at altitudes above 500 km,
  C           call SUBROUTINE GTD7D to compute the "effective total mass
  