OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
L1B_Tables.c File Reference
#include "L1B_Tables.h"
#include "HDF_Lib.h"
#include "PGS_PC.h"
#include "PGS_Error_Codes.h"
#include "FNames.h"
#include <math.h>
#include <stdlib.h>
Include dependency graph for L1B_Tables.c:

Go to the source code of this file.

Macros

#define ASSIGN_DATA_PTR(luts, lutname, dataptr)
 
#define TDLUT_STEPFUNCTION_MAX_TIMES   1000
 
#define TDLUT_PIECEWISE_LINEAR_MAX_TIMES   1000
 
#define INSERT_LUT_VALUES
 

Functions

PGSt_SMF_status Read_Lookup_Tables (L1A_granule_t *L1A_Gran, lookup_tables_t *tables, Run_Time_Parameters_t *runtime_params)
 
PGSt_SMF_status Read_Refl_Tables (L1A_granule_t *L1A_Gran, refl_tables_t *tables)
 
PGSt_SMF_status Read_Emiss_Tables (L1A_granule_t *L1A_Gran, emiss_tables_t *tables)
 
PGSt_SMF_status Read_QA_Tables (L1A_granule_t *L1A_Gran, QA_tables_t *QA_tables)
 
PGSt_SMF_status Read_L1B_SDS_LUT (int32 sd_id, char *name, int32 data_type, int32 rank, int32 *dims, float64 data_collection_TAI_time, void *data)
 
int32 TDLUT_GetAlgorithm (int32 sd_id, char *name)
 
PGSt_SMF_status TDLUT_ReadStepFunction (int32 sd_id, char *name, int32 data_type, int32 rank, int32 *dims, float64 data_collection_TAI_time, void *data)
 
PGSt_SMF_status TDLUT_ReadPiecewiseLinearFunction (int32 sd_id, char *name, int32 data_type, int32 rank, int32 *dims, float64 data_collection_TAI_time, void *data)
 
PGSt_SMF_status Expand_BDSM_LUT (void *data, void **data_new, int32 data_type, int32 lead_dim, int32 *n_bytes)
 
int32 BDSM_index (char *ascii_file)
 

Variables

int16 RFLAG
 
LUT_Definition_t refl_luts []
 
LUT_Definition_t emiss_luts []
 
LUT_Definition_t qa_luts []
 

Macro Definition Documentation

◆ ASSIGN_DATA_PTR

#define ASSIGN_DATA_PTR (   luts,
  lutname,
  dataptr 
)
Value:
i = 0; \
while (luts[i].name) \
{ \
if (!strcmp(lutname,luts[i].name)) \
break; \
i++; \
} \
if (!luts[i].name) \
{ \
char errmsg[512]; \
sprintf(errmsg, "LUT name %s not found in LUTs array.", lutname); \
returnStatus = MODIS_F_NOK; \
L1BErrorMsg(location, returnStatus, errmsg, NULL, \
lun, "*** CODE BUG ***", True); \
return returnStatus; \
} \
luts[i].data = (VOIDP) dataptr;

Definition at line 211 of file L1B_Tables.c.

◆ INSERT_LUT_VALUES

#define INSERT_LUT_VALUES

◆ TDLUT_PIECEWISE_LINEAR_MAX_TIMES

#define TDLUT_PIECEWISE_LINEAR_MAX_TIMES   1000

◆ TDLUT_STEPFUNCTION_MAX_TIMES

#define TDLUT_STEPFUNCTION_MAX_TIMES   1000

Function Documentation

◆ BDSM_index()

int32 BDSM_index ( char *  ascii_file)

Definition at line 3865 of file L1B_Tables.c.

◆ Expand_BDSM_LUT()

PGSt_SMF_status Expand_BDSM_LUT ( void *  data,
void **  data_new,
int32  data_type,
int32  lead_dim,
int32 *  n_bytes 
)

Definition at line 3656 of file L1B_Tables.c.

◆ Read_Emiss_Tables()

PGSt_SMF_status Read_Emiss_Tables ( L1A_granule_t L1A_Gran,
emiss_tables_t tables 
)

Definition at line 668 of file L1B_Tables.c.

◆ Read_L1B_SDS_LUT()

PGSt_SMF_status Read_L1B_SDS_LUT ( int32  sd_id,
char *  name,
int32  data_type,
int32  rank,
int32 *  dims,
float64  data_collection_TAI_time,
void *  data 
)

Definition at line 2646 of file L1B_Tables.c.

◆ Read_Lookup_Tables()

PGSt_SMF_status Read_Lookup_Tables ( L1A_granule_t L1A_Gran,
lookup_tables_t tables,
Run_Time_Parameters_t runtime_params 
)

Definition at line 31 of file L1B_Tables.c.

◆ Read_QA_Tables()

PGSt_SMF_status Read_QA_Tables ( L1A_granule_t L1A_Gran,
QA_tables_t QA_tables 
)

Definition at line 1116 of file L1B_Tables.c.

◆ Read_Refl_Tables()

PGSt_SMF_status Read_Refl_Tables ( L1A_granule_t L1A_Gran,
refl_tables_t tables 
)

Definition at line 231 of file L1B_Tables.c.

◆ TDLUT_GetAlgorithm()

int32 TDLUT_GetAlgorithm ( int32  sd_id,
char *  name 
)

Definition at line 2766 of file L1B_Tables.c.

◆ TDLUT_ReadPiecewiseLinearFunction()

PGSt_SMF_status TDLUT_ReadPiecewiseLinearFunction ( int32  sd_id,
char *  name,
int32  data_type,
int32  rank,
int32 *  dims,
float64  data_collection_TAI_time,
void *  data 
)

Definition at line 3236 of file L1B_Tables.c.

◆ TDLUT_ReadStepFunction()

PGSt_SMF_status TDLUT_ReadStepFunction ( int32  sd_id,
char *  name,
int32  data_type,
int32  rank,
int32 *  dims,
float64  data_collection_TAI_time,
void *  data 
)

Definition at line 2940 of file L1B_Tables.c.

Variable Documentation

◆ emiss_luts

LUT_Definition_t emiss_luts[]

Definition at line 2084 of file L1B_Tables.c.

◆ qa_luts

LUT_Definition_t qa_luts[]

Definition at line 2475 of file L1B_Tables.c.

◆ refl_luts

LUT_Definition_t refl_luts[]

Definition at line 1779 of file L1B_Tables.c.

◆ RFLAG

int16 RFLAG

Definition at line 75 of file Granule.c.

#define NULL
Definition: decode_rs.h:63
#define MODIS_F_NOK
#define True
Definition: Granule.h:537
int i
Definition: decode_rs.h:71