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_GHA2000
                0005 
                0006 C     !INTERFACE: ======================================================
                0007       SUBROUTINE SUN_GHA2000(
                0008      I                        t, dpsi, eps,
                0009      O                        gha )
                0010 
                0011 C     !DESCRIPTION:
                0012 C  This subroutine computes the Greenwich hour angle in degrees for the
                0013 C  input time.  It uses the model referenced in The Astronomical Almanac
                0014 C  for 1984, Section S (Supplement) and documented in Exact
                0015 C  closed-form geolocation algorithm for Earth survey sensors, by
                0016 C  F.S. Patt and W.W. Gregg, Int. Journal of Remote Sensing, 1993.
                0017 C  It includes the correction to mean sideral time for nutation
                0018 C  as well as precession.
                0019 C
                0020 C       Program written by:     Frederick S. Patt
                0021 C                               General Sciences Corporation
                0022 C                               November 2, 1992
                0023 
                0024 C     !USES: ===========================================================
                0025       IMPLICIT NONE
                0026 #include "SIZE.h"
                0027 #include "EEPARAMS.h"
                0028 #include "PARAMS.h"
                0029 
                0030 C     !INPUT PARAMETERS: ===============================================
                0031 C     t    :: Time in days since January 1, 2000 at 12 hours UT
                0032 C     dpsi :: Nutation in longitude (degrees)
                0033 C     eps  :: Obliquity of the Ecliptic (degrees)
                0034       _RL t, dpsi, eps
                0035 
                0036 C     !OUTPUT PARAMETERS: ==============================================
                0037 C     gha :: Greenwich hour angle (degrees)
                0038       _RL gha
                0039 CEOP
                0040 
                0041 #ifdef ALLOW_SUN
                0042 
                0043 C     !LOCAL VARIABLES: ================================================
                0044       INTEGER iday
                0045       _RL fday, gmst
                0046 
                0047       fday = t + 0.5 _d 0
                0048       iday = INT(fday)
                0049       fday = fday - iday
                0050 
                0051 C  Compute Greenwich Mean Sidereal Time (degrees)
                0052       gmst = 100.4606184 _d 0 + 0.9856473663 _d 0*t + 2.908 _d -13*t*t
                0053 
                0054 C  Include apparent time correction and time-of-day
                0055       gha = gmst + dpsi*COS(eps*deg2rad) + fday*360.0 _d 0
                0056       gha = MOD(gha,360.0 _d 0)
                0057       IF (gha .LT. 0.0 _d 0) THEN
                0058         gha = gha + 360.0 _d 0
                0059       ENDIF
                0060 
                0061 #endif
                0062 
                0063       RETURN
                0064       END