OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Metadata.h
Go to the documentation of this file.
1 #ifndef METADATA_H
2 #define METADATA_H
3 
4 #include "Preprocess.h" /* Contain some variable definitions */
5  /* used in Metadata.c */
6 #include "L1B_Setup.h" /* Contains L1B_Scan_Metadata_t */
7 #include "PGS_MET.h"
8 
9 /*
10 !C-INC**********************************************************************
11 !Description: Header file Metadata.h to be included in files where to
12  populate and write granule metadata.
13 
14 !Revision History:
15  $Log: Metadata.h,v $
16  Revision 1.9 2012-06-27 15:57:04-04 xgeng
17  add the doi metadata
18 
19  Revision 1.8 2008-11-18 15:21:53-05 xgeng
20  merge branch for V6.0.0
21 
22  Revision 1.7.2.3 2008/06/05 21:53:57 xgeng
23  Added deadSubframeDataPercent to L1B_Gran_Metadata_t.
24 
25  Revision 1.7 2006/10/30 15:00:13 ltan
26  Changed for ANSI-C compliance. Correction for the generation of code change log.
27 
28  Revision 02.13 November 13, 2001 (Razor Issue #169)
29  Added skip_night_hi_res to Write_Gran_Metadata header.
30  Alice Isaacman, SAIC GSO (Alice.R.Isaacman.1@gsfc.nasa.gov)
31 
32  Revision 02.12 Dec 5, 2000
33  Razor issue 147
34  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
35 
36  Revision 02.11 Feb 8, 1999
37  Moved declaration of Scan_Meta_Cal to L1B_SetupP.h
38  Jim Rogers (rogers@mcst.gsfc.nasa.gov)
39 
40  Revision 02.10 April 1998
41  Changed some macros to functions, added new granule metadata,
42  added new data structure L1B_Gran_Metadata_t.
43  Zhenying Gu(zgu@gscmail.gsfc.nasa.gov)
44 
45  Revision 01.00 1996
46  Initial development
47  Zhidong Hao(hao@ltpmail.gsfc.nasa.gov)
48 
49 !References and Credits:
50  This software is developed by the MODIS Characterization Support
51  Team (MCST)for the National Aeronautics and Space Administration,
52  Goddard Space Flight Center, under contract NAS5-32373.
53 
54  HDF portions developed at the National Center for Supercomputing
55  Applications at the University of Illinois at Urbana-Champaign.
56 
57 !Design Notes:
58 
59 !END********************************************************************
60 */
61 #define E_VECTOR_SIZE 2
62 #define NUM_THERMISTORS 12
63 #define SERIAL_NUMBER_SIZE 30
64 #define MAX_DATE_TIME_SIZE 30
65 #define NUM_DCR_VALUE 550
66 
67 typedef struct {
68 
69  int32 L1A_Gran_sd_id;
70  int32 L1B_Gran_sd_id[NUM_L1B_EV_FILES];
71 
72  /* For L1B metadata
73  */
74  int32 num_night_scans;
75  int32 incomplete_scans;
76  int32 max_ev_frames;
77  int32 num_scans;
78  int32 num_day_scans;
79  int32 Extract_Pixel_Offset;
80  int32 Extract_Pixel_Count;
81  int32 Extract_Line_Offset;
82  int32 Extract_Line_Count;
83 
84  float32 validEVPercent[NUM_BANDS];
85  float32 satEVPercent[NUM_BANDS];
86  float32 missEVPercent[NUM_BANDS];
87  uint32 elecRedVec[2];
88 
89  uint32 total_pixels[NUM_BANDS];
90  uint32 valid_pixels[NUM_BANDS];
91  uint32 saturated_pixels[NUM_BANDS];
92  uint32 missing_pixels[NUM_BANDS];
93 
94  /*
95  * Focal_Plane_Set_Point_State
96  */
97 
98  int8 FPSetPointState;
99 
100 
101  char Reflective_LUT_Serial_Number[SERIAL_NUMBER_SIZE];
102  char Emissive_LUT_Serial_Number[SERIAL_NUMBER_SIZE];
103 
104  char QA_LUT_Serial_Number[SERIAL_NUMBER_SIZE]; /* New QA */
105 
106  char doi_attr_name[PGSd_MET_MAX_STRING_SET_L];
107  char doi_para_value[NUM_L1B_EV_FILES+1][PGSd_MET_MAX_STRING_SET_L];
108  char doi_authority_attr_name[PGSd_MET_MAX_STRING_SET_L];
109  char doi_authority_para_value[PGSd_MET_MAX_STRING_SET_L];
110 
111  /* New QA */
112  int8 Door_Screen_Configuration;
113  int8 Reflective_Band_Identification[NUM_REFLECTIVE_BANDS];
114  int8 Emissive_Band_Identification[NUM_EMISSIVE_BANDS];
115  int8 All_L1B_Error_Flag_Off;
116 
117  uint8 Thermal_Detector_Noise
119  uint8 Thermal_Detector_Relative_Response_Change
121 
122  int32 qapercent_missing_250m;
123  int32 qapercent_outofbound_250m;
124  int32 qapercent_interpolated_250m;
125  int32 qapercent_missing_500m;
126  int32 qapercent_outofbound_500m;
127  int32 qapercent_interpolated_500m;
128  int32 refl_1km_qapercent_missing;
129  int32 refl_1km_qapercent_outofbound;
130  int32 qapercent_interpolated_refl_1km;
131  int32 emiss_qapercent_missing;
132  int32 emiss_qapercent_outofbound;
133  int32 qapercent_interpolated_emiss;
134  float32 Earth_Sun_Dist;
135 
136  /*
137  * Electronics Configuration Status and
138  * Electronics Configuration Change variables
139  */
140 
141  uint32 Elec_config_status[E_VECTOR_SIZE];
142  uint32 Elec_config_change[E_VECTOR_SIZE];
143 
144  float32 missAllScanDataPercent;
145  float32 nightRSBPercent[NUM_DETECTORS];
146  float32 missInScanDataPercent[NUM_DETECTORS];
147  float32 deadDetectorDataPercent[NUM_DETECTORS];
148  float32 deadSubframeDataPercent[NUM_HIGH_RESOLUTION_DETECTORS];
149  float32 sectorRotateDataPercent[NUM_DETECTORS];
150  float32 saturatedDataPercent[NUM_DETECTORS];
151  float32 noBGDataPercent[NUM_DETECTORS];
152  float32 moonInSVPTEBDataPercent[NUM_DETECTORS];
153  float32 badDNStarStarRSBDataPercent[NUM_DETECTORS];
154  float32 exceedMaxForScalingPercent[NUM_DETECTORS];
155  float32 NADClosedDataPercent[NUM_DETECTORS];
156  float32 uncalibratedDataPercent[NUM_DETECTORS];
158 
159 
160 PGSt_SMF_status Gran_Meta_Cal (L1A_granule_t *,
161  L1B_granule_t *,
163  QA_Data_t *,
166 
167 PGSt_SMF_status Write_Gran_Metadata
168  (Run_Time_Parameters_t *runtime_params,
169  L1B_Gran_Metadata_t *L1B_Gran_Meta,
170  QA_Data_t *QA,
171  Preprocess_Data_t *PP,
173  L1A_granule_t *L1A_Gran,
174  boolean skip_night_hi_res);
175 
176 #endif
177 
178 
179 
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
PGSt_SMF_status Gran_Meta_Cal(L1A_granule_t *, L1B_granule_t *, Preprocess_Data_t *, QA_Data_t *, L1B_Scan_Metadata_t *, L1B_Gran_Metadata_t *)
Definition: Metadata.c:1203
#define DETECTORS_PER_1KM_BAND
Definition: Granule.h:438
#define SERIAL_NUMBER_SIZE
Definition: Metadata.h:63
const int NUM_BANDS
const int NUM_DETECTORS
@ NUM_L1B_EV_FILES
Definition: Granule.h:590
const int NUM_REFLECTIVE_BANDS
#define NUM_HIGH_RESOLUTION_DETECTORS
Definition: Granule.h:425
#define E_VECTOR_SIZE
Definition: Metadata.h:61
const int NUM_EMISSIVE_BANDS