OB.DAAC Logo
NASA Logo
Ocean Color Science Software

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

Go to the source code of this file.

Macros

#define NP   384 /* # pixels for MOS files */
 
#define NS   384 /* # scans for MOS files */
 
#define NB   13 /* Number of channels */
 
#define MAXLEN   200 /* length of file description array */
 
#define PSIZE   2 /* Array size for the tabulated values */
 
#define SPACE   32 /* ASCII Blank */
 
#define NUM   63 /* # elements in id[] and desc[] arrays */
 
#define NBANDS_MOS   8
 

Typedefs

typedef uint16_t array_data_t[NS]
 
typedef float data_2d_t[NP]
 
typedef float image_t[NP][NBANDS_MOS]
 

Functions

int rd_gscan (void)
 
int ReadSDS (filehandle *l1file)
 
int32_t GetTime (char arr[MAXLEN])
 
int32_t TimeToSec (int32_t yr, int32_t mo, int32_t dm, int32_t hr, int32_t mn, int32_t sec)
 
int GetYearDayMsec (double dtime[NS])
 
int LeapChk (int32_t yr)
 
int RemoveWhitespace (char arr[MAXLEN])
 
int bilinear (float p[PSIZE][PSIZE], float x[NS][NP], float y[NS][NP], float z[NS][NP])
 
int openl1_read_mos_hdf (filehandle *l1file)
 
int readl1_mos_hdf (filehandle *l1file, int32_t recnum, l1str *l1rec)
 
int closel1_mos_hdf (filehandle *l1file)
 

Macro Definition Documentation

◆ MAXLEN

#define MAXLEN   200 /* length of file description array */

Definition at line 28 of file l1_mos_hdf.c.

◆ NB

#define NB   13 /* Number of channels */

Definition at line 27 of file l1_mos_hdf.c.

◆ NBANDS_MOS

#define NBANDS_MOS   8

Definition at line 32 of file l1_mos_hdf.c.

◆ NP

#define NP   384 /* # pixels for MOS files */

Definition at line 25 of file l1_mos_hdf.c.

◆ NS

#define NS   384 /* # scans for MOS files */

Definition at line 26 of file l1_mos_hdf.c.

◆ NUM

#define NUM   63 /* # elements in id[] and desc[] arrays */

Definition at line 31 of file l1_mos_hdf.c.

◆ PSIZE

#define PSIZE   2 /* Array size for the tabulated values */

Definition at line 29 of file l1_mos_hdf.c.

◆ SPACE

#define SPACE   32 /* ASCII Blank */

Definition at line 30 of file l1_mos_hdf.c.

Typedef Documentation

◆ array_data_t

typedef uint16_t array_data_t[NS]

Definition at line 53 of file l1_mos_hdf.c.

◆ data_2d_t

typedef float data_2d_t[NP]

Definition at line 57 of file l1_mos_hdf.c.

◆ image_t

typedef float image_t[NP][NBANDS_MOS]

Definition at line 71 of file l1_mos_hdf.c.

Function Documentation

◆ bilinear()

int bilinear ( float  p[PSIZE][PSIZE],
float  x[NS][NP],
float  y[NS][NP],
float  z[NS][NP] 
)

Definition at line 712 of file l1_mos_hdf.c.

◆ closel1_mos_hdf()

int closel1_mos_hdf ( filehandle *  l1file)

Definition at line 469 of file l1_mos_hdf.c.

◆ GetTime()

int32_t GetTime ( char  arr[MAXLEN])

Definition at line 543 of file l1_mos_hdf.c.

◆ GetYearDayMsec()

int GetYearDayMsec ( double  dtime[NS])

Definition at line 606 of file l1_mos_hdf.c.

◆ LeapChk()

int LeapChk ( int32_t  yr)

Definition at line 659 of file l1_mos_hdf.c.

◆ openl1_read_mos_hdf()

int openl1_read_mos_hdf ( filehandle *  l1file)

Definition at line 101 of file l1_mos_hdf.c.

◆ rd_gscan()

int rd_gscan ( void  )

Definition at line 747 of file l1_mos_hdf.c.

◆ readl1_mos_hdf()

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

Definition at line 388 of file l1_mos_hdf.c.

◆ ReadSDS()

int ReadSDS ( filehandle *  l1file)

Definition at line 492 of file l1_mos_hdf.c.

◆ RemoveWhitespace()

int RemoveWhitespace ( char  arr[MAXLEN])

Definition at line 682 of file l1_mos_hdf.c.

◆ TimeToSec()

int32_t TimeToSec ( int32_t  yr,
int32_t  mo,
int32_t  dm,
int32_t  hr,
int32_t  mn,
int32_t  sec 
)

Definition at line 573 of file l1_mos_hdf.c.