JURASSIC
Functions
atmfmt.c File Reference

Convert atmospheric data files. More...

#include "jurassic.h"

Go to the source code of this file.

Functions

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

Detailed Description

Convert atmospheric data files.

Definition in file atmfmt.c.

Function Documentation

◆ main()

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

Definition at line 27 of file atmfmt.c.

29 {
30
31 ctl_t ctl;
32
33 static atm_t atm;
34
35 /* Check arguments... */
36 if (argc < 6)
37 ERRMSG("Give parameters: <ctl> <atm_in> <atmfmt_in>"
38 " <atm_out> <atmfmt_out>");
39
40 /* Read control parameters... */
41 read_ctl(argc, argv, &ctl);
42
43 /* Read atmospheric data... */
44 ctl.atmfmt = atoi(argv[3]);
45 read_atm(NULL, argv[2], &ctl, &atm);
46
47 /* Write atmospheric data... */
48 ctl.atmfmt = atoi(argv[5]);
49 write_atm(NULL, argv[4], &ctl, &atm);
50
51 return EXIT_SUCCESS;
52}
void write_atm(const char *dirname, const char *filename, const ctl_t *ctl, const atm_t *atm)
Write atmospheric data to a file.
Definition: jurassic.c:6604
void read_ctl(int argc, char *argv[], ctl_t *ctl)
Read model control parameters from command-line and configuration input.
Definition: jurassic.c:5322
void read_atm(const char *dirname, const char *filename, const ctl_t *ctl, atm_t *atm)
Read atmospheric input data from a file.
Definition: jurassic.c:5109
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.
Definition: jurassic.h:948
Atmospheric profile data.
Definition: jurassic.h:998
Control parameters.
Definition: jurassic.h:1051
int atmfmt
Atmospheric data file format (1=ASCII, 2=binary).
Definition: jurassic.h:1108
Here is the call graph for this function: