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