1 |
jahn |
1.2 |
C $Header: /u/gcmpack/MITgcm_contrib/darwin2/pkg/radtrans/radtrans_gha2000.F,v 1.1 2011/04/13 18:56:26 jahn Exp $ |
2 |
|
|
C $Name: $ |
3 |
jahn |
1.1 |
|
4 |
|
|
#include "RADTRANS_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CBOP |
7 |
|
|
C !ROUTINE: RADTRANS_GHA2000 |
8 |
|
|
|
9 |
|
|
C !INTERFACE: ====================================================== |
10 |
|
|
subroutine radtrans_gha2000 (radeg, iyr, imon, day, gha) |
11 |
|
|
|
12 |
|
|
C !DESCRIPTION: |
13 |
|
|
c This subroutine computes the Greenwich hour angle in degrees for the |
14 |
|
|
c input time. It uses the model referenced in The Astronomical Almanac |
15 |
|
|
c for 1984, Section S (Supplement) and documented in Exact |
16 |
|
|
c closed-form geolocation algorithm for Earth survey sensors, by |
17 |
|
|
c F.S. Patt and W.W. Gregg, Int. Journal of Remote Sensing, 1993. |
18 |
|
|
c It includes the correction to mean sideral time for nutation |
19 |
|
|
c as well as precession. |
20 |
|
|
|
21 |
|
|
c Calling Arguments |
22 |
|
|
|
23 |
|
|
c Name Type I/O Description |
24 |
|
|
c |
25 |
|
|
c iyr I*4 I Year (four digits) |
26 |
|
|
c day R*8 I Day (time of day as fraction) |
27 |
|
|
c gha R*8 O Greenwich hour angle (degrees) |
28 |
|
|
|
29 |
|
|
|
30 |
|
|
c Subprograms referenced: |
31 |
|
|
c |
32 |
|
|
c JD Computes Julian day from calendar date |
33 |
|
|
c EPHPARMS Computes mean solar longitude and anomaly and |
34 |
|
|
c mean lunar lontitude and ascending node |
35 |
|
|
c NUTATE Compute nutation corrections to lontitude and |
36 |
|
|
c obliquity |
37 |
|
|
c |
38 |
|
|
c |
39 |
|
|
c Program written by: Frederick S. Patt |
40 |
|
|
c General Sciences Corporation |
41 |
|
|
c November 2, 1992 |
42 |
|
|
c |
43 |
|
|
c Modification History: |
44 |
|
|
c |
45 |
|
|
C !USES: =========================================================== |
46 |
|
|
IMPLICIT NONE |
47 |
|
|
#include "RADTRANS_VARS.h" |
48 |
|
|
|
49 |
|
|
C !INPUT PARAMETERS: =============================================== |
50 |
|
|
INTEGER myThid |
51 |
jahn |
1.2 |
_RL radeg, day |
52 |
|
|
INTEGER iyr, imon |
53 |
jahn |
1.1 |
|
54 |
|
|
C !OUTPUT PARAMETERS: ============================================== |
55 |
|
|
_RL gha |
56 |
|
|
|
57 |
|
|
C !FUNCTIONS: ====================================================== |
58 |
|
|
INTEGER radtrans_jd |
59 |
|
|
EXTERNAL radtrans_jd |
60 |
|
|
|
61 |
|
|
C !LOCAL VARIABLES: ================================================ |
62 |
|
|
integer iday,jday,nt |
63 |
|
|
_RL fday, t, gmst, xls, gs, xlm, omega |
64 |
|
|
|
65 |
|
|
data nutime /-99999/ |
66 |
|
|
CEOP |
67 |
|
|
|
68 |
|
|
c Compute days since J2000 |
69 |
|
|
iday = int(day) |
70 |
|
|
fday = day - iday |
71 |
|
|
jday = radtrans_jd(iyr,imon,iday) |
72 |
|
|
t = jday - 2451545.5D0 + fday |
73 |
|
|
c Compute Greenwich Mean Sidereal Time (degrees) |
74 |
|
|
gmst = 100.4606184D0 + 0.9856473663D0*t + 2.908D-13*t*t |
75 |
|
|
|
76 |
|
|
c Check if need to compute nutation correction for this day |
77 |
|
|
nt = int(t) |
78 |
|
|
if (nt.ne.nutime) then |
79 |
|
|
nutime = nt |
80 |
|
|
call radtrans_ephparms (t, xls, gs, xlm, omega) |
81 |
|
|
call radtrans_nutate (radeg, t, xls, gs, xlm, omega, dpsi, eps) |
82 |
|
|
end if |
83 |
|
|
|
84 |
|
|
c Include apparent time correction and time-of-day |
85 |
|
|
gha = gmst + dpsi*cos(eps/radeg) + fday*360.0D0 |
86 |
|
|
gha = mod(gha,360.0) |
87 |
|
|
if (gha.lt.0.0D0) gha = gha + 360.0D0 |
88 |
|
|
|
89 |
|
|
return |
90 |
|
|
end |
91 |
|
|
|