Skip to content

Commit

Permalink
Feature 1624 obs_command second try (#1629)
Browse files Browse the repository at this point in the history
* Per #1624, define OBS_COMMAND.

* Per #1624, unset the test-specific environment variables after completing the run.

* Per #1624, after PR #1625 merged these changes into develop, they caused 2 unexpected diffs in the NB output. These were caused by enviornment variables being unset after each test. Updating unit_netcdf.xml and unit_point2grid.xml to define more test-specific environment variables to reproduce previous NB output.
  • Loading branch information
JohnHalleyGotway authored Jan 21, 2021
1 parent 4f14220 commit 78af442
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
5 changes: 3 additions & 2 deletions test/xml/unit_netcdf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@
<test name="365_days">
<exec>&MET_BIN;/grid_stat</exec>
<env>
<pair><name>OUTPUT_PREFIX</name> <value>no_leap</value></pair>
<pair><name>APPLY_MASK</name> <value>FALSE</value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>no_leap</value></pair>
<pair><name>APPLY_MASK</name> <value>FALSE</value></pair>
<pair><name>MET_NC_COMPRESS</name> <value>3</value></pair>
</env>
<param> \
&DATA_DIR_MODEL;/easm/base_series_spei12_annual_mean.nc \
Expand Down
26 changes: 21 additions & 5 deletions test/xml/unit_point2grid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

<test name="point2grid_ascii2nc_surfrad_DW_PSP">
<exec>&MET_BIN;/point2grid</exec>
<env>
<pair><name>MET_TMP_DIR</name> <value>&OUTPUT_DIR;</value></pair>
</env>
<param> \
&OUTPUT_DIR;/ascii2nc/surfrad.nc \
G212 \
Expand All @@ -32,6 +35,9 @@

<test name="point2grid_ascii2nc_surfrad_DW_PSP_by_name">
<exec>&MET_BIN;/point2grid</exec>
<env>
<pair><name>MET_TMP_DIR</name> <value>&OUTPUT_DIR;</value></pair>
</env>
<param> \
&OUTPUT_DIR;/ascii2nc/surfrad.nc \
G212 \
Expand All @@ -46,6 +52,9 @@

<test name="point2grid_pb2nc_TMP">
<exec>&MET_BIN;/point2grid</exec>
<env>
<pair><name>MET_TMP_DIR</name> <value>&OUTPUT_DIR;</value></pair>
</env>
<param> \
&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.nc \
G212 \
Expand All @@ -54,14 +63,16 @@
-name TEMP \
-v 1
</param>
<!-- -->
<output>
<grid_nc>&OUTPUT_DIR;/point2grid/pb2nc_TMP.nc</grid_nc>
</output>
</test>

<test name="point2grid_pb2nc_TMP_prob">
<exec>&MET_BIN;/point2grid</exec>
<env>
<pair><name>MET_TMP_DIR</name> <value>&OUTPUT_DIR;</value></pair>
</env>
<param> \
&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.nc \
G212 \
Expand All @@ -70,14 +81,16 @@
-name TEMP -prob_cat_thresh ">=280.0" \
-v 1
</param>
<!-- -->
<output>
<grid_nc>&OUTPUT_DIR;/point2grid/pb2nc_TMP_prob.nc</grid_nc>
</output>
</test>

<test name="point2grid_pb2nc_TMP_prob_gaussian">
<exec>&MET_BIN;/point2grid</exec>
<env>
<pair><name>MET_TMP_DIR</name> <value>&OUTPUT_DIR;</value></pair>
</env>
<param> \
&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.nc \
G212 \
Expand All @@ -86,14 +99,16 @@
-name TEMP -prob_cat_thresh ">=280.0" -method GAUSSIAN \
-v 1
</param>
<!-- -->
<output>
<grid_nc>&OUTPUT_DIR;/point2grid/pb2nc_TMP_prob_gaussian.nc</grid_nc>
</output>
</test>

<test name="point2grid_pb2nc_methods">
<exec>&MET_BIN;/point2grid</exec>
<env>
<pair><name>MET_TMP_DIR</name> <value>&OUTPUT_DIR;</value></pair>
</env>
<param> \
&OUTPUT_DIR;/pb2nc/ndas.20120409.t12z.prepbufr.tm00.nc \
G212 \
Expand All @@ -102,22 +117,23 @@
-field 'name="RH"; level="*"; valid_time="20120409_120000";' \
-v 1
</param>
<!-- -->
<output>
<grid_nc>&OUTPUT_DIR;/point2grid/pb2nc_TMP_RH.nc</grid_nc>
</output>
</test>

<test name="point2grid_pb2nc_big_input">
<exec>&MET_BIN;/point2grid</exec>
<env>
<pair><name>MET_TMP_DIR</name> <value>&OUTPUT_DIR;</value></pair>
</env>
<param> \
&DATA_DIR_OBS;/point_obs/prepbufr.gdas.2017060300.nc \
G212 \
&OUTPUT_DIR;/regrid/pb2nc_TMP_big_input.nc \
-field 'name="TMP"; level="Z2";' \
-v 1
</param>
<!-- -->
<output>
<grid_nc>&OUTPUT_DIR;/regrid/pb2nc_TMP_big_input.nc</grid_nc>
</output>
Expand Down

0 comments on commit 78af442

Please sign in to comment.