diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 220f79c70..51e14f207 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -49,6 +49,7 @@ list(APPEND test_input ${PROJECT_SOURCE_DIR}/test/testinput/check_yaml_keys_ref.yaml ${PROJECT_SOURCE_DIR}/test/testinput/check_yaml_keys_test.yaml ${PROJECT_SOURCE_DIR}/test/testinput/bufr_adpsfc.yaml + ${PROJECT_SOURCE_DIR}/test/testinput/bufr_adpsfc_snow.yaml ${PROJECT_SOURCE_DIR}/test/testinput/amsua_n19_ewok.yaml ${PROJECT_SOURCE_DIR}/test/testinput/temp_bufr_dbuoyprof.yaml ${PROJECT_SOURCE_DIR}/test/testinput/salt_bufr_dbuoyprof.yaml diff --git a/test/land/CMakeLists.txt b/test/land/CMakeLists.txt index 08745c707..813b80fcd 100644 --- a/test/land/CMakeLists.txt +++ b/test/land/CMakeLists.txt @@ -30,3 +30,8 @@ set_tests_properties(test_gdasapp_land_letkfoi_snowda PROPERTIES ENVIRONMENT "GDASAPP_TESTDATA=$ENV{GDASAPP_TESTDATA}") +# Test convert BUFR to IODA +add_test(NAME test_gdasapp_convert_bufr_adpsfc_snow + COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_bufr2ioda.sh ${PROJECT_BINARY_DIR} bufr_adpsfc_snow + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/) + diff --git a/test/testinput/bufr_adpsfc_snow.yaml b/test/testinput/bufr_adpsfc_snow.yaml new file mode 100644 index 000000000..c7f322a35 --- /dev/null +++ b/test/testinput/bufr_adpsfc_snow.yaml @@ -0,0 +1,85 @@ +# (C) Copyright 2021-2022 NOAA/NWS/NCEP/EMC +# +# This software is licensed under the terms of the Apache Licence Version 2.0 +# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. + +observations: + - obs space: + name: bufr + + obsdatain: "./testdata/gdas.t06z.adpsfc.tm00.bufr_d" + + exports: + variables: + # MetaData + timestamp: + datetime: + year: "*/YEAR[1]" + month: "*/MNTH[1]" + day: "*/DAYS[1]" + hour: "*/HOUR[1]" + minute: "*/MINU[1]" + latitude: + query: "[*/CLAT, */CLATH]" + longitude: + query: "[*/CLON, */CLONH]" + stationIdentification: + query: "*/RPID" + + height: + query: "[*/SELV, */HSMSL]" + + # ObsValue + totalSnowDepth: + query: "[*/SNWSQ1/TOSD, */MTRMSC/TOSD, */STGDSNDM/TOSD]" + transforms: + - scale: 1000.0 + filters: + - bounding: + variable: totalSnowDepth + upperBound: 10000000 + + ioda: + backend: netcdf + obsdataout: "./testoutput/gdas.t06z.adpsfc_snow.nc" + + variables: + + # MetaData + - name: "MetaData/dateTime" + coordinates: "longitude latitude" + source: variables/timestamp + longName: "Datetime" + units: "seconds since 1970-01-01T00:00:00Z" + + - name: "MetaData/latitude" + coordinates: "longitude latitude" + source: variables/latitude + longName: "Latitude" + units: "degree_north" + range: [-90, 90] + + - name: "MetaData/longitude" + coordinates: "longitude latitude" + source: variables/longitude + longName: "Longitude" + units: "degree_east" + range: [-180, 180] + + - name: "MetaData/height" + coordinates: "longitude latitude" + source: variables/height + longName: "Height of Station" + + - name: "MetaData/stationIdentification" + coordinates: "longitude latitude" + source: variables/stationIdentification + longName: "Identification of Observing Location" + units: "m" + + # ObsValue + - name: "ObsValue/totalSnowDepth" + coordinates: "longitude latitude" + source: variables/totalSnowDepth + longName: "Total Snow Depth" + units: "mm"