Skip to content

Commit

Permalink
Per #1546, split output independent pb2nc test into unit_pb2nc_indy.xml.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Jan 26, 2022
1 parent 0fc5bd5 commit 46d8785
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 134 deletions.
1 change: 1 addition & 0 deletions test/bin/unit_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ UNIT_XML="unit_ascii2nc.xml \
unit_madis2nc.xml \
unit_trmm2nc.xml \
unit_pb2nc.xml \
unit_pb2nc_indy.xml \
unit_gen_vx_mask.xml \
unit_gen_ens_prod.xml \
unit_pcp_combine.xml \
Expand Down
136 changes: 2 additions & 134 deletions test/xml/unit_pb2nc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

<!-- Requires: None -->

<!-- Dependent: At least one unit test depends on the output of each of these tests. -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
Expand Down Expand Up @@ -75,139 +77,5 @@
<point_nc>&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.nc</point_nc>
</output>
</test>

<test name="pb2nc_NDAS_mask_sid_list">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value>"72265","72274","72364","72426"</value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.mask_sid.nc \
&CONFIG_DIR;/PB2NCConfig \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.mask_sid.nc</point_nc>
</output>
</test>

<test name="pb2nc_NDAS_mask_sid_file">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value>"&CONFIG_DIR;/SID_CO.txt"</value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.mask_sid_file.nc \
&CONFIG_DIR;/PB2NCConfig \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.mask_sid_file.nc</point_nc>
</output>
</test>

<test name="pb2nc_NDAS_mask_grid_data_cfg">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value></value></pair>
<pair><name>MASK_GRID</name> <value>&MET_DATA;/sample_fcst/2005080700/wrfprs_ruc13_00.tm00_G212</value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.mask_grid_data.nc \
&CONFIG_DIR;/PB2NCConfig \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.mask_grid_data.nc</point_nc>
</output>
</test>

<test name="pb2nc_compute_pbl_cape">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value></value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/nam.20210311.t00z.prepbufr.tm00 \
&OUTPUT_DIR;/pb2nc/nam.20210311.t00z.prepbufr.tm00.pbl.nc \
&CONFIG_DIR;/PB2NCConfig_pbl \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc/nam.20210311.t00z.prepbufr.tm00.pbl.nc</point_nc>
</output>
</test>

<test name="pb2nc_NDAS_var_all">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value>"72364","72265","72274","72426","72489","14008"</value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.var_all.nc \
&CONFIG_DIR;/PB2NCConfig_all \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.var_all.nc</point_nc>
</output>
</test>

<test name="pb2nc_vertical_level_500">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value>"SC-GSP","TX-HGX","KY-HPX"</value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>9</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/bufr/nam_20170502.t00z.radwnd.tm02.bufr_d \
&OUTPUT_DIR;/pb2nc/nam_20170502.t00z.radwnd.tm02.bufr_d.vlevel_500.nc \
&CONFIG_DIR;/PB2NCConfig_vlevel -valid_end 20170501_22 \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc/nam_20170502.t00z.radwnd.tm02.bufr_d.vlevel_500.nc</point_nc>
</output>
</test>

<test name="pb2nc_NDAS_summary">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value></value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value>MET_BASE/poly/CONUS.poly</value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.summary.nc \
&CONFIG_DIR;/PB2NCConfig_summary \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.summary.nc</point_nc>
</output>
</test>


</met_test>
157 changes: 157 additions & 0 deletions test/xml/unit_pb2nc_indy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<?xml version="1.0"?>
<!DOCTYPE met_test [
<!ENTITY MET_BASE "${MET_BASE}">
<!ENTITY MET_BIN "${MET_BASE}/../../bin">
<!ENTITY MET_DATA "${MET_BUILD_BASE}/data">
<!ENTITY TEST_DIR "${MET_TEST_BASE}">
<!ENTITY INPUT_DIR "${MET_TEST_INPUT}">
<!ENTITY OUTPUT_DIR "${MET_TEST_OUTPUT}">

<!ENTITY CONFIG_DIR "&TEST_DIR;/config">
<!ENTITY DATA_DIR_MODEL "&INPUT_DIR;/model_data">
<!ENTITY DATA_DIR_OBS "&INPUT_DIR;/obs_data">
]>

<!-- Requires: None -->

<!-- Independent: No other unit tests depend on the output of any of these tests. -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
<exit_on_fail>true</exit_on_fail>

<test name="pb2nc_NDAS_mask_sid_list">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value>"72265","72274","72364","72426"</value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.mask_sid.nc \
&CONFIG_DIR;/PB2NCConfig \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.mask_sid.nc</point_nc>
</output>
</test>

<test name="pb2nc_NDAS_mask_sid_file">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value>"&CONFIG_DIR;/SID_CO.txt"</value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.mask_sid_file.nc \
&CONFIG_DIR;/PB2NCConfig \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.mask_sid_file.nc</point_nc>
</output>
</test>

<test name="pb2nc_NDAS_mask_grid_data_cfg">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value></value></pair>
<pair><name>MASK_GRID</name> <value>&MET_DATA;/sample_fcst/2005080700/wrfprs_ruc13_00.tm00_G212</value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.mask_grid_data.nc \
&CONFIG_DIR;/PB2NCConfig \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.mask_grid_data.nc</point_nc>
</output>
</test>

<test name="pb2nc_compute_pbl_cape">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value></value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/nam.20210311.t00z.prepbufr.tm00 \
&OUTPUT_DIR;/pb2nc_indy/nam.20210311.t00z.prepbufr.tm00.pbl.nc \
&CONFIG_DIR;/PB2NCConfig_pbl \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc_indy/nam.20210311.t00z.prepbufr.tm00.pbl.nc</point_nc>
</output>
</test>

<test name="pb2nc_NDAS_var_all">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value>"72364","72265","72274","72426","72489","14008"</value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.var_all.nc \
&CONFIG_DIR;/PB2NCConfig_all \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.var_all.nc</point_nc>
</output>
</test>

<test name="pb2nc_vertical_level_500">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value>"SC-GSP","TX-HGX","KY-HPX"</value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value></value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>9</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/bufr/nam_20170502.t00z.radwnd.tm02.bufr_d \
&OUTPUT_DIR;/pb2nc_indy/nam_20170502.t00z.radwnd.tm02.bufr_d.vlevel_500.nc \
&CONFIG_DIR;/PB2NCConfig_vlevel -valid_end 20170501_22 \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc_indy/nam_20170502.t00z.radwnd.tm02.bufr_d.vlevel_500.nc</point_nc>
</output>
</test>

<test name="pb2nc_NDAS_summary">
<exec>&MET_BIN;/pb2nc</exec>
<env>
<pair><name>STATION_ID</name> <value></value></pair>
<pair><name>MASK_GRID</name> <value></value></pair>
<pair><name>MASK_POLY</name> <value>MET_BASE/poly/CONUS.poly</value></pair>
<pair><name>QUALITY_MARK_THRESH</name> <value>2</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/prepbufr/ndas/nam.20120409.t12z.prepbufr.tm00.nr \
&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.summary.nc \
&CONFIG_DIR;/PB2NCConfig_summary \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/pb2nc_indy/ndas.20120409.t12z.prepbufr.tm00.summary.nc</point_nc>
</output>
</test>

</met_test>

0 comments on commit 46d8785

Please sign in to comment.