OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
smigen.cpp File Reference
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <libgen.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include "netcdf.h"
#include "smiinc.h"
#include "smigen_input.h"
#include "palette.h"
#include "hdf.h"
#include "hdf5.h"
#include "hdf_bin.h"
#include "smi_maplists.h"
#include "genutils.h"
#include <timeutils.h>
Include dependency graph for smigen.cpp:

Go to the source code of this file.

Macros

#define PI2   1.570796326794897
 
#define PI   3.141592653589793
 
#define CMD_ARGS   "p:r:w:g:" /* Valid commandline options */
 
#define BYTE   unsigned char
 
#define MAX_NUM_INPUTROW   1000
 
#define VERSION   L3M_SOFTVER_VAL
 

Functions

int32 read_attrs (int32, meta_l3bType *)
 
int getlut_file (char *lut_file, short *rlut, short *glut, short *blut)
 
int32_t put_smi (char *l3m_path, char *l3m_name, uint8 *l3m_data, int32 *dim_sizes, float32 *lat_range, float32 *lon_range, char *measure, char *scale_type, float32 *si_used, float32 *aminmax, char *atype, char *aopt, char *infiles, float32 *l3m_dminmax, meta_l3bType *meta_l3b, unsigned char *map_palette, char *softid, char *proc_con, instr input, char *precision, uint8 *qual_byt, uint8 isHDF5, VOIDP fill)
 
int smigen_input (int argc, char **argv, instr *input)
 
void set_param_string (instr *input_str)
 
void usage (const char *progname)
 
int main (int argc, char **argv)
 
int32 open_input_hdf (char *hdf_file, char *pname, int32 *fid, int32 *sdfid, int32 *vgid, int32 vdata_id[], meta_l3bType *meta_l3b)
 
int32 open_input_hdf5 (char *hdf5_file, char *pname, Hdf::hdf5_bin *input_binfile, hid_t *bin_dataset_idx)
 
int32 open_input_ncdf4 (int ncid, const char *pname, size_t *nrows, int *grpid, int *binindex_id, int *binlist_id, int *bindata_id, int *binqual_id, meta_l3bType *meta_l3b)
 
int32 close_input_hdf (int32 fid, int32 sdfid, int32 vgid, int32 vdata_id[1])
 
int get_minmax_rowcol (float32 lat_range[], float32 lon_range[], char *proj_type, int32 out_rows, int32 *min_out_row, int32 *max_out_row, int32 *min_out_col, int32 *max_out_col)
 

Variables

int32 nrows
 
int32 L3M_PARAMS = 0
 
char ** parmname_list
 
char ** parmname_short
 
char ** unit_list
 
char ** scaling_list
 
float32 * maximum_list
 
float32 * minimum_list
 
char ** palette_list
 
char ** precision_list
 

Macro Definition Documentation

◆ BYTE

#define BYTE   unsigned char

Definition at line 32 of file smigen.cpp.

◆ CMD_ARGS

#define CMD_ARGS   "p:r:w:g:" /* Valid commandline options */

Definition at line 31 of file smigen.cpp.

◆ MAX_NUM_INPUTROW

#define MAX_NUM_INPUTROW   1000

Definition at line 34 of file smigen.cpp.

◆ PI

#define PI   3.141592653589793

Definition at line 29 of file smigen.cpp.

◆ PI2

#define PI2   1.570796326794897

Definition at line 28 of file smigen.cpp.

◆ VERSION

#define VERSION   L3M_SOFTVER_VAL

Definition at line 36 of file smigen.cpp.

Function Documentation

◆ close_input_hdf()

int32 close_input_hdf ( int32  fid,
int32  sdfid,
int32  vgid,
int32  vdata_id[1] 
)

Definition at line 2308 of file smigen.cpp.

◆ get_minmax_rowcol()

int get_minmax_rowcol ( float32  lat_range[],
float32  lon_range[],
char *  proj_type,
int32  out_rows,
int32 *  min_out_row,
int32 *  max_out_row,
int32 *  min_out_col,
int32 *  max_out_col 
)

Definition at line 2324 of file smigen.cpp.

◆ getlut_file()

int getlut_file ( char *  lut_file,
short *  rlut,
short *  glut,
short *  blut 
)

Definition at line 8 of file getlut_file.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 284 of file smigen.cpp.

◆ open_input_hdf()

int32 open_input_hdf ( char *  hdf_file,
char *  pname,
int32 *  fid,
int32 *  sdfid,
int32 *  vgid,
int32  vdata_id[],
meta_l3bType meta_l3b 
)

Definition at line 2142 of file smigen.cpp.

◆ open_input_hdf5()

int32 open_input_hdf5 ( char *  hdf5_file,
char *  pname,
Hdf::hdf5_bin input_binfile,
hid_t *  bin_dataset_idx 
)

Definition at line 2246 of file smigen.cpp.

◆ open_input_ncdf4()

int32 open_input_ncdf4 ( int  ncid,
const char *  pname,
size_t *  nrows,
int *  grpid,
int *  binindex_id,
int *  binlist_id,
int *  bindata_id,
int *  binqual_id,
meta_l3bType meta_l3b 
)

Definition at line 2274 of file smigen.cpp.

◆ put_smi()

int32_t put_smi ( char *  l3m_path,
char *  l3m_name,
uint8 *  l3m_data,
int32 *  dim_sizes,
float32 *  lat_range,
float32 *  lon_range,
char *  measure,
char *  scale_type,
float32 *  si_used,
float32 *  aminmax,
char *  atype,
char *  aopt,
char *  infiles,
float32 *  l3m_dminmax,
meta_l3bType meta_l3b,
unsigned char *  map_palette,
char *  softid,
char *  proc_con,
instr  input,
char *  precision,
uint8 *  qual_byt,
uint8  isHDF5,
VOIDP  fill 
)

◆ read_attrs()

int32 read_attrs ( int32  ,
meta_l3bType  
)

◆ set_param_string()

void set_param_string ( instr *  input_str)

Definition at line 138 of file smigen_input.c.

◆ smigen_input()

int smigen_input ( int  argc,
char **  argv,
instr *  input 
)

Definition at line 70 of file smigen_input.c.

◆ usage()

void usage ( const char *  progname)

Definition at line 252 of file smigen.cpp.

Variable Documentation

◆ L3M_PARAMS

int32 L3M_PARAMS = 0

Definition at line 42 of file smigen.cpp.

◆ maximum_list

float32* maximum_list

Definition at line 47 of file smigen.cpp.

◆ minimum_list

float32* minimum_list

Definition at line 48 of file smigen.cpp.

◆ nrows

int32 nrows

Definition at line 40 of file smigen.cpp.

◆ palette_list

char** palette_list

Definition at line 49 of file smigen.cpp.

◆ parmname_list

char** parmname_list

Definition at line 43 of file smigen.cpp.

◆ parmname_short

char** parmname_short

Definition at line 44 of file smigen.cpp.

◆ precision_list

char** precision_list

Definition at line 50 of file smigen.cpp.

◆ scaling_list

char** scaling_list

Definition at line 46 of file smigen.cpp.

◆ unit_list

char** unit_list

Definition at line 45 of file smigen.cpp.