Skip to content

Commit

Permalink
Feature #2601 seeps climo config (#2927)
Browse files Browse the repository at this point in the history
* #2601 Added seeps_grid_climo_name and seeps_point_climo_name

* #2601 Added seeps_grid_climo_name

* #2601 Removed SEEPS settings

* #2601 Initial release

* #2601 Changed to set the SEEPS climo by using the configuration

* #2601 Removed SEESP settings at PointStatConfig_APCP and use PointStatConfig_SEEPS for SEEPSm testing

* #2601 Updated descryption for seeps_grid_climo_name

* #2601 Added a argument for the SEEPS clomo file

* #2601 Added conf_key_seeps_grid_climo_name and  conf_key_seeps_point_climo_name

* #2601 Support the climo filename from the configuration

* #2601 Corrected key for climo name

* Removing duplicate word

---------

Co-authored-by: Howard Soh <[email protected]>
Co-authored-by: Julie Prestopnik <[email protected]>
  • Loading branch information
3 people authored Jun 27, 2024
1 parent 095b67e commit 1a40ca6
Show file tree
Hide file tree
Showing 20 changed files with 361 additions and 198 deletions.
20 changes: 20 additions & 0 deletions docs/Users_Guide/config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,26 @@ The default setting is >=0.1&&<=0.85.
seeps_p1_thresh = >=0.1&&<=0.85;
seeps_grid_climo_name
---------------------

The "seeps_grid_climo_name" option sets the location and the filename of the SEEPS climo file for the gridded data.
The default setting is the empty string. It should be configured by the user. It can be overridden by the environment variable, MET_SEEPS_GRID_CLIMO_NAME.

.. code-block:: none
seeps_grid_climo_name = "";
seeps_point_climo_name
----------------------

The "seeps_point_climo_name" option controls the location and the filename of the SEEPS climo file for the point data.
The default setting is the empty string which does not override the default location and name. It can be overridden by the environment variable, MET_SEEPS_POINT_CLIMO_NAME.

.. code-block:: none
seeps_point_climo_name = "";
mask_missing_flag
-----------------

Expand Down
2 changes: 1 addition & 1 deletion docs/Users_Guide/grid-stat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ The **output_flag** array controls the type of output that the Grid-Stat tool ge

Note that the first two line types are easily derived from one another. The user is free to choose which measure is most desired. The output line types are described in more detail in :numref:`grid_stat-output`.

The SEEPS climo file is not distributed with MET tools because of the file size. It should be configured by using the environment variable, MET_SEEPS_GRID_CLIMO_NAME.
The SEEPS climo file is not distributed with MET tools because of the file size. It should be configured by using the configuration file (seeps_grid_climo_name). It can be overridden by the environment variable, MET_SEEPS_GRID_CLIMO_NAME.


_____________________
Expand Down
2 changes: 1 addition & 1 deletion docs/Users_Guide/point-stat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ Note that writing out matched pair data (MPR lines) for a large number of cases

If all line types corresponding to a particular verification method are set to NONE, the computation of those statistics will be skipped in the code and thus make the Point-Stat tool run more efficiently. For example, if FHO, CTC, and CTS are all set to NONE, the Point-Stat tool will skip the categorical verification step.

The default SEEPS climo file exists at MET_BASE/climo/seeps/PPT24_seepsweights.nc. It can be overridden by using the environment variable, MET_SEEPS_POINT_CLIMO_NAME.
The default SEEPS climo file exists at MET_BASE/climo/seeps/PPT24_seepsweights.nc. It is configurable by using the configuration file (seeps_point_climo_name). It can be overridden by the environment variable, MET_SEEPS_POINT_CLIMO_NAME.

.. _point_stat-output:

Expand Down
1 change: 1 addition & 0 deletions internal/test_unit/config/GridStatConfig_SEEPS
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ nc_pairs_flag = {
// Threshold for SEEPS p1 (Probability of being dry)

seeps_p1_thresh = ${SEEPS_P1_THRESH};
seeps_grid_climo_name = "${SEEPS_GRID_CLIMO_NAME}";

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

Expand Down
9 changes: 2 additions & 7 deletions internal/test_unit/config/PointStatConfig_APCP
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,10 @@ output_flag = {
rps = NONE;
eclv = BOTH;
mpr = NONE;
seeps = ${SEEPS_FLAG};
seeps_mpr = ${SEEPS_FLAG};
seeps = NONE;
seeps_mpr = NONE;
}

////////////////////////////////////////////////////////////////////////////////
// Threshold for SEEPS p1 (Probability of being dry)

seeps_p1_thresh = ${SEEPS_P1_THRESH};

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

duplicate_flag = NONE;
Expand Down
149 changes: 149 additions & 0 deletions internal/test_unit/config/PointStatConfig_SEEPS
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
////////////////////////////////////////////////////////////////////////////////
//
// Point-Stat configuration file.
//
// For additional information, please see the MET User's Guide.
// Copied from PointStatConfig_APCP
//
////////////////////////////////////////////////////////////////////////////////

model = "FCST";

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

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

regrid = {
to_grid = NONE;
method = NEAREST;
width = 1;
}

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

obs_window = {
beg = ${BEG_DS};
end = ${END_DS};
}

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

mpr_column = [];
mpr_thresh = [];
cnt_thresh = [ NA ];
cnt_logic = UNION;
wind_thresh = [ NA ];
wind_logic = UNION;
eclv_points = 0.05;

cat_thresh = [ >0.254, >0.635, >1.270, >2.540 ];
message_type = "ADPSFC";

fcst = {
sid_inc = [];
sid_exc = [];
obs_quality_inc = [];
obs_quality_exc = [];

field = [
{
name = "${FCST_FIELD_NAME}";
level = "${FCST_FIELD_LEVEL}";
}
];

}
obs = ${OBS_DICT};

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

mask = {
grid = [ "FULL" ];
poly = [];
sid = [];
llpnt = [];
}

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

ci_alpha = [ 0.05 ];

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

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

interp = {
vld_thresh = 1.0;

type = [
{ method = MEDIAN; width = 3; },
{ method = NEAREST; width = 1; },
{ method = DW_MEAN; width = [ 3, 5 ]; },
{ method = LS_FIT; width = [ 3, 5 ]; },
{ method = BILIN; width = 2; }
];
}

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

hira = {
flag = FALSE;
width = [ 2, 3, 4, 5 ];
vld_thresh = 1.0;
cov_thresh = [ ==0.25 ];
shape = SQUARE;
prob_cat_thresh = [];
}

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

output_flag = {
fho = BOTH;
ctc = BOTH;
cts = BOTH;
mctc = NONE;
mcts = NONE;
cnt = BOTH;
sl1l2 = BOTH;
sal1l2 = NONE;
vl1l2 = NONE;
val1l2 = NONE;
vcnt = NONE;
pct = NONE;
pstd = NONE;
pjc = NONE;
prc = NONE;
ecnt = NONE;
orank = NONE;
rps = NONE;
eclv = BOTH;
mpr = NONE;
seeps = BOTH;
seeps_mpr = BOTH;
}

////////////////////////////////////////////////////////////////////////////////
// Threshold for SEEPS p1 (Probability of being dry)

seeps_p1_thresh = ${SEEPS_P1_THRESH};
seeps_point_climo_name = "${SEEPS_POINT_CLIMO_NAME}";

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

duplicate_flag = NONE;
rank_corr_flag = FALSE;
tmp_dir = "/tmp";
output_prefix = "${OUTPUT_PREFIX}";
version = "V12.0.0";

////////////////////////////////////////////////////////////////////////////////
2 changes: 1 addition & 1 deletion internal/test_unit/xml/unit_grid_stat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
<pair><name>SEEPS_FLAG</name> <value>BOTH</value></pair>
<pair><name>SEEPS_P1_THRESH</name> <value>NA</value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>SEEPS</value></pair>
<pair><name>MET_SEEPS_GRID_CLIMO_NAME</name><value>&DATA_DIR_CLIMO;/seeps/PPT24_seepsweights_grid.nc</value></pair>
<pair><name>SEEPS_GRID_CLIMO_NAME</name><value>&DATA_DIR_CLIMO;/seeps/PPT24_seepsweights_grid.nc</value></pair>
</env>
<param> \
&DATA_DIR_MODEL;/seeps/gpm_2021120100_2021120200_trmmgrid.nc \
Expand Down
10 changes: 2 additions & 8 deletions internal/test_unit/xml/unit_point_stat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@
<pair><name>FCST_FIELD_NAME</name> <value>APCP</value></pair>
<pair><name>FCST_FIELD_LEVEL</name> <value>A3</value></pair>
<pair><name>OBS_DICT</name> <value>fcst</value></pair>
<pair><name>SEEPS_FLAG</name> <value>NONE</value></pair>
<pair><name>SEEPS_P1_THRESH</name> <value>NA</value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>GRIB1_NAM_TRMM</value></pair>
</env>
<param> \
Expand All @@ -196,8 +194,6 @@
<pair><name>FCST_FIELD_NAME</name> <value>APCP</value></pair>
<pair><name>FCST_FIELD_LEVEL</name> <value>A3</value></pair>
<pair><name>OBS_DICT</name> <value>fcst</value></pair>
<pair><name>SEEPS_FLAG</name> <value>NONE</value></pair>
<pair><name>SEEPS_P1_THRESH</name> <value>NA</value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>GRIB2_SREF_TRMM</value></pair>
</env>
<param> \
Expand All @@ -224,8 +220,6 @@
<pair><name>FCST_FIELD_NAME</name> <value>APCP_24</value></pair>
<pair><name>FCST_FIELD_LEVEL</name> <value>(*,*)</value></pair>
<pair><name>OBS_DICT</name> <value>{ field = [ { name = "APCP"; level = "A24"; } ]; }</value></pair>
<pair><name>SEEPS_FLAG</name> <value>NONE</value></pair>
<pair><name>SEEPS_P1_THRESH</name> <value>NA</value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>NCMET_NAM_HMTGAGE</value></pair>
</env>
<param> \
Expand All @@ -252,14 +246,14 @@
<pair><name>FCST_FIELD_NAME</name> <value>APCP_24</value></pair>
<pair><name>FCST_FIELD_LEVEL</name> <value>(*,*)</value></pair>
<pair><name>OBS_DICT</name> <value>{ field = [ { name = "TP24"; level = "L0"; is_precipitation = TRUE; } ]; }</value></pair>
<pair><name>SEEPS_FLAG</name> <value>BOTH</value></pair>
<pair><name>SEEPS_P1_THRESH</name> <value>ge0.1&amp;&amp;le0.85</value></pair>
<pair><name>SEEPS_POINT_CLIMO_NAME</name> <value></value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>NCMET_NAM_NDAS_SEEPS</value></pair>
</env>
<param> \
&DATA_DIR_MODEL;/met_nc/nam/nam_2012040900_F036_APCP24.nc \
&OUTPUT_DIR;/pb2nc/ndas.20120410.t12z.prepbufr.tm00.nc \
&CONFIG_DIR;/PointStatConfig_APCP \
&CONFIG_DIR;/PointStatConfig_SEEPS \
-outdir &OUTPUT_DIR;/point_stat -v 1
</param>
<output>
Expand Down
4 changes: 3 additions & 1 deletion src/basic/vx_config/config_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,9 @@ static const char conf_key_obs_to_qc_map[] = "obs_to_qc_map";
static const char conf_key_missing_thresh[] = "missing_thresh";
static const char conf_key_control_id[] = "control_id";
static const char conf_key_ens_member_ids[] = "ens_member_ids";
static const char conf_key_seeps_p1_thresh[] = "seeps_p1_thresh";
static const char conf_key_seeps_grid_climo_name[] = "seeps_grid_climo_name";
static const char conf_key_seeps_point_climo_name[] = "seeps_point_climo_name";
static const char conf_key_seeps_p1_thresh[] = "seeps_p1_thresh";
static const char conf_key_ugrid_coordinates_file[] = "ugrid_coordinates_file";
static const char conf_key_ugrid_dataset[] = "ugrid_dataset";
static const char conf_key_ugrid_map_config[] = "ugrid_map_config";
Expand Down
Loading

0 comments on commit 1a40ca6

Please sign in to comment.