Back to home page

darwin3

 
 

    


File indexing completed on 2024-12-17 18:39:14 UTC

view on githubraw file Latest commit 27f9df09 on 2018-02-19 15:43:37 UTC
27f9df093b Oliv*0001 #include "SUN_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C     !ROUTINE: SUN_JD
                0005 C     !INTERFACE: ======================================================
                0006       FUNCTION SUN_JD( i, j, k )
                0007 
                0008 C     !DESCRIPTION:
                0009 C  This function converts a calendar date to the corresponding Julian
                0010 C  day starting at noon on the calendar date.  The algorithm used is
                0011 C  from Van Flandern and Pulkkinen, Ap. J. Supplement Series 41,
                0012 C  November 1979, p. 400.
                0013 C
                0014 C     Written by Frederick S. Patt, GSC, November 4, 1992
                0015 
                0016 C     !USES: ===========================================================
                0017       IMPLICIT NONE
                0018 
                0019 C     !INPUT PARAMETERS: ===============================================
                0020 C     i :: Year - e.g. 1970
                0021 C     j :: Month - (1-12)
                0022 C     k :: Day - (1-31)
                0023       INTEGER i, j, k
                0024 
                0025 C     !OUTPUT PARAMETERS: ==============================================
                0026 C     SUN_JD :: Julian day
                0027       INTEGER SUN_JD
                0028 CEOP
                0029 
                0030 #ifdef ALLOW_SUN
                0031 
                0032       SUN_JD = 367*i - 7*(i+(j+9)/12)/4 + 275*j/9 + k + 1721014
                0033 
                0034 c  This additional calculation is needed only for dates outside of the
                0035 c  period March 1, 1900 to February 28, 2100
                0036 c       sun_jd = sun_jd + 15 - 3*((i+(j-9)/7)/100+1)/4
                0037 
                0038 #endif
                0039 
                0040       RETURN
                0041       END