56 ERRMSG(
"Missing or invalid command-line arguments.\n\n"
57 "Usage: met_conv <ctl> <met_in> <met_in_type> <met_out> <met_out_type>\n\n"
58 "Use -h for full help.");
74 ERRMSG(
"Cannot open file!");
97 printf(
"\nMPTRAC met_conv tool.\n\n");
98 printf(
"Convert meteorological data between file formats.\n");
102 (
" met_conv <ctl> <met_in> <met_in_type> <met_out> <met_out_type>\n");
104 printf(
"Arguments:\n");
105 printf(
" <ctl> Control file.\n");
106 printf(
" <met_in> Meteorological input file.\n");
108 (
" <met_in_type> Input format: 0=netCDF, 1=binary, 2=pck, 3=zfp,\n");
109 printf(
" 4=zstd, 5=cms, 6=GRIB, 7=SZ3.\n");
110 printf(
" <met_out> Meteorological output file.\n");
112 (
" <met_out_type> Output format: 0=netCDF, 1=binary, 2=pck, 3=zfp,\n");
113 printf(
" 4=zstd, 5=cms, 6=GRIB, 7=SZ3.\n");
114 printf(
"\nFurther information:\n");
115 printf(
" Manual: https://slcs-jsc.github.io/mptrac/\n");
int main(int argc, char *argv[])
void usage(void)
Print command-line help.
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.
MPTRAC library declarations.
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.
#define USAGE
Print usage information on -h or --help.
#define ALLOC(ptr, type, n)
Allocate memory for a pointer with error handling.
#define PRINT_TIMERS
Print the current state of all timers.
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.