OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Granule.h File Reference
#include "PGS_SMF.h"
#include "hdf.h"
#include "mfhdf.h"
#include "HdfEosDef.h"
Include dependency graph for Granule.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Run_Time_Parameters_t
 
struct  L1A_granule_t
 
struct  L1A_Scan_t
 
struct  L1B_ScaleOffset_t
 
struct  RSB_Cal_Coeff_t
 
struct  Emiss_Cal_Coeff_t
 
struct  L1B_granule_t
 
struct  L1B_Scan_SI_t
 
struct  L1B_Scan_UI_t
 
struct  Band_26_t
 
struct  L1B_Scan_t
 
struct  QA_Emiss_t
 
struct  QA_Refl_t
 
struct  QA_Common_t
 
struct  QA_Data_t
 

Macros

#define MAX_NC_NAME   H4_MAX_NC_NAME
 
#define MAX_VAR_DIMS   H4_MAX_VAR_DIMS
 
#define NUM_SCANS_DIM_NAME   "nscans"
 
#define MAX_NUM_SCANS   1000
 
#define NUM_BANDS   38
 
#define NUM_DETECTORS   490
 
#define NUM_HIGH_RESOLUTION_DETECTORS   180
 
#define NUM_HIGH_RESOLUTION_SUBFRAMES   520
 
#define NUM_REFLECTIVE_DETECTORS   330
 
#define NUM_EMISSIVE_DETECTORS   160
 
#define NUM_MIRROR_SIDES   2
 
#define NUM_250M_BANDS   2
 
#define NUM_500M_BANDS   5
 
#define NUM_1000M_REFL_BANDS   15
 
#define NUM_REFLECTIVE_BANDS   22
 
#define NUM_1000M_EMISS_BANDS   16
 
#define NUM_EMISSIVE_BANDS   16
 
#define NUM_1000M_DAY_BANDS   14
 
#define NUM_1000M_NIGHT_BANDS   17
 
#define DETECTORS_PER_1KM_BAND   10
 
#define DETECTORS_PER_500M_BAND   20
 
#define DETECTORS_PER_250M_BAND   40
 
#define NUM_1KM_SUBSAMP   1
 
#define NUM_500M_SUBSAMP   2
 
#define NUM_250M_SUBSAMP   4
 
#define NUM_REFL_INDICES   1340
 
#define MODIS_BAND5_INDEX   4
 
#define MODIS_BAND26_INDEX   27
 
#define MODIS_BAND26_INDEX_AT_RES   6
 
#define MODIS_BAND20_INDEX   21
 
#define L1B_1KM_EMISS_BAND28_INDEX   7 /* emissive band group */
 
#define MAX_250M_TRACK_DIM   MAX_NUM_SCANS*DETECTORS_PER_250M_BAND /* 8320 */ /* 208 * 40 */
 
#define MAX_500M_TRACK_DIM   MAX_NUM_SCANS*DETECTORS_PER_500M_BAND /* 4160 */
 
#define MAX_1KM_TRACK_DIM   MAX_NUM_SCANS*DETECTORS_PER_1KM_BAND /* 2080 */
 
#define MAX_SWIR_TRACK_DIM   MAX_NUM_SCANS*DETECTORS_PER_500M_BAND /* 4160 */
 
#define MAX_250M_OBC_FRAME_DIM   200 /* 50 * 4 */
 
#define MAX_500M_OBC_FRAME_DIM   100 /* 50 * 2 */
 
#define MAX_1KM_OBC_FRAME_DIM   50
 
#define SRCA_250M_FRAME_DIM   40 /* 10 * 4 */
 
#define SRCA_500M_FRAME_DIM   20
 
#define SRCA_1KM_FRAME_DIM   10
 
#define SD_1km_FRAMES   50
 
#define SRCA_1km_FRAMES   10
 
#define BB_1km_FRAMES   50
 
#define SV_1km_FRAMES   50
 
#define EV_1km_FRAMES   1354
 
#define EV_250m_FRAMES   5416
 
#define EV_500m_FRAMES   2708
 
#define TOTAL_1km_FRAMES   1514
 
#define NADIR_1km_FRAME_NUM   677
 
#define MAX_DETECTORS_PER_BAND   40
 
#define MAX_SAMPLES_PER_BAND   4
 
#define SCAN_TYPE_TEXT_SIZE   10
 
#define COMMON_TEXT_SIZE   10
 
#define MAX_ERROR_MESSAGE_LENGTH   1024
 
