OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
reset_last_valid_scan.c
Go to the documentation of this file.
1 #include "L1A_prototype.h"
2 #include "EN_eng_data.h"
3 #include "hdfi.h"
4 
6 
7 /*
8 !C************************************************************************
9 
10 !Description: This function resets the LAST_VALID_SCAN field for each Vdata
11  in the eng_data array structure. All LAST_VALID_SCAN fields
12  that aren't EN_INITIAL_LAST_VALID_SCAN_VALUE are reset to
13  EN_INITIAL_FIELD_VALUE.
14 
15 !Input Parameters:
16  None
17 
18 !Output Parameters:
19  None
20 
21 !Input/Output Parameters:
22  EN_VDATA_TYPE_t eng_data ** The Vdata array structure (All **
23  ** LAST_VALID_SCAN fields that **
24  ** aren't EN_INITIAL_LAST_VALID_ **
25  ** SCAN_VALUE are reset to **
26  ** EN_INITIAL_FIELD_VALUE) **
27 Return Values:
28  None
29 
30 Externally Defined:
31  EN_VDATA_TYPE_t (EN_eng_data.h)
32  EN_NUM_VDATAS (EN_eng_data.h)
33  EN_INITIAL_FIELD_VALUE (EN_eng_data.h)
34  EN_INITIAL_LAST_VALID_SCAN_VALUE (EN_eng_data.h)
35  uint16 (hdfi.h)
36 
37 Called By:
38  process_a_granule
39 
40 Routines Called:
41  None
42 
43 !Revision History:
44  Revision 2.0 1997/09/18 13:50 EDT
45  Timi Adelekan/SAIC/GSC (adelekan@ltpmail.gsfc.nasa.gov)
46  Originated Code.
47 
48  Revision 1.0 1997/07/16 15:58 EDT
49  David Catozzi/SAIC/GSC (cato@ltpmail.gsfc.nasa.gov)
50  Original design.
51 
52 !Team-unique Header:
53  This software is developed by the MODIS Science
54  Data Support Team (SDST) for the National Aeronautics
55  and Space Administration (NASA), Goddard Space Flight
56  Center (GSFC), under contract NAS5-32373.
57 
58 !References and Credits:
59  None
60 
61 !Design Notes:
62  This code was developed in C language.
63 
64 !END************************************************************************
65 */
66 
67  {
68  /**************************************************************************/
69  /* */
70  /* Declare the local variables and initialize them. */
71  /* */
72  /**************************************************************************/
73 
74  uint16 v; /* index to access eng fields */
75 
76 
77  /**************************************************************************/
78  /* */
79  /* DO FOR ( v = 0 to EN_NUM_VDATAS-1 ) */
80  /* IF ( eng_data[v].field[0].value does NOT equal */
81  /* EN_INITIAL_LAST_VALID_SCAN_VALUE ) */
82  /* THEN */
83  /* set eng_data[v].field[0].value to EN_INITIAL_FIELD_VALUE */
84  /* ENDIF */
85  /* END_DO */
86  /* */
87  /**************************************************************************/
88 
89  for (v = 0; v < EN_NUM_VDATAS; v++)
90  if (eng_data[v].field[0].value != EN_INITIAL_LAST_VALID_SCAN_VALUE)
91  eng_data[v].field[0].value = EN_INITIAL_FIELD_VALUE;
92 
93  } /* End of routine reset_last_valid_scan */
int32 value
Definition: Granule.c:1235
EN_FIELD_TYPE_t field[EN_MAX_FIELDS_PER_VDATA]
Definition: EN_eng_data.h:125
#define EN_INITIAL_LAST_VALID_SCAN_VALUE
Definition: EN_eng_data.h:74
#define EN_INITIAL_FIELD_VALUE
Definition: EN_eng_data.h:79
#define EN_NUM_VDATAS
Definition: EN_eng_data.h:64
void reset_last_valid_scan(EN_VDATA_TYPE_t *eng_data)