29 {
30
32
34
36
38
39
40 if (argc < 6)
41 ERRMSG(
"Give parameters: <ctl> <met_in> <met_in_type>"
42 " <met_out> <met_out_type>");
43
44
48
49
51
52
54
55
57
58
61 ERRMSG(
"Cannot open file!");
62
63
66
67
70
71
72 free(clim);
73 free(met);
74
75 return EXIT_SUCCESS;
76}
void mptrac_read_clim(const ctl_t *ctl, clim_t *clim)
Reads various climatological data and populates the given climatology structure.
int mptrac_read_met(const char *filename, const ctl_t *ctl, const clim_t *clim, met_t *met, dd_t *dd)
Reads meteorological data from a file, supporting multiple formats and MPI broadcasting.
void mptrac_read_ctl(const char *filename, int argc, char *argv[], ctl_t *ctl)
Reads control parameters from a configuration file and populates the given structure.
void mptrac_write_met(const char *filename, const ctl_t *ctl, met_t *met)
Writes meteorological data to a file, supporting multiple formats and compression options.
#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.
#define START_TIMERS
Starts a timer for tracking.
#define PRINT_TIMERS
Print the current state of all timers.
#define STOP_TIMERS
Stop the current timer.
int met_type
Type of meteo data files (0=netCDF, 1=binary, 2=pck, 3=ZFP, 4=ZSTD, 5=cms, 6=grib,...
Domain decomposition data structure.