OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
L1B.c
Go to the documentation of this file.
1 #include "PGS_Error_Codes.h"
2 #include "FNames.h"
3 #include <math.h>
4 #include <time.h>
5 #include "PGS_TD.h"
6 #include "Preprocess.h" /* for Preprocess_L1A */
7 #include "Metadata.h" /* for Gran_Meta_Cal, Write_Gran_Metadata */
8 #include "Emissive_Cal.h" /* for Emissive_Cal */
9 #include "Reflective_Cal.h" /* for Reflective_Cal */
10 #include "L1B_Tables.h" /* for Read_Lookup_Tables */
11 #include "L1B_Setup.h" /* for L1B_Setup */
12 #include "Granule.h" /* for Read_L1A_EV_Scan, Aggregate_L1B,
13  * Write_L1B_EV_Scan, Close_L1A_Granule,
14  * Close_L1B_Granule */
15 
16 int main(void)
17 /*
18 !C**********************************************************************
19 !Description: L1B main routine.
20 
21 !Input Parameters:
22 
23 !Output Parameters:
24 
25 !Revision History:
26  $Log: L1B.c,v $
27  Revision 1.15 2008-11-18 11:20:03-05 xgeng
28  merge the branch for V6.0.1
29 
30  Revision 1.11.2.3 2008/06/02 15:37:26 xgeng
31  Remove the call of Fill_Dead_Detector_SI
32 
33  Revision 1.11 2005/01/18 21:57:35 ltan
34  Added new file attributes prefixed with HDFEOS_FractionalOffset
35 
36  Revision 02.19 October 16, 2004 Razor Issue #200
37  Added "void" in the function main's parameter list to comply with ESDIS
38  guideline.
39  Liqin Tan, SAIC GSO (ltan@saicmodis.com)
40 
41  Revision 02.18 March 26, 2003 Razor Issue #190
42  Added call to Band_26_Crosstalk_Correction which corrects Band 26
43  values using aggregated Band 5 values and LUT correction factors.
44  Correction had previously been added to Terra code.
45  Alice Isaacman SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
46 
47  Revision 02.16 March 11, 2002 Razor Issue #174
48  Added Passing of L1B_Gran to Preprocess.c to pass needed RVS correction
49  coefficients.
50  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov), SAIC GSO
51 
52  Revision 02.15 November 12, 2001 Razor Issue #169
53  Added boolean skip_night_hi_res to variable list and changed name
54  of boolean isdaymode to daymode_scan.
55  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov), SAIC GSO
56 
57  Revision 02.14 November 6, 2001
58  Changed call to Read_Lookup_Tables to include runtime parameters so that
59  a check can be made on MCST Version from the PCF file (Razor issue #167).
60  Alice Isaacman SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
61 
62  Revision 02.13 October 29, 2000
63  Razor issue 142, Add LUT to control scan checking QA for split scans
64  and scan quality array.
65  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
66 
67  Revision 02.12 September 21, 2000
68  Added counting num_rsb_at_night_scans as per Razor issue 137.
69  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
70 
71  ... (many changes not logged) ...
72 
73  Revision 02.11 Feb. 8, 1999
74  Moved call to function Write_L1B_ScanMeta to L1B (main).
75  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
76 
77  Revision 02.10 June 1998
78  Modified the Preprocess_L1A_Data() calls to include the refl_tables into
79  parameters
80  Zhenying Gu (zgu@ltpmail.gsfc.nasa.gov)
81 
82  Revision 02.10 Apr. 1998
83  Removed the Cleanup_Preprocess_Data(&PP), because PP is changed to static
84  allocation. Removed the Cleanup_Emiss_Tables(), because Planck Integration
85  is decided to carry on with in-line calculation. It may will be switched
86  back to using SIL tables, then we may need to add it back.
87  Shi-Yue Qiu (syqiu@ltpmail.gsfc.nasa.gov)
88 
89  Revision 02.10 Apr. 10, 1998
90  Removed the momos declaration (moved to the L1B_granule_t in Granule.h)
91  Removed the momos_t parmater from the L1B_Setup() and Reflective_Cal()
92  calls - they're now included in the L1B_Gran parameter.
93  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
94 
95  Revision 02.10 Apr. 1998
96  Replaced L1B_Metadata() with gran_meta_cal() for the time being. It will
97  be gran_meta_cal() and Write_Granule_Metadata() later.
98  Zhenying Gu (zgu@gscmail.gsfc.nasa.gov)
99 
100  Revision 02.10 Apr. 1998
101  Changed tables from dynamic to static allocation.
102  Changed Cleanup_Lookup_Tables() to Cleanup_Emiss_Tables()
103  Added the momos_t parameter to the L1B_Setup() and
104  Reflective_Cal() function calls.
105  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
106 
107  Revision 02.10 Mar. 1998
108  Add argument MirrorSide to the Emissive_Cal argument list
109  Replace PP by PP->PP_Emiss in Emissive_Cal
110  Replace PP by PP->PP_Refl in Reflective_Cal
111  Shi-Yue Qiu (syqiu@ltpmail.gsfc.nasa.gov)
112 
113  Revision 02.10 Mar. 1998
114  Changed order of calibration to emissive followed by reflective
115  (since reflective calibration needs band 28 radiances).
116  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
117 
118  Revision 02.10 Jan. 1998
119  Introduced lookup_tables_t, which includes refl_tables_t, emiss_tables_t, and
120  the new QA_tables_t.
121  Zhidong Hao (hao@barebackride.gsfc.nasa.gov)
122 
123  Revision 02.00 Jan. 1997
124  Introduced refl_tables_t, emiss_tables_t, and Preprocess_Data_t,
125  restructured L1A_granule_t, L1A_Scan_t, L1B_granule_t, and L1B_scan_t,
126  Zhidong Hao (hao@barebackride.gsfc.nasa.gov)
127 
128  Revision 01.05 1995/12/07 14:15:00
129  Changed Therm_ prefix on lookup tables to Emiss_ prefix
130  Joan Baden(baden@highwire.gsfc.nasa.gov)
131 
132  Revision 01.04 1995/11/20 11:24:19
133  Changed call from Setup() to L1B_Setup()
134  John Hannon(hannon@highwire.gsfc.nasa.gov)
135 
136  Revision 01.03 1995/11/13 09:47:09
137  Changed Derived_Housekeeping_t to Derived_Engineering_Data_t and DH to DED
138  John Hannon(hannon@highwire.gsfc.nasa.gov)
139 
140  Revision 01.02 1995/10/20 11:17:25
141  Implement direct PGS toolkit calls and populate comments
142  Joan Baden(baden@highwire.gsfc.nasa.gov)
143  John Hannon(hannon@highwire.gsfc.nasa.gov)
144 
145  Revision 01.01 1995/05/17
146  Initial header development
147  Joan Baden (baden@highwire.gsfc.nasa.gov)
148 
149  Revision 01.00 1993
150  Initial development
151  Geir E. Kvaran(geir@highwire.gsfc.nasa.gov)
152 
153 !Team-unique Header:
154  This software is developed by the MODIS Characterization Support
155  Team (MCST)for the National Aeronautics and Space Administration,
156  Goddard Space Flight Center, under contract NAS5-32373.
157 
158 !References and Credits:
159  HDF portions developed at the National Center for Supercomputing
160  Applications at the University of Illinois at Urbana-Champaign.
161 
162 !Design Notes:
163 
164 !END********************************************************************
165 */
166 {
167  PGSt_SMF_status returnStatus = MODIS_S_OK;
168  Run_Time_Parameters_t *runtime_params;
170  QA_Data_t *QA; /*Contains all L1B QA items */
171  Preprocess_Data_t *PP; /*Contains OBC/Eng averages/statictcs*/
172  L1A_granule_t *L1A_Gran;
173  L1A_Scan_t *L1A_Scan;
174  L1B_granule_t *L1B_Gran;
175  L1B_Scan_t *L1B_Scan;
176  L1B_Scan_Metadata_t *L1B_Scan_Meta;
177  L1B_Gran_Metadata_t *L1B_Gran_Meta;
178 
179  char *location = "main";
180  time_t tnow;
181 
182  /*Scan index (0,L1A_Gran.num_scans)*/
183  int16 S = 0;
184 
185  /* Flag denoting whether a scan is "Day" */
186  boolean daymode_scan;
187 
188  /*
189  * Flag denoting whether to skip writing a 250m- or 500m-resolution
190  * granule containing only NIGHT mode scans
191  */
192  boolean skip_night_hi_res = FALSE;
193 
194  /*
195  * Flag to processing to signal whether or not to perform
196  * Band 26 correction from Band 5
197  */
198  boolean do_B26_B5_corr = FALSE;
199 
200  // Allocate structures
201  runtime_params = (Run_Time_Parameters_t*) calloc(1, sizeof(Run_Time_Parameters_t));
202  tables = (lookup_tables_t*) calloc(1, sizeof(lookup_tables_t));
203  QA = (QA_Data_t*) calloc(1, sizeof(QA_Data_t));
204  PP = (Preprocess_Data_t*) calloc(1, sizeof(Preprocess_Data_t));
205  L1A_Gran = (L1A_granule_t*) calloc(1, sizeof(L1A_granule_t));
206  L1A_Scan = (L1A_Scan_t*) calloc(1, sizeof(L1A_Scan_t));
207  L1B_Gran = (L1B_granule_t*) calloc(1, sizeof(L1B_granule_t));
208  L1B_Scan = (L1B_Scan_t*) calloc(1, sizeof(L1B_Scan_t));
209  L1B_Scan_Meta = (L1B_Scan_Metadata_t*) calloc(1, sizeof(L1B_Scan_Metadata_t));
210  L1B_Gran_Meta = (L1B_Gran_Metadata_t*) calloc(1, sizeof(L1B_Gran_Metadata_t));
211 
213  printf("MODIS Aqua L1B version %s, built %s %s\n",
214  PGE02_VERSION, __DATE__, __TIME__);
215 
216  /*
217  * Read all run-time parameters from PCF.
218  */
219 
220  returnStatus = Read_Run_Time_Parameters(runtime_params);
221  if (returnStatus != MODIS_S_OK) {
222  L1BErrorMsg(location, returnStatus,
223  "Could not read run-time parameters from PCF",
224  "Read_Run_Time_Parameters", 0, NULL, True);
225  }
226 
227  /*
228  * Open and read L1A files
229  */
230 
231  returnStatus = Open_and_Read_L1A(runtime_params,
232  L1A_Gran, &skip_night_hi_res);
233  if (returnStatus != MODIS_S_OK) {
234  L1BErrorMsg(location, returnStatus,
235  "Could not open and read middle L1A granule",
236  "Open_and_Read_L1A", FIRST_L1A_GRANULE, NULL, True);
237  }
238 
239  /*
240  * Read all lookup tables
241  */
242 
243  returnStatus = Read_Lookup_Tables (L1A_Gran, tables, runtime_params);
244  if (returnStatus != MODIS_S_OK)
245  L1BErrorMsg(location, returnStatus, NULL, "Read_Lookup_Tables",
246  0, NULL, True);
247 
248  /* Determine whether Band 5 to Band 26 crosstalk correction wanted */
249  do_B26_B5_corr = tables->refl.B26_B5_Corr_Switch;
250 
251  /*
252  * Determine other scans to be treated as missing. This may adjust the
253  * "missing_scan" array in L1A_Gran. (Must be called before L1B_Setup).
254  */
255 
256  returnStatus = Determine_Other_Missing_Scans (tables, L1A_Gran);
257  if (returnStatus != MODIS_S_OK)
258  L1BErrorMsg(location, returnStatus, NULL, "Determine_Other_Missing_Scans",
259  0, NULL, True);
260 
261  /*
262  * Read/Process/Write OBC/Eng data, compute PP
263  */
264 
265  returnStatus = Preprocess_L1A_Data
266  (tables,
267  L1A_Gran,
268  L1B_Gran,
269  QA,
270  PP);
271 
272  if (returnStatus != MODIS_S_OK)
273  SMF_ERROR (returnStatus,"Preprocess_L1A_Data() in main(void), L1B.c");
274 
275  /*
276  * Prepare for L1B EV Calibration: Open L1A EV SDSs, Open L1B EV files,
277  * Create L1B EV SDSs, & read/process ScanMetaData,
278  * and calculate the MOMOs.
279  */
280 
281  returnStatus = L1B_Setup (tables,
282  L1A_Gran,
283  L1B_Gran,
284  L1A_Scan,
285  L1B_Scan,
286  QA,
287  L1B_Scan_Meta,
288  skip_night_hi_res);
289  if (returnStatus != MODIS_S_OK)
290  SMF_ERROR (returnStatus,"L1B_Setup() in main(void), L1B.c");
291 
292  /*
293  * Read/Process/Write EV data in scan sequence
294  */
295 
296  for (S = 0; S < L1A_Gran->num_scans; S++ )
297  {
298  if (S % 10 == 0) {
299  time(&tnow);
300  printf("scan: %d out of %d %s",
301  S, L1A_Gran->num_scans, asctime(localtime(&tnow)));
302  }
303 
304  /*
305  * Skip missing scans.
306  */
307 
308  if (L1A_Gran->missing_scan[S] == True) continue;
309 
310  /*
311  * Read one scan of EV data
312  */
313 
314  returnStatus = Read_L1A_EV_Scan(S, L1A_Gran, L1A_Scan);
315  if (returnStatus != MODIS_S_OK)
316  SMF_ERROR (returnStatus, "Read_L1A_EV_Scan() in main(void), L1B.c");
317 
318  /*
319  * Calibrate one scan of EV data with Emissive_Cal() & Reflective_Cal()
320  */
321  returnStatus = Emissive_Cal(S,
322  L1A_Gran->MirrorSide[S],
323  L1B_Gran,
324  L1A_Scan,
325  L1B_Scan,
326  &(PP->PP_Emiss),
327  &(tables->emiss),
328  &(tables->QA),
329  QA,
330  L1B_Scan_Meta);
331  if (returnStatus != MODIS_S_OK)
332  SMF_ERROR (returnStatus, "Emissive_Cal() in main(void), L1B.c");
333 
334 
335  /************************* Begin Band 26 Section **************************/
336 #ifdef WRITE_BAND_26_SDS
338 #endif /* WRITE_BAND_26_SDS */
339  /************************** End Band 26 Section ***************************/
340 
341  /*Only do Reflective_Cal() for Day Scans*/
342 
343  if (strcmp(L1A_Gran->ScanType[S], "Day") == SAME)
344  {
345  daymode_scan = True;
346  returnStatus = Reflective_Cal(S,
347  L1A_Gran,
348  L1B_Gran,
349  L1A_Scan,
350  L1B_Scan,
351  PP,
352  &(tables->refl),
353  &(tables->QA.common_QA_tables),
354  &(QA->QA_common));
355  if (returnStatus != MODIS_S_OK)
356  SMF_ERROR (returnStatus, "Reflective_Cal() in main(void), L1B.c");
357 
358  /*
359  * Aggregation (needed only for Day-mode and reflective bands)
360  */
361 
362  returnStatus = Aggregate_L1B (L1B_Scan);
363  if (returnStatus != MODIS_S_OK)
364  SMF_ERROR(returnStatus, "Aggregate_L1B() in main(void), L1B.c");
365 
366  /*
367  * If in day mode and the Band 5 to Band 26 crosstalk
368  * correction switch is set, perform the correction.
369  */
370 
371  if (do_B26_B5_corr == TRUE)
372  {
373  returnStatus = Band_26_Crosstalk_Correction (
374  L1B_Scan,
375  tables->refl.B26_B5_Frame_Offset,
376 #ifdef USE_B5_RAD_OFFSET
378 #endif /* USE_B5_RAD_OFFSET */
379  L1B_Gran->b26_fr_b5_scaled_corr,
380  &(QA->QA_common),
381  L1B_Gran->valid_pixels,
383  L1B_Gran->bad_data_flag,
384  daymode_scan,
385  do_B26_B5_corr);
386 
387  if (returnStatus != MODIS_S_OK)
388  SMF_ERROR(returnStatus,
389  "Band_26_Crosstalk_Correction() in main(void), L1B.c");
390  }
391 
392  }
393 
394  else
395 
396  {
397  daymode_scan = False;
399  }
400 
401 /************************* Begin Band 26 Section **************************/
402 #ifdef WRITE_BAND_26_SDS
403 
404  if (strcmp(L1A_Gran->ScanType[S], "Day") != SAME)
405  {
407  returnStatus = Reflective_Cal(S,
408  L1A_Gran,
409  L1B_Gran,
410  L1A_Scan,
411  L1B_Scan,
412  PP,
413  &(tables->refl),
414  &(tables->QA.common_QA_tables),
415  &(QA->QA_common));
416  if (returnStatus != MODIS_S_OK)
417  SMF_ERROR(returnStatus, "Reflective_Cal(), in main(void), L1B.c");
418  }
419  returnStatus = Copy_Band_26_Data(L1B_Scan);
420  if (returnStatus != MODIS_S_OK)
421  SMF_ERROR(returnStatus, "Copy_Band_26_Data(), in main(void), L1B.c");
422 
423 #endif /* WRITE_BAND_26_SDS */
424 /************************** End Band 26 Section ***************************/
425 
426  /*
427  * Fill the dead-detector SI values with an artificial value from
428  * the adjacent live detectors.
429  */
430 /* remain filled value
431  returnStatus = Fill_Dead_Detector_SI
432  (daymode_scan,
433  tables->QA.common_QA_tables.dead_detector,
434  L1B_Scan,
435  L1B_Gran,
436  &(QA->QA_common));
437  if (returnStatus != MODIS_S_OK)
438  SMF_ERROR (returnStatus,"Fill_Dead_Detector_SI() in main(void)");
439 */
440 
441  /*
442  * Write one scan of EV data
443  */
444 
445  returnStatus = Write_L1B_EV_Scan (S,
446  L1B_Gran,
447  L1B_Scan,
448  daymode_scan);
449  if (returnStatus != MODIS_S_OK)
450  SMF_ERROR (returnStatus,"Write_L1B_EV_Scan() in main(void), L1B.c");
451 
452  }
453 
454  /*
455  * Write scan metadata
456  */
457 
458  returnStatus = Write_L1B_ScanMeta (L1B_Scan_Meta,
459  L1A_Gran,
460  QA,
461  skip_night_hi_res);
462  if (returnStatus != MODIS_S_OK)
463  SMF_ERROR(returnStatus, "Write_L1B_ScanMeta() in main(void), L1B.c");
464 
465  /*
466  * Write granule metadata
467  */
468 
469  returnStatus = Gran_Meta_Cal(L1A_Gran,
470  L1B_Gran,
471  PP,
472  QA,
473  L1B_Scan_Meta,
474  L1B_Gran_Meta);
475  if (returnStatus != MODIS_S_OK)
476  SMF_ERROR (returnStatus,"Gran_Meta_Cal() in main(void), L1B.c");
477 
478  returnStatus = Write_Gran_Metadata(runtime_params,
479  L1B_Gran_Meta,
480  QA,
481  PP,
482  tables,
483  L1A_Gran,
484  skip_night_hi_res);
485  if (returnStatus != MODIS_S_OK)
486  SMF_ERROR (returnStatus,"L1B_Metadata() in main(void), L1B.c");
487 
488  /*
489  * Done with this granule
490  */
491  returnStatus = Close_L1A_Granule (L1A_Gran,
492  L1A_Scan);
493  if (returnStatus != MODIS_S_OK)
494  SMF_ERROR (returnStatus,"Close_L1A_Granule() in main(void), L1B.c");
495 
496  returnStatus = Close_L1B_Granule (L1B_Gran,
497  L1B_Scan,
498  skip_night_hi_res);
499  if (returnStatus != MODIS_S_OK)
500  SMF_ERROR (returnStatus,"Close_L1B_Granule() in main(void), L1B.c");
501 
502  return(0);
503 
504 }
505 
506 
#define MODIS_BAND5_INDEX
Definition: Granule.h:445
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 MODIS_S_OK
boolean missing_scan[MAX_NUM_SCANS]
Definition: Granule.h:769
integer, parameter int16
Definition: cubeio.f90:3
an array had not been initialized Several spelling and grammar corrections were which is read from the appropriate MCF the above metadata values were hard coded A problem calculating the average background DN for SWIR bands when the moon is in the space view port was corrected The new algorithm used to calculate the average background DN for all reflective bands when the moon is in the space view port is now the same as the algorithm employed by the thermal bands For non SWIR changes in the averages are typically less than Also for non SWIR the black body DNs remain a backup in case the SV DNs are not available For SWIR the changes in computed averages were larger because the old which used the black body suffered from contamination by the micron leak As a consequence of the if SV DNs are not available for the SWIR the EV pixels will not be the granule time is used to identify the appropriate tables within the set given for one LUT the first two or last two tables respectively will be used for the interpolation If there is only one LUT in the set of tables
Definition: HISTORY.txt:695
PGSt_SMF_status Write_Gran_Metadata(Run_Time_Parameters_t *runtime_params, L1B_Gran_Metadata_t *L1B_Gran_Meta, QA_Data_t *QA, Preprocess_Data_t *PP, lookup_tables_t *tables, L1A_granule_t *L1A_Gran, boolean skip_night_hi_res)
Definition: Metadata.c:75
int32 Reflective_Cal_Band_Flag
QA_Common_t QA_common
Definition: Granule.h:1097
L1B_ScaleOffset_t SO
Definition: Granule.h:865
uint32 valid_pixels[NUM_BANDS]
Definition: Granule.h:878
#define FALSE
Definition: rice.h:164
#define NULL
Definition: decode_rs.h:63
#define FIRST_L1A_GRANULE
Definition: FNames.h:79
int32 num_scans
Definition: Granule.h:749
#define TRUE
Definition: rice.h:165
Preprocess_Emiss_t PP_Emiss
Definition: Preprocess.h:176
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 REFLECTIVE_BAND_26_ONLY
PGSt_SMF_status Emissive_Cal(int16 S, int16 MS, L1B_granule_t *L1B_Gran, L1A_Scan_t *L1A_Scan, L1B_Scan_t *L1B_Scan, Preprocess_Emiss_t *PP_emiss, emiss_tables_t *emiss_tables, QA_tables_t *QA_tables, QA_Data_t *QA, L1B_Scan_Metadata_t *L1B_Scan_Meta)
Definition: Emissive_Cal.c:19
PGSt_SMF_status Determine_Other_Missing_Scans(lookup_tables_t *tables, L1A_granule_t *L1A_Gran)
Definition: L1B_Setup.c:5242
PGSt_SMF_status Aggregate_L1B(L1B_Scan_t *L1B_Scan)
Definition: Granule.c:78
float32 rad_offset_RefSB[NUM_REFLECTIVE_BANDS]
Definition: Granule.h:801
PGSt_SMF_status Band_26_Crosstalk_Correction(L1B_Scan_t *L1B_Scan, int16 *b5_frame_offset, float32 *b26_fr_b5_scaled_corr, QA_Common_t *QA_Common, uint32 *valid_pixels, uint32 *negative_value_below_noise_pixels, int16 *bad_data_flag, boolean isdaymode, boolean perform_B26_correction)
int setlinebuf(FILE *stream)
#define SAME
Definition: Granule.h:494
#define ALL_REFLECTIVE_BANDS
PGSt_SMF_status Gran_Meta_Cal(L1A_granule_t *L1A_Gran, L1B_granule_t *L1B_Gran, Preprocess_Data_t *PP, QA_Data_t *QA, L1B_Scan_Metadata_t *L1B_Scan_Meta, L1B_Gran_Metadata_t *L1B_Gran_Meta)
Definition: Metadata.c:1203
#define PGE02_VERSION
Definition: L1B_Tables.h:340
endif() set(LIBS $
Definition: CMakeLists.txt:6
void SMF_ERROR(PGSt_SMF_code code, char *messagestring)
Definition: Granule.c:1345
PGSt_SMF_status Copy_Band_26_Data(L1B_Scan_t *L1B_Scan)
char ScanType[MAX_NUM_SCANS][SCAN_TYPE_TEXT_SIZE]
Definition: Granule.h:752
PGSt_SMF_status L1B_Setup(lookup_tables_t *tables, L1A_granule_t *L1A_Gran, L1B_granule_t *L1B_Gran, L1A_Scan_t *L1A_Scan, L1B_Scan_t *L1B_Scan, QA_Data_t *QA, L1B_Scan_Metadata_t *L1B_Scan_Meta, boolean skip_night_hi_res)
Definition: L1B_Setup.c:218
PGSt_SMF_status Write_L1B_ScanMeta(L1B_Scan_Metadata_t *L1B_Scan_Meta, L1A_granule_t *L1A_Gran, QA_Data_t *QA, boolean skip_night_hi_res)
Definition: L1B_Setup.c:4810
#define True
Definition: Granule.h:537
float32 b26_fr_b5_scaled_corr[DETECTORS_PER_1KM_BAND]
Definition: Granule.h:867
PGSt_SMF_status Close_L1A_Granule(L1A_granule_t *L1A_Gran, L1A_Scan_t *L1A_Scan)
Definition: Granule.c:192
PGSt_SMF_status Read_L1A_EV_Scan(int16 S, L1A_granule_t *L1A_Gran, L1A_Scan_t *L1A_Scan)
Definition: Granule.c:671
int32 num_rsb_at_night_scans
Definition: Granule.h:1078
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 resolving bug report Corrected to filter out Aqua attitude records with missing status helping resolve bug MOD_PR03 will still correctly write scan and pixel data that does not depend upon the start time
Definition: HISTORY.txt:248
int16 bad_data_flag[NUM_BANDS]
Definition: Granule.h:885
PGSt_SMF_status Preprocess_L1A_Data(lookup_tables_t *tables, L1A_granule_t *L1A_Gran, L1B_granule_t *L1B_Gran, QA_Data_t *QA, Preprocess_Data_t *PP)
Definition: Preprocess.c:899
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
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
int main(void)
Definition: L1B.c:16
PGSt_SMF_status Read_Lookup_Tables(L1A_granule_t *L1A_Gran, lookup_tables_t *tables, Run_Time_Parameters_t *runtime_params)
Definition: L1B_Tables.c:31
PGSt_SMF_status Read_Run_Time_Parameters(Run_Time_Parameters_t *runtime_params)
Definition: Granule.c:2989
int16 MirrorSide[MAX_NUM_SCANS]
Definition: Granule.h:751
PGSt_SMF_status Reflective_Cal(int16 S, L1A_granule_t *L1A_Gran, L1B_granule_t *L1B_Gran, L1A_Scan_t *L1A_Scan, L1B_Scan_t *L1B_Scan, Preprocess_Data_t *PP, refl_tables_t *refl_tables, common_QA_tables_t *QA_tables, QA_Common_t *QA_Common)
uint32 negative_value_below_noise_pixels[NUM_BANDS]
Definition: Granule.h:884
#define False
Definition: Granule.h:538