mirror of https://github.com/ecmwf/eccodes.git
ECC-969: clean up
This commit is contained in:
parent
a76e885870
commit
56aca66573
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue