Skip to content

Commit

Permalink
Feature 2709 mvmode multithreshradii (#3034)
Browse files Browse the repository at this point in the history
* Source code changes for multiple radii/thresholds in multivariate mode

* Slight cleanup

* added multiple thresh/radii functionality for the mvmode superobjects only situation

* mvmode log message improvements

* Mods to the mode users guide for multiple convolution thresholds and radii in multivariate mode

* Added v12.1

* Minor bugfix and tweak

* Per #2709, updates to fix SonarQube code smells.

* Per #2709, fix compilation problem I introduced with SonarQube fixes.

* Per #2709, eliminate SonarQube bug that was flagged

* Per #2709, fix typo in docs

---------

Co-authored-by: MET Tools Test Account <[email protected]>
  • Loading branch information
davidalbo and MET Tools Test Account authored Dec 17, 2024
1 parent 0600e02 commit 29034e9
Show file tree
Hide file tree
Showing 16 changed files with 1,016 additions and 713 deletions.
6 changes: 5 additions & 1 deletion docs/Users_Guide/mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ When regridding to the FCST or OBS field (e.g. to_grid = FCST), the first field

"file_type" can be set independently for each input in multivariate mode. If not set for an input, MET uses file names and file content to determine the type.

In multivariate mode, with quilt=**FALSE**, for all inputs the number of forecast and observation convolution radii and thresholds must all match. One configuration of MODE will be run for each group of settings in those lists.

In multivariate mode, with quilt=**TRUE**, for all inputs the number of forecast and observation convolution radii must match and the number of forecast and observation convolution thresholds must match. When each input has N radii and M thresholds, NxM configurations of MODE will be run.

When setting a threshold to a percentile, some choices require both an observation input and a forecast input. When this is the case, it's assumed the indices match, so for example if forecast input 1 has such a percentile setting, then observation input 1 will be used to compute the percentile. Percentiles in which this will happen are:

* SFP in an observation input.
Expand Down Expand Up @@ -319,7 +323,7 @@ The **conv_radius** entry defines the radius of the circular convolution applied

The **conv_thresh** entry specifies the threshold values to be applied to the convolved field to define objects. By default, objects are defined using a convolution threshold of 5.0. Multiple convolution thresholds may be specified as an array (e.g. **conv_thresh = [ >=5.0, >=10.0, >=15.0 ];)**.

Multiple convolution radii and thresholds and processed using the logic defined by the **quilt** entry.
Multiple convolution radii and thresholds are processed using the logic defined by the **quilt** entry. The logic specific to multivariate mode is described in the multivariate mode section above.

The **vld_thresh** entry must be set between 0 and 1. When performing the circular convolution step if the proportion of bad data values in the convolution area is greater than or equal to this threshold, the resulting convolved value will be bad data. If the proportion is less than this threshold, the convolution will be performed on only the valid data. By default, the **vld_thresh** is set to 0.5.

Expand Down
2 changes: 0 additions & 2 deletions src/libcode/vx_shapedata/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ void ModeFuzzyEngine::do_fcst_convolution() {
if(!need_fcst_conv) return;

r = conf_info.Fcst->conv_radius;

*fcst_conv = *fcst_raw;

mlog << Debug(3) << "Applying circular convolution of radius "
Expand Down Expand Up @@ -645,7 +644,6 @@ void ModeFuzzyEngine::do_obs_convolution() {
if(!need_obs_conv) return;

r = conf_info.Obs->conv_radius;

*obs_conv = *obs_raw;

mlog << Debug(3) << "Applying circular convolution of radius "
Expand Down
Loading

0 comments on commit 29034e9

Please sign in to comment.