OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Emissive_Cal.c
Go to the documentation of this file.
1 #include "Preprocess.h"
2 #include "Emissive_Cal.h"
3 #include "HDF_Lib.h"
4 #include "PGS_Error_Codes.h"
5 #include "FNames.h"
6 #include <math.h>
7 
8 #define FLOAT_TO_PIXEL(L, L_max, L_min, scale, offset, Scale_Integer) \
9 if ((L) <= (L_min)) Scale_Integer = DN_MIN; \
10 else if ((L) >= (L_max)) Scale_Integer = DN15_SAT; \
11 else Scale_Integer = (uint16)( ( (L)/(scale) + (offset) ) + 0.5 );
12 
13 /*
14  Revision 05/10/06
15  Skip "Bad_L1A_Error_Out" errors rather than exiting.
16  J. Gales
17 */
18 
19 PGSt_SMF_status Emissive_Cal (int16 S,
20  int16 MS,
21  L1B_granule_t *L1B_Gran,
22  L1A_Scan_t *L1A_Scan,
23  L1B_Scan_t *L1B_Scan,
24  Preprocess_Emiss_t *PP_emiss,
25  emiss_tables_t *emiss_tables,
26  QA_tables_t *QA_tables,
27  QA_Data_t *QA,
28  L1B_Scan_Metadata_t *L1B_Scan_Meta)
29 /*
30 !C**********************************************************************
31 !Description:
32  This routine accomplishes the calibration of one scan of EV pixels for
33  Emissive bands. Corrections to the digital numbers are applied for
34  electronic background, for the angular dependence of the response of the
35  scan mirror, for non-linearities in the Analog to Digital Converters.
36  Correction may also be applied for cross-talk for PC bands (the leak from
37  band 31 to band 32, 33, 34, 35, 36) depending on the switch value in the
38  lookup table. The radiance is computed after the corrections. If the
39  radiance can be computed and is in a valid range, it is converted
40  to a scaled integer in the range of [0-32767]. If a valid value cannot be
41  computed, the scaled integer is set to a value in the range of [32768-65535].
42  Specific values in the range of [32768-65535] are used to denote why a valid
43  value could not be obtained (a list of these is in the L1B file
44  specifications). This routine also computes the uncertainty in the
45  radiance product for every pixel, and converts the uncertainty to a
46  4-bit uncertainty index, stored in the 4 least significant bits of an 8-bit
47  unsigned integer.
48 
49 !Input Parameters:
50  int16 S Current scan index
51  int16 MS The corresponding mirror side
52  L1B_granule_t *L1B_Gran contains scale and offset factors
53  L1A_Scan_t *L1A_Scan contains earth view DN values
54  Preprocess_Emiss_t *PP_emiss contains ADC index, calibration coefficients a0,
55  b1, a2 preprocessed data, radiance at scan mirror
56  temperature, NEdL and electronic background DNs
57  emiss_tables_t *emiss_tables contains emissive lookup tables values used in
58  emissive calibration
59  QA_tables_t *QA_tables contains the dead detector look up table value and
60  NEdL look up table value
61  QA_Data_t *QA contains values to determine if the instrument is
62  in a sector rotation and if the moon is in SV KOB.
63 !Output Parameters:
64  L1B_Scan_t *L1B_Scan contains scaled integers and uncertainty indices
65  L1B_Scan_Metadata_t *L1B_Scan_Meta contains the bit QA value for negative radiance
66  beyond noise level.
67 !Revision History:
68  $Log: Emissive_Cal.c,v $
69  Revision 1.16 2017-03-01 14:40:43-05 xgeng
70  Added uncertainty penalty to PV LWIR bands
71 
72  Revision 1.15 2016-07-22 13:23:30-04 xgeng
73  Applied xtalk correction to Terra LWIR PV bands (27-30)
74 
75  Revision 1.14 2011-04-29 11:55:04-04 ltan
76  Typo error correction.
77 
78  Revision 1.13 2011-04-07 14:42:58-04 xgeng
79  TEB uncertainty algorithm update
80 
81  Revision 1.12 2010-11-15 10:38:09-05 xgeng
82  No calibration is performed if both sides of PCLW electronics are on at the same time.
83 
84  Revision 1.11 2005/01/18 19:34:42 ltan
85  MOD_PR02_TERRA update to V5.0.4
86 
87 
88  Revision 02.26, March 26, 2003 Razor Issue #191
89  Change hard-coded band (28) whose EV data are saved for SWIR OOB correction to be
90  determined by a LUT instead.
91  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
92 
93  Revision 02.25, April 25, 2002 Razor Issue #180
94  Moved checks on Dead detector, sector rotation, negative SV/BB average, and
95  negative b1 outside of Frame loop.
96  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
97 
98  Revision 02.24, March 25, 2001 Razor Issue #178
99  Removed ADC Correction
100  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
101 
102  Revision 02.23, February 2002 Razor Issue #180
103  Inserted check on B1 to be sure it is not negative
104  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
105 
106  Revision 02.22, November 9, 2001 Razor Issue #168
107  Cleanup of spelling/grammar; changed TOLLERANCE to TOLERANCE
108  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
109 
110  Revision 02.21, January 16, 2001
111  Eliminated the "pow" functions in calculations of uncertainty.
112  Also made other efficiency improvements and made variables a little
113  more like the algorithm document.
114  Changed frame index (F) to frame number in uncertainty calculation
115  (minor bug in previous version)
116  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
117 
118  Revision 02.20 August 26, 1999
119  Added checking if the EV data read from L1A are valid.
120  Zhenying Gu (zgu@mcst.gsfc.nasa.gov)
121  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
122 
123  Revision 02.19 August 1999
124  Removed interpolation correction.
125  Zhenying Gu (zgu@mcst.gsfc.nasa.gov)
126  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
127 
128  Revision 02.18 August 1999
129  Implemented changes to meet the requirement of new ADC algorithms. See SDF.
130  Zhenying Gu (zgu@mcst.gsfc.nasa.gov)
131  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
132 
133  Revision 02.17 Aug 10, 1999
134  Used L_Max and L_Min LUTs
135  Zhenying Gu (zgu@mcst.gsfc.nasa.gov)
136 
137  Revision 02.16 May 23, 1999
138  Many changes leading up to the May 30 delivery. See SDF.
139  Jim Rogers (rogers@mcst.gsfc.nasa.gov) and Zhenying Gu (zgu@mcst.gsfc.nasa.gov)
140 
141  Revision 02.15 April 12, 1999
142  Removed cubic term a3
143  Zhenying Gu(zgu@mcst.gsfc.nasa.gov)
144 
145  Revision 02.12 Feb 9, 1999
146  Added use of variables ADC_correction_switch, PCX_correction_switch and
147  INT_correction_switch set to macro values to remove compiler warnings.
148  Macros in upper case.
149  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
150 
151  Revision 02.11 July 1998
152  modified EV, SI, UI to match L1B_Scan_t data structure change.
153  Zhenying Gu (zgu@ltpmail.gsfc.nasa.gov)
154 
155  Revision 02.10 Mar. 1998
156  Removed D_inv, which has already been taken care of in L1A
157  Removed all the V vs L algorithm implementation.
158  Added the DN vs. L algorithm implementation
159  Shi-Yue Qiu (syqiu@ltpmail.gsfc.nasa.gov)
160 
161  Revision 02.00 Jan. 1997
162  Plugged in lookup tables and added Preprocess_data_t *PP as an input parameter;
163  eliminated DED as an input parameter;
164  expanded processing scope from one band to one scan.
165  Zhidong Hao (hao@barebackride.gsfc.nasa.gov)
166 
167  Revision 01.01 1996/04/05
168  Update to match Version 1 Design Document
169  Joan Baden(baden@highwire.gsfc.nasa.gov)
170  John Hannon(hannon@highwire.gsfc.nasa.gov)
171  Neal Devine(neal.devine@gsfc.nasa.gov) -- debugging 1996/5/9-13
172 
173  Revision 01.00 1993
174  Initial development
175  Geir Kvaran(geir@highwire.gsfc.nasa.gov)
176 
177 !Team-unique Header:
178  This software is developed by the MODIS Characterization Support
179  Team (MCST)for the National Aeronautics and Space Administration,
180  Goddard Space Flight Center, under contract NAS5-32373.
181 
182 !References and Credits:
183  HDF portions developed at the National Center for Supercomputing
184  Applications at the University of Illinois at Urbana-Champaign.
185 
186 !Design Notes:
187 
188 !END********************************************************************
189 */
190 {
191  int16 D = 0; /* detector index within band (0,9) */
192  int16 D_emiss = 0; /* Emiss detector index (0,159) */
193  int16 D_490 = 0; /* modis detector index (0,489) */
194  int16 B = 0; /* band index within L1A resolution (1km_Emiss res only here) */
195  int16 B_emiss = 0; /* Emiss band index (0,15) */
196  int16 B_38 = 0; /* MODIS band index (0,37) */
197  int16 F = 0; /* frame index (0 -> 1353) */
198  int16 flag = 0; /* for L < -NEdL */
199  int16 F_shift = 0; /* frame index in PCX */
200  float32 L_ev = 0; /* EV radiance */
201  int16 DN_ev = 0; /* must use signed integer (since MISSING FLAG is -1)*/
202  float32 dn_ev = 0; /* corrected Earth view DN */
203  float32 Fn = 0;
204  float32 dL_ev = 0;
205 
206  /* for XT correction */
207  float32 dn_ev_31[10][EV_1km_FRAMES]; /* for PCX correction */
208  float32 dn_ev_pvlw_xt_bands[NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND][EV_1km_FRAMES];
209  float32 dn_XT_corr = 0; /* talk correction. Must be initialized to 0. */
210  float32 dn_PVXT_sending = 0; /* used to calculate the averaged dn_ev */
211  int16 B_xt = 0; /* band index for xt receiving band */
212  int16 B_xt_sending, det_tmp; /* temporary variables */
213 
214  /*
215  * obsolete due to TEB UI algorithm update, 3/22/2011, Xu Geng
216  */
217  /*float32 Sigma_TEB_PV_resid_elec_sq; */ /* holds residual electronic crosstalk
218  contribution to sigma^2 */
219  /*float32 Sigma_TEB_ADC_sq; */ /* holds RSB ADC contribution to sigma^2 */
220  /*float32 Calibr_resid; */ /* holds calibration polynomial fit
221  residual */
222  /*float32 *calibr_resid_coeffs; */ /* temporary pointer to table for one
223  detector */
224  /*float32 *si0, *si1; */ /* temporary pointer to Ucoeff tables */
225  /*float32 ri0, ri1; */ /* summation variables for uncert coeff */
226 
227  float32 dtemp; /* temporary variable */
228 
229  uint16 bad_SI = 0; /* flag value for SI */
230  boolean bad_value = False;
231 
232  int8 PCX_correction_switch;
233  int16 uncert;
234 
235  int16 SV_frame_no = 0; /* Frame number to use for SV RVS Correction */
236 
237  /*
238  * If the mirror side value is not 0 or 1, it is not a valid value.
239  * It is most likely this scan is a missing scan and the following
240  * calculation should not be proceeded.
241  */
242 
243  if (MS != 0 && MS != 1)
244  SMF_ERROR(MODIS_F_NOK, "Invalid mirror side value in Emissive_Cal()");
245 
246  /*
247  * The Band chosen for the SWIR OOB correction may be any emissive band.
248  * Let "X" denote that band number in the following discussion. The values
249  * of dn for band "X" are saved for use in "SWIR_out_of_band_correction".
250  * It is assumed in that function that a negative value of dn_"X" is not
251  * valid for making the SWIR OOB correction. Thus, initialize the dn_"X"
252  * to a negative value before the loop through individual pixels. dn_"X"
253  * will only be re-assigned if a value of dn is actually calculated.
254  */
255 
256  for (D = 0; D < DETECTORS_PER_1KM_BAND; D++)
257  for (F = 0; F < EV_1km_FRAMES; F++)
258  L1B_Scan->dn_X[D][F] = -1.;
259 
260  /* save the dn_ev for PVLW xtalk correction */
261  for (B = 0; B < NUM_PVLW_XT_BANDS; B++)
262  {
263  B_emiss = PVLW_XT_BANDS[B];
265  D_emiss = B_emiss*DETECTORS_PER_1KM_BAND;
266  if ( B_emiss > BAND26) D_emiss -= 10; /*remove band 26*/
267 
268  for (D = 0; D < DETECTORS_PER_1KM_BAND; D++, D_emiss++, D_490++)
269  {
270 
271  /* Initialize the sending signal */
272  bad_value = False;
273 
274  /* Check if the zero point DN value is valid */
275  if ( PP_emiss->DN_sv[D_emiss][S] < 0) bad_value = True;
276 
277  /* Check to see that the b1 value is not negative. */
278  if (PP_emiss->b1[D_emiss][S] < 0) bad_value = True;
279 
280  for (F = 0; F < EV_1km_FRAMES; F++)
281  {
282  dn_ev_pvlw_xt_bands[B][D][F] = 0;
283  }
284 
285  if (bad_value) continue;
286 
287  for (F = 0; F < EV_1km_FRAMES; F++)
288  {
289  DN_ev = L1A_Scan->EV_1km_night[D][B_emiss][F];
290  if (DN_ev > MISSING_L1A_FLAG && DN_ev < SATURATED_DN)
291  { /*only if the data is valid*/
292  dn_ev = DN_ev - PP_emiss->DN_sv[D_emiss][S];
293  dn_ev_pvlw_xt_bands[B][D][F] = dn_ev;
294  }
295  }
296  }
297  }
298 
299  /*Initialize extended indices, to be incremented within loops*/
300  /*Note: band_26 is included in L1A_BANDS_AT_RES[INDEX_1000M_EMISS]*/
301  B_38 = NUM_BANDS - NUM_EMISSIVE_BANDS - 1;
302  B_emiss = 0;
303  D_emiss = 0;
304  D_490 = NUM_REFLECTIVE_DETECTORS - 10;
305  SV_frame_no = emiss_tables->RVS_BB_SV_Frame_No[1];
306 
307  PCX_correction_switch = emiss_tables->PCX_correction_switch;
308 
309  for (B = 0; B < L1A_BANDS_AT_RES[INDEX_1000M_EMISS]; B++, B_38++)
310  {
311  /*Skip band_26*/
312  if (B == MODIS_BAND26_INDEX_AT_RES)
313  {
314  D_490 += 10; /* one band contains 10 detectors */
315  continue;
316  }
317  /* Initialize the dn_ev_31 */
318  if ( PCX_correction_switch == ON && B == BAND31)
319  {
320  for (D = 0; D < DETECT_PER_BAND_AT_RES[INDEX_1000M_EMISS]; D++)
321  for (F = 0; F < EV_1km_FRAMES; F++)
322  dn_ev_31[D][F] = 0;
323  }
324 
325  for (D = 0; D < DETECT_PER_BAND_AT_RES[INDEX_1000M_EMISS];
326  D++, D_emiss++, D_490++)
327  {
328  /*
329  * obsolete due to TEB UI algorithm update, 3/22/2011, Xu Geng
330  */
331  /*
332  Sigma_TEB_PV_resid_elec_sq =
333  emiss_tables->Sigma_TEB_PV_resid_elec[D_emiss] *
334  emiss_tables->Sigma_TEB_PV_resid_elec[D_emiss];
335 
336  Sigma_TEB_ADC_sq = emiss_tables->Sigma_TEB_ADC[D_emiss] *
337  emiss_tables->Sigma_TEB_ADC[D_emiss];
338  */
339 
340  /* Initialize the logical "bad value" signal: */
341  bad_value = False;
342 
343  /* Check if the detector is dead */
344 
345  if (QA_tables->common_QA_tables.dead_detector[D_490] == 1)
346  {
347  bad_SI = DEAD_DETECTOR_SI;
348  L1B_Gran->valid_pixels[B_38] -= EV_1km_FRAMES;
349  L1B_Gran->dead_detector_pixels[B_38] += EV_1km_FRAMES;
351  bad_value = True;
352  }
353 
354  /* Check if the instrument is in a sector rotation */
355 
356  else if (QA->QA_common.Sector_Rotation[S] == True)
357  {
358  bad_SI = SECTOR_ROTATION_SI;
359  L1B_Gran->valid_pixels[B_38] -= EV_1km_FRAMES;
360  L1B_Gran->bad_data_flag[B_38] = 1;
362  bad_value = True;
363  }
364 
365  /* Check if the instrument has both sides of PCLW electronics on at the same time */
366 
367  else if (QA->QA_common.Electronic_Anomaly[S] == True)
368  {
369  bad_SI = UNABLE_CALIBRATE_SI;
370  L1B_Gran->valid_pixels[B_38] -= EV_1km_FRAMES;
371  L1B_Gran->bad_data_flag[B_38] = 1;
372  bad_value = True;
373  }
374 
375  /* Check if the zero point DN value is valid */
376 
377  else if ( PP_emiss->DN_sv[D_emiss][S] < 0)
378  {
379  bad_SI = ZERO_POINT_DN_SI;
380  L1B_Gran->valid_pixels[B_38] -= EV_1km_FRAMES;
381  L1B_Gran->bad_data_flag[B_38] = 1;
383  bad_value = True;
384  }
385 
386  /* Check to see that the b1 value is not negative. */
387 
388  else if (PP_emiss->b1[D_emiss][S] < 0)
389  {
390  bad_SI = TEB_B1_NOT_CALCULATED;
391  L1B_Gran->valid_pixels[B_38] -= EV_1km_FRAMES;
392  L1B_Gran->bad_data_flag[B_38] = 1;
394  bad_value = True;
395  }
396 
397  if (bad_value)
398  {
399  for (F = 0; F < EV_1km_FRAMES; F++)
400  {
401  L1B_Scan->SI.EV_1km_Emissive[B_emiss][D][F] = (uint16) bad_SI;
402  L1B_Scan->UI.EV_1km_Emissive_UI[B_emiss][D][F] = BAD_DATA_UI;
403  }
404  continue;
405  }
406 
407  for (F = 0; F < EV_1km_FRAMES; F++)
408  {
409 
410  DN_ev = L1A_Scan->EV_1km_night[D][B][F];
411 
412  if (DN_ev < MISSING_L1A_FLAG || DN_ev > SATURATED_DN) {
413  continue;
414  /*
415  Bad_L1A_Error_Out("EV_1km_night",
416  " out of range in middle L1A file, Emissive_Cal(), Emissive_Cal.c");
417  */
418  }
419 
420  /* Skip missing data */
421 
422  if (DN_ev == MISSING_L1A_FLAG)
423  {
424  L1B_Scan->SI.EV_1km_Emissive[B_emiss][D][F] = L1A_DN_MISSING_SI;
425  L1B_Scan->UI.EV_1km_Emissive_UI[B_emiss][D][F] = BAD_DATA_UI;
426  L1B_Gran->missing_pixels[B_38]++;
427  L1B_Gran->valid_pixels[B_38]--;
428  L1B_Gran->bad_data_flag[B_38] = 1;
430  continue;
431  }
432 
433  /* Check if the EV DN read from L1A file is saturated */
434 
435  if (DN_ev == SATURATED_DN)
436  {
437  L1B_Scan->SI.EV_1km_Emissive[B_emiss][D][F] = SATURATED_DETECTOR_SI;
438  L1B_Scan->UI.EV_1km_Emissive_UI[B_emiss][D][F] = BAD_DATA_UI;
439  L1B_Gran->saturated_pixels[B_38]++;
440  L1B_Gran->valid_pixels[B_38]--;
441  L1B_Gran->bad_data_flag[B_38] = 1;
442  QA->QA_common.num_saturated_EV_data[D_490]++;
443  continue;
444  }
445 
446  dn_ev = DN_ev - PP_emiss->DN_sv[D_emiss][S];
447 
448  /*
449  * Save the value of dn for band X (any TEB band) to use for SWIR OOB
450  * correction
451  */
452 
453  if (B == L1B_Scan->band_X)
454  L1B_Scan->dn_X[D][F] = dn_ev;
455 
456  dn_XT_corr = 0;
457  /* check PCX Switch */
458  if ( PCX_correction_switch == ON )
459  {
460  if ( B == BAND31 ) dn_ev_31[D][F] = dn_ev; /* save sending dn */
461  else if( B >= BAND32 && B <= BAND36 )
462  { /* pc xtalk correction */
463  B_xt = B - BAND32;
464  F_shift = F + emiss_tables->PC_XT[B_xt][D][1];
465  if ( F_shift >= 0 && F_shift < EV_1km_FRAMES &&
466  dn_ev_31[D][F_shift] > 0 )
467  {
468  dn_XT_corr = -emiss_tables->PC_XT[B_xt][D][0]*0.01
469  *dn_ev_31[D][F_shift]
470  *emiss_tables->PC_XT[B_xt][D][2] +
471  emiss_tables->PC_XT[B_xt][D][3];
472  dn_ev += dn_XT_corr;
473  }
474  }
475  }
476 
477  /* check if it is a PVLW band [27,28,29, or 30] */
478  B_xt = 0;
479  while ( B != PVLW_XT_BANDS[B_xt] ){
480  B_xt++;
481  if ( B_xt >= NUM_PVLW_XT_BANDS ) break;
482  }
483  if (B_xt < NUM_PVLW_XT_BANDS )
484  {
485  /* need to apply the PVLW cross talk correction */
486  dn_XT_corr = 0;
487  for (B_xt_sending = 0; B_xt_sending < NUM_PVLW_XT_BANDS; B_xt_sending++) /* each sending band */
488  {
489  F_shift = F + (PVLW_XT_BANDS_FRAME_REL_POS[B_xt]
490  - PVLW_XT_BANDS_FRAME_REL_POS[B_xt_sending]);
491  if ( F_shift >= 0 && F_shift < EV_1km_FRAMES )
492  {
493  for (det_tmp = 0; det_tmp < DETECTORS_PER_1KM_BAND; det_tmp++) /* each sending detector */
494  {
495  dn_PVXT_sending = dn_ev_pvlw_xt_bands[B_xt_sending][det_tmp][F_shift];
496  dn_XT_corr += emiss_tables->PVLW_XT_coeff[B_xt][D][B_xt_sending][det_tmp][0]
497  +emiss_tables->PVLW_XT_coeff[B_xt][D][B_xt_sending][det_tmp][1]*dn_PVXT_sending
498  +emiss_tables->PVLW_XT_coeff[B_xt][D][B_xt_sending][det_tmp][2]
499  *dn_PVXT_sending*dn_PVXT_sending;
500  }
501  }
502  }
503  dn_ev -= dn_XT_corr;
504  }
505 
506  /* Compute L_ev */
507  Fn = PP_emiss->a0[D_emiss][S] +
508  PP_emiss->b1[D_emiss][S] * dn_ev +
509  PP_emiss->a2[D_emiss][S] * dn_ev * dn_ev ;
510 
511  L_ev = (Fn -
512  (L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_SV[D_emiss][MS] -
513  L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS])
514  * PP_emiss->Planck_mir[D_emiss][S] ) /
515  L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS];
516 
517  /* Check if the calculated radiance L exceeds the LUT L_Max.
518  * If so, then set the unusable data value for SI and UI and
519  * keep track of the number of instances of these pixels.
520  */
521 
522  if (L_ev > emiss_tables->L_Max[B_emiss])
523  {
524  L1B_Scan->SI.EV_1km_Emissive[B_emiss][D][F] = TEB_OR_RSB_GT_MAX_SI;
525  L1B_Scan->UI.EV_1km_Emissive_UI[B_emiss][D][F] = BAD_DATA_UI;
526  L1B_Gran->valid_pixels[B_38]--;
527  L1B_Gran->bad_data_flag[B_38] = 1;
529  continue;
530  }
531 
532  /* determine if the radiance is negative and below noise level */
533  if (L_ev < -QA_tables->emiss_QA_tables.NEdL[D_emiss])
534  {
535  flag = 1;
536  L1B_Gran->negative_value_below_noise_pixels[B_38]++;
537  L1B_Gran->valid_pixels[B_38]--;
538  L1B_Gran->bad_data_flag[B_38] = 1;
539  }
540 
541  /* Convert the product to scaled integer and store in the L1B scan */
542 
543  FLOAT_TO_PIXEL(L_ev,
544  emiss_tables->L_Max[B_emiss],
545  emiss_tables->L_Min[B_emiss],
546  L1B_Gran->SO.rad_scale_Emiss[B_emiss],
547  L1B_Gran->SO.rad_offset_Emiss[B_emiss],
548  L1B_Scan->SI.EV_1km_Emissive[B_emiss][D][F]);
549 
550  /*
551  * Check if NAD door is closed. If it is closed, set the most significant
552  * bit to 1. If SI is larger than the upper limit for the NAD closed SI
553  * value, set it to that value.
554  */
555 
556  if (QA->QA_common.NAD_Door_Open[S] == False)
557  {
558  L1B_Scan->SI.EV_1km_Emissive[B_emiss][D][F] |= 0x8000;
560 
561  if (L1B_Scan->SI.EV_1km_Emissive[B_emiss][D][F] > NAD_CLOSED_UPPER_SI)
562  L1B_Scan->SI.EV_1km_Emissive[B_emiss][D][F] = NAD_CLOSED_UPPER_SI;
563  }
564 
565  /*
566  * Set the uncertainty index.
567  */
568 
569  if (L_ev <= TOLERANCE || QA->QA_common.NAD_Door_Open[S] == False
570  || dn_ev <= TOLERANCE || PP_emiss->dn_bb[D_emiss][S] <= TOLERANCE )
571  {
572  L1B_Scan->UI.EV_1km_Emissive_UI[B_emiss][D][F] = BAD_DATA_UI;
573  }
574  else
575  {
576 
577  /*
578  * Compute uncertainty based on equation (3) in memo:
579  * "PFM TEB Radiometric Uncertainty and LUT Format - Update 2",
580  * Kwo-Fu (Vincent) Chiang, G. Godden and X. (Jack) Xiong,
581  * December 6, 1999.
582  *********************************************************
583  * The above algorithm is obsolete due to the recent update.
584  * Please refer to the new algorithm in memo:
585  * "TEB Radiometric Uncertainty and LUT Format",
586  * by Kwo-Fu (Vincent) Chiang etc., March, 2011
587  *********************************************************
588  */
589 
590  dL_ev = 0.0; /* use this variable to accumulate (dL_ev/L_ev)^2 */
591 
592  /***************************************************************
593  * obsolete due to TEB UI algorithm update, 3/22/2011, Xu Geng
594  */
595 
596  /*
597  * Add in terms from Eq. (4).
598  */
599 
600  /*
601  frame_number = (float32) (F+1);
602  for ( i = 0; i < NUM_UI_PARAMETERS; i++ )
603  {
604  si0 = emiss_tables->Ucoeff[D_emiss][i][0];
605  si1 = emiss_tables->Ucoeff[D_emiss][i][1];
606  EVAL_4TH_ORDER_POLYNOMIAL(ri0, si0, frame_number);
607  EVAL_4TH_ORDER_POLYNOMIAL(ri1, si1, frame_number);
608  dL_i_over_L_ev = (ri0 + ri1 * L_ev) / L_ev;
609  dL_ev += (dL_i_over_L_ev * dL_i_over_L_ev);
610  }
611  */
612 
613  /*
614  * Compute residual uncertainty to calibration fit (Eq. 9) and store
615  * in variable "Calibr_resid".
616  */
617  /*
618  calibr_resid_coeffs = emiss_tables->Ucoeff_Calibr_resid[D_emiss];
619  EVAL_4TH_ORDER_POLYNOMIAL(Calibr_resid, calibr_resid_coeffs, L_ev);
620  Calibr_resid /= L_ev;
621  */
622  /*
623  * Add in remaining terms to (dL_ev/L_ev)^2
624  */
625 
626  /*
627  dtemp = PP_emiss->NEdL[D_emiss][S]/L_ev;
628  dL_ev += (dtemp * dtemp) + Sigma_TEB_PV_resid_elec_sq +
629  (0.25 * dn_PCX_corr * dn_PCX_corr + Sigma_TEB_ADC_sq) /
630  (dn_ev * dn_ev) + Calibr_resid * Calibr_resid;
631  if (B_emiss == BAND21)
632  {
633  dtemp = emiss_tables->Band_21_Uncert_Lsat * L_ev;
634  dL_ev += (dtemp * dtemp);
635  }
636  *****************************************************************/
637 
638  /*
639  * Uncertainty due to a0
640  */
641  dtemp = PP_emiss->sigma_a0[D_emiss][S]*(1. - dn_ev/PP_emiss->dn_bb[D_emiss][S])
642  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev);
643  dL_ev += (dtemp * dtemp);
644 
645  /*
646  * Uncertainty due to a2
647  */
648  dtemp = PP_emiss->sigma_a2[D_emiss][S]*(dn_ev-PP_emiss->dn_bb[D_emiss][S])*dn_ev
649  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev);
650  dL_ev += (dtemp * dtemp);
651 
652  /*
653  * Uncertainty due to RVS_SV
654  */
655  dtemp = L1B_Gran->Emiss_Cal_Coeff.sigma_RVS_Emiss_EV[D_emiss][SV_frame_no][MS]*
656  (dn_ev/PP_emiss->dn_bb[D_emiss][S]-1.)*PP_emiss->Planck_mir[D_emiss][S]
657  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev);
658  dL_ev += (dtemp * dtemp);
659 
660  /*
661  * Uncertainty due to RVS_EV
662  */
663  dtemp = L1B_Gran->Emiss_Cal_Coeff.sigma_RVS_Emiss_EV[D_emiss][F][MS]*
664  (PP_emiss->Planck_mir[D_emiss][S]/L_ev - 1.)
665  /L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS];
666  dL_ev += (dtemp * dtemp);
667 
668  /*
669  * Uncertainty due to epsilon_bb
670  */
671  dtemp = emiss_tables->sigma_epsilon_BB[B_emiss]*(PP_emiss->L_bb[D_emiss][S] -
672  emiss_tables->epsilon_cav[D_emiss]*PP_emiss->L_cav[D_emiss][S])*dn_ev
673  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev*
674  PP_emiss->dn_bb[D_emiss][S]);
675  dL_ev += (dtemp * dtemp);
676 
677  /*
678  * Uncertainty due to epsilon_cav
679  */
680  dtemp = emiss_tables->sigma_epsilon_CAV[B_emiss]*(1.-emiss_tables->epsilon_bb[D_emiss])
681  *PP_emiss->L_cav[D_emiss][S]*dn_ev
682  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev*
683  PP_emiss->dn_bb[D_emiss][S]);
684  dL_ev += (dtemp * dtemp);
685 
686  /*
687  * Uncertainty due to lambda
688  */
689  dtemp = (emiss_tables->sigma_L_lambda[B_emiss][0]+emiss_tables->sigma_L_lambda[B_emiss][1]*L_ev)
690  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev);
691  dL_ev += (dtemp * dtemp);
692 
693  /*
694  * Uncertainty due to T_bb
695  */
696  dtemp = emiss_tables->sigma_L_Tbb[B_emiss]*emiss_tables->epsilon_bb[D_emiss]*dn_ev
697  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev*
698  PP_emiss->dn_bb[D_emiss][S]);
699  dL_ev += (dtemp * dtemp);
700 
701  /*
702  * Uncertainty due to T_sm
703  */
704  dtemp = emiss_tables->sigma_L_Tsm[B_emiss]*
705  (L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]-
706  L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_SV[D_emiss][MS]+
707  (L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_SV[D_emiss][MS] - 1)
708  *dn_ev/PP_emiss->dn_bb[D_emiss][S])
709  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev);
710  dL_ev += (dtemp * dtemp);
711 
712  /*
713  * Uncertainty due to T_cav
714  */
715  dtemp = emiss_tables->sigma_L_Tcav[B_emiss]*(1.-emiss_tables->epsilon_bb[D_emiss])
716  *emiss_tables->epsilon_cav[D_emiss]*dn_ev/PP_emiss->dn_bb[D_emiss][S]
717  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev);
718  dL_ev += (dtemp * dtemp);
719 
720  /*
721  * Uncertainty due to dn_EV
722  */
723  dtemp = PP_emiss->dn_bb_sdev[D_emiss][S]*(PP_emiss->b1[D_emiss][S]+
724  2.*PP_emiss->a2[D_emiss][S]*dn_ev)
725  /(L1B_Gran->Emiss_Cal_Coeff.RVS_1km_Emiss_EV[D_emiss][F][MS]*L_ev);
726  dL_ev += (dtemp * dtemp);
727 
728  /*
729  * Uncertainty due to band_21_b1
730  */
731  if (B_emiss == BAND21)
732  {
733  dtemp = emiss_tables->sigma_b1_B21[D][MS];
734  dL_ev += (dtemp * dtemp);
735  }
736 
737  /*
738  * Uncertainty due to cross talk correction (penalty)
739  * There is no impact to those bands with no xtalk correction being applied,
740  * since the term dn_XT_corr should be 0,
741  * or the factor can be set to 0.
742  */
743  dtemp = emiss_tables->xt_ui_factor[B_emiss][D]*(dn_XT_corr / dn_ev);
744  dL_ev += (dtemp * dtemp);
745 
746  /*
747  * Compute fractional uncertainty (take square root of (dL_ev/L_ev)^2)
748  */
749 
750  dL_ev = sqrt((double) dL_ev);
751 
752  /*
753  * Calculate the uncertainty index using the formula from the
754  * L1B Product User's Guide:
755  *
756  * UI = n * log(percent_uncertainty / m)
757  *
758  * The value of n and m are band dependent and come from lookup tables.
759  * The factor of 100 in the formula below converts the fractional
760  * uncertainty to % uncertainty.
761  */
762 
763  if (dL_ev > 0)
764  uncert = emiss_tables->TEB_UI_scaling_factor[B_emiss] *
765  log((double) (100.0*dL_ev/emiss_tables->TEB_specified_uncertainty[B_emiss]));
766  else
767  uncert = BAD_DATA_UI;
768 
769  /*
770  * Ensure the uncertainty is in the range of 0-15.
771  */
772 
773  if (uncert > BAD_DATA_UI)
774  L1B_Scan->UI.EV_1km_Emissive_UI[B_emiss][D][F] = BAD_DATA_UI;
775  else if(uncert < 0)
776  L1B_Scan->UI.EV_1km_Emissive_UI[B_emiss][D][F] = 0;
777  else
778  L1B_Scan->UI.EV_1km_Emissive_UI[B_emiss][D][F] = (uint8) uncert;
779  }
780 
781  }/*End of loop over frames*/
782 
783  }/*End of loop over detectors within band*/
784 
785  B_emiss++;
786  }/*End of loop over bands*/
787 
788  if (flag == 1)
789  L1B_Scan_Meta->Bit_QA_Flags[S] |= 0x00000008;
790 
791  return(MODIS_S_OK);
792 }
793 
794 
float32 epsilon_cav[NUM_EMISSIVE_DETECTORS]
Definition: L1B_Tables.h:767
#define MODIS_S_OK
float32 b1[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:141
integer, parameter int16
Definition: cubeio.f90:3
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 TEB_B1_NOT_CALCULATED
Definition: HISTORY.txt:623
QA_Common_t QA_common
Definition: Granule.h:1097
#define SATURATED_DETECTOR_SI
Definition: Granule.h:519
int16 PVLW_XT_BANDS[NUM_PVLW_XT_BANDS]
Definition: Preprocess.c:26
#define BAD_DATA_UI
Definition: Granule.h:533
L1B_ScaleOffset_t SO
Definition: Granule.h:865
uint32 valid_pixels[NUM_BANDS]
Definition: Granule.h:878
@ BAND36
Definition: Granule.h:644
int32 num_sector_rotation_EV_data[NUM_DETECTORS]
Definition: Granule.h:1082
float32 sigma_b1_B21[DETECTORS_PER_1KM_BAND][NUM_MIRROR_SIDES]
Definition: L1B_Tables.h:854
int32 num_nadir_door_closed_EV_data[NUM_DETECTORS]
Definition: Granule.h:1088
int8 PCX_correction_switch
Definition: L1B_Tables.h:805
#define SECTOR_ROTATION_SI
Definition: Granule.h:525
uint16 EV_1km_Emissive[NUM_1000M_EMISS_BANDS][DETECTORS_PER_1KM_BAND][EV_1km_FRAMES]
Definition: Granule.h:905
int32 num_saturated_EV_data[NUM_DETECTORS]
Definition: Granule.h:1083
@ BAND32
Definition: Granule.h:644
#define UNABLE_CALIBRATE_SI
Definition: Granule.h:528
#define L1A_DN_MISSING_SI
Definition: Granule.h:518
Emiss_Cal_Coeff_t Emiss_Cal_Coeff
Definition: Granule.h:864
int32 num_exceed_max_for_scaling[NUM_DETECTORS]
Definition: Granule.h:1087
#define MODIS_BAND26_INDEX_AT_RES
Definition: Granule.h:447
boolean Sector_Rotation[MAX_NUM_SCANS]
Definition: Granule.h:1075
#define MISSING_L1A_FLAG
Definition: Granule.h:515
@ BAND21
Definition: Granule.h:643
#define ON
Definition: l1.h:43
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
#define DETECTORS_PER_1KM_BAND
Definition: Granule.h:438
#define NUM_PVLW_XT_BANDS
Definition: L1B_Tables.h:400
float32 RVS_1km_Emiss_SV[NUM_EMISSIVE_DETECTORS][NUM_MIRROR_SIDES]
Definition: Granule.h:848
const double F
float32 sigma_a0[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:140
int32 num_negative_b1[NUM_DETECTORS]
Definition: Granule.h:1089
boolean Electronic_Anomaly[MAX_NUM_SCANS]
Definition: Granule.h:1076
uint32 saturated_pixels[NUM_BANDS]
Definition: Granule.h:879
const int NUM_BANDS
float32 sigma_L_Tcav[NUM_EMISSIVE_BANDS]
Definition: L1B_Tables.h:853
float32 sigma_epsilon_BB[NUM_EMISSIVE_BANDS]
Definition: L1B_Tables.h:847
float32 sigma_a2[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:143
#define SATURATED_DN
Definition: Granule.h:511
L1B_Scan_UI_t UI
Definition: Granule.h:987
float32 dn_bb[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:145
float32 L_Min[NUM_EMISSIVE_BANDS]
Definition: L1B_Tables.h:823
int16 L1A_BANDS_AT_RES[NUM_L1A_RESOLUTIONS]
Definition: Granule.c:63
@ BAND26
Definition: Granule.h:643
float32 a2[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:142
#define TEB_OR_RSB_GT_MAX_SI
Definition: Granule.h:523
float32 xt_ui_factor[NUM_EMISSIVE_BANDS][DETECTORS_PER_1KM_BAND]
Definition: L1B_Tables.h:839
float32 rad_offset_Emiss[NUM_EMISSIVE_BANDS]
Definition: Granule.h:809
#define EV_1km_FRAMES
Definition: Granule.h:469
float32 TEB_specified_uncertainty[NUM_EMISSIVE_BANDS]
Definition: L1B_Tables.h:824
#define FLOAT_TO_PIXEL(L, L_max, L_min, scale, offset, Scale_Integer)
Definition: Emissive_Cal.c:8
uint32 Bit_QA_Flags[MAX_NUM_SCANS]
Definition: L1B_Setup.h:73
#define DEAD_DETECTOR_SI
Definition: Granule.h:521
#define INDEX_1000M_EMISS
Definition: Granule.h:576
float32 sigma_RVS_Emiss_EV[NUM_EMISSIVE_DETECTORS][EV_1km_FRAMES][NUM_MIRROR_SIDES]
Definition: Granule.h:853
void SMF_ERROR(PGSt_SMF_code code, char *messagestring)
Definition: Granule.c:1345
float32 dn_X[DETECTORS_PER_1KM_BAND][EV_1km_FRAMES]
Definition: Granule.h:1027
int32 num_missing_data_in_scans[NUM_DETECTORS]
Definition: Granule.h:1079
#define ZERO_POINT_DN_SI
Definition: Granule.h:520
float32 DN_sv[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:144
float32 epsilon_bb[NUM_EMISSIVE_DETECTORS]
Definition: L1B_Tables.h:766
#define MODIS_F_NOK
int8 dead_detector[NUM_DETECTORS]
Definition: L1B_Tables.h:889
float32 dn_bb_sdev[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:146
#define True
Definition: Granule.h:537
#define TOLERANCE
Definition: Granule.h:535
float32 L_cav[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:148
int32 num_dead_detector_EV_data[NUM_DETECTORS]
Definition: Granule.h:1080
uint32 missing_pixels[NUM_BANDS]
Definition: Granule.h:880
int16 RVS_BB_SV_Frame_No[2]
Definition: L1B_Tables.h:819
float32 RVS_1km_Emiss_EV[NUM_EMISSIVE_DETECTORS][EV_1km_FRAMES][NUM_MIRROR_SIDES]
Definition: Granule.h:846
uint8 EV_1km_Emissive_UI[NUM_1000M_EMISS_BANDS][DETECTORS_PER_1KM_BAND][EV_1km_FRAMES]
Definition: Granule.h:924
float32 sigma_L_Tsm[NUM_EMISSIVE_BANDS]
Definition: L1B_Tables.h:852
float32 rad_scale_Emiss[NUM_EMISSIVE_BANDS]
Definition: Granule.h:808
int16 bad_data_flag[NUM_BANDS]
Definition: Granule.h:885
int32 num_no_bg_DN_EV_data[NUM_DETECTORS]
Definition: Granule.h:1084
#define NUM_REFLECTIVE_DETECTORS
Definition: Granule.h:427
float32 TEB_UI_scaling_factor[NUM_EMISSIVE_BANDS]
Definition: L1B_Tables.h:825
float32 sigma_L_lambda[NUM_EMISSIVE_BANDS][NUM_1ST_ORDER_COEFFS]
Definition: L1B_Tables.h:850
float32 PC_XT[NUM_PC_XT_BANDS][DETECTORS_PER_1KM_BAND][NUM_PC_XT_PARAMETERS]
Definition: L1B_Tables.h:772
int16 EV_1km_night[DETECTORS_PER_1KM_BAND][NUM_1000M_NIGHT_BANDS][EV_1km_FRAMES]
Definition: Granule.h:791
for(i=0;i< NROOTS;i++) s[i]
Definition: decode_rs.h:85
int16 DETECT_PER_BAND_AT_RES[NUM_L1A_RESOLUTIONS]
Definition: Granule.c:68
#define NAD_CLOSED_UPPER_SI
Definition: Granule.h:531
float32 sigma_L_Tbb[NUM_EMISSIVE_BANDS]
Definition: L1B_Tables.h:851
int16 PVLW_XT_BANDS_FRAME_REL_POS[NUM_PVLW_XT_BANDS]
Definition: Preprocess.c:29
float32 Planck_mir[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:138
@ BAND31
Definition: Granule.h:644
const int NUM_EMISSIVE_BANDS
uint32 dead_detector_pixels[NUM_BANDS]
Definition: Granule.h:882
float32 L_Max[NUM_EMISSIVE_BANDS]
Definition: L1B_Tables.h:822
int MS[]
Definition: Usds.c:106
L1B_Scan_SI_t SI
Definition: Granule.h:973
float32 L_bb[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:147
int16 band_X
Definition: Granule.h:1026
boolean NAD_Door_Open[MAX_NUM_SCANS]
Definition: Granule.h:1074
common_QA_tables_t common_QA_tables
Definition: L1B_Tables.h:943
float32 sigma_epsilon_CAV[NUM_EMISSIVE_BANDS]
Definition: L1B_Tables.h:848
uint32 negative_value_below_noise_pixels[NUM_BANDS]
Definition: Granule.h:884
#define False
Definition: Granule.h:538
float64 PVLW_XT_coeff[NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND][NUM_PVLW_XT_BANDS][DETECTORS_PER_1KM_BAND][NUM_PVLW_XT_COEFF]
Definition: L1B_Tables.h:844
float32 a0[NUM_EMISSIVE_DETECTORS][MAX_NUM_SCANS]
Definition: Preprocess.h:139