OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1a_seawifs.c File Reference
#include <hdf4utils.h>
#include "l1a.h"
#include "navigation.h"
#include "l1a_proto.h"
#include "eng_qual.h"
#include "l1.h"
#include "l1a_seawifs.h"
#include "call1a_proto.h"
#include "getcal_proto.h"
#include "st_proto.h"
#include <hdf.h>
#include <mfhdf.h>
Include dependency graph for l1a_seawifs.c:

Go to the source code of this file.

Classes

struct  inputBuffer
 

Macros

#define LAC_PIXEL_NUM   1285
 
#define GAC_PIXEL_NUM   248
 
#define NREC_IN_BUF   10
 
#define STBUFSIZ   5
 
#define NOTDONE   0
 
#define FIRST_KNEE   1
 
#define MASK_HIGHLT1   16
 
#define GENBUFSIZ   NREC_IN_BUF*sizeof(float)*40 /* size of inst_ana */
 

Functions

int32_t get_l1a_rec (int32_t sd_id, int32_t recno, cal_mod_struc *cal_mod, int16_t *l1a_dum, float **l1b_data, int16_t **l2_flags)
 
int openl1a_seawifs (filehandle *file)
 
int readl1a_seawifs (filehandle *file, int32_t recnum, l1str *l1rec)
 
int readl1a_lonlat_seawifs (filehandle *file, int32_t recnum, l1str *l1rec)
 
int closel1a_seawifs (filehandle *file)
 

Variables

int16_t syear
 
int16_t sday
 
int32_t smsec
 
int16_t eyear
 
int16_t eday
 
int32_t emsec
 
int32_t nscan
 
int32_t npix
 
int32_t spix
 
int32_t dpix
 
float dark_mean [8]
 
float dark_std [8]
 
int16_t tdi [BANDS_DIMS_1A] = {0, 0, 0, 0, 0, 0, 0, 0}
 
int16_t entry_year
 
int16_t entry_day
 
int16_t ref_year
 
int16_t ref_day
 
int16_t ref_minute
 
float fp_temps [256][BANDS_DIMS_1A]
 
float scan_mod [2][1285]
 
