Skip to content

Commit

Permalink
Per #2924, add a new series_analysis test that ERRORS OUT prior to th…
Browse files Browse the repository at this point in the history
…is PR but works after the changes in this PR.
  • Loading branch information
JohnHalleyGotway committed Sep 19, 2024
1 parent 394fb8d commit 0f722ee
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 1 deletion.
162 changes: 162 additions & 0 deletions internal/test_unit/config/SeriesAnalysisConfig_const_climo
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
////////////////////////////////////////////////////////////////////////////////
//
// Series-Analysis configuration file.
//
// For additional information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

//
// Output model name to be written
//
model = "GFS";

//
// Output description to be written
//
desc = "NA";

//
// Output observation type to be written
//
obtype = "GFSANL";

////////////////////////////////////////////////////////////////////////////////

//
// Verification grid
//
regrid = {
to_grid = NONE;
method = NEAREST;
width = 1;
vld_thresh = 0.5;
}

////////////////////////////////////////////////////////////////////////////////

censor_thresh = [];
censor_val = [];
cat_thresh = [];
cnt_thresh = [ NA ];
cnt_logic = UNION;

//
// Forecast and observation fields to be verified
//
fcst = {
field = [
{ name = "TMP"; level = "P850"; valid_time = "20120409_12"; },
{ name = "TMP"; level = "P850"; valid_time = "20120410_00"; },
{ name = "TMP"; level = "P850"; valid_time = "20120410_12"; }
];
}
obs = {
field = [
{ name = "TMP"; level = "P850"; valid_time = "20120409_12"; },
{ name = "TMP"; level = "P850"; valid_time = "20120410_00"; },
{ name = "TMP"; level = "P850"; valid_time = "20120410_12"; }
];
}

////////////////////////////////////////////////////////////////////////////////

//
// Climatology data
//
climo_mean = fcst;
climo_mean = {

file_name = [ ${CLIMO_MEAN_FILE_LIST} ];

field = [
{ name = "TMP"; level = "P850"; valid_time = "19590409_00"; }
];

regrid = {
method = BILIN;
width = 2;
vld_thresh = 0.5;
}

time_interp_method = NEAREST;
day_interval = NA;
hour_interval = NA;
}

climo_stdev = climo_mean;
climo_stdev = {
file_name = [ ${CLIMO_STDEV_FILE_LIST} ];
}

climo_cdf = {
cdf_bins = 1;
center_bins = FALSE;
direct_prob = FALSE;
}

////////////////////////////////////////////////////////////////////////////////

//
// Confidence interval settings
//
ci_alpha = [ 0.05 ];

boot = {
interval = PCTILE;
rep_prop = 1.0;
n_rep = 0;
rng = "mt19937";
seed = "1";
}

////////////////////////////////////////////////////////////////////////////////

//
// Verification masking regions
//
mask = {
grid = "";
poly = "";
}

//
// Number of grid points to be processed concurrently. Set smaller to use less
// memory but increase the number of passes through the data. If set <= 0, all
// grid points are processed concurrently.
//
block_size = 0;

//
// Ratio of valid matched pairs to compute statistics for a grid point
//
vld_thresh = 0.5;

////////////////////////////////////////////////////////////////////////////////

//
// Statistical output types
//
output_stats = {
fho = [ ];
ctc = [ ];
cts = [ ];
mctc = [ ];
mcts = [ ];
cnt = [ "TOTAL", "RMSE", "ANOM_CORR" ];
sl1l2 = [ ];
sal1l2 = [ ];
pct = [ ];
pstd = [ ];
pjc = [ ];
prc = [ ];
}

////////////////////////////////////////////////////////////////////////////////

hss_ec_value = NA;
rank_corr_flag = FALSE;
tmp_dir = "/tmp";
version = "V12.0.0";

////////////////////////////////////////////////////////////////////////////////
28 changes: 28 additions & 0 deletions internal/test_unit/xml/unit_climatology_1.0deg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,34 @@
</output>
</test>

<test name="climatology_SERIES_ANALYSIS_1.0DEG_CONST_CLIMO">
<exec>&MET_BIN;/series_analysis</exec>
<env>
<pair><name>CLIMO_MEAN_FILE_LIST</name>
<value>"&DATA_DIR_CLIMO;/NCEP_NCAR_40YR_1.0deg/cmean_1d.19590409"
</value>
</pair>
<pair><name>CLIMO_STDEV_FILE_LIST</name>
<value>"&DATA_DIR_CLIMO;/NCEP_NCAR_40YR_1.0deg/cstdv_1d.19590409"
</value>
</pair>
</env>
<param> \
-fcst &DATA_DIR_MODEL;/grib2/gfs/gfs_2012040900_F012.grib2 \
&DATA_DIR_MODEL;/grib2/gfs/gfs_2012040900_F024.grib2 \
&DATA_DIR_MODEL;/grib2/gfs/gfs_2012040900_F036.grib2 \
-obs &DATA_DIR_MODEL;/grib2/gfsanl/gfsanl_4_20120409_1200_000.grb2 \
&DATA_DIR_MODEL;/grib2/gfsanl/gfsanl_4_20120410_0000_000.grb2 \
&DATA_DIR_MODEL;/grib2/gfsanl/gfsanl_4_20120410_1200_000.grb2 \
-out &OUTPUT_DIR;/climatology_1.0deg/series_analysis_GFS_CLIMO_1.0DEG_CONST_CLIMO.nc \
-config &CONFIG_DIR;/SeriesAnalysisConfig_const_climo \
-v 3
</param>
<output>
<grid_nc>&OUTPUT_DIR;/climatology_1.0deg/series_analysis_GFS_CLIMO_1.0DEG_CONST_CLIMO.nc</grid_nc>
</output>
</test>

<test name="climatology_SERIES_ANALYSIS_1.0DEG_AGGR">
<exec>&MET_BIN;/series_analysis</exec>
<env>
Expand Down
2 changes: 1 addition & 1 deletion src/tools/core/series_analysis/series_analysis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void process_command_line(int argc, char **argv) {
if(fcst_files.n() != n_series_pair) {
mlog << Error << "\nprocess_command_line() -> "
<< R"(when using the "-paired" command line option, the )"
<< "the file list length (" << fcst_files.n()
<< "file list length (" << fcst_files.n()
<< ") and series length (" << n_series_pair
<< ") must match.\n\n";
usage();
Expand Down

0 comments on commit 0f722ee

Please sign in to comment.