Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/newb2i #1396

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions test/marine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set(PYIODACONV_DIR "${PROJECT_SOURCE_DIR}/build/lib/python${PYTHON_MAJOR_MINOR}/

set(TEST_WORKING_DIR ${PROJECT_BINARY_DIR}/test/marine)
set(MARINE_BUFR2IODA_DIR ${PROJECT_SOURCE_DIR}/ush/ioda/bufr2ioda/marine)
set(MARINE_BUFR2IODA_DIR ${MARINE_BUFR2IODA_DIR}/b2i)
set(MARINE_BUFR2IODA_DIR ${MARINE_BUFR2IODA_DIR}/newb2i)
set(CONFIG_DIR ${PROJECT_SOURCE_DIR}/test/marine/testinput)
set(TESTREF_DIR ${PROJECT_SOURCE_DIR}/test/marine/testref)

Expand All @@ -54,7 +54,8 @@ function(CREATE_CONFIG_FILE
string(REPLACE "__BUFRINPUTDIR__" "\"${bufr_input_dir}\"" temp_content "${file_content}")
string(REPLACE "__IODAOUTPUTDIR__" "\"${ioda_output_dir}\"" temp_content2 "${temp_content}")
string(REPLACE "__OCEANBASIN__" "\"${ocean_basin_file}\"" temp_content3 "${temp_content2}")
file(WRITE "${test_config_out}" "${temp_content3}")
string(REPLACE "__CONFIGDIR__" ${CONFIG_DIR} temp_content4 "${temp_content3}")
file(WRITE "${test_config_out}" "${temp_content4}")
endfunction()


Expand Down Expand Up @@ -121,15 +122,18 @@ function(ADD_INSITU_TEST testname testbufr)
# set(CONFIG_TYPE "json")
set(CONFIG_TYPE "yaml")

if (testbufr STREQUAL "dbuoy")
set(DATE "2019010700")
set(CYCLE "00")
else()
set(DATE "2021063006")
set(CYCLE "06")
endif()
set(DATE "2019010700")
set(CYCLE "00")
# if (testbufr STREQUAL "dbuoy")
# set(DATE "2019010700")
# set(CYCLE "00")
# else()
# set(DATE "2021063006")
# set(CYCLE "06")
# endif()

set(TEST "bufr2ioda_insitu_${testname}")
set(TESTEXEC "bufr2ioda_insitu_${testname}.py")
set(TEST "bufr2ioda_insitu_${testname}_${testbufr}")

set(TESTREF_FILE "${TEST}_${DATE}.ref")

Expand Down Expand Up @@ -158,7 +162,7 @@ function(ADD_INSITU_TEST testname testbufr)

add_test(
NAME test_gdasapp_${TEST}
COMMAND ${MARINE_BUFR2IODA_DIR}/${TEST}.py -c ${CONFIG_FILE} -t ${TESTREF_DIR}/${TESTREF_FILE}
COMMAND ${MARINE_BUFR2IODA_DIR}/${TESTEXEC} -c ${CONFIG_FILE} -t ${TESTREF_DIR}/${TESTREF_FILE}
WORKING_DIRECTORY ${TEST_WORKING_DIR}
)
set_property(
Expand All @@ -176,7 +180,13 @@ if (GENERATE_BUFR2IODA_TESTS)
ADD_INSITU_TEST("profile_glider" "subpfl")
ADD_INSITU_TEST("profile_tesac" "tesac")
ADD_INSITU_TEST("profile_tropical" "dbuoy")
ADD_INSITU_TEST("profile_tropical" "mbuoyb")
ADD_INSITU_TEST("profile_xbtctd" "xbtctd")
ADD_INSITU_TEST("surface_altkob" "altkob")
ADD_INSITU_TEST("surface_cstgd" "cstgd")
ADD_INSITU_TEST("surface_drifter" "dbuoy")
ADD_INSITU_TEST("surface_drifter" "dbuoyb")
ADD_INSITU_TEST("surface_lcman" "lcman")
ADD_INSITU_TEST("surface_shipsu" "shipsu")
ADD_INSITU_TEST("surface_trkob" "trkob")
endif()
76 changes: 76 additions & 0 deletions test/marine/testinput/altkob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
- class_name: "Temperature"
short_name: "seaSurfaceTemperature"
name: "seaSurfaceTemperature"
bufr_mnemonic: "*/SST0"
descriptor: "ObsValue"
units: "degC"
depth_profile_var_name: ""
data_min: -10.0
data_max: 50.0
data_error: 0.24

- class_name: "Salinity"
short_name: "salinity"
name: "salinity"
bufr_mnemonic: "*/SSS0"
descriptor: "ObsValue"
units: "psu"
depth_profile_var_name: ""
data_min: 0.0
data_max: 45.0
data_error: 0.01

- class_name: "Longitude"
short_name: "longitude"
name: "Longitude"
bufr_mnemonic: "*/CLONH"
descriptor: "MetaData"
units: "degrees_east"
depth_profile_var_name: ""
data_min: -180.0
data_max: 180.0
data_error: 0.0

- class_name: "Latitude"
short_name: "latitude"
name: "Latitude"
bufr_mnemonic: "*/CLATH"
descriptor: "MetaData"
units: "degrees_north"
depth_profile_var_name: ""
data_min: -90.0
data_max: 90.0
data_error: 0.0

- class_name: "DateTime"
short_name: "dateTime"
name: "DateTime"
descriptor: "MetaData"
units: "seconds since 1970-01-01T00:00:00Z"
depth_profile_var_name: ""
data_min: 0
data_max: 0
data_error: 0
bufr_mnemonics:
year: '*/YEAR'
month: '*/MNTH'
day: '*/DAYS'
hour: '*/HOUR'
minute: '*/MINU'

- class_name: "DateTime"
short_name: "rcptDateTime"
name: "RcptDateTime"
descriptor: "MetaData"
units: "seconds since 1970-01-01T00:00:00Z"
depth_profile_var_name: ""
data_min: 0
data_max: 0
data_error: 0
bufr_mnemonics:
ryear: '*/RCYR'
rmonth: '*/RCMO'
rday: '*/RCDY'
rhour: '*/RCHR'
rminute: '*/RCMI'
87 changes: 87 additions & 0 deletions test/marine/testinput/bathy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
- class_name: "Temperature"
short_name: "waterTemperature"
name: "waterTemperature"
bufr_mnemonic: "*/BTOCN/STMP"
descriptor: "ObsValue"
units: "degC"
depth_profile_var_name: "depth"
data_min: -10.0
data_max: 50.0
data_error: 0.24

- class_name: "Depth"
short_name: "depth"
name: "Water depth"
bufr_mnemonic: "*/BTOCN/DBSS"
descriptor: "MetaData"
units: "m"
depth_profile_var_name: "depth"
data_min: 0.0
data_max: 10000.0
data_error: 0.0

- class_name: "Longitude"
short_name: "longitude"
name: "Longitude"
bufr_mnemonic: "*/CLON"
descriptor: "MetaData"
units: "degrees_east"
depth_profile_var_name: "depth"
data_min: -180.0
data_max: 180.0
data_error: 0.0

- class_name: "Latitude"
short_name: "latitude"
name: "Latitude"
bufr_mnemonic: "*/CLAT"
descriptor: "MetaData"
units: "degrees_north"
depth_profile_var_name: "depth"
data_min: -90.0
data_max: 90.0
data_error: 0.0

- class_name: "StationID"
short_name: "stationID"
name: "Station Identification"
bufr_mnemonic: "*/RPID"
descriptor: "MetaData"
units: ""
depth_profile_var_name: "depth"
data_min: 0
data_max: 0
data_error: 0

- class_name: "DateTime"
short_name: "dateTime"
name: "DateTime"
descriptor: "MetaData"
units: "seconds since 1970-01-01T00:00:00Z"
depth_profile_var_name: "depth"
data_min: 0
data_max: 0
data_error: 0
bufr_mnemonics:
year: '*/YEAR'
month: '*/MNTH'
day: '*/DAYS'
hour: '*/HOUR'
minute: '*/MINU'

- class_name: "DateTime"
short_name: "rcptDateTime"
name: "RcptDateTime"
descriptor: "MetaData"
units: "seconds since 1970-01-01T00:00:00Z"
depth_profile_var_name: "depth"
data_min: 0
data_max: 0
data_error: 0
bufr_mnemonics:
ryear: '*/RCYR'
rmonth: '*/RCMO'
rday: '*/RCDY'
rhour: '*/RCHR'
rminute: '*/RCMI'
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
data_format: subpfl
subsets: SUBPFL
source: NCEP data tank
data_type: argo
cycle_type: gdas
cycle_datetime: '2021063006'
cycle_datetime: '2019010700'
dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
platform_description: 'ARGO profiles from subpfl: temperature and salinity'
data_description: 6-hrly in situ ARGO profiles
data_description_file: "__CONFIGDIR__/subpfl.yaml"
data_provider: U.S. NOAA

Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
data_format: bathy
subsets: BATHY
source: NCEP data tank
data_type: bathy
cycle_type: gdas
cycle_datetime: '2021063006'
cycle_datetime: '2019010700'
dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
data_description: 6-hrly in situ Bathythermal profiles
platform_description: 'Profiles from BATHYthermal: temperature'
data_description_file: "__CONFIGDIR__/bathy.yaml"
data_provider: U.S. NOAA

Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
data_format: subpfl
subsets: SUBPFL
source: NCEP data tank
data_type: glider
cycle_type: gdas
cycle_datetime: '2021063006'
cycle_datetime: '2019010700'
dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
data_description: 6-hrly in situ GLIDER profiles
platform_description: 'GLIDER profiles from subpfl: temperature and salinity'
data_description_file: "__CONFIGDIR__/subpfl.yaml"
data_provider: U.S. NOAA

Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
data_format: tesac
subsets: TESAC
source: NCEP data tank
data_type: tesac
cycle_type: gdas
cycle_datetime: '2021063006'
cycle_datetime: '2019010700'
dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
data_description: 6-hrly in situ TESAC profiles
platform_description: 'Profiles from TESAC: temperature and salinity'
data_description_file: "__CONFIGDIR__/tesac.yaml"
data_provider: U.S. NOAA

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
data_format: dbuoy
subsets: dbuoy
source: NCEP data tank
data_type: tropical
cycle_type: gdas
Expand All @@ -9,5 +8,7 @@ dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
data_description: 6-hrly in situ tropical mooring profiles
platform_description: 'Tropical mooring profiles from dbuoy: temperature and salinity'
data_description_file: "__CONFIGDIR__/dbuoy.yaml"
data_provider: U.S. NOAA

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
data_format: mbuoyb
source: NCEP data tank
data_type: tropical
cycle_type: gdas
cycle_datetime: '2019010700'
dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
data_description: 6-hrly in situ tropical mooring profiles
platform_description: 'Tropical mooring profiles from mbuoyb: temperature and salinity'
data_description_file: "__CONFIGDIR__/mbuoyb.yaml"
data_provider: U.S. NOAA

Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
data_format: xbtctd
subsets: XBTCTD
source: NCEP data tank
data_type: xbtctd
cycle_type: gdas
cycle_datetime: '2021063006'
cycle_datetime: '2019010700'
dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
data_description: 6-hrly in situ XBT/XCTD profiles
platform_description: 'Profiles from XBT/CTD: temperature and salinity'
data_description_file: "__CONFIGDIR__/xbtctd.yaml"
data_provider: U.S. NOAA

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
data_format: altkob
source: NCEP data tank
data_type: altkob
cycle_type: gdas
cycle_datetime: '2019010700'
dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
data_description: 6-hrly in situ ALTKOB surface
platform_description: 'Surface obs from altkob: temperature and salinity'
data_description_file: "__CONFIGDIR__/altkob.yaml"
data_provider: U.S. NOAA

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
data_format: cstgd
source: NCEP data tank
data_type: cstgd
cycle_type: gdas
cycle_datetime: '2019010700'
dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
data_description: 6-hrly in situ CSTGD surface
platform_description: "sea surface temperature obs from cstgd"
data_description_file: "__CONFIGDIR__/cstgd.yaml"
data_provider: U.S. NOAA

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
data_format: dbuoy
subsets: dbuoy
source: NCEP data tank
data_type: drifter
cycle_type: gdas
Expand All @@ -9,5 +8,7 @@ dump_directory: __BUFRINPUTDIR__
ioda_directory: __IODAOUTPUTDIR__
ocean_basin: __OCEANBASIN__
data_description: 6-hrly in situ drifter profiles
platform_description: "Lagrangian drifter drogue profiles from dbuy: temperature"
data_description_file: "__CONFIGDIR__/dbuoy.yaml"
data_provider: U.S. NOAA

Loading