ocssw  1.0
Defines | Functions | Variables
/disk01/web/ocssw/build/src/l1bgen_modist/Granule.c File Reference

(r8085/r6631)

#include "L1B_Tables.h"
#include "GranuleP.h"
#include "HDF_Lib.h"
#include "PGS_PC.h"
#include "PGS_TD.h"
#include "PGS_MET.h"
#include "PGS_Error_Codes.h"
#include "FNames.h"
#include <string.h>
#include <math.h>
#include <time.h>

Go to the source code of this file.

Defines

#define NUM_SCALE_FACTORS   2
#define MAX_AGGR_FRAMES   7
#define ASCTIMEBUF   26
#define WRITE_MSG(c, m)
#define WRITE_EV_Aggr_SDS(SI_id, SI, UI_id, UI, SU_id, SU)
#define MAX_BANDS_PER_FDD_SET   16

Functions

PGSt_SMF_status Aggregate_L1B (L1B_Scan_t *L1B_Scan)
PGSt_SMF_status Close_L1A_Granule (L1A_granule_t *L1A_Gran, L1A_Scan_t *L1A_Scan)
PGSt_SMF_status Close_L1B_Granule (L1B_granule_t *L1B_Gran, L1B_Scan_t *L1B_Scan, boolean skip_night_hi_res)
PGSt_SMF_status Compute_Aggregates (int16 scale, int16 line_dim_lower, int16 frame_dim_lower, uint16 *SI_in, uint8 *UI_in, uint16 *SI_out, uint8 *UI_out, int8 *SU_out)
PGSt_SMF_status Read_L1A_EV_Scan (int16 S, L1A_granule_t *L1A_Gran, L1A_Scan_t *L1A_Scan)
int safe_strcat (char *buf, char *str, int buflen)
void L1BErrorMsg (char *L1B_location, PGSt_SMF_code code, char *input_message, char *assoc_function, int32 lun, char *other_msg, boolean error_out)
void SMF_ERROR (PGSt_SMF_code code, char *messagestring)
void Bad_L1A_Error_Out (char *name, char *message)
PGSt_SMF_status Write_L1B_EV_Scan (int16 S, L1B_granule_t *L1B_Gran, L1B_Scan_t *L1B_Scan, boolean isdaymode)
PGSt_SMF_status Write_L1B_SI_UI (int16 S, L1B_Scan_t *L1B_Scan, int16 R)
PGSt_SMF_status Fill_Dead_Detector_SI (boolean isdaymode, int8 *dead_detector, L1B_Scan_t *L1B_Scan, L1B_granule_t *L1B_Gran, QA_Common_t *QA_Common)
PGSt_SMF_status Open_and_Read_L1A (Run_Time_Parameters_t *runtime_params, L1A_granule_t *L1A_Gran, boolean *skip_night_hi_res)
PGSt_SMF_status Get_Satellite_ID (PGSt_PC_Logical lun, int32 *satellite_ID)
PGSt_SMF_status Read_Run_Time_Parameters (Run_Time_Parameters_t *runtime_params)

Variables

int32 MOD_PR02_Failure_Exit_Code = 1
int16 L1B_BANDS_AT_RES [NUM_L1A_RESOLUTIONS]
int16 L1A_BANDS_AT_RES [NUM_L1A_RESOLUTIONS]
int16 DETECT_PER_BAND_AT_RES [NUM_L1A_RESOLUTIONS]
int16 BAND_RATIO_AT_RES [NUM_L1A_RESOLUTIONS] = {4,2,1,1}
int16 RFLAG
int16 RSCL_FLAG
char Invalid_MOD01_Msg []

Define Documentation

#define ASCTIMEBUF   26
#define MAX_AGGR_FRAMES   7
#define MAX_BANDS_PER_FDD_SET   16
#define NUM_SCALE_FACTORS   2
#define WRITE_EV_Aggr_SDS (   SI_id,
  SI,
  UI_id,
  UI,
  SU_id,
  SU 
)
Value:
if(SDwritedata(SI_id,start,NULL,edge,SI) == FAIL)         \
      return(MODIS_F_WRITE_ERROR);                                              \
    if(SDwritedata(UI_id,start,NULL,edge,UI) == FAIL)         \
      return(MODIS_F_WRITE_ERROR);                                              \
    if(SDwritedata(SU_id,start,NULL,edge,SU) == FAIL)         \
      return(MODIS_F_WRITE_ERROR)