#define NUM_BB_THERMISTORS   12
 
#define NUM_FOCAL_PLANES   4
 
#define SCAN_QUALITY_ARRAY_NUM_ELEMENTS   4
 
#define PGS_PI   3.14159265358979323846
 
#define PGS_EXP   2.7182818284590452354
 
#define SAME   0 /*Used with strcmp()*/
 
#define L1A_DN_SDS_LB   "-1"
 
#define L1A_DN_SDS_UB   "4095"
 
#define L1A_DN_SDS_FV   "-32767" /* HDF default */
 
#define HDF_DEFAULT_FILLVALUE   -32767
 
#define SATURATED_DN   4095
 
#define MISSING_L1B_DATA   65535
 
#define MISSING_L1B_UI   255
 
#define MISSING_L1A_FLAG   -1
 
#define L1A_SCAN_DATA_MISSING_SI   65535
 
#define L1A_DN_MISSING_SI   65534
 
#define SATURATED_DETECTOR_SI   65533
 
#define ZERO_POINT_DN_SI   65532
 
#define DEAD_DETECTOR_SI   65531
 
#define RSB_DN_STAR_BELOW_MIN_SI   65530
 
#define TEB_OR_RSB_GT_MAX_SI   65529
 
#define AGGREGATION_FAIL_SI   65528
 
#define SECTOR_ROTATION_SI   65527
 
#define TEB_B1_NOT_CALCULATED   65526
 
#define DEAD_SUBFRAME_SI   65525
 
#define UNABLE_CALIBRATE_SI   65524
 
#define UNRESCALED_HIGH_SI   65521
 
#define RESCALED_L1B_SI   65520
 
#define NAD_CLOSED_UPPER_SI   65500
 
#define L1A_SCAN_DATA_MISSING_UI   255
 
#define BAD_DATA_UI   15
 
#define TOLERANCE   1.0E-20 /* defined zero */
 
#define True   1
 
#define False   0
 
#define VIS   0
 
#define NIR   1
 
#define SWIR   2
 
#define LWIR   3
 
#define TERRA   0
 
#define AQUA   1
 
#define INVALID_SATELLITE_ID   -1
 
#define INDEX_1000M_REFL   INDEX_1000M_DAY
 
#define INDEX_1000M_EMISS   INDEX_1000M_NIGHT
 
#define MAX_NUM_GRAN_AVERAGES   50
 
#define NUM_T_RC_VALUES   5
 
#define VOLTAGE_BAD_VALUE   -1000.
 
#define MAX_PROCESSING_ENVIRONMENT_STRLEN   200
 
#define MAX_RUNTIME_PARAM_SIZE   256
 
#define WRITE_BAND_26_SDS
 
#define BAND_26_SI_SDS_NAME   "EV_Band26"
 
#define BAND_26_UI_SDS_NAME   "EV_Band26_Uncert_Indexes"
 
#define BAND_26_SI_SDS_LONG_NAME   "Earth View Band 26 Scaled Integers"
 
#define BAND_26_UI_SDS_LONG_NAME   "Earth View Band 26 Uncertainty Indexes"
 
#define DN15_SAT   32767
 
#define DN_MIN   0
 

Typedefs

typedef int8 boolean
 

Enumerations

enum  switch_t {
  OFF, ON, OFF, ON,
  OFF, ON
}
 
enum  resolution_index_t {
  INDEX_250M, INDEX_500M, INDEX_1000M_DAY, INDEX_1000M_NIGHT,
  NUM_L1A_RESOLUTIONS, INDEX_250M, INDEX_500M, INDEX_1000M_DAY,
  INDEX_1000M_NIGHT, NUM_L1A_RESOLUTIONS
}
 
enum  L1B_EV_FILE_index_t {
  INDEX_L1B_250m, INDEX_L1B_500m, INDEX_L1B_1km, NUM_L1B_EV_FILES,
  INDEX_L1B_250m, INDEX_L1B_500m, INDEX_L1B_1km, NUM_L1B_EV_FILES
}
 
enum  L1A_attr_index_t {
  Orbital_Node, Number_Of_Scans, Number_Day_Scans, Number_Night_Scans,
  Total_Frames, Earth_Frames, SD_Frames, SRCA_Frames,
  BB_Frames, SV_Frames, Scan_Type, Incomplete_Scans,
  Missing_Packets, Packets_With_Bad_CRC, Discarded_Packets, NUM_L1A_ATTRIBUTES,
  Orbital_Node, Number_Of_Scans, Number_Day_Scans, Number_Night_Scans,
  Total_Frames, Earth_Frames, SD_Frames, SRCA_Frames,
  BB_Frames, SV_Frames, Scan_Type, Incomplete_Scans,
  Missing_Packets, Packets_With_Bad_CRC, Discarded_Packets, NUM_L1A_ATTRIBUTES
}
 
