From aea8071594d4c490f0f0378ed6e151c3f3ebe281 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 17 Mar 2015 17:18:18 +0000 Subject: [PATCH] Added test data downloads for GTS --- data/CMakeLists.txt | 1 + data/download.sh | 9 +++++---- data/gts/CMakeLists.txt | 26 ++++++++++++++++++++++++++ data/gts/gts_data_files.txt | 1 + data/gts/gts_ref_files.txt | 1 + 5 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 data/gts/CMakeLists.txt create mode 100644 data/gts/gts_data_files.txt create mode 100644 data/gts/gts_ref_files.txt diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 85b27cd1a..efc5a3124 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,6 +1,7 @@ # data/CMakeLists.txt add_subdirectory(tigge) add_subdirectory(bufr) +add_subdirectory(gts) # Download all the binary GRIB data from website diff --git a/data/download.sh b/data/download.sh index 4ac08a37c..902ddad34 100755 --- a/data/download.sh +++ b/data/download.sh @@ -36,11 +36,12 @@ if [ -z "$DATA_DIR" ]; then exit 1 fi -gfiles=`cat $DATA_DIR/grib_data_files.txt` -tfiles=`cat $DATA_DIR/tigge/tigge_data_files.txt | sed -e 's:^:tigge/:'` -bfiles=`cat $DATA_DIR/bufr/bufr_data_files.txt $DATA_DIR/bufr/bufr_ref_files.txt | sed -e 's:^:bufr/:'` +grib_files=`cat $DATA_DIR/grib_data_files.txt` +tigge_files=`cat $DATA_DIR/tigge/tigge_data_files.txt | sed -e 's:^:tigge/:'` +bufr_files=`cat $DATA_DIR/bufr/bufr_data_files.txt $DATA_DIR/bufr/bufr_ref_files.txt | sed -e 's:^:bufr/:'` +gts_files=`cat $DATA_DIR/gts/gts_data_files.txt $DATA_DIR/gts/gts_ref_files.txt | sed -e 's:^:gts/:'` -files="$gfiles $tfiles $bfiles" +files="$grib_files $tigge_files $bufr_files $gts_files" if [ $CLEAN -eq 1 ]; then for f in $files; do diff --git a/data/gts/CMakeLists.txt b/data/gts/CMakeLists.txt new file mode 100644 index 000000000..c086fb090 --- /dev/null +++ b/data/gts/CMakeLists.txt @@ -0,0 +1,26 @@ +# data/gts/CMakeLists.txt +# Download all the GTS data and reference files from website +# + +FILE(READ "gts_data_files.txt" gts_files_to_download) +STRING(REGEX REPLACE "\n" ";" gts_files_to_download "${gts_files_to_download}") + +FILE(READ "gts_ref_files.txt" gts_refs_to_download) +STRING(REGEX REPLACE "\n" ";" gts_refs_to_download "${gts_refs_to_download}") + + +ecbuild_get_test_multidata( + TARGET get_gts + NOCHECK + NAMES ${gts_files_to_download} ${gts_refs_to_download} +) + +# Copy other files - e.g. text files etc from the source data/gts dir +LIST(APPEND other_files + gts_data_files.txt + gts_ref_files.txt +) + +foreach( file ${other_files} ) + execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR} ) +endforeach() diff --git a/data/gts/gts_data_files.txt b/data/gts/gts_data_files.txt new file mode 100644 index 000000000..eb4e911dd --- /dev/null +++ b/data/gts/gts_data_files.txt @@ -0,0 +1 @@ +EGRR20150317121020_00493212.DAT diff --git a/data/gts/gts_ref_files.txt b/data/gts/gts_ref_files.txt new file mode 100644 index 000000000..c2a4b86c7 --- /dev/null +++ b/data/gts/gts_ref_files.txt @@ -0,0 +1 @@ +EGRR20150317121020_00493212.DAT.ls.ref