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 14:38:34-05 xgeng
28  merge branch for V6.0.0
29 
30  Revision 1.13.2.2 2008/06/05 14:07:59 xgeng
31  Removed the call of Fill_Dead_Detector_SI to remain the filled value for pixels affected by dead detector and noisy subframe
32 
33  Revision 1.13 2005/01/18 19:34:44 ltan
34  MOD_PR02_TERRA update to V5.0.4
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
42  Removed Check on Terra satellite and "_Terra" in Band 5 to Band 26
43  crosstalk correction names because algorithm now applies to
44  Terra or Aqua. Removed passing L1A_Gran to Band_26_Crosstalk_Correction
45  because it is no longer necessary to check on which platform is being
46  processed in that routine.
47  Alice Isaacman SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
48 
49  Revision 02.17 March 19, 2002 Razor Issue #182
50  Code added only applicable to MODIS/TERRA (PFM) Processing:
51  Added call to Band_26_Crosstalk_Correction which corrects Band 26
52  values using aggregated Band 5 values and LUT correction factors.
53  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov), SAIC GSO
54 
55  Revision 02.16 March 11, 2002 Razor Issue #174
56  Added Passing of L1B_Gran to Preprocess.c to pass needed RVS correction
57  coefficients.
58  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov), SAIC GSO
59 
60  Revision 02.15 November 12, 2001 Razor Issue #169
61  Added boolean skip_night_hi_res to variable list and changed name
62  of boolean isdaymode to daymode_scan.
63  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov), SAIC GSO
64 
65  Revision 02.14 November 6, 2001
66  Changed call to Read_Lookup_Tables to include runtime parameters so that
67  a check can be made on MCST Version from the PCF file (Razor issue #167).
68  Alice Isaacman (Alice.R.Isaacman.1@gsfc.nasa.gov), SAIC GSO
69 
70  Revision 02.13 October 29, 2000
71  Razor issue 142, Add LUT to control scan checking QA for split scans
72  and scan quality array.
73  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
74 
75  Revision 02.12 September 21, 2000
76  Added counting num_rsb_at_night_scans as per Razor issue 137.
77  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
78 
79  ... (many changes not logged) ...
80 
81  Revision 02.11 Feb. 8, 1999
82  Moved call to function Write_L1B_ScanMeta to L1B (main).
83  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
84 
85  Revision 02.10 June 1998
86  Modified the Preprocess_L1A_Data() calls to include the refl_tables into
87  parameters
88  Zhenying Gu (zgu@ltpmail.gsfc.nasa.gov)
89 
90  Revision 02.10 Apr. 1998
91  Removed the Cleanup_Preprocess_Data(&PP), because PP is changed to static
92  allocation. Removed the Cleanup_Emiss_Tables(), because Planck Integration
93  is decided to carry on with in-line calculation. It may will be switched
94  back to using SIL tables, then we may need to add it back.
95  Shi-Yue Qiu (syqiu@ltpmail.gsfc.nasa.gov)
96 
97  Revision 02.10 Apr. 10, 1998
98  Removed the momos declaration (moved to the L1B_granule_t in Granule.h)
99  Removed the momos_t parmater from the L1B_Setup() and Reflective_Cal()
100  calls - they're now included in the L1B_Gran parameter.
101  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
102 
103  Revision 02.10 Apr. 1998
104  Replaced L1B_Metadata() with gran_meta_cal() for the time being. It will
105  be gran_meta_cal() and Write_Granule_Metadata() later.
106  Zhenying Gu (zgu@gscmail.gsfc.nasa.gov)
107 
108  Revision 02.10 Apr. 1998
109  Changed tables from dynamic to static allocation.
110  Changed Cleanup_Lookup_Tables() to Cleanup_Emiss_Tables()
111  Added the momos_t parameter to the L1B_Setup() and
112  Reflective_Cal() function calls.
113  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
114 
115  Revision 02.10 Mar. 1998
116  Add argument MirrorSide to the Emissive_Cal argument list
117  Replace PP by PP->PP_Emiss in Emissive_Cal
118  Replace PP by PP->PP_Refl in Reflective_Cal
119  Shi-Yue Qiu (syqiu@ltpmail.gsfc.nasa.gov)
120 
121  Revision 02.10 Mar. 1998
122  Changed order of calibration to emissive followed by reflective
123  (since reflective calibration needs band 28 radiances).
124  David Catozzi (cato@ltpmail.gsfc.nasa.gov)
125 
126  Revision 02.10 Jan. 1998
127  Introduced lookup_tables_t, which includes refl_tables_t, emiss_tables_t, and
128  the new QA_tables_t.
129  Zhidong Hao (hao@barebackride.gsfc.nasa.gov)
130 
131  Revision 02.00 Jan. 1997
132  Introduced refl_tables_t, emiss_tables_t, and Preprocess_Data_t,
133  restructured L1A_granule_t, L1A_Scan_t, L1B_granule_t, and L1B_scan_t,
134  Zhidong Hao (hao@barebackride.gsfc.nasa.gov)
135 
136  Revision 01.05 1995/12/07 14:15:00
137  Changed Therm_ prefix on lookup tables to Emiss_ prefix
138  Joan Baden(baden@highwire.gsfc.nasa.gov)
139 
140  Revision 01.04 1995/11/20 11:24:19
141  Changed call from Setup() to L1B_Setup()
142  John Hannon(hannon@highwire.gsfc.nasa.gov)
143 
144  Revision 01.03 1995/11/13 09:47:09
145  Changed Derived_Housekeeping_t to Derived_Engineering_Data_t and DH to DED
146  John Hannon(hannon@highwire.gsfc.nasa.gov)
147 
148  Revision 01.02 1995/10/20 11:17:25
149  Implement direct PGS toolkit calls and populate comments
150  Joan Baden(baden@highwire.gsfc.nasa.gov)
151  John Hannon(hannon@highwire.gsfc.nasa.gov)
152 
153  Revision 01.01 1995/05/17
154  Initial header development
155  Joan Baden (baden@highwire.gsfc.nasa.gov)
156 
157  Revision 01.00 1993
158  Initial development
159  Geir E. Kvaran(geir@highwire.gsfc.nasa.gov)
160 
161 !Team-unique Header:
162  This software is developed by the MODIS Characterization Support
163  Team (MCST)for the National Aeronautics and Space Administration,
164  Goddard Space Flight Center, under contract NAS5-32373.
165 
166 !References and Credits:
167  HDF portions developed at the National Center for Supercomputing
168  Applications at the University of Illinois at Urbana-Champaign.
169 
170 !Design Notes:
171 
172 !END********************************************************************
173 */
174 {
175  PGSt_SMF_status returnStatus = MODIS_S_OK;
176  Run_Time_Parameters_t *runtime_params;
178  QA_Data_t *QA; /*Contains all L1B QA items */
179  Preprocess_Data_t *PP; /*Contains OBC/Eng averages/statictcs*/
180  L1A_granule_t *L1A_Gran;
181  L1A_Scan_t *L1A_Scan;
182  L1B_granule_t *L1B_Gran;
183  L1B_Scan_t *L1B_Scan;
184  L1B_Scan_Metadata_t *L1B_Scan_Meta;
185  L1B_Gran_Metadata_t *L1B_Gran_Meta;
186 
187  char *location = "main";
188  time_t tnow;
189 
190  /*Scan index (0,L1A_Gran.num_scans)*/
191  int16 S = 0;
192 
193  /* Flag denoting whether a scan is "Day" */
194  boolean daymode_scan;
195 
196  /*
197  * Flag denoting whether to skip writing a 250m- or 500m-resolution
198  * granule containing only NIGHT mode scans
199  */
200  boolean skip_night_hi_res = FALSE;
201 
202  /*
203  * Flag to processing to signal whether or not to perform
204  * Band 26 correction from Band 5
205  */
206  boolean do_B26_B5_corr = FALSE;
207 
208  // Allocate structures
209  runtime_params = (Run_Time_Parameters_t*) calloc(1, sizeof(Run_Time_Parameters_t));
210  tables = (lookup_tables_t*) calloc(1, sizeof(lookup_tables_t));
211  QA = (QA_Data_t*) calloc(1, sizeof(QA_Data_t));
212  PP = (Preprocess_Data_t*) calloc(1, sizeof(Preprocess_Data_t));
213  L1A_Gran = (L1A_granule_t*) calloc(1, sizeof(L1A_granule_t));
214  L1A_Scan = (L1A_Scan_t*) calloc(1, sizeof(L1A_Scan_t));
215  L1B_Gran = (L1B_granule_t*) calloc(1, sizeof(L1B_granule_t));
216  L1B_Scan = (L1B_Scan_t*) calloc(1, sizeof(L1B_Scan_t));
217  L1B_Scan_Meta = (L1B_Scan_Metadata_t*) calloc(1, sizeof(L1B_Scan_Metadata_t));
218  L1B_Gran_Meta = (L1B_Gran_Metadata_t*) calloc(1, sizeof(L1B_Gran_Metadata_t));
219 
221  printf("MODIS Terra L1B version %s, built %s %s\n",
222  PGE02_VERSION, __DATE__, __TIME__);
223 
224  /*
225  * Read all run-time parameters from PCF.
226  */
227 
228  returnStatus = Read_Run_Time_Parameters(runtime_params);
229  if (returnStatus != MODIS_S_OK) {
230  L1BErrorMsg(location, returnStatus,
231  "Could not read run-time parameters from PCF",
232  "Read_Run_Time_Parameters", 0, NULL, True);
233  }
234 
235  /*
236  * Open and read L1A files
237  */
238 
239  returnStatus = Open_and_Read_L1A(runtime_params,
240  L1A_Gran, &skip_night_hi_res);
241  if (returnStatus != MODIS_S_OK) {
242  L1BErrorMsg(location, returnStatus,
243  "Could not open and read middle L1A granule",
244  "Open_and_Read_L1A", FIRST_L1A_GRANULE, NULL, True);
245  }
246 
247  /*
248  * Read all lookup tables
249  */
250 
251  returnStatus = Read_Lookup_Tables (L1A_Gran, tables, runtime_params);
252  if (returnStatus != MODIS_S_OK)
253  L1BErrorMsg(location, returnStatus, NULL, "Read_Lookup_Tables",
254  0, NULL, True);
255 
256  /* Determine whether Band 5 to Band 26 crosstalk correction wanted */
257  do_B26_B5_corr = tables->refl.B26_B5_Corr_Switch;
258 
259  /*
260  * Determine other scans to be treated as missing. This may adjust the
261  * "missing_scan" array in L1A_Gran. (Must be called before L1B_Setup).
262  */
263 
264  returnStatus = Determine_Other_Missing_Scans (tables, L1A_Gran);
265  if (returnStatus != MODIS_S_OK)
266  L1BErrorMsg(location, returnStatus, NULL, "Determine_Other_Missing_Scans",
267  0, NULL, True);
268 
269  /*
270  * Read/Process/Write OBC/Eng data, compute PP
271  */
272 
273  returnStatus = Preprocess_L1A_Data
274  (tables,
275  L1A_Gran,
276  L1B_Gran,
277  QA,
278  PP);
279 
280  if (returnStatus != MODIS_S_OK)
281  SMF_ERROR (returnStatus,"Preprocess_L1A_Data() in main(void), L1B.c");
282 
283  /*
284  * Prepare for L1B EV Calibration: Open L1A EV SDSs, Open L1B EV files,
285  * Create L1B EV SDSs, & read/process ScanMetaData,
286  * and calculate the MOMOs.
287  */
288 
289  returnStatus = L1B_Setup (tables,
290  L1A_Gran,
291  L1B_Gran,
292  L1A_Scan,
293  L1B_Scan,
294  QA,
295  L1B_Scan_Meta,
296  skip_night_hi_res);
297  if (returnStatus != MODIS_S_OK)
298  SMF_ERROR (returnStatus,"L1B_Setup() in main(void), L1B.c");
299 
300  /*
301  * Read/Process/Write EV data in scan sequence
302  */
303 
304  for (S = 0; S < L1A_Gran->num_scans; S++ )
305  {
306  if (S % 10 == 0) {
307  time(&tnow);
308  printf("scan: %d out of %d %s",
309  S, L1A_Gran->num_scans, asctime(localtime(&tnow)));
310  }
311 
312  /*
313  * Skip missing scans.
314  */
315 
316  if (L1A_Gran->missing_scan[S] == True) continue;
317 
318  /*
319  * Read one scan of EV data
320  */
321 
322  returnStatus = Read_L1A_EV_Scan(S, L1A_Gran, L1A_Scan);
323  if (returnStatus != MODIS_S_OK)
324  SMF_ERROR (returnStatus, "Read_L1A_EV_Scan() in main(void), L1B.c");
325 
326  /*
327  * Calibrate one scan of EV data with Emissive_Cal() & Reflective_Cal()
328  */
329  returnStatus = Emissive_Cal(S,
330  L1A_Gran->MirrorSide[S],
331  L1B_Gran,
332  L1A_Scan,
333  L1B_Scan,
334  &(PP->PP_Emiss),
335  &(tables->emiss),
336  &(tables->QA),
337  QA,
338  L1B_Scan_Meta);
339  if (returnStatus != MODIS_S_OK)
340  SMF_ERROR (returnStatus, "Emissive_Cal() in main(void), L1B.c");
341 
342 
343  /************************* Begin Band 26 Section **************************/
344 #ifdef WRITE_BAND_26_SDS
346 #endif /* WRITE_BAND_26_SDS */
347  /************************** End Band 26 Section ***************************/
348 
349  /*Only do Reflective_Cal() for Day Scans*/
350 
351  if (strcmp(L1A_Gran->ScanType[S], "Day") == SAME)
352  {
353  daymode_scan = True;
354  returnStatus = Reflective_Cal(S,
355  L1A_Gran,
356  L1B_Gran,
357  L1A_Scan,
358  L1B_Scan,
359  PP,
360  &(tables->refl),
361  &(tables->QA.common_QA_tables),
362  &(QA->QA_common));
363  if (returnStatus != MODIS_S_OK)
364  SMF_ERROR (returnStatus, "Reflective_Cal() in main(void), L1B.c");
365 
366  /*
367  * Aggregation (needed only for Day-mode and reflective bands)
368  */
369 
370  returnStatus = Aggregate_L1B (L1B_Scan);
371  if (returnStatus != MODIS_S_OK)
372  SMF_ERROR(returnStatus, "Aggregate_L1B() in main(void), L1B.c");
373 
374  /*
375  * If in day mode and the Band 5 to Band 26 crosstalk
376  * correction switch is set, perform the correction.
377  */
378 
379  if (do_B26_B5_corr == TRUE)
380  {
381  returnStatus = Band_26_Crosstalk_Correction (
382  L1B_Scan,
383  tables->refl.B26_B5_Frame_Offset,
384 #ifdef USE_B5_RAD_OFFSET
386 #endif /* USE_B5_RAD_OFFSET */
387  L1B_Gran->b26_fr_b5_scaled_corr,
388  &(QA->QA_common),
389  L1B_Gran->valid_pixels,
391  L1B_Gran->bad_data_flag,
392  daymode_scan,
393  do_B26_B5_corr);
394 
395  if (returnStatus != MODIS_S_OK)
396  SMF_ERROR(returnStatus,
397  "Band_26_Crosstalk_Correction() in main(void), L1B.c");
398  }
399 
400  }
401 
402  else
403 
404  {
405  daymode_scan = False;
407  }
408 
409 /************************* Begin Band 26 Section **************************/
410 #ifdef WRITE_BAND_26_SDS
411 
412  if (strcmp(L1A_Gran->ScanType[S], "Day") != SAME)
413  {
415  returnStatus = Reflective_Cal(S,
416  L1A_Gran,
417  L1B_Gran,
418  L1A_Scan,
419  L1B_Scan,
420  PP,
421  &(tables->refl),
422  &(tables->QA.common_QA_tables),
423  &(QA->QA_common));
424  if (returnStatus != MODIS_S_OK)
425  SMF_ERROR(returnStatus, "Reflective_Cal(), in main(void), L1B.c");
426  }
427  returnStatus = Copy_Band_26_Data(L1B_Scan);
428  if (returnStatus != MODIS_S_OK)
429  SMF_ERROR(returnStatus, "Copy_Band_26_Data(), in main(void), L1B.c");
430 
431 #endif /* WRITE_BAND_26_SDS */
432 /************************** End Band 26 Section ***************************/
433 
434  /*
435  * Fill the dead-detector SI values with an artificial value from
436  * the adjacent live detectors.
437  */
438 /* remain filled value
439  returnStatus = Fill_Dead_Detector_SI
440  (daymode_scan,
441  tables->QA.common_QA_tables.dead_detector,
442  L1B_Scan,
443  L1B_Gran,
444  &(QA->QA_common));
445  if (returnStatus != MODIS_S_OK)
446  SMF_ERROR (returnStatus,"Fill_Dead_Detector_SI() in main(void)");
447 */
448 
449  /*
450  * Write one scan of EV data
451  */
452 
453  returnStatus = Write_L1B_EV_Scan (S,
454  L1B_Gran,
455  L1B_Scan,
456  daymode_scan);
457  if (returnStatus != MODIS_S_OK)
458  SMF_ERROR (returnStatus,"Write_L1B_EV_Scan() in main(void), L1B.c");
459 
460  }
461 
462  /*
463  * Write scan metadata
464  */
465 
466  returnStatus = Write_L1B_ScanMeta (L1B_Scan_Meta,
467  L1A_Gran,
468  QA,
469  skip_night_hi_res);
470  if (returnStatus != MODIS_S_OK)
471  SMF_ERROR(returnStatus, "Write_L1B_ScanMeta() in main(void), L1B.c");
472 
473  /*
474  * Write granule metadata
475  */
476 
477  returnStatus = Gran_Meta_Cal(L1A_Gran,
478  L1B_Gran,
479  PP,
480  QA,
481  L1B_Scan_Meta,
482  L1B_Gran_Meta);
483  if (returnStatus != MODIS_S_OK)
484  SMF_ERROR (returnStatus,"Gran_Meta_Cal() in main(void), L1B.c");
485 
486  returnStatus = Write_Gran_Metadata(runtime_params,
487  L1B_Gran_Meta,
488  QA,
489  PP,
490  tables,
491  L1A_Gran,
492  skip_night_hi_res);
493  if (returnStatus != MODIS_S_OK)
494  SMF_ERROR (returnStatus,"L1B_Metadata() in main(void), L1B.c");
495 
496  /*
497  * Done with this granule
498  */
499  returnStatus = Close_L1A_Granule (L1A_Gran,
500  L1A_Scan);
501  if (returnStatus != MODIS_S_OK)
502  SMF_ERROR (returnStatus,"Close_L1A_Granule() in main(void), L1B.c");
503 
504  returnStatus = Close_L1B_Granule (L1B_Gran,
505  L1B_Scan,
506  skip_night_hi_res);
507  if (returnStatus != MODIS_S_OK)
508  SMF_ERROR (returnStatus,"Close_L1B_Granule() in main(void), L1B.c");
509 
510  return(0);
511 
512 }
513 
514 
#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