       program read_pos_of_sun
C
       implicit none
C
       integer*4 TIME(2)	! Time: YYYYDOY, and millisecond of day
       integer*4 ISTATUS
       integer*4 YEAR, N
       real*8 SUNPOS(3), SUNVEL(3)


       N = 2024

       DO 10 YEAR = 1996, N
          TIME(1) = YEAR * 1000 + 1
          TIME(2) = 0
          call ICSS_POS_OF_SUN(TIME, SUNPOS, SUNVEL, ISTATUS)
C          IF (ISTATUS .NE. 0) GOTO 992
          print *, ISTATUS,TIME(1), SUNPOS(1), SUNPOS(2), SUNPOS(3)
10     CONTINUE

       DO 20 N = 1, 365
          TIME(1) = 2011 * 1000 + N
          TIME(2) = 0
          call ICSS_POS_OF_SUN(TIME, SUNPOS, SUNVEL, ISTATUS)
C          IF (ISTATUS .NE. 0) GOTO 992
          print *, ISTATUS,TIME(1), SUNPOS(1), SUNPOS(2), SUNPOS(3)
20     CONTINUE


992    CONTINUE
       IF (ISTATUS .NE. 0) THEN
           print *, 'Oohhh No!'
       ENDIF
C
       stop
       end