enum  target_index_t {
  SD_INDEX, SRCA_INDEX, BB_INDEX, SV_INDEX,
  EV_INDEX, NUM_TARGETS, SD_INDEX, SRCA_INDEX,
  BB_INDEX, SV_INDEX, EV_INDEX, NUM_TARGETS
}
 
enum  night_band_index_t {
  BAND20, BAND21, BAND22, BAND23,
  BAND24, BAND25, BAND26, BAND27,
  BAND28, BAND29, BAND30, BAND31,
  BAND32, BAND33, BAND34, BAND35,
  BAND36, NUM_NIGHT_BANDS, BAND20, BAND21,
  BAND22, BAND23, BAND24, BAND25,
  BAND26, BAND27, BAND28, BAND29,
  BAND30, BAND31, BAND32, BAND33,
  B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TP_BB_TEMP10,
  GRAN_AVG_TP_BB_TEMP11, GRAN_AVG_TP_BB_TEMP12, GRAN_AVG_TA_AO_VIS_FPAE, GRAN_AVG_TA_AO_NIR_FPAE,
  GRAN_AVG_TA_RC_SMIR_CFPAE, GRAN_AVG_TA_RC_LWIR_CFPAE, GRAN_AVG_TP_SA_RCT1_MIRE, GRAN_AVG_TP_SA_RCT2_MIRE,
  GRAN_AVG_TP_SA_A_MTR, GRAN_AVG_TP_MF_CALBKHD_SR, GRAN_AVG_TP_SR_SNOUT, GRAN_AVG_TP_MF_Z_BKHD_BB,
  GRAN_AVG_TP_MF_CVR_OP_SR, GRAN_AVG_TP_AO_SMIR_OBJ, GRAN_AVG_TP_AO_LWIR_OBJ, GRAN_AVG_TP_AO_SMIR_LENS,
  GRAN_AVG_TP_AO_LWIR_LENS, GRAN_AVG_TA_RC_CS, GRAN_AVG_TA_RC_CS_OG, GRAN_AVG_TA_RC_IS,
  GRAN_AVG_TA_RC_IS_OG, GRAN_AVG_TA_RC_OS_OG, GRAN_AVG_VR_RC_LW_FPA_HTR, NUM_GRAN_AVERAGES
}
 

Functions

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 Read_Run_Time_Parameters (Run_Time_Parameters_t *runtime_params)
 
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_L1A_EV_Scan (int16 S, L1A_granule_t *L1A_Gran, L1A_Scan_t *L1A_Scan)
 
PGSt_SMF_status Aggregate_L1B (L1B_Scan_t *L1B_Scan)
 
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 Write_L1B_EV_Scan (int16 S, L1B_granule_t *L1B_Gran, L1B_Scan_t *L1B_Scan, boolean isdaymode)
 
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)
 

Variables

int32 MOD_PR02_Failure_Exit_Code
 
int32 SUBSAMPLES_AT_RES [NUM_L1A_RESOLUTIONS]
 
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]
 
char Invalid_MOD01_Msg []
 

Macro Definition Documentation

◆ AGGREGATION_FAIL_SI

#define AGGREGATION_FAIL_SI   65528

Definition at line 524 of file Granule.h.

◆ AQUA

#define AQUA   1

Definition at line 550 of file Granule.h.

◆ BAD_DATA_UI

#define BAD_DATA_UI   15

Definition at line 533 of file Granule.h.

◆ BAND_26_SI_SDS_LONG_NAME

#define BAND_26_SI_SDS_LONG_NAME   "Earth View Band 26 Scaled Integers"

Definition at line 943 of file Granule.h.

◆ BAND_26_SI_SDS_NAME

#define BAND_26_SI_SDS_NAME   "EV_Band26"

Definition at line 941 of file Granule.h.

◆ BAND_26_UI_SDS_LONG_NAME

#define BAND_26_UI_SDS_LONG_NAME   "Earth View Band 26 Uncertainty Indexes"

Definition at line 944 of file Granule.h.

◆ BAND_26_UI_SDS_NAME

#define BAND_26_UI_SDS_NAME   "EV_Band26_Uncert_Indexes"

Definition at line 942 of file Granule.h.