float counts [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float rads [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
double t_const [BANDS_DIMS_1A]
 
double t_linear_1 [BANDS_DIMS_1A]
 
double t_exponential_1 [BANDS_DIMS_1A]
 
double t_linear_2 [BANDS_DIMS_1A]
 
double t_exponential_2 [BANDS_DIMS_1A]
 
double cal_offs [BANDS_DIMS_1A]
 
double inst_tcorr [BANDS_DIMS_1A]
 
double inst_tref [BANDS_DIMS_1A]
 
double fp_tcorr [BANDS_DIMS_1A]
 
double fp_tref [BANDS_DIMS_1A]
 
double ms1_const [BANDS_DIMS_1A]
 
double ms1_linear_1 [BANDS_DIMS_1A]
 
double ms1_exponential_1 [BANDS_DIMS_1A]
 
double ms1_linear_2 [BANDS_DIMS_1A]
 
double ms1_exponential_2 [BANDS_DIMS_1A]
 
double ms2_const [BANDS_DIMS_1A]
 
double ms2_linear_1 [BANDS_DIMS_1A]
 
double ms2_exponential_1 [BANDS_DIMS_1A]
 
double ms2_linear_2 [BANDS_DIMS_1A]
 
double ms2_exponential_2 [BANDS_DIMS_1A]
 
char cal_path_tab [128]
 
char dtype [8]
 
float cal_counts [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float cal_rads [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float pcal_counts [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float pcal_rads [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
short l2_flags_buffer [LAC_PIXEL_NUM]
 
int32_t nsta
 
int32_t ninc
 
int16_t * l1a_data = NULL
 
int16_t * l1a_back = NULL
 
float * l1b_buffer = NULL
 
int32_t * msec
 
int16_t * side
 
int16_t * dark_rest
 
float * tilt
 
float ylat [LAC_PIXEL_NUM]
 
float xlon [LAC_PIXEL_NUM]
 
float solz [LAC_PIXEL_NUM]
 
float sola [LAC_PIXEL_NUM]
 
float senz [LAC_PIXEL_NUM]
 
float sena [LAC_PIXEL_NUM]
 
int16_t stray_light = -1
 
float Ltyp_frac = 0.25
 
int16_t out_band = 0
 
int32_t do_st = 1
 

Macro Definition Documentation

◆ FIRST_KNEE

#define FIRST_KNEE   1

Definition at line 20 of file l1a_seawifs.c.

◆ GAC_PIXEL_NUM

#define GAC_PIXEL_NUM   248

Definition at line 16 of file l1a_seawifs.c.

◆ GENBUFSIZ

#define GENBUFSIZ   NREC_IN_BUF*sizeof(float)*40 /* size of inst_ana */

Definition at line 22 of file l1a_seawifs.c.

◆ LAC_PIXEL_NUM

#define LAC_PIXEL_NUM   1285

Definition at line 15 of file l1a_seawifs.c.

◆ MASK_HIGHLT1

#define MASK_HIGHLT1   16

Definition at line 21 of file l1a_seawifs.c.

◆ NOTDONE

#define NOTDONE   0

Definition at line 19 of file l1a_seawifs.c.

◆ NREC_IN_BUF

#define NREC_IN_BUF   10

Definition at line 17 of file l1a_seawifs.c.

◆ STBUFSIZ

#define STBUFSIZ   5

Definition at line 18 of file l1a_seawifs.c.

Function Documentation

◆ closel1a_seawifs()

int closel1a_seawifs ( filehandle *  file)

Definition at line 646 of file l1a_seawifs.c.

◆ get_l1a_rec()

int32_t get_l1a_rec ( int32_t  sd_id,
int32_t  recno,
cal_mod_struc *  cal_mod,
int16_t *  l1a_dum,
float **  l1b_data,
int16_t **  l2_flags 
)

Definition at line 118 of file l1a_seawifs.c.

◆ openl1a_seawifs()

int openl1a_seawifs ( filehandle *  file)

Definition at line 350 of file l1a_seawifs.c.

◆ readl1a_lonlat_seawifs()

int readl1a_lonlat_seawifs ( filehandle *  file,
int32_t  recnum,
l1str *  l1rec 
)

Definition at line 618 of file l1a_seawifs.c.

◆ readl1a_seawifs()

int readl1a_seawifs ( filehandle *  file,
int32_t  recnum,
l1str *  l1rec 
)

Definition at line 484 of file l1a_seawifs.c.

Variable Documentation

◆ cal_counts

Definition at line 136 of file calib_calibrate_l1a.c.

◆ cal_offs

double cal_offs[BANDS_DIMS_1A]

Definition at line 54 of file l1a_seawifs.c.

◆ cal_path_tab

char cal_path_tab[128]

Definition at line 70 of file l1a_seawifs.c.

◆ cal_rads

Definition at line 137 of file calib_calibrate_l1a.c.

◆ counts

Definition at line 46 of file l1a_seawifs.c.

◆ dark_mean

float dark_mean[8]

Definition at line 34 of file l1a_seawifs.c.

◆ dark_rest

int16_t* dark_rest

Definition at line 89 of file l1a_seawifs.c.

◆ dark_std

float dark_std[8]

Definition at line 35 of file l1a_seawifs.c.

◆ do_st

int32_t do_st = 1

Definition at line 116 of file l1a_seawifs.c.

◆ dpix

int32_t dpix

Definition at line 33 of file l1a_seawifs.c.

◆ dtype

char dtype[8]

Definition at line 71 of file l1a_seawifs.c.

◆ eday

int16_t eday

Definition at line 28 of file l1a_seawifs.c.

◆ emsec

int32_t emsec

Definition at line 29 of file l1a_seawifs.c.

◆ entry_day

int16_t entry_day

Definition at line 40 of file l1a_seawifs.c.

◆ entry_year

int16_t entry_year

Definition at line 39 of file l1a_seawifs.c.

◆ eyear

int16_t eyear

Definition at line 28 of file l1a_seawifs.c.

◆ fp_tcorr

double fp_tcorr[BANDS_DIMS_1A]

Definition at line 57 of file l1a_seawifs.c.

◆ fp_temps

float fp_temps[256][BANDS_DIMS_1A]

Definition at line 44 of file l1a_seawifs.c.

◆ fp_tref

double fp_tref[BANDS_DIMS_1A]

Definition at line 58 of file l1a_seawifs.c.

◆ inst_tcorr

double inst_tcorr[BANDS_DIMS_1A]

Definition at line 55 of file l1a_seawifs.c.

◆ inst_tref

double inst_tref[BANDS_DIMS_1A]

Definition at line 56 of file l1a_seawifs.c.

◆ l1a_back

int16_t* l1a_back = NULL

Definition at line 85 of file l1a_seawifs.c.

◆ l1a_data

int16_t* l1a_data = NULL

Definition at line 84 of file l1a_seawifs.c.

◆ l1b_buffer

float* l1b_buffer = NULL

Definition at line 86 of file l1a_seawifs.c.

◆ l2_flags_buffer

short l2_flags_buffer[LAC_PIXEL_NUM]

Definition at line 79 of file l1a_seawifs.c.

◆ Ltyp_frac

float Ltyp_frac = 0.25

Definition at line 101 of file l1a_seawifs.c.

◆ ms1_const

double ms1_const[BANDS_DIMS_1A]

Definition at line 59 of file l1a_seawifs.c.

◆ ms1_exponential_1

double ms1_exponential_1[BANDS_DIMS_1A]

Definition at line 61 of file l1a_seawifs.c.

◆ ms1_exponential_2

double ms1_exponential_2[BANDS_DIMS_1A]

Definition at line 63 of file l1a_seawifs.c.

◆ ms1_linear_1

double ms1_linear_1[BANDS_DIMS_1A]

Definition at line 60 of file l1a_seawifs.c.

◆ ms1_linear_2

double ms1_linear_2[BANDS_DIMS_1A]

Definition at line 62 of file l1a_seawifs.c.

◆ ms2_const

double ms2_const[BANDS_DIMS_1A]

Definition at line 64 of file l1a_seawifs.c.

◆ ms2_exponential_1

double ms2_exponential_1[BANDS_DIMS_1A]

Definition at line 66 of file l1a_seawifs.c.

◆ ms2_exponential_2

double ms2_exponential_2[BANDS_DIMS_1A]

Definition at line 68 of file l1a_seawifs.c.

◆ ms2_linear_1

double ms2_linear_1[BANDS_DIMS_1A]

Definition at line 65 of file l1a_seawifs.c.

◆ ms2_linear_2

double ms2_linear_2[BANDS_DIMS_1A]

Definition at line 67 of file l1a_seawifs.c.

◆ msec

int32_t* msec

Definition at line 87 of file l1a_seawifs.c.

◆ ninc

int32_t ninc

Definition at line 82 of file l1a_seawifs.c.

◆ npix

int32_t npix

Definition at line 31 of file l1a_seawifs.c.

◆ nscan

int32_t nscan

Definition at line 30 of file l1a_seawifs.c.

◆ nsta

int32_t nsta

Definition at line 81 of file l1a_seawifs.c.

◆ out_band

int16_t out_band = 0

Definition at line 102 of file l1a_seawifs.c.

◆ pcal_counts

Definition at line 77 of file l1a_seawifs.c.

◆ pcal_rads

Definition at line 78 of file l1a_seawifs.c.

◆ rads

Definition at line 47 of file l1a_seawifs.c.

◆ ref_day

int16_t ref_day

Definition at line 42 of file l1a_seawifs.c.

◆ ref_minute

int16_t ref_minute

Definition at line 43 of file l1a_seawifs.c.

◆ ref_year

int16_t ref_year

Definition at line 41 of file l1a_seawifs.c.

◆ scan_mod

float scan_mod[2][1285]

Definition at line 45 of file l1a_seawifs.c.

◆ sday

int16_t sday

Definition at line 26 of file l1a_seawifs.c.

◆ sena

float sena[LAC_PIXEL_NUM]

Definition at line 97 of file l1a_seawifs.c.

◆ senz

float senz[LAC_PIXEL_NUM]

Definition at line 96 of file l1a_seawifs.c.

◆ side

int16_t* side

Definition at line 88 of file l1a_seawifs.c.

◆ smsec

int32_t smsec

Definition at line 27 of file l1a_seawifs.c.

◆ sola

float sola[LAC_PIXEL_NUM]

Definition at line 95 of file l1a_seawifs.c.

◆ solz

float solz[LAC_PIXEL_NUM]

Definition at line 94 of file l1a_seawifs.c.

◆ spix

int32_t spix

Definition at line 32 of file l1a_seawifs.c.

◆ stray_light

int16_t stray_light = -1

Definition at line 100 of file l1a_seawifs.c.

◆ syear

int16_t syear

Definition at line 26 of file l1a_seawifs.c.

◆ t_const

double t_const[BANDS_DIMS_1A]

Definition at line 49 of file l1a_seawifs.c.

◆ t_exponential_1

double t_exponential_1[BANDS_DIMS_1A]

Definition at line 51 of file l1a_seawifs.c.

◆ t_exponential_2

double t_exponential_2[BANDS_DIMS_1A]

Definition at line 53 of file l1a_seawifs.c.

◆ t_linear_1

double t_linear_1[BANDS_DIMS_1A]

Definition at line 50 of file l1a_seawifs.c.

◆ t_linear_2

double t_linear_2[BANDS_DIMS_1A]

Definition at line 52 of file l1a_seawifs.c.

◆ tdi

int16_t tdi[BANDS_DIMS_1A] = {0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 37 of file l1a_seawifs.c.

◆ tilt

float* tilt

Definition at line 90 of file l1a_seawifs.c.

◆ xlon

float xlon[LAC_PIXEL_NUM]

Definition at line 93 of file l1a_seawifs.c.

◆ ylat

float ylat[LAC_PIXEL_NUM]

Definition at line 92 of file l1a_seawifs.c.