OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
MD_metadata.h
Go to the documentation of this file.
1 #ifndef MD_metadata_H
2 #define MD_metadata_H
3 
4 #include "PGS_PC.h"
5 /*
6 !C-INC************************************************************************
7 
8 !Description: This header file contains the metadata definitions and
9  structures for the ECS Granule Inventory Metadata (section 1.1.1
10  of the MODIS Level 1A Data Product Format), MODIS Level 1A
11  Specific Granule Metadata (section 1.2 of the MODIS Level 1A
12  Data Product Format), and Scan Level Metadata (section 2 of the
13  MODIS Level 1A Data Product Format).
14 
15 !Input Parameters:
16  N/A
17 
18 !Output Parameters:
19  N/A
20 
21 Externally Defined:
22  int16 (hdfi.h)
23  int32 (hdfi.h)
24  PGSd_PC_VALUE_LENGTH_MAX (PGS_PC.h)
25 
26 !Revision History:
27  $Log: MD_metadata.h,v $
28  Revision 5.1 2004/09/30 18:54:46 seaton
29  Updated to run Collection 5 L1A code.
30  seaton@saicmodis.com
31 
32  Revision 4.2 2003/01/07 21:14:25 vlin
33  MD_ECS_GRA_INV_MET_t struct field name "operation_mode" removed
34 
35  Revision 4.1 2002/10/30 14:31:16 vlin
36  Added some fields to structure name "MD_ECS_GRA_INV_MET_t.
37  vlin@saicmodis.com
38 
39  Revision 2.1 1998/10/07 13:00 EDT
40  John Seaton/SAIC/GSC (seaton@ltpmail.gsfc.nasa.gov)
41  Modified #defines to reference mapiL1A.h #defines
42 
43  Revision 2.0 1997/07/15 16:32
44  Qi Huang/RDC (qhuang@ltpmail.gsfc.nasa.gov)
45  Copied, modified, and renamed from modis_IO.h
46 
47  Revision 1.0 1996/09/24 14:45 EDT
48  Keith Degnan/SAIC/GSC (keith.degnan@gsfc.nasa.gov)
49  Created the PDL for module
50 
51 !Team-unique Header:
52 
53  This software is developed by the MODIS Science Data Support Team
54  for the National Aeronautics and Space Administration,
55  Goddard Space Flight Center, under contract NAS5-32373.
56 
57 References and Credits:
58 
59 Design Notes:
60  The ".h" file below was specifically written for development
61  in C. Any other language choice may require reworking of the
62  ".h" file before coding can begin.
63 
64 !END
65 **************************************************************************/
66 
67 #include "hdfi.h"
68 #include "mapiL1A.h"
69 
70 #define MD_TIMECODEALEN 28
71 #define MD_TIMECODEADATELEN 11
72 #define MD_TIMECODEATIMELEN 16
73 #define MD_ADDIATTRNAMELEN 20
74 #define MD_NUM_POINTERS 3
75 #define MD_POINTER_NAME_L 50
76 
77 
78 #define MD_NUM_SCANS_TXT M01NUMBER_OF_SCANS
79 #define MD_NUM_DAY_SCANS_TXT M01NUMBER_DAY_SCANS
80 #define MD_NUM_NIGHT_SCANS_TXT M01NUMBER_NIGHT_SCANS
81 #define MD_MAX_TOTAL_FRAMES_TXT M01MAX_TOTAL_FRAMES
82 #define MD_MAX_EARTH_FRAMES_TXT M01MAX_EARTH_FRAMES
83 #define MD_MAX_SD_FRAMES_TXT M01MAX_SD_FRAMES
84 #define MD_MAX_SRCA_FRAMES_TXT M01MAX_SRCA_FRAMES
85 #define MD_MAX_BB_FRAMES_TXT M01MAX_BB_FRAMES
86 #define MD_MAX_SV_FRAMES_TXT M01MAX_SV_FRAMES
87 #define MD_SCAN_TYPES_TXT M01SCAN_TYPES
88 #define MD_INCOMPLETE_SCANS_TXT M01INCOMPL_SCANS
89 #define MD_MISSING_PKTS_TXT M01MISSING_PACKETS
90 #define MD_BAD_CRC_PKTS_TXT M01PACKTS_BAD_CRC
91 #define MD_DISCARDED_PKTS_TXT M01DISCARD_PACKETS
92 
93 #define MECS_PRODHISTORY "PRODUCTIONHISTORY"
94 #define MD_PROCESSVERSION "PROCESSVERSION"
95 #define MD_OTHER_STRING "Other"
96 #define MD_MIXED_SCAN "Mixed"
97 #define MD_DAY_SCAN "Day"
98 #define MD_NIGHT_SCAN "Night"
99 #define MD_BOTH "Both"
100 #define MD_NA "NA"
101 #define MD_MODIS_BOTH "MODIS_Both"
102 #define MD_MODIS_DAY "MODIS_Day"
103 #define MD_MODIS_NIGHT "MODIS_Night"
104 #define MD_GRANULENUMBER "GRANULENUMBER"
105 #define MD_MIDNIGHT "T00:00:00.000000Z"
106 #define MD_NOT_PROCESSED "processed once"
107 #define EASTBOUNDINGCOORDNIATE "EastBoundingCoordinate"
108 #define WESTBOUNDINGCOORDNIATE "WestBoundingCoordinate"
109 #define SOUTHBOUNDINGCOORDNIATE "SouthBoundingCoordinate"
110 #define NORTHBOUNDINGCOORDNIATE "NorthBoundingCoordinate"
111 #define EASTBOUNDVALUE -180.
112 #define WESTBOUNDVALUE 180.
113 #define SOUTHBOUNDVALUE 90.
114 #define NORTHBOUNDVALUE -90.
115 
116 
117 
118 #define MD_NUM_FRAME_COUNT_ARRAY 6
119 #define MD_NUM_CCSDS_APIDS 3
120 
121 
122 /**************************************************************************/
123 /* The following are the default values. */
124 /**************************************************************************/
125 
126 #define MD_MAX_MISSING_PKTS_IN_SCAN 3032
127 #define MD_NO_VALID_DATA_IN_SCAN 0
128 #define MD_SOME_VALID_DATA_IN_SCAN 1
129 
130 
131 /**************************************************************************/
132 /* The following are the indexes to the Frame count array. */
133 /**************************************************************************/
134 #define MD_TOTAL_FRAMES_IN_SCAN 0
135 #define MD_EV_FRAMES_IN_SCAN 1
136 #define MD_SD_FRAMES_IN_SCAN 2
137 #define MD_SRCA_FRAMES_IN_SCAN 3
138 #define MD_BB_FRAMES_IN_SCAN 4
139 #define MD_SV_FRAMES_IN_SCAN 5
140 
141 
142 /**************************************************************************/
143 /* The following are the indexes to the Scan quality array. */
144 /**************************************************************************/
145 
146 #define MD_SCAN_DATA_PRESENCE 0
147 #define MD_MISSING_PACKET 1
148 #define MD_BAD_CHECKSUM_PACKET 2
149 #define MD_DISCARDED_PACKET 3
150 
151 
153 
154 /**************************************************************************/
155 /* The following structure defines the ECS Granule Inventory Metadata */
156 /* (section 1.1.1 of the MODIS Level 1A Data Product Format) */
157 /**************************************************************************/
158 
159 typedef struct
160 {
161  char *pgeversion;
162  char rangebeginningdate[MD_TIMECODEADATELEN];
163  char rangebeginningtime[MD_TIMECODEATIMELEN];
164  char rangeendingdate[MD_TIMECODEADATELEN];
165  char rangeendingtime[MD_TIMECODEATIMELEN];
166  char day_night_flag[6];
171  char exclusiongringflag_1[2];
172  double gringpointlatitude_1[4];
173  double gringpointlongitude_1[4];
174  int gringpointsequenceno_1[4];
177  char parametervalue_1[5];
183  char productionhistory[16];
185 
186 
187 /**************************************************************************/
188 /* The following structure defines the MODIS Level 1A Specific Granule */
189 /* Metadata (section 1.1.1 of the MODIS Level 1A Data Product Format) */
190 /**************************************************************************/
191 
192 typedef struct
193 {
194  int32 num_scans;
203  char scan_types_product[10];
209 
210 
211 /**************************************************************************/
212 /* The following structure defines the Scan Level Metadata (section */
213 /* 1.1.1 of the MODIS Level 1A Data Product Format) */
214 /**************************************************************************/
215 
216 typedef struct
217 {
219  int16 frame_count_array[6];
220  char scan_type[10];
221  float64 sd_start_time;
223  float64 bb_start_time;
224  float64 sv_start_time;
225  float64 ev_start_time;
228  int16 ccsds_apids[3];
231  int32 scan_qual_array[4];
232 } MD_SCAN_MET_t;
233 
234 #endif /* MD_metadata_H */
integer, parameter int16
Definition: cubeio.f90:3
int16 srca_cal_mode
Definition: MD_metadata.h:226
int16 packet_expedited_data_flag
Definition: MD_metadata.h:229
char MD_INPUT_POINTER[MD_NUM_POINTERS][MD_POINTER_NAME_L]
Definition: MD_metadata.h:152
#define MD_TIMECODEADATELEN
Definition: MD_metadata.h:71
#define MD_POINTER_NAME_L
Definition: MD_metadata.h:75
double equatorcrossinglongitude_1
Definition: MD_metadata.h:168
float64 bb_start_time
Definition: MD_metadata.h:223
int16 mirror_side
Definition: MD_metadata.h:230
float64 sv_start_time
Definition: MD_metadata.h:224
char * additionalattributename_1
Definition: MD_metadata.h:175
#define MD_NUM_POINTERS
Definition: MD_metadata.h:74
float64 ev_start_time
Definition: MD_metadata.h:225
char * equatorcrossingtime_1
Definition: MD_metadata.h:170
#define MD_TIMECODEATIMELEN
Definition: MD_metadata.h:72
float64 sd_start_time
Definition: MD_metadata.h:221
float64 srca_start_time
Definition: MD_metadata.h:222
char * equatorcrossingdate_1
Definition: MD_metadata.h:169
char * processingenvironment
Definition: MD_metadata.h:181
char * additionalattributename_2
Definition: MD_metadata.h:176
int16 packet_scan_count
Definition: MD_metadata.h:227