Skip to content

Commit

Permalink
Per #1643, redefine the contents of the existing AREA_RATIO output co…
Browse files Browse the repository at this point in the history
…lumn from MODE. Define it as FCST/OBS object area instead of min/max. Update the User's Guide to note the change and also clarify that the MTD VOLUME_RATIO output really is FCST/OBS. (#1650)
  • Loading branch information
JohnHalleyGotway committed Feb 1, 2021
1 parent 04e3397 commit 1186ec3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion met/docs/Users_Guide/mode-td.rst
Expand Up @@ -622,7 +622,7 @@ The contents of the OBJECT_ID and OBJECT_CAT columns identify the objects using
- Difference in object direction of movement
* - 30
- VOLUME_RATIO
- Ratio of object volumes
- Forecast object volume divided by observation object volume
* - 31
- START_TIME_DELTA
- Difference in object starting time steps
Expand Down
3 changes: 2 additions & 1 deletion met/docs/Users_Guide/mode.rst
Expand Up @@ -818,7 +818,8 @@ The contents of the columns in this ASCII file are summarized in :numref:`MODE_o
- Absolute value of the difference between the aspect ratios of two objects (unitless)
* - 50
- AREA_RATIO
- Ratio of the areas of two objects defined as the lesser of the two divided by the greater of the two (unitless)
- The forecast object area divided by the observation object area (unitless) :raw-html:`<br />`
**NOTE:** Prior to met-10.0.0, defined as the lesser of the two object areas divided by the greater of the two
* - 51
- INTERSECTION :raw-html:`<br />` \_AREA
- Intersection area of two objects (in grid squares)
Expand Down
8 changes: 4 additions & 4 deletions met/src/libcode/vx_shapedata/engine.cc
Expand Up @@ -3157,8 +3157,8 @@ void write_pair(ModeFuzzyEngine &eng, const Grid & grid, const int n_f, const in
// Difference in aspect ratio
at.set_entry(row, c++, eng.pair_single[n].aspect_diff);

// Area ratio
at.set_entry(row, c++, eng.pair_single[n].area_ratio);
// Fcst/Obs area ratio
at.set_entry(row, c++, eng.pair_single[n].fo_area_ratio);

// Intersection area
at.set_entry(row, c++,
Expand Down Expand Up @@ -3460,8 +3460,8 @@ void write_cluster_pair(ModeFuzzyEngine &eng, const Grid & grid, const int n,
// Difference in aspect ratio
at.set_entry(row, c++, eng.pair_cluster[n].aspect_diff);

// Area ratio
at.set_entry(row, c++, eng.pair_cluster[n].area_ratio);
// Fcst/Obs area ratio
at.set_entry(row, c++, eng.pair_cluster[n].fo_area_ratio);

// Intersection area
at.set_entry(row, c++,
Expand Down
10 changes: 8 additions & 2 deletions met/src/libcode/vx_shapedata/interest.cc
Expand Up @@ -348,6 +348,7 @@ void PairFeature::clear()
convex_hull_dist = 0.0;
angle_diff = 0.0;
aspect_diff = 0.0;
fo_area_ratio = 0.0;
area_ratio = 0.0;
intersection_area = 0.0;
union_area = 0.0;
Expand All @@ -374,6 +375,7 @@ void PairFeature::assign(const PairFeature &p) {
convex_hull_dist = p.convex_hull_dist;
angle_diff = p.angle_diff;
aspect_diff = p.aspect_diff;
fo_area_ratio = p.fo_area_ratio;
area_ratio = p.area_ratio;
intersection_area = p.intersection_area;
union_area = p.union_area;
Expand Down Expand Up @@ -454,8 +456,11 @@ void PairFeature::set(const SingleFeature &fcst,
//
// Area ratio
//
area_ratio = min( (Obs->area)/(Fcst->area),
(Fcst->area)/(Obs->area) );
fo_area_ratio = (Fcst->area)/(Obs->area);

area_ratio = min( (Obs->area)/(Fcst->area),
(Fcst->area)/(Obs->area) );


//
// Intersection, union, and symmetric diff areas
Expand Down Expand Up @@ -575,6 +580,7 @@ ostream & operator<<(ostream & out, const PairFeature & p)
out << "Convex Hull Distance = " << (p.convex_hull_dist) << "\n";
out << "Angle Difference = " << (p.angle_diff) << "\n";
out << "Aspect Difference = " << (p.aspect_diff) << "\n";
out << "Fcst/Obs Area Ratio = " << (p.fo_area_ratio) << "\n";
out << "Area Ratio = " << (p.area_ratio) << "\n";
out << "Intersection Area = " << nint(p.intersection_area) << "\n";
out << "Union Area = " << nint(p.union_area) << "\n";
Expand Down
1 change: 1 addition & 0 deletions met/src/libcode/vx_shapedata/interest.h
Expand Up @@ -121,6 +121,7 @@ class PairFeature {
double convex_hull_dist;
double angle_diff;
double aspect_diff;
double fo_area_ratio;
double area_ratio;
double intersection_area;
double union_area;
Expand Down

0 comments on commit 1186ec3

Please sign in to comment.