#define WRITE_MSG (   c,
 
)
Value:
if (strlen(m) > (PGS_SMF_MAX_MSGBUF_SIZE - 1)) {   \
    m[strlen(m)-1] = '\0';                           \
  }                                                  \
  returnStatus = PGS_SMF_SetDynamicMsg(c, m, NULL);  \
  if (returnStatus != PGS_S_SUCCESS)                 \
    internal_failure = PGS_TRUE;                     \
  returnStatus = PGS_SMF_GenerateStatusReport(m);    \
  if (returnStatus != PGS_S_SUCCESS)                 \
    internal_failure = PGS_TRUE;

Function Documentation

PGSt_SMF_status Aggregate_L1B ( L1B_Scan_t L1B_Scan)

Definition at line 77 of file Granule.c.

void Bad_L1A_Error_Out ( char *  name,
char *  message 
)

Definition at line 1612 of file Granule.c.

PGSt_SMF_status Close_L1A_Granule ( L1A_granule_t L1A_Gran,
L1A_Scan_t L1A_Scan 
)

Definition at line 191 of file Granule.c.

PGSt_SMF_status Close_L1B_Granule ( L1B_granule_t L1B_Gran,
L1B_Scan_t L1B_Scan,
boolean  skip_night_hi_res 
)

Definition at line 267 of file Granule.c.

PGSt_SMF_status Compute_Aggregates ( int16  scale,
int16  line_dim_lower,
int16  frame_dim_lower,
uint16 *  SI_in,
uint8 *  UI_in,
uint16 *  SI_out,
uint8 *  UI_out,
int8 *  SU_out 
)

Definition at line 412 of file Granule.c.

PGSt_SMF_status Fill_Dead_Detector_SI ( boolean  isdaymode,
int8 *  dead_detector,
L1B_Scan_t L1B_Scan,
L1B_granule_t L1B_Gran,
QA_Common_t QA_Common 
)

Definition at line 1915 of file Granule.c.

PGSt_SMF_status Get_Satellite_ID ( PGSt_PC_Logical  lun,
int32 *  satellite_ID 
)

Definition at line 2949 of file Granule.c.

void L1BErrorMsg ( char *  L1B_location,
PGSt_SMF_code  code,
char *  input_message,
char *  assoc_function,
int32  lun,
char *  other_msg,
boolean  error_out 
)

Definition at line 918 of file Granule.c.

PGSt_SMF_status Open_and_Read_L1A ( Run_Time_Parameters_t runtime_params,
L1A_granule_t L1A_Gran,
boolean skip_night_hi_res 
)

Definition at line 2446 of file Granule.c.

PGSt_SMF_status Read_L1A_EV_Scan ( int16  S,
L1A_granule_t L1A_Gran,
L1A_Scan_t L1A_Scan 
)

Definition at line 670 of file Granule.c.

PGSt_SMF_status Read_Run_Time_Parameters ( Run_Time_Parameters_t runtime_params)

Definition at line 3014 of file Granule.c.

int safe_strcat ( char *  buf,
char *  str,
int  buflen 
)

Definition at line 834 of file Granule.c.

void SMF_ERROR ( PGSt_SMF_code  code,
char *  messagestring 
)

Definition at line 1341 of file Granule.c.

PGSt_SMF_status Write_L1B_EV_Scan ( int16  S,
L1B_granule_t L1B_Gran,
L1B_Scan_t L1B_Scan,
boolean  isdaymode 
)

Definition at line 1669 of file Granule.c.

PGSt_SMF_status Write_L1B_SI_UI ( int16  S,
L1B_Scan_t L1B_Scan,
int16  R 
)

Definition at line 1828 of file Granule.c.


Variable Documentation

char* actions

Definition at line 1232 of file Granule.c.

Definition at line 72 of file Granule.c.

Initial value:

Definition at line 67 of file Granule.c.

Initial value:
"\
The MOD01 granule appears to be invalid.  Data values are present\n\
that are not allowed by the MOD01 file specifications."

Definition at line 913 of file Granule.c.

Initial value:

Definition at line 62 of file Granule.c.

Initial value:

Definition at line 57 of file Granule.c.

Definition at line 51 of file Granule.c.

char* name

Definition at line 1230 of file Granule.c.

int16 RFLAG

Definition at line 74 of file Granule.c.

int16 RSCL_FLAG

Definition at line 75 of file Granule.c.

int32 value

Definition at line 1231 of file Granule.c.