OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
conv_soh.f
Go to the documentation of this file.
1  subroutine conv_soh(soh,scana,scdis)
2 
3 c $header: /app/shared/rcs/irix-5.2/seawifsd/src/mops/mopsv4.5/swfnav/conv_soh.f,v 1.2 1996/04/17 18:49:03 seawifsd exp seawifsd $
4 c $log: conv_soh.f,v $
5 c revision 1.2 1996/04/17 18:49:03 seawifsd
6 c fixed a bug about the wrong dimension size.(ityp_acs(3) -> ityp_acs(40))
7 c
8 c revision 1.1 1996/04/17 18:48:19 seawifsd
9 c initial revision
10 c
11 c
12 c Subroutine to convert soh telemetry values. complete list of converted
13 c data is given in acs_block.f
14 
15 c february 2, 1994 by frederick s. patt
16 
17 c modified to add multiple data types to analog specifications -
18 c december 7, 1994 by frederick s. patt
19 
20  real*4 scana(40)
21  byte soh(776),scdis(40)
22 
23 c location and conversions specifications are located in acs_comm
24  integer*4 loc_acs(2,40)
25  integer*4 dis_acs(3,40)
26  integer*4 ityp_acs(40)
27  real*4 con_acs(2,40)
28 c common /acs_comm/ con_acs, loc_acs, dis_acs, ityp_acs
29 c mdm oct. 15, 2004 making the block data routine acs_block inlined to
30 c avoid problems with the linker not picking it up...
31 c see acs_block.f for descriptions
32 c analog data start byte and length in soh packet
33  data loc_acs/ 113,8, !Orbit X position
34  * 121,8, !Orbit Y position
35  * 129,8, !Orbit Z position
36  * 137,8, !Orbit X velocity
37  * 145,8, !Orbit Y velocity
38  * 153,8, !Orbit Z velocity
39  * 265,4, !Attitude yaw angle
40  * 273,4, !Attitude roll angle
41  * 269,4, !Attitude pitch angle
42  * 553,2, !Sun sensor 1 angle 1
43  * 555,2, !Sun sensor 1 angle 2
44  * 565,2, !Sun sensor 2 angle 1
45  * 567,2, !Sun sensor 2 angle 2
46  * 577,2, !Sun sensor 3 angle 1
47  * 579,2, !Sun sensor 3 angle 2
48  * 613,2, !Earth scanner 1 phase
49  * 615,2, !Earth scanner 1 width
50  * 625,2, !Earth scanner 2 phase
51  * 627,2, !Earth scanner 2 width
52  * 57,2, !GPS DOP value
53  * 31,4, !GPS time tag fractional second
54  * 497,2, !Momentum wheel 1 speed
55  * 503,2, !Momentum wheel 1 current
56  * 509,2, !Momentum wheel 2 speed
57  * 515,2, !Momentum wheel 2 current
58  * 425,4, !Torquer rod 1 x command levels
59  * 429,4, !Torquer rod 1 y command levels
60  * 433,4, !Torquer rod 1 z command levels
61  * 437,4, !Torquer rod 2 x command levels
62  * 441,4, !Torquer rod 2 y command levels
63  * 445,4, !Torquer rod 2 z command levels
64  * 585,2, !Magnetometer 1 x-axis
65  * 587,2, !Magnetometer 1 y-axis
66  * 589,2, !Magnetometer 1 z-axis
67  * 591,2, !Magnetometer 1 r-axis
68  * 201,4, !Attitude yaw rate
69  * 209,4, !Attitude roll rate
70  * 205,4, !Attitude pitch rate
71  * 4*0 /
72 
73 c Data types
74  data ityp_acs/ 5, !Orbit X position
75  * 5, !Orbit Y position
76  * 5, !Orbit Z position
77  * 5, !Orbit X velocity
78  * 5, !Orbit Y velocity
79  * 5, !Orbit Z velocity
80  * 4, !Attitude yaw angle
81  * 4, !Attitude roll angle
82  * 4, !Attitude pitch angle
83  * 1, !Sun sensor 1 angle 1
84  * 1, !Sun sensor 1 angle 2
85  * 1, !Sun sensor 2 angle 1
86  * 1, !Sun sensor 2 angle 2
87  * 1, !Sun sensor 3 angle 1
88  * 1, !Sun sensor 3 angle 2
89  * 2, !Earth scanner 1 phase
90  * 2, !Earth scanner 1 width
91  * 2, !Earth scanner 2 phase
92  * 2, !Earth scanner 2 width
93  * 1, !GPS DOP value
94  * 3, !GPS time tag fractional second
95  * 2, !Momentum wheel 1 speed
96  * 1, !Momentum wheel 1 current
97  * 2, !Momentum wheel 2 speed
98  * 1, !Momentum wheel 2 current
99  * 4, !Torquer rod 1 x command levels
100  * 4, !Torquer rod 1 y command levels
101  * 4, !Torquer rod 1 z command levels
102  * 4, !Torquer rod 2 x command levels
103  * 4, !Torquer rod 2 y command levels
104  * 4, !Torquer rod 2 z command levels
105  * 2, !Magnetometer 1 x-axis
106  * 2, !Magnetometer 1 y-axis
107  * 2, !Magnetometer 1 z-axis
108  * 2, !Magnetometer 1 r-axis
109  * 4, !Attitude yaw rate
110  * 4, !Attitude roll rate
111  * 4, !Attitude pitch rate
112  * 2*0 /
113 
114 c linear analog conversion coefficients
115  data con_acs/
116  * 0.001, 0., !Orbit X position
117  * 0.001, 0., !Orbit Y position
118  * 0.001, 0., !Orbit Z position
119  * 0.001, 0., !Orbit X velocity
120  * 0.001, 0., !Orbit Y velocity
121  * 0.001, 0., !Orbit Z velocity
122  * 1., 0., !Attitude yaw angle
123  * 1., 0., !Attitude roll angle
124  * 1., 0., !Attitude pitch angle
125  * 2.00225e-04, -2.0503, !Sun sensor 1 angle 1
126  * 2.00225e-04, -2.0503, !Sun sensor 1 angle 2
127  * 2.00225e-04, -2.0503, !Sun sensor 2 angle 1
128  * 2.00225e-04, -2.0503, !Sun sensor 2 angle 2
129  * 2.00225e-04, -2.0503, !Sun sensor 3 angle 1
130  * 2.00225e-04, -2.0503, !Sun sensor 3 angle 2
131  * 0.005493164, 0.0, !Earth scanner 1 phase
132  * 0.005493164, 0.0, !Earth scanner 1 width
133  * 0.005493164, 0.0, !Earth scanner 2 phase
134  * 0.005493164, 0.0, !Earth scanner 2 width
135  * 0.1, 0.0, !GPS DOP value
136  * 1.0e-9, 0.0, !GPS time tag fractional second
137  * 0.2, 0.0, !Momentum wheel 1 speed
138  * 0.001, 0.0, !Momentum wheel 1 current
139  * 0.2, 0.0, !Momentum wheel 2 speed
140  * 0.001, 0.0, !Momentum wheel 2 current
141  * 1.0, 0.0, !Torquer rod 1 x command levels
142  * 1.0, 0.0, !Torquer rod 1 y command levels
143  * 1.0, 0.0, !Torquer rod 1 z command levels
144  * 1.0, 0.0, !Torquer rod 2 x command levels
145  * 1.0, 0.0, !Torquer rod 2 y command levels
146  * 1.0, 0.0, !Torquer rod 2 z command levels
147  * 2.0, 0.0, !Magnetometer 1 x-axis
148  * 2.0, 0.0, !Magnetometer 1 y-axis
149  * 2.0, 0.0, !Magnetometer 1 z-axis
150  * 2.0, 0.0, !Magnetometer 1 r-axis
151  * 1.0, 0.0, !Attitude yaw rate
152  * 1.0, 0.0, !Attitude roll rate
153  * 1.0, 0.0, !Attitude pitch rate
154  * 4*0 /
155 
156 c discrete data start byte, bit and bit length in soh packet
157  data dis_acs/
158  * 551, 1, 2, !Sun sensor 1 presence
159  * 563, 1, 2, !Sun sensor 2 presence
160  * 575, 1, 2, !Sun sensor 3 presence
161  * 549, 1, 8, !Sun sensor 1 status
162  * 561, 1, 8, !Sun sensor 2 status
163  * 573, 1, 8, !Sun sensor 3 status
164  * 609, 1, 8, !Earth scanner 1 status 1
165  * 612, 1, 8, !Earth scanner 1 status 2
166  * 621, 1, 8, !Earth scanner 2 status 1
167  * 624, 1, 8, !Earth scanner 2 status 2
168  * 60, 1, 8, !Number of GPS satellites visible
169  * 61, 1, 8, !Number of GPS satellites tracked
170  * 111, 1, 8, !GPS receiver status
171  * 25, 1, 8, !GPS time tag year (byte 1)
172  * 26, 1, 8, !GPS time tag year (byte 2)
173  * 23, 1, 8, !GPS time tag month
174  * 24, 1, 8, !GPS time tag day-of-month
175  * 27, 1, 8, !GPS time tag hour
176  * 28, 1, 8, !GPS time tag minute
177  * 29, 1, 8, !GPS time tag second
178  * 557, 1, 8, !Sun sensor 1 time tag (byte 1)
179  * 558, 1, 8, !Sun sensor 1 time tag (byte 2)
180  * 559, 1, 8, !Sun sensor 1 time tag (byte 3)
181  * 560, 1, 8, !Sun sensor 1 time tag (byte 4)
182  * 569, 1, 8, !Sun sensor 2 time tag (byte 1)
183  * 570, 1, 8, !Sun sensor 2 time tag (byte 2)
184  * 571, 1, 8, !Sun sensor 2 time tag (byte 3)
185  * 572, 1, 8, !Sun sensor 2 time tag (byte 4)
186  * 581, 1, 8, !Sun sensor 3 time tag (byte 1)
187  * 582, 1, 8, !Sun sensor 3 time tag (byte 2)
188  * 583, 1, 8, !Sun sensor 3 time tag (byte 3)
189  * 584, 1, 8, !Sun sensor 3 time tag (byte 4)
190  * 617, 1, 8, !Earth scanner 1 time tag (byte 1)
191  * 618, 1, 8, !Earth scanner 1 time tag (byte 2)
192  * 619, 1, 8, !Earth scanner 1 time tag (byte 3)
193  * 620, 1, 8, !Earth scanner 1 time tag (byte 4)
194  * 629, 1, 8, !Earth scanner 2 time tag (byte 1)
195  * 630, 1, 8, !Earth scanner 2 time tag (byte 2)
196  * 631, 1, 8, !Earth scanner 2 time tag (byte 3)
197  * 632, 1, 8 !Earth scanner 2 time tag (byte 4)
198  * /
199 
200 
201 c convert analog data
202  do i=1,40
203  if (ityp_acs(i).eq.1) then
204  call read_analog(scana(i),loc_acs(1,i),con_acs(1,i),soh)
205  else if (ityp_acs(i).eq.2) then
206  call read_short(scana(i),loc_acs(1,i),con_acs(1,i),soh)
207  else if (ityp_acs(i).eq.3) then
208  call read_long(scana(i),loc_acs(1,i),con_acs(1,i),soh)
209  else if (ityp_acs(i).eq.4) then
210  call read_float(scana(i),loc_acs(1,i),con_acs(1,i),soh)
211  else if (ityp_acs(i).eq.5) then
212  call read_double(scana(i),loc_acs(1,i),con_acs(1,i),soh)
213  end if
214  end do
215 
216 c convert discrete data
217  do i=1,40
218  if (dis_acs(1,i).gt.0)
219  * call read_discrete(scdis(i),dis_acs(1,i),soh)
220  end do
221 
222  return
223  end
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
Definition: CMakeLists.txt:7
subroutine conv_soh(soh, scana, scdis)
Definition: conv_soh.f:2
subroutine read_float(data, loc, con, raw)
Definition: read_float.f:2
#define real
Definition: DbAlgOcean.cpp:26
===========================================================================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 read_long(data, loc, con, raw)
Definition: read_long.f:2
subroutine read_double(data, loc, con, raw)
Definition: read_double.f:2
subroutine read_short(data, loc, con, raw)
Definition: read_short.f:2
subroutine read_analog(data, loc, con, raw)
Definition: read_analog.f:2
subroutine linear(xp, x, y, n, yp)
Definition: afrt_rt1.f:1255
#define f
Definition: l1_czcs_hdf.c:702
subroutine read_discrete(bdat, dis, raw)
Definition: read_discrete.f:2