Skip to content

Commit

Permalink
Update main_v11.0-ref after #2438 (#2445)
Browse files Browse the repository at this point in the history
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: jprestop <jpresto@ucar.edu>
Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: hsoh-u <hsoh@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
fix #2389 main_v11.0 flowchart (#2391)
fix definitions of G172 and G220 based on comments in NOAA-EMC/NCEPLIBS-w3emc#157. (#2405)
fix #2380 main_v11.0 override (#2381)
fix #2408 main_v11.0 empty config (#2409)
fix #2390 main_v11.0 fix compiling hdf5 with zlib and handle NetCDF-C zip (#2403)
fix #2415 main_v11.0 modulefiles (#2416)
fix #2412 main_v11.0 climo (#2420)
fix #2426 main_v11.0 buoy (#2432)
fix #2437 main_v11.0 convert (#2438)
fix for main_v11.0, for #2437, forgot one reference to the search_parent for a dictionary lookup.
  • Loading branch information
JohnHalleyGotway authored Feb 16, 2023
1 parent 832d42c commit 31a063c
Show file tree
Hide file tree
Showing 18 changed files with 578 additions and 127 deletions.
1 change: 0 additions & 1 deletion data/config/GridStatConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ climo_mean = {
}

time_interp_method = DW_MEAN;
match_month = TRUE;
day_interval = 31;
hour_interval = 6;
}
Expand Down
12 changes: 12 additions & 0 deletions data/table_files/ndbc_stations.xml

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions docs/Users_Guide/config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -693,14 +693,16 @@ using the following entries:
smoothing. The default is 120. Ignored if not Gaussian method.

* The "gaussian_dx" and "gaussian_radius" settings must be in the same
units, such as kilometers or degress. Their ratio
units, such as kilometers or degress. Their ratio
(sigma = gaussian_radius / gaussian_dx) determines the Guassian weighting
function.

* The "convert", "censor_thresh", and "censor_val" entries are described
below. When specified, these operations are applied to the output of the
regridding step. The conversion operation is applied first, followed by
the censoring operation.
below. When specified, these operations are applied to the output of the
regridding step. The conversion operation is applied first, followed by
the censoring operation. Note that these operations are limited in scope.
They are only applied if defined within the regrid dictionary itself.
Settings defined at higher levels of config file context are not applied.

.. code-block:: none
Expand Down
266 changes: 266 additions & 0 deletions internal/test_unit/config/GridStatConfig_climo_wrap_year
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
////////////////////////////////////////////////////////////////////////////////
//
// Grid-Stat configuration file.
//
// For additional information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

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

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

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

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

//
// Verification grid
//
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 = [];
mpr_column = [];
mpr_thresh = [];
cat_thresh = [];
cnt_thresh = [ NA ];
cnt_logic = UNION;
wind_thresh = [ NA ];
wind_logic = UNION;
eclv_points = 0.05;
nc_pairs_var_name = "";
nc_pairs_var_suffix = "";
hss_ec_value = NA;
rank_corr_flag = FALSE;

//
// Forecast and observation fields to be verified
//
fcst = {

name = "TMP";
level = "P500";

field = [
{ set_attr_init = "20201225_12"; set_attr_valid = "20201225_12"; nc_pairs_var_suffix = "20201225_12"; },
{ set_attr_init = "20210105_12"; set_attr_valid = "20210105_12"; nc_pairs_var_suffix = "20210105_12"; },
{ set_attr_init = "20201225_03"; set_attr_valid = "20201225_03"; nc_pairs_var_suffix = "20201225_03"; },
{ set_attr_init = "20201225_21"; set_attr_valid = "20201225_21"; nc_pairs_var_suffix = "20201225_21"; }
];
}
obs = fcst;

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

//
// Climatology data
//
climo_mean = {

field = [
{ name = "TMP"; level = "P500"; },
{ name = "TMP"; level = "P500"; },
{ name = "TMP"; level = "P500"; },
{ name = "TMP"; level = "P500"; }
];

file_name = [ ${CLIMO_MEAN_FILE_LIST} ];

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

time_interp_method = DW_MEAN;
day_interval = ${DAY_INTERVAL};
hour_interval = ${HOUR_INTERVAL};
}

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

//
// May be set separately in each "obs.field" entry
//
climo_cdf = {
cdf_bins = 1;
center_bins = TRUE;
write_bins = FALSE;
direct_prob = FALSE;
}

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

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

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

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

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

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

//
// Data smoothing methods
//
interp = {
field = BOTH;
vld_thresh = 1.0;
shape = SQUARE;

type = [
{
method = NEAREST;
width = 1;
}
];
}

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

//
// Neighborhood methods
//
nbrhd = {
width = [ 1 ];
cov_thresh = [ >=0.5 ];
vld_thresh = 1.0;
shape = SQUARE;
}

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

//
// Fourier decomposition
//
fourier = {
wave_1d_beg = [];
wave_1d_end = [];
}

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

//
// Gradient statistics
// May be set separately in each "obs.field" entry
//
gradient = {
dx = [ 1, 2, 5 ];
dy = [ 1, 3, 5 ];
}

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

//
// Distance Map statistics
// May be set separately in each "obs.field" entry
//
distance_map = {
baddeley_p = 2;
baddeley_max_dist = NA;
fom_alpha = 0.1;
zhu_weight = 0.5;
beta_value(n) = n * n / 2.0;
}

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

//
// Statistical output types
//
output_flag = {
fho = NONE;
ctc = NONE;
cts = NONE;
mctc = NONE;
mcts = NONE;
cnt = NONE;
sl1l2 = NONE;
sal1l2 = STAT;
vl1l2 = NONE;
val1l2 = NONE;
vcnt = NONE;
pct = NONE;
pstd = NONE;
pjc = NONE;
prc = NONE;
eclv = NONE;
nbrctc = NONE;
nbrcts = NONE;
nbrcnt = NONE;
grad = NONE;
dmap = NONE;
seeps = NONE;
}

