JURASSIC
Functions
tblfmt.c File Reference

Convert look-up table file format. More...

#include "jurassic.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Convert look-up table file format.

Definition in file tblfmt.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 27 of file tblfmt.c.

29 {
30
31 ctl_t ctl;
32
33 tbl_t *tbl;
34
35 /* Check arguments... */
36 if (argc < 6)
37 ERRMSG("Give parameters: <ctl> <tblbase_in> <tblfmt_in>"
38 " <tblbase_out> <tblfmt_out>");
39
40 /* Read control parameters... */
41 read_ctl(argc, argv, &ctl);
42
43 /* Allocate... */
44 ALLOC(tbl, tbl_t, 1);
45
46 /* Read tables... */
47 sprintf(ctl.tblbase, "%s", argv[2]);
48 ctl.tblfmt = atoi(argv[3]);
49 read_tbl(&ctl, tbl);
50
51 /* Write tables... */
52 sprintf(ctl.tblbase, "%s", argv[4]);
53 ctl.tblfmt = atoi(argv[5]);
54 write_tbl(&ctl, tbl);
55
56 /* Free... */
57 free(tbl);
58
59 return EXIT_SUCCESS;
60}
void read_tbl(const ctl_t *ctl, tbl_t *tbl)
Read look-up table data.
Definition: jurassic.c:4952
void read_ctl(int argc, char *argv[], ctl_t *ctl)
Read forward model control parameters.
Definition: jurassic.c:4550
void write_tbl(const ctl_t *ctl, const tbl_t *tbl)
Write look-up table data.
Definition: jurassic.c:5813
#define ERRMSG(...)
Print error message and quit program.
Definition: jurassic.h:237
#define ALLOC(ptr, type, n)
Allocate memory.
Definition: jurassic.h:121
Forward model control parameters.
Definition: jurassic.h:541
char tblbase[LEN]
Basename for table files and filter function files.
Definition: jurassic.h:580
int tblfmt
Look-up table file format (1=ASCII, 2=binary).
Definition: jurassic.h:583
Emissivity look-up tables.
Definition: jurassic.h:778
Here is the call graph for this function: