NASA Logo
Ocean Color Science Software

ocssw V2022
l1_viirs_h5.c File Reference
#include "libnav.h"
#include "l1_viirs_h5.h"
#include "l1.h"
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <dirent.h>
#include <libgen.h>
#include <ctype.h>
Include dependency graph for l1_viirs_h5.c:

Go to the source code of this file.

Macros

#define MAXBANDS   16
 
#define STDMAXSCANS   48 /* for std granule - max # scans */
 
#define NDET   16
 
#define N_MS   2
 
#define NAGGPX   3200
 
#define NUMERATOR   0
 
#define DENOMINATOR   1
 
#define near(x, y)   ( fabsf( x - y ) < 0.001 )
 
#define NA_FLOAT32_FILL   -999.9f /* Algorithm Exclusions */
 
#define NA_UINT16_FILL   65535
 
#define MISS_FLOAT32_FILL   -999.8f /* Missing at Time of Processing */
 
#define MISS_UINT16_FILL   65534
 
#define ONBOARD_PT_FLOAT32_FILL   -999.7f /* Onboard Pixel Trimi (bow tie) */
 
#define ONBOARD_PT_UINT16_FILL   65533
 
#define ONGROUND_PT_FLOAT32_FILL   -999.6f /* On-ground Pixel Trim */
 
#define ONGROUND_PT_UINT16_FILL   65532
 
#define ERR_FLOAT32_FILL   -999.5f /* Cannot Calculate */
 
#define ERR_UINT16_FILL   65531
 
#define ELINT_FLOAT32_FILL   -999.4f /* Ellipsoid Intersection Failed */
 
#define ELINT_UINT16_FILL   65530
 
#define VDNE_FLOAT32_FILL   -999.3f /* Value Does Not Exist */
 
#define VDNE_UINT16_FILL   65529
 
#define SOUB_FLOAT32_FILL   -999.2f /* Scaling Out Of Bounds */
 
#define SOUB_UINT16_FILL   65528
 
#define VSWIR   0
 
#define THERM   1
 
#define CIRRUS   2
 

Functions

int gen_sdr_suite (char *)
 
int set_f_cal_corr (h5io_str *, filehandle *, int64_t)
 
int rd_vir_f_tbl (char *, int64_t, int)
 
void fix_viirs_filename (char *name)
 
int h5ReadAttrInt32 (h5io_str *id, char *attr_name, int32_t *val)
 
int openl1_viirs_h5 (filehandle *file)
 
int readl1_viirs_h5 (filehandle *file, int32_t dline, l1str *l1rec, int lonlat)
 
int closel1_viirs_h5 (filehandle *file)
 

Macro Definition Documentation

◆ CIRRUS

#define CIRRUS   2

Definition at line 82 of file l1_viirs_h5.c.

◆ DENOMINATOR

#define DENOMINATOR   1

Definition at line 29 of file l1_viirs_h5.c.

◆ ELINT_FLOAT32_FILL

#define ELINT_FLOAT32_FILL   -999.4f /* Ellipsoid Intersection Failed */

Definition at line 43 of file l1_viirs_h5.c.

◆ ELINT_UINT16_FILL

#define ELINT_UINT16_FILL   65530

Definition at line 44 of file l1_viirs_h5.c.

◆ ERR_FLOAT32_FILL

#define ERR_FLOAT32_FILL   -999.5f /* Cannot Calculate */

Definition at line 41 of file l1_viirs_h5.c.

◆ ERR_UINT16_FILL

#define ERR_UINT16_FILL   65531

Definition at line 42 of file l1_viirs_h5.c.

◆ MAXBANDS

#define MAXBANDS   16

Definition at line 23 of file l1_viirs_h5.c.

◆ MISS_FLOAT32_FILL

#define MISS_FLOAT32_FILL   -999.8f /* Missing at Time of Processing */

Definition at line 35 of file l1_viirs_h5.c.

◆ MISS_UINT16_FILL

#define MISS_UINT16_FILL   65534

Definition at line 36 of file l1_viirs_h5.c.

◆ N_MS

#define N_MS   2

Definition at line 26 of file l1_viirs_h5.c.

◆ NA_FLOAT32_FILL

#define NA_FLOAT32_FILL   -999.9f /* Algorithm Exclusions */

