OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1_octs_hdf.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <hdf4utils.h>
#include "l1.h"
#include "filehdr_struc.h"
#include "l1_octs_hdf.h"
#include <hdf.h>
#include <mfhdf.h>
Include dependency graph for l1_octs_hdf.c:

Go to the source code of this file.

Macros

#define RADIUS   6378.137 /* Earth radius in km */
 
#define FL   1.0/298.257 /* Earth flatening factor */
 
#define NR   560 /* # rows */
 
#define NC   30 /* max # columns */
 
#define MAXOCLIN   6700 /* max # lines */
 
#define MAXOCPIX   2218 /* max # pixels */
 
#define MAXOCARR   10000
 
#define NOCBANDS   8
 
#define NTILT   3
 
#define NDET   10
 
#define NBND   12
 
#define NSEG   2
 
#define NGAIN   4
 

Functions

void reform_octs_time (char *time)
 
int32_t get_octs_cal (char *file, int16_t year, int16_t day, int32_t msec[MAXOCLIN], int32_t recnum, int16_t npix, int32_t spix, int32_t tilt, int16_t gainset[MAXOCLIN], float inst_temp[MAXOCLIN], int16_t sample_table[3][8][2][400][2], int32_t scansPerScene, uint16_t l1acnts[NOCBANDS][MAXOCPIX], float l1brads[MAXOCPIX][NOCBANDS])
 
int openl1_read_octs_hdf (filehandle *l1file)
 
int readl1_octs_hdf (filehandle *l1file, int32_t recnum, l1str *l1rec)
 
int navigation (int32_t fileID)
 
int CalcViewAngle (float lon1, float lat1, float pos[3], float usun[3])
 
int LeapCheck (int yr)
 
int closel1_octs_hdf (filehandle *l1file)
 

Macro Definition Documentation

◆ FL

#define FL   1.0/298.257 /* Earth flatening factor */

Definition at line 40 of file l1_octs_hdf.c.

◆ MAXOCARR

#define MAXOCARR   10000

Definition at line 46 of file l1_octs_hdf.c.

◆ MAXOCLIN

#define MAXOCLIN   6700 /* max # lines */

Definition at line 44 of file l1_octs_hdf.c.

◆ MAXOCPIX

#define MAXOCPIX   2218 /* max # pixels */

Definition at line 45 of file l1_octs_hdf.c.

◆ NBND

#define NBND   12

Definition at line 91 of file l1_octs_hdf.c.

◆ NC

#define NC   30 /* max # columns */

Definition at line 42 of file l1_octs_hdf.c.

◆ NDET

#define NDET   10

Definition at line 90 of file l1_octs_hdf.c.

◆ NGAIN

#define NGAIN   4

Definition at line 93 of file l1_octs_hdf.c.

◆ NOCBANDS

#define NOCBANDS   8

Definition at line 47 of file l1_octs_hdf.c.

◆ NR

#define NR   560 /* # rows */

Definition at line 41 of file l1_octs_hdf.c.

◆ NSEG

#define NSEG   2

Definition at line 92 of file l1_octs_hdf.c.

◆ NTILT

#define NTILT   3

Definition at line 89 of file l1_octs_hdf.c.

◆ RADIUS

#define RADIUS   6378.137 /* Earth radius in km */

Definition at line 39 of file l1_octs_hdf.c.

Function Documentation

◆ CalcViewAngle()

int CalcViewAngle ( float  lon1,
float  lat1,
float  pos[3],
float  usun[3] 
)

Definition at line 1032 of file l1_octs_hdf.c.

◆ closel1_octs_hdf()

int closel1_octs_hdf ( filehandle *  l1file)

Definition at line 1147 of file l1_octs_hdf.c.

◆ get_octs_cal()

int32_t get_octs_cal ( char *  file,
int16_t  year,
int16_t  day,
int32_t  msec[MAXOCLIN],
int32_t  recnum,
int16_t  npix,
int32_t  spix,
int32_t  tilt,
int16_t  gainset[MAXOCLIN],
float  inst_temp[MAXOCLIN],
int16_t  sample_table[3][8][2][400][2],
int32_t  scansPerScene,
uint16_t  l1acnts[NOCBANDS][MAXOCPIX],
float  l1brads[MAXOCPIX][NOCBANDS] 
)

Definition at line 95 of file l1_octs_hdf.c.

◆ LeapCheck()

int LeapCheck ( int  yr)

Definition at line 1126 of file l1_octs_hdf.c.

◆ navigation()

int navigation ( int32_t  fileID)

Definition at line 696 of file l1_octs_hdf.c.

◆ openl1_read_octs_hdf()

int openl1_read_octs_hdf ( filehandle *  l1file)

Definition at line 328 of file l1_octs_hdf.c.

◆ readl1_octs_hdf()

int readl1_octs_hdf ( filehandle *  l1file,
int32_t  recnum,
l1str *  l1rec 
)

Definition at line 510 of file l1_octs_hdf.c.

◆ reform_octs_time()

void reform_octs_time ( char *  time)

Definition at line 1167 of file l1_octs_hdf.c.