//
// NetCDF matched pairs output file
//
nc_pairs_flag = {
latlon = TRUE;
raw = FALSE;
diff = FALSE;
climo = TRUE;
climo_cdp = FALSE;
weight = FALSE;
nbrhd = FALSE;
fourier = FALSE;
gradient = FALSE;
distance_map = FALSE;
apply_mask = FALSE;
}

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

seeps_p1_thresh = NA;

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

grid_weight_flag = NONE;
tmp_dir = "/tmp";
output_prefix = "${OUTPUT_PREFIX}";
version = "V11.0.0";

////////////////////////////////////////////////////////////////////////////////
25 changes: 14 additions & 11 deletions internal/test_unit/config/PointStatConfig_climo
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,24 @@ fcst = {

field = [
{
name = "TMP";
level = [ "Z2" ];
desc = "KELVIN";
name = "TMP";
level = [ "Z2" ];
desc = "KELVIN";
set_attr_units = "K";
},
{
name = "TMP";
level = [ "Z2" ];
desc = "CELCIUS";
convert(x) = K_to_C(x);
name = "TMP";
level = [ "Z2" ];
desc = "CELCIUS";
convert(x) = K_to_C(x);
set_attr_units = "C";
},
{
name = "TMP";
level = [ "Z2" ];
desc = "FAHRENHEIT";
convert(x) = K_to_F(x);
name = "TMP";
level = [ "Z2" ];
desc = "FAHRENHEIT";
convert(x) = K_to_F(x);
set_attr_units = "F";
},
{
name = "TMP";
Expand Down
60 changes: 60 additions & 0 deletions internal/test_unit/xml/unit_climatology_2.5deg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,64 @@
</output>
</test>

<!-- MET#2412: Test interpolation of monthly climo between December 15 and January 15 -->

<test name="climatology_GRID_STAT_WRAP_YEAR_2.5DEG">
<exec>&MET_BIN;/grid_stat</exec>
<env>
<pair><name>OUTPUT_PREFIX</name> <value>WRAP_YEAR_CLIMO_2.5DEG</value></pair>
<pair><name>DAY_INTERVAL</name> <value>31</value></pair>
<pair><name>HOUR_INTERVAL</name> <value>6</value></pair>
<pair><name>CLIMO_MEAN_FILE_LIST</name>
<value>"&DATA_DIR_CLIMO;/NCEP_2.5deg/pgba_mean.19591215",
"&DATA_DIR_CLIMO;/NCEP_2.5deg/pgba_mean.19590115"
</value>
</pair>
<pair><name>CLIMO_STDEV_FILE_LIST</name>
<value>"&DATA_DIR_CLIMO;/NCEP_2.5deg/pgba_stdv.19591215",
"&DATA_DIR_CLIMO;/NCEP_2.5deg/pgba_stdv.19590115"
</value>
</pair>
</env>
<param> \
&DATA_DIR_MODEL;/grib2/gfsanl/gfsanl_4_20120409_1200_000.grb2 \
&DATA_DIR_MODEL;/grib2/gfsanl/gfsanl_4_20120409_1200_000.grb2 \
&CONFIG_DIR;/GridStatConfig_climo_wrap_year \
-outdir &OUTPUT_DIR;/climatology_2.5deg -v 3
</param>
<output>
<stat>&OUTPUT_DIR;/climatology_2.5deg/grid_stat_WRAP_YEAR_CLIMO_2.5DEG_000000L_20201225_120000V.stat</stat>
<grid_nc>&OUTPUT_DIR;/climatology_2.5deg/grid_stat_WRAP_YEAR_CLIMO_2.5DEG_000000L_20201225_120000V_pairs.nc</grid_nc>
</output>
</test>

<!-- MET#2437: Test interpolation with a single input monthly climo file -->

<test name="climatology_GRID_STAT_SINGLE_MONTH_2.5DEG">
<exec>&MET_BIN;/grid_stat</exec>
<env>
<pair><name>OUTPUT_PREFIX</name> <value>SINGLE_MONTH_CLIMO_2.5DEG</value></pair>
<pair><name>DAY_INTERVAL</name> <value>31</value></pair>
<pair><name>HOUR_INTERVAL</name> <value>6</value></pair>
<pair><name>CLIMO_MEAN_FILE_LIST</name>
<value>"&DATA_DIR_CLIMO;/NCEP_2.5deg/pgba_mean.19591215"
</value>
</pair>
<pair><name>CLIMO_STDEV_FILE_LIST</name>
<value>"&DATA_DIR_CLIMO;/NCEP_2.5deg/pgba_stdv.19591215"
</value>
</pair>
</env>
<param> \
&DATA_DIR_MODEL;/grib2/gfsanl/gfsanl_4_20120409_1200_000.grb2 \
&DATA_DIR_MODEL;/grib2/gfsanl/gfsanl_4_20120409_1200_000.grb2 \
&CONFIG_DIR;/GridStatConfig_climo_wrap_year \
-outdir &OUTPUT_DIR;/climatology_2.5deg -v 3
</param>
<output>
<stat>&OUTPUT_DIR;/climatology_2.5deg/grid_stat_SINGLE_MONTH_CLIMO_2.5DEG_000000L_20201225_120000V.stat</stat>
<grid_nc>&OUTPUT_DIR;/climatology_2.5deg/grid_stat_SINGLE_MONTH_CLIMO_2.5DEG_000000L_20201225_120000V_pairs.nc</grid_nc>
</output>
</test>

</met_test>
Loading

0 comments on commit 31a063c

Please sign in to comment.