JURASSIC
tblfmt.c
Go to the documentation of this file.
1/*
2 This file is part of JURASSIC.
3
4 JURASSIC is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 JURASSIC is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with JURASSIC. If not, see <http://www.gnu.org/licenses/>.
16
17 Copyright (C) 2013-2021 Forschungszentrum Juelich GmbH
18*/
19
25#include "jurassic.h"
26
27int main(
28 int argc,
29 char *argv[]) {
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_ctl(int argc, char *argv[], ctl_t *ctl)
Read forward model control parameters.
Definition: jurassic.c:4561
void read_tbl(ctl_t *ctl, tbl_t *tbl)
Read look-up table data.
Definition: jurassic.c:4963
void write_tbl(ctl_t *ctl, tbl_t *tbl)
Write look-up table data.
Definition: jurassic.c:5837
JURASSIC library declarations.
#define ERRMSG(...)
Print error message and quit program.
Definition: jurassic.h:217
#define ALLOC(ptr, type, n)
Allocate memory.
Definition: jurassic.h:121
Forward model control parameters.
Definition: jurassic.h:521
char tblbase[LEN]
Basename for table files and filter function files.
Definition: jurassic.h:560
int tblfmt
Look-up table file format (1=ASCII, 2=binary).
Definition: jurassic.h:563
Emissivity look-up tables.
Definition: jurassic.h:758
int main(int argc, char *argv[])
Definition: tblfmt.c:27