Skip to content

Commit

Permalink
Feature 1904 gen_ens_prod (#1927)
Browse files Browse the repository at this point in the history
* Per #1904, add gen_ens_prod tool. Note that this is a complete copy of the existing Ensemble-Stat tool, just renamed to Gen-Ens-Prod, including the newly added documentation section.

* Per #1904, update the gen-ens-prod documentation labels, switching _ES_ to _GEP_ to get rid of RTD documentation warnings.

* Per #1904, more renaming of EnsembleStat to GenEnsProd in the code and add the default configuration file.

* Per #1904, add updated version of the MET flowchart for version 10.1.0.

* Per #1904, add make directives for running a sample call to gen_ens_prod.

* Per #1904, updates to the default Gen-Ens-Prod config file.

* Per #1904, strip out the logic from Ensemble-Stat that does not apply to Gen-Ens-Prod.

* Per #1904, updates to the Gen-Ens-Prod documentation. These are not complete. Continue edits in the configuration section.

* Per #1904, fix command line in example to use -out instead of -outdir.

* Per #1904, removing lots of uneeded code. Update to read climatology data for use in defining climo cdp threshold types.

* Per #1904, add climo and climo_cdp options to ensemble_flag.

* Per #1904, update gen_ens_prod to actually write climo and climo_cdp outputs.

* Per #1904, add NumArray::set_const(double, int) to quickly call erase() followed by add_const(double, int). That saves code in gen_ens_prod.

* Per #1904, add support for the ensemble control member. Exclude it from the spread.

* Per #1904, update call to gen_ens_prod for make test and also update the unit tests. Still need more work to get climo working in unit tests.

* Per #1904, update the fractional_coverage() function to handle climo mean/stdev for CDP type thresholds.

* Per #1904, update Grid-Stat, Ensemlbe-Stat, and Gen-Ens-Prod to pass climo data to the fractional_coverage() function.

* Per #1904, fix logic for handling climo data in the fractional_coverage() function. Also update the gen_ens_prod unit tests to call it once with/without a control member. I manually confirmed that the spread is the same in the output but the means differ.

* Per #1904, add the make test script logic to unit_met_test_scripts.xml

* Per #1904, complete initial version of docs for gen_ens_prod tool. Remove unused rng and tmp_dir config entries. Simplify variable names.

* Per #1904, fix names to get it compiling and remove unneeded gsl include.

* Per #1904, simplify variable names.

* Per #1904, correct the logic for handling the control member. The ensemble sum is used to compute both the mean and the standard deviation. Since we include control member in the mean but not the standard deviation, we need to track two different versions of that sum.

* Per #1904, in gen_ens_prod.cc correct calls to the smooth_field() and fractional_coverage() utility functions as their signatures where changed by recent enhancements in develop.
  • Loading branch information
JohnHalleyGotway authored Oct 2, 2021
1 parent 5e8cc05 commit 3c725bc
Show file tree
Hide file tree
Showing 32 changed files with 2,635 additions and 7 deletions.
1 change: 1 addition & 0 deletions met/README
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ sub-directory, or the MET Online Tutorial:
command line) will contain 36 executables:
- ascii2nc
- ensemble_stat
- gen_ens_prod
- gen_vx_mask
- grid_stat
- gis_dump_dbf
Expand Down
22 changes: 22 additions & 0 deletions met/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,27 @@ else
AC_MSG_NOTICE([ensemble_stat will not be compiled])
fi

# gen_ens_prod

AC_ARG_ENABLE(gen_ens_prod,
[AS_HELP_STRING([--disable-gen_ens_prod], [Disable compilation of gen_ens_prod])],
[case "${enableval}" in
yes | no ) ENABLE_GEN_ENS_PROD="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-gen_ens_prod) ;;
esac],
[ENABLE_GEN_ENS_PROD="yes"]
)

AM_CONDITIONAL([ENABLE_GEN_ENS_PROD], [test "x$ENABLE_GEN_ENS_PROD" = "xyes"])

if test "x$ENABLE_GEN_ENS_PROD" = "xyes"; then
AC_DEFINE([ENABLE_GEN_ENS_PROD], [], ["build gen_ens_prod"])
AC_MSG_NOTICE([gen_ens_prod will be compiled])
else
AC_MSG_NOTICE([gen_ens_prod will not be compiled])
fi


# gen_vx_mask

AC_ARG_ENABLE(gen_vx_mask,
Expand Down Expand Up @@ -1226,6 +1247,7 @@ AC_CONFIG_FILES([Makefile
src/tools/other/Makefile
src/tools/other/ascii2nc/Makefile
src/tools/other/lidar2nc/Makefile
src/tools/other/gen_ens_prod/Makefile
src/tools/other/gen_vx_mask/Makefile
src/tools/other/gis_utils/Makefile
src/tools/other/ioda2nc/Makefile
Expand Down
141 changes: 141 additions & 0 deletions met/data/config/GenEnsProdConfig_default
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
////////////////////////////////////////////////////////////////////////////////
//
// Gen-Ens-Prod configuration file.
//
// For additional information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

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

//
// Output description to be written
// May be set separately in each "obs.field" entry
//
desc = "NA";

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

//
// Verification grid
// May be set separately in each "field" entry
//
regrid = {
to_grid = NONE;
method = NEAREST;
width = 1;
vld_thresh = 0.5;
shape = SQUARE;
}

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

//
// May be set separately in each "field" entry
//
censor_thresh = [];
censor_val = [];
cat_thresh = [];
nc_var_str = "";

//
// Ensemble fields to be processed
//
ens = {
ens_thresh = 1.0;
vld_thresh = 1.0;

field = [
{
name = "APCP";
level = "A03";
cat_thresh = [ >0.0, >=5.0 ];
}
];
}

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

//
// Neighborhood ensemble probabilities
//
nbrhd_prob = {
width = [ 5 ];
shape = CIRCLE;
vld_thresh = 0.0;
}

//
// NMEP smoothing methods
//
nmep_smooth = {
vld_thresh = 0.0;
shape = CIRCLE;
gaussian_dx = 81.27;
gaussian_radius = 120;
type = [
{
method = GAUSSIAN;
width = 1;
}
];
}

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

//
// Climatology data
//
climo_mean = {

file_name = [];
field = [];

regrid = {
method = NEAREST;
width = 1;
vld_thresh = 0.5;
shape = SQUARE;
}

time_interp_method = DW_MEAN;
day_interval = 31;
hour_interval = 6;
}

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

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

//
// Ensemble product output types
// May be set separately in each "ens.field" entry
//
ensemble_flag = {
latlon = TRUE;
mean = TRUE;
stdev = TRUE;
minus = TRUE;
plus = TRUE;
min = TRUE;
max = TRUE;
range = TRUE;
vld_count = TRUE;
frequency = TRUE;
nep = FALSE;
nmep = FALSE;
climo = FALSE;
climo_cdp = FALSE;
}

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

version = "V10.1.0";

////////////////////////////////////////////////////////////////////////////////
1 change: 1 addition & 0 deletions met/data/config/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ config_DATA = \
ConfigMapData \
Ascii2NcConfig_default \
EnsembleStatConfig_default \
GenEnsProdConfig_default \
GridStatConfig_default \
GridDiagConfig_default \
IODA2NCConfig_default \
Expand Down
Binary file modified met/docs/Flowchart/MET_flowchart.pptx
Binary file not shown.
Binary file added met/docs/Flowchart/MET_flowchart_v10.1.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3c725bc

Please sign in to comment.