Skip to content

Commit

Permalink
Per #1546, split output independent ascii2nc tests into unit_ascii2nc…
Browse files Browse the repository at this point in the history
…_indy.xml.
  • Loading branch information
JohnHalleyGotway committed Jan 26, 2022
1 parent 088bcb1 commit 0fc5bd5
Show file tree
Hide file tree
Showing 3 changed files with 343 additions and 317 deletions.
1 change: 1 addition & 0 deletions test/bin/unit_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ PERL_UNIT=${MET_TEST_BASE}/perl/unit.pl

# Unit test XML
UNIT_XML="unit_ascii2nc.xml \
unit_ascii2nc_indy.xml \
unit_madis2nc.xml \
unit_trmm2nc.xml \
unit_pb2nc.xml \
Expand Down
319 changes: 2 additions & 317 deletions test/xml/unit_ascii2nc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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 All @@ -30,18 +32,6 @@
</output>
</test>

<test name="ascii2nc_TRMM_12hr">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/trmm/TRMM_3B42.007.accumulated_precipitation.22:30Z07Aug2012-10:30Z08Aug2012.G3.output.mtxt \
&OUTPUT_DIR;/ascii2nc/trmm_2008080812_12hr.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/trmm_2008080812_12hr.nc</point_nc>
</output>
</test>

<test name="ascii2nc_GAGE_24hr">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
Expand All @@ -66,44 +56,6 @@
</output>
</test>

<test name="ascii2nc_LITTLE_R">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/ascii/qc_out_2012-09-07_00:00:00.GRM_P+FCST \
&OUTPUT_DIR;/ascii2nc/qc_out_2012-09-07_00_00_00.GRM_P_FCST.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/qc_out_2012-09-07_00_00_00.GRM_P_FCST.nc</point_nc>
</output>
</test>

<test name="ascii2nc_LITTLE_R_BAD_RECORD">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/ascii/OBS:2015080700_bad_record \
&OUTPUT_DIR;/ascii2nc/OBS_2015080700_bad_record.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/OBS_2015080700_bad_record.nc</point_nc>
</output>
</test>

<test name="ascii2nc_SURFRAD">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/ascii/surfrad_tbl12136.txt \
&DATA_DIR_OBS;/ascii/surfrad_tbl12137.txt \
&DATA_DIR_OBS;/ascii/surfrad_tbl12138.txt \
&OUTPUT_DIR;/ascii2nc/surfrad_tbl12.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/surfrad_tbl12.nc</point_nc>
</output>
</test>

<test name="ascii2nc_SURFRAD1">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
Expand All @@ -118,92 +70,6 @@
</output>
</test>

<test name="ascii2nc_SURFRAD_summary1">
<exec>&MET_BIN;/ascii2nc</exec>
<env>
<pair><name>BEG_TS</name> <value>000000</value></pair>
<pair><name>END_TS</name> <value>235959</value></pair>
<pair><name>STEP_TS</name> <value>300</value></pair>
<pair><name>WIDTH_TS</name> <value>300</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/surfrad/tbl12001.dat \
&DATA_DIR_OBS;/surfrad/tbl12002.dat \
&DATA_DIR_OBS;/surfrad/tbl12003.dat \
-config &CONFIG_DIR;/Ascii2NcConfig.surfrad \
&OUTPUT_DIR;/ascii2nc/surfrad_summary1.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/surfrad_summary1.nc</point_nc>
</output>
</test>

<test name="ascii2nc_SURFRAD_summary2">
<exec>&MET_BIN;/ascii2nc</exec>
<env>
<pair><name>BEG_TS</name> <value>03</value></pair>
<pair><name>END_TS</name> <value>20</value></pair>
<pair><name>STEP_TS</name> <value>300</value></pair>
<pair><name>WIDTH_TS</name> <value>600</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/surfrad/tbl12001.dat \
&DATA_DIR_OBS;/surfrad/tbl12002.dat \
&DATA_DIR_OBS;/surfrad/tbl12003.dat \
-config &CONFIG_DIR;/Ascii2NcConfig.surfrad \
&OUTPUT_DIR;/ascii2nc/surfrad_summary2.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/surfrad_summary2.nc</point_nc>
</output>
</test>