◆ BB_1km_FRAMES

#define BB_1km_FRAMES   50

Definition at line 467 of file Granule.h.

◆ COMMON_TEXT_SIZE

#define COMMON_TEXT_SIZE   10

Definition at line 482 of file Granule.h.

◆ DEAD_DETECTOR_SI

#define DEAD_DETECTOR_SI   65531

Definition at line 521 of file Granule.h.

◆ DEAD_SUBFRAME_SI

#define DEAD_SUBFRAME_SI   65525

Definition at line 527 of file Granule.h.

◆ DETECTORS_PER_1KM_BAND

#define DETECTORS_PER_1KM_BAND   10

Definition at line 438 of file Granule.h.

◆ DETECTORS_PER_250M_BAND

#define DETECTORS_PER_250M_BAND   40

Definition at line 440 of file Granule.h.

◆ DETECTORS_PER_500M_BAND

#define DETECTORS_PER_500M_BAND   20

Definition at line 439 of file Granule.h.

◆ DN15_SAT

#define DN15_SAT   32767

Definition at line 1103 of file Granule.h.

◆ DN_MIN

#define DN_MIN   0

Definition at line 1104 of file Granule.h.

◆ EV_1km_FRAMES

#define EV_1km_FRAMES   1354

Definition at line 469 of file Granule.h.

◆ EV_250m_FRAMES

#define EV_250m_FRAMES   5416

Definition at line 470 of file Granule.h.

◆ EV_500m_FRAMES

#define EV_500m_FRAMES   2708

Definition at line 471 of file Granule.h.

◆ False

#define False   0

Definition at line 538 of file Granule.h.

◆ HDF_DEFAULT_FILLVALUE

#define HDF_DEFAULT_FILLVALUE   -32767

Definition at line 510 of file Granule.h.

◆ INDEX_1000M_EMISS

#define INDEX_1000M_EMISS   INDEX_1000M_NIGHT

Definition at line 576 of file Granule.h.

◆ INDEX_1000M_REFL

#define INDEX_1000M_REFL   INDEX_1000M_DAY

Definition at line 575 of file Granule.h.

◆ INVALID_SATELLITE_ID

#define INVALID_SATELLITE_ID   -1

Definition at line 551 of file Granule.h.

◆ L1A_DN_MISSING_SI

#define L1A_DN_MISSING_SI   65534

Definition at line 518 of file Granule.h.

◆ L1A_DN_SDS_FV

#define L1A_DN_SDS_FV   "-32767" /* HDF default */

Definition at line 508 of file Granule.h.

◆ L1A_DN_SDS_LB

#define L1A_DN_SDS_LB   "-1"

Definition at line 506 of file Granule.h.

◆ L1A_DN_SDS_UB

#define L1A_DN_SDS_UB   "4095"

Definition at line 507 of file Granule.h.

◆ L1A_SCAN_DATA_MISSING_SI

#define L1A_SCAN_DATA_MISSING_SI   65535

Definition at line 517 of file Granule.h.

◆ L1A_SCAN_DATA_MISSING_UI

#define L1A_SCAN_DATA_MISSING_UI   255

Definition at line 532 of file Granule.h.

◆ L1B_1KM_EMISS_BAND28_INDEX

#define L1B_1KM_EMISS_BAND28_INDEX   7 /* emissive band group */

Definition at line 450 of file Granule.h.

◆ LWIR

#define LWIR   3

Definition at line 545 of file Granule.h.

◆ MAX_1KM_OBC_FRAME_DIM

#define MAX_1KM_OBC_FRAME_DIM   50

Definition at line 461 of file Granule.h.

◆ MAX_1KM_TRACK_DIM

#define MAX_1KM_TRACK_DIM   MAX_NUM_SCANS*DETECTORS_PER_1KM_BAND /* 2080 */

Definition at line 456 of file Granule.h.

◆ MAX_250M_OBC_FRAME_DIM

#define MAX_250M_OBC_FRAME_DIM   200 /* 50 * 4 */

Definition at line 459 of file Granule.h.

◆ MAX_250M_TRACK_DIM

#define MAX_250M_TRACK_DIM   MAX_NUM_SCANS*DETECTORS_PER_250M_BAND /* 8320 */ /* 208 * 40 */

Definition at line 454 of file Granule.h.

◆ MAX_500M_OBC_FRAME_DIM

#define MAX_500M_OBC_FRAME_DIM   100 /* 50 * 2 */

Definition at line 460 of file Granule.h.

