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 1546 unit_tests #2021

Merged
merged 15 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
5897f28
For #1546, update the unit test XML files to explicitly list the prer…
JohnHalleyGotway Jan 21, 2022
183af66
Per #1546, since we're updating some unit tests anyway, change the OB…
JohnHalleyGotway Jan 21, 2022
5546b58
Per #1546, update unit_obs_summary.xml to write to an obs_summary out…
JohnHalleyGotway Jan 21, 2022
1e59293
Per #1546, update unit_point2grid.xml to write all of its output to a…
JohnHalleyGotway Jan 21, 2022
c265457
Per #1546, move a call to pcp_combine from unit_mode.xml to unit_pcp_…
JohnHalleyGotway Jan 21, 2022
13b0736
Per #1546, rename unit_test_grib_tables.xml to unit_grib_tables.xml t…
JohnHalleyGotway Jan 21, 2022
bb17e28
Per #1546, update unit_quality_filter.xml to write to a quality_filte…
JohnHalleyGotway Jan 21, 2022
f383e38
Per #1546, update unit_mode_graphics.xml to write to a mode_graphics …
JohnHalleyGotway Jan 21, 2022
3d6616c
Per #1546, update unit_duplicate_flag.xml to write to a duplicate_fla…
JohnHalleyGotway Jan 21, 2022
816a0ce
Per #1546, update unit_gsi_tools.xml to write to a gsi_tools output d…
JohnHalleyGotway Jan 21, 2022
665d67a
Per #1546, fix unit_ascii2nc.xml. I'd renamed OBS: to OBS_ throughout…
JohnHalleyGotway Jan 21, 2022
7c20728
Per #1546, fix unit_stat_analysis.xml after changing OBS_ERORR to OBS…
JohnHalleyGotway Jan 21, 2022
c9acfc1
Per #1546, update the output directory for the plot_mode_field tool.
JohnHalleyGotway Jan 24, 2022
24b0ad0
Per #1546, fix typo in unit_point2grid.xml
JohnHalleyGotway Jan 24, 2022
ada3089
Per #1546, port setting of MET_TEST_MET_PYTHON_EXE over from the feat…
JohnHalleyGotway Jan 24, 2022
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
2 changes: 1 addition & 1 deletion test/bin/unit_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ UNIT_XML="unit_ascii2nc.xml \
unit_shift_data_plane.xml \
unit_mtd.xml \
unit_climatology.xml \
unit_test_grib_tables.xml \
unit_grib_tables.xml \
unit_grid_weight.xml \
unit_netcdf.xml \
unit_hira.xml \
Expand Down
2 changes: 2 additions & 0 deletions test/xml/unit_aeronet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<!ENTITY DATA_DIR_OBS "&INPUT_DIR;/obs_data">
]>

<!-- Requires: None -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
Expand Down
2 changes: 2 additions & 0 deletions test/xml/unit_airnow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<!ENTITY DATA_DIR_OBS "&INPUT_DIR;/obs_data">
]>

<!-- Requires: None -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
Expand Down
10 changes: 6 additions & 4 deletions test/xml/unit_ascii2nc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<!ENTITY DATA_DIR_OBS "&INPUT_DIR;/obs_data">
]>

<!-- Requires: None -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
Expand Down Expand Up @@ -68,23 +70,23 @@
<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 \
&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>
<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 \
&OUTPUT_DIR;/ascii2nc/OBS_2015080700_bad_record.nc \
-v 1
</param>
<output>
<point_nc>&OUTPUT_DIR;/ascii2nc/OBS:2015080700_bad_record.nc</point_nc>
<point_nc>&OUTPUT_DIR;/ascii2nc/OBS_2015080700_bad_record.nc</point_nc>
</output>
</test>

Expand Down
3 changes: 2 additions & 1 deletion test/xml/unit_climatology.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
<!ENTITY DATA_DIR_CLIMO "&INPUT_DIR;/climatology_data">
]>

<!-- Requires: unit_pb2nc.xml -->

<met_test>

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

<!-- Depends on unit_pb2nc.xml -->
<test name="climatology_POINT_STAT_GFS_2.5DEG">
<exec>&MET_BIN;/point_stat</exec>
<env>
Expand Down
16 changes: 8 additions & 8 deletions test/xml/unit_duplicate_flag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<!ENTITY DATA_DIR_OBS "&INPUT_DIR;/obs_data">
]>