<test name="ascii2nc_SURFRAD_summary3">
<exec>&MET_BIN;/ascii2nc</exec>
<env>
<pair><name>BEG_TS</name> <value>17</value></pair>
<pair><name>END_TS</name> <value>03</value></pair>
<pair><name>STEP_TS</name> <value>420</value></pair>
<pair><name>WIDTH_TS</name> <value>420</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/surfrad/tbl12001.dat \
&DATA_DIR_OBS;/surfrad/tbl12002.dat \
&DATA_DIR_OBS;/surfrad/tbl12003.dat \
-config &CONFIG_DIR;/Ascii2NcConfig.surfrad \
&OUTPUT_DIR;/ascii2nc/surfrad_summary3.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/surfrad_summary3.nc</point_nc>
</output>
</test>

<!-- Test uncentered time interval -->

<test name="ascii2nc_SURFRAD_summary4">
<exec>&MET_BIN;/ascii2nc</exec>
<env>
<pair><name>BEG_TS</name> <value>17</value></pair>
<pair><name>END_TS</name> <value>03</value></pair>
<pair><name>STEP_TS</name> <value>420</value></pair>
<pair><name>WIDTH_TS</name> <value>{beg=-420;end=0;}</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/surfrad/tbl12001.dat \
&DATA_DIR_OBS;/surfrad/tbl12002.dat \
&DATA_DIR_OBS;/surfrad/tbl12003.dat \
-config &CONFIG_DIR;/Ascii2NcConfig.surfrad \
&OUTPUT_DIR;/ascii2nc/surfrad_summary4.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/surfrad_summary4.nc</point_nc>
</output>
</test>

<test name="ascii2nc_insitu_turb">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
Expand All @@ -223,187 +89,6 @@
</output>
</test>

<test name="ascii2nc_insitu_turb_mask_sid">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.13.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.14.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.15.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.16.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.17.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.18.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.19.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.20.ascii \
&OUTPUT_DIR;/ascii2nc/edr_hourly.20130827.mask_sid.nc \
-mask_sid "MY_STATIONS:N526UA,N567UA,N571UA,N594UA" \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/edr_hourly.20130827.mask_sid.nc</point_nc>
</output>
</test>

<test name="ascii2nc_insitu_turb_mask_grid_data">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.13.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.14.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.15.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.16.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.17.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.18.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.19.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.20.ascii \
&OUTPUT_DIR;/ascii2nc/edr_hourly.20130827.mask_grid_data.nc \
-mask_grid &TEST_DIR;/data/mnc/test_grid_valid.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/edr_hourly.20130827.mask_grid_data.nc</point_nc>
</output>
</test>

<test name="ascii2nc_insitu_turb_mask_named_grid">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.13.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.14.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.15.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.16.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.17.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.18.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.19.ascii \
&DATA_DIR_OBS;/insitu_ascii/20130827/edr_hourly.20130827.20.ascii \
&OUTPUT_DIR;/ascii2nc/edr_hourly.20130827.mask_named_grid.nc \
-mask_grid G212 -v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/edr_hourly.20130827.mask_named_grid.nc</point_nc>
</output>
</test>

<test name="ascii2nc_MASK_GRID">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/trmm/TRMM_3B42.007.accumulated_precipitation.10:30Z09Apr2012.G3.output.mtxt \
&OUTPUT_DIR;/ascii2nc/trmm_2012040912_3hr_mask_grid_dtc165.nc \
-mask_grid DTC165 \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/trmm_2012040912_3hr_mask_grid_dtc165.nc</point_nc>
</output>
</test>

