Skip to content

Commit

Permalink
Reorganize a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelDegelia-NOAA committed Oct 21, 2024
1 parent f074500 commit 76eeb42
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
55 changes: 28 additions & 27 deletions rrfs-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,34 +116,35 @@ if(MPAS_DYCORE)
set(MPI_ARGS ${RESTORE_MPI_ARGS})
endif()

endif()

########################
### Bufr2ioda ctests ###
########################

# YAML-based bufr2ioda
set(case "rrfs_bufr2ioda_msonet")
set(casedir "${CMAKE_CURRENT_BINARY_DIR}/rundir-${case}")
set(src_casedir "${rrfs-test_data_local}/rrfs-data_mpasjedi_2024052700")
if (NOT EXISTS "${casedir}")
file(MAKE_DIRECTORY ${casedir})
endif()
file(CREATE_LINK ${src_casedir}/data ${casedir}/data SYMBOLIC)
configure_file(${src_casedir}/data/obs/bufr/rap.t00z.prepbufr.tm00 ${casedir}/prepbufr COPYONLY)
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir})
set(MPI_ARGS "--time=00:05:00 --exclusive")
set(IODA_CONV_COMP_TOL "5.0e-4")
ecbuild_add_test( TARGET ${case}
MPI 1
TYPE SCRIPT
COMMAND bash
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${case}
ARGS ${CMAKE_SOURCE_DIR}/rrfs-test/ush/iodaconv_comp_rrfs.sh
netcdf
"${CMAKE_BINARY_DIR}/bin/bufr2ioda.x ${case}.yaml"
data/obs/ioda_mesonet.nc
ioda_mesonet.nc
${IODA_CONV_COMP_TOL}
DEPENDS bufr2ioda.x )

########################
### Bufr2ioda ctests ###
########################

# YAML-based bufr2ioda
set(case "rrfs_bufr2ioda_msonet")
set(casedir "${CMAKE_CURRENT_BINARY_DIR}/rundir-${case}")
if (NOT EXISTS "${casedir}")
file(MAKE_DIRECTORY ${casedir})
endif()
file(CREATE_LINK ${src_casedir}/data ${casedir}/data SYMBOLIC)
configure_file(${src_casedir}/data/obs/bufr/rap.t00z.prepbufr.tm00 ${casedir}/prepbufr COPYONLY)
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir})
set(MPI_ARGS "--time=00:05:00 --exclusive")
set(IODA_CONV_COMP_TOL "5.0e-4")
ecbuild_add_test( TARGET ${case}
MPI 1
TYPE SCRIPT
COMMAND bash
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${case}
ARGS ${CMAKE_SOURCE_DIR}/rrfs-test/ush/iodaconv_comp_rrfs.sh
netcdf
"${CMAKE_BINARY_DIR}/bin/bufr2ioda.x ${case}.yaml"
data/obs/ioda_mesonet.nc
ioda_mesonet.nc
${IODA_CONV_COMP_TOL}
DEPENDS bufr2ioda.x )

5 changes: 4 additions & 1 deletion rrfs-test/ush/iodaconv_comp_rrfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
#
# argument 1: what type of file to compare; netcdf or odb
# argument 2: the command to run the ioda converter
# argument 3: the filename to test
# argument 3: the reference file name
# argument 4: the test file name to compare against
# argument 5: the tolerance for differences between the files
# argument 6: verbose option

set -eu

Expand Down

0 comments on commit 76eeb42

Please sign in to comment.