Go to the documentation of this file.
9 MODFILE *
const l1a_file,
205 #define INVENTORY_METADATA 1
211 #define MAX_STRINGS 6
212 #define META_BUF_SIZE ((MAX_STRINGS-1) * PGSd_PC_UREF_LENGTH_MAX)
215 char shortname[9], *pshort=shortname;
216 PGSt_integer versionid;
218 char doi[64], *pdoi = doi;
221 const char *NRT_infix =
".NRT";
227 } echoed_metadata[] = {
242 #define ACTUAL_META 14
245 #define ARCHIVE_META 16
277 PGSt_MET_all_handles mdHandles;
278 const char* lastattribute=
"";
281 int retval = PGS_S_SUCCESS;
285 char filefunc[] = __FILE__
", GEO_update_L1A_metadata";
287 if(l1a_file ==
NULL) {
292 if(PGS_MET_Init(
l1a_MCFID, mdHandles) != PGS_S_SUCCESS)
298 for(
i=0;
i<(
int)(
sizeof(echoed_metadata)/
sizeof(echoed_metadata[0]));
i++)
300 char datatype[DATATYPELENMAX];
301 float64 metadata_buffer[(
META_BUF_SIZE/
sizeof(float64)) + 1];
306 strncpy(datatype, TXT,
sizeof(datatype));
307 if(getMODISECSinfo(l1a_file, strncmp(echoed_metadata[
i].attribute,
308 lastattribute,
sizeof echoed_metadata[
i].attribute) ?
309 echoed_metadata[
i].attribute :
NULL,
310 echoed_metadata[
i].
object, datatype, &n_elements, metadata_buffer)
313 sprintf(msgbuf,
"getMODISECSinfo(\"%s\",\"%s\",\"%s\")",
314 l1a_file->filename, echoed_metadata[
i].attribute, echoed_metadata[
i].object);
322 if(n_elements!=0 && n_elements !=
META_BUF_SIZE / MODISsizeof(TXT))
333 strncpy((
char*)metadata_buffer,
"Missing value",
334 sizeof(metadata_buffer));
335 n_elements = (long)strlen((
char*)metadata_buffer)+1
L;
338 lastattribute = echoed_metadata[
i].attribute;
343 if(substrMODISECSinfo((
char *)metadata_buffer, n_elements,
344 &n_strings, metadata_strings)!= MAPIOK)
346 sprintf(msgbuf,
"substrMODISECSinfo(\"%s\")",
347 echoed_metadata[
i].
object);
358 if (
i ==
ACTUAL_META && strcmp(metadata_strings[0],
"Near Real Time"))
365 if(PGS_MET_SetAttr(mdHandles[handle],
366 echoed_metadata[
i].
object, metadata_strings) != PGS_S_SUCCESS)
368 sprintf(msgbuf,
"PGS_MET_SetAttr(\"%s\")",
369 echoed_metadata[
i].
object);
379 sprintf(msgbuf,
"getMODISECSinfo(\"%s\",NULL)", l1a_file->filename);
383 if ( retval == PGS_S_SUCCESS)
387 char *p_flag, *
time, *date;
389 if( EPH_metadata !=
NULL)
394 geo_metadata[
i++].data = &equat_crossing;
396 geo_metadata[
i++].data = &orb_num;
398 geo_metadata[
i++].data = &date;
400 geo_metadata[
i++].data = &
time;
404 if( GRing_points !=
NULL)
410 geo_metadata[
i++].data = &p_flag;
411 for (
j = 0;
j < 4;
j++){
422 if ( bounding_coords !=
NULL )
426 geo_metadata[
i++].data = &bound_coord[0];
428 geo_metadata[
i++].data = &bound_coord[1];
430 geo_metadata[
i++].data = &bound_coord[2];
432 geo_metadata[
i++].data = &bound_coord[3];
437 &pshort) != PGS_S_SUCCESS)
439 sprintf(msgbuf,
"PGS_MET_GetSetAttr(\"%s\",\"" SHORTNAME "\")",
446 &versionid) != PGS_S_SUCCESS)
448 sprintf(msgbuf,
"PGS_MET_GetSetAttr(\"%s\",\"" VERSIONID "\")",
454 sprintf(doi,
"10.5067/MODIS/%s%s.%03ld",
455 shortname, NRT_infix, (
long)versionid);
460 "\", \"" TXT
", %d, \"%s\")",
461 l1a_file->filename, (
int)strlen(doi), doi);
477 for(
i=0;
i<(
int)(
sizeof(geo_metadata)/
sizeof(geo_metadata[0]));
i++)
486 PGS_MET_SetAttr(mdHandles[handle],
487 geo_metadata[
i].
object, geo_metadata[
i].
data)
490 sprintf(msgbuf,
"PGS_MET_SetAttr(\"%s\")",
491 geo_metadata[
i].
object);
499 (PGSt_integer)l1a_file->sd_id) != PGS_S_SUCCESS)
506 (PGSt_integer)l1a_file->sd_id) != PGS_S_SUCCESS)
508 modsmf(
MODIS_E_GEO,
"PGS_MET_Write(\"" MECS_ARCHIVE
"\")", filefunc);
#define GRINGPOINTSEQUENCENO
#define GRINGPOINTLONGITUDE
real(single), dimension(:,:), allocatable longitude
#define MODIS_E_BAD_INPUT_ARG
#define ADDITIONALATTRIBUTENAME
real(single), dimension(:,:), allocatable latitude
#define PRODUCTIONDATETIME
#define IDENTIFIERPRODDOI
#define EQUATORCROSSINGLONGITUDE
#define IDENTIFIERPRODDOIAUTH
#define NORTHBOUNDINGCOORDINATE
#define GRINGPOINTLATITUDE
#define EASTBOUNDINGCOORDINATE
#define RANGEBEGINNINGDATE
#define REPROCESSINGACTUAL
#define RANGEBEGINNINGTIME
#define MODIS_W_MISSING_OUTPUT
#define EXCLUSIONGRINGFLAG
#define EQUATORCROSSINGDATE
integer, parameter double
#define WESTBOUNDINGCOORDINATE
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude data
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 offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned resolving bug report Corrected to filter out Aqua attitude records with missing status helping resolve bug MOD_PR03 will still correctly write scan and pixel data that does not depend upon the start time
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second and prod_ix set to PARAM_TYPE_INT name_prefix is compared with the beginning of the product name If name_suffix is not empty the it must match the end of the product name The characters right after the prefix are read as an integer and prod_ix is set to that number strncpy(l2prod->name_prefix, "myprod", UNITLEN)
#define EQUATORCROSSINGTIME
#define REPROCESSINGPLANNED
#define PROCESSINGENVIRONMENT
#define SOUTHBOUNDINGCOORDINATE