<met_test>
<!-- Requires: unit_ascii2nc.xml -->

<!-- Depends on unit_ascii2nc to generate dup_test.nc obs file -->
<met_test>

<test_dir>&TEST_DIR;</test_dir>
<exit_on_fail>false</exit_on_fail>
Expand All @@ -27,11 +27,11 @@
&DATA_DIR_MODEL;/grib2/nam/nam_2012040900_F012.grib2 \
&OUTPUT_DIR;/ascii2nc/dup_test.nc \
&CONFIG_DIR;/PointStatConfig_dup \
-outdir &OUTPUT_DIR;/point_stat -v 3
-outdir &OUTPUT_DIR;/duplicate_flag -v 3
</param>
<output>
<stat>&OUTPUT_DIR;/point_stat/point_stat_DUP_NONE_120000L_20120409_120000V.stat</stat>
<stat>&OUTPUT_DIR;/point_stat/point_stat_DUP_NONE_120000L_20120409_120000V_mpr.txt</stat>
<stat>&OUTPUT_DIR;/duplicate_flag/point_stat_DUP_NONE_120000L_20120409_120000V.stat</stat>
<stat>&OUTPUT_DIR;/duplicate_flag/point_stat_DUP_NONE_120000L_20120409_120000V_mpr.txt</stat>
</output>
</test>

Expand All @@ -45,11 +45,11 @@
&DATA_DIR_MODEL;/grib2/nam/nam_2012040900_F012.grib2 \
&OUTPUT_DIR;/ascii2nc/dup_test.nc \
&CONFIG_DIR;/PointStatConfig_dup \
-outdir &OUTPUT_DIR;/point_stat -v 3
-outdir &OUTPUT_DIR;/duplicate_flag -v 3
</param>
<output>
<stat>&OUTPUT_DIR;/point_stat/point_stat_DUP_UNIQUE_120000L_20120409_120000V.stat</stat>
<stat>&OUTPUT_DIR;/point_stat/point_stat_DUP_UNIQUE_120000L_20120409_120000V_mpr.txt</stat>
<stat>&OUTPUT_DIR;/duplicate_flag/point_stat_DUP_UNIQUE_120000L_20120409_120000V.stat</stat>
<stat>&OUTPUT_DIR;/duplicate_flag/point_stat_DUP_UNIQUE_120000L_20120409_120000V_mpr.txt</stat>
</output>
</test>

Expand Down
25 changes: 13 additions & 12 deletions test/xml/unit_ensemble_stat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<!ENTITY DATA_DIR_OBS "&INPUT_DIR;/obs_data">
]>

<!-- Requires: unit_ascii2nc.xml -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
Expand All @@ -18,7 +20,6 @@

<!-- -->
<!-- ensemble_stat -->
<!-- depends on unit_ascii2nc.xml -->
<!-- -->

<!-- Pass input ensemble files on the command line - one missing. -->
Expand Down Expand Up @@ -216,7 +217,7 @@

<!-- Add observation error perturbations. -->

<test name="ensemble_stat_OBS_ERROR">
<test name="ensemble_stat_OBSERR">
<exec>echo "&DATA_DIR_MODEL;/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \
&DATA_DIR_MODEL;/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \
&DATA_DIR_MODEL;/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \
Expand All @@ -226,10 +227,10 @@
> &OUTPUT_DIR;/ensemble_stat/input_file_list; \
&MET_BIN;/ensemble_stat</exec>
<env>
<pair><name>DESC</name> <value>OBS_ERROR</value></pair>
<pair><name>DESC</name> <value>OBSERR</value></pair>
<pair><name>OBS_ERROR_FLAG</name> <value>TRUE</value></pair>
<pair><name>SKIP_CONST</name> <value>TRUE</value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>OBS_ERROR</value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>OBSERR</value></pair>
</env>
<param> \
&OUTPUT_DIR;/ensemble_stat/input_file_list \
Expand All @@ -239,14 +240,14 @@
-outdir &OUTPUT_DIR;/ensemble_stat -v 1
</param>
<output>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBS_ERROR_20120410_120000V.stat</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBS_ERROR_20120410_120000V_ecnt.txt</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBS_ERROR_20120410_120000V_rhist.txt</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBS_ERROR_20120410_120000V_phist.txt</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBS_ERROR_20120410_120000V_orank.txt</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBS_ERROR_20120410_120000V_ssvar.txt</stat>
<grid_nc>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBS_ERROR_20120410_120000V_ens.nc</grid_nc>
<grid_nc>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBS_ERROR_20120410_120000V_orank.nc</grid_nc>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBSERR_20120410_120000V.stat</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBSERR_20120410_120000V_ecnt.txt</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBSERR_20120410_120000V_rhist.txt</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBSERR_20120410_120000V_phist.txt</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBSERR_20120410_120000V_orank.txt</stat>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBSERR_20120410_120000V_ssvar.txt</stat>
<grid_nc>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBSERR_20120410_120000V_ens.nc</grid_nc>
<grid_nc>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_OBSERR_20120410_120000V_orank.nc</grid_nc>
</output>
</test>

