OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Granule.h
Go to the documentation of this file.
1 #ifndef GRANULE_H
2 #define GRANULE_H
3 
4 #include "PGS_SMF.h" /* define PGSt_SMF_status */
5 #include "hdf.h" /* contain prototype for hdf functions */
6 #include "mfhdf.h" /* contain prototype for hdf functions */
7 #include "HdfEosDef.h" /* contain prototype for eos hdf functions */
8 
9 #define MAX_NC_NAME H4_MAX_NC_NAME
10 #define MAX_VAR_DIMS H4_MAX_VAR_DIMS
11 
12 /*
13 !C-INC***********************************************************************
14 !Description: Public header file containing macros, structure definitions
15  and external function declarations.
16 
17 !Revision History:
18  $Log: Granule.h,v $
19  Revision 1.24 2011-04-07 14:40:12-04 xgeng
20  1. RSB &TEB uncertainty algorithm update; 2. The quadratic RSB RVS changed to 4th order.
21 
22  Revision 1.23 2010-11-15 11:25:16-05 xgeng
23  Defined a new fill value UNABLE_CALIBRATE_SI (65524); Added a new boolean member Electronic_Anomaly to structure QA_Common_t.
24 
25  Revision 1.22 2009/08/31 17:40:18 xgeng
26  Change LOG to Log
27 
28  Revision 02.38, Janurary 7, 2008 Razor Issue #216
29  Added a new constant "DEAD_SUBFRAME_SI" for dead subframe
30  Added a new constant "NUM_HIGH_RESOLUTION DETECTORS"
31  Added a new constant "NUM_HIGH_RESOLUTION SUBFRAMES"
32  Added a new variable "dead_subframe_pixels" in L1B_granule_t
33  Added a new variable "num_dead_subframe_EV_data" in QA_Common_t
34  Xu Geng, SAIC GSO (xu.geng@saic.com)
35 
36  Revision 1.16 2006/10/27 15:02:54 ltan
37  Added parameter PGE02_Version. Changed for ANSI-C compliance. Correction for the generation of code change log.
38 
39  Revision 02.37, October 31, 2003 Razor Issue #195
40  Added ProcessingCenter to runtime parameters
41  Liqin Tan, SAIC GSO (ltan@saicmodis.com)
42 
43  Revision 02.36 September 15, 2003 Razor Issue #181
44  Added ProcessingEnvironment to runtime parameters
45  Liqin Tan, SAIC GSO (ltan@saicmodis.com)
46 
47  Revision 02.35 March 26, 2003 Razor Issue #191
48  Changed name of dn_28 to dn_X for use with any emissive band.
49  Added band number to L1B_Scan structure type.
50  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
51 
52  Revision 02.32 June 28, 2002 Razor Issue #161
53  Moved NUM_*_SUBSAMP definitions from Preprocess.h; added NUM_REFL_INDICES
54  Gwyn Fireman, SAIC-GSO <Gwyn.Fireman@gsfc.nasa.gov>
55 
56  Revision 02.31 April 16, 2002 Razor Issue #166
57  Added leading_granule_scan_gap and trailing_granule_scan_gap to
58  QA_Common_t
59  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
60 
61  Revision 02.29 March 19, 2002 Razor Issue #182
62  Applicable to MODIS/TERRA (PFM) processing only.
63  Added b26_fr_b5_scaled_corr to RSB_Cal_Coeff_t.
64  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
65 
66  Revision 02.28 March 10, 2002 Razor Issue #174
67  Added RVS tables to RSB_Cal_Coeff_t. Defined TEB_Cal_Coeff_t to hold
68  RVS tables.
69  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
70 
71  Revision 02.27 February 7, 2002 Razor Issue #180
72  Added flag TEB_B1_NOT_CALCULATED and counter for it in QA_Common.
73  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
74 
75  Revision 02.26 December 14, 2001
76  Changed MAX_*_TRACK_DIM parameters so that they are automatically determined
77  by MAX_NUM_SCANS.
78  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
79 
80  Revision 02.25 November 12, 2001 (Razor Issue #169)
81  Added boolean skip_night_hi_res to prototype for Close_L1B_Granule.
82  Added Write_Night_Mode_HiRes_Data to Run_Time_Parameters_t
83  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov), SAIC GSO
84 
85  Revision 02.24 November 6, 2001
86  Added MCST_LUT_Version to Run_Time_Parameters_t (Razor issue #167)
87  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov), SAIC GSO
88 
89  Revision 02.23 Sept. 28, 2001
90  Eliminated use of defined PI value due to conflict with SDP Toolkit 5.2.7
91  (PI was defined to be PGS_PI in any case) (Razor issue #168)
92  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov), SAIC GSO
93 
94  Revision 02.22 Feb 22, 2001, Issue 155
95  Added Run_Time_Parameters_t and Read_Run_Time_Parameters.
96  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
97 
98  Revision 02.21 Jan 29, 2001
99  Corrected variable names and simplified L1A_Scan_t.
100  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
101 
102  Revision 02.21 Dec. 5, 2000
103  Razor issue 147.
104  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
105 
106  Revision 02.20 Dec. 1, 2000
107  Added dn_28 to L1B_Scan_t
108  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
109 
110  Revision 02.19 October 29, 2000
111  Added new unusable data value for L > L_Max as per issue 139.
112  Added code for granule average QA values as per issue 140.
113  Added structure element to L1A_granule_t, Razor issue 142.
114  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
115 
116  Revision 02.18 September 21, 2000
117  Added counting num_rsb_at_night_scans as per issue 137.
118  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
119 
120  ... (many changes not logged) ...
121 
122  Revision 02.17 Nov 05, 1999
123  Change momos_t to RSB_Cal_Coeff_t and add new variables
124  Zhenying Gu (zgu@mcst.gsfc.nasa.gov)
125 
126  Revision 02.16 Sep 30, 1999
127  Made num_thermistor_outliers dimensioned [MAX_NUM_SCANS] in QA_Emiss_t
128  Jim Rogers (rogers@msct.gsfc.nasa.gov)
129 
130  Revision 02.15 May 13, 1999
131  Added band 26 section.
132  Jim Rogers (rogers@msct.gsfc.nasa.gov)
133 
134  Revision 02.14 Feb 22, 1999
135  Added macros INDEX_1000M_DAY and INDEX_1000M_NIGHT to allow clarity
136  uf usage elsewhere in the code.
137  Jim Rogers (rogers@msct.gsfc.nasa.gov)
138 
139  Revision 02.13 Feb 8, 1999
140  Moved definition of L1B_Scan_Metadata_t to L1B_SetupP.h since that structure
141  is local in scope to L1B_Setup.c
142  Jim Rogers (rogers@msct.gsfc.nasa.gov)
143 
144  Revision 02.12 Feb 2, 1999
145  Separated out parts belonging to L1B_Setup as part of the
146  process of separating L1B_Setup out into its own module.
147  Added L1B_BANDS_AT_RES as an external declaration.
148  Jim Rogers (rogers@msct.gsfc.nasa.gov)
149 
150  Revision 02.11 July 1998
151  Add Write_L1B_SI_UI() prototype
152  Zhenying Gu (zgu@ltpmail.gsfc.nasa.gov)
153 
154  Revision 02.10 April 13, 1998.
155  Removed the SUN_EARTH_DIST_ADJUST() and DAYS_IN_YEAR macros.
156  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
157 
158  Revision 02.10 April 10, 1998.
159  Changed the L1A_granule_t's EVStartTime_TAIsecond, MirrorSide, and
160  ScanType from pointers to static arrays.
161  Removed the L1B_granule_t's SunAdj, EVStartTime_TAIday,
162  and EVStartTime_TAIyear.
163  Added momos_t variable to L1B_granule_t.
164  Removed the following from L1B_ScaleOffset_t:
165  rad_scale_RefSB
166  rad_offset_RefSB
167  refl_scale_RefSB
168  refl_offset_RefSB
169  (they're replaced by the momos_t)
170  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
171 
172  Revision 02.10 April 1998
173  Added L1B_Scan_metadat_t structure.
174  Zhenying Gu (zgu@gscmail.gsfc.nasa.gov)
175 
176  Revision 02.10 April 1998.
177  Added the momos_t structure.
178  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
179 
180  Revision 02.10 March 1998.
181  Add ADC, PCX and INT correction switch
182  Add emiss_band_index_t data structure
183  Shi-Yue Qiu (syqiu@ltpmail.gsfc.nasa.gov)
184 
185  Revision 02.00 March 1997.
186  Summarizes Geom_Param_Lib.h, Granule.h, L1A_to_L1B.h, ......
187  Zhidong Hao (hao@barebackride.gsfc.nasa.gov)
188 
189  Revision 01.01 1996/04/09
190  Updated to match Version 1 Design Document.
191  John Hannon(hannon@highwire.gsfc.nasa.gov)
192  Neal Devine(devine@ltpmail.gsfc.nasa.gov)
193  Joan Baden (baden@highwire.gsfc.nasa.gov)
194 
195  Revision 01.00 1993
196  Initial development
197  Geir E. Kvaran(geir@highwire.gsfc.nasa.gov)
198 
199  Revision 01.00 Nov. 1998
200  This is part of original Granule.h, L1B.h
201  Initial development
202  Zhenying Gu(zgu@mcst.gsfc.nasa.gov)
203 
204 !Team-unique Header:
205  This software is developed by the MODIS Characterization Support
206  Team (MCST)for the National Aeronautics and Space Administration,
207  Goddard Space Flight Center, under contract NAS5-32373.
208 
209 !References and Credits:
210  HDF portions developed at the National Center for Supercomputing
211  Applications at the University of Illinois at Urbana-Champaign.
212 
213 !Design Notes:
214 
215 1. L1A Granule. The L1A granule contains 4 HDF SDSs, each corresponding
216  to a group of MODIS bands:
217 
218  L1A SDS name MODIS bands
219  ------------ ---------------------------------------------------------
220  "XX_250m" 1,2
221  "XX_500m" 3,4,5,6,7
222  "XX_1km_day" 8,9,10,11,12,13lo,13hi,14lo,14hi,15,16,17,18,19
223  "XX_1km_night" 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36
224 
225  where:
226 
227  XX = SD (Solar Diffusor)
228  XX = SRCA (Spectro-Radiometric Calibration Assembly)
229  XX = BB (Black Body)
230  XX = SV (Space View)
231  XX = EV (Earth View)
232 
233  "lo" and "hi" refer to two different gain levels. Thus, 13lo and 13hi
234  are treated as different bands even though they have the same center
235  wavelegnth. Similarly for 14lo and 14hi. Thus, MODIS has 36 different
236  center wavelengths but 38 different "bands" of data.
237 
238  Within the code, we refer to the above L1A SDSs as 4 "resolutions", even
239  though the last two groups have the same resolution (1km). All SDSs are
240  present in one L1A granule HDF file. The logic implemented in
241  "Open_L1A_EV_SDS" is that each of the above SDSs must be present in the
242  L1A granule. If any is missing, then the function returns a
243  MODIS_F_READ_ERROR. The logic implemented in "Read_L1A_EV_Scan" (which
244  reads one scan) is that the "EV_1km_night" data are always read but the
245  other three are read only if the scan type is "DAY".
246 
247  Each L1A input granule covers a time period of approximately 5 minutes.
248  The actual number of scans will be either 203 or 204, depending on how a
249  scan fits into the granule (there are always whole scans in the granule).
250  Thus, the maximum number of scans that can occur in an L1A granule is 204.
251 
252 2. L1B Granules. The L1B EV granules group the MODIS bands slightly
253  differently than the above L1A SDSs. Band 26 (in the L1A "night" group)
254  is placed in the 1km reflective solar band (RefSB) group.
255 
256  L1B SDSs MODIS bands
257  ------------ ------------------------------------------------------
258  "EV_250_RefSB" 1,2
259  "EV_500_RefSB" 3,4,5,6,7
260  "EV_1KM_RefSB" 8,9,10,11,12,13lo,13hi,14lo,14hi,15,16,17,18,19,26
261  "EV_1KM_Emissive" 20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36
262 
263  The L1B SDSs are placed in three L1B output HDF files which are based on
264  resolution (see the file specifications). This includes aggregation of
265  the higher-resolution SDSs to a lower resolution.
266 
267  In the code, when we fill the L1B SDSs from the L1A data, there is logic
268  which specifically deals with MODIS band 26.
269 
270 3. Detectors. There are different numbers of detectors based on band
271  resolution. Also note that bands 13 and 14 also each have two sets
272  of detectors. In terms of the L1B SDSs:
273 
274  L1B SDSs # of detectors total in all bands of this res.
275  ---------- -------------- ------------------------------
276  "EV_250_RefSB" 40 80
277  "EV_500_RefSB" 20 100
278  "EV_1KM_RefSB" 10 150
279  "EV_1KM_Emissive" 10 160
280 
281  Thus, the total number of detectors is 490.
282 
283 4. Coordinate system:
284 
285  |---------------- ALONG SCAN ---------------->
286  |
287  | --------------------------------------
288  | --------------------------------------
289  | --------------------------------------
290  ALONG -------------- SCAN LINES ------------
291  TRACK --------------------------------------
292  | --------------------------------------
293  | --------------------------------------
294  | --------------------------------------
295  \|/ --------------------------------------
296 
297  For one sweep of the MODIS scan mirror, the number of scan lines generated
298  equals the number of detectors (which is dependent on band). The number of
299  samples generated along a scan line is also dependent on band (the 250m
300  bands being sampled at 0.25km IFOV, the 500m bands being sampled at 0.5km
301  IFOV and the 1km bands being sampled at 1km IFOV).
302 
303  Thus, for a given sweep of the mirror, 250m resolution bands have 4 times
304  the number of scan lines as 1km resolution bands since they have 4 times
305  the number of detectors. Similarly, for a given aperture width (such as
306  the earth view), 250m resolution bands have 4 times the number of samples
307  ("FRAMES") as 1km resolution bands.
308 
309  In the macros below, the following terminology is used:
310  "TRACK_DIM" refers to scan lines in the along-track direction
311  "FRAME_DIM" refers to samples in the along-scan direction.
312  "1km_FRAMES" refers to samples taken at the rate of 1km IFOV
313  "500m_FRAMES" refers to samples taken at the rate of 0.5km IFOV
314  "250m_FRAMES" refers to samples taken at the rate of 0.25km IFOV
315 
316 5. Aperture widths. The following table relates the basic aperture widths
317  in terms of 1km frames:
318 
319  Aperture acronym # 1km_frames
320  ---------- ------- ------------
321  earth view EV 1354
322  space view SV 50
323  black body BB 50
324  SRCA SRCA 10
325  solar diffuser SD 50
326 
327 !END***********************************************************************
328 */
329 
330 /***************************************************************************
331 Band/Detector/Frame Geometry constants
332 --------------------------------------
333  MAX_NUM_SCANS Maximum number of scans in one 5-minute granule.
334  NUM_BANDS Number of bands (see note 1 above).
335  NUM_DETECTORS Total number of detectors for all bands.
336  NUM_HIGH_RESOLUTION_DETECTORS Total number of detectors in 250m and 500m bands.
337  NUM_HIGH_RESOLUTION_SUBFRAMES Total number of subframes in 250m and 500m bands.
338  NUM_REFLECTIVE_DETECTORS Total number of detectors for the L1B reflective
339  solar bands (RefSB).
340  NUM_EMISSIVE_DETECTORS Total number of detectors for the L1B emissive
341  bands (16 emissive bands, 10 detectors each).
342  NUM_MIRROR_SIDES Number of mirror sides (2).
343  NUM_250M_BANDS Number of 250m-resolution bands (2).
344  NUM_500M_BANDS Number of 500m-resolution bands (5).
345  NUM_1000M_REFL_BANDS Number of L1B reflective solar bands that have
346  1km resolution.
347  NUM_REFLECTIVE_BANDS Total number of L1B reflective solar bands. This
348  is the sum of NUM_250M_BANDS, NUM_500M_BANDS and
349  NUM_1000M_REFL_BANDS.
350  NUM_1000M_EMISS_BANDS Number of L1B 1km-resolution emissive bands.
351  Since all emissive bands are 1km-resolution bands,
352  this macro means the same as the one below.
353  NUM_EMISSIVE_BANDS Number of L1B emissive bands.
354  NUM_1000M_DAY_BANDS Number of bands in the "EV_1km_day" L1A SDS.
355  NUM_1000M_NIGHT_BANDS Number of bands in the "EV_1km_night" L1A SDS.
356  DETECTORS_PER_1KM_BAND Number of detectors in any 1km-resolution band.
357  DETECTORS_PER_500M_BAND Number of detectors in any 500m-resolution band.
358  DETECTORS_PER_250M_BAND Number of detectors in any 250m-resolution band.
359  NUM_1KM_SUBSAMP Number of subsamples per frame in any
360  1km-resolution band.
361  NUM_500M_SUBSAMP Number of subsamples per frame in any
362  500m-resolution band.
363  NUM_250M_SUBSAMP Number of subsamples per frame in any
364  250m-resolution band.
365  NUM_REFL_INDICES Total number of valid reflective
366  band/detector/subframe/mirror side combinations.
367  MODIS_BAND26_INDEX For the set of 38 bands of this code (indexed 0
368  through 37), this is the index for MODIS band 26.
369  MODIS_BAND26_INDEX_AT_RES For the set of 17 L1A 1km night bands (indexed
370  0 through 16), this is the index corresponding to
371  MODIS band 26.
372  MODIS_BAND20_INDEX For the set of 38 bands of this code (indexed 0
373  through 37), this is the index for MODIS band 20.
374  MAX_250M_TRACK_DIM Maximum number of scan lines spanning the along-
375  track dimension of the entire granule for any 250m
376  resolution band. This equals the maximum number of
377  scans times the number of detectors for 250m
378  resolution).
379  MAX_500M_TRACK_DIM Maximum number of scan lines for any 500m
380  resolution band.
381  MAX_1KM_TRACK_DIM Maximum number of scan lines for any 1km
382  resolution band.
383  MAX_SWIR_TRACK_DIM Maximum number of scan lines for any SWIR band.
384  MAX_250M_OBC_FRAME_DIM Maximum number of 1km frames in any of the OBC
385  data sets (50) times the number of subsamples per
386  frame for a 250m-resolution band (4)
387  MAX_500M_OBC_FRAME_DIM Maximum number of 1km frames in any of the OBC
388  data sets (50) times the number of subsamples per
389  frame for a 500m-resolution band (2)
390  MAX_1KM_OBC_FRAME_DIM Maximum number of 1km frames in any of the OBC
391  data sets (50).
392  SRCA_250M_FRAME_DIM Number of 1km frames for the SRCA data sets (10)
393  times the number of subsamples per frame for a
394  250m-resolution band (4).
395  SRCA_500M_FRAME_DIM Number of 1km frames for the SRCA data sets (10)
396  times the number of subsamples per frame for a
397  500m-resolution band (2).
398  SRCA_1KM_FRAME_DIM Number of 1km frames for the SRCA data sets (10).
399  TOTAL_1km_FRAMES Total number of EV, SV, BB, SRCA and SD 1km frames.
400  EV_1km_FRAMES Number of earth view 1km frames.
401  EV_250m_FRAMES Number of earth view 250m frames
402  (EV_1km_FRAMES * 4).
403  EV_500m_FRAMES Number of earth view 500m frames
404  (EV_1km_FRAMES * 2).
405  SD_1km_FRAMES Number of solar diffusor 1km frames.
406  SRCA_1km_FRAMES Number of SRCA 1km frames.
407  BB_1km_FRAMES Number of black-body 1km frames.
408  SV_1km_FRAMES Number of space view 1km frames.
409  NADIR_1km_FRAME_NUM The 1km frame number nominally desginated as
410  the center frame number of the earth-view window.
411  MAX_DETECTORS_PER_BAND Maximum number of detectors in any band
412  (occurs in the 250m bands).
413  MAX_SAMPLES_PER_BAND Maximum number of subsamples in a 1km frame for
414  any band (occurs in the 250m bands).
415 ****************************************************************************/
416 #define NUM_SCANS_DIM_NAME "nscans"
417 
418 /* Normally MAX_NUM_SCANS should be 204. However, the number of scans could
419  * reach 208 due to a L1A abnormality. So, define it to be 208.
420  */
421 
422 #define MAX_NUM_SCANS 1000
423 #define NUM_BANDS 38
424 #define NUM_DETECTORS 490
425 #define NUM_HIGH_RESOLUTION_DETECTORS 180
426 #define NUM_HIGH_RESOLUTION_SUBFRAMES 520
427 #define NUM_REFLECTIVE_DETECTORS 330
428 #define NUM_EMISSIVE_DETECTORS 160
429 #define NUM_MIRROR_SIDES 2
430 #define NUM_250M_BANDS 2
431 #define NUM_500M_BANDS 5
432 #define NUM_1000M_REFL_BANDS 15
433 #define NUM_REFLECTIVE_BANDS 22
434 #define NUM_1000M_EMISS_BANDS 16
435 #define NUM_EMISSIVE_BANDS 16
436 #define NUM_1000M_DAY_BANDS 14
437 #define NUM_1000M_NIGHT_BANDS 17
438 #define DETECTORS_PER_1KM_BAND 10
439 #define DETECTORS_PER_500M_BAND 20
440 #define DETECTORS_PER_250M_BAND 40
441 #define NUM_1KM_SUBSAMP 1
442 #define NUM_500M_SUBSAMP 2
443 #define NUM_250M_SUBSAMP 4
444 #define NUM_REFL_INDICES 1340
445 #define MODIS_BAND5_INDEX 4
446 #define MODIS_BAND26_INDEX 27
447 #define MODIS_BAND26_INDEX_AT_RES 6
448 #define MODIS_BAND20_INDEX 21
449 
450 #define L1B_1KM_EMISS_BAND28_INDEX 7 /* emissive band group */
451 
452 /* The four macros below are related to the macro MAX_NUM_SCANS. */
453 
454 #define MAX_250M_TRACK_DIM MAX_NUM_SCANS*DETECTORS_PER_250M_BAND /* 8320 */ /* 208 * 40 */
455 #define MAX_500M_TRACK_DIM MAX_NUM_SCANS*DETECTORS_PER_500M_BAND /* 4160 */
456 #define MAX_1KM_TRACK_DIM MAX_NUM_SCANS*DETECTORS_PER_1KM_BAND /* 2080 */
457 #define MAX_SWIR_TRACK_DIM MAX_NUM_SCANS*DETECTORS_PER_500M_BAND /* 4160 */
458 
459 #define MAX_250M_OBC_FRAME_DIM 200 /* 50 * 4 */
460 #define MAX_500M_OBC_FRAME_DIM 100 /* 50 * 2 */
461 #define MAX_1KM_OBC_FRAME_DIM 50
462 #define SRCA_250M_FRAME_DIM 40 /* 10 * 4 */
463 #define SRCA_500M_FRAME_DIM 20
464 #define SRCA_1KM_FRAME_DIM 10
465 #define SD_1km_FRAMES 50
466 #define SRCA_1km_FRAMES 10
467 #define BB_1km_FRAMES 50
468 #define SV_1km_FRAMES 50
469 #define EV_1km_FRAMES 1354
470 #define EV_250m_FRAMES 5416
471 #define EV_500m_FRAMES 2708
472 #define TOTAL_1km_FRAMES 1514
473 #define NADIR_1km_FRAME_NUM 677
474 #define MAX_DETECTORS_PER_BAND 40
475 #define MAX_SAMPLES_PER_BAND 4
476 
477 
478 /* Three correction switch in Emissive Band */
479 typedef enum { OFF, ON } switch_t ;
480 
481 #define SCAN_TYPE_TEXT_SIZE 10
482 #define COMMON_TEXT_SIZE 10
483 #define MAX_ERROR_MESSAGE_LENGTH 1024
484 
485 #define NUM_BB_THERMISTORS 12
486 #define NUM_FOCAL_PLANES 4
487 
488 #define SCAN_QUALITY_ARRAY_NUM_ELEMENTS 4
489 
490 #define PGS_PI 3.14159265358979323846
491 
492 #define PGS_EXP 2.7182818284590452354
493 
494 #define SAME 0 /*Used with strcmp()*/
495 
496 /*
497  * Macros for L1B sector DNs, to be used with the Check_Valid_Range
498  * function. Note that the HDF default is currently used in the
499  * L1A code (does not comply with file specs, but we must allow it).
500  * L1A_DN_SDS_LB -- lower bound
501  * L1A_DN_SDS_UB -- upper bound
502  * L1A_DN_SDS_FV -- fill value
503  * These are strings since that is the interface to Check_Valid_Range.
504  */
505 
506 #define L1A_DN_SDS_LB "-1"
507 #define L1A_DN_SDS_UB "4095"
508 #define L1A_DN_SDS_FV "-32767" /* HDF default */
509 
510 #define HDF_DEFAULT_FILLVALUE -32767
511 #define SATURATED_DN 4095
512 
513 #define MISSING_L1B_DATA 65535
514 #define MISSING_L1B_UI 255
515 #define MISSING_L1A_FLAG -1
516 
517 #define L1A_SCAN_DATA_MISSING_SI 65535
518 #define L1A_DN_MISSING_SI 65534
519 #define SATURATED_DETECTOR_SI 65533
520 #define ZERO_POINT_DN_SI 65532
521 #define DEAD_DETECTOR_SI 65531
522 #define RSB_DN_STAR_BELOW_MIN_SI 65530
523 #define TEB_OR_RSB_GT_MAX_SI 65529
524 #define AGGREGATION_FAIL_SI 65528
525 #define SECTOR_ROTATION_SI 65527
526 #define TEB_B1_NOT_CALCULATED 65526
527 #define DEAD_SUBFRAME_SI 65525
528 #define UNABLE_CALIBRATE_SI 65524
529 #define UNRESCALED_HIGH_SI 65521
530 #define RESCALED_L1B_SI 65520
531 #define NAD_CLOSED_UPPER_SI 65500
532 #define L1A_SCAN_DATA_MISSING_UI 255
533 #define BAD_DATA_UI 15
534 
535 #define TOLERANCE 1.0E-20 /* defined zero */
536 
537 #define True 1
538 #define False 0
539 
540 /* Focal Plane Indices */
541 
542 #define VIS 0
543 #define NIR 1
544 #define SWIR 2
545 #define LWIR 3
546 
547 /* satellite ID */
548 
549 #define TERRA 0
550 #define AQUA 1
551 #define INVALID_SATELLITE_ID -1
552 
553 /* MOD_PR02 exit code */
554 
555 extern int32 MOD_PR02_Failure_Exit_Code;
556 
557 /*****************************************************************************
558  The following defines macros for the number of L1A or L1B "resolutions" (or
559  groupings of bands) and the indices representing the ordering of the
560  resolutions in arrays. Even though INDEX_1000M_DAY and INDEX_1000M_REFL are
561  both the same value, they represent different band groupings because of
562  MODIS band 26 (see earlier comments). Currently, the code uses these macros
563  somewhat inconsistently, so beware. Similar comments apply to
564  INDEX_1000M_NIGHT and INDEX_1000M_EMISS.
565  *****************************************************************************/
566 typedef int8 boolean;
567 
568 typedef enum {
575 #define INDEX_1000M_REFL INDEX_1000M_DAY
576 #define INDEX_1000M_EMISS INDEX_1000M_NIGHT
577 
578 /*****************************************************************************
579  The following defines macros for the number of earth-view products generated
580  and indices for each product.
581  *****************************************************************************/
582 
583 typedef enum {
589 
590 /***************************************************************************
591  L1B_BANDS_AT_RES Number of bands in each L1B "resolution"
592  (group of bands -- see notes at top)
593  L1A_BANDS_AT_RES Number of bands in each L1A "resolution"
594  (group of bands -- see notes at top)
595  DETECT_PER_BAND_AT_RES Number of detectors in any band of the 4 different
596  "resolutions" (same for both L1A and L1B even though
597  the "groupings" are defined slightly differently).
598  BAND_RATIO_AT_RES This is the ratio of the #samples at a resolution to
599  the number of samples at a 1km resolution (also the
600  ratio of the number of detectors relative to the
601  number of detectors for a 1km resolution band).
602  Same for both L1A and L1B "resolutions".
603  **************************************************************************/
605 
607 
609 
611 
613 
614 typedef enum {
632 
633 typedef enum {
641 
642 typedef enum {
646 
647 /******************************************************************************
648  * Define macros for granule average quantities.
649  *
650  * NOTE 1: the code uses loops when assigning some of these quantities.
651  * In particular, the number and order of BB, INS, CAV and RC temperatures
652  * must match the arrays defined in Temperatures_t in PreprocessP.h
653  * and the calculations in Read_Convert_Temperatures.
654  * Consequently, these cannot be arbitrarily rearranged without inspecting
655  * and possibly changing the code.
656  *
657  * NOTE 2: some elements of "granule_averages" (a structure member in
658  * QA_Common_t) are unused. This variable is currently
659  * initialized in Calculate_Temp_QA, where all non-zero values
660  * are assigned. The initialization sets the unused elements to zero.
661  * If other granule averages are added, then the location of the
662  * initialization may need to be changed.
663  */
664 
665 typedef enum {
666  GRAN_AVG_TP_BB_TEMP01, /* BB Thermistor 1 */
667  GRAN_AVG_TP_BB_TEMP02, /* BB Thermistor 2 */
668  GRAN_AVG_TP_BB_TEMP03, /* BB Thermistor 3 */
669  GRAN_AVG_TP_BB_TEMP04, /* BB Thermistor 4 */
670  GRAN_AVG_TP_BB_TEMP05, /* BB Thermistor 5 */
671  GRAN_AVG_TP_BB_TEMP06, /* BB Thermistor 6 */
672  GRAN_AVG_TP_BB_TEMP07, /* BB Thermistor 7 */
673  GRAN_AVG_TP_BB_TEMP08, /* BB Thermistor 8 */
674  GRAN_AVG_TP_BB_TEMP09, /* BB Thermistor 9 */
675  GRAN_AVG_TP_BB_TEMP10, /* BB Thermistor 10 */
676  GRAN_AVG_TP_BB_TEMP11, /* BB Thermistor 11 */
677  GRAN_AVG_TP_BB_TEMP12, /* BB Thermistor 12 */
678  GRAN_AVG_TA_AO_VIS_FPAE, /* (FPA1) VIS Focal Plane */
679  GRAN_AVG_TA_AO_NIR_FPAE, /* (FPA2) NIR Focal Plane */
680  GRAN_AVG_TA_RC_SMIR_CFPAE, /* (FPA3) SMIR Focal plane Temp */
681  GRAN_AVG_TA_RC_LWIR_CFPAE, /* (FPA4) LWIR Focal plane Temp */
682  GRAN_AVG_TP_SA_RCT1_MIRE, /* Scan Mirror Temp 1 */
683  GRAN_AVG_TP_SA_RCT2_MIRE, /* Scan Mirror Temp 2 */
684  GRAN_AVG_TP_SA_A_MTR, /* Scan motor temperature A */
685  GRAN_AVG_TP_MF_CALBKHD_SR, /* (CAV1) Cal bulkhead below SRCA mount */
686  GRAN_AVG_TP_SR_SNOUT, /* (CAV2) SRCA Bulkhead Temp */
687  GRAN_AVG_TP_MF_Z_BKHD_BB, /* (CAV3) Mid zenith bulkhead near BB */
688  GRAN_AVG_TP_MF_CVR_OP_SR, /* (CAV4) cover opposite SRCA */
689  GRAN_AVG_TP_AO_SMIR_OBJ, /* (INS1) SMIR Objective Lens Temp */
690  GRAN_AVG_TP_AO_LWIR_OBJ, /* (INS2) LWIR Objective Lens Temp */
691  GRAN_AVG_TP_AO_SMIR_LENS, /* (INS3) SMIR Eye Assy Temp */
692  GRAN_AVG_TP_AO_LWIR_LENS, /* (INS4) LWIR Eye Assy Temp */
693  GRAN_AVG_TA_RC_CS, /* (RC1) Cold stage Temp */
694  GRAN_AVG_TA_RC_CS_OG, /* (RC2) Cold stage outgas Temp */
695  GRAN_AVG_TA_RC_IS, /* (RC3) Intermediate Stage Temp */
696  GRAN_AVG_TA_RC_IS_OG, /* (RC4) Intermediate Stage outgas Temp */
697  GRAN_AVG_TA_RC_OS_OG, /* (RC5) Outerstage outgas Temp */
698  GRAN_AVG_VR_RC_LW_FPA_HTR, /* LWIR heater voltage */
701 
702 /* Define the dimension of the attribute. Unused elements are set to
703  * zero within the attribute.
704  */
705 
706 #define MAX_NUM_GRAN_AVERAGES 50
707 
708 /* Define the number of RC values in the above definition. This value
709  * is also used in Preprocess when calculating and temporarily storing
710  * the temperatures.
711  */
712 
713 #define NUM_T_RC_VALUES 5
714 
715 /* Define a bad value for voltages
716  */
717 
718 #define VOLTAGE_BAD_VALUE -1000.
719 
720 /***************************************************************************/
721 
722 /*--------------------------------------------------------------------------
723  Data Structures
724 --------------------------------------------------------------------------*/
725 
726  /* Upper bound on length of ProcessingEnvironment archive
727  * metadata item
728  */
729 
730 #define MAX_PROCESSING_ENVIRONMENT_STRLEN 200
731 
732 #define MAX_RUNTIME_PARAM_SIZE 256
733 
734 typedef struct {
735  char SatelliteInstrument[MAX_RUNTIME_PARAM_SIZE];
736  char ReprocessingPlanned[MAX_RUNTIME_PARAM_SIZE];
738  char PGE02_Version[MAX_RUNTIME_PARAM_SIZE];
739  char MCST_LUT_Version[MAX_RUNTIME_PARAM_SIZE];
740  char Write_Night_Mode_HiRes_Data[MAX_RUNTIME_PARAM_SIZE];
741  char ProcessingEnvironment[MAX_RUNTIME_PARAM_SIZE];
742  char ProcessingCenter[MAX_RUNTIME_PARAM_SIZE];
744 
745 typedef struct {
746  int32 v_id;
747  int32 sd_id;
749  int32 num_scans;
751  int16 MirrorSide[MAX_NUM_SCANS];
753  float64 EVStartTime_TAIsecond[MAX_NUM_SCANS];
756 
757  /* For L1B metadata */
758 
766 
767  /* For identifying completely missing scans */
768 
769  boolean missing_scan[MAX_NUM_SCANS];
770 
771  } L1A_granule_t;
772 
773 typedef struct
774 {
775  int32 sds_id[NUM_L1A_RESOLUTIONS];
776 
780 
784 
785  int16 EV_1km_day [DETECTORS_PER_1KM_BAND]
788 
789  int16 EV_1km_night[DETECTORS_PER_1KM_BAND]
792 } L1A_Scan_t;
793 
794 /* Level 1B scale_offset data */
795 
796 typedef struct {
797  float32 dn_star_Max[NUM_REFLECTIVE_BANDS];
798  float32 dn_star_Min[NUM_REFLECTIVE_BANDS];
799 
800  float32 rad_scale_RefSB[NUM_REFLECTIVE_BANDS];
801  float32 rad_offset_RefSB[NUM_REFLECTIVE_BANDS];
802  float32 refl_scale_RefSB[NUM_REFLECTIVE_BANDS];
803  float32 refl_offset_RefSB[NUM_REFLECTIVE_BANDS];
804 
805  float32 counts_scale_RefSB[NUM_REFLECTIVE_BANDS];
806  float32 counts_offset_RefSB[NUM_REFLECTIVE_BANDS];
807 
808  float32 rad_scale_Emiss[NUM_EMISSIVE_BANDS];
809  float32 rad_offset_Emiss[NUM_EMISSIVE_BANDS];
811 
812 
813 typedef struct
814 {
815  float32 m1_des_sq[NUM_REFLECTIVE_BANDS]
819 
820  float32 m1_des_sq_max[NUM_REFLECTIVE_BANDS];
821 
822  float32 RVS_250m[NUM_250M_BANDS]
826 
827  float32 RVS_500m[NUM_500M_BANDS]
831 
832  float32 RVS_1km_RefSB[NUM_1000M_REFL_BANDS]
834  [EV_1km_FRAMES]
836 
837  float32 u2[NUM_REFLECTIVE_DETECTORS]
838  [EV_1km_FRAMES]
840 
842 
843 typedef struct {
844  float32 RVS_1km_Emiss_EV[NUM_EMISSIVE_DETECTORS]
845  [EV_1km_FRAMES]
847  float32 RVS_1km_Emiss_SV[NUM_EMISSIVE_DETECTORS]
849  float32 RVS_1km_Emiss_BB[NUM_EMISSIVE_DETECTORS]
851  float32 sigma_RVS_Emiss_EV[NUM_EMISSIVE_DETECTORS]
852  [EV_1km_FRAMES]
855 
856 typedef struct {
857  int32 sw_f_id[NUM_L1B_EV_FILES];
858  int32 v_id[NUM_L1B_EV_FILES];
859  int32 sd_id[NUM_L1B_EV_FILES];
860  int32 num_scans;
862 
866 
867  float32 b26_fr_b5_scaled_corr[DETECTORS_PER_1KM_BAND];
868 
869  /* For L1B metadata */
870 
871  float32 validEVPercent[NUM_BANDS];
872  float32 satEVPercent[NUM_BANDS];
873  float32 missEVPercent[NUM_BANDS];
874  uint32 elecRedVec[2];
875  int8 FPSetPointState[NUM_FOCAL_PLANES];
876 
877  uint32 total_pixels[NUM_BANDS];
878  uint32 valid_pixels[NUM_BANDS];
879  uint32 saturated_pixels[NUM_BANDS];
880  uint32 missing_pixels[NUM_BANDS];
881  uint32 interpolated_pixels[NUM_BANDS];
882  uint32 dead_detector_pixels[NUM_BANDS];
883  uint32 dead_subframe_pixels[NUM_BANDS];
884  uint32 negative_value_below_noise_pixels[NUM_BANDS];
885  int16 bad_data_flag[NUM_BANDS];
886  float32 Earth_Sun_Dist;
887 } L1B_granule_t;
888 
889 typedef struct
890 {
891  uint16 EV_250m_RefSB [NUM_250M_BANDS]
894 
895  uint16 EV_500m_RefSB [NUM_500M_BANDS]
898 
899  uint16 EV_1km_RefSB [NUM_1000M_REFL_BANDS]
902 
903  uint16 EV_1km_Emissive[NUM_1000M_EMISS_BANDS]
906 } L1B_Scan_SI_t;
907 
908 typedef struct
909 {
910  uint8 EV_250m_RefSB_UI [NUM_250M_BANDS]
913 
914  uint8 EV_500m_RefSB_UI [NUM_500M_BANDS]
917 
918  uint8 EV_1km_RefSB_UI [NUM_1000M_REFL_BANDS]
921 
922  uint8 EV_1km_Emissive_UI[NUM_1000M_EMISS_BANDS]
925 } L1B_Scan_UI_t;
926 
927 /************************* Begin Band 26 Section **************************/
928 /*
929  * If the macro WRITE_BAND_26_SDS is defined, then the MODIS band 26 SDSs will
930  * be written to the EV 1km file. Two SDSs are written: (1) scaled integer,
931  * (2) uncertainty index. These are written regardless of whether the scan
932  * is day or night.
933  */
934 
935 /*** UNCOMMENT THE FOLLOW STATEMENT TO ENABLE WRITING BAND 26 SDS ***/
936 
937 #define WRITE_BAND_26_SDS
938 
939 #ifdef WRITE_BAND_26_SDS
940 
941 #define BAND_26_SI_SDS_NAME "EV_Band26"
942 #define BAND_26_UI_SDS_NAME "EV_Band26_Uncert_Indexes"
943 #define BAND_26_SI_SDS_LONG_NAME "Earth View Band 26 Scaled Integers"
944 #define BAND_26_UI_SDS_LONG_NAME "Earth View Band 26 Uncertainty Indexes"
945 
946 typedef struct {
947  int32 SI_sds_id;
948  int32 UI_sds_id;
951 } Band_26_t;
952 
953 #endif /* WRITE_BAND_26_SDS */
954 /************************** End Band 26 Section ***************************/
955 
956 typedef struct {
957 /*-------------------------
958  SI == Scaled Integer
959  UI == Uncert Index
960  SU == Samples Used
961 -------------------------*/
962  int32 SI_sds_id[NUM_L1A_RESOLUTIONS];
966  int32 UI_sds_id[NUM_L1A_RESOLUTIONS];
974  /* uint16 ***SI[NUM_L1A_RESOLUTIONS];*/ /*[band][det][frame]*/
975  uint16 EV_250m_Aggr500m_RefSB [NUM_250M_BANDS]
978 
979  uint16 EV_250m_Aggr1km_RefSB [NUM_250M_BANDS]
982 
983  uint16 EV_500m_Aggr1km_RefSB [NUM_500M_BANDS]
986 
988 
989  /* uint8 ***UI[NUM_L1A_RESOLUTIONS];
990  */ /*
991  [band][det][frame]*/
992  uint8 EV_250m_Aggr500m_RefSB_UI[NUM_250M_BANDS]
995 
996  uint8 EV_250m_Aggr1km_RefSB_UI [NUM_250M_BANDS]
999 
1000  uint8 EV_500m_Aggr1km_RefSB_UI [NUM_500M_BANDS]
1003 
1004  int8 EV_250m_Aggr500m_RefSB_SU[NUM_250M_BANDS]
1007 
1008  int8 EV_250m_Aggr1km_RefSB_SU [NUM_250M_BANDS]
1011 
1012  int8 EV_500m_Aggr1km_RefSB_SU [NUM_500M_BANDS]
1015 
1016 /************************* Begin Band 26 Section **************************/
1017 #ifdef WRITE_BAND_26_SDS
1018 /*
1019  * This structure member holds arrays dimensioned appropriately for one
1020  * scan of the Band 26 SDSs.
1021  */
1023 #endif /* WRITE_BAND_26_SDS */
1024 /************************** End Band 26 Section ***************************/
1025 
1028 } L1B_Scan_t;
1029 
1030 typedef struct
1031 {
1032  uint8 noise_T_bb[12];
1041  uint8 NEdL[NUM_EMISSIVE_DETECTORS]; /*noise in system*/
1042  uint8 change_b1[NUM_EMISSIVE_DETECTORS];
1043  uint8 num_thermistor_outliers[MAX_NUM_SCANS]; /* range [0-12] */
1044  int8 change_dc_restore[MAX_NUM_SCANS]
1047  int8 emiss_band_bad_data[NUM_EMISSIVE_BANDS];
1048  int8 moon_in_SV_KOB_TEB[MAX_NUM_SCANS];
1049 } QA_Emiss_t;
1050 
1051 typedef struct
1052 {
1055  int8 change_dc_restore_250m[MAX_NUM_SCANS][NUM_250M_BANDS]
1057  int8 change_dc_restore_500m[MAX_NUM_SCANS][NUM_500M_BANDS]
1059  int8 change_dc_restore_1km[MAX_NUM_SCANS][NUM_1000M_REFL_BANDS]
1061  int8 refl_band_bad_data[NUM_REFLECTIVE_BANDS];
1062  int8 moon_in_SV_KOB_RSB[MAX_NUM_SCANS];
1063  int8 all_SV_DN_bad[MAX_NUM_SCANS];
1064  int8 all_BB_DN_bad[MAX_NUM_SCANS];
1065 } QA_Refl_t;
1066 
1067 typedef struct
1068 {
1070  boolean missing_leading_granule; /* True or False */
1071  boolean missing_trailing_granule; /* True or False */
1072  boolean leading_granule_scan_gap; /* True or False */
1073  boolean trailing_granule_scan_gap; /* True or False */
1074  boolean NAD_Door_Open[MAX_NUM_SCANS];
1075  boolean Sector_Rotation[MAX_NUM_SCANS];
1076  boolean Electronic_Anomaly[MAX_NUM_SCANS];
1079  int32 num_missing_data_in_scans[NUM_DETECTORS];
1080  int32 num_dead_detector_EV_data[NUM_DETECTORS];
1081  int32 num_dead_subframe_EV_data[NUM_HIGH_RESOLUTION_DETECTORS];
1082  int32 num_sector_rotation_EV_data[NUM_DETECTORS];
1083  int32 num_saturated_EV_data[NUM_DETECTORS];
1084  int32 num_no_bg_DN_EV_data[NUM_DETECTORS];
1085  int32 num_moon_in_SVP_TEB_EV_data[NUM_DETECTORS];
1086  int32 num_bad_dn_star_star_RSB_EV_data[NUM_DETECTORS];
1087  int32 num_exceed_max_for_scaling[NUM_DETECTORS];
1088  int32 num_nadir_door_closed_EV_data[NUM_DETECTORS];
1089  int32 num_negative_b1[NUM_DETECTORS];
1092  float32 granule_averages[MAX_NUM_GRAN_AVERAGES];
1093 } QA_Common_t;
1094 
1095 typedef struct
1096 {
1100 } QA_Data_t;
1101 
1102 /* 16 Bit Constants for Re-Scaling of Radiance */
1103 #define DN15_SAT 32767
1104 #define DN_MIN 0
1105 
1106 /************************ Error message utilities ************************/
1107 /*
1108  * The following are global values to use for the "other_msg" input to
1109  * L1BErrorMsg. These errors may occur many times.
1110  */
1111 
1112 extern char Invalid_MOD01_Msg[]; /* Invalid or out of bounds L1A data */
1113 
1114 /*
1115  * Function protos
1116  */
1117 int safe_strcat(
1118  char *buf, /* A character buffer that we want to concatenate to */
1119  char *str, /* The string to be concatenated */
1120  int buflen /* The known memory limitation of the character buffer */
1121 );
1122 
1123 void L1BErrorMsg(
1124  /* name of L1B function that error occurred in */
1125  char *L1B_location,
1126 
1127  /* associated error code for this error */
1128  PGSt_SMF_code code,
1129 
1130  /* short (usually 1-line) description of error */
1131  char *input_message,
1132 
1133  /* name of the associated function that failed */
1134  char *assoc_function,
1135 
1136  /* associated LUN for the file being accessed */
1137  int32 lun,
1138 
1139  /* other message to add such as probable cause */
1140  char *other_msg,
1141 
1142  /* flag to tell whether or not to call SMF_ERROR */
1143  boolean error_out
1144 
1145 );
1146 
1147 void SMF_ERROR
1148  (PGSt_SMF_code code,
1149  char *messagestring);
1150 
1151 void Bad_L1A_Error_Out
1152  (char *name,
1153  char *message);
1154 
1155 /********************** Other function Prototypes **************************/
1156 
1157 PGSt_SMF_status Read_Run_Time_Parameters
1158  (Run_Time_Parameters_t *runtime_params);
1159 
1160 PGSt_SMF_status Open_and_Read_L1A
1161  (Run_Time_Parameters_t *runtime_params,
1162  L1A_granule_t *L1A_Gran,
1163  boolean *skip_night_hi_res);
1164 
1165 
1166 PGSt_SMF_status Get_Satellite_ID
1167  (PGSt_PC_Logical lun,
1168  int32 *satellite_ID);
1169 
1170 
1171 PGSt_SMF_status Read_L1A_EV_Scan
1172  (int16 S,
1173  L1A_granule_t *L1A_Gran,
1174  L1A_Scan_t *L1A_Scan);
1175 
1176 
1177 PGSt_SMF_status Aggregate_L1B
1178  (L1B_Scan_t *L1B_Scan);
1179 
1180 
1181 PGSt_SMF_status Fill_Dead_Detector_SI
1182  (boolean isdaymode,
1183  int8 *dead_detector,
1184  L1B_Scan_t *L1B_Scan,
1185  L1B_granule_t *L1B_Gran,
1186  QA_Common_t *QA_Common);
1187 
1188 
1189 PGSt_SMF_status Write_L1B_EV_Scan
1190  (int16 S,
1191  L1B_granule_t *L1B_Gran,
1192  L1B_Scan_t *L1B_Scan,
1193  boolean isdaymode);
1194 
1195 
1196 PGSt_SMF_status Close_L1A_Granule
1197  (L1A_granule_t *L1A_Gran,
1198  L1A_Scan_t *L1A_Scan);
1199 
1200 
1201 PGSt_SMF_status Close_L1B_Granule
1202  (L1B_granule_t *L1B_Gran,
1203  L1B_Scan_t *L1B_Scan,
1204  boolean skip_night_hi_res);
1205 
1206 
1207 #endif
1208 
@ GRAN_AVG_TA_RC_CS
Definition: Granule.h:709
@ GRAN_AVG_TP_BB_TEMP08
Definition: Granule.h:689
integer, parameter int16
Definition: cubeio.f90:3
@ SV_INDEX
Definition: Granule.h:637
@ Earth_Frames
Definition: Granule.h:620
@ BAND35
Definition: Granule.h:644
uint8 noise_T_cav
Definition: Granule.h:1040
#define SCAN_QUALITY_ARRAY_NUM_ELEMENTS
Definition: Granule.h:488
boolean leading_granule_scan_gap
Definition: Granule.h:1072
uint8 noise_T_ins
Definition: Granule.h:1039
#define MAX_SAMPLES_PER_BAND
Definition: Granule.h:475
@ SD_Frames
Definition: Granule.h:621
QA_Common_t QA_common
Definition: Granule.h:1097
int16 BAND_RATIO_AT_RES[NUM_L1A_RESOLUTIONS]
Definition: Granule.c:73
===========================================================================V4.1.3 12/18/2002============================================================================Changes which do not affect scientific output:1. The R *LUT was eliminated and the equivalent formulation for R *, i.e. 1/(m1 *e_sun_over_pi), was substituted for it in the only instance of its use, which is in the calculation of the RSB uncertainty index. This reduces the size of the Reflective LUT HDF file by approximately 1/4 to 1/3. The equivalent formulation of R *differed from the new by at most 0.056% in test granules and uncertainty differences of at most 1 count(out of a range of 0-15) were found in no more than 1 in 100, 000 pixels. 2. In Preprocess.c, a small error where the trailing dropped scan counter was incremented when the leading dropped scan counter should have been was fixed. This counter is internal only and is not yet used for any purpose. 3. NEW MYD02OBC Metadata Configuration Files. MCST wishes to have the OBC files archived even when the Orbit Number is recorded as "-1". Accordingly, ECS has delivered new MCF files for OBC output having all elements in the OrbitCalculatedSpatialDomain container set to "MANDATORY=FALSE". 4. pgs_in.version is now reset to "1" in Metadata.c before the call to look up the geolocation gringpoint information.============================================================================V4.1.1 CODE SPECIFIC TO MODIS/AQUA(FM1) 10/03/2002============================================================================Two changes were made to the code which do not affect scientific output:1. A bug which caused PGE02 to fail when scans were dropped between granules was fixed.(The length of the error message generated was shortened.) 2. Messages regarding an invalid MCST LUT Version or an invalid Write High Resolution Night Mode Output value in the PCF file were added.==============================================================================V4.1.0 CODE SPECIFIC TO MODIS/AQUA(FM1)(NEVER USED IN PRODUCTION) 07/30/2002==============================================================================Changes which impact scientific output of code:1. The LUT type of the RVS corrections was changed to piecewise linear. In addition the RVS LUTs were changed from listing the RVS corrections to listing the quadratic coefficients necessary to make the RVS corrections. The coefficients are now calculated by interpolating on the granule collection time and the RVS corrections are then generated using the interpolated coefficients. Previously used Emissive and Reflective RVS LUT tables were eliminated and new ones introduced. Several changes were made to the code which should not affect scientific output. They are:1. The ADC correction algorithm and related LUTs were stripped from the code.(The ADC correction has always been set to "0" so this has no scientific impact.) 2. Some small changes to the code, chiefly to casting of variables, were added to make it LINUX-compatible. Output of code run on LINUX machines displays differences of at most 1 scaled integer(SI) from output of code run on IRIX machines. The data type of the LUT "dn_sat_ev" was changed to float64 to avoid discrepancies seen between MOD_PR02 run on LINUX systems and IRIX systems where values were flagged under one operating system but not the other. 3. Checking for non-functioning detectors, sector rotation, incalculable values of the Emissive calibration factor "b1", and incalculable values of SV or BB averages was moved outside the loop over frames in Emissive_Cal.c since none of these quantities are frame-dependent. 4. The code was altered so that if up to five scans are dropped between the leading/middle or middle/trailing granules, the leading or trailing granule will still be used in emissive calibration to form a cross-granule average. QA bits 25 and 26 are set for a gap between the leading/middle and middle/trailing granules respectively. This may in rare instances lead to a change in emissive calibration coefficients for scans at the beginning or end of a granule. 5.(MODIS/AQUA ONLY) The name of the seed(error message) file was changed from "MODIS_36100.h" to "MODIS_36110.h". 6. Metadata.c was changed so that the source of the geolocation metadata is the input geolocation file rather than the L1A granule. 7. To reduce to overall size of the reflective LUT HDF files, fill values were eliminated from all LUTs previously dimensioned "BDSM"([NUM_REFLECTIVE_BANDS] *[MAX_DETECTORS_PER_BAND] *[MAX_SAMPLES_PER_BAND] *[NUM_MIRROR_SIDES]) in the LUT HDF files. Each table piece is stored in the HDF file with dimensions NUM_REFLECTIVE_INDICES, where NUM_REFLECTIVE_INDICES=[NUM_250M_BANDS *DETECTORS_PER_250M_BAND *SAMPLES_PER_250M_BAND *NUM_MIRROR_SIDES]+[NUM_500M_BANDS *DETECTORS_PER_500M_BAND *SAMPLES_PER_500M_BAND *NUM_MIRROR_SIDES]+[NUM_1000M_BANDS *DETECTORS_PER_1KM_BAND *SAMPLES_PER_1KM_BAND *NUM_MIRROR_SIDES] with SAMPLES_PER_250M_BAND=4, SAMPLES_PER_500M_BAND=2, and SAMPLES_PER_1KM_BAND=1. Values within each table piece appear in the order listed above. The overall dimensions of time dependent BDSM LUTs are now[NUM_TIMES] *[NUM_REFLECTIVE_INDICES], where NUM_TIMES is the number of time dependent table pieces. 8. Checking for non-functioning detectors, sector rotation, incalculable values of the Emissive calibration factor "b1", and incalculable values of SV or BB averages was moved outside the loop over frames in Emissive_Cal.c since none of these quantities are frame-dependent. 9. The code was altered so that if up to five scans are dropped between the leading/middle or middle/trailing granules, the leading or trailing granule will still be used in emissive calibration to form a cross-granule average. QA bits 25 and 26 are set for a gap between the leading/middle and middle/trailing granules respectively. This may in rare instances lead to a change in emissive calibration coefficients for scans at the beginning or end of a granule. 10. The array of b1s in Preprocess.c was being initialized to -1 outside the loop over bands, which meant that if b1 could not be computed, the value of b1 from the previous band for that scan/detector combination was used. The initialization was moved inside the band loop.============================================================================V3.1.0(Original Aqua-specific code version) 02/06/2002============================================================================AQUA-Specific changes made:1. A correction to a problem with blackbody warmup on bands 33, 35, and 36 was inserted. PC Bands 33, 35, and 36 on MODIS Aqua saturate on BB warmup before 310K, which means current code will not provide correct b1 calibration coefficients when the BB temperatures are above the saturation threshold. A LUT with default b1s and band-dependent temperature thresholds will be inserted in code. If the BB temperature is over the saturation threshold for the band, the default b1 from the table is used. 2. The number of possible wavelengths in the Emissive LUT RSR file was changed to 67 in order to accommodate the Aqua RSR tables. 3. Several changes to the upper and lower bound limits on LUT values were inserted. Changes to both Aqua and Terra Code:1. A check was put into Emissive_Cal.c to see whether the value of b1 being used to calibrate a pixel is negative. If so, the pixel is flagged with the newly created flag TEB_B1_NOT_CALCULATED, value 65526, and the number of pixels for which this occurs is counted in the QA_common table. 2. The array of b1s in Preprocess.c was being initialized to -1 outside the loop over bands, which meant that if b1 could not be computed, the value of b1 from the previous band for that scan/detector combination was used. The initialization was moved inside the band loop. 3. Minor code changes were made to eliminate compiler warnings when the code is compiled in 64-bit mode. 4. Temperature equations were upgraded to be MODIS/Aqua or MODIS/Terra specific and temperature conversion coefficients for Aqua were inserted.========================================================================================================================================================ALL CHANGES BELOW ARE TO COMMON TERRA/AQUA CODE USED BEFORE 02/06/2002========================================================================================================================================================v3.0.1 11/26/2001============================================================================Several small changes to the code were made, none of which changes the scientific output:1. The code was changed so that production of 250m and 500m resolution data when all scans of a granule are in night mode may be turned off/on through the PCF file. 2. A check on the times of the leading and trailing granules was inserted. If a leading or trailing granule does not immediately precede or follow(respectively) the middle granule, it is treated as a missing granule and a warning message is printed. 3. The code now reads the "MCST Version Number"(e.g. "3.0.1.0_Terra") from the PCF file and checks it against the MCST Version number contained in the LUT HDF files. This was done to allow the user to make sure the code is being run using the correct LUT files.(The designators "0_Terra", "1_Terra", etc.) refer to the LUT versions.) 4. A small bug in Preprocess.c was corrected code
Definition: HISTORY.txt:661
#define NUM_EMISSIVE_BANDS
Definition: Granule.h:435
int16 DETECT_PER_BAND_AT_RES[NUM_L1A_RESOLUTIONS]
Definition: Granule.c:68
boolean missing_trailing_granule
Definition: Granule.h:1071
@ GRAN_AVG_TP_BB_TEMP12
Definition: Granule.h:693
L1B_ScaleOffset_t SO
Definition: Granule.h:865
@ BAND29
Definition: Granule.h:644
@ Number_Of_Scans
Definition: Granule.h:616
@ BAND36
Definition: Granule.h:644
void Bad_L1A_Error_Out(char *name, char *message)
Definition: Granule.c:1616
@ INDEX_1000M_DAY
Definition: Granule.h:571
@ BAND32
Definition: Granule.h:644
@ INDEX_500M
Definition: Granule.h:570
@ BAND33
Definition: Granule.h:644
int32 EV_500m_Aggr1km_RefSB_sds_id
Definition: Granule.h:965
@ GRAN_AVG_TA_RC_OS_OG
Definition: Granule.h:713
@ GRAN_AVG_TP_AO_LWIR_OBJ
Definition: Granule.h:706
@ GRAN_AVG_TP_BB_TEMP07
Definition: Granule.h:688
@ GRAN_AVG_TP_BB_TEMP10
Definition: Granule.h:691
Band_26_t Band26
Definition: Granule.h:1022
@ GRAN_AVG_TP_MF_CALBKHD_SR
Definition: Granule.h:701
@ Number_Night_Scans
Definition: Granule.h:618
int safe_strcat(char *buf, char *str, int buflen)
Definition: Granule.c:834
int32 EV_250m_Aggr500m_RefSB_SU_sds_id
Definition: Granule.h:970
uint8 noise_T_mir2
Definition: Granule.h:1037
@ GRAN_AVG_TP_SA_RCT2_MIRE
Definition: Granule.h:699
int32 EV_500m_Aggr1km_RefSB_SU_sds_id
Definition: Granule.h:972
L1B_EV_FILE_index_t
Definition: Granule.h:583
#define NUM_500M_BANDS
Definition: Granule.h:431
Emiss_Cal_Coeff_t Emiss_Cal_Coeff
Definition: Granule.h:864
int32 SI_sds_id
Definition: Granule.h:947
@ GRAN_AVG_TP_SA_A_MTR
Definition: Granule.h:700
@ SD_INDEX
Definition: Granule.h:634
int32 num_scans
Definition: Granule.h:749
@ BAND21
Definition: Granule.h:643
@ INDEX_250M
Definition: Granule.h:569
@ GRAN_AVG_TA_RC_LWIR_CFPAE
Definition: Granule.h:697
void L1BErrorMsg(char *L1B_location, PGSt_SMF_code code, char *input_message, char *assoc_function, int32 lun, char *other_msg, boolean error_out)
Definition: Granule.c:918
float64 data_collection_time
Definition: Granule.h:755
@ BAND20
Definition: Granule.h:643
#define DETECTORS_PER_500M_BAND
Definition: Granule.h:439
#define NUM_EMISSIVE_DETECTORS
Definition: Granule.h:428
@ NUM_TARGETS
Definition: Granule.h:639
@ Packets_With_Bad_CRC
Definition: Granule.h:628
#define DETECTORS_PER_1KM_BAND
Definition: Granule.h:438
@ BB_Frames
Definition: Granule.h:623
PGSt_SMF_status Close_L1A_Granule(L1A_granule_t *L1A_Gran, L1A_Scan_t *L1A_Scan)
Definition: Granule.c:192
PGSt_SMF_status Read_Run_Time_Parameters(Run_Time_Parameters_t *runtime_params)
Definition: Granule.c:2989
@ GRAN_AVG_TA_RC_IS_OG
Definition: Granule.h:712
@ GRAN_AVG_TP_BB_TEMP09
Definition: Granule.h:690
int32 num_missing_scans
Definition: Granule.h:1077
int32 num_night_scans
Definition: Granule.h:759
@ GRAN_AVG_TP_SR_SNOUT
Definition: Granule.h:702
@ BAND28
Definition: Granule.h:643
@ GRAN_AVG_VR_RC_LW_FPA_HTR
Definition: Granule.h:714
@ BAND30
Definition: Granule.h:644
@ INDEX_L1B_250m
Definition: Granule.h:587
int32 num_day_scans
Definition: Granule.h:750
QA_Refl_t QA_refl
Definition: Granule.h:1099
int32 v_id
Definition: Granule.h:746
@ BAND25
Definition: Granule.h:643
@ GRAN_AVG_TA_RC_CS_OG
Definition: Granule.h:710
@ OFF
Definition: Granule.h:479
@ GRAN_AVG_TP_BB_TEMP02
Definition: Granule.h:683
int32 SUBSAMPLES_AT_RES[NUM_L1A_RESOLUTIONS]
Definition: Preprocess.c:21
PGSt_SMF_status Fill_Dead_Detector_SI(boolean isdaymode, int8 *dead_detector, L1B_Scan_t *L1B_Scan, L1B_granule_t *L1B_Gran, QA_Common_t *QA_Common)
Definition: Granule.c:1919
int16 L1B_BANDS_AT_RES[NUM_L1A_RESOLUTIONS]
Definition: Granule.c:58
@ NUM_L1B_EV_FILES
Definition: Granule.h:590
uint8 noise_T_vis
Definition: Granule.h:1053
#define NUM_1000M_EMISS_BANDS
Definition: Granule.h:434
@ GRAN_AVG_TP_BB_TEMP11
Definition: Granule.h:692
PGSt_SMF_status Get_Satellite_ID(PGSt_PC_Logical lun, int32 *satellite_ID)
Definition: Granule.c:2924
@ SRCA_Frames
Definition: Granule.h:622
@ BAND23
Definition: Granule.h:643
@ GRAN_AVG_TP_BB_TEMP04
Definition: Granule.h:685
char Invalid_MOD01_Msg[]
Definition: Granule.c:913
@ NUM_NIGHT_BANDS
Definition: Granule.h:644
target_index_t
Definition: Granule.h:633
@ BAND22
Definition: Granule.h:643
L1B_Scan_UI_t UI
Definition: Granule.h:987
@ BAND27
Definition: Granule.h:643
uint32 bit_QA_flags_change
Definition: Granule.h:1091
@ Incomplete_Scans
Definition: Granule.h:626
@ BAND26
Definition: Granule.h:643
PGSt_SMF_status Close_L1B_Granule(L1B_granule_t *L1B_Gran, L1B_Scan_t *L1B_Scan, boolean skip_night_hi_res)
Definition: Granule.c:268
@ Discarded_Packets
Definition: Granule.h:629
float32 Earth_Sun_Dist
Definition: Granule.h:886
uint8 noise_T_mwir
Definition: Granule.h:1035
uint8 noise_T_bb_avg
Definition: Granule.h:1033
int32 Extract_Line_Count
Definition: Granule.h:765
#define EV_1km_FRAMES
Definition: Granule.h:469
@ GRAN_AVG_TP_MF_Z_BKHD_BB
Definition: Granule.h:703
int32 EV_250m_Aggr500m_RefSB_UI_sds_id
Definition: Granule.h:967
int32 Extract_Pixel_Offset
Definition: Granule.h:762
instead the metadata field ProcessingEnvinronment is filled in from the output of a call to the POSIX compliant function uname from within the L1B code A small bug in L1B_Tables an incorrect comparison of RVS coefficients for TEBs to RVS coefficients for RSBs was being made This was replaced with a comparison between TEB coefficients This error never resulted in an incorrect RVS correction but did lead to recalculating the coefficients for each detector in a thermal band even if the coefficients were the same for all detectors To reduce to overall size of the reflective LUT HDF fill values were eliminated from all LUTs previously dimensioned where and where NUM_TIMES is the number of time dependent table pieces In Preprocess a small error where the trailing dropped scan counter was incremented when the leading dropped scan counter should have been was fixed This counter is internal only and is not yet used for any chiefly to casting of were added to make it LINUX compatible Output of code run on LINUX machines displays differences of at most scaled sector incalculable values of the Emissive calibration factor and incalculable values of SV or BB averages was moved outside the loop over frames in Emissive_Cal c since none of these quantities are frame dependent Initialization of b1 and XMS values in Preprocess c routine Process_OBCENG_Emiss was moved inside the detector loops The code was altered so that if up to five scans are dropped between the leading middle or middle trailing the leading or trailing granule will still be used in emissive calibration to form a cross granule average QA bits and are set for a gap between the leading middle and middle trailing granules respectively This may in rare instances lead to a change in emissive calibration coefficients for scans at the beginning or end of a granule A small bug in the Band correction algorithm was corrected an uncertainty value was being checked against an upper bound whereas the proper quantity to be checked was the corresponding which is the product of the Band radiance times the ratio of the Band to Band scaling factors times the LUT correction value for that detector In addition a new LUT which allows for a frame offset with regard to the Band radiance was added A LUT which switches the correction off or on was also added Changes which do not affect scientific output of the the pixel is flagged with the newly created flag and the number of pixels for which this occurs is counted in the QA_common table The array of b1s in Preprocess c was being initialized to outside the loop over which meant that if b1 could not be the value of b1 from the previous band for that scan detector combination was used The initialization was moved inside the band loop Minor code changes were made to eliminate compiler warnings when the code is compiled in bit mode Temperature equations were upgraded to be MODIS AQUA or MODIS TERRA specific and temperature conversion coefficients for AQUA were MOD_PR02 will not cease execution if the value of this parameter is not but will print a message
Definition: HISTORY.txt:644
@ BAND24
Definition: Granule.h:643
PGSt_SMF_status Aggregate_L1B(L1B_Scan_t *L1B_Scan)
Definition: Granule.c:78
int32 Extract_Line_Offset
Definition: Granule.h:764
#define EV_500m_FRAMES
Definition: Granule.h:471
gran_average_def_t
Definition: Granule.h:665
int32 num_day_scans
Definition: Granule.h:861
int32 EV_250m_Aggr1km_RefSB_SU_sds_id
Definition: Granule.h:971
@ BAND34
Definition: Granule.h:644
@ GRAN_AVG_TA_RC_IS
Definition: Granule.h:711
@ ON
Definition: Granule.h:479
int32 EV_250m_Aggr500m_RefSB_sds_id
Definition: Granule.h:963
README for MOD_PR03(V6.1.0) 2. POINTS OF CONTACT it can be either SDP Toolkit or MODIS Packet for Terra input files The orbit validation configuration because the validation criteria it uses are too strict for the low precision estimation methods we use in that mode The PGEVersion configuration or PM1M for Aqua data The ProcessingEnvironment configuration as executed in the processing environment The ReprocessingActual(LUN 800600) and ReprocessingPlanned(LUN 800605) should be set to the values that should appear in the corresponding ECS metadata items of the same name. Typically
#define NUM_HIGH_RESOLUTION_DETECTORS
Definition: Granule.h:425
@ NUM_L1A_ATTRIBUTES
Definition: Granule.h:630
@ Scan_Type
Definition: Granule.h:625
int32 MOD_PR02_Failure_Exit_Code
Definition: Granule.c:52
int32 max_ev_frames
Definition: Granule.h:761
@ GRAN_AVG_TA_AO_NIR_FPAE
Definition: Granule.h:695
instead the metadata field ProcessingEnvinronment is filled in from the output of a call to the POSIX compliant function uname from within the L1B code A small bug in L1B_Tables an incorrect comparison of RVS coefficients for TEBs to RVS coefficients for RSBs was being made This was replaced with a comparison between TEB coefficients This error never resulted in an incorrect RVS correction but did lead to recalculating the coefficients for each detector in a thermal band even if the coefficients were the same for all detectors To reduce to overall size of the reflective LUT HDF fill values were eliminated from all LUTs previously dimensioned where and where NUM_TIMES is the number of time dependent table pieces In Preprocess a small error where the trailing dropped scan counter was incremented when the leading dropped scan counter should have been was fixed This counter is internal only and is not yet used for any chiefly to casting of were added to make it LINUX compatible Output of code run on LINUX machines displays differences of at most scaled sector incalculable values of the Emissive calibration factor and incalculable values of SV or BB averages was moved outside the loop over frames in Emissive_Cal c since none of these quantities are frame dependent Initialization of b1 and XMS values in Preprocess c routine Process_OBCENG_Emiss was moved inside the detector loops The code was altered so that if up to five scans are dropped between the leading middle or middle trailing the leading or trailing granule will still be used in emissive calibration to form a cross granule average QA bits and are set for a gap between the leading middle and middle trailing granules respectively This may in rare instances lead to a change in emissive calibration coefficients for scans at the beginning or end of a granule A small bug in the Band correction algorithm was corrected an uncertainty value was being checked against an upper bound whereas the proper quantity to be checked was the corresponding SI
Definition: HISTORY.txt:595
@ GRAN_AVG_TP_BB_TEMP06
Definition: Granule.h:687
#define MAX_RUNTIME_PARAM_SIZE
Definition: Granule.h:732
@ EV_INDEX
Definition: Granule.h:638
@ Missing_Packets
Definition: Granule.h:627
int32 num_scans
Definition: Granule.h:860
@ GRAN_AVG_TP_AO_SMIR_LENS
Definition: Granule.h:707
#define MAX_NUM_SCANS
Definition: Granule.h:422
int16 L1A_BANDS_AT_RES[NUM_L1A_RESOLUTIONS]
Definition: Granule.c:63
uint8 noise_T_nir
Definition: Granule.h:1054
@ INDEX_L1B_1km
Definition: Granule.h:589
const char * str
Definition: l1c_msi.cpp:35
PGSt_SMF_status Write_L1B_EV_Scan(int16 S, L1B_granule_t *L1B_Gran, L1B_Scan_t *L1B_Scan, boolean isdaymode)
Definition: Granule.c:1673
#define NUM_REFLECTIVE_BANDS
Definition: Granule.h:433
uint8 noise_T_lwir
Definition: Granule.h:1034
@ INDEX_1000M_NIGHT
Definition: Granule.h:572
uint32 bit_QA_flags_last_value
Definition: Granule.h:1090
switch_t
Definition: Granule.h:479
int32 num_rsb_at_night_scans
Definition: Granule.h:1078
uint8 noise_T_mir_avg
Definition: Granule.h:1038
#define NUM_FOCAL_PLANES
Definition: Granule.h:486
#define SCAN_TYPE_TEXT_SIZE
Definition: Granule.h:481
boolean trailing_granule_scan_gap
Definition: Granule.h:1073
#define NUM_1000M_NIGHT_BANDS
Definition: Granule.h:437
PGSt_SMF_status Open_and_Read_L1A(Run_Time_Parameters_t *runtime_params, L1A_granule_t *L1A_Gran, boolean *skip_night_hi_res)
Definition: Granule.c:2450
#define NUM_BANDS
Definition: Granule.h:423
QA_Emiss_t QA_emiss
Definition: Granule.h:1098
#define NUM_REFLECTIVE_DETECTORS
Definition: Granule.h:427
RSB_Cal_Coeff_t RSB_Cal_Coeff
Definition: Granule.h:863
int32 incomplete_scans
Definition: Granule.h:760
uint8 noise_T_mir1
Definition: Granule.h:1036
int8 boolean
Definition: Granule.h:566
int32 sd_id
Definition: Granule.h:747
night_band_index_t
Definition: Granule.h:642
int8 all_l1b_error_flags_off
Definition: Granule.h:1069
L1A_attr_index_t
Definition: Granule.h:614
#define NUM_250M_BANDS
Definition: Granule.h:430
@ Total_Frames
Definition: Granule.h:619
boolean missing_leading_granule
Definition: Granule.h:1070
int32 satellite_id
Definition: Granule.h:748
@ Orbital_Node
Definition: Granule.h:615
@ NUM_GRAN_AVERAGES
Definition: Granule.h:715
resolution_index_t
Definition: Granule.h:568
int32 EV_250m_Aggr1km_RefSB_sds_id
Definition: Granule.h:964
#define MAX_DETECTORS_PER_BAND
Definition: Granule.h:474
int32 Extract_Pixel_Count
Definition: Granule.h:763
@ Number_Day_Scans
Definition: Granule.h:617
@ SV_Frames
Definition: Granule.h:624
@ INDEX_L1B_500m
Definition: Granule.h:588
@ GRAN_AVG_TP_AO_LWIR_LENS
Definition: Granule.h:708
#define NUM_1000M_DAY_BANDS
Definition: Granule.h:436
@ NUM_L1A_RESOLUTIONS
Definition: Granule.h:573
int32 EV_250m_Aggr1km_RefSB_UI_sds_id
Definition: Granule.h:968
#define NUM_1000M_REFL_BANDS
Definition: Granule.h:432
@ GRAN_AVG_TP_AO_SMIR_OBJ
Definition: Granule.h:705
@ BAND31
Definition: Granule.h:644
#define MAX_NUM_GRAN_AVERAGES
Definition: Granule.h:706
#define NUM_DETECTORS
Definition: Granule.h:424
L1B_Scan_SI_t SI
Definition: Granule.h:973
@ GRAN_AVG_TP_BB_TEMP05
Definition: Granule.h:686
@ GRAN_AVG_TP_SA_RCT1_MIRE
Definition: Granule.h:698
int32 EV_500m_Aggr1km_RefSB_UI_sds_id
Definition: Granule.h:969
int16 band_X
Definition: Granule.h:1026
PGSt_SMF_status Read_L1A_EV_Scan(int16 S, L1A_granule_t *L1A_Gran, L1A_Scan_t *L1A_Scan)
Definition: Granule.c:671
@ GRAN_AVG_TP_MF_CVR_OP_SR
Definition: Granule.h:704
#define DETECTORS_PER_250M_BAND
Definition: Granule.h:440
int32 UI_sds_id
Definition: Granule.h:948
@ GRAN_AVG_TA_RC_SMIR_CFPAE
Definition: Granule.h:696
void SMF_ERROR(PGSt_SMF_code code, char *messagestring)
Definition: Granule.c:1345
@ GRAN_AVG_TP_BB_TEMP01
Definition: Granule.h:682
#define NUM_MIRROR_SIDES
Definition: Granule.h:429
@ SRCA_INDEX
Definition: Granule.h:635
@ BB_INDEX
Definition: Granule.h:636
@ GRAN_AVG_TP_BB_TEMP03
Definition: Granule.h:684
#define EV_250m_FRAMES
Definition: Granule.h:470
@ GRAN_AVG_TA_AO_VIS_FPAE
Definition: Granule.h:694