mirror of https://github.com/ecmwf/eccodes.git
Rename tool bufr_split_by_subtype to bufr_split_by_rdbSubtype
This commit is contained in:
parent
5a23010bbc
commit
717aa9853a
|
@ -53,7 +53,7 @@ list( APPEND tests_no_data_reqd
|
|||
julian
|
||||
bufr_ecc-359
|
||||
bufr_ecc-517
|
||||
bufr_subTypes
|
||||
bufr_rdbSubTypes
|
||||
grib_efas
|
||||
grib_mars_types
|
||||
)
|
||||
|
@ -259,10 +259,10 @@ ecbuild_add_test( TARGET eccodes_t_grib_check_param_concepts
|
|||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_check_param_concepts.sh
|
||||
)
|
||||
|
||||
ecbuild_add_test( TARGET eccodes_t_bufr_split_by_subtype
|
||||
ecbuild_add_test( TARGET eccodes_t_bufr_split_by_rdbSubtype
|
||||
TYPE SCRIPT
|
||||
CONDITION ENABLE_EXTRA_TESTS AND ECCODES_INSTALL_EXTRA_TOOLS
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bufr_split_by_subtype.sh
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bufr_split_by_rdbSubtype.sh
|
||||
TEST_DEPENDS eccodes_download_bufrs
|
||||
)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
. ./include.sh
|
||||
|
||||
label="bufr_subTypes"
|
||||
label="bufr_rdbSubTypes"
|
||||
fBufr3Input=$ECCODES_SAMPLES_PATH/BUFR3_local.tmpl
|
||||
fBufr4Input=$ECCODES_SAMPLES_PATH/BUFR4_local.tmpl
|
||||
fBufrOutput=${label}".bufr.tmp"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
set -u
|
||||
|
||||
#Define a common label for all the tmp files
|
||||
label="bufr_split_by_subtype"
|
||||
label="bufr_split_by_rdbSubtype"
|
||||
temp=$label.temp
|
||||
fRules=${label}.filter
|
||||
|
||||
|
@ -22,26 +22,26 @@ mkdir -p $temp_dir
|
|||
cd $temp_dir
|
||||
|
||||
cat > $fRules <<EOF
|
||||
write "out.filter_by_subtype.[rdbSubtype].bufr";
|
||||
write "out.filter_by_rdbSubtype.[rdbSubtype].bufr";
|
||||
EOF
|
||||
|
||||
bufr_files=`cat ${data_dir}/bufr/bufr_data_files.txt`
|
||||
for f in ${bufr_files}; do
|
||||
fpath=${data_dir}/bufr/$f
|
||||
|
||||
# This will create output files like out.filter_by_subtype.*
|
||||
# This will create output files like out.filter_by_rdbSubtype.*
|
||||
${tools_dir}/codes_bufr_filter $fRules $fpath
|
||||
|
||||
# This will create output files like split_rdbSubtype*.bufr
|
||||
${tools_dir}/bufr_split_by_subtype -v $fpath
|
||||
${tools_dir}/bufr_split_by_rdbSubtype -v $fpath
|
||||
|
||||
for sp in out.filter_by_subtype.*; do
|
||||
for sp in out.filter_by_rdbSubtype.*; do
|
||||
st=`echo $sp | awk -F. '{print $3}'`
|
||||
${tools_dir}/bufr_compare $sp split_rdbSubtype.$st.bufr
|
||||
done
|
||||
|
||||
rm -f split_rdbSubtype*.bufr
|
||||
rm -f out.filter_by_subtype.*
|
||||
rm -f out.filter_by_rdbSubtype.*
|
||||
done
|
||||
|
||||
# Clean up
|
||||
|
|
|
@ -34,7 +34,7 @@ list( APPEND grib_tools_bins_EXTRA
|
|||
grib_repair
|
||||
grib_to_json
|
||||
grib_check_gaussian_grid
|
||||
bufr_split_by_subtype
|
||||
bufr_split_by_rdbSubtype
|
||||
)
|
||||
|
||||
# Install generic tools
|
||||
|
|
|
@ -26,7 +26,7 @@ static const char* OUTPUT_FILENAME_SUBTYPE = "split_rdbSubtype.%ld.bufr";
|
|||
|
||||
static void usage(const char* prog)
|
||||
{
|
||||
printf("usage: %s [-v] infile\n",prog);
|
||||
printf("Usage: %s [-v] infile\n",prog);
|
||||
exit(1);
|
||||
}
|
||||
static int file_exists(const char* path)
|
||||
|
|
Loading…
Reference in New Issue