ECC-969: clean up

This commit is contained in:
Shahram Najm 2019-08-22 14:51:49 +01:00
parent a76e885870
commit 56aca66573
2 changed files with 6 additions and 5 deletions

View File

@ -48,11 +48,11 @@ static int split_file(FILE* in, const char* filename, const int nchunks, unsigne
fseeko(in, 0, SEEK_END); fseeko(in, 0, SEEK_END);
insize = ftello(in); insize = ftello(in);
fseeko(in, 0, SEEK_SET); fseeko(in, 0, SEEK_SET);
if(nchunks == -1){ if (nchunks == -1) {
chunk_size = size; chunk_size = size;
}else{ } else {
assert(nchunks > 0); assert(nchunks > 0);
chunk_size=insize/nchunks; chunk_size=insize/nchunks;
} }
i=1; i=1;

View File

@ -3,6 +3,7 @@ NAME codes_split_file
DESCRIPTION DESCRIPTION
Split an input file (GRIB, BUFR etc) into chunks of roughly the same size. The output files are named input_01, input_02 etc. This is much faster than grib_copy/bufr_copy. Split an input file (GRIB, BUFR etc) into chunks of roughly the same size. The output files are named input_01, input_02 etc. This is much faster than grib_copy/bufr_copy.
If the nchunks argument is -1, then the file is split into the individual messages.
USAGE USAGE
codes_split_file [-v] nchunks input codes_split_file [-v] nchunks input