◆ MAX_500M_TRACK_DIM

#define MAX_500M_TRACK_DIM   MAX_NUM_SCANS*DETECTORS_PER_500M_BAND /* 4160 */

Definition at line 455 of file Granule.h.

◆ MAX_DETECTORS_PER_BAND

#define MAX_DETECTORS_PER_BAND   40

Definition at line 474 of file Granule.h.

◆ MAX_ERROR_MESSAGE_LENGTH

#define MAX_ERROR_MESSAGE_LENGTH   1024

Definition at line 483 of file Granule.h.

◆ MAX_NC_NAME

#define MAX_NC_NAME   H4_MAX_NC_NAME

Definition at line 9 of file Granule.h.

◆ MAX_NUM_GRAN_AVERAGES

#define MAX_NUM_GRAN_AVERAGES   50

Definition at line 706 of file Granule.h.

◆ MAX_NUM_SCANS

#define MAX_NUM_SCANS   1000

Definition at line 422 of file Granule.h.

◆ MAX_PROCESSING_ENVIRONMENT_STRLEN

#define MAX_PROCESSING_ENVIRONMENT_STRLEN   200

Definition at line 730 of file Granule.h.

◆ MAX_RUNTIME_PARAM_SIZE

#define MAX_RUNTIME_PARAM_SIZE   256

Definition at line 732 of file Granule.h.

◆ MAX_SAMPLES_PER_BAND

#define MAX_SAMPLES_PER_BAND   4

Definition at line 475 of file Granule.h.

◆ MAX_SWIR_TRACK_DIM

#define MAX_SWIR_TRACK_DIM   MAX_NUM_SCANS*DETECTORS_PER_500M_BAND /* 4160 */

Definition at line 457 of file Granule.h.

◆ MAX_VAR_DIMS

#define MAX_VAR_DIMS   H4_MAX_VAR_DIMS

Definition at line 10 of file Granule.h.

◆ MISSING_L1A_FLAG

#define MISSING_L1A_FLAG   -1

Definition at line 515 of file Granule.h.

◆ MISSING_L1B_DATA

#define MISSING_L1B_DATA   65535

Definition at line 513 of file Granule.h.

◆ MISSING_L1B_UI

#define MISSING_L1B_UI   255

Definition at line 514 of file Granule.h.

◆ MODIS_BAND20_INDEX

#define MODIS_BAND20_INDEX   21

Definition at line 448 of file Granule.h.

◆ MODIS_BAND26_INDEX

#define MODIS_BAND26_INDEX   27

Definition at line 446 of file Granule.h.

◆ MODIS_BAND26_INDEX_AT_RES

#define MODIS_BAND26_INDEX_AT_RES   6

Definition at line 447 of file Granule.h.

◆ MODIS_BAND5_INDEX

#define MODIS_BAND5_INDEX   4

Definition at line 445 of file Granule.h.

◆ NAD_CLOSED_UPPER_SI

#define NAD_CLOSED_UPPER_SI   65500

Definition at line 531 of file Granule.h.

◆ NADIR_1km_FRAME_NUM

#define NADIR_1km_FRAME_NUM   677

Definition at line 473 of file Granule.h.

◆ NIR

#define NIR   1

Definition at line 543 of file Granule.h.

◆ NUM_1000M_DAY_BANDS

#define NUM_1000M_DAY_BANDS   14

Definition at line 436 of file Granule.h.

◆ NUM_1000M_EMISS_BANDS

#define NUM_1000M_EMISS_BANDS   16

Definition at line 434 of file Granule.h.

◆ NUM_1000M_NIGHT_BANDS

#define NUM_1000M_NIGHT_BANDS   17

Definition at line 437 of file Granule.h.

◆ NUM_1000M_REFL_BANDS

#define NUM_1000M_REFL_BANDS   15

Definition at line 432 of file Granule.h.

◆ NUM_1KM_SUBSAMP

#define NUM_1KM_SUBSAMP   1

Definition at line 441 of file Granule.h.

◆ NUM_250M_BANDS

#define NUM_250M_BANDS   2

Definition at line 430 of file Granule.h.

◆ NUM_250M_SUBSAMP

#define NUM_250M_SUBSAMP   4

Definition at line 443 of file Granule.h.

◆ NUM_500M_BANDS

#define NUM_500M_BANDS   5

Definition at line 431 of file Granule.h.

◆ NUM_500M_SUBSAMP

#define NUM_500M_SUBSAMP   2

Definition at line 442 of file Granule.h.

