OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
gha2000.f
Go to the documentation of this file.
1  subroutine gha2000(iyr,day,gha)
2 
3 c this subroutine computes the greenwich hour angle in degrees for the
4 c input time. it uses the model referenced in the astronomical almanac
5 c for 1984, section s(supplement) and documented in "Exact
6 c closed-form geolocation algorithm for Earth survey sensors", by
7 c f.s. patt and w.w. gregg, int. journal of remote sensing, 1993.
8 c it includes the correction to mean sideral time for nutation
9 c as well as precession.
10 
11 c calling arguments
12 
13 c name Type i/o description
14 c
15 c iyr i*4 i year(four digits)
16 c day r*8 i day(time of day as fraction)
17 c gha r*8 o greenwich hour angle(degrees)
18 
19 
20 c subprograms referenced:
21 c
22 c jd computes julian day from calendar date
23 c ephparms computes mean solar longitude and anomaly and
24 c mean lunar lontitude and ascending node
25 c nutate compute nutation corrections to lontitude and
26 c obliquity
27 c
28 c
29 c Program written by: frederick s. patt
30 c general sciences corporation
31 c november 2, 1992
32 c
33 c modification history:
34 c
35  implicit real*8 (a-h,o-z)
36  common /nutcm/dpsi,eps,nutime
37  common /gconst/pi,radeg,re,rem,f,omf2,omegae
38  data imon/1/,nutime/-9999/
39 
40 c compute days since j2000
41  iday = day
42  fday = day - iday
43  jday = jd(iyr,imon,iday)
44  t = jday - 2451545.5d0 + fday
45 
46 c compute greenwich mean sidereal time(degrees)
47  gmst = 100.4606184d0 + 0.9856473663d0*t + 2.908d-13*t*t
48 
49 c check if need to compute nutation correction for this day
50  nt = t
51  if (nt.ne.nutime) then
52  nutime = nt
53  call ephparms(t,xls,gs,xlm,omega)
54  call nutate(t,xls,gs,xlm,omega,dpsi,eps)
55  end if
56 
57 c include apparent time correction and time-of-day
58  gha = gmst + dpsi*cos(eps/radeg) + fday*360.d0
59  gha = dmod(gha,360.d0)
60  if (gha.lt.0.d0) gha = gha + 360.d0
61 
62  return
63  end
64 
65  subroutine ephparms(t,xls,gs,xlm,omega)
66 
67 c this subroutine computes ephemeris parameters used by other mission
68 c operations routines: the solar mean longitude and mean anomaly, and
69 c the lunar mean longitude and mean ascending node. it uses the model
70 c referenced in the astronomical almanac for 1984, section s
71 c(supplement) and documented and documented in "Exact closed-form
72 c geolocation algorithm for Earth survey sensors", by f.s. patt and
73 c w.w. gregg, int. journal of remote sensing, 1993. these parameters
74 c are used to compute the solar longitude and the nutation in
75 c longitude and obliquity.
76 
77 c calling arguments
78 
79 c name Type i/o description
80 c
81 c t r*8 i time in days since january 1, 2000 at
82 c 12 hours ut
83 c xls r*8 o mean solar longitude(degrees)
84 c gs r*8 o mean solar anomaly(degrees)
85 c xlm r*8 o mean lunar longitude(degrees)
86 c omega r*8 o ascending node of mean lunar orbit
87 c(degrees)
88 c
89 c
90 c Program written by: frederick s. patt
91 c general sciences corporation
92 c november 2, 1992
93 c
94 c modification history:
95 c
96  implicit real*8 (a-h,o-z)
97 
98 c sun mean longitude
99  xls = 280.46592d0 + 0.9856473516d0*t
100  xls = dmod(xls,360.d0)
101 
102 c sun mean anomaly
103  gs = 357.52772d0 + 0.9856002831d0*t
104  gs = dmod(gs,360.d0)
105 
106 c moon mean longitude
107  xlm = 218.31643d0 + 13.17639648d0*t
108  xlm = dmod(xlm,360.d0)
109 
110 c ascending node of moon's Mean Orbit
111  omega = 125.04452d0 - 0.0529537648d0*t
112  omega = dmod(omega,360.d0)
113 
114  return
115  end
116 
117  subroutine nutate(t,xls,gs,xlm,omega,dpsi,eps)
118 
119 c This subroutine computes the nutation in longitude and the obliquity
120 c of the ecliptic corrected for nutation. It uses the model referenced
121 c in The Astronomical Almanac for 1984, Section S (Supplement) and
122 c documented in "Exact closed-form geolocation algorithm for Earth
123 c survey sensors", by F.S. Patt and W.W. Gregg, Int. Journal of
124 c Remote Sensing, 1993. These parameters are used to compute the
125 c apparent time correction to the Greenwich Hour Angle and for the
126 c calculation of the geocentric Sun vector. The input ephemeris
127 c parameters are computed using subroutine ephparms. Terms are
128 c included to 0.1 arcsecond.
129 
130 c Calling Arguments
131 
132 c Name Type I/O Description
133 c
134 c t R*8 I Time in days since January 1, 2000 at
135 c 12 hours UT
136 c xls R*8 I Mean solar longitude (degrees)
137 c gs R*8 I Mean solar anomaly (degrees)
138 c xlm R*8 I Mean lunar longitude (degrees)
139 c Omega R*8 I Ascending node of mean lunar orbit
140 c (degrees)
141 c dPsi R*8 O Nutation in longitude (degrees)
142 c Eps R*8 O Obliquity of the Ecliptic (degrees)
143 c (includes nutation in obliquity)
144 c
145 c
146 c Program written by: Frederick S. Patt
147 c General Sciences Corporation
148 c October 21, 1992
149 c
150 c Modification History:
151 c
152  implicit real*8 (a-h,o-z)
153  common /gconst/pi,radeg,re,rem,f,omf2,omegae
154 
155 c Nutation in Longitude
156  dpsi = - 17.1996D0*sin(omega/radeg)
157  * + 0.2062D0*sin(2.0D0*omega/radeg)
158  * - 1.3187D0*sin(2.0D0*xls/radeg)
159  * + 0.1426D0*sin(gs/radeg)
160  * - 0.2274D0*sin(2.0D0*xlm/radeg)
161 
162 c Mean Obliquity of the Ecliptic
163  epsm = 23.439291d0 - 3.560d-7*t
164 
165 c Nutation in Obliquity
166  deps = 9.2025D0*cos(omega/radeg) + 0.5736D0*cos(2.0D0*xls/radeg)
167 
168 c True Obliquity of the Ecliptic
169  eps = epsm + deps/3600.d0
170 
171  dpsi = dpsi/3600.d0
172 
173  return
174  end
short int ephemeris(double tjd, body *cel_obj, short int origin, double *pos, double *vel)
float mean(float *xs, int sample_size)
Definition: numerical.c:81
int32_t jday(int16_t i, int16_t j, int16_t k)
Definition: jday.c:4
#define re
Definition: l1_czcs_hdf.c:701
Definition: jd.py:1
===========================================================================V5.0.48(Terra) 03/20/2015 Changes shown below are differences from MOD_PR02 V5.0.46(Terra)============================================================================Changes noted for V6.1.20(Terra) below were also instituted for this version.============================================================================V6.1.20(Terra) 03/12/2015 Changes shown below are differences from MOD_PR02 V6.1.18(Terra)============================================================================Changes from v6.1.18 which may affect scientific output:A situation can occur in which a scan which contains sector rotated data has a telemetry value indicating the completeness of the sector rotation. This issue is caused by the timing of the instrument command to perform the sector rotation and the recording of the telemetry point that reports the status of sector rotation. In this case a scan is considered valid by L1B and pass through the calibration - reporting extremely high radiances. Operationally the TEB calibration uses a 40 scan average coefficient, so the 20 scans(one mirror side) after the sector rotation are contaminated with anomalously high radiance values. A similar timing issue appeared before the sector rotation was fixed in V6.1.2. Our analysis indicates the ‘SET_FR_ENC_DELTA’ telemetry correlates well with the sector rotation encoder position. The use of this telemetry point to determine scans that are sector rotated should fix the anomaly occured before and after the sector rotation(usually due to the lunar roll maneuver). The fix related to the sector rotation in V6.1.2 is removed in this version.============================================================================V6.1.18(Terra) 10/01/2014 Changes shown below are differences from MOD_PR02 V6.1.16(Terra)============================================================================Added doi attributes to NRT(Near-Real-Time) product.============================================================================V6.1.16(Terra) 01/27/2014 Changes shown below are differences from MOD_PR02 V6.1.14(Terra)============================================================================Migrate to SDP Toolkit 5.2.17============================================================================V6.1.14(Terra) 06/26/2012 Changes shown below are differences from MOD_PR02 V6.1.12(Terra)============================================================================Added the doi metadata to L1B product============================================================================V6.1.12(Terra) 04/25/2011 Changes shown below are differences from MOD_PR02 V6.1.8(Terra)============================================================================1. The algorithm to calculate uncertainties for reflective solar bands(RSB) is updated. The current uncertainty in L1B code includes 9 terms from prelaunch analysis. The new algorithm regroups them with the new added contributions into 5 terms:u1:the common term(AOI and time independent) and
Definition: HISTORY.txt:126
short int nutate(double tjd, short int fn1, double *pos, double *pos2)
#define pi
Definition: vincenty.c:23
#define omf2
Definition: l1_czcs_hdf.c:703
#define f
Definition: l1_czcs_hdf.c:702
for(i=0;i< NROOTS;i++) s[i]
Definition: decode_rs.h:85
integer function julian(DAY, MONTH, YEAR)
Definition: julian.f:2
#define degrees(radians)
Definition: niwa_iop.c:30
void precession(double tjd1, double *pos, double tjd2, double *pos2)
int ephparms(double t, double &xls, double &gs, double &xlm, double &omega)