<test name="ascii2nc_MASK_POLY">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/trmm/TRMM_3B42.007.accumulated_precipitation.10:30Z09Apr2012.G3.output.mtxt \
&OUTPUT_DIR;/ascii2nc/trmm_2012040912_3hr_mask_poly_lmv.nc \
-mask_poly &MET_BASE;/poly/LMV.poly \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/trmm_2012040912_3hr_mask_poly_lmv.nc</point_nc>
</output>
</test>

<test name="ascii2nc_WWSIS_clear_pvwatts_one_min">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/wwsis/clear_pvwatts_315510615_2006_pv_30MW_one_min_v3pt4.csv \
&OUTPUT_DIR;/ascii2nc/clear_pvwatts_315510615_2006_pv_30MW_one_min_v3pt4.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/clear_pvwatts_315510615_2006_pv_30MW_one_min_v3pt4.nc</point_nc>
</output>
</test>

<test name="ascii2nc_WWSIS_clear_pvwatts_five_min">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/wwsis/clear_pvwatts_315510615_2006_pv_30MW_five_min_v3pt4.csv \
&OUTPUT_DIR;/ascii2nc/clear_pvwatts_315510615_2006_pv_30MW_five_min_v3pt4.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/clear_pvwatts_315510615_2006_pv_30MW_five_min_v3pt4.nc</point_nc>
</output>
</test>

<test name="ascii2nc_WWSIS_clear_pvwatts_ten_min">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/wwsis/clear_pvwatts_315510615_2006_pv_30MW_ten_min_v3pt4.csv \
&OUTPUT_DIR;/ascii2nc/clear_pvwatts_315510615_2006_pv_30MW_ten_min_v3pt4.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/clear_pvwatts_315510615_2006_pv_30MW_ten_min_v3pt4.nc</point_nc>
</output>
</test>

<test name="ascii2nc_WWSIS_clear_pvwatts_sixty_min">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/wwsis/clear_pvwatts_315510615_2006_pv_30MW_sixty_min_v3pt4.csv \
&OUTPUT_DIR;/ascii2nc/clear_pvwatts_315510615_2006_pv_30MW_sixty_min_v3pt4.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/clear_pvwatts_315510615_2006_pv_30MW_sixty_min_v3pt4.nc</point_nc>
</output>
</test>

<test name="ascii2nc_WWSIS_HA_pvwatts_sixty_min">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/wwsis/HA_pvwatts_315510615_2006_30MW_sixty_min_v3pt4.csv \
&OUTPUT_DIR;/ascii2nc/HA_pvwatts_315510615_2006_30MW_sixty_min_v3pt4.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/HA_pvwatts_315510615_2006_30MW_sixty_min_v3pt4.nc</point_nc>
</output>
</test>

<test name="ascii2nc_WWSIS_pvwatts_one_min">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/wwsis/pvwatts_315510615_2006_pv_30MW_one_min_v3pt4.csv \
&OUTPUT_DIR;/ascii2nc/pvwatts_315510615_2006_pv_30MW_one_min_v3pt4.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/pvwatts_315510615_2006_pv_30MW_one_min_v3pt4.nc</point_nc>
</output>
</test>

<test name="ascii2nc_WWSIS_pvwatts_sixty_min">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/wwsis/pvwatts_315510615_2006_pv_30MW_sixty_min_v3pt4.csv \
&OUTPUT_DIR;/ascii2nc/pvwatts_315510615_2006_pv_30MW_sixty_min_v3pt4.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/pvwatts_315510615_2006_pv_30MW_sixty_min_v3pt4.nc</point_nc>
</output>
</test>

<test name="ascii2nc_by_var_name">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
&DATA_DIR_OBS;/ascii/obs_test_name.txt \
&OUTPUT_DIR;/ascii2nc/obs_test_name.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/obs_test_name.nc</point_nc>
</output>
</test>

<test name="ascii2nc_by_var_name_PB">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
Expand Down
Loading

0 comments on commit 0fc5bd5

Please sign in to comment.