◆ NUM_BANDS

#define NUM_BANDS   38

Definition at line 423 of file Granule.h.

◆ NUM_BB_THERMISTORS

#define NUM_BB_THERMISTORS   12

Definition at line 485 of file Granule.h.

◆ NUM_DETECTORS

#define NUM_DETECTORS   490

Definition at line 424 of file Granule.h.

◆ NUM_EMISSIVE_BANDS

#define NUM_EMISSIVE_BANDS   16

Definition at line 435 of file Granule.h.

◆ NUM_EMISSIVE_DETECTORS

#define NUM_EMISSIVE_DETECTORS   160

Definition at line 428 of file Granule.h.

◆ NUM_FOCAL_PLANES

#define NUM_FOCAL_PLANES   4

Definition at line 486 of file Granule.h.

◆ NUM_HIGH_RESOLUTION_DETECTORS

#define NUM_HIGH_RESOLUTION_DETECTORS   180

Definition at line 425 of file Granule.h.

◆ NUM_HIGH_RESOLUTION_SUBFRAMES

#define NUM_HIGH_RESOLUTION_SUBFRAMES   520

Definition at line 426 of file Granule.h.

◆ NUM_MIRROR_SIDES

#define NUM_MIRROR_SIDES   2

Definition at line 429 of file Granule.h.

◆ NUM_REFL_INDICES

#define NUM_REFL_INDICES   1340

Definition at line 444 of file Granule.h.

◆ NUM_REFLECTIVE_BANDS

#define NUM_REFLECTIVE_BANDS   22

Definition at line 433 of file Granule.h.

◆ NUM_REFLECTIVE_DETECTORS

#define NUM_REFLECTIVE_DETECTORS   330

Definition at line 427 of file Granule.h.

◆ NUM_SCANS_DIM_NAME

#define NUM_SCANS_DIM_NAME   "nscans"

Definition at line 416 of file Granule.h.

◆ NUM_T_RC_VALUES

#define NUM_T_RC_VALUES   5

Definition at line 713 of file Granule.h.

◆ PGS_EXP

#define PGS_EXP   2.7182818284590452354

Definition at line 492 of file Granule.h.

◆ PGS_PI

#define PGS_PI   3.14159265358979323846

Definition at line 490 of file Granule.h.

◆ RESCALED_L1B_SI

#define RESCALED_L1B_SI   65520

Definition at line 530 of file Granule.h.

◆ RSB_DN_STAR_BELOW_MIN_SI

#define RSB_DN_STAR_BELOW_MIN_SI   65530

Definition at line 522 of file Granule.h.

◆ SAME

#define SAME   0 /*Used with strcmp()*/

Definition at line 494 of file Granule.h.

◆ SATURATED_DETECTOR_SI

#define SATURATED_DETECTOR_SI   65533

Definition at line 519 of file Granule.h.

◆ SATURATED_DN

#define SATURATED_DN   4095

Definition at line 511 of file Granule.h.

◆ SCAN_QUALITY_ARRAY_NUM_ELEMENTS

#define SCAN_QUALITY_ARRAY_NUM_ELEMENTS   4

Definition at line 488 of file Granule.h.

◆ SCAN_TYPE_TEXT_SIZE

#define SCAN_TYPE_TEXT_SIZE   10

Definition at line 481 of file Granule.h.

◆ SD_1km_FRAMES

#define SD_1km_FRAMES   50

Definition at line 465 of file Granule.h.

◆ SECTOR_ROTATION_SI

#define SECTOR_ROTATION_SI   65527

Definition at line 525 of file Granule.h.

◆ SRCA_1KM_FRAME_DIM

#define SRCA_1KM_FRAME_DIM   10

Definition at line 464 of file Granule.h.

◆ SRCA_1km_FRAMES

#define SRCA_1km_FRAMES   10

Definition at line 466 of file Granule.h.

◆ SRCA_250M_FRAME_DIM

#define SRCA_250M_FRAME_DIM   40 /* 10 * 4 */

Definition at line 462 of file Granule.h.

◆ SRCA_500M_FRAME_DIM

#define SRCA_500M_FRAME_DIM   20

Definition at line 463 of file Granule.h.

◆ SV_1km_FRAMES

#define SV_1km_FRAMES   50

Definition at line 468 of file Granule.h.

◆ SWIR

#define SWIR   2

Definition at line 544 of file Granule.h.

◆ TEB_B1_NOT_CALCULATED

#define TEB_B1_NOT_CALCULATED   65526

