diff --git a/test/soca/CMakeLists.txt b/test/soca/CMakeLists.txt index 65b4b1138..8a07298bb 100644 --- a/test/soca/CMakeLists.txt +++ b/test/soca/CMakeLists.txt @@ -2,52 +2,11 @@ # ------------------ set( TESTDATA ${PROJECT_BINARY_DIR}/test/testdata ) -# link input file from iodaconv to test directory -# test convert BUFR to IODA - -add_test(NAME test_gdasapp_convert_bufr_temp_dbuoy - COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_bufr2ioda.sh ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR} temp_bufr_dbuoyprof - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/) - -add_test(NAME test_gdasapp_convert_bufr_salt_dbuoy - COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_bufr2ioda.sh ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR} salt_bufr_dbuoyprof - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/) - -add_test(NAME test_gdasapp_convert_bufr_temp_mbuoyb - COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_bufr2ioda.sh ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR} temp_bufr_mbuoybprof - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/) - -add_test(NAME test_gdasapp_convert_bufr_salt_mbuoyb - COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_bufr2ioda.sh ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR} salt_bufr_mbuoybprof - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/) - -add_test(NAME test_gdasapp_convert_bufr_tesacprof - COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_bufr2ioda.sh ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR} bufr_tesacprof - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/) - -add_test(NAME test_gdasapp_convert_bufr_trkobprof - COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_bufr2ioda.sh ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR} bufr_trkobprof - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/) - -add_test(NAME test_gdasapp_convert_bufr_sfcships - COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_bufr2ioda.sh ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR} bufr_sfcships - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/) - -add_test(NAME test_gdasapp_convert_bufr_sfcshipsu - COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_bufr2ioda.sh ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR} bufr_sfcshipsu - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/) - # Symlink test input yaml files # ----------------------------- # create testinput dir file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test/soca/testinput) -# list of test input files to install -list(APPEND test_input - ${PROJECT_SOURCE_DIR}/parm/soca/obs/obs_list_small.yaml - ${PROJECT_SOURCE_DIR}/test/soca/testinput/dumy.yaml - ) - # symlink foreach(FILENAME ${test_input}) get_filename_component(filename ${FILENAME} NAME ) diff --git a/test/soca/test_bufr2ioda.sh b/test/soca/test_bufr2ioda.sh deleted file mode 100755 index a6a9c0dbd..000000000 --- a/test/soca/test_bufr2ioda.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -x - -PROJECT_BINARY_DIR=${1} -CMAKE_BINARY_DIR=${2} -OBSSOURCE=${3} -CMD=${CMAKE_BINARY_DIR}/bin/bufr2ioda.x -OBSYAML=${PROJECT_BINARY_DIR}/test/testinput/${OBSSOURCE}.yaml - -OUTFILE=`grep obsdataout ${OBSYAML} | cut -d'"' -f2` - -echo "the following might not exist" -rm -v ${PROJECT_BINARY_DIR}/test/${OUTFILE} - -${CMD} ${OBSYAML} -rc=$? - -ls ${PROJECT_BINARY_DIR}/test/${OUTFILE} -ra=$? -rc=$((rc+ra)) - -export err=$rc - -exit $err diff --git a/test/testinput/bufr_sfcships.yaml b/test/testinput/bufr_sfcships.yaml deleted file mode 100644 index 3b43cd6e3..000000000 --- a/test/testinput/bufr_sfcships.yaml +++ /dev/null @@ -1,88 +0,0 @@ -observations: - - obs space: - name: bufr - obsdatain: "./testdata/ships.20180415_subsampled" - - exports: - variables: - timestamp: - datetime: - year: "*/YEAR" - month: "*/MNTH" - day: "*/DAYS" - hour: "*/HOUR" - minute: "*/MINU" - - rcptimestamp: - datetime: - year: "*/RCYR" - month: "*/RCMO" - day: "*/RCDY" - hour: "*/RCHR" - minute: "*/RCMI" - - stationID: - query: "*/RPID" - - longitude: - query: "*/CLON" - - latitude: - query: "*/CLAT" - - sst: - query: "*/SST1" - transforms: - - offset: -273.15 - - waterTemperatureMethod: - query: "*/MSST" - - ioda: - backend: netcdf - obsdataout: "./testoutput/bufr_sfcships_20180415.nc" - - globals: - - name: "dataType@MetaData" - type: string - value: "Surface Ship" - - variables: - - name: "dateTime@MetaData" - source: variables/timestamp - longName: "dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "rcpdateTime@MetaData" - source: variables/rcptimestamp - longName: "receipt dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "stationID@MetaData" - source: variables/stationID - longName: "Report Identifier" - units: "N/A" - - - name: "latitude@MetaData" - source: variables/latitude - longName: "Latitude" - units: "degrees_north" - range: [-90, 90] - - - name: "longitude@MetaData" - source: variables/longitude - longName: "Longitude" - units: "degrees_east" - range: [-180, 180] - - - name: "waterTemperatureMethod@MetaData" - source: variables/waterTemperatureMethod - longName: "Method of Water Temperature Measurement" - - - name: "sea_surface_temperature@ObsValue" - coordinates: "longitude latitude" - source: variables/sst - longName: "Sea Surface Temperature" - units: "deg C" - range: [-23.0, 40.0] - diff --git a/test/testinput/bufr_sfcshipsu.yaml b/test/testinput/bufr_sfcshipsu.yaml deleted file mode 100644 index f943db410..000000000 --- a/test/testinput/bufr_sfcshipsu.yaml +++ /dev/null @@ -1,88 +0,0 @@ -observations: - - obs space: - name: bufr - obsdatain: "./testdata/shipsu.20180415_subsampled" - - exports: - variables: - timestamp: - datetime: - year: "*/YEAR" - month: "*/MNTH" - day: "*/DAYS" - hour: "*/HOUR" - minute: "*/MINU" - - rcptimestamp: - datetime: - year: "*/RCYR" - month: "*/RCMO" - day: "*/RCDY" - hour: "*/RCHR" - minute: "*/RCMI" - - stationID: - query: "*/RPID" - - longitude: - query: "*/CLON" - - latitude: - query: "*/CLAT" - - sst: - query: "*/SST1" - transforms: - - offset: -273.15 - - waterTemperatureMethod: - query: "*/MSST" - - ioda: - backend: netcdf - obsdataout: "./testoutput/bufr_sfcshipsu_20180415.nc" - - globals: - - name: "dataType@MetaData" - type: string - value: "Surface Ship" - - variables: - - name: "dateTime@MetaData" - source: variables/timestamp - longName: "dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "rcpdateTime@MetaData" - source: variables/rcptimestamp - longName: "receipt dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "stationID@MetaData" - source: variables/stationID - longName: "Report Identifier" - units: "N/A" - - - name: "latitude@MetaData" - source: variables/latitude - longName: "Latitude" - units: "degrees_north" - range: [-90, 90] - - - name: "longitude@MetaData" - source: variables/longitude - longName: "Longitude" - units: "degrees_east" - range: [-180, 180] - - - name: "waterTemperatureMethod@MetaData" - source: variables/waterTemperatureMethod - longName: "Method of Water Temperature Measurement" - - - name: "sea_surface_temperature@ObsValue" - coordinates: "longitude latitude" - source: variables/sst - longName: "Sea Surface Temperature" - units: "deg C" - range: [-23.0, 40.0] - diff --git a/test/testinput/bufr_tesacprof.yaml b/test/testinput/bufr_tesacprof.yaml deleted file mode 100644 index 307168af0..000000000 --- a/test/testinput/bufr_tesacprof.yaml +++ /dev/null @@ -1,106 +0,0 @@ -observations: - - obs space: - name: bufr - obsdatain: "./testdata/tesac.201804.dcom_subsampled" - - exports: - group_by_variable: depth # Optional - variables: - timestamp: - datetime: - year: "*/YEAR" - month: "*/MNTH" - day: "*/DAYS" - hour: "*/HOUR" - minute: "*/MINU" - rcptimestamp: - datetime: - year: "*/RCYR" - month: "*/RCMO" - day: "*/RCDY" - hour: "*/RCHR" - minute: "*/RCMI" - stationID: - query: "*/RPID" - longitude: - query: "*/CLON" - latitude: - query: "*/CLAT" - depth: - query: "*/BTOCN/DBSS" - temp: - query: "*/BTOCN/STMP" - transforms: - - offset: -273.15 - saln: - query: "*/BTOCN/SALN" - filters: - - bounding: - variable: depth - lowerBound: 0 - upperBound: 10000 - variable: temp - lowerBound: 250.15 - upperBound: 313.15 - variable: saln - lowerBound: 0.0 - upperBound: 40.0 - - ioda: - backend: netcdf - obsdataout: "./testoutput/bufr_tesacprof_201804.nc" - - globals: - - name: "dataType-date" - type: string - value: "TESAC Temp & Salinity Profile - 201804" - - dimensions: - - name: nlevs - path: "*/BTOCN" - - variables: - - name: "dateTime@MetaData" - source: variables/timestamp - longName: "dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "rcpdateTime@MetaData" - source: variables/rcptimestamp - longName: "receipt dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "latitude@MetaData" - source: variables/latitude - longName: "Latitude" - units: "degrees_north" - range: [-90, 90] - - - name: "longitude@MetaData" - source: variables/longitude - longName: "Longitude" - units: "degrees_east" - range: [-180, 180] - - - name: "stationID@MetaData" - source: variables/stationID - longName: "sgn/Report Identifier" - units: "N/A" - - - name: "depth@MetaData" - source: variables/depth - longName: "Depth below sea surface" - units: "m" - - - name: "sea_water_temperature@ObsValue" - source: variables/temp - longName: "Temperature at depth" - units: "deg C" - range: [-23.0, 40.0] - - - name: "sea_water_salinity@ObsValue" - source: variables/saln - longName: "Salinity at depth" - units: "psu" - range: [0.0, 40.0] - diff --git a/test/testinput/bufr_trkobprof.yaml b/test/testinput/bufr_trkobprof.yaml deleted file mode 100644 index b4e6c896d..000000000 --- a/test/testinput/bufr_trkobprof.yaml +++ /dev/null @@ -1,106 +0,0 @@ -observations: - - obs space: - name: bufr - obsdatain: "./testdata/trkob.201804.dcom_subsampled" - - exports: - group_by_variable: depth # Optional - variables: - timestamp: - datetime: - year: "*/YEAR" - month: "*/MNTH" - day: "*/DAYS" - hour: "*/HOUR" - minute: "*/MINU" - rcptimestamp: - datetime: - year: "*/RCYR" - month: "*/RCMO" - day: "*/RCDY" - hour: "*/RCHR" - minute: "*/RCMI" - stationID: - query: "*/RPID" - longitude: - query: "*/CLON" - latitude: - query: "*/CLAT" - depth: - query: "*/BTOCN/DBSS" - temp: - query: "*/BTOCN/STMP" - transforms: - - offset: -273.15 - saln: - query: "*/BTOCN/SALN" - filters: - - bounding: - variable: depth - lowerBound: 0 - upperBound: 10000 - variable: temp - lowerBound: 250.15 - upperBound: 313.15 - variable: saln - lowerBound: 0.0 - upperBound: 40.0 - - ioda: - backend: netcdf - obsdataout: "./testoutput/bufr_trkobprof_201804.nc" - - globals: - - name: "dataType-date" - type: string - value: "TRKOB Temp & Salinity Profile - 201804" - - dimensions: - - name: nlevs - path: "*/BTOCN" - - variables: - - name: "dateTime@MetaData" - source: variables/timestamp - longName: "dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "rcpdateTime@MetaData" - source: variables/rcptimestamp - longName: "receipt dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "latitude@MetaData" - source: variables/latitude - longName: "Latitude" - units: "degrees_north" - range: [-90, 90] - - - name: "longitude@MetaData" - source: variables/longitude - longName: "Longitude" - units: "degrees_east" - range: [-180, 180] - - - name: "stationID@MetaData" - source: variables/stationID - longName: "sgn/Report Identifier" - units: "N/A" - - - name: "depth@MetaData" - source: variables/depth - longName: "Depth below sea surface" - units: "m" - - - name: "sea_water_temperature@ObsValue" - source: variables/temp - longName: "Temperature at depth" - units: "deg C" - range: [-23.0, 40.0] - - - name: "sea_water_salinity@ObsValue" - source: variables/saln - longName: "Salinity at depth" - units: "psu" - range: [0.0, 40.0] - diff --git a/test/testinput/salt_bufr_dbuoyprof.yaml b/test/testinput/salt_bufr_dbuoyprof.yaml deleted file mode 100644 index a6e239a86..000000000 --- a/test/testinput/salt_bufr_dbuoyprof.yaml +++ /dev/null @@ -1,92 +0,0 @@ -observations: - - obs space: - name: bufr - obsdatain: "./testdata/dbuoy.20180415_subsampled" - - exports: - group_by_variable: depth # Optional - variables: - timestamp: - datetime: - year: "*/YEAR" - month: "*/MNTH" - day: "*/DAYS" - hour: "*/HOUR" - minute: "*/MINU" - rcptimestamp: - datetime: - year: "*/RCYR" - month: "*/RCMO" - day: "*/RCDY" - hour: "*/RCHR" - minute: "*/RCMI" - stationID: - query: "*/RPID" - longitude: - query: "*/CLON" - latitude: - query: "*/CLAT" - depth: - query: "*/DTSCUR/DBSS" - saln: - query: "*/DTSCUR/SALN" - filters: - - bounding: - variable: depth - lowerBound: 0 - upperBound: 10000 - variable: saln - lowerBound: 0.0 - upperBound: 40.0 - - ioda: - backend: netcdf - obsdataout: "./testoutput/salt_bufr_dbuoyprof_20180415.nc" - - globals: - - name: "dataType-date" - type: string - value: "Drifting Buoy Salinity Profile - 2018041512" - - dimensions: - - name: nlevs - path: "*/DTSCUR" - - variables: - - name: "dateTime@MetaData" - source: variables/timestamp - longName: "dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "rcpdateTime@MetaData" - source: variables/rcptimestamp - longName: "receipt dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "latitude@MetaData" - source: variables/latitude - longName: "Latitude" - units: "degrees_north" - range: [-90, 90] - - - name: "longitude@MetaData" - source: variables/longitude - longName: "Longitude" - units: "degrees_east" - range: [-180, 180] - - - name: "stationID@MetaData" - source: variables/stationID - longName: "sgn/Report Identifier" - units: "N/A" - - - name: "depth@MetaData" - source: variables/depth - longName: "Depth below sea surface" - units: "m" - - - name: "sea_water_salinity@ObsValue" - source: variables/saln - longName: "Salinity at depth" - units: "psu" - range: [0.0, 40.0] diff --git a/test/testinput/salt_bufr_mbuoybprof.yaml b/test/testinput/salt_bufr_mbuoybprof.yaml deleted file mode 100644 index df8894c2e..000000000 --- a/test/testinput/salt_bufr_mbuoybprof.yaml +++ /dev/null @@ -1,91 +0,0 @@ -observations: - - obs space: - name: bufr - obsdatain: "./testdata/mbuoyb.20180415_subsampled" - - exports: - group_by_variable: depth # Optional - variables: - timestamp: - datetime: - year: "*/YEAR" - month: "*/MNTH" - day: "*/DAYS" - hour: "*/HOUR" - minute: "*/MINU" - rcptimestamp: - datetime: - year: "*/RCYR" - month: "*/RCMO" - day: "*/RCDY" - hour: "*/RCHR" - minute: "*/RCMI" - stationID: - query: "*/RPID" - longitude: - query: "*/CLONH" - latitude: - query: "*/CLATH" - depth: - query: "*/IDMSMDBS/BBYSTSL/DBSS" - saln: - query: "*/IDMSMDBS/BBYSTSL/SALN" - filters: - - bounding: - variable: depth - lowerBound: 0 - upperBound: 10000 - variable: saln - lowerBound: 0.0 - upperBound: 40.0 - ioda: - backend: netcdf - obsdataout: "./testoutput/salt_bufr_mbuoybprof_20180415.nc" - - globals: - - name: "dataType-date" - type: string - value: "Moored Buoy Salinity Profile - 2018041512" - - dimensions: - - name: nlevs - path: "*/IDMSMDBS" - - variables: - - name: "dateTime@MetaData" - source: variables/timestamp - longName: "dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "rcpdateTime@MetaData" - source: variables/rcptimestamp - longName: "receipt dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "latitude@MetaData" - source: variables/latitude - longName: "Latitude" - units: "degrees_north" - range: [-90, 90] - - - name: "longitude@MetaData" - source: variables/longitude - longName: "Longitude" - units: "degrees_east" - range: [-180, 180] - - - name: "stationID@MetaData" - source: variables/stationID - longName: "sgn/Report Identifier" - units: "N/A" - - - name: "depth@MetaData" - source: variables/depth - longName: "Depth below sea surface" - units: "m" - - - name: "sea_water_salinity@ObsValue" - source: variables/saln - longName: "Salinity at depth" - units: "psu" - range: [0.0, 40.0] diff --git a/test/testinput/temp_bufr_dbuoyprof.yaml b/test/testinput/temp_bufr_dbuoyprof.yaml deleted file mode 100644 index 2f9768f7c..000000000 --- a/test/testinput/temp_bufr_dbuoyprof.yaml +++ /dev/null @@ -1,95 +0,0 @@ -observations: - - obs space: - name: bufr - obsdatain: "./testdata/dbuoy.20180415_subsampled" - - exports: - group_by_variable: depth # Optional - variables: - timestamp: - datetime: - year: "*/YEAR" - month: "*/MNTH" - day: "*/DAYS" - hour: "*/HOUR" - minute: "*/MINU" - rcptimestamp: - datetime: - year: "*/RCYR" - month: "*/RCMO" - day: "*/RCDY" - hour: "*/RCHR" - minute: "*/RCMI" - stationID: - query: "*/RPID" - longitude: - query: "*/CLON" - latitude: - query: "*/CLAT" - depth: - query: "*/DTSCUR/DBSS" - temp: - query: "*/DTSCUR/STMP" - transforms: - - offset: -273.15 - filters: - - bounding: - variable: depth - lowerBound: 0 - upperBound: 10000 - variable: temp - lowerBound: 250.15 - upperBound: 313.15 - - ioda: - backend: netcdf - obsdataout: "./testoutput/temp_bufr_dbuoyprof_20180415.nc" - - globals: - - name: "dataType-date" - type: string - value: "Drifting Buoy Temp Profile - 2018041512" - - dimensions: - - name: nlevs - path: "*/DTSCUR" - - variables: - - name: "dateTime@MetaData" - source: variables/timestamp - longName: "dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "rcpdateTime@MetaData" - source: variables/rcptimestamp - longName: "receipt dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "latitude@MetaData" - source: variables/latitude - longName: "Latitude" - units: "degrees_north" - range: [-90, 90] - - - name: "longitude@MetaData" - source: variables/longitude - longName: "Longitude" - units: "degrees_east" - range: [-180, 180] - - - name: "stationID@MetaData" - source: variables/stationID - longName: "sgn/Report Identifier" - units: "N/A" - - - name: "depth@MetaData" - source: variables/depth - longName: "Depth below sea surface" - units: "m" - - - name: "sea_water_temperature@ObsValue" - source: variables/temp - longName: "Temperature at depth" - units: "deg C" - range: [-23.0, 40.0] - diff --git a/test/testinput/temp_bufr_mbuoybprof.yaml b/test/testinput/temp_bufr_mbuoybprof.yaml deleted file mode 100644 index e9f8bb738..000000000 --- a/test/testinput/temp_bufr_mbuoybprof.yaml +++ /dev/null @@ -1,94 +0,0 @@ -observations: - - obs space: - name: bufr - obsdatain: "./testdata/mbuoyb.20180415_subsampled" - - exports: - group_by_variable: depth # Optional - variables: - timestamp: - datetime: - year: "*/YEAR" - month: "*/MNTH" - day: "*/DAYS" - hour: "*/HOUR" - minute: "*/MINU" - rcptimestamp: - datetime: - year: "*/RCYR" - month: "*/RCMO" - day: "*/RCDY" - hour: "*/RCHR" - minute: "*/RCMI" - stationID: - query: "*/RPID" - longitude: - query: "*/CLONH" - latitude: - query: "*/CLATH" - depth: - query: "*/IDMSMDBS/BBYSTSL/DBSS" - temp: - query: "*/IDMSMDBS/BBYSTSL/SST1" - transforms: - - offset: -273.15 - filters: - - bounding: - variable: depth - lowerBound: 0 - upperBound: 10000 - variable: temp - lowerBound: 250.15 - upperBound: 313.15 - ioda: - backend: netcdf - obsdataout: "./testoutput/temp_bufr_mbuoybprof_20180415.nc" - - globals: - - name: "dataType-date" - type: string - value: "Moored Buoy Temp Profile - 2018041512" - - dimensions: - - name: nlevs - path: "*/IDMSMDBS" - - variables: - - name: "dateTime@MetaData" - source: variables/timestamp - longName: "dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "rcpdateTime@MetaData" - source: variables/rcptimestamp - longName: "receipt dateTime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "latitude@MetaData" - source: variables/latitude - longName: "Latitude" - units: "degrees_north" - range: [-90, 90] - - - name: "longitude@MetaData" - source: variables/longitude - longName: "Longitude" - units: "degrees_east" - range: [-180, 180] - - - name: "stationID@MetaData" - source: variables/stationID - longName: "sgn/Report Identifier" - units: "N/A" - - - name: "depth@MetaData" - source: variables/depth - longName: "Depth below sea surface" - units: "m" - - - name: "sea_water_temperature@ObsValue" - source: variables/temp - longName: "Temperature at depth" - units: "deg C" - range: [-23.0, 40.0] -