29 {
30
32
34
35
36 if (argc < 6)
37 ERRMSG(
"Give parameters: <ctl> <atm_in> <atm_in_type>"
38 " <atm_out> <atm_out_type>");
39
40
42
43
45
46
49 ERRMSG(
"Cannot open file!");
50
51
53
57 } else {
58
61 }
62
63
64 free(atm);
65
66 return EXIT_SUCCESS;
67}
void write_atm(const char *filename, const ctl_t *ctl, const atm_t *atm, const double t)
Writes air parcel data to a file in various formats.
void read_ctl(const char *filename, int argc, char *argv[], ctl_t *ctl)
Reads control parameters from a configuration file and populates the given structure.
int read_atm(const char *filename, const ctl_t *ctl, atm_t *atm)
Reads air parcel data from a specified file into the given atmospheric structure.
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.
#define ALLOC(ptr, type, n)
Allocate memory for a pointer with error handling.
int atm_type
Type of atmospheric data files (0=ASCII, 1=binary, 2=netCDF, 3=CLaMS_traj, 4=CLaMS_pos).
int atm_type_out
Type of atmospheric data files for output (-1=same as ATM_TYPE, 0=ASCII, 1=binary,...
double t_stop
Stop time of simulation [s].
double t_start
Start time of simulation [s].