Expand Down
3 changes: 2 additions & 1 deletion test/xml/unit_gaussian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<!ENTITY DATA_DIR_GAUSS "&INPUT_DIR;/gaussian">
]>

<!-- Requires: None -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
Expand All @@ -25,5 +27,4 @@
</output>
</test>


</met_test>
5 changes: 3 additions & 2 deletions test/xml/unit_gen_ens_prod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
<!ENTITY DATA_DIR_CLIMO "&INPUT_DIR;/climatology_data">
]>

<!-- Requires: None -->

<met_test>

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

<!-- -->
<!-- gen_ens_prod -->
<!-- no dependencies -->
<!-- -->

<!-- Use -ens twice to include the control as a member. -->
Expand Down Expand Up @@ -120,7 +121,7 @@
<param> \
-ens &DATA_DIR_MODEL;/grib2/gefs/enspost_grb2.t00z.prmsl \
-config &CONFIG_DIR;/GenEnsProdConfig_single_file_grib \
-ctrl &DATA_DIR_MODEL;/grib2/gefs/enspost_grb2.t00z.prmsl \
-ctrl &DATA_DIR_MODEL;/grib2/gefs/enspost_grb2.t00z.prmsl \
-out &OUTPUT_DIR;/gen_ens_prod/gen_ens_prod_SINGLE_FILE_GRIB_WITH_CTRL.nc \
-v 2
</param>
Expand Down
2 changes: 2 additions & 0 deletions test/xml/unit_gen_vx_mask.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<!ENTITY DATA_DIR_OBS "&INPUT_DIR;/obs_data">
]>

<!-- Requires: None -->

<met_test>

<!-- -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0"?>
<!DOCTYPE met_test [
<!ENTITY MET_BIN "${MET_BASE}/../../bin">
<!ENTITY TEST_DIR "${MET_TEST_BASE}">
<!ENTITY INPUT_DIR "${MET_TEST_INPUT}">
<!ENTITY OUTPUT_DIR "${MET_TEST_OUTPUT}">
<!ENTITY MET_BIN "${MET_BASE}/../../bin">
<!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">
]>
<!ENTITY CONFIG_DIR "&TEST_DIR;/config">
<!ENTITY DATA_DIR_MODEL "&INPUT_DIR;/model_data">
<!ENTITY DATA_DIR_OBS "&INPUT_DIR;/obs_data">
]>

<!-- Requires: None -->

<met_test>

Expand Down
2 changes: 2 additions & 0 deletions test/xml/unit_grid_diag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<!ENTITY DATA_DIR_OBS "&INPUT_DIR;/obs_data">
]>

<!-- Requires: None -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
Expand Down
2 changes: 2 additions & 0 deletions test/xml/unit_grid_stat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<!ENTITY DATA_DIR_CLIMO "&INPUT_DIR;/climatology_data">
]>

<!-- Requires: unit_pcp_combine.xml -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
Expand Down
2 changes: 2 additions & 0 deletions test/xml/unit_grid_weight.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<!ENTITY DATA_DIR_CLIMO "&INPUT_DIR;/climatology_data">
]>

<!-- Requires: None -->

<met_test>

<test_dir>&TEST_DIR;</test_dir>
Expand Down
Loading