OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
get_node.f
Go to the documentation of this file.
1  subroutine get_node(nlines,timref,time,pos,vel,xnodel,tnode)
2 c
3 c
4 c purpose: determine longitude and time of descending node crossing
5 c
6 c
7 c calling arguments:
8 c
9 c name Type i/o description
10 c -------- ---- --- -----------
11 c nlines i*4 i number of scan line times
12 c timref r*8 i Size 3 reference time at start line
13 c of data: year, day, sec
14 c time r*8 i array of time in seconds relative to
15 c timref for every scan line
16 c pos r*4 i Size 3 by nlines interpolated position
17 c vel r*4 i Size 3 by nlines interpolated velocity
18 c xnodel r*4 o longitude of descending node
19 c tnode r*8 o time of node crossing in seconds of day
20 c
21 c
22 c by: frederick s. patt, gsc, july 13, 1994
23 c
24 c modification history:
25 c
26  implicit none
27 c
28  integer*4 ind, nlines
29  real*8 timref(3), time(nlines), tnode
30  real*4 pos(3,nlines), vel(3,nlines), xnodel
31  real*4 x, y, rfac, pmag, vmag, on(3), oxymag, orbang
32 
33  real*8 pi,radeg,re,rem,f,omf2,omegae
34  common /gconst/pi,radeg,re,rem,f,omf2,omegae
35 
36 
37 c If orbit data span node crossing, find crossing
38  if ((pos(3,1).gt.0.).and.(pos(3,nlines).lt.0.)) then
39  ind = 1
40  dowhile(pos(3,ind).gt.0.)
41  ind = ind + 1
42  end do
43 
44 c interpolate adjacent vectors to crossing and compute node and time
45  rfac = pos(3,ind-1)/(pos(3,ind-1)-pos(3,ind))
46  x = pos(1,ind)*rfac + pos(1,ind-1)*(1.0-rfac)
47  y = pos(2,ind)*rfac + pos(2,ind-1)*(1.0-rfac)
48  xnodel = radeg*atan2(y,x)
49  tnode = time(ind)*rfac + time(ind-1)*(1.0-rfac) + timref(3)
50 
51 c Else, need to estimate crossing from closest vector
52 c If above equator
53  else if (pos(3,nlines).gt.0) then
54  pmag = sqrt(pos(1,nlines)**2 + pos(2,nlines)**2
55  * + pos(3,nlines)**2)
56  vmag = sqrt(vel(1,nlines)**2 + vel(2,nlines)**2
57  * + vel(3,nlines)**2)
58 c compute orbit normal and node longitude
59  call crossp(pos(1,nlines),vel(1,nlines),on)
60  xnodel = radeg*atan2(-on(1),on(2))
61 c compute angle from position to crossing and time difference
62  oxymag = sqrt(on(1)**2 + on(2)**2)
63  orbang = acos((pos(1,nlines)*on(2)-pos(2,nlines)*on(1))/
64  * (oxymag*pmag))
65  tnode = orbang*pmag/vmag + time(nlines) + timref(3)
66 
67 c Else if below equator
68  else
69  pmag = sqrt(pos(1,1)**2 + pos(2,1)**2
70  * + pos(3,1)**2)
71  vmag = sqrt(vel(1,1)**2 + vel(2,1)**2
72  * + vel(3,1)**2)
73 c compute orbit normal and node longitude
74  call crossp(pos(1,1),vel(1,1),on)
75  xnodel = radeg*atan2(-on(1),on(2))
76 c compute angle from position to crossing and time difference
77  oxymag = sqrt(on(1)**2 + on(2)**2)
78  orbang = -acos((pos(1,1)*on(2)-pos(2,1)*on(1))/
79  * (oxymag*pmag))
80  tnode = orbang*pmag/vmag + time(1) + timref(3)
81 
82  end if
83  return
84  end
float * vector(long nl, long nh)
Definition: nrutil.c:15
#define real
Definition: DbAlgOcean.cpp:26
real *4 function vmag(vec)
Definition: vmag.f:2
void interpolate(int16_t PA_flag, int16_t parm_flag, double DT1, double DT2, float in_lat, float in_lon, float *lat_list, float *lon_list, void *data_p1, void *data_p2, int8_t *qc1, int8_t *qc2, float *intpdata, float *anc_unc, int32_t *int_qc)
Definition: getanc.c:1314
#define re
Definition: l1_czcs_hdf.c:701
===========================================================================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
subroutine crossp(v1, v2, v3)
Definition: crossp.f:2
#define pi
Definition: vincenty.c:23
#define omf2
Definition: l1_czcs_hdf.c:703
#define f
Definition: l1_czcs_hdf.c:702
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned on(as it will be in Near-Real-Time processing).
subroutine get_node(nlines, timref, time, pos, vel, xnodel, tnode)
Definition: get_node.f:2