[Met_help] [rt.rap.ucar.edu #83090] History for Adding a variable to MODE's interest function
John Halley Gotway via RT
met_help at ucar.edu
Tue Jul 9 12:04:05 MDT 2019
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Hello,
I am curious about how difficult it would be for me to modify MODE's source code to include a new variable in MODE's interest function? I would like to include the Object Attribute of Aspect Ratio, so that MODE would give weight to the shape of the object when matching. Specifically, we are examining the ability of a model to predict banded structures (long and narrow) in radar reflectivity, so the ability to match objects based on a high aspect ratio would be useful to us. If modifying the source code would prove difficult, would there be any other way to identify matches based on aspect ratio through post processing of the text output files?
Thanks for any assistance you can provide,
Marty
_____________________________
Marty Baxter, Ph.D.
Professor of Meteorology
Department of Earth and Atmospheric Sciences
Central Michigan University
(989) 774-2055
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: Adding a variable to MODE's interest function
From: John Halley Gotway
Time: Mon Nov 20 16:07:07 2017
Marty,
When we run MODE, we typically find that spatial information (like
intersection area and centroid or boundary distance) are sufficient
for
determining which objects should match between fields. Once we have
matching objects, we look at other object attributes to diagnose
differences between them... things like intensity percentiles,
orientation
angles, and aspect ratios.
So while aspect ratio is an interesting object attribute, we haven't
needed
it in the past to determine how the object matching should be done.
If you do think it'd be useful for you, I really don't think it'd be
all
that difficult to modify the C++ source code. Rather than "adding" a
new
one, I'd suggest repurposing an existing one for your use. Looking at
the
list of fuzzy engine weights, pick one that you're not currently using
and
redefine it in the code for your aspect ratio logic.
And then think about how you'd like to define it. Each object has an
aspect ratio value between 0 and 1. When comparing the aspect ratios
between objects, how do you want to compare them? You could use the
ratio
of the aspect ratios. If you put the min AR / max AR, that'd give you
a
value between 0 and 1. Or you could compute the fcst AR - obs AR.
And
that'd give you values between -1 and 1. How would you like to define
the
pair information for aspect ratios?
Thanks,
John Halley Gotway
On Mon, Nov 20, 2017 at 3:03 PM, Baxter, Martin A via RT
<met_help at ucar.edu>
wrote:
>
> Mon Nov 20 15:03:17 2017: Request 83090 was acted upon.
> Transaction: Ticket created by baxte1ma at cmich.edu
> Queue: met_help
> Subject: Adding a variable to MODE's interest function
> Owner: Nobody
> Requestors: baxte1ma at cmich.edu
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83090 >
>
>
> Hello,
>
>
> I am curious about how difficult it would be for me to modify MODE's
> source code to include a new variable in MODE's interest function? I
would
> like to include the Object Attribute of Aspect Ratio, so that MODE
would
> give weight to the shape of the object when matching. Specifically,
we are
> examining the ability of a model to predict banded structures (long
and
> narrow) in radar reflectivity, so the ability to match objects based
on a
> high aspect ratio would be useful to us. If modifying the source
code would
> prove difficult, would there be any other way to identify matches
based on
> aspect ratio through post processing of the text output files?
>
> Thanks for any assistance you can provide,
>
>
> Marty
>
>
> _____________________________
> Marty Baxter, Ph.D.
> Professor of Meteorology
> Department of Earth and Atmospheric Sciences
> Central Michigan University
> (989) 774-2055
>
>
------------------------------------------------
Subject: Adding a variable to MODE's interest function
From: Baxter, Martin A
Time: Tue Nov 21 14:53:47 2017
Hi John,
Thanks for your quick response. I'm not sure if this approach will
bear fruit, but I am interested in investigating it. I am hoping to do
matching in a way that assigns a match if a linear structure is found
in both the model and obs, even if these objects are far away from one
another or different in area. This will help me learn if the model is
predicting a snowband at all, and then we can look at how different it
is versus the obs in terms of area and location. If there is any other
(easier) way to achieve this approach without modifying the code to
search for objects with similar aspect ratios, I am open to it.
I like your idea of using the min AR / max AR ratio to compare the
objects. I would probably swap out the complexity ratio, as this seems
to be less useful for us. Would I need to do anything different with
the interest function? How many routines would need to be modified?
Will this be as simple as swapping in the aspect ratio variable in for
the complexity variable in routines that make use of these variables?
Thanks again for your help,
Marty
_____________________________
Marty Baxter, Ph.D.
Professor of Meteorology
Department of Earth and Atmospheric Sciences
Central Michigan University
(989) 774-2055
________________________________
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Monday, November 20, 2017 6:07:08 PM
To: Baxter, Martin A
Subject: Re: [rt.rap.ucar.edu #83090] Adding a variable to MODE's
interest function
Marty,
When we run MODE, we typically find that spatial information (like
intersection area and centroid or boundary distance) are sufficient
for
determining which objects should match between fields. Once we have
matching objects, we look at other object attributes to diagnose
differences between them... things like intensity percentiles,
orientation
angles, and aspect ratios.
So while aspect ratio is an interesting object attribute, we haven't
needed
it in the past to determine how the object matching should be done.
If you do think it'd be useful for you, I really don't think it'd be
all
that difficult to modify the C++ source code. Rather than "adding" a
new
one, I'd suggest repurposing an existing one for your use. Looking at
the
list of fuzzy engine weights, pick one that you're not currently using
and
redefine it in the code for your aspect ratio logic.
And then think about how you'd like to define it. Each object has an
aspect ratio value between 0 and 1. When comparing the aspect ratios
between objects, how do you want to compare them? You could use the
ratio
of the aspect ratios. If you put the min AR / max AR, that'd give you
a
value between 0 and 1. Or you could compute the fcst AR - obs AR.
And
that'd give you values between -1 and 1. How would you like to define
the
pair information for aspect ratios?
Thanks,
John Halley Gotway
On Mon, Nov 20, 2017 at 3:03 PM, Baxter, Martin A via RT
<met_help at ucar.edu>
wrote:
>
> Mon Nov 20 15:03:17 2017: Request 83090 was acted upon.
> Transaction: Ticket created by baxte1ma at cmich.edu
> Queue: met_help
> Subject: Adding a variable to MODE's interest function
> Owner: Nobody
> Requestors: baxte1ma at cmich.edu
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83090 >
>
>
> Hello,
>
>
> I am curious about how difficult it would be for me to modify MODE's
> source code to include a new variable in MODE's interest function? I
would
> like to include the Object Attribute of Aspect Ratio, so that MODE
would
> give weight to the shape of the object when matching. Specifically,
we are
> examining the ability of a model to predict banded structures (long
and
> narrow) in radar reflectivity, so the ability to match objects based
on a
> high aspect ratio would be useful to us. If modifying the source
code would
> prove difficult, would there be any other way to identify matches
based on
> aspect ratio through post processing of the text output files?
>
> Thanks for any assistance you can provide,
>
>
> Marty
>
>
> _____________________________
> Marty Baxter, Ph.D.
> Professor of Meteorology
> Department of Earth and Atmospheric Sciences
> Central Michigan University
> (989) 774-2055
>
>
------------------------------------------------
Subject: Adding a variable to MODE's interest function
From: John Halley Gotway
Time: Mon Nov 27 09:12:43 2017
Marty,
This could just be a one-line change. In this file,
src/libcode/vx_shapedata/interest.cc, edit lines 252 - 255 and
redefine the
object's complexity value using it's aspect ratio:
252 //
253 // Complexity
254 //
255 //complexity = Mask->complexity();
complexity = aspect_ratio;
Wherever you see complexity in the output, it'll now be the object's
aspect
ratio. And then complexity_ratio will now be the ratio of the aspect
ratio's.
Make sense?
Thanks,
John
On Tue, Nov 21, 2017 at 2:53 PM, Baxter, Martin A via RT
<met_help at ucar.edu>
wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83090 >
>
> Hi John,
>
>
> Thanks for your quick response. I'm not sure if this approach will
bear
> fruit, but I am interested in investigating it. I am hoping to do
matching
> in a way that assigns a match if a linear structure is found in both
the
> model and obs, even if these objects are far away from one another
or
> different in area. This will help me learn if the model is
predicting a
> snowband at all, and then we can look at how different it is versus
the obs
> in terms of area and location. If there is any other (easier) way to
> achieve this approach without modifying the code to search for
objects with
> similar aspect ratios, I am open to it.
>
>
> I like your idea of using the min AR / max AR ratio to compare the
> objects. I would probably swap out the complexity ratio, as this
seems to
> be less useful for us. Would I need to do anything different with
the
> interest function? How many routines would need to be modified? Will
this
> be as simple as swapping in the aspect ratio variable in for the
complexity
> variable in routines that make use of these variables?
>
>
> Thanks again for your help,
>
>
> Marty
>
>
> _____________________________
> Marty Baxter, Ph.D.
> Professor of Meteorology
> Department of Earth and Atmospheric Sciences
> Central Michigan University
> (989) 774-2055
> ________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Monday, November 20, 2017 6:07:08 PM
> To: Baxter, Martin A
> Subject: Re: [rt.rap.ucar.edu #83090] Adding a variable to MODE's
> interest function
>
> Marty,
>
> When we run MODE, we typically find that spatial information (like
> intersection area and centroid or boundary distance) are sufficient
for
> determining which objects should match between fields. Once we have
> matching objects, we look at other object attributes to diagnose
> differences between them... things like intensity percentiles,
orientation
> angles, and aspect ratios.
>
> So while aspect ratio is an interesting object attribute, we haven't
needed
> it in the past to determine how the object matching should be done.
>
> If you do think it'd be useful for you, I really don't think it'd be
all
> that difficult to modify the C++ source code. Rather than "adding"
a new
> one, I'd suggest repurposing an existing one for your use. Looking
at the
> list of fuzzy engine weights, pick one that you're not currently
using and
> redefine it in the code for your aspect ratio logic.
>
> And then think about how you'd like to define it. Each object has
an
> aspect ratio value between 0 and 1. When comparing the aspect
ratios
> between objects, how do you want to compare them? You could use the
ratio
> of the aspect ratios. If you put the min AR / max AR, that'd give
you a
> value between 0 and 1. Or you could compute the fcst AR - obs AR.
And
> that'd give you values between -1 and 1. How would you like to
define the
> pair information for aspect ratios?
>
> Thanks,
> John Halley Gotway
>
> On Mon, Nov 20, 2017 at 3:03 PM, Baxter, Martin A via RT <
> met_help at ucar.edu>
> wrote:
>
> >
> > Mon Nov 20 15:03:17 2017: Request 83090 was acted upon.
> > Transaction: Ticket created by baxte1ma at cmich.edu
> > Queue: met_help
> > Subject: Adding a variable to MODE's interest function
> > Owner: Nobody
> > Requestors: baxte1ma at cmich.edu
> > Status: new
> > Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83090 >
> >
> >
> > Hello,
> >
> >
> > I am curious about how difficult it would be for me to modify
MODE's
> > source code to include a new variable in MODE's interest function?
I
> would
> > like to include the Object Attribute of Aspect Ratio, so that MODE
would
> > give weight to the shape of the object when matching.
Specifically, we
> are
> > examining the ability of a model to predict banded structures
(long and
> > narrow) in radar reflectivity, so the ability to match objects
based on a
> > high aspect ratio would be useful to us. If modifying the source
code
> would
> > prove difficult, would there be any other way to identify matches
based
> on
> > aspect ratio through post processing of the text output files?
> >
> > Thanks for any assistance you can provide,
> >
> >
> > Marty
> >
> >
> > _____________________________
> > Marty Baxter, Ph.D.
> > Professor of Meteorology
> > Department of Earth and Atmospheric Sciences
> > Central Michigan University
> > (989) 774-2055
> >
> >
>
>
>
------------------------------------------------
More information about the Met_help
mailing list