NCEPLIBS-bufr 11.7.1
|
Split a BUFR file into separate BUFR files by message. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
#include <unistd.h>
#include <sys/stat.h>
#include "bufrlib.h"
Go to the source code of this file.
Macros | |
#define | MXFLEN 125 |
Functions | |
int | main (int argc, char *argv[]) |
This program splits a single file containing one or more BUFR messages into one or more BUFR files each containing a single BUFR message. More... | |
void | prtusage (char *prgnam) |
This function prints program usage information to standard output. More... | |
Split a BUFR file into separate BUFR files by message.
Definition in file xbfmg.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
This program splits a single file containing one or more BUFR messages into one or more BUFR files each containing a single BUFR message.
The output BUFR files are written to the current working directory, according to a pre-defined naming convention as described below.
Usage
xbfmg [-v] [-h] [-g] bufrfile where: -v prints version information and exits -h prints program help and usage information and exits -g preserves within each output file any GTS bulletin header and control characters associated with the corresponding BUFR message from the input file bufrfile [path/]name of input file containing one or more BUFR messages to be extracted into separate output files within the current working directory The output will be stored within the current working directory using the following filenames: (basename).xbfmg.out.000001 (basename).xbfmg.out.000002 (basename).xbfmg.out.000003 and so on, up through (basename).xbfmg.out.(last#) where: (basename) = basename of bufrfile (last#) = total number of BUFR messages in bufrfile
Program history log:
Date | Programmer | Comments |
---|---|---|
2018-03-01 | J. Ator | Original author |
2021-09-29 | J. Ator | Use basename instead of pid in output filenames |
2021-10-08 | J. Ator | Simplify bvstr instantiation and initialization |