Definition at line 33 of file l1_viirs_h5.c.

◆ NA_UINT16_FILL

#define NA_UINT16_FILL   65535

Definition at line 34 of file l1_viirs_h5.c.

◆ NAGGPX

#define NAGGPX   3200

Definition at line 27 of file l1_viirs_h5.c.

◆ NDET

#define NDET   16

Definition at line 25 of file l1_viirs_h5.c.

◆ near

#define near (   x,
 
)    ( fabsf( x - y ) < 0.001 )

Definition at line 30 of file l1_viirs_h5.c.

◆ NUMERATOR

#define NUMERATOR   0

Definition at line 28 of file l1_viirs_h5.c.

◆ ONBOARD_PT_FLOAT32_FILL

#define ONBOARD_PT_FLOAT32_FILL   -999.7f /* Onboard Pixel Trimi (bow tie) */

Definition at line 37 of file l1_viirs_h5.c.

◆ ONBOARD_PT_UINT16_FILL

#define ONBOARD_PT_UINT16_FILL   65533

Definition at line 38 of file l1_viirs_h5.c.

◆ ONGROUND_PT_FLOAT32_FILL

#define ONGROUND_PT_FLOAT32_FILL   -999.6f /* On-ground Pixel Trim */

Definition at line 39 of file l1_viirs_h5.c.

◆ ONGROUND_PT_UINT16_FILL

#define ONGROUND_PT_UINT16_FILL   65532

Definition at line 40 of file l1_viirs_h5.c.

◆ SOUB_FLOAT32_FILL

#define SOUB_FLOAT32_FILL   -999.2f /* Scaling Out Of Bounds */

Definition at line 47 of file l1_viirs_h5.c.

◆ SOUB_UINT16_FILL

#define SOUB_UINT16_FILL   65528

Definition at line 48 of file l1_viirs_h5.c.

◆ STDMAXSCANS

#define STDMAXSCANS   48 /* for std granule - max # scans */

Definition at line 24 of file l1_viirs_h5.c.

◆ THERM

#define THERM   1

Definition at line 81 of file l1_viirs_h5.c.

◆ VDNE_FLOAT32_FILL

#define VDNE_FLOAT32_FILL   -999.3f /* Value Does Not Exist */

Definition at line 45 of file l1_viirs_h5.c.

◆ VDNE_UINT16_FILL

#define VDNE_UINT16_FILL   65529

Definition at line 46 of file l1_viirs_h5.c.

◆ VSWIR

#define VSWIR   0

Definition at line 80 of file l1_viirs_h5.c.

Function Documentation

◆ closel1_viirs_h5()

int closel1_viirs_h5 ( filehandle *  file)

Definition at line 1754 of file l1_viirs_h5.c.

◆ fix_viirs_filename()

void fix_viirs_filename ( char *  name)

Definition at line 88 of file l1_viirs_h5.c.

◆ gen_sdr_suite()

int gen_sdr_suite ( char *  in_file)

Definition at line 129 of file l1_viirs_h5.c.

◆ h5ReadAttrInt32()

int h5ReadAttrInt32 ( h5io_str *  id,
char *  attr_name,
int32_t *  val 
)

This function reads a numeric attribute and converts it to a 32 bit int.

Parameters
idHDF5 id for group or file
attr_namename of the attribute to read
valpointer to the 32 bit int where the value will be written
Returns
0 for OK, else 1 for bad

Definition at line 577 of file l1_viirs_h5.c.

◆ openl1_viirs_h5()

int openl1_viirs_h5 ( filehandle *  file)

Definition at line 622 of file l1_viirs_h5.c.

◆ rd_vir_f_tbl()

int rd_vir_f_tbl ( char *  file,
int64_t  u58_time,
int  corr_loc 
)

Definition at line 416 of file l1_viirs_h5.c.

◆ readl1_viirs_h5()

int readl1_viirs_h5 ( filehandle *  file,
int32_t  dline,
l1str *  l1rec,
int  lonlat 
)

Definition at line 1404 of file l1_viirs_h5.c.

◆ set_f_cal_corr()

int set_f_cal_corr ( h5io_str *  g_id,
filehandle *  file,
int64_t  u58_time 
)

Definition at line 239 of file l1_viirs_h5.c.