Definition at line 526 of file Granule.h.

◆ TEB_OR_RSB_GT_MAX_SI

#define TEB_OR_RSB_GT_MAX_SI   65529

Definition at line 523 of file Granule.h.

◆ TERRA

#define TERRA   0

Definition at line 549 of file Granule.h.

◆ TOLERANCE

#define TOLERANCE   1.0E-20 /* defined zero */

Definition at line 535 of file Granule.h.

◆ TOTAL_1km_FRAMES

#define TOTAL_1km_FRAMES   1514

Definition at line 472 of file Granule.h.

◆ True

#define True   1

Definition at line 537 of file Granule.h.

◆ UNABLE_CALIBRATE_SI

#define UNABLE_CALIBRATE_SI   65524

Definition at line 528 of file Granule.h.

◆ UNRESCALED_HIGH_SI

#define UNRESCALED_HIGH_SI   65521

Definition at line 529 of file Granule.h.

◆ VIS

#define VIS   0

Definition at line 542 of file Granule.h.

◆ VOLTAGE_BAD_VALUE

#define VOLTAGE_BAD_VALUE   -1000.

Definition at line 718 of file Granule.h.

◆ WRITE_BAND_26_SDS

#define WRITE_BAND_26_SDS

Definition at line 937 of file Granule.h.

◆ ZERO_POINT_DN_SI

#define ZERO_POINT_DN_SI   65532

Definition at line 520 of file Granule.h.

Typedef Documentation

◆ boolean

typedef int8 boolean

Definition at line 566 of file Granule.h.

Enumeration Type Documentation

◆ gran_average_def_t

Enumerator
GRAN_AVG_TP_BB_TEMP01 
GRAN_AVG_TP_BB_TEMP02 
GRAN_AVG_TP_BB_TEMP03 
GRAN_AVG_TP_BB_TEMP04 
GRAN_AVG_TP_BB_TEMP05 
GRAN_AVG_TP_BB_TEMP06 
GRAN_AVG_TP_BB_TEMP07 
GRAN_AVG_TP_BB_TEMP08 
GRAN_AVG_TP_BB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RAN_AVG_TP_SA_A_MTR 
GRAN_AVG_TP_MF_CALBKHD_SR 
GRAN_AVG_TP_SR_SNOUT 
GRAN_AVG_TP_MF_Z_BKHD_BB 
GRAN_AVG_TP_MF_CVR_OP_SR 
GRAN_AVG_TP_AO_SMIR_OBJ 
GRAN_AVG_TP_AO_LWIR_OBJ 
GRAN_AVG_TP_AO_SMIR_LENS 
GRAN_AVG_TP_AO_LWIR_LENS 
GRAN_AVG_TA_RC_CS 
GRAN_AVG_TA_RC_CS_OG 
GRAN_AVG_TA_RC_IS 
GRAN_AVG_TA_RC_IS_OG 
GRAN_AVG_TA_RC_OS_OG 
GRAN_AVG_VR_RC_LW_FPA_HTR 
NUM_GRAN_AVERAGES 

Definition at line 665 of file Granule.h.

◆ L1A_attr_index_t

Enumerator
Orbital_Node 
Number_Of_Scans 
Number_Day_Scans 
Number_Night_Scans 
Total_Frames 
Earth_Frames 
SD_Frames 
SRCA_Frames 
BB_Frames 
SV_Frames 
Scan_Type 
Incomplete_Scans 
Missing_Packets 
Packets_With_Bad_CRC 
Discarded_Packets 
NUM_L1A_ATTRIBUTES 
Orbital_Node 
Number_Of_Scans 
Number_Day_Scans 
Number_Night_Scans 
Total_Frames 
Earth_Frames 
SD_Frames 
SRCA_Frames 
BB_Frames 
SV_Frames 
Scan_Type 
Incomplete_Scans 
Missing_Packets 
Packets_With_Bad_CRC 
Discarded_Packets 
NUM_L1A_ATTRIBUTES 

Definition at line 614 of file Granule.h.

◆ L1B_EV_FILE_index_t

Enumerator
INDEX_L1B_250m 
INDEX_L1B_500m 
INDEX_L1B_1km 
NUM_L1B_EV_FILES 
INDEX_L1B_250m 
INDEX_L1B_500m 
INDEX_L1B_1km 
NUM_L1B_EV_FILES 

Definition at line 583 of file Granule.h.

◆ night_band_index_t

