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-2025 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 /* Check arguments... */
34 if (argc < 6)
35 ERRMSG("Give parameters: <ctl> <tblbase_in> <tblfmt_in>"
36 " <tblbase_out> <tblfmt_out>");
37
38 /* Read control parameters... */
39 read_ctl(argc, argv, &ctl);
40
41 /* Read tables... */
42 sprintf(ctl.tblbase, "%s", argv[2]);
43 ctl.tblfmt = atoi(argv[3]);
44 tbl_t *tbl = read_tbl(&ctl);
45
46 /* Write tables... */
47 sprintf(ctl.tblbase, "%s", argv[4]);
48 ctl.tblfmt = atoi(argv[5]);
49 write_tbl(&ctl, tbl);
50
51 /* Free... */
52 free(tbl);
53
54 return EXIT_SUCCESS;
55}
void read_ctl(int argc, char *argv[], ctl_t *ctl)
Read forward model control parameters.
Definition: jurassic.c:4686
void write_tbl(const ctl_t *ctl, const tbl_t *tbl)
Write look-up table data.
Definition: jurassic.c:5974
tbl_t * read_tbl(const ctl_t *ctl)
Read look-up table data.
Definition: jurassic.c:5104
JURASSIC library declarations.
#define ERRMSG(...)
Print error message and quit program.
Definition: jurassic.h:238
Forward model control parameters.
Definition: jurassic.h:547
char tblbase[LEN]
Basename for table files and filter function files.
Definition: jurassic.h:598
int tblfmt
Look-up table file format (1=ASCII, 2=binary).
Definition: jurassic.h:601
Emissivity look-up tables.
Definition: jurassic.h:805
int main(int argc, char *argv[])
Definition: tblfmt.c:27