ocssw V2020
l1a_seawifs.c File Reference
#include "hdf.h"
#include "mfhdf.h"
#include "l1a.h"
#include "navigation.h"
#include "l1a_proto.h"
#include "eng_qual.h"
#include "l12_proto.h"
#include "l1a_seawifs.h"
#include "call1a_proto.h"
#include "getcal_proto.h"
#include "st_proto.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 get_l1a_rec (int32 sd_id, int32 recno, cal_mod_struc *cal_mod, int16 *l1a_dum, float32 **l1b_data, int16 **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 syear
 
int16 sday
 
int32 smsec
 
int16 eyear
 
int16 eday
 
int32 emsec
 
int32 nscan
 
int32 npix
 
int32 spix
 
int32 dpix
 
float dark_mean [8]
 
float dark_std [8]
 
int16 tdi [BANDS_DIMS_1A] = {0, 0, 0, 0, 0, 0, 0, 0}
 
int16 entry_year
 
int16 entry_day
 
int16 ref_year
 
int16 ref_day
 
int16 ref_minute
 
float32 fp_temps [256][BANDS_DIMS_1A]
 
float32 scan_mod [2][1285]
 
float32 counts [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float32 rads [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float64 t_const [BANDS_DIMS_1A]
 
float64 t_linear_1 [BANDS_DIMS_1A]
 
float64 t_exponential_1 [BANDS_DIMS_1A]
 
float64 t_linear_2 [BANDS_DIMS_1A]
 
float64 t_exponential_2 [BANDS_DIMS_1A]
 
float64 cal_offs [BANDS_DIMS_1A]
 
float64 inst_tcorr [BANDS_DIMS_1A]
 
float64 inst_tref [BANDS_DIMS_1A]
 
float64 fp_tcorr [BANDS_DIMS_1A]
 
float64 fp_tref [BANDS_DIMS_1A]
 
float64 ms1_const [BANDS_DIMS_1A]
 
float64 ms1_linear_1 [BANDS_DIMS_1A]
 
float64 ms1_exponential_1 [BANDS_DIMS_1A]
 
float64 ms1_linear_2 [BANDS_DIMS_1A]
 
float64 ms1_exponential_2 [BANDS_DIMS_1A]
 
float64 ms2_const [BANDS_DIMS_1A]
 
float64 ms2_linear_1 [BANDS_DIMS_1A]
 
float64 ms2_exponential_1 [BANDS_DIMS_1A]
 
float64 ms2_linear_2 [BANDS_DIMS_1A]
 
float64 ms2_exponential_2 [BANDS_DIMS_1A]
 
char cal_path_tab [128]
 
char dtype [8]
 
float32 cal_counts [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float32 cal_rads [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float32 pcal_counts [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float32 pcal_rads [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
short l2_flags_buffer [LAC_PIXEL_NUM]
 
int32 nsta
 
int32 ninc
 
int16 * l1a_data = NULL
 
int16 * l1a_back = NULL
 
float * l1b_buffer = NULL
 
int32 * msec
 
int16 * side
 
int16 * dark_rest
 
float32 * tilt
 
float32 ylat [LAC_PIXEL_NUM]
 
float32 xlon [LAC_PIXEL_NUM]
 
float32 solz [LAC_PIXEL_NUM]
 
float32 sola [LAC_PIXEL_NUM]
 
float32 senz [LAC_PIXEL_NUM]
 
float32 sena [LAC_PIXEL_NUM]
 
int16 stray_light = -1
 
float Ltyp_frac = 0.25
 
int16 out_band = 0
 
int32 do_st = 1
 

Macro Definition Documentation

◆ FIRST_KNEE

#define FIRST_KNEE   1

Definition at line 18 of file l1a_seawifs.c.

◆ GAC_PIXEL_NUM

#define GAC_PIXEL_NUM   248

Definition at line 14 of file l1a_seawifs.c.

◆ GENBUFSIZ

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

Definition at line 20 of file l1a_seawifs.c.

◆ LAC_PIXEL_NUM

#define LAC_PIXEL_NUM   1285

Definition at line 13 of file l1a_seawifs.c.

◆ MASK_HIGHLT1

#define MASK_HIGHLT1   16

Definition at line 19 of file l1a_seawifs.c.

◆ NOTDONE

#define NOTDONE   0

Definition at line 17 of file l1a_seawifs.c.

◆ NREC_IN_BUF

#define NREC_IN_BUF   10

Definition at line 15 of file l1a_seawifs.c.

◆ STBUFSIZ

#define STBUFSIZ   5

Definition at line 16 of file l1a_seawifs.c.

Function Documentation

◆ closel1a_seawifs()

int closel1a_seawifs ( filehandle *  file)

Definition at line 644 of file l1a_seawifs.c.

◆ get_l1a_rec()

int32 get_l1a_rec ( int32  sd_id,
int32  recno,
cal_mod_struc *  cal_mod,
int16 *  l1a_dum,
float32 **  l1b_data,
int16 **  l2_flags 
)

Definition at line 116 of file l1a_seawifs.c.

◆ openl1a_seawifs()

int openl1a_seawifs ( filehandle *  file)

Definition at line 348 of file l1a_seawifs.c.

◆ readl1a_lonlat_seawifs()

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

Definition at line 616 of file l1a_seawifs.c.

◆ readl1a_seawifs()

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

Definition at line 482 of file l1a_seawifs.c.

Variable Documentation

◆ cal_counts

float32 cal_counts[BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]

Definition at line 136 of file calib_calibrate_l1a.c.

◆ cal_offs

float64 cal_offs[BANDS_DIMS_1A]

Definition at line 52 of file l1a_seawifs.c.

◆ cal_path_tab

char cal_path_tab[128]

Definition at line 68 of file l1a_seawifs.c.

◆ cal_rads

Definition at line 137 of file calib_calibrate_l1a.c.

◆ counts

Definition at line 44 of file l1a_seawifs.c.

◆ dark_mean

float dark_mean[8]

Definition at line 32 of file l1a_seawifs.c.

◆ dark_rest

int16* dark_rest

Definition at line 87 of file l1a_seawifs.c.

◆ dark_std

float dark_std[8]

Definition at line 33 of file l1a_seawifs.c.

◆ do_st

int32 do_st = 1

Definition at line 114 of file l1a_seawifs.c.

◆ dpix

int32 dpix

Definition at line 31 of file l1a_seawifs.c.

◆ dtype

char dtype[8]

Definition at line 69 of file l1a_seawifs.c.

◆ eday

int16 eday

Definition at line 26 of file l1a_seawifs.c.

◆ emsec

int32 emsec

Definition at line 27 of file l1a_seawifs.c.

◆ entry_day

int16 entry_day

Definition at line 38 of file l1a_seawifs.c.

◆ entry_year

int16 entry_year

Definition at line 37 of file l1a_seawifs.c.

◆ eyear

int16 eyear

Definition at line 26 of file l1a_seawifs.c.

◆ fp_tcorr

float64 fp_tcorr[BANDS_DIMS_1A]

Definition at line 55 of file l1a_seawifs.c.

◆ fp_temps

float32 fp_temps[256][BANDS_DIMS_1A]

Definition at line 42 of file l1a_seawifs.c.

◆ fp_tref

float64 fp_tref[BANDS_DIMS_1A]

Definition at line 56 of file l1a_seawifs.c.

◆ inst_tcorr

float64 inst_tcorr[BANDS_DIMS_1A]

Definition at line 53 of file l1a_seawifs.c.

◆ inst_tref

float64 inst_tref[BANDS_DIMS_1A]

Definition at line 54 of file l1a_seawifs.c.

◆ l1a_back

int16* l1a_back = NULL

Definition at line 83 of file l1a_seawifs.c.

◆ l1a_data

int16* l1a_data = NULL

Definition at line 82 of file l1a_seawifs.c.

◆ l1b_buffer

float* l1b_buffer = NULL

Definition at line 84 of file l1a_seawifs.c.

◆ l2_flags_buffer

short l2_flags_buffer[LAC_PIXEL_NUM]

Definition at line 77 of file l1a_seawifs.c.

◆ Ltyp_frac

float Ltyp_frac = 0.25

Definition at line 99 of file l1a_seawifs.c.

◆ ms1_const

float64 ms1_const[BANDS_DIMS_1A]

Definition at line 57 of file l1a_seawifs.c.

◆ ms1_exponential_1

float64 ms1_exponential_1[BANDS_DIMS_1A]

Definition at line 59 of file l1a_seawifs.c.

◆ ms1_exponential_2

float64 ms1_exponential_2[BANDS_DIMS_1A]

Definition at line 61 of file l1a_seawifs.c.

◆ ms1_linear_1

float64 ms1_linear_1[BANDS_DIMS_1A]

Definition at line 58 of file l1a_seawifs.c.

◆ ms1_linear_2

float64 ms1_linear_2[BANDS_DIMS_1A]

Definition at line 60 of file l1a_seawifs.c.

◆ ms2_const

float64 ms2_const[BANDS_DIMS_1A]

Definition at line 62 of file l1a_seawifs.c.

◆ ms2_exponential_1

float64 ms2_exponential_1[BANDS_DIMS_1A]

Definition at line 64 of file l1a_seawifs.c.

◆ ms2_exponential_2

float64 ms2_exponential_2[BANDS_DIMS_1A]

Definition at line 66 of file l1a_seawifs.c.

◆ ms2_linear_1

float64 ms2_linear_1[BANDS_DIMS_1A]

Definition at line 63 of file l1a_seawifs.c.

◆ ms2_linear_2

float64 ms2_linear_2[BANDS_DIMS_1A]

Definition at line 65 of file l1a_seawifs.c.

◆ msec

int32* msec

Definition at line 85 of file l1a_seawifs.c.

◆ ninc

int32 ninc

Definition at line 80 of file l1a_seawifs.c.

◆ npix

int32 npix

Definition at line 29 of file l1a_seawifs.c.

◆ nscan

int32 nscan

Definition at line 28 of file l1a_seawifs.c.

◆ nsta

int32 nsta

Definition at line 79 of file l1a_seawifs.c.

◆ out_band

int16 out_band = 0

Definition at line 100 of file l1a_seawifs.c.

◆ pcal_counts

float32 pcal_counts[BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]

Definition at line 75 of file l1a_seawifs.c.

◆ pcal_rads

Definition at line 76 of file l1a_seawifs.c.

◆ rads

Definition at line 45 of file l1a_seawifs.c.

◆ ref_day

int16 ref_day

Definition at line 40 of file l1a_seawifs.c.

◆ ref_minute

int16 ref_minute

Definition at line 41 of file l1a_seawifs.c.

◆ ref_year

int16 ref_year

Definition at line 39 of file l1a_seawifs.c.

◆ scan_mod

float32 scan_mod[2][1285]

Definition at line 43 of file l1a_seawifs.c.

◆ sday

int16 sday

Definition at line 24 of file l1a_seawifs.c.

◆ sena

float32 sena[LAC_PIXEL_NUM]

Definition at line 95 of file l1a_seawifs.c.

◆ senz

float32 senz[LAC_PIXEL_NUM]

Definition at line 94 of file l1a_seawifs.c.

◆ side

int16* side

Definition at line 86 of file l1a_seawifs.c.

◆ smsec

int32 smsec

Definition at line 25 of file l1a_seawifs.c.

◆ sola

float32 sola[LAC_PIXEL_NUM]

Definition at line 93 of file l1a_seawifs.c.

◆ solz

float32 solz[LAC_PIXEL_NUM]

Definition at line 92 of file l1a_seawifs.c.

◆ spix

int32 spix

Definition at line 30 of file l1a_seawifs.c.

◆ stray_light

int16 stray_light = -1

Definition at line 98 of file l1a_seawifs.c.

◆ syear

int16 syear

Definition at line 24 of file l1a_seawifs.c.

◆ t_const

float64 t_const[BANDS_DIMS_1A]

Definition at line 47 of file l1a_seawifs.c.

◆ t_exponential_1

float64 t_exponential_1[BANDS_DIMS_1A]

Definition at line 49 of file l1a_seawifs.c.

◆ t_exponential_2

float64 t_exponential_2[BANDS_DIMS_1A]

Definition at line 51 of file l1a_seawifs.c.

◆ t_linear_1

float64 t_linear_1[BANDS_DIMS_1A]

Definition at line 48 of file l1a_seawifs.c.

◆ t_linear_2

float64 t_linear_2[BANDS_DIMS_1A]

Definition at line 50 of file l1a_seawifs.c.

◆ tdi

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

Definition at line 35 of file l1a_seawifs.c.

◆ tilt

float32* tilt

Definition at line 88 of file l1a_seawifs.c.

◆ xlon

float32 xlon[LAC_PIXEL_NUM]

Definition at line 91 of file l1a_seawifs.c.

◆ ylat

float32 ylat[LAC_PIXEL_NUM]

Definition at line 90 of file l1a_seawifs.c.