OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1b_viirs_nc.c File Reference
#include "l1b_viirs_nc.h"
#include "l1.h"
#include "nc4utils.h"
#include <libnav.h>
#include <float.h>
#include "calibrate_viirs.h"
#include <math.h>
Include dependency graph for l1b_viirs_nc.c:

Go to the source code of this file.

Classes

struct  varlist
 
struct  viirs_file
 

Macros

#define MAXBANDS   16
 

Typedefs

typedef unsigned short ushort
 

Enumerations

enum  scn_var {
  SCN_STIME, SCN_MSIDE, SCN_MODE, SCN_QUAL,
  NVARS_SCN
}
 
enum  nav_var { NAV_ANG, NAV_POS, NAV_VEL, NVARS_NAV }
 
enum  geo_var {
  GEO_LAT, GEO_LON, GEO_HGT, GEO_SENA,
  GEO_SENZ, GEO_SOLA, GEO_SOLZ, GEO_QUAL,
  NVARS_GEO
}
 
enum  l1bscn_var { L1BSCN_STIME, L1BSCN_MODE, L1BSCN_QUAL, NVARS_L1BSCN }
 
enum  bandtypes { RSB, TEB, CIR }
 

Functions

void print_viirs_file (const viirs_file info)
 
int init_viirs_file (const char filename[FILENAME_MAX], viirs_file *info)
 
int init_viirs_l1bfile (viirs_file l1binfo)
 
int init_viirs_geofile (viirs_file geoinfo)
 
int openl1b_viirs_nc (filehandle *l1file)
 
int read_var_1line (var_str_nc *var, size_t iline)
 
int scale_short (var_str_nc *var, float *dest)
 
int scale_l1bvals (l1str *l1rec)
 
int readl1b_viirs_nc (filehandle *l1file, const int32_t iline, l1str *l1rec)
 
int readl1b_lonlat_viirs_nc (filehandle *l1file, const int32_t iline, l1str *l1rec)
 
void flag_bowtie_deleted (l1str *l1rec, size_t ipix, int extract_offset)
 
int closel1b_viirs_nc ()
 

Detailed Description

Reads VIIRS Level 1B and geolocation data from NetCDF4 files.

Author
Gwyn Fireman
Ocean Ecology Laboratory, NASA Goddard Space Flight Center

Definition in file l1b_viirs_nc.c.

Macro Definition Documentation

◆ MAXBANDS

#define MAXBANDS   16

Definition at line 172 of file l1b_viirs_nc.c.

Typedef Documentation

◆ ushort

typedef unsigned short ushort

Definition at line 16 of file l1b_viirs_nc.c.

Enumeration Type Documentation

◆ bandtypes

enum bandtypes
Enumerator
RSB 
TEB 
CIR 

Definition at line 148 of file l1b_viirs_nc.c.

◆ geo_var

enum geo_var
Enumerator
GEO_LAT 
GEO_LON 
GEO_HGT 
GEO_SENA 
GEO_SENZ 
GEO_SOLA 
GEO_SOLZ 
GEO_QUAL 
NVARS_GEO 

Definition at line 96 of file l1b_viirs_nc.c.

◆ l1bscn_var

enum l1bscn_var
Enumerator
L1BSCN_STIME 
L1BSCN_MODE 
L1BSCN_QUAL 
NVARS_L1BSCN 

Definition at line 127 of file l1b_viirs_nc.c.

◆ nav_var

enum nav_var
Enumerator
NAV_ANG 
NAV_POS 
NAV_VEL 
NVARS_NAV 

Definition at line 65 of file l1b_viirs_nc.c.

◆ scn_var

enum scn_var
Enumerator
SCN_STIME 
SCN_MSIDE 
SCN_MODE 
SCN_QUAL 
NVARS_SCN 

Definition at line 42 of file l1b_viirs_nc.c.

Function Documentation

◆ closel1b_viirs_nc()

int closel1b_viirs_nc ( )

Definition at line 899 of file l1b_viirs_nc.c.

◆ flag_bowtie_deleted()

void flag_bowtie_deleted ( l1str *  l1rec,
size_t  ipix,
int  extract_offset 
)

Definition at line 881 of file l1b_viirs_nc.c.

◆ init_viirs_file()

int init_viirs_file ( const char  filename[FILENAME_MAX],
viirs_file info 
)

Definition at line 217 of file l1b_viirs_nc.c.

◆ init_viirs_geofile()

int init_viirs_geofile ( viirs_file  geoinfo)

Definition at line 336 of file l1b_viirs_nc.c.

◆ init_viirs_l1bfile()

int init_viirs_l1bfile ( viirs_file  l1binfo)

Definition at line 292 of file l1b_viirs_nc.c.

◆ openl1b_viirs_nc()

int openl1b_viirs_nc ( filehandle *  l1file)

Definition at line 426 of file l1b_viirs_nc.c.

◆ print_viirs_file()

void print_viirs_file ( const viirs_file  info)

Definition at line 207 of file l1b_viirs_nc.c.

◆ read_var_1line()

int read_var_1line ( var_str_nc var,
size_t  iline 
)

Definition at line 517 of file l1b_viirs_nc.c.

◆ readl1b_lonlat_viirs_nc()

int readl1b_lonlat_viirs_nc ( filehandle *  l1file,
const int32_t  iline,
l1str *  l1rec 
)

Definition at line 860 of file l1b_viirs_nc.c.

◆ readl1b_viirs_nc()

int readl1b_viirs_nc ( filehandle *  l1file,
const int32_t  iline,
l1str *  l1rec 
)

Definition at line 724 of file l1b_viirs_nc.c.

◆ scale_l1bvals()

int scale_l1bvals ( l1str *  l1rec)

Definition at line 579 of file l1b_viirs_nc.c.

◆ scale_short()

int scale_short ( var_str_nc var,
float *  dest 
)

Definition at line 545 of file l1b_viirs_nc.c.