OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
calib_get_cal_misc.c
Go to the documentation of this file.
1 /*-----------------------------------------------------------------------------
2  File : get_cal_misc.c
3 
4  Contents:
5  get_ref_time - reads reference time
6  get_index - reads time vdata and returns appropriate index to
7  access data
8  read_parm_data - reads parameter data
9  calc_knees - calculates knee1,2,3 and 4 counts and radiances
10  setup_scanmod - sets up the scan-modulation correction factor array
11  for GAC data
12  attach_vdata - attaches to the requested vdata
13  rdvdata - reads requested data from the given vdata
14  sort_srad - sorts saturated radiances and returns ordered
15  indices
16  read_SDS - reads the requested SDS
17 
18  Other relevant files:
19  cal.h - various #defined constants, TDI table, and also
20  includes hdf.h
21  getcal_proto.h - prototypes for get_cal functions
22  get_cal.c - a higher layer of calibration input functions
23 
24  Notes:
25 
26  Modification history:
27  Programmer Organization Date Description of change
28  -------------- ------------ -------- ---------------------
29  Lakshmi Kumar Hughes STX 03/11/94 Original development
30  Lakshmi Kumar Hughes STX 06/07/94 Updated to reflect v3.1
31  interface spcifications
32  Lakshmi Kumar Hughes STX 03/21/96 Corrected non-prototype
33  declarations
34  Lakshmi Kumar Hughes STX 03/17/97 Removed non-ANSI proto
35  declarations. In-detector
36  offsets are redefined as
37  idoffs[8][16].
38 ------------------------------------------------------------------------------*/
39 #include <hdf4utils.h>
40 
41 #include "calib_get_cal.h"
42 #include "calib_getcal_proto.h"
43 
44 static char slp_flds[] = {
45  "g1d1,g1d2,g1d3,g1d4,g2d1,g2d2,g2d3,g2d4,g3d1,g3d2,g3d3,g3d4,g4d1,g4d2,g4d3,g4d4"
46 };
47 
48 static char OFFSET_FLDS[] = {
49  "g1offs1,g1offs2,g1offs3,g1offs4,g2offs1,g2offs2,g2offs3,g2offs4,g3offs1,g3offs2,g3offs3,g3offs4,g4offs1,g4offs2,g4offs3,g4offs4"
50 };
51 
52 static char TFACTOR_FLDS[] = {
53  "t_const,t_linear,t_quadratic"
54 };
55 
56 static char CORRECTION_FLDS[] = {
57  "cal_offs,mirror1,mirror2"
58 };
59 
60 static char *slp_names[] = {
61  "B1Slopes", "B2Slopes", "B3Slopes", "B4Slopes", "B5Slopes", "B6Slopes",
62  "B7Slopes", "B8Slopes"
63 };
64 
65 static char *parm_names[] = {
66  "B1Parms", "B2Parms", "B3Parms", "B4Parms", "B5Parms", "B6Parms",
67  "B7Parms", "B8Parms"
68 };
69 
70 /*-----------------------------------------------------------------------------
71  Function: get_index
72 
73  Returns: int32 (status)
74  Returns status
75 
76  Description:
77  The function get_ref_time reads reference date and time from the
78  input calibration table.
79 
80  Arguments: (in calling order)
81  Type Name I/O Description
82  ---- ---- --- -----------
83  int32 sdfid I SD file ID
84  int16 ref_year I Reference Year
85  int16 ref_day I Reference Day
86  int16 ref_min I Reference Minute
87 
88  Notes:
89 
90  Modification history:
91  Programmer Organization Date Description of change
92  -------------- ------------ -------- ---------------------
93  Lakshmi Kumar Hughes STX 05/22/96 Original development
94 ------------------------------------------------------------------------------*/
95 int32 get_ref_time(int32 sdfid, int16 *ref_year, int16 *ref_day, int16 *ref_min) {
96  int32 attrnum;
97 
98  attrnum = SDfindattr(sdfid, REFYEAR);
99  if ((SDreadattr(sdfid, attrnum, ref_year)) < 0)
100  return FAIL;
101 
102  attrnum = SDfindattr(sdfid, REFDAY);
103  if ((SDreadattr(sdfid, attrnum, ref_day)) < 0)
104  return FAIL;
105 
106  attrnum = SDfindattr(sdfid, REFMIN);
107  if ((SDreadattr(sdfid, attrnum, ref_min)) < 0)
108  return FAIL;
109 
110  return SUCCEED;
111 }
112 
113 /*-----------------------------------------------------------------------------
114  Function: get_index
115 
116  Returns: int32 (index)
117  On successful it returns the index of the given time entry and if
118  time entry not found, returns -3.
119 
120  Description:
121  The function get_index reads time vdata and searches for the
122  given time entry. If the given time found, it rerurns the entry
123  number to access related information from slopes and parameter vdatas.
124 
125  Arguments: (in calling order)
126  Type Name I/O Description
127  ---- ---- --- -----------
128  int32 fid I file ID
129  int16 syear I year of data start time
130  int16 sday I day-of-year for data start time
131  int16 eday I day-of-year for data end time
132  int32 smsec I milliseconds-of-day for data start time
133  int16 *cal_year O year the cal entry was made
134  int16 *cal_day O day of the year the cal entry was made
135 
136  Notes:
137 
138  Modification history:
139  Programmer Organization Date Description of change
140  -------------- ------------ -------- ---------------------
141  Lakshmi Kumar Hughes STX 03/11/94 Original development
142  Lakshmi Kumar Hughes STX 06/07/94 Updated to reflect v3.1
143  interface spcifications
144  Lakshmi Kumar Hughes STX 02/07/94 Added code to return
145  cal entry year and day
146  (ref to I/O specs v4.2)
147 ------------------------------------------------------------------------------*/
148 
149 int32_t get_index(int32_t fid, int16_t syear, int16_t sday, int16_t eday, int32_t msec,
150  int16_t *cal_year, int16_t *cal_day) {
151 
152  int16 dyear, dday, *cal_syear, *cal_sday, *cal_eyear, *cal_eday;
154  int32 i, *cal_smsec, *cal_emsec, vsid, elts;
155 
156  if ((vsid = attach_vdata(fid, TIME)) < 0)
157  return RDERR;
158 
159  if ((elts = VSelts(vsid)) < 0)
160  return RDERR;
161 
162  if ((cal_syear = (int16 *) malloc(elts * sizeof (int16))) == NULL)
163  return BUFERR;
164 
165  if ((cal_eyear = (int16 *) malloc(elts * sizeof (int16))) == NULL)
166  return BUFERR;
167 
168  if ((cal_sday = (int16 *) malloc(elts * sizeof (int16))) == NULL)
169  return BUFERR;
170 
171  if ((cal_eday = (int16 *) malloc(elts * sizeof (int16))) == NULL)
172  return BUFERR;
173 
174  if ((cal_smsec = (int32 *) malloc(elts * sizeof (int32))) == NULL)
175  return BUFERR;
176 
177  if ((cal_emsec = (int32 *) malloc(elts * sizeof (int32))) == NULL)
178  return BUFERR;
179 
180  if ((entry_year = (int16 *) malloc(elts * sizeof (int16))) == NULL)
181  return BUFERR;
182 
183  if ((entry_day = (int16 *) malloc(elts * sizeof (int16))) == NULL)
184  return BUFERR;
185 
186  rdvdata(vsid, SYEAR, 0, elts, (unsigned char *) cal_syear);
187  rdvdata(vsid, SDAY, 0, elts, (unsigned char *) cal_sday);
188  rdvdata(vsid, SMSEC, 0, elts, (unsigned char *) cal_smsec);
189 
190  rdvdata(vsid, EYEAR, 0, elts, (unsigned char *) cal_eyear);
191  rdvdata(vsid, EDAY, 0, elts, (unsigned char *) cal_eday);
192  rdvdata(vsid, EMSEC, 0, elts, (unsigned char *) cal_emsec);
193 
194  rdvdata(vsid, ENTRY_YEAR, 0, elts, (unsigned char *) entry_year);
195  rdvdata(vsid, ENTRY_DAY, 0, elts, (unsigned char *) entry_day);
196 
197  dyear = syear;
198  dday = sday;
199  if (sday != eday && msec < 43200000)
200  dday = eday;
201  if (dday < sday)
202  dyear += 1;
203 
204  for (i = elts - 1; i > 0; i--) {
205  if (cal_eyear[i] == 0) { /* onwards rec */
206  if (dyear > cal_syear[i])
207  break;
208  if (dyear == cal_syear[i] && dday > cal_sday[i])
209  break;
210  if (dyear == cal_syear[i] && dday == cal_sday[i] &&
211  msec >= cal_smsec[i])
212  break;
213  } else { /* not an onwards rec */
214  if (dyear > cal_syear[i]) {
215  if (dyear < cal_eyear[i])
216  break;
217  if (dyear == cal_eyear[i]) {
218  if (dday < cal_eday[i])
219  break;
220  if (dday == cal_eday[i] && msec <= cal_emsec[i])
221  break;
222  }
223  } else
224  if (dyear == cal_syear[i]) {
225  if (dyear < cal_eyear[i])
226  break;
227  if (dyear == cal_eyear[i]) {
228  if (dday >= cal_sday[i] && dday < cal_eday[i])
229  break;
230  if (dday >= cal_sday[i] && dday == cal_eday[i] &&
231  msec <= cal_emsec[i])
232  break;
233  }
234  }
235  }
236  }
237 
238  *cal_year = entry_year[i];
239  *cal_day = entry_day[i];
240 
241  VSdetach(vsid);
242  free(cal_syear);
243  free(cal_sday);
244  free(cal_smsec);
245  free(cal_eyear);
246  free(cal_eday);
247  free(cal_emsec);
248  free(entry_year);
249  free(entry_day);
250 
251  if (i <= 0)
252  return TMERR;
253  else
254  return i;
255 }
256 
257 /*-----------------------------------------------------------------------------
258  Function: read_parm_data
259 
260  Returns: int32 (Status)
261  On success returns 0, otherwise returns -2 indicating read error.
262  Description:
263  The function attaches to the requested vdata
264 
265  Arguments: (in calling order)
266  Type Name I/O Description
267  ---- ---- --- -----------
268  int32 fid I HDF file ID
269  int32 sdfid I HDF SD file ID
270  int32 index I element number
271  int32 idoffs[8][16] O detector zero offset counts
272  float32 gains[8][16] O slopes (band*detector*gains)
273  float32 temps[256][2]O temp and ref temp correction factors
274  float32 scan_mod[2][1285]O scan-modulation buffer
275  float32 mirror[8][2] O mirror side1 and side2 for all bands
276  int16 tdi_list[256][4] O TDI values for all 8 bands
277 
278  Notes:
279 
280  Modification history:
281  Programmer Organization Date Description of change
282  -------------- ------------ -------- ---------------------
283  Lakshmi Kumar Hughes STX 03/11/94 Original development
284  Lakshmi Kumar Hughes STX 06/07/94 Updated to reflect v3.1
285  interface spcifications
286 ------------------------------------------------------------------------------*/
287 int32 read_parm_data(int32 fid, int32 sdfid, int32 index, int32 idoffs[8][16],
288  float32 gains[8][16], float32 temps[256][8],
289  float32 scan_mod[2][1285], float64 *tfactor_const,
290  float64 *tfactor_linear, float64 *tfactor_quadratic,
291  float32 *cal_offset, float32 mirror[2][8],
292  int16 tdi_list[256][4]) {
293 
294  int32 i, slpid, parmid;
295  float32 parm_buf[8][3];
296  float64 tfactor_buf[8][3];
297 
298  for (i = 0; i < BANDS; i++) {
299  if ((slpid = attach_vdata(fid, slp_names[i])) < 0)
300  return RDERR;
301  if ((rdvdata(slpid, slp_flds, index, 1, (unsigned char *) gains[i])) < 0)
302  return RDERR;
303  VSdetach(slpid);
304 
305  if ((parmid = attach_vdata(fid, parm_names[i])) < 0)
306  return RDERR;
307 
308  if ((rdvdata(parmid, OFFSET_FLDS, index, 1,
309  (unsigned char *) idoffs[i])) < 0) return RDERR;
310 
311  if ((rdvdata(parmid, TFACTOR_FLDS, index, 1,
312  (unsigned char *) tfactor_buf[i])) < 0) return RDERR;
313 
314  if ((rdvdata(parmid, CORRECTION_FLDS, index, 1,
315  (unsigned char *) parm_buf[i])) < 0) return RDERR;
316 
317  VSdetach(parmid);
318  }
319 
320  for (i = 0; i < BANDS; i++) {
321  tfactor_const[i] = tfactor_buf[i][0];
322  tfactor_linear[i] = tfactor_buf[i][1];
323  tfactor_quadratic[i] = tfactor_buf[i][2];
324  cal_offset[i] = parm_buf[i][0];
325  mirror[0][i] = parm_buf[i][1];
326  mirror[1][i] = parm_buf[i][2];
327  }
328 
329  if ((read_SDS(sdfid, TDILIST, (void *) tdi_list)) < 0)
330  return RDERR;
331 
332  if ((read_SDS(sdfid, TEMPS, (void *) temps)) < 0)
333  return RDERR;
334 
335  if ((read_SDS(sdfid, SCANMOD, (void *) scan_mod)) < 0)
336  return RDERR;
337 
338  return SUCCEED;
339 }
340 
341 /*-----------------------------------------------------------------------------
342  Function: calc_knees
343 
344  Returns: void
345 
346  Description:
347  The function calc_knees calculates knee1,2,3 and 4 counts and
348  radiances. It also calculates zero offset counts.
349 
350  Arguments: (in calling order)
351  Type Name I/O Description
352  ---- ---- --- -----------
353  int16 * tdi I input TDI values for all 8 bands
354  int16 tdi_list[256][4] I TDI Detector combination table
355  int32 idoffs[8][16] I input detector offsets
356  float32 gains[8][16] I input gains
357  float32 counts[8][4][5] O Digital counts corresponding to each knee
358  float32 rads[8][4][5] O Radiances corrsponding to each knee
359 
360  Notes:
361 
362  Modification history:
363  Programmer Organization Date Description of change
364  -------------- ------------ -------- ---------------------
365  Lakshmi Kumar Hughes STX 03/11/94 Original development
366  Lakshmi Kumar Hughes STX 06/07/94 Updated to reflect v3.1
367  interface spcifications
368  W. Robinson, GSC, 13 May 97 remove double incriment of l in
369  slopes, cnts calculation
370 
371 ------------------------------------------------------------------------------*/
372 void calc_knees(int16 *tdi, int16 tdi_list[256][4], int32 idoffs[8][16],
373  float32 gains[8][16], float32 counts[8][4][5],
374  float32 rads[8][4][5]) {
375 
376  int16 dets[4];
377  int32 i, j, k, l;
378  int32 scnts[4]; /* saturation counts */
379  float32 srads[4]; /* saturation radiance */
380  float32 loc_slopes[4];
381  float32 slopes[BANDS][4][4];
382  int32 cnts[BANDS][4][4];
383  int32 oindex[DETS];
384 
385 
386  for (i = 0; i < BANDS; i++)
387  for (j = 0, l = 0; j < 4; j++)
388  for (k = 0; k < 4; k++) {
389  /* slopes[i][j][k] = gains[i][l++]; */
390  slopes[i][j][k] = gains[i][l];
391  cnts[i][j][k] = idoffs[i][l++];
392  }
393 
394  for (i = 0; i < BANDS; i++) {
395  for (j = 0; j < 4; j++)
396  dets[j] = tdi_list[tdi[i]][j] - 1;
397  for (j = 0; j < GAINS; j++) {
398  for (k = 0; k < DETS; k++) {
399  scnts[k] = 1023 - cnts[i][j][dets[k]];
400  srads[k] = scnts[k] * slopes[i][j][dets[k]];
401  loc_slopes[k] = slopes[i][j][dets[k]];
402  }
403 
404  sort_srads(srads, oindex);
405 
406  rads[i][j][0] = 0;
407  for (k = 1; k < 5; k++)
408  rads[i][j][k] = srads[oindex[k - 1]];
409 
410  counts[i][j][0] = 0;
411  counts[i][j][1] = (scnts[oindex[0]] +
412  srads[oindex[0]] / loc_slopes[oindex[1]] +
413  srads[oindex[0]] / loc_slopes[oindex[2]] +
414  srads[oindex[0]] / loc_slopes[oindex[3]]) / 4.0;
415 
416  counts[i][j][2] = (scnts[oindex[0]] + scnts[oindex[1]] +
417  srads[oindex[1]] / loc_slopes[oindex[2]] +
418  srads[oindex[1]] / loc_slopes[oindex[3]]) / 4.0;
419 
420  counts[i][j][3] = (scnts[oindex[0]] + scnts[oindex[1]] +
421  scnts[oindex[2]] +
422  srads[oindex[2]] / loc_slopes[oindex[3]]) / 4.0;
423 
424  counts[i][j][4] = (scnts[oindex[0]] + scnts[oindex[1]] +
425  scnts[oindex[2]] + scnts[oindex[3]]) / 4.0;
426 
427  }
428  }
429 }
430 
431 /*-----------------------------------------------------------------------------
432  Function: setup_scanmod
433 
434  Returns: void
435 
436  Description:
437  Set up the scan-modulation correction factor array for GAC data.
438  These factors are stored in the calibration table for an entire LAC
439  scan line.
440 
441  Arguments: (in calling order)
442  Type Name I/O Description
443  ---- ---- --- -----------
444  char * dtype I data type (GAC, LAC, ...)
445  float32 * scan_mod I/O scan modulation correction factors
446 
447  Notes:
448 
449  Modification history:
450  Programmer Organization Date Description of change
451  -------------- ------------ -------- ---------------------
452  Lakshmi Kumar Hughes STX 06/07/94 Original development
453  Lakshmi Kumar Hughes STX 03/21/96 Made it compatible for
454  non ANSI compilation
455 ------------------------------------------------------------------------------*/
456 
457 void setup_scanmod(char *dtype, float32 scan_mod[2][1285]) {
458  int32 i, pixel;
459  char loc_dtype[20];
460 
461  for (i = 0; i < strlen(dtype); i++) /* convert to lower case */
462  loc_dtype[i] = tolower(dtype[i]);
463  loc_dtype[i] = '\0';
464 
465  if ((strcmp(loc_dtype, GAC)) == 0)
466  for (pixel = 0; pixel <= 247; pixel++) {
467  scan_mod[0][pixel] = scan_mod[0][146 + 4 * pixel];
468  scan_mod[1][pixel] = scan_mod[1][146 + 4 * pixel];
469  }
470 
471 #ifdef DEBUG
472  printf("\n\n--------- GAC scan_mod values --------------\n");
473  for (pixel = 0; pixel <= 247; pixel++) {
474  printf("%4d\t%f\t%f\n", pixel, scan_mod[0][pixel], scan_mod[1][pixel]);
475 #endif
476  }
477 
478  /*-----------------------------------------------------------------------------
479  Function: sort_srad
480 
481  Returns: void
482 
483  Description:
484  The function sort_srad sorts the given saturation radiances and
485  returns the ordered indices.
486 
487  Arguments: (in calling order)
488  Type Name I/O Description
489  ---- ---- --- -----------
490  float32 * srads I saturation radiances
491  int32 * oindex O ordered indecies representing order
492  of saturation radiances
493  Notes:
494 
495  Modification history:
496  Programmer Organization Date Description of change
497  -------------- ------------ -------- ---------------------
498  Lakshmi Kumar Hughes STX 06/07/94 Original development
499 
500  ------------------------------------------------------------------------------*/
501  void sort_srads(float32 *srads, int32 * oindex) {
502  int32 i, done = 0, exchange = 0, loc_index[DETS], temp_index;
503  float32 loc_srads[DETS], temp;
504 
505  for (i = 0; i < DETS; i++) {
506  loc_index[i] = i;
507  loc_srads[i] = srads[i];
508  }
509 
510  while (!done) {
511  for (exchange = 0, i = 0; i < DETS - 1; i++)
512  if (loc_srads[i] > loc_srads[i + 1]) {
513  exchange = 1;
514  temp = loc_srads[i];
515  temp_index = loc_index[i];
516  loc_srads[i] = loc_srads[i + 1];
517  loc_index[i] = loc_index[i + 1];
518  loc_srads[i + 1] = temp;
519  loc_index[i + 1] = temp_index;
520  }
521  if (!exchange)
522  done = 1;
523  }
524 
525  for (i = 0; i < DETS; i++)
526  oindex[i] = loc_index[i];
527 
528 #ifdef DEBUG
529  for (i = 0; i < 4; i++)
530  printf("\n %d\t%8.5f ", oindex[i], loc_srads[i]);
531 #endif
532  }
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 it will be treated as a constant LUT The manner in which Earth View data is checked for saturation was changed Previously the raw Earth View DNs and Space View DNs were checked against the lookup table values contained in the table dn_sat The change made is to check the raw Earth and Space View DNs to be sure they are less than the maximum saturation value and to check the Space View subtracted Earth View dns against a set of values contained in the new lookup table dn_sat_ev The metadata configuration and ASSOCIATEDINSTRUMENTSHORTNAME from the MOD02HKM product The same metatdata with extensions and were removed from the MOD021KM and MOD02OBC products ASSOCIATEDSENSORSHORTNAME was set to MODIS in all products These changes are reflected in new File Specification which users may consult for exact the pow functions were eliminated in Emissive_Cal and Emissive bands replaced by more efficient code Other calculations throughout the code were also made more efficient Aside from a few round off there was no difference to the product The CPU time decreased by about for a day case and for a night case A minor bug in calculating the uncertainty index for emissive bands was corrected The frame index(0-based) was previously being used the frame number(1-based) should have been used. There were only a few minor changes to the uncertainty index(maximum of 1 digit). 3. Some inefficient arrays(Sigma_RVS_norm_sq) were eliminated and some code lines in Preprocess_L1A_Data were moved into Process_OBCEng_Emiss. There were no changes to the product. Required RAM was reduced by 20 MB. Now
integer, parameter int16
Definition: cubeio.f90:3
float rads[BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
Definition: l1a_seawifs.c:47
int16 eday
Definition: l1_czcs_hdf.c:17
void sort_srads(float32 *srads, int32 *oindex)
int j
Definition: decode_rs.h:73
#define SCANMOD
Definition: calib_get_cal.h:19
#define EYEAR
Definition: regen.h:37
int32 get_ref_time(int32 sdfid, int16 *ref_year, int16 *ref_day, int16 *ref_min)
int32_t get_index(int32_t fid, int16_t syear, int16_t sday, int16_t eday, int32_t msec, int16_t *cal_year, int16_t *cal_day)
#define GAINS
Definition: calib_get_cal.h:10
#define SYEAR
Definition: regen.h:34
#define FAIL
Definition: ObpgReadGrid.h:18
#define NULL
Definition: decode_rs.h:63
#define SDAY
Definition: regen.h:35
int16_t entry_year
Definition: l1a_seawifs.c:39
int attach_vdata(int32_t fid, const char *sname)
#define DETS
Definition: calib_get_cal.h:9
int32 * msec
Definition: l1_czcs_hdf.c:31
uint8 * counts
Definition: l1_czcs_hdf.c:30
int32 read_parm_data(int32 fid, int32 sdfid, int32 index, int32 idoffs[8][16], float32 gains[8][16], float32 temps[256][8], float32 scan_mod[2][1285], float64 *tfactor_const, float64 *tfactor_linear, float64 *tfactor_quadratic, float32 *cal_offset, float32 mirror[2][8], int16 tdi_list[256][4])
int syear
Definition: l1_czcs_hdf.c:15
#define GAC
Definition: l1stat.h:33
int16_t entry_day
Definition: l1a_seawifs.c:40
int sday
Definition: l1_czcs_hdf.c:15
#define EMSEC
Definition: regen.h:39
#define REFDAY
Definition: calib_get_cal.h:22
#define SMSEC
Definition: regen.h:36
int16_t tdi[BANDS_DIMS_1A]
Definition: l1a_seawifs.c:37
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 pixel
Definition: HISTORY.txt:192
int16_t ref_day
Definition: l1a_seawifs.c:42
#define REFMIN
Definition: calib_get_cal.h:23
int rdvdata(int32_t vskey, const char *fields, int32_t start, int32_t nelt, unsigned char *databuf)
int32_t read_SDS(int32_t sdfid, const char *sds_name, void *buffer)
#define EDAY
Definition: regen.h:38
#define ENTRY_YEAR
Definition: calib_get_cal.h:24
dtype
Definition: DDataset.hpp:31
#define ENTRY_DAY
Definition: calib_get_cal.h:25
int16_t ref_year
Definition: l1a_seawifs.c:41
float scan_mod[2][1285]
Definition: l1a_seawifs.c:45
#define TIME
Definition: calib_get_cal.h:12
#define TMERR
Definition: calib_get_cal.h:14
#define REFYEAR
Definition: calib_get_cal.h:21
void setup_scanmod(char *dtype, float32 scan_mod[2][1285])
int i
Definition: decode_rs.h:71
#define TDILIST
Definition: calib_get_cal.h:18
#define BUFERR
Definition: calib_get_cal.h:15
#define RDERR
Definition: l2brsgen.h:22
int k
Definition: decode_rs.h:73
#define TEMPS
Definition: calib_get_cal.h:17
#define BANDS
void calc_knees(int16 *tdi, int16 tdi_list[256][4], int32 idoffs[8][16], float32 gains[8][16], float32 counts[8][4][5], float32 rads[8][4][5])