OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Metadata.c File Reference
#include "MetadataP.h"
#include "Preprocess.h"
#include "L1B_Tables.h"
#include "PGS_TD.h"
#include "HDF_Lib.h"
#include "FNames.h"
#include "PGS_Error_Codes.h"
#include <time.h>
#include <libgen.h>
#include "granule_extract_metadata.h"
Include dependency graph for Metadata.c:

Go to the source code of this file.

Macros

#define TIMECODEASIZE   28
 
#define MECS_CORE   "CoreMetadata.0"
 
#define MECS_ARCH   "ArchiveMetadata.0"
 
#define CALIBRATIONQUALITY_MACRO   "marginal"
 
#define NADIRPOINTING_MACRO   "Y"
 
#define ALGORITHMPACKAGENAME_MACRO   "MODIS Level 1B Algorithm Package"
 
#define AUTOMATICQUALITYFLAG_MACRO   "Suspect"
 
#define AUTOMATICQUALITYFLAGEXPLANATION_MACRO   "not being investigated"
 
#define ANCILLARYINPUTTYPE_MACRO   "Geolocation"
 
#define INSTRUMENTNAME_MACRO   "Moderate Resolution Imaging SpectroRadiometer"
 

Functions

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)
 
void get_attr (char *field, void *value)
 
void get_string_attr (char *field, char *value)
 
void set_attr (char *field, void *value)
 
void set_string_attr (char *field, char *value)
 
void set_ptrstring_attr (char *field, char **value)
 
void copy_attr (char *field, void *value)
 
void copy_string_attr (char *field, char *value)
 
PGSt_SMF_status Gran_Meta_Cal (L1A_granule_t *L1A_Gran, L1B_granule_t *L1B_Gran, Preprocess_Data_t *PP, QA_Data_t *QA, L1B_Scan_Metadata_t *L1B_Scan_Meta, L1B_Gran_Metadata_t *L1B_Gran_Meta)
 
PGSt_SMF_status Write_Global_Metadata (L1B_Gran_Metadata_t *L1B_Gran_Meta, QA_Data_t *QA, lookup_tables_t *tables, int32 OBC_sd_id, boolean skip_night_hi_res)
 
PGSt_SMF_status Get_Electronics_Status (int32 v_id, int32 num_scans, char *vname, char *fname, int16 *final_value, int16 *is_changed, boolean *no_valid_value)
 
PGSt_SMF_status Get_Elec_Config_Status_Per_Gran (int32 v_id, int32 num_scans, uint32 *Elec_config_status, uint32 *Elec_config_change, uint32 *Elec_config_invalid_flag)
 
PGSt_SMF_status Get_Elec_Config_Status (QA_Common_t *QA_common, int32 v_id, int32 num_scans, uint32 *Elec_config_status, uint32 *Elec_config_change)
 

Variables

pgs_meta_t pgs_in
 
char * pgs_out_mdHandle
 

Macro Definition Documentation

◆ ALGORITHMPACKAGENAME_MACRO

#define ALGORITHMPACKAGENAME_MACRO   "MODIS Level 1B Algorithm Package"

Definition at line 66 of file Metadata.c.

◆ ANCILLARYINPUTTYPE_MACRO

#define ANCILLARYINPUTTYPE_MACRO   "Geolocation"

Definition at line 69 of file Metadata.c.

◆ AUTOMATICQUALITYFLAG_MACRO

#define AUTOMATICQUALITYFLAG_MACRO   "Suspect"

Definition at line 67 of file Metadata.c.

◆ AUTOMATICQUALITYFLAGEXPLANATION_MACRO

#define AUTOMATICQUALITYFLAGEXPLANATION_MACRO   "not being investigated"

Definition at line 68 of file Metadata.c.

◆ CALIBRATIONQUALITY_MACRO

#define CALIBRATIONQUALITY_MACRO   "marginal"

Definition at line 64 of file Metadata.c.

◆ INSTRUMENTNAME_MACRO

#define INSTRUMENTNAME_MACRO   "Moderate Resolution Imaging SpectroRadiometer"

Definition at line 70 of file Metadata.c.

◆ MECS_ARCH

#define MECS_ARCH   "ArchiveMetadata.0"

Definition at line 62 of file Metadata.c.

◆ MECS_CORE

#define MECS_CORE   "CoreMetadata.0"

Definition at line 61 of file Metadata.c.

◆ NADIRPOINTING_MACRO

#define NADIRPOINTING_MACRO   "Y"

Definition at line 65 of file Metadata.c.

◆ TIMECODEASIZE

#define TIMECODEASIZE   28

Definition at line 60 of file Metadata.c.

Function Documentation

◆ copy_attr()

void copy_attr ( char *  field,
void *  value 
)

Definition at line 1099 of file Metadata.c.

◆ copy_string_attr()

void copy_string_attr ( char *  field,
char *  value 
)

Definition at line 1140 of file Metadata.c.

◆ get_attr()

void get_attr ( char *  field,
void *  value 
)

Definition at line 828 of file Metadata.c.

◆ Get_Elec_Config_Status()

PGSt_SMF_status Get_Elec_Config_Status ( QA_Common_t QA_common,
int32  v_id,
int32  num_scans,
uint32 *  Elec_config_status,
uint32 *  Elec_config_change 
)

Definition at line 2901 of file Metadata.c.

◆ Get_Elec_Config_Status_Per_Gran()

PGSt_SMF_status Get_Elec_Config_Status_Per_Gran ( int32  v_id,
int32  num_scans,
uint32 *  Elec_config_status,
uint32 *  Elec_config_change,
uint32 *  Elec_config_invalid_flag 
)

Definition at line 2679 of file Metadata.c.

◆ Get_Electronics_Status()

PGSt_SMF_status Get_Electronics_Status ( int32  v_id,
int32  num_scans,
char *  vname,
char *  fname,
int16 *  final_value,
int16 *  is_changed,
boolean no_valid_value 
)

Definition at line 2529 of file Metadata.c.

◆ get_string_attr()

void get_string_attr ( char *  field,
char *  value 
)

Definition at line 884 of file Metadata.c.

◆ Gran_Meta_Cal()

PGSt_SMF_status Gran_Meta_Cal ( L1A_granule_t L1A_Gran,
L1B_granule_t L1B_Gran,
Preprocess_Data_t PP,
QA_Data_t QA,
L1B_Scan_Metadata_t L1B_Scan_Meta,
L1B_Gran_Metadata_t L1B_Gran_Meta 
)

Definition at line 1181 of file Metadata.c.

◆ set_attr()

void set_attr ( char *  field,
void *  value 
)

Definition at line 940 of file Metadata.c.

◆ set_ptrstring_attr()

void set_ptrstring_attr ( char *  field,
char **  value 
)

Definition at line 1047 of file Metadata.c.

◆ set_string_attr()

void set_string_attr ( char *  field,
char *  value 
)

Definition at line 992 of file Metadata.c.

◆ Write_Global_Metadata()

PGSt_SMF_status Write_Global_Metadata ( L1B_Gran_Metadata_t L1B_Gran_Meta,
QA_Data_t QA,
lookup_tables_t tables,
int32  OBC_sd_id,
boolean  skip_night_hi_res 
)

Definition at line 1827 of file Metadata.c.

◆ Write_Gran_Metadata()

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 at line 76 of file Metadata.c.

Variable Documentation

◆ pgs_in

pgs_meta_t pgs_in

Definition at line 72 of file Metadata.c.

◆ pgs_out_mdHandle

char* pgs_out_mdHandle

Definition at line 73 of file Metadata.c.