Enumerator
BAND20 
BAND21 
BAND22 
BAND23 
BAND24 
BAND25 
BAND26 
BAND27 
BAND28 
BAND29 
BAND30 
BAND31 
BAND32 
BAND33 
BAND34 
BAND35 
BAND36 
NUM_NIGHT_BANDS 
BAND20 
BAND21 
BAND22 
BAND23 
BAND24 
BAND25 
BAND26 
BAND27 
BAND28 
BAND29 
BAND30 
BAND31 
BAND32 
BAND33 
BAND34 
BAND35 
BAND36 
NUM_NIGHT_BANDS 

Definition at line 642 of file Granule.h.

◆ resolution_index_t

Enumerator
INDEX_250M 
INDEX_500M 
INDEX_1000M_DAY 
INDEX_1000M_NIGHT 
NUM_L1A_RESOLUTIONS 
INDEX_250M 
INDEX_500M 
INDEX_1000M_DAY 
INDEX_1000M_NIGHT 
NUM_L1A_RESOLUTIONS 

Definition at line 568 of file Granule.h.

◆ switch_t

enum switch_t
Enumerator
OFF 
ON 
OFF 
ON 
OFF 
ON 

Definition at line 479 of file Granule.h.

◆ target_index_t

Enumerator
SD_INDEX 
SRCA_INDEX 
BB_INDEX 
SV_INDEX 
EV_INDEX 
NUM_TARGETS 
SD_INDEX 
SRCA_INDEX 
BB_INDEX 
SV_INDEX 
EV_INDEX 
NUM_TARGETS 

Definition at line 633 of file Granule.h.

Function Documentation

◆ Aggregate_L1B()

PGSt_SMF_status Aggregate_L1B ( L1B_Scan_t L1B_Scan)

Definition at line 78 of file Granule.c.

◆ Bad_L1A_Error_Out()

void Bad_L1A_Error_Out ( char *  name,
char *  message 
)

Definition at line 1616 of file Granule.c.

◆ Close_L1A_Granule()

PGSt_SMF_status Close_L1A_Granule ( L1A_granule_t L1A_Gran,
L1A_Scan_t L1A_Scan 
)

Definition at line 192 of file Granule.c.

◆ Close_L1B_Granule()

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

Definition at line 268 of file Granule.c.

◆ Fill_Dead_Detector_SI()

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 1919 of file Granule.c.

◆ Get_Satellite_ID()

PGSt_SMF_status Get_Satellite_ID ( PGSt_PC_Logical  lun,
int32 *  satellite_ID 
)

Definition at line 2924 of file Granule.c.

◆ L1BErrorMsg()

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.

◆ Open_and_Read_L1A()

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 2450 of file Granule.c.

◆ Read_L1A_EV_Scan()

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

Definition at line 671 of file Granule.c.

◆ Read_Run_Time_Parameters()

PGSt_SMF_status Read_Run_Time_Parameters ( Run_Time_Parameters_t runtime_params)

Definition at line 2989 of file Granule.c.

◆ safe_strcat()

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

Definition at line 834 of file Granule.c.

◆ SMF_ERROR()

void SMF_ERROR ( PGSt_SMF_code  code,
char *  messagestring 
)

Definition at line 1345 of file Granule.c.

◆ Write_L1B_EV_Scan()

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

Definition at line 1673 of file Granule.c.

Variable Documentation

◆ BAND_RATIO_AT_RES

int16 BAND_RATIO_AT_RES[NUM_L1A_RESOLUTIONS]

Definition at line 73 of file Granule.c.

◆ DETECT_PER_BAND_AT_RES

int16 DETECT_PER_BAND_AT_RES[NUM_L1A_RESOLUTIONS]

Definition at line 68 of file Granule.c.

◆ Invalid_MOD01_Msg

char Invalid_MOD01_Msg[]

Definition at line 913 of file Granule.c.

◆ L1A_BANDS_AT_RES

int16 L1A_BANDS_AT_RES[NUM_L1A_RESOLUTIONS]

Definition at line 63 of file Granule.c.

◆ L1B_BANDS_AT_RES

int16 L1B_BANDS_AT_RES[NUM_L1A_RESOLUTIONS]

Definition at line 58 of file Granule.c.

◆ MOD_PR02_Failure_Exit_Code

int32 MOD_PR02_Failure_Exit_Code

Definition at line 52 of file Granule.c.

◆ SUBSAMPLES_AT_RES

int32 SUBSAMPLES_AT_RES[NUM_L1A_RESOLUTIONS]

Definition at line 21 